File tree Expand file tree Collapse file tree
src/java/org/apache/commons/cli Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -632,6 +632,16 @@ public int hashCode()
632632 return result ;
633633 }
634634
635+ /**
636+ * A rather odd clone method - due to incorrect code in 1.0 it is public
637+ * and in 1.1 rather than throwing a CloneNotSupportedException it throws
638+ * a RuntimeException so as to maintain backwards compat at the API level.
639+ *
640+ * After calling this method, it is very likely you will want to call
641+ * clearValues().
642+ *
643+ * @throws RuntimeException
644+ */
635645 public Object clone () {
636646 try {
637647 Option option = (Option ) super .clone ();
@@ -653,6 +663,12 @@ void clearValues() {
653663 this .values .clear ();
654664 }
655665
666+ /**
667+ * This method is not intended to be used. It was a piece of internal
668+ * API that was made public in 1.0. It currently throws an UnsupportedOperationException.
669+ * @deprecated
670+ * @throws UnsupportedOperationException
671+ */
656672 public boolean addValue (String value ) {
657673 throw new UnsupportedOperationException (
658674 "The addValue method is not intended for client use. " +
You can’t perform that action at this time.
0 commit comments