Skip to content

Commit 6647dcc

Browse files
The maximum can be calculated using a Math.max() instead of doing it manually. (apache#111)
1 parent 6591c45 commit 6647dcc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ protected StringBuffer renderOptions(final StringBuffer sb, final int width, fin
708708
}
709709

710710
prefixList.add(optBuf);
711-
max = optBuf.length() > max ? optBuf.length() : max;
711+
max = Math.max(optBuf.length(), max);
712712
}
713713

714714
int x = 0;

0 commit comments

Comments
 (0)