Skip to content

Commit 56ba9c6

Browse files
committed
Fix bug pointed out by FindBugs - it was removing the Boolean from the options, not the option
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/cli/trunk@639940 13f79535-47bb-0310-9956-ffa450edef68
1 parent 52743cc commit 56ba9c6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/java/org/apache/commons/cli2/commandline/WriteableCommandLineImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public void setDefaultValues(final Option option,
214214
public void setDefaultSwitch(final Option option,
215215
final Boolean defaultSwitch) {
216216
if (defaultSwitch == null) {
217-
defaultSwitches.remove(defaultSwitch);
217+
defaultSwitches.remove(option);
218218
} else {
219219
defaultSwitches.put(option, defaultSwitch);
220220
}

0 commit comments

Comments
 (0)