Skip to content

Commit 0243189

Browse files
committed
Removed the null descriptions from the string representation of the option groups
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/cli/trunk@1073925 13f79535-47bb-0310-9956-ffa450edef68
1 parent e3fda7d commit 0243189

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

src/main/java/org/apache/commons/cli/OptionGroup.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,13 @@ public String toString()
159159
buff.append("--");
160160
buff.append(option.getLongOpt());
161161
}
162-
163-
buff.append(" ");
164-
buff.append(option.getDescription());
165-
162+
163+
if (option.getDescription() != null)
164+
{
165+
buff.append(" ");
166+
buff.append(option.getDescription());
167+
}
168+
166169
if (iter.hasNext())
167170
{
168171
buff.append(", ");

0 commit comments

Comments
 (0)