File tree Expand file tree Collapse file tree
src/main/java/org/apache/commons/cli Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,40 +18,41 @@ Licensed to the Apache Software Foundation (ASF) under one or more
1818package 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 */
2323public 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
You can’t perform that action at this time.
0 commit comments