commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject svn commit: r1073925 - /commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/OptionGroup.java
Date Wed, 23 Feb 2011 20:18:23 GMT
Author: ebourg
Date: Wed Feb 23 20:18:23 2011
New Revision: 1073925

URL: http://svn.apache.org/viewvc?rev=1073925&view=rev
Log:
Removed the null descriptions from the string representation of the option groups

Modified:
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/OptionGroup.java

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=1073925&r1=1073924&r2=1073925&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 Feb
23 20:18:23 2011
@@ -159,10 +159,13 @@ public class OptionGroup implements Seri
                 buff.append("--");
                 buff.append(option.getLongOpt());
             }
-
-            buff.append(" ");
-            buff.append(option.getDescription());
-
+            
+            if (option.getDescription() != null)
+            {
+                buff.append(" ");
+                buff.append(option.getDescription());
+            }
+            
             if (iter.hasNext())
             {
                 buff.append(", ");



Mime
View raw message