From: <otm...@us...> - 2007-03-02 07:20:12
|
Revision: 3134 http://svn.sourceforge.net/jython/?rev=3134&view=rev Author: otmarhumbel Date: 2007-03-01 23:20:08 -0800 (Thu, 01 Mar 2007) Log Message: ----------- removed warnings (no functional changes) Modified Paths: -------------- trunk/installer/test/java/org/apache/commons/cli/ApplicationTest.java trunk/installer/test/java/org/apache/commons/cli/BugsTest.java trunk/installer/test/java/org/apache/commons/cli/GnuParseTest.java trunk/installer/test/java/org/apache/commons/cli/OptionBuilderTest.java trunk/installer/test/java/org/apache/commons/cli/OptionGroupTest.java trunk/installer/test/java/org/apache/commons/cli/ParseRequiredTest.java trunk/installer/test/java/org/apache/commons/cli/ParseTest.java trunk/installer/test/java/org/apache/commons/cli/PatternOptionBuilderTest.java trunk/installer/test/java/org/apache/commons/cli/TestHelpFormatter.java trunk/installer/test/java/org/apache/commons/cli/ValueTest.java trunk/installer/test/java/org/apache/commons/cli/ValuesTest.java trunk/installer/test/java/org/python/util/install/ChildProcessTest.java Modified: trunk/installer/test/java/org/apache/commons/cli/ApplicationTest.java =================================================================== --- trunk/installer/test/java/org/apache/commons/cli/ApplicationTest.java 2007-03-01 03:39:55 UTC (rev 3133) +++ trunk/installer/test/java/org/apache/commons/cli/ApplicationTest.java 2007-03-02 07:20:08 UTC (rev 3134) @@ -40,11 +40,16 @@ options.addOption( "a", "all", false, "do not hide entries starting with ." ); options.addOption( "A", "almost-all", false, "do not list implied . and .." ); options.addOption( "b", "escape", false, "print octal escapes for nongraphic characters" ); - options.addOption( OptionBuilder.withLongOpt( "block-size" ) - .withDescription( "use SIZE-byte blocks" ) - .withValueSeparator( '=' ) - .hasArg() - .create() ); + OptionBuilder.withLongOpt( "block-size" ); + OptionBuilder.withDescription( "use SIZE-byte blocks" ); + OptionBuilder.withValueSeparator( '=' ); + OptionBuilder.hasArg(); + options.addOption(OptionBuilder.create()); +// options.addOption( OptionBuilder.withLongOpt( "block-size" ) +// .withDescription( "use SIZE-byte blocks" ) +// .withValueSeparator( '=' ) +// .hasArg() +// .create() ); options.addOption( "B", "ignore-backups", false, "do not list implied entried ending with ~"); options.addOption( "c", false, "with -lt: sort by, and show, ctime (time of last modification of file status information) with -l:show ctime and sort by name otherwise: sort by ctime" ); options.addOption( "C", false, "list entries by columns" ); @@ -79,10 +84,10 @@ options.addOption( "logger", true, "the class which is to perform the logging" ); options.addOption( "listener", true, "add an instance of a class as a project listener" ); options.addOption( "buildfile", true, "use given buildfile" ); - options.addOption( OptionBuilder.withDescription( "use value for given property" ) - .hasArgs() - .withValueSeparator() - .create( 'D' ) ); + OptionBuilder.withDescription( "use value for given property" ); + OptionBuilder.hasArgs(); + OptionBuilder.withValueSeparator(); + options.addOption( OptionBuilder.create( 'D' ) ); //, null, true, , false, true ); options.addOption( "find", true, "search for buildfile towards the root of the filesystem and use it" ); Modified: trunk/installer/test/java/org/apache/commons/cli/BugsTest.java =================================================================== --- trunk/installer/test/java/org/apache/commons/cli/BugsTest.java 2007-03-01 03:39:55 UTC (rev 3133) +++ trunk/installer/test/java/org/apache/commons/cli/BugsTest.java 2007-03-02 07:20:08 UTC (rev 3134) @@ -16,9 +16,6 @@ public class BugsTest extends TestCase { - /** CommandLine instance */ - private CommandLine _cmdline = null; - private Option _option = null; public static Test suite() { return new TestSuite( BugsTest.class ); @@ -39,8 +36,8 @@ public void test11457() { Options options = new Options(); - options.addOption( OptionBuilder.withLongOpt( "verbose" ) - .create() ); + OptionBuilder.withLongOpt( "verbose" ); + options.addOption( OptionBuilder.create() ); String[] args = new String[] { "--verbose" }; CommandLineParser parser = new PosixParser(); @@ -58,12 +55,12 @@ public void test11458() { Options options = new Options(); - options.addOption( OptionBuilder.withValueSeparator( '=' ) - .hasArgs() - .create( 'D' ) ); - options.addOption( OptionBuilder.withValueSeparator( ':' ) - .hasArgs() - .create( 'p' ) ); + OptionBuilder.withValueSeparator( '=' ); + OptionBuilder.hasArgs(); + options.addOption(OptionBuilder.create( 'D' ) ); + OptionBuilder.withValueSeparator( ':' ); + OptionBuilder.hasArgs(); + options.addOption( OptionBuilder.create( 'p' ) ); String[] args = new String[] { "-DJAVA_HOME=/opt/java" , "-pfile1:file2:file3" }; @@ -136,10 +133,10 @@ { // Posix Options options = new Options(); - options.addOption( OptionBuilder.hasOptionalArg() - .create( 'a' ) ); - options.addOption( OptionBuilder.hasArg() - .create( 'b' ) ); + OptionBuilder.hasOptionalArg(); + options.addOption( OptionBuilder.create( 'a' ) ); + OptionBuilder.hasArg(); + options.addOption( OptionBuilder.create( 'b' ) ); String[] args = new String[] { "-a", "-bvalue" }; CommandLineParser parser = new PosixParser(); @@ -154,10 +151,10 @@ // GNU options = new Options(); - options.addOption( OptionBuilder.hasOptionalArg() - .create( 'a' ) ); - options.addOption( OptionBuilder.hasArg() - .create( 'b' ) ); + OptionBuilder.hasOptionalArg(); + options.addOption( OptionBuilder.create( 'a' ) ); + OptionBuilder.hasArg(); + options.addOption( OptionBuilder.create( 'b' ) ); args = new String[] { "-a", "-b", "value" }; parser = new GnuParser(); @@ -232,14 +229,14 @@ public void test13425() { Options options = new Options(); - Option oldpass = OptionBuilder.withLongOpt( "old-password" ) - .withDescription( "Use this option to specify the old password" ) - .hasArg() - .create( 'o' ); - Option newpass = OptionBuilder.withLongOpt( "new-password" ) - .withDescription( "Use this option to specify the new password" ) - .hasArg() - .create( 'n' ); + OptionBuilder.withLongOpt( "old-password" ); + OptionBuilder.withDescription( "Use this option to specify the old password" ); + OptionBuilder.hasArg(); + Option oldpass = OptionBuilder.create( 'o' ); + OptionBuilder.withLongOpt( "new-password" ); + OptionBuilder.withDescription( "Use this option to specify the new password" ); + OptionBuilder.hasArg(); + Option newpass = OptionBuilder.create( 'n' ); String[] args = { "-o", @@ -252,22 +249,23 @@ Parser parser = new PosixParser(); + CommandLine line = null; try { - CommandLine line = parser.parse( options, args ); + line = parser.parse( options, args ); } // catch the exception and leave the method catch( Exception exp ) { assertTrue( exp != null ); return; } - fail( "MissingArgumentException not caught." ); + fail( "MissingArgumentException not caught." + line); } public void test13666() { Options options = new Options(); - Option dir = OptionBuilder.withDescription( "dir" ) - .hasArg() - .create( 'd' ); + OptionBuilder.withDescription( "dir" ); + OptionBuilder.hasArg(); + Option dir = OptionBuilder.create( 'd' ); options.addOption( dir ); try { HelpFormatter formatter = new HelpFormatter(); @@ -298,9 +296,10 @@ CommandLineParser parser = new PosixParser(); boolean exception = false; + CommandLine line = null; String[] args = new String[] { }; try { - CommandLine line = parser.parse( opts, args ); + line = parser.parse( opts, args ); } catch( ParseException exp ) { exception = true; @@ -314,7 +313,7 @@ args = new String[] { "-s" }; try { - CommandLine line = parser.parse( opts, args ); + line = parser.parse( opts, args ); } catch( ParseException exp ) { exception = true; @@ -328,7 +327,7 @@ args = new String[] { "-s", "-l" }; try { - CommandLine line = parser.parse( opts, args ); + line = parser.parse( opts, args ); } catch( ParseException exp ) { fail( "Unexpected exception: " + exp.getMessage() ); @@ -337,10 +336,13 @@ opts.addOption( forward ); args = new String[] { "-s", "-l", "-f" }; try { - CommandLine line = parser.parse( opts, args ); + line = parser.parse( opts, args ); } catch( ParseException exp ) { fail( "Unexpected exception: " + exp.getMessage() ); } + if(line != null) { + line = null; + } } } Modified: trunk/installer/test/java/org/apache/commons/cli/GnuParseTest.java =================================================================== --- trunk/installer/test/java/org/apache/commons/cli/GnuParseTest.java 2007-03-01 03:39:55 UTC (rev 3133) +++ trunk/installer/test/java/org/apache/commons/cli/GnuParseTest.java 2007-03-02 07:20:08 UTC (rev 3134) @@ -128,9 +128,10 @@ boolean caught = false; + CommandLine cl = null; try { - CommandLine cl = _parser.parse(_options, args); + cl = _parser.parse(_options, args); } catch (MissingArgumentException e) { @@ -141,7 +142,7 @@ fail( e.toString() ); } - assertTrue( "Confirm MissingArgumentException caught", caught ); + assertTrue( "Confirm MissingArgumentException caught " + cl, caught ); } public void testStop() Modified: trunk/installer/test/java/org/apache/commons/cli/OptionBuilderTest.java =================================================================== --- trunk/installer/test/java/org/apache/commons/cli/OptionBuilderTest.java 2007-03-01 03:39:55 UTC (rev 3133) +++ trunk/installer/test/java/org/apache/commons/cli/OptionBuilderTest.java 2007-03-02 07:20:08 UTC (rev 3134) @@ -23,13 +23,13 @@ } public void testCompleteOption( ) { - Option simple = OptionBuilder.withLongOpt( "simple option") - .hasArg( ) - .isRequired( ) - .hasArgs( ) - .withType( new BigDecimal( "10" ) ) - .withDescription( "this is a simple option" ) - .create( 's' ); + OptionBuilder.withLongOpt( "simple option"); + OptionBuilder.hasArg( ); + OptionBuilder.isRequired( ); + OptionBuilder.hasArgs( ); + OptionBuilder.withType( new BigDecimal( "10" ) ); + OptionBuilder.withDescription( "this is a simple option" ); + Option simple = OptionBuilder.create( 's' ); assertEquals( "s", simple.getOpt() ); assertEquals( "simple option", simple.getLongOpt() ); @@ -41,13 +41,13 @@ } public void testTwoCompleteOptions( ) { - Option simple = OptionBuilder.withLongOpt( "simple option") - .hasArg( ) - .isRequired( ) - .hasArgs( ) - .withType( new BigDecimal( "10" ) ) - .withDescription( "this is a simple option" ) - .create( 's' ); + OptionBuilder.withLongOpt( "simple option"); + OptionBuilder.hasArg( ); + OptionBuilder.isRequired( ); + OptionBuilder.hasArgs( ); + OptionBuilder.withType( new BigDecimal( "10" ) ); + OptionBuilder.withDescription( "this is a simple option" ); + Option simple = OptionBuilder.create( 's' ); assertEquals( "s", simple.getOpt() ); assertEquals( "simple option", simple.getLongOpt() ); @@ -57,10 +57,10 @@ assertTrue( simple.isRequired() ); assertTrue( simple.hasArgs() ); - simple = OptionBuilder.withLongOpt( "dimple option") - .hasArg( ) - .withDescription( "this is a dimple option" ) - .create( 'd' ); + OptionBuilder.withLongOpt( "dimple option"); + OptionBuilder.hasArg( ); + OptionBuilder.withDescription( "this is a dimple option" ); + simple = OptionBuilder.create( 'd' ); assertEquals( "d", simple.getOpt() ); assertEquals( "dimple option", simple.getLongOpt() ); @@ -72,8 +72,8 @@ } public void testBaseOptionCharOpt() { - Option base = OptionBuilder.withDescription( "option description") - .create( 'o' ); + OptionBuilder.withDescription( "option description"); + Option base = OptionBuilder.create( 'o' ); assertEquals( "o", base.getOpt() ); assertEquals( "option description", base.getDescription() ); @@ -81,8 +81,8 @@ } public void testBaseOptionStringOpt() { - Option base = OptionBuilder.withDescription( "option description") - .create( "o" ); + OptionBuilder.withDescription( "option description"); + Option base = OptionBuilder.create( "o" ); assertEquals( "o", base.getOpt() ); assertEquals( "option description", base.getDescription() ); @@ -93,8 +93,8 @@ // '?' try { - Option opt = OptionBuilder.withDescription( "help options" ) - .create( '?' ); + OptionBuilder.withDescription( "help options" ); + Option opt = OptionBuilder.create( '?' ); assertEquals( "?", opt.getOpt() ); } catch( IllegalArgumentException arg ) { @@ -103,8 +103,8 @@ // '@' try { - Option opt = OptionBuilder.withDescription( "read from stdin" ) - .create( '@' ); + OptionBuilder.withDescription( "read from stdin" ); + Option opt = OptionBuilder.create( '@' ); assertEquals( "@", opt.getOpt() ); } catch( IllegalArgumentException arg ) { @@ -113,17 +113,17 @@ } public void testOptionArgNumbers() { - Option opt = OptionBuilder.withDescription( "option description" ) - .hasArgs( 2 ) - .create( 'o' ); + OptionBuilder.withDescription( "option description" ); + OptionBuilder.hasArgs( 2 ); + Option opt = OptionBuilder.create( 'o' ); assertEquals( 2, opt.getArgs() ); } public void testIllegalOptions() { // bad single character option try { - Option opt = OptionBuilder.withDescription( "option description" ) - .create( '"' ); + OptionBuilder.withDescription( "option description" ); + OptionBuilder.create( '"' ); fail( "IllegalArgumentException not caught" ); } catch( IllegalArgumentException exp ) { @@ -132,7 +132,7 @@ // bad character in option string try { - Option opt = OptionBuilder.create( "opt`" ); + OptionBuilder.create( "opt`" ); fail( "IllegalArgumentException not caught" ); } catch( IllegalArgumentException exp ) { @@ -141,7 +141,7 @@ // null option try { - Option opt = OptionBuilder.create( null ); + OptionBuilder.create( null ); fail( "IllegalArgumentException not caught" ); } catch( IllegalArgumentException exp ) { @@ -150,7 +150,7 @@ // valid option try { - Option opt = OptionBuilder.create( "opt" ); + OptionBuilder.create( "opt" ); // success } catch( IllegalArgumentException exp ) { Modified: trunk/installer/test/java/org/apache/commons/cli/OptionGroupTest.java =================================================================== --- trunk/installer/test/java/org/apache/commons/cli/OptionGroupTest.java 2007-03-01 03:39:55 UTC (rev 3133) +++ trunk/installer/test/java/org/apache/commons/cli/OptionGroupTest.java 2007-03-02 07:20:08 UTC (rev 3134) @@ -188,16 +188,17 @@ { String[] args = new String[] { "-f", "-d" }; + CommandLine cl = null; try { - CommandLine cl = parser.parse( _options, args); + cl = parser.parse( _options, args); fail( "two arguments from group not allowed" ); } catch (ParseException e) { if( !( e instanceof AlreadySelectedException ) ) { - fail( "incorrect exception caught:" + e.getMessage() ); + fail( "incorrect exception caught:" + e.getMessage() + " in " + cl ); } } } @@ -206,16 +207,17 @@ { String[] args = new String[] { "--file", "--directory" }; + CommandLine cl = null; try { - CommandLine cl = parser.parse( _options, args); + cl = parser.parse( _options, args); fail( "two arguments from group not allowed" ); } catch (ParseException e) { if( !( e instanceof AlreadySelectedException ) ) { - fail( "incorrect exception caught:" + e.getMessage() ); + fail( "incorrect exception caught:" + e.getMessage() + " in " + cl ); } } } Modified: trunk/installer/test/java/org/apache/commons/cli/ParseRequiredTest.java =================================================================== --- trunk/installer/test/java/org/apache/commons/cli/ParseRequiredTest.java 2007-03-01 03:39:55 UTC (rev 3133) +++ trunk/installer/test/java/org/apache/commons/cli/ParseRequiredTest.java 2007-03-02 07:20:08 UTC (rev 3134) @@ -35,16 +35,17 @@ public void setUp() { + OptionBuilder.withLongOpt( "bfile" ); + OptionBuilder.hasArg(); + OptionBuilder.isRequired(); + OptionBuilder.withDescription( "set the value of [b]" ); + Option opt2 = OptionBuilder.create( 'b' ); _options = new Options() .addOption("a", "enable-a", false, "turn [a] on or off") - .addOption( OptionBuilder.withLongOpt( "bfile" ) - .hasArg() - .isRequired() - .withDescription( "set the value of [b]" ) - .create( 'b' ) ); + .addOption( opt2 ); } public void tearDown() @@ -94,16 +95,17 @@ { String[] args = new String[] { "-a" }; + CommandLine cl = null; try { - CommandLine cl = parser.parse(_options,args); + cl = parser.parse(_options,args); fail( "exception should have been thrown" ); } catch (ParseException e) { if( !( e instanceof MissingOptionException ) ) { - fail( "expected to catch MissingOptionException" ); + fail( "expected to catch MissingOptionException in " + cl ); } } } Modified: trunk/installer/test/java/org/apache/commons/cli/ParseTest.java =================================================================== --- trunk/installer/test/java/org/apache/commons/cli/ParseTest.java 2007-03-01 03:39:55 UTC (rev 3133) +++ trunk/installer/test/java/org/apache/commons/cli/ParseTest.java 2007-03-02 07:20:08 UTC (rev 3134) @@ -150,9 +150,10 @@ boolean caught = false; + CommandLine cl = null; try { - CommandLine cl = _parser.parse(_options, args); + cl = _parser.parse(_options, args); } catch (MissingArgumentException e) { @@ -163,7 +164,7 @@ fail( e.toString() ); } - assertTrue( "Confirm MissingArgumentException caught", caught ); + assertTrue( "Confirm MissingArgumentException caught " + cl, caught ); } public void testStop() Modified: trunk/installer/test/java/org/apache/commons/cli/PatternOptionBuilderTest.java =================================================================== --- trunk/installer/test/java/org/apache/commons/cli/PatternOptionBuilderTest.java 2007-03-01 03:39:55 UTC (rev 3133) +++ trunk/installer/test/java/org/apache/commons/cli/PatternOptionBuilderTest.java 2007-03-02 07:20:08 UTC (rev 3134) @@ -9,13 +9,11 @@ */ package org.apache.commons.cli; +import java.math.BigDecimal; + import junit.framework.TestCase; import junit.framework.TestSuite; -import java.io.StringWriter; -import java.io.PrintWriter; -import java.math.BigDecimal; - /** * Test case for the PatternOptionBuilder class * Modified: trunk/installer/test/java/org/apache/commons/cli/TestHelpFormatter.java =================================================================== --- trunk/installer/test/java/org/apache/commons/cli/TestHelpFormatter.java 2007-03-01 03:39:55 UTC (rev 3133) +++ trunk/installer/test/java/org/apache/commons/cli/TestHelpFormatter.java 2007-03-02 07:20:08 UTC (rev 3134) @@ -9,13 +9,12 @@ */ package org.apache.commons.cli; -import junit.framework.TestCase; -import junit.framework.TestSuite; - import java.io.ByteArrayOutputStream; import java.io.PrintWriter; -import java.io.StringWriter; +import junit.framework.TestCase; +import junit.framework.TestSuite; + /** * Test case for the HelpFormatter class * Modified: trunk/installer/test/java/org/apache/commons/cli/ValueTest.java =================================================================== --- trunk/installer/test/java/org/apache/commons/cli/ValueTest.java 2007-03-01 03:39:55 UTC (rev 3133) +++ trunk/installer/test/java/org/apache/commons/cli/ValueTest.java 2007-03-02 07:20:08 UTC (rev 3134) @@ -22,7 +22,6 @@ } private CommandLine _cl = null; - private CommandLine _clOptional = null; private Options opts = new Options(); public ValueTest(String name) @@ -50,26 +49,26 @@ true, "set -d"); - opts.addOption( OptionBuilder.hasOptionalArg() - .create( 'e') ); + OptionBuilder.hasOptionalArg(); + opts.addOption( OptionBuilder.create( 'e') ); - opts.addOption( OptionBuilder.hasOptionalArg() - .withLongOpt( "fish" ) - .create( ) ); + OptionBuilder.hasOptionalArg(); + OptionBuilder.withLongOpt( "fish" ); + opts.addOption( OptionBuilder.create( ) ); - opts.addOption( OptionBuilder.hasOptionalArgs() - .withLongOpt( "gravy" ) - .create( ) ); + OptionBuilder.hasOptionalArgs(); + OptionBuilder.withLongOpt( "gravy" ); + opts.addOption( OptionBuilder.create( ) ); - opts.addOption( OptionBuilder.hasOptionalArgs( 2 ) - .withLongOpt( "hide" ) - .create( ) ); + OptionBuilder.hasOptionalArgs( 2 ); + OptionBuilder.withLongOpt( "hide" ); + opts.addOption( OptionBuilder.create( ) ); - opts.addOption( OptionBuilder.hasOptionalArgs( 2 ) - .create( 'i' ) ); + OptionBuilder.hasOptionalArgs( 2 ); + opts.addOption( OptionBuilder.create( 'i' ) ); - opts.addOption( OptionBuilder.hasOptionalArgs( ) - .create( 'j' ) ); + OptionBuilder.hasOptionalArgs( ); + opts.addOption( OptionBuilder.create( 'j' ) ); String[] args = new String[] { "-a", "-b", "foo", Modified: trunk/installer/test/java/org/apache/commons/cli/ValuesTest.java =================================================================== --- trunk/installer/test/java/org/apache/commons/cli/ValuesTest.java 2007-03-01 03:39:55 UTC (rev 3133) +++ trunk/installer/test/java/org/apache/commons/cli/ValuesTest.java 2007-03-02 07:20:08 UTC (rev 3134) @@ -53,47 +53,47 @@ true, "set -d"); - opts.addOption( OptionBuilder.withLongOpt( "e" ) - .hasArgs() - .withDescription( "set -e ") - .create( 'e' ) ); + OptionBuilder.withLongOpt( "e" ); + OptionBuilder.hasArgs(); + OptionBuilder.withDescription( "set -e "); + opts.addOption( OptionBuilder.create( 'e' ) ); opts.addOption("f", "f", false, "jk"); - opts.addOption( OptionBuilder.withLongOpt( "g" ) - .hasArgs( 2 ) - .withDescription( "set -g") - .create( 'g' ) ); + OptionBuilder.withLongOpt( "g" ); + OptionBuilder.hasArgs( 2 ); + OptionBuilder.withDescription( "set -g"); + opts.addOption( OptionBuilder.create( 'g' ) ); - opts.addOption( OptionBuilder.withLongOpt( "h" ) - .hasArgs( 2 ) - .withDescription( "set -h") - .create( 'h' ) ); + OptionBuilder.withLongOpt( "h" ); + OptionBuilder.hasArgs( 2 ); + OptionBuilder.withDescription( "set -h"); + opts.addOption( OptionBuilder.create( 'h' ) ); - opts.addOption( OptionBuilder.withLongOpt( "i" ) - .withDescription( "set -i") - .create( 'i' ) ); + OptionBuilder.withLongOpt( "i" ); + OptionBuilder.withDescription( "set -i"); + opts.addOption( OptionBuilder.create( 'i' ) ); - opts.addOption( OptionBuilder.withLongOpt( "j" ) - .hasArgs( ) - .withDescription( "set -j") - .withValueSeparator( '=' ) - .create( 'j' ) ); + OptionBuilder.withLongOpt( "j" ); + OptionBuilder.hasArgs( ); + OptionBuilder.withDescription( "set -j"); + OptionBuilder.withValueSeparator( '=' ); + opts.addOption( OptionBuilder.create( 'j' ) ); - opts.addOption( OptionBuilder.withLongOpt( "k" ) - .hasArgs( ) - .withDescription( "set -k") - .withValueSeparator( '=' ) - .create( 'k' ) ); + OptionBuilder.withLongOpt( "k" ); + OptionBuilder.hasArgs( ); + OptionBuilder.withDescription( "set -k"); + OptionBuilder.withValueSeparator( '=' ); + opts.addOption( OptionBuilder.create( 'k' ) ); - _option = OptionBuilder.withLongOpt( "m" ) - .hasArgs( ) - .withDescription( "set -m") - .withValueSeparator( ) - .create( 'm' ); + OptionBuilder.withLongOpt( "m" ); + OptionBuilder.hasArgs( ); + OptionBuilder.withDescription( "set -m"); + OptionBuilder.withValueSeparator( ); + _option = OptionBuilder.create( 'm' ); opts.addOption( _option ); @@ -152,7 +152,7 @@ public void testMultipleArgValues() { - String[] result = _cmdline.getOptionValues("e"); + _cmdline.getOptionValues("e"); String[] values = new String[] { "one", "two" }; assertTrue( _cmdline.hasOption("e") ); assertTrue( _cmdline.getOptionValues("e").length == 2); @@ -161,7 +161,7 @@ public void testTwoArgValues() { - String[] result = _cmdline.getOptionValues("g"); + _cmdline.getOptionValues("g"); String[] values = new String[] { "val1", "val2" }; assertTrue( _cmdline.hasOption("g") ); assertTrue( _cmdline.getOptionValues("g").length == 2); @@ -170,7 +170,7 @@ public void testComplexValues() { - String[] result = _cmdline.getOptionValues("h"); + _cmdline.getOptionValues("h"); String[] values = new String[] { "val1", "val2" }; assertTrue( _cmdline.hasOption("i") ); assertTrue( _cmdline.hasOption("h") ); Modified: trunk/installer/test/java/org/python/util/install/ChildProcessTest.java =================================================================== --- trunk/installer/test/java/org/python/util/install/ChildProcessTest.java 2007-03-01 03:39:55 UTC (rev 3133) +++ trunk/installer/test/java/org/python/util/install/ChildProcessTest.java 2007-03-02 07:20:08 UTC (rev 3134) @@ -4,8 +4,6 @@ import java.io.IOException; import java.io.PrintStream; -import org.apache.xalan.lib.Redirect; - import junit.framework.TestCase; public class ChildProcessTest extends TestCase { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |