commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r384132 - /jakarta/commons/proper/cli/trunk/src/java/org/apache/commons/cli/Option.java
Date Wed, 08 Mar 2006 06:42:30 GMT
Author: bayard
Date: Tue Mar  7 22:42:27 2006
New Revision: 384132

URL: http://svn.apache.org/viewcvs?rev=384132&view=rev
Log:
Removed clone() method - it was incorrectly implemented, but more importantly there is no
obvious reason for Option to be cloneable. This resolves #28482 and #29908

Modified:
    jakarta/commons/proper/cli/trunk/src/java/org/apache/commons/cli/Option.java

Modified: jakarta/commons/proper/cli/trunk/src/java/org/apache/commons/cli/Option.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/cli/trunk/src/java/org/apache/commons/cli/Option.java?rev=384132&r1=384131&r2=384132&view=diff
==============================================================================
--- jakarta/commons/proper/cli/trunk/src/java/org/apache/commons/cli/Option.java (original)
+++ jakarta/commons/proper/cli/trunk/src/java/org/apache/commons/cli/Option.java Tue Mar 
7 22:42:27 2006
@@ -32,7 +32,7 @@
  * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  * @version $Revision$
  */
-public class Option implements Cloneable {
+public class Option {
 
     /** constant that specifies the number of argument values has 
         not been specified */
@@ -550,23 +550,6 @@
     public java.util.List getValuesList()
     {
         return this.values;
-    }
-
-    /**
-     * @return a copy of this Option
-     */
-    public Object clone()
-    {
-        Option option = new Option(getOpt(), getDescription());
-
-        option.setArgs(getArgs());
-        option.setOptionalArg(hasOptionalArg());
-        option.setRequired(isRequired());
-        option.setLongOpt(getLongOpt());
-        option.setType(getType());
-        option.setValueSeparator(getValueSeparator());
-
-        return option;
     }
 
     /** 



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message