commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1439197 - in /commons/proper/cli/trunk/src/main/java/org/apache/commons/cli: Option.java OptionValidator.java Parser.java TypeHandler.java Util.java
Date Sun, 27 Jan 2013 22:00:24 GMT
Author: tn
Date: Sun Jan 27 22:00:23 2013
New Revision: 1439197

URL: http://svn.apache.org/viewvc?rev=1439197&view=rev
Log:
Fix checkstyle warnings, minor formatting, typos, complete javadoc for not yet implemented
methods.

Modified:
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Option.java
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/OptionValidator.java
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Parser.java
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/TypeHandler.java
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Util.java

Modified: commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Option.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Option.java?rev=1439197&r1=1439196&r2=1439197&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Option.java (original)
+++ commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Option.java Sun Jan 27 22:00:23
2013
@@ -26,7 +26,7 @@ import java.util.List;
  * if any exists, a flag indicating if an argument is required for
  * this option, and a self-documenting description of the option.</p>
  *
- * <p>An Option is not created independantly, but is create through
+ * <p>An Option is not created independently, but is create through
  * an instance of {@link Options}.<p>
  *
  * @see org.apache.commons.cli.Options

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=1439197&r1=1439196&r2=1439197&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 Sun
Jan 27 22:00:23 2013
@@ -27,6 +27,13 @@ package org.apache.commons.cli;
 class OptionValidator
 {
     /**
+     * Hide constructor for a utility class.
+     */
+    private OptionValidator()
+    {
+    }
+
+    /**
      * Validates whether <code>opt</code> is a permissable Option
      * shortOpt.  The rules that specify if the <code>opt</code>
      * is valid are:
@@ -68,7 +75,8 @@ class OptionValidator
             {
                 if (!isValidChar(ch))
                 {
-                    throw new IllegalArgumentException("The option '" + opt + "' contains
an illegal character : '" + ch + "'");
+                    throw new IllegalArgumentException("The option '" + opt + "' contains
an illegal "
+                                                       + "character : '" + ch + "'");
                 }
             }
         }

Modified: commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Parser.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Parser.java?rev=1439197&r1=1439196&r2=1439197&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Parser.java (original)
+++ commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Parser.java Sun Jan 27 22:00:23
2013
@@ -68,7 +68,8 @@ public abstract class Parser implements 
      * flattening when a non option has been encountered
      * @return a String array of the flattened arguments
      */
-    protected abstract String[] flatten(Options opts, String[] arguments, boolean stopAtNonOption)
throws ParseException;
+    protected abstract String[] flatten(Options opts, String[] arguments, boolean stopAtNonOption)
+            throws ParseException;
 
     /**
      * Parses the specified <code>arguments</code> based
@@ -139,7 +140,8 @@ public abstract class Parser implements 
      *
      * @since 1.1
      */
-    public CommandLine parse(Options options, String[] arguments, Properties properties,
boolean stopAtNonOption) throws ParseException
+    public CommandLine parse(Options options, String[] arguments, Properties properties,
boolean stopAtNonOption)
+            throws ParseException
     {
         // clear out the data in options in case it's been used before (CLI-71)
         for (Option opt : options.helpOptions()) {

Modified: commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/TypeHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/TypeHandler.java?rev=1439197&r1=1439196&r2=1439197&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/TypeHandler.java (original)
+++ commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/TypeHandler.java Sun Jan
27 22:00:23 2013
@@ -25,13 +25,13 @@ import java.net.URL;
 import java.util.Date;
 
 /**
-  * This is a temporary implementation. TypeHandler will handle the
-  * pluggableness of OptionTypes and it will direct all of these types
-  * of conversion functionalities to ConvertUtils component in Commons
-  * already. BeanUtils I think.
-  *
-  * @version $Revision$, $Date$
-  */
+ * This is a temporary implementation. TypeHandler will handle the
+ * pluggableness of OptionTypes and it will direct all of these types
+ * of conversion functionalities to ConvertUtils component in Commons
+ * already. BeanUtils I think.
+ *
+ * @version $Revision$, $Date$
+ */
 public class TypeHandler
 {
     /**
@@ -178,10 +178,14 @@ public class TypeHandler
 
     /**
      * Returns the date represented by <code>str</code>.
+     * <p>
+     * This method is not yet implemented and always throws an
+     * {@link UnsupportedOperationException}.
      *
      * @param str the date string
      * @return The date if <code>str</code> is a valid date string,
      * otherwise return null.
+     * @throws UnsupportedOperationException always
      */
     public static Date createDate(String str) throws ParseException
     {
@@ -220,9 +224,13 @@ public class TypeHandler
 
     /**
      * Returns the File[] represented by <code>str</code>.
+     * <p>
+     * This method is not yet implemented and always throws an
+     * {@link UnsupportedOperationException}.
      *
      * @param str the paths to the files
      * @return The File[] represented by <code>str</code>.
+     * @throws UnsupportedOperationException always
      */
     public static File[] createFiles(String str) throws ParseException
     {

Modified: commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Util.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Util.java?rev=1439197&r1=1439196&r2=1439197&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Util.java (original)
+++ commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Util.java Sun Jan 27 22:00:23
2013
@@ -26,6 +26,13 @@ package org.apache.commons.cli;
 class Util
 {
     /**
+     * Hide constructor for a utility class.
+     */
+    private Util()
+    {
+    }
+
+    /**
      * Remove the hyphens from the begining of <code>str</code> and
      * return the new String.
      *



Mime
View raw message