diff --git a/src/main/java/com/beust/jcommander/DefaultUsageFormatter.java b/src/main/java/com/beust/jcommander/DefaultUsageFormatter.java index 267c0a98..4456103d 100644 --- a/src/main/java/com/beust/jcommander/DefaultUsageFormatter.java +++ b/src/main/java/com/beust/jcommander/DefaultUsageFormatter.java @@ -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) { @@ -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";