This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-cli.git
The following commit(s) were added to refs/heads/master by this push:
new 353771a Use isEmpty().
353771a is described below
commit 353771a4bfc561fde6da57d9d7c070b3727c7259
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Jan 17 09:27:33 2021 -0500
Use isEmpty().
---
src/main/java/org/apache/commons/cli/HelpFormatter.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/cli/HelpFormatter.java
b/src/main/java/org/apache/commons/cli/HelpFormatter.java
index 4e6fbcf..18e084e 100644
--- a/src/main/java/org/apache/commons/cli/HelpFormatter.java
+++ b/src/main/java/org/apache/commons/cli/HelpFormatter.java
@@ -693,7 +693,7 @@ public class HelpFormatter
}
// if the Option has a value and a non blank argname
- if (option.hasArg() && (option.getArgName() == null ||
option.getArgName().length() != 0))
+ if (option.hasArg() && (option.getArgName() == null ||
!option.getArgName().isEmpty()))
{
buff.append(option.getOpt() == null ? longOptSeparator : " ");
buff.append("<").append(option.getArgName() != null ?
option.getArgName() : getArgName()).append(">");