Skip to content

Commit 4c46459

Browse files
committed
Reduce returns
1 parent 7108379 commit 4c46459

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -878,10 +878,7 @@ boolean requiresArg() {
878878
if (optionalArg) {
879879
return false;
880880
}
881-
if (argCount == UNLIMITED_VALUES) {
882-
return values.isEmpty();
883-
}
884-
return acceptsArg();
881+
return argCount == UNLIMITED_VALUES ? values.isEmpty() : acceptsArg();
885882
}
886883

887884
/**

0 commit comments

Comments
 (0)