commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1544819 - in /commons/proper/cli/trunk: RELEASE-NOTES.txt src/changes/changes.xml src/main/java/org/apache/commons/cli/OptionValidator.java
Date Sat, 23 Nov 2013 15:34:31 GMT
Author: tn
Date: Sat Nov 23 15:34:31 2013
New Revision: 1544819

URL: http://svn.apache.org/r1544819
Log:
[CLI-241] Clarified javadoc of OptionValidator. Thanks to Beluga Behr.

Modified:
    commons/proper/cli/trunk/RELEASE-NOTES.txt
    commons/proper/cli/trunk/src/changes/changes.xml
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/OptionValidator.java

Modified: commons/proper/cli/trunk/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/RELEASE-NOTES.txt?rev=1544819&r1=1544818&r2=1544819&view=diff
==============================================================================
--- commons/proper/cli/trunk/RELEASE-NOTES.txt (original)
+++ commons/proper/cli/trunk/RELEASE-NOTES.txt Sat Nov 23 15:34:31 2013
@@ -36,6 +36,8 @@ NEW FEATURES:
 
 BUG FIXES:
 
+  * Clarified behavior of "OptionValidator#validateOption(String)" in case of null input.
Thanks to Beluga Behr. (CLI-241)
+
   * Default options will now work correctly with required options that are missing. (CLI-202)
 
   * Default options will now work correctly together with option groups. (CLI-203) 

Modified: commons/proper/cli/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/changes/changes.xml?rev=1544819&r1=1544818&r2=1544819&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/changes/changes.xml (original)
+++ commons/proper/cli/trunk/src/changes/changes.xml Sat Nov 23 15:34:31 2013
@@ -23,6 +23,9 @@
   <body>
     
     <release version="1.3" date="in SVN" description="This is a maintenance release containing
bug fixes.">
+      <action type="fix" dev="tn" issue="CLI-241" due-to="Beluga Behr">
+        Clarified behavior of "OptionValidator#validateOption(String)" in case of null input.
+      </action>
       <action type="update" dev="tn" issue="CLI-240" due-to="Beluga Behr">
         Small cleanup of Option class.
       </action>

Modified: commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/OptionValidator.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/OptionValidator.java?rev=1544819&r1=1544818&r2=1544819&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/OptionValidator.java (original)
+++ commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/OptionValidator.java Sat
Nov 23 15:34:31 2013
@@ -31,19 +31,20 @@ final class OptionValidator
      * is valid are:
      *
      * <ul>
-     *  <li><code>opt</code> is not NULL</li>
      *  <li>a single character <code>opt</code> that is either
      *  ' '(special case), '?', '@' or a letter</li>
      *  <li>a multi character <code>opt</code> that only contains
      *  letters.</li>
      * </ul>
+     * <p>
+     * In case {@code opt} is {@code null} no further validation is performed.
      *
-     * @param opt The option string to validate
+     * @param opt The option string to validate, may be null
      * @throws IllegalArgumentException if the Option is not valid.
      */
     static void validateOption(String opt) throws IllegalArgumentException
     {
-        // check that opt is not NULL
+        // if opt is NULL do not check further
         if (opt == null)
         {
             return;



Mime
View raw message