commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1439565 - in /commons/proper/cli/trunk/src/main/java/org/apache/commons/cli: DefaultParser.java Option.java Parser.java
Date Mon, 28 Jan 2013 18:59:47 GMT
Author: tn
Date: Mon Jan 28 18:59:47 2013
New Revision: 1439565

URL: http://svn.apache.org/viewvc?rev=1439565&view=rev
Log:
Fix Clirr error wrt return type of Option#clone().

Modified:
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/DefaultParser.java
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Option.java
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Parser.java

Modified: commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/DefaultParser.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/DefaultParser.java?rev=1439565&r1=1439564&r2=1439565&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/DefaultParser.java (original)
+++ commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/DefaultParser.java Mon Jan
28 18:59:47 2013
@@ -599,7 +599,7 @@ public class DefaultParser implements Co
         // check the previous option before handling the next one
         checkRequiredArgs();
 
-        option = option.clone();
+        option = (Option) option.clone();
 
         updateRequiredOptions(option);
 

Modified: commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Option.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Option.java?rev=1439565&r1=1439564&r2=1439565&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Option.java (original)
+++ commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Option.java Mon Jan 28 18:59:47
2013
@@ -631,9 +631,11 @@ public class Option implements Cloneable
      * After calling this method, it is very likely you will want to call 
      * clearValues(). 
      *
-     * @throws RuntimeException
+     * @return a clone of this Option instance
+     * @throws RuntimeException if a {@link CloneNotSupportedException} has been thrown
+     * by {@link super#clone()}
      */
-    public Option clone()
+    public Object clone()
     {
         try
         {

Modified: commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Parser.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Parser.java?rev=1439565&r1=1439564&r2=1439565&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Parser.java (original)
+++ commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Parser.java Mon Jan 28 18:59:47
2013
@@ -380,7 +380,7 @@ public abstract class Parser implements 
         }
 
         // get the option represented by arg
-        Option opt = getOptions().getOption(arg).clone();
+        Option opt = (Option) getOptions().getOption(arg).clone();
         
         // update the required options and groups
         updateRequiredOptions(opt);



Mime
View raw message