commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r639940 - /commons/proper/cli/trunk/src/java/org/apache/commons/cli2/commandline/WriteableCommandLineImpl.java
Date Sat, 22 Mar 2008 02:48:05 GMT
Author: bayard
Date: Fri Mar 21 19:48:04 2008
New Revision: 639940

URL: http://svn.apache.org/viewvc?rev=639940&view=rev
Log:
Fix bug pointed out by FindBugs - it was removing the Boolean from the options, not the option

Modified:
    commons/proper/cli/trunk/src/java/org/apache/commons/cli2/commandline/WriteableCommandLineImpl.java

Modified: commons/proper/cli/trunk/src/java/org/apache/commons/cli2/commandline/WriteableCommandLineImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/java/org/apache/commons/cli2/commandline/WriteableCommandLineImpl.java?rev=639940&r1=639939&r2=639940&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/java/org/apache/commons/cli2/commandline/WriteableCommandLineImpl.java
(original)
+++ commons/proper/cli/trunk/src/java/org/apache/commons/cli2/commandline/WriteableCommandLineImpl.java
Fri Mar 21 19:48:04 2008
@@ -214,7 +214,7 @@
     public void setDefaultSwitch(final Option option,
                                  final Boolean defaultSwitch) {
         if (defaultSwitch == null) {
-            defaultSwitches.remove(defaultSwitch);
+            defaultSwitches.remove(option);
         } else {
             defaultSwitches.put(option, defaultSwitch);
         }



Mime
View raw message