Skip to content

Commit

Permalink
Simplified code / Fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mkarg committed Dec 17, 2023
1 parent d273b60 commit bee2d39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/beust/jcommander/DefaultUsageFormatter.java
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public void appendAllParametersDetails(StringBuilder out, int indentCount, Strin
}

String category = pd.getCategory();
if (!category.equals("")) {
if (!category.isEmpty()) {
String categoryType = "Category: " + category;

if (hasDescription) {
Expand All @@ -200,7 +200,7 @@ public void appendAllParametersDetails(StringBuilder out, int indentCount, Strin
out.append(categoryType);
}

Object def = pd.getDefaultDescription();
Object def = pd.getDefaultValueDescription();

if (pd.isDynamicParameter()) {
String syntax = "Syntax: " + parameter.names()[0] + "key" + parameter.getAssignment() + "value";
Expand Down

0 comments on commit bee2d39

Please sign in to comment.