File tree Expand file tree Collapse file tree
main/java/org/apache/commons/cli Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ NEW FEATURES:
3636
3737BUG FIXES:
3838
39+ * Clarified behavior of "OptionValidator#validateOption(String)" in case of null input. Thanks to Beluga Behr. (CLI-241)
40+
3941 * Default options will now work correctly with required options that are missing. (CLI-202)
4042
4143 * Default options will now work correctly together with option groups. (CLI-203)
Original file line number Diff line number Diff line change 2323 <body >
2424
2525 <release version =" 1.3" date =" in SVN" description =" This is a maintenance release containing bug fixes." >
26+ <action type =" fix" dev =" tn" issue =" CLI-241" due-to =" Beluga Behr" >
27+ Clarified behavior of "OptionValidator#validateOption(String)" in case of null input.
28+ </action >
2629 <action type =" update" dev =" tn" issue =" CLI-240" due-to =" Beluga Behr" >
2730 Small cleanup of Option class.
2831 </action >
Original file line number Diff line number Diff line change @@ -31,19 +31,20 @@ final class OptionValidator
3131 * is valid are:
3232 *
3333 * <ul>
34- * <li><code>opt</code> is not NULL</li>
3534 * <li>a single character <code>opt</code> that is either
3635 * ' '(special case), '?', '@' or a letter</li>
3736 * <li>a multi character <code>opt</code> that only contains
3837 * letters.</li>
3938 * </ul>
39+ * <p>
40+ * In case {@code opt} is {@code null} no further validation is performed.
4041 *
41- * @param opt The option string to validate
42+ * @param opt The option string to validate, may be null
4243 * @throws IllegalArgumentException if the Option is not valid.
4344 */
4445 static void validateOption (String opt ) throws IllegalArgumentException
4546 {
46- // check that opt is not NULL
47+ // if opt is NULL do not check further
4748 if (opt == null )
4849 {
4950 return ;
You can’t perform that action at this time.
0 commit comments