Skip to content

Commit 4e8b3a2

Browse files
committed
Sort members.
1 parent bc0edc4 commit 4e8b3a2

39 files changed

Lines changed: 3709 additions & 3710 deletions

src/conf/checkstyle.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ limitations under the License.
120120
<module name="StringLiteralEquality"/>
121121
<module name="SuperClone"/>
122122
<module name="SuperFinalize"/>
123-
<module name="DeclarationOrder"/>
124123
<module name="ExplicitInitialization"/>
125124
<module name="DefaultComesLast"/>
126125
<module name="FallThrough"/>

src/main/java/org/apache/commons/cli/AlreadySelectedException.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,6 @@ public class AlreadySelectedException extends ParseException {
3232
/** The option that triggered the exception. */
3333
private Option option;
3434

35-
/**
36-
* Construct a new <code>AlreadySelectedException</code> with the specified detail message.
37-
*
38-
* @param message the detail message
39-
*/
40-
public AlreadySelectedException(final String message) {
41-
super(message);
42-
}
43-
4435
/**
4536
* Construct a new <code>AlreadySelectedException</code> for the specified option group.
4637
*
@@ -55,13 +46,12 @@ public AlreadySelectedException(final OptionGroup group, final Option option) {
5546
}
5647

5748
/**
58-
* Returns the option group where another option has been selected.
49+
* Construct a new <code>AlreadySelectedException</code> with the specified detail message.
5950
*
60-
* @return the related option group
61-
* @since 1.2
51+
* @param message the detail message
6252
*/
63-
public OptionGroup getOptionGroup() {
64-
return group;
53+
public AlreadySelectedException(final String message) {
54+
super(message);
6555
}
6656

6757
/**
@@ -73,4 +63,14 @@ public OptionGroup getOptionGroup() {
7363
public Option getOption() {
7464
return option;
7565
}
66+
67+
/**
68+
* Returns the option group where another option has been selected.
69+
*
70+
* @return the related option group
71+
* @since 1.2
72+
*/
73+
public OptionGroup getOptionGroup() {
74+
return group;
75+
}
7676
}

src/main/java/org/apache/commons/cli/AmbiguousOptionException.java

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,29 +31,6 @@ public class AmbiguousOptionException extends UnrecognizedOptionException {
3131
*/
3232
private static final long serialVersionUID = 5829816121277947229L;
3333

34-
/** The list of options matching the partial name specified */
35-
private final Collection<String> matchingOptions;
36-
37-
/**
38-
* Constructs a new AmbiguousOptionException.
39-
*
40-
* @param option the partial option name
41-
* @param matchingOptions the options matching the name
42-
*/
43-
public AmbiguousOptionException(final String option, final Collection<String> matchingOptions) {
44-
super(createMessage(option, matchingOptions), option);
45-
this.matchingOptions = matchingOptions;
46-
}
47-
48-
/**
49-
* Returns the options matching the partial name.
50-
*
51-
* @return a collection of options matching the name
52-
*/
53-
public Collection<String> getMatchingOptions() {
54-
return matchingOptions;
55-
}
56-
5734
/**
5835
* Build the exception message from the specified list of options.
5936
*
@@ -79,4 +56,27 @@ private static String createMessage(final String option, final Collection<String
7956

8057
return buf.toString();
8158
}
59+
60+
/** The list of options matching the partial name specified */
61+
private final Collection<String> matchingOptions;
62+
63+
/**
64+
* Constructs a new AmbiguousOptionException.
65+
*
66+
* @param option the partial option name
67+
* @param matchingOptions the options matching the name
68+
*/
69+
public AmbiguousOptionException(final String option, final Collection<String> matchingOptions) {
70+
super(createMessage(option, matchingOptions), option);
71+
this.matchingOptions = matchingOptions;
72+
}
73+
74+
/**
75+
* Returns the options matching the partial name.
76+
*
77+
* @return a collection of options matching the name
78+
*/
79+
public Collection<String> getMatchingOptions() {
80+
return matchingOptions;
81+
}
8282
}

0 commit comments

Comments
 (0)