Skip to content

Commit 8576b53

Browse files
committed
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
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/cli/trunk@384132 13f79535-47bb-0310-9956-ffa450edef68
1 parent 111821a commit 8576b53

1 file changed

Lines changed: 1 addition & 18 deletions

File tree

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

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
3333
* @version $Revision$
3434
*/
35-
public class Option implements Cloneable {
35+
public class Option {
3636

3737
/** constant that specifies the number of argument values has
3838
not been specified */
@@ -552,23 +552,6 @@ public java.util.List getValuesList()
552552
return this.values;
553553
}
554554

555-
/**
556-
* @return a copy of this Option
557-
*/
558-
public Object clone()
559-
{
560-
Option option = new Option(getOpt(), getDescription());
561-
562-
option.setArgs(getArgs());
563-
option.setOptionalArg(hasOptionalArg());
564-
option.setRequired(isRequired());
565-
option.setLongOpt(getLongOpt());
566-
option.setType(getType());
567-
option.setValueSeparator(getValueSeparator());
568-
569-
return option;
570-
}
571-
572555
/**
573556
* Dump state, suitable for debugging.
574557
*

0 commit comments

Comments
 (0)