Skip to content

Commit 53ed912

Browse files
committed
Adding some javadoc
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/cli/branches/cli-1.0.x@551821 13f79535-47bb-0310-9956-ffa450edef68
1 parent 4cf1b71 commit 53ed912

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff 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. " +

0 commit comments

Comments
 (0)