commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject svn commit: r678678 - /commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/OptionValidator.java
Date Tue, 22 Jul 2008 08:41:41 GMT
Author: ebourg
Date: Tue Jul 22 01:41:41 2008
New Revision: 678678

URL: http://svn.apache.org/viewvc?rev=678678&view=rev
Log:
Changed the visibility of OptionValidator to package private since all its methods are either
private or package private

Modified:
    commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/OptionValidator.java

Modified: commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/OptionValidator.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/OptionValidator.java?rev=678678&r1=678677&r2=678678&view=diff
==============================================================================
--- commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/OptionValidator.java
(original)
+++ commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/OptionValidator.java
Tue Jul 22 01:41:41 2008
@@ -14,6 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package org.apache.commons.cli;
 
 /**
@@ -22,7 +23,7 @@
  * @author John Keyes ( john at integralsource.com )
  * @since 1.1
  */
-public class OptionValidator {
+class OptionValidator {
 
     /**
      * <p>Validates whether <code>opt</code> is a permissable Option
@@ -39,8 +40,7 @@
      * @param opt The option string to validate
      * @throws IllegalArgumentException if the Option is not valid.
      */
-    static void validateOption(String opt)
-                        throws IllegalArgumentException
+    static void validateOption(String opt) throws IllegalArgumentException
     {
         // check that opt is not NULL
         if (opt == null)
@@ -55,8 +55,7 @@
 
             if (!isValidOpt(ch))
             {
-                throw new IllegalArgumentException("illegal option value '" + ch
-                                                   + "'");
+                throw new IllegalArgumentException("illegal option value '" + ch + "'");
             }
         }
 
@@ -69,9 +68,7 @@
             {
                 if (!isValidChar(chars[i]))
                 {
-                    throw new IllegalArgumentException(
-                            "opt contains illegal character value '" + chars[i]
-                            + "'");
+                    throw new IllegalArgumentException("opt contains illegal character value
'" + chars[i] + "'");
                 }
             }
         }



Mime
View raw message