commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject svn commit: r955185 - in /commons/proper/cli/trunk/src/main/java/org/apache/commons/cli: CommandLine.java HelpFormatter.java Option.java OptionBuilder.java OptionGroup.java Options.java
Date Wed, 16 Jun 2010 10:32:08 GMT
Author: ebourg
Date: Wed Jun 16 10:32:08 2010
New Revision: 955185

URL: http://svn.apache.org/viewvc?rev=955185&view=rev
Log:
Fixed some of the checkstyle errors

Modified:
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/CommandLine.java
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/HelpFormatter.java
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Option.java
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/OptionBuilder.java
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/OptionGroup.java
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java

Modified: commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/CommandLine.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/CommandLine.java?rev=955185&r1=955184&r2=955185&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/CommandLine.java (original)
+++ commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/CommandLine.java Wed Jun
16 10:32:08 2010
@@ -42,6 +42,7 @@ import java.util.Properties;
  */
 public class CommandLine implements Serializable
 {
+    /** The serial version UID. */
     private static final long serialVersionUID = 1L;
 
     /** the unrecognised options/arguments */
@@ -89,11 +90,13 @@ public class CommandLine implements Seri
      */
     public Object getOptionObject(String opt)
     {
-        try {
+        try
+        {
             return getParsedOptionValue(opt);
-        } catch(ParseException pe) {
-            System.err.println("Exception found converting " + opt + " to desired type: "
+ 
-                pe.getMessage() );
+        }
+        catch (ParseException pe)
+        {
+            System.err.println("Exception found converting " + opt + " to desired type: "
+ pe.getMessage());
             return null;
         }
     }

Modified: commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/HelpFormatter.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/HelpFormatter.java?rev=955185&r1=955184&r2=955185&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/HelpFormatter.java (original)
+++ commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/HelpFormatter.java Wed Jun
16 10:32:08 2010
@@ -763,8 +763,8 @@ public class HelpFormatter
         for (Iterator i = optList.iterator(); i.hasNext();)
         {
             Option option = (Option) i.next();
-            optBuf = new StringBuffer(8);
-
+            optBuf = new StringBuffer();
+            
             if (option.getOpt() == null)
             {
                 optBuf.append(lpad).append("   " + defaultLongOptPrefix).append(option.getLongOpt());
@@ -874,7 +874,7 @@ public class HelpFormatter
                 return sb;
             }
             
-            if ( (text.length() > width) && (pos == nextLineTabStop - 1) ) 
+            if ((text.length() > width) && (pos == nextLineTabStop - 1))
             {
                 pos = width;
             }

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=955185&r1=955184&r2=955185&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 Wed Jun 16 10:32:08
2010
@@ -38,6 +38,7 @@ import java.util.List;
  */
 public class Option implements Cloneable, Serializable
 {
+    /** The serial version UID. */
     private static final long serialVersionUID = 1L;
 
     /** constant that specifies the number of argument values has not been specified */
@@ -619,7 +620,7 @@ public class Option implements Cloneable
     public int hashCode()
     {
         int result;
-        result = (opt != null ? opt.hashCode() : 0);
+        result = opt != null ? opt.hashCode() : 0;
         result = 31 * result + (longOpt != null ? longOpt.hashCode() : 0);
         return result;
     }

Modified: commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/OptionBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/OptionBuilder.java?rev=955185&r1=955184&r2=955185&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/OptionBuilder.java (original)
+++ commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/OptionBuilder.java Wed Jun
16 10:32:08 2010
@@ -346,7 +346,8 @@ public final class OptionBuilder
     public static Option create(String opt) throws IllegalArgumentException
     {
         Option option = null;
-        try {
+        try
+        {
             // create the option
             option = new Option(opt, description);
 
@@ -358,7 +359,9 @@ public final class OptionBuilder
             option.setType(type);
             option.setValueSeparator(valuesep);
             option.setArgName(argName);
-        } finally {
+        }
+        finally
+        {
             // reset the OptionBuilder properties
             OptionBuilder.reset();
         }

Modified: commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/OptionGroup.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/OptionGroup.java?rev=955185&r1=955184&r2=955185&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/OptionGroup.java (original)
+++ commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/OptionGroup.java Wed Jun
16 10:32:08 2010
@@ -31,6 +31,7 @@ import java.util.Map;
  */
 public class OptionGroup implements Serializable
 {
+    /** The serial version UID. */
     private static final long serialVersionUID = 1L;
     
     /** hold the options */

Modified: commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java?rev=955185&r1=955184&r2=955185&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java (original)
+++ commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java Wed Jun 16
10:32:08 2010
@@ -45,6 +45,7 @@ import java.util.Map;
  */
 public class Options implements Serializable
 {
+    /** The serial version UID. */
     private static final long serialVersionUID = 1L;
 
     /** a map of the options with the character key */



Mime
View raw message