You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2013/01/30 17:51:59 UTC

svn commit: r1440517 - in /commons/proper/cli/trunk/src: main/java/org/apache/commons/cli/ test/java/org/apache/commons/cli/ test/java/org/apache/commons/cli/bug/

Author: sebb
Date: Wed Jan 30 16:51:58 2013
New Revision: 1440517

URL: http://svn.apache.org/viewvc?rev=1440517&view=rev
Log:
Missing @Override

Modified:
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/GnuParser.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/OptionGroup.java
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/PosixParser.java
    commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/ArgumentIsOptionTest.java
    commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/BasicParserTest.java
    commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/DefaultParserTest.java
    commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/GnuParserTest.java
    commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/OptionGroupTest.java
    commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/OptionTest.java
    commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/ParserTestCase.java
    commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/PosixParserTest.java
    commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/ValueTest.java
    commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/ValuesTest.java
    commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/bug/BugCLI148Test.java
    commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/bug/BugCLI71Test.java

Modified: commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/GnuParser.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/GnuParser.java?rev=1440517&r1=1440516&r2=1440517&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/GnuParser.java (original)
+++ commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/GnuParser.java Wed Jan 30 16:51:58 2013
@@ -48,6 +48,7 @@ public class GnuParser extends Parser
      *                        a non option has been encountered
      * @return a String array of the flattened arguments
      */
+    @Override
     protected String[] flatten(Options options, String[] arguments, boolean stopAtNonOption)
     {
         List<String> tokens = new ArrayList<String>();

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=1440517&r1=1440516&r2=1440517&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 Wed Jan 30 16:51:58 2013
@@ -560,6 +560,7 @@ public class Option implements Cloneable
      *
      * @return Stringified form of this object
      */
+    @Override
     public String toString()
     {
         StringBuilder buf = new StringBuilder().append("[ option: ");
@@ -604,6 +605,7 @@ public class Option implements Cloneable
         return values.isEmpty();
     }
 
+    @Override
     public boolean equals(Object o)
     {
         if (this == o)
@@ -630,6 +632,7 @@ public class Option implements Cloneable
         return true;
     }
 
+    @Override
     public int hashCode()
     {
         int result;
@@ -650,6 +653,7 @@ public class Option implements Cloneable
      * @throws RuntimeException if a {@link CloneNotSupportedException} has been thrown
      * by {@link super#clone()}
      */
+    @Override
     public Object clone()
     {
         try

Modified: commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/OptionGroup.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/OptionGroup.java?rev=1440517&r1=1440516&r2=1440517&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/OptionGroup.java (original)
+++ commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/OptionGroup.java Wed Jan 30 16:51:58 2013
@@ -137,6 +137,7 @@ public class OptionGroup implements Seri
      * 
      * @return the stringified representation of this group
      */
+    @Override
     public String toString()
     {
         StringBuilder buff = new StringBuilder();

Modified: commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java?rev=1440517&r1=1440516&r2=1440517&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java (original)
+++ commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java Wed Jan 30 16:51:58 2013
@@ -292,6 +292,7 @@ public class Options implements Serializ
      *
      * @return Stringified form of this object
      */
+    @Override
     public String toString()
     {
         StringBuilder buf = new StringBuilder();

Modified: commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/PosixParser.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/PosixParser.java?rev=1440517&r1=1440516&r2=1440517&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/PosixParser.java (original)
+++ commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/PosixParser.java Wed Jan 30 16:51:58 2013
@@ -94,6 +94,7 @@ public class PosixParser extends Parser
      * when an non option is found.
      * @return The flattened <code>arguments</code> String array.
      */
+    @Override
     protected String[] flatten(Options options, String[] arguments, boolean stopAtNonOption) throws ParseException
     {
         init();

Modified: commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/ArgumentIsOptionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/ArgumentIsOptionTest.java?rev=1440517&r1=1440516&r2=1440517&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/ArgumentIsOptionTest.java (original)
+++ commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/ArgumentIsOptionTest.java Wed Jan 30 16:51:58 2013
@@ -24,6 +24,7 @@ public class ArgumentIsOptionTest extend
     private Options options = null;
     private CommandLineParser parser = null;
 
+    @Override
     public void setUp()
     {
         options = new Options().addOption("p", false, "Option p").addOption("attr", true, "Option accepts argument");

Modified: commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/BasicParserTest.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/BasicParserTest.java?rev=1440517&r1=1440516&r2=1440517&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/BasicParserTest.java (original)
+++ commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/BasicParserTest.java Wed Jan 30 16:51:58 2013
@@ -23,127 +23,152 @@ package org.apache.commons.cli;
  */
 public class BasicParserTest extends ParserTestCase
 {
+    @Override
     public void setUp()
     {
         super.setUp();
         parser = new BasicParser();
     }
 
+    @Override
     public void testDoubleDash2() throws Exception
     {
         // not supported by the BasicParser
     }
 
+    @Override
     public void testLongWithoutEqualSingleDash() throws Exception
     {
         // not supported by the BasicParser
     }
     
+    @Override
     public void testAmbiguousLongWithoutEqualSingleDash() throws Exception
     {
         // not supported by the basicParser
     }
     
+    @Override
     public void testNegativeOption() throws Exception
     {
         // not supported by the BasicParser (CLI-184)
     }
 
+    @Override
     public void testPropertiesOption1() throws Exception
     {
         // not supported by the BasicParser
     }
 
+    @Override
     public void testPropertiesOption2() throws Exception
     {
         // not supported by the BasicParser
     }    
 
+    @Override
     public void testShortWithEqual() throws Exception
     {
         // not supported by the BasicParser
     }
 
+    @Override
     public void testShortWithoutEqual() throws Exception
     {
         // not supported by the BasicParser
     }
 
+    @Override
     public void testLongWithEqualDoubleDash() throws Exception
     {
         // not supported by the BasicParser
     }
 
+    @Override
     public void testLongWithEqualSingleDash() throws Exception
     {
         // not supported by the BasicParser
     }
     
+    @Override
     public void testUnambiguousPartialLongOption1() throws Exception
     {
         // not supported by the BasicParser
     }
 
+    @Override
     public void testUnambiguousPartialLongOption2() throws Exception
     {
         // not supported by the BasicParser
     }
 
+    @Override
     public void testUnambiguousPartialLongOption3() throws Exception
     {
         // not supported by the BasicParser
     }
 
+    @Override
     public void testUnambiguousPartialLongOption4() throws Exception
     {
         // not supported by the BasicParser
     }
 
+    @Override
     public void testAmbiguousPartialLongOption1() throws Exception
     {
         // not supported by the BasicParser
     }
 
+    @Override
     public void testAmbiguousPartialLongOption2() throws Exception
     {
         // not supported by the BasicParser
     }
 
+    @Override
     public void testAmbiguousPartialLongOption3() throws Exception
     {
         // not supported by the BasicParser
     }
 
+    @Override
     public void testAmbiguousPartialLongOption4() throws Exception
     {
         // not supported by the BasicParser
     }
 
+    @Override
     public void testPartialLongOptionSingleDash() throws Exception
     {
         // not supported by the BasicParser
     }
 
+    @Override
     public void testBursting() throws Exception
     {
         // not supported by the BasicParser
     }
 
+    @Override
     public void testUnrecognizedOptionWithBursting() throws Exception
     {
         // not supported by the BasicParser
     }
 
+    @Override
     public void testMissingArgWithBursting() throws Exception
     {
         // not supported by the BasicParser
     }
 
+    @Override
     public void testStopBursting() throws Exception
     {
         // not supported by the BasicParser
     }
 
+    @Override
     public void testStopBursting2() throws Exception
     {
         // not supported by the BasicParser

Modified: commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/DefaultParserTest.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/DefaultParserTest.java?rev=1440517&r1=1440516&r2=1440517&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/DefaultParserTest.java (original)
+++ commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/DefaultParserTest.java Wed Jan 30 16:51:58 2013
@@ -23,6 +23,7 @@ package org.apache.commons.cli;
  */
 public class DefaultParserTest extends ParserTestCase {
 
+    @Override
     public void setUp() {
         super.setUp();
         parser = new DefaultParser();

Modified: commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/GnuParserTest.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/GnuParserTest.java?rev=1440517&r1=1440516&r2=1440517&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/GnuParserTest.java (original)
+++ commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/GnuParserTest.java Wed Jan 30 16:51:58 2013
@@ -19,112 +19,134 @@ package org.apache.commons.cli;
 
 public class GnuParserTest extends ParserTestCase
 {
+    @Override
     public void setUp()
     {
         super.setUp();
         parser = new GnuParser();
     }
 
+    @Override
     public void testDoubleDash2() throws Exception
     {
         // not supported by the GnuParser
     }
     
+    @Override
     public void testLongWithoutEqualSingleDash() throws Exception
     {
         // not supported by the GnuParser
     }
 
+    @Override
     public void testAmbiguousLongWithoutEqualSingleDash() throws Exception
     {
         // not supported by the GnuParser
     }
 
+    @Override
     public void testNegativeOption() throws Exception
     {
         // not supported by the GnuParser (CLI-184)
     }
 
+    @Override
     public void testLongWithUnexpectedArgument1() throws Exception 
     {
         // not supported by the GnuParser
     }
 
+    @Override
     public void testLongWithUnexpectedArgument2() throws Exception 
     {
         // not supported by the GnuParser
     }
 
+    @Override
     public void testShortWithUnexpectedArgument() throws Exception 
     {
         // not supported by the GnuParser
     }
 
+    @Override
     public void testUnambiguousPartialLongOption1() throws Exception
     {
         // not supported by the GnuParser
     }
 
+    @Override
     public void testUnambiguousPartialLongOption2() throws Exception
     {
         // not supported by the GnuParser
     }
 
+    @Override
     public void testUnambiguousPartialLongOption3() throws Exception
     {
         // not supported by the GnuParser
     }
 
+    @Override
     public void testUnambiguousPartialLongOption4() throws Exception
     {
         // not supported by the GnuParser
     }
 
+    @Override
     public void testAmbiguousPartialLongOption1() throws Exception
     {
         // not supported by the GnuParser
     }
 
+    @Override
     public void testAmbiguousPartialLongOption2() throws Exception
     {
         // not supported by the GnuParser
     }
 
-   public void testAmbiguousPartialLongOption3() throws Exception
+   @Override
+public void testAmbiguousPartialLongOption3() throws Exception
     {
         // not supported by the GnuParser
     }
 
+    @Override
     public void testAmbiguousPartialLongOption4() throws Exception
     {
         // not supported by the GnuParser
     }
 
+    @Override
     public void testPartialLongOptionSingleDash() throws Exception
     {
         // not supported by the GnuParser
     }
 
+    @Override
     public void testBursting() throws Exception
     {
         // not supported by the GnuParser
     }
 
+    @Override
     public void testUnrecognizedOptionWithBursting() throws Exception
     {
         // not supported by the GnuParser
     }
 
+    @Override
     public void testMissingArgWithBursting() throws Exception
     {
         // not supported by the GnuParser
     }
 
+    @Override
     public void testStopBursting() throws Exception
     {
         // not supported by the GnuParser
     }
 
+    @Override
     public void testStopBursting2() throws Exception
     {
         // not supported by the GnuParser

Modified: commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/OptionGroupTest.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/OptionGroupTest.java?rev=1440517&r1=1440516&r2=1440517&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/OptionGroupTest.java (original)
+++ commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/OptionGroupTest.java Wed Jan 30 16:51:58 2013
@@ -30,6 +30,7 @@ public class OptionGroupTest extends Tes
     private Options _options = null;
     private Parser parser = new PosixParser();
 
+    @Override
     public void setUp()
     {
         Option file = new Option( "f", "file", false, "file to process" );

Modified: commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/OptionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/OptionTest.java?rev=1440517&r1=1440516&r2=1440517&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/OptionTest.java (original)
+++ commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/OptionTest.java Wed Jan 30 16:51:58 2013
@@ -31,6 +31,7 @@ public class OptionTest extends TestCase
             super(opt, hasArg, description);
         }
 
+        @Override
         public boolean addValue(String value)
         {
             addValueForProcessing(value);
@@ -75,6 +76,7 @@ public class OptionTest extends TestCase
             this.defaultValue = defaultValue;
         }
 
+        @Override
         public String getValue()
         {
             return super.getValue() != null ? super.getValue() : defaultValue;

Modified: commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/ParserTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/ParserTestCase.java?rev=1440517&r1=1440516&r2=1440517&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/ParserTestCase.java (original)
+++ commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/ParserTestCase.java Wed Jan 30 16:51:58 2013
@@ -35,6 +35,7 @@ public abstract class ParserTestCase ext
 
     protected Options options;
 
+    @Override
     public void setUp()
     {
         options = new Options()

Modified: commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/PosixParserTest.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/PosixParserTest.java?rev=1440517&r1=1440516&r2=1440517&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/PosixParserTest.java (original)
+++ commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/PosixParserTest.java Wed Jan 30 16:51:58 2013
@@ -24,52 +24,62 @@ package org.apache.commons.cli;
  */
 public class PosixParserTest extends ParserTestCase
 {
+    @Override
     public void setUp()
     {
         super.setUp();
         parser = new PosixParser();
     }
 
+    @Override
     public void testDoubleDash2() throws Exception
     {
         // not supported by the PosixParser
     }
     
+    @Override
     public void testLongWithoutEqualSingleDash() throws Exception
     {
         // not supported by the PosixParser
     }
 
+    @Override
     public void testAmbiguousLongWithoutEqualSingleDash() throws Exception
     {
         // not supported by the PosixParser
     }
     
+    @Override
     public void testNegativeOption() throws Exception
     {
         // not supported by the PosixParser (CLI-184)
     }
 
+    @Override
     public void testLongWithUnexpectedArgument1() throws Exception
     {
         // not supported by the PosixParser
     }
 
+    @Override
     public void testLongWithEqualSingleDash() throws Exception
     {
         // not supported by the PosixParser
     }
 
+    @Override
     public void testShortWithEqual() throws Exception
     {
         // not supported by the PosixParser
     }
 
+    @Override
     public void testUnambiguousPartialLongOption4() throws Exception
     {
         // not supported by the PosixParser
     }
 
+    @Override
     public void testAmbiguousPartialLongOption4() throws Exception
     {
         // not supported by the PosixParser

Modified: commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/ValueTest.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/ValueTest.java?rev=1440517&r1=1440516&r2=1440517&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/ValueTest.java (original)
+++ commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/ValueTest.java Wed Jan 30 16:51:58 2013
@@ -24,6 +24,7 @@ public class ValueTest extends TestCase
     private CommandLine _cl = null;
     private Options opts = new Options();
 
+    @Override
     public void setUp() throws Exception
     {
         opts.addOption("a", false, "toggle -a");

Modified: commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/ValuesTest.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/ValuesTest.java?rev=1440517&r1=1440516&r2=1440517&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/ValuesTest.java (original)
+++ commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/ValuesTest.java Wed Jan 30 16:51:58 2013
@@ -24,6 +24,7 @@ public class ValuesTest extends TestCase
 {
     private CommandLine cmd;
 
+    @Override
     public void setUp() throws Exception
     {
         Options options = new Options();

Modified: commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/bug/BugCLI148Test.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/bug/BugCLI148Test.java?rev=1440517&r1=1440516&r2=1440517&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/bug/BugCLI148Test.java (original)
+++ commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/bug/BugCLI148Test.java Wed Jan 30 16:51:58 2013
@@ -33,6 +33,7 @@ public class BugCLI148Test  extends Test
 {    
     private Options options;
 
+    @Override
     protected void setUp() throws Exception
     {
         options = new Options();

Modified: commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/bug/BugCLI71Test.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/bug/BugCLI71Test.java?rev=1440517&r1=1440516&r2=1440517&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/bug/BugCLI71Test.java (original)
+++ commons/proper/cli/trunk/src/test/java/org/apache/commons/cli/bug/BugCLI71Test.java Wed Jan 30 16:51:58 2013
@@ -32,6 +32,7 @@ public class BugCLI71Test extends TestCa
     private Options options;
     private CommandLineParser parser;
 
+    @Override
     public void setUp() {
         options = new Options();