Skip to content

Commit dc9af47

Browse files
committed
Use final.
1 parent 2e63535 commit dc9af47

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,40 +18,41 @@ Licensed to the Apache Software Foundation (ASF) under one or more
1818
package org.apache.commons.cli;
1919

2020
/**
21-
* Exception thrown during parsing signalling an unrecognized option was seen.
21+
* Thrown during parsing signaling an unrecognized option.
2222
*/
2323
public class UnrecognizedOptionException extends ParseException {
24+
2425
/**
2526
* This exception {@code serialVersionUID}.
2627
*/
2728
private static final long serialVersionUID = -252504690284625623L;
2829

29-
/** The unrecognized option */
30-
private String option;
30+
/** The unrecognized option. */
31+
private final String option;
3132

3233
/**
33-
* Construct a new <code>UnrecognizedArgumentException</code> with the specified detail message.
34+
* Constructs a new <code>UnrecognizedArgumentException</code> with the specified detail message.
3435
*
3536
* @param message the detail message
3637
*/
3738
public UnrecognizedOptionException(final String message) {
38-
super(message);
39+
this(message, null);
3940
}
4041

4142
/**
42-
* Construct a new <code>UnrecognizedArgumentException</code> with the specified option and detail message.
43+
* Constructs a new <code>UnrecognizedArgumentException</code> with the specified option and detail message.
4344
*
4445
* @param message the detail message
4546
* @param option the unrecognized option
4647
* @since 1.2
4748
*/
4849
public UnrecognizedOptionException(final String message, final String option) {
49-
this(message);
50+
super(message);
5051
this.option = option;
5152
}
5253

5354
/**
54-
* Returns the unrecognized option.
55+
* Gets the unrecognized option.
5556
*
5657
* @return the related option
5758
* @since 1.2

0 commit comments

Comments
 (0)