From bee2d3920630c281b89d471e9428e0ab0c923e02 Mon Sep 17 00:00:00 2001 From: Markus KARG Date: Sun, 17 Dec 2023 19:02:35 +0000 Subject: [PATCH] Simplified code / Fixed typo --- src/main/java/com/beust/jcommander/DefaultUsageFormatter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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";