commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roxspr...@apache.org
Subject cvs commit: jakarta-commons/cli/src/java/org/apache/commons/cli2/resources ResourceHelper.java
Date Sun, 08 Feb 2004 12:13:34 GMT
roxspring    2004/02/08 04:13:34

  Modified:    cli/src/java/org/apache/commons/cli2/impl Tag:
                        RESEARCH_CLI_2_ROXSPRING ArgumentImpl.java
                        Command.java PropertyOption.java Switch.java
                        DefaultOption.java GroupImpl.java
               cli/src/test/org/apache/commons/cli2/apps Tag:
                        RESEARCH_CLI_2_ROXSPRING LsTest.java CpTest.java
               cli/src/test/org/apache/commons/cli2/bugs Tag:
                        RESEARCH_CLI_2_ROXSPRING Bug13886Test.java
               cli/src/test/org/apache/commons/cli2/validation Tag:
                        RESEARCH_CLI_2_ROXSPRING ClassValidatorTest.java
                        DateValidatorTest.java NumberValidatorTest.java
               cli/src/test/org/apache/commons/cli2/impl Tag:
                        RESEARCH_CLI_2_ROXSPRING ArgumentTest.java
                        PropertyOptionTest.java GroupTest.java
                        SwitchTest.java ParentTest.java CommandTest.java
                        DefaultOptionTest.java
               cli/src/test/org/apache/commons/cli2/defaults/impl Tag:
                        RESEARCH_CLI_2_ROXSPRING
                        PropertiesBackedPreferences.java
                        PropertiesImplTest.java PreferencesImplTest.java
               cli/src/java/org/apache/commons/cli2 Tag:
                        RESEARCH_CLI_2_ROXSPRING HelpFormatter.java
               cli/src/java/org/apache/commons/cli2/validation Tag:
                        RESEARCH_CLI_2_ROXSPRING EnumValidator.java
               cli/src/java/org/apache/commons/cli2/resources Tag:
                        RESEARCH_CLI_2_ROXSPRING ResourceHelper.java
  Log:
  Removed exceptions not thrown, imports and variables not used, and other minor fixes to
eclipse warnings
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.3   +0 -1      jakarta-commons/cli/src/java/org/apache/commons/cli2/impl/Attic/ArgumentImpl.java
  
  Index: ArgumentImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli2/impl/Attic/ArgumentImpl.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- ArgumentImpl.java	4 Feb 2004 02:01:51 -0000	1.1.2.2
  +++ ArgumentImpl.java	8 Feb 2004 12:13:33 -0000	1.1.2.3
  @@ -28,7 +28,6 @@
   import org.apache.commons.cli2.Option;
   import org.apache.commons.cli2.OptionException;
   import org.apache.commons.cli2.WriteableCommandLine;
  -import org.apache.commons.cli2.impl.*;
   import org.apache.commons.cli2.validation.InvalidArgumentException;
   import org.apache.commons.cli2.validation.Validator;
   
  
  
  
  1.1.2.3   +0 -1      jakarta-commons/cli/src/java/org/apache/commons/cli2/impl/Attic/Command.java
  
  Index: Command.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli2/impl/Attic/Command.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- Command.java	4 Feb 2004 02:01:51 -0000	1.1.2.2
  +++ Command.java	8 Feb 2004 12:13:33 -0000	1.1.2.3
  @@ -29,7 +29,6 @@
   import org.apache.commons.cli2.HelpSetting;
   import org.apache.commons.cli2.OptionException;
   import org.apache.commons.cli2.WriteableCommandLine;
  -import org.apache.commons.cli2.impl.*;
   
   /**
    * Represents a cvs "update" style command line option.
  
  
  
  1.1.2.3   +1 -2      jakarta-commons/cli/src/java/org/apache/commons/cli2/impl/Attic/PropertyOption.java
  
  Index: PropertyOption.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli2/impl/Attic/PropertyOption.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- PropertyOption.java	4 Feb 2004 02:01:51 -0000	1.1.2.2
  +++ PropertyOption.java	8 Feb 2004 12:13:33 -0000	1.1.2.3
  @@ -25,7 +25,6 @@
   import org.apache.commons.cli2.HelpSetting;
   import org.apache.commons.cli2.OptionException;
   import org.apache.commons.cli2.WriteableCommandLine;
  -import org.apache.commons.cli2.impl.*;
   
   /*
    * Handles the 
  @@ -112,7 +111,7 @@
   	/* (non-Javadoc)
   	 * @see org.apache.commons.cli2.Option#validate(org.apache.commons.cli2.CommandLine)
   	 */
  -	public void validate(WriteableCommandLine commandLine) throws OptionException {
  +	public void validate(WriteableCommandLine commandLine) {
   		// PropertyOption needs no validation 
   	}
   
  
  
  
  1.1.2.3   +0 -1      jakarta-commons/cli/src/java/org/apache/commons/cli2/impl/Attic/Switch.java
  
  Index: Switch.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli2/impl/Attic/Switch.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- Switch.java	4 Feb 2004 02:01:51 -0000	1.1.2.2
  +++ Switch.java	8 Feb 2004 12:13:33 -0000	1.1.2.3
  @@ -29,7 +29,6 @@
   import org.apache.commons.cli2.HelpSetting;
   import org.apache.commons.cli2.OptionException;
   import org.apache.commons.cli2.WriteableCommandLine;
  -import org.apache.commons.cli2.impl.*;
   
   public class Switch extends ParentImpl {
   
  
  
  
  1.1.2.3   +0 -3      jakarta-commons/cli/src/java/org/apache/commons/cli2/impl/Attic/DefaultOption.java
  
  Index: DefaultOption.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli2/impl/Attic/DefaultOption.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- DefaultOption.java	4 Feb 2004 02:01:51 -0000	1.1.2.2
  +++ DefaultOption.java	8 Feb 2004 12:13:33 -0000	1.1.2.3
  @@ -29,7 +29,6 @@
   import org.apache.commons.cli2.HelpSetting;
   import org.apache.commons.cli2.OptionException;
   import org.apache.commons.cli2.WriteableCommandLine;
  -import org.apache.commons.cli2.impl.*;
   
   public class DefaultOption extends ParentImpl {
   
  @@ -45,7 +44,6 @@
       private final Set prefixes;
   
       private final String shortPrefix;
  -    private final String longPrefix;
       private final boolean burstEnabled;
   
       private final int burstLength;
  @@ -64,7 +62,6 @@
           final int id) {
           super(argument, children, description, id);
   
  -        this.longPrefix = longPrefix;
           this.shortPrefix = shortPrefix;
           this.burstEnabled = burstEnabled;
   
  
  
  
  1.1.2.3   +0 -1      jakarta-commons/cli/src/java/org/apache/commons/cli2/impl/Attic/GroupImpl.java
  
  Index: GroupImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli2/impl/Attic/GroupImpl.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- GroupImpl.java	4 Feb 2004 02:01:51 -0000	1.1.2.2
  +++ GroupImpl.java	8 Feb 2004 12:13:33 -0000	1.1.2.3
  @@ -35,7 +35,6 @@
   import org.apache.commons.cli2.Option;
   import org.apache.commons.cli2.OptionException;
   import org.apache.commons.cli2.WriteableCommandLine;
  -import org.apache.commons.cli2.impl.*;
   
   public class GroupImpl extends OptionImpl implements Group {
   
  
  
  
  No                   revision
  No                   revision
  1.1.2.5   +1 -4      jakarta-commons/cli/src/test/org/apache/commons/cli2/apps/Attic/LsTest.java
  
  Index: LsTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/apps/Attic/LsTest.java,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- LsTest.java	4 Feb 2004 02:01:54 -0000	1.1.2.4
  +++ LsTest.java	8 Feb 2004 12:13:33 -0000	1.1.2.5
  @@ -237,7 +237,7 @@
   		super(name);
   	}
   
  -	public void setUp() throws OptionException {
  +	public void setUp() {
   		if (LsTest.options == null) {
   			final Option a = oBuilder
   			    .withShortName("a")
  @@ -289,9 +289,6 @@
   		}
   	}
       
  -	/**
  -	 *	
  -	 */
   	public void testLs() throws OptionException {
   		// create the command line parser
   		Parser parser = new Parser();
  
  
  
  1.1.2.5   +3 -3      jakarta-commons/cli/src/test/org/apache/commons/cli2/apps/Attic/CpTest.java
  
  Index: CpTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/apps/Attic/CpTest.java,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- CpTest.java	4 Feb 2004 02:01:54 -0000	1.1.2.4
  +++ CpTest.java	8 Feb 2004 12:13:33 -0000	1.1.2.5
  @@ -193,7 +193,7 @@
       private Option help;
       private Option version;
   
  -    public void setUp() throws OptionException
  +    public void setUp() 
       {
           source =
               (ArgumentImpl)aBuilder.withName("SOURCE").withMinimum(1).create();
  @@ -395,7 +395,7 @@
           }
       }
   
  -    public void testOneSource() throws OptionException, IOException
  +    public void testOneSource() throws OptionException
       {
           final String[] args = new String[] { "source1", "dest1" };
           final Parser parser = new Parser();
  @@ -425,7 +425,7 @@
           assertEquals(1, commandLine.getValues(dest).size());
       }
   
  -    public void testHelp() throws OptionException, IOException {
  +    public void testHelp() throws IOException {
           final StringWriter out = new StringWriter();
           final HelpFormatter helpFormatter = new HelpFormatter();
           helpFormatter.setGroup(options);
  
  
  
  No                   revision
  No                   revision
  1.1.2.5   +7 -5      jakarta-commons/cli/src/test/org/apache/commons/cli2/bugs/Attic/Bug13886Test.java
  
  Index: Bug13886Test.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/bugs/Attic/Bug13886Test.java,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- Bug13886Test.java	4 Feb 2004 02:01:54 -0000	1.1.2.4
  +++ Bug13886Test.java	8 Feb 2004 12:13:33 -0000	1.1.2.5
  @@ -17,7 +17,6 @@
   
   import junit.framework.TestCase;
   
  -import org.apache.commons.cli2.CommandLine;
   import org.apache.commons.cli2.Group;
   import org.apache.commons.cli2.Option;
   import org.apache.commons.cli2.builders.DefaultOptionBuilder;
  @@ -61,15 +60,16 @@
           parser.setGroup(options);
           
           try {
  -            final CommandLine cmdLine = parser.parse(
  +            parser.parse(
                   new String[] { } );
               fail("Expected MissingOptionException not caught");
           }
           catch (final MissingOptionException exp) {
  +            assertEquals("Missing option -a|-b",exp.getMessage());
           }
   
           try {
  -            final CommandLine cmdLine = parser.parse(
  +            parser.parse(
                   new String[] { "-a" } );
           }
           catch (final MissingOptionException exp) {
  @@ -77,7 +77,7 @@
           }
           
           try {
  -            final CommandLine cmdLine = parser.parse(
  +            parser.parse(
                   new String[] { "-b" } );
           }
           catch (final MissingOptionException exp) {
  @@ -85,10 +85,12 @@
           }
   
           try {
  -            final CommandLine cmdLine = parser.parse(
  +            parser.parse(
                   new String[] { "-a", "-b" } );
  +            fail("Expected UnexpectedOptionException not caught");
           }
           catch (final UnexpectedOptionException exp) {
  +            assertEquals("Unexpected -b while processing -a|-b",exp.getMessage());
           }
       }
   }
  
  
  
  No                   revision
  No                   revision
  1.1.2.4   +4 -4      jakarta-commons/cli/src/test/org/apache/commons/cli2/validation/Attic/ClassValidatorTest.java
  
  Index: ClassValidatorTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/validation/Attic/ClassValidatorTest.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- ClassValidatorTest.java	4 Feb 2004 02:01:53 -0000	1.1.2.3
  +++ ClassValidatorTest.java	8 Feb 2004 12:13:33 -0000	1.1.2.4
  @@ -44,7 +44,7 @@
           assertFalse(i.hasNext());
       }
   
  -    public void testValidate_NameBadStart() throws InvalidArgumentException {
  +    public void testValidate_NameBadStart() {
           final String className = "1stClass";
           final Object[] array = new Object[] { className };
           final List list = Arrays.asList(array);
  @@ -63,7 +63,7 @@
           }
       }
   
  -    public void testValidate_NameBadEnd() throws InvalidArgumentException {
  +    public void testValidate_NameBadEnd() {
           final String className = "My.Class.";
   
           final Object[] array = new Object[] { className };
  @@ -83,7 +83,7 @@
           }
       }
   
  -    public void testValidate_NameBadMiddle() throws InvalidArgumentException {
  +    public void testValidate_NameBadMiddle() {
           final String className = "My..Class";
   
           final Object[] array = new Object[] { className };
  @@ -122,7 +122,7 @@
           assertFalse(i.hasNext());
       }
   
  -    public void testValidate_LoadInvalid() throws InvalidArgumentException {
  +    public void testValidate_LoadInvalid() {
           final String className = "org.apache.commons.cli2.NonOption";
   
           final Object[] array = new Object[] { className, "java.util.Vectors" };
  
  
  
  1.1.2.4   +1 -0      jakarta-commons/cli/src/test/org/apache/commons/cli2/validation/Attic/DateValidatorTest.java
  
  Index: DateValidatorTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/validation/Attic/DateValidatorTest.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- DateValidatorTest.java	4 Feb 2004 02:01:53 -0000	1.1.2.3
  +++ DateValidatorTest.java	8 Feb 2004 12:13:33 -0000	1.1.2.4
  @@ -72,6 +72,7 @@
                   validator.validate(list);
                   fail("minimum out of bounds exception not caught");
               } catch (final InvalidArgumentException exp) {
  +                assertEquals("Out of range: 2002-10-12",exp.getMessage());
               }
           }
       }
  
  
  
  1.1.2.4   +2 -2      jakarta-commons/cli/src/test/org/apache/commons/cli2/validation/Attic/NumberValidatorTest.java
  
  Index: NumberValidatorTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/validation/Attic/NumberValidatorTest.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- NumberValidatorTest.java	4 Feb 2004 02:01:53 -0000	1.1.2.3
  +++ NumberValidatorTest.java	8 Feb 2004 12:13:33 -0000	1.1.2.4
  @@ -91,7 +91,7 @@
   		assertFalse(i.hasNext());
   	}
   
  -	public void testValidate_Maximum() throws InvalidArgumentException {
  +	public void testValidate_Maximum() {
   		final Object[] array = new Object[] { "1", "107" };
   		final List list = Arrays.asList(array);
   		final NumberValidator validator = NumberValidator.getIntegerInstance();
  @@ -105,7 +105,7 @@
   		}
   	}
   
  -	public void testValidate_Minimum() throws InvalidArgumentException {
  +	public void testValidate_Minimum() {
   		final Object[] array = new Object[] { "107", "1" };
   		final List list = Arrays.asList(array);
   		final NumberValidator validator = NumberValidator.getIntegerInstance();
  
  
  
  No                   revision
  No                   revision
  1.1.2.3   +7 -7      jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/ArgumentTest.java
  
  Index: ArgumentTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/ArgumentTest.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- ArgumentTest.java	4 Feb 2004 02:01:53 -0000	1.1.2.2
  +++ ArgumentTest.java	8 Feb 2004 12:13:33 -0000	1.1.2.3
  @@ -156,7 +156,7 @@
   	/* (non-Javadoc)
   	 * @see org.apache.commons.cli2.ArgumentTestCase#testPreProcess()
   	 */
  -	public void testPreProcess() throws OptionException {
  +	public void testPreProcess() {
   		final Argument option = buildUsernameArgument();
   		final List args = list("username=rob");
   		final ListIterator iterator = args.listIterator();
  @@ -167,7 +167,7 @@
   		assertListContentsEqual(list("username=rob"), args);
   	}
   
  -	public void testPreProcess_Split() throws OptionException {
  +	public void testPreProcess_Split() {
   		final Argument option = buildPathArgument();
   		final List args = list("-path=/lib;/usr/lib;/usr/local/lib");
   		final ListIterator iterator = args.listIterator();
  @@ -382,7 +382,7 @@
   	/* (non-Javadoc)
   	 * @see org.apache.commons.cli2.OptionTestCase#testAppendUsage()
   	 */
  -	public void testAppendUsage() throws OptionException {
  +	public void testAppendUsage() {
   		final Option option = buildUsernameArgument();
   		final StringBuffer buffer = new StringBuffer();
   		option.appendUsage(buffer, HelpSetting.ALL, null);
  @@ -390,7 +390,7 @@
   		assertEquals("<username>", buffer.toString());
   	}
   
  -	public void testAppendUsage_Infinite() throws OptionException {
  +	public void testAppendUsage_Infinite() {
   		final Option option = buildTargetsArgument();
   		final StringBuffer buffer = new StringBuffer();
   		option.appendUsage(buffer, HelpSetting.ALL, null);
  @@ -398,7 +398,7 @@
   		assertEquals("[<target1> [<target2> ...]]", buffer.toString());
   	}
   
  -	public void testAppendUsage_InfiniteNoOptional() throws OptionException {
  +	public void testAppendUsage_InfiniteNoOptional() {
   		final Option option = buildTargetsArgument();
   		final StringBuffer buffer = new StringBuffer();
   		final Set settings = new HashSet(HelpSetting.ALL);
  @@ -408,7 +408,7 @@
   		assertEquals("<target1> [<target2> ...]", buffer.toString());
   	}
   
  -	public void testAppendUsage_InfiniteNoNumbering() throws OptionException {
  +	public void testAppendUsage_InfiniteNoNumbering() {
   		final Option option = buildTargetsArgument();
   		final StringBuffer buffer = new StringBuffer();
   		final Set settings = new HashSet(HelpSetting.ALL);
  @@ -418,7 +418,7 @@
   		assertEquals("[<target> [<target> ...]]", buffer.toString());
   	}
   
  -	public void testAppendUsage_Minimum() throws OptionException {
  +	public void testAppendUsage_Minimum() {
   		final Option option = buildHostArgument();
   		final StringBuffer buffer = new StringBuffer();
   		option.appendUsage(buffer, HelpSetting.ALL, null);
  
  
  
  1.1.2.3   +2 -2      jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/PropertyOptionTest.java
  
  Index: PropertyOptionTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/PropertyOptionTest.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- PropertyOptionTest.java	4 Feb 2004 02:01:53 -0000	1.1.2.2
  +++ PropertyOptionTest.java	8 Feb 2004 12:13:33 -0000	1.1.2.3
  @@ -145,7 +145,7 @@
   	/* (non-Javadoc)
   	 * @see org.apache.commons.cli2.OptionTestCase#testAppendUsage()
   	 */
  -	public void testAppendUsage() throws OptionException {
  +	public void testAppendUsage() {
   		final Option option = new PropertyOption();
   		final StringBuffer buffer = new StringBuffer();
   		option.appendUsage(buffer, HelpSetting.ALL, null);
  @@ -153,7 +153,7 @@
   		assertEquals("-D<property>=<value>", buffer.toString());
   	}
   
  -	public void testAppendUsage_Hidden() throws OptionException {
  +	public void testAppendUsage_Hidden() {
   		final Option option = new PropertyOption();
   		final StringBuffer buffer = new StringBuffer();
   		final Set settings = new HashSet(HelpSetting.ALL);
  
  
  
  1.1.2.3   +6 -6      jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/GroupTest.java
  
  Index: GroupTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/GroupTest.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- GroupTest.java	4 Feb 2004 02:01:53 -0000	1.1.2.2
  +++ GroupTest.java	8 Feb 2004 12:13:33 -0000	1.1.2.3
  @@ -241,7 +241,7 @@
   	/* (non-Javadoc)
   	 * @see org.apache.commons.cli2.OptionTestCase#testAppendUsage()
   	 */
  -	public void testAppendUsage() throws OptionException {
  +	public void testAppendUsage() {
   		final Option option = buildApacheCommandGroup();
   		final StringBuffer buffer = new StringBuffer();
   		final Set settings = new HashSet(HelpSetting.ALL);
  @@ -253,7 +253,7 @@
   			buffer.toString());
   	}
   
  -	public void testAppendUsage_NoOptional() throws OptionException {
  +	public void testAppendUsage_NoOptional() {
   		final Option option = buildApacheCommandGroup();
   		final StringBuffer buffer = new StringBuffer();
   		final Set settings = new HashSet(HelpSetting.ALL);
  @@ -265,7 +265,7 @@
   			buffer.toString());
   	}
   
  -	public void testAppendUsage_NoExpand() throws OptionException {
  +	public void testAppendUsage_NoExpand() {
   		final Option option = buildApacheCommandGroup();
   		final StringBuffer buffer = new StringBuffer();
   		final Set settings = new HashSet(HelpSetting.ALL);
  @@ -275,7 +275,7 @@
   		assertEquals("httpd-cmds", buffer.toString());
   	}
   
  -	public void testAppendUsage_NoExpandOrName() throws OptionException {
  +	public void testAppendUsage_NoExpandOrName() {
   		final Option option = buildApacheCommandGroup();
   		final StringBuffer buffer = new StringBuffer();
   		final Set settings = new HashSet(HelpSetting.ALL);
  @@ -286,7 +286,7 @@
   		assertEquals("httpd-cmds", buffer.toString());
   	}
   
  -	public void testAppendUsage_NoName() throws OptionException {
  +	public void testAppendUsage_NoName() {
   		final Option option = buildApacheCommandGroup();
   		final StringBuffer buffer = new StringBuffer();
   		final Set settings = new HashSet(HelpSetting.ALL);
  @@ -296,7 +296,7 @@
   		assertEquals("graceful|restart|start|stop", buffer.toString());
   	}
   
  -	public void testAppendUsage_WithArgs() throws OptionException {
  +	public void testAppendUsage_WithArgs() {
   		final Option option = buildAntGroup();
   		final StringBuffer buffer = new StringBuffer();
   		final Set settings = new HashSet(HelpSetting.ALL);
  
  
  
  1.1.2.3   +6 -6      jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/SwitchTest.java
  
  Index: SwitchTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/SwitchTest.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- SwitchTest.java	4 Feb 2004 02:01:53 -0000	1.1.2.2
  +++ SwitchTest.java	8 Feb 2004 12:13:33 -0000	1.1.2.3
  @@ -109,7 +109,7 @@
   	/* (non-Javadoc)
   	 * @see org.apache.commons.cli2.OptionTestCase#testProcess()
   	 */
  -	public void testProcess() throws OptionException {
  +	public void testProcess() {
   		// TODO Auto-generated method stub
   
   	}
  @@ -142,7 +142,7 @@
   	/* (non-Javadoc)
   	 * @see org.apache.commons.cli2.OptionTestCase#testAppendUsage()
   	 */
  -	public void testAppendUsage() throws OptionException {
  +	public void testAppendUsage() {
   		final Option option = buildDisplaySwitch();
   		final StringBuffer buffer = new StringBuffer();
   		option.appendUsage(buffer, HelpSetting.ALL, null);
  @@ -152,7 +152,7 @@
   			buffer.toString());
   	}
   
  -	public void testAppendUsage_NoAlias() throws OptionException {
  +	public void testAppendUsage_NoAlias() {
   		final Option option = buildDisplaySwitch();
   		final StringBuffer buffer = new StringBuffer();
   		final Set settings = new HashSet(HelpSetting.ALL);
  @@ -162,7 +162,7 @@
   		assertEquals("+display|-display", buffer.toString());
   	}
   
  -	public void testAppendUsage_NoDisabled() throws OptionException {
  +	public void testAppendUsage_NoDisabled() {
   		final Option option = buildDisplaySwitch();
   		final StringBuffer buffer = new StringBuffer();
   		final Set settings = new HashSet(HelpSetting.ALL);
  @@ -172,7 +172,7 @@
   		assertEquals("+display (+d,+disp)", buffer.toString());
   	}
   
  -	public void testAppendUsage_NoEnabled() throws OptionException {
  +	public void testAppendUsage_NoEnabled() {
   		final Option option = buildDisplaySwitch();
   		final StringBuffer buffer = new StringBuffer();
   		final Set settings = new HashSet(HelpSetting.ALL);
  @@ -182,7 +182,7 @@
   		assertEquals("-display (-d,-disp)", buffer.toString());
   	}
   
  -	public void testAppendUsage_NoDisabledOrEnabled() throws OptionException {
  +	public void testAppendUsage_NoDisabledOrEnabled() {
   		final Option option = buildDisplaySwitch();
   		final StringBuffer buffer = new StringBuffer();
   		final Set settings = new HashSet(HelpSetting.ALL);
  
  
  
  1.1.2.3   +4 -5      jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/ParentTest.java
  
  Index: ParentTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/ParentTest.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- ParentTest.java	4 Feb 2004 02:01:53 -0000	1.1.2.2
  +++ ParentTest.java	8 Feb 2004 12:13:33 -0000	1.1.2.3
  @@ -266,7 +266,7 @@
   	/* (non-Javadoc)
   	 * @see org.apache.commons.cli2.OptionTestCase#testAppendUsage()
   	 */
  -	public void testAppendUsage() throws OptionException {
  +	public void testAppendUsage() {
   		final Option option = buildComplexParent();
   		final StringBuffer buffer = new StringBuffer();
   		final Set settings = new HashSet(HelpSetting.ALL);
  @@ -278,7 +278,7 @@
   			buffer.toString());
   	}
   
  -	public void testAppendUsage_NoArguments() throws OptionException {
  +	public void testAppendUsage_NoArguments() {
   		final Option option = buildComplexParent();
   		final StringBuffer buffer = new StringBuffer();
   		final Set settings = new HashSet(HelpSetting.ALL);
  @@ -291,7 +291,7 @@
   			buffer.toString());
   	}
   
  -	public void testAppendUsage_NoChildren() throws OptionException {
  +	public void testAppendUsage_NoChildren() {
   		final Option option = buildComplexParent();
   		final StringBuffer buffer = new StringBuffer();
   		final Set settings = new HashSet(HelpSetting.ALL);
  @@ -301,8 +301,7 @@
   		assertEquals("[login (lo) <username>]", buffer.toString());
   	}
   
  -	public void testAppendUsage_NoArgumentsOrChildren()
  -		throws OptionException {
  +	public void testAppendUsage_NoArgumentsOrChildren() {
   		final Option option = buildComplexParent();
   		final StringBuffer buffer = new StringBuffer();
   		final Set settings = new HashSet(HelpSetting.ALL);
  
  
  
  1.1.2.3   +3 -3      jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/CommandTest.java
  
  Index: CommandTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/CommandTest.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- CommandTest.java	4 Feb 2004 02:01:53 -0000	1.1.2.2
  +++ CommandTest.java	8 Feb 2004 12:13:33 -0000	1.1.2.3
  @@ -168,7 +168,7 @@
   	/* (non-Javadoc)
   	 * @see org.apache.commons.cli2.OptionTestCase#testAppendUsage()
   	 */
  -	public void testAppendUsage() throws OptionException {
  +	public void testAppendUsage() {
   		final Option option = buildStartCommand();
   		final StringBuffer buffer = new StringBuffer();
   		option.appendUsage(buffer, HelpSetting.ALL, null);
  @@ -176,7 +176,7 @@
   		assertEquals("[start (go)]", buffer.toString());
   	}
   
  -	public void testAppendUsage_NoOptional() throws OptionException {
  +	public void testAppendUsage_NoOptional() {
   		final Option option = buildStartCommand();
   		final StringBuffer buffer = new StringBuffer();
   		final Set settings = new HashSet(HelpSetting.ALL);
  @@ -186,7 +186,7 @@
   		assertEquals("start (go)", buffer.toString());
   	}
   
  -	public void testAppendUsage_NoAlias() throws OptionException {
  +	public void testAppendUsage_NoAlias() {
   		final Option option = buildStartCommand();
   		final StringBuffer buffer = new StringBuffer();
   		final Set settings = new HashSet(HelpSetting.ALL);
  
  
  
  1.1.2.3   +4 -4      jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/DefaultOptionTest.java
  
  Index: DefaultOptionTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/impl/Attic/DefaultOptionTest.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- DefaultOptionTest.java	4 Feb 2004 02:01:53 -0000	1.1.2.2
  +++ DefaultOptionTest.java	8 Feb 2004 12:13:33 -0000	1.1.2.3
  @@ -125,7 +125,7 @@
   	/* (non-Javadoc)
   	 * @see org.apache.commons.cli2.OptionTestCase#testProcess()
   	 */
  -	public void testProcess() throws OptionException {
  +	public void testProcess() {
   		// TODO Auto-generated method stub
   
   	}
  @@ -156,7 +156,7 @@
   	/* (non-Javadoc)
   	 * @see org.apache.commons.cli2.OptionTestCase#testAppendUsage()
   	 */
  -	public void testAppendUsage() throws OptionException {
  +	public void testAppendUsage() {
   		final Option option = buildHelpOption();
   		final StringBuffer buffer = new StringBuffer();
   		option.appendUsage(buffer, HelpSetting.ALL, null);
  @@ -164,7 +164,7 @@
   		assertEquals("[--help (-?,-h)]", buffer.toString());
   	}
   
  -	public void testAppendUsage_NoOptional() throws OptionException {
  +	public void testAppendUsage_NoOptional() {
   		final Option option = buildHelpOption();
   		final StringBuffer buffer = new StringBuffer();
   		final Set settings = new HashSet(HelpSetting.ALL);
  @@ -174,7 +174,7 @@
   		assertEquals("--help (-?,-h)", buffer.toString());
   	}
   
  -	public void testAppendUsage_NoAlias() throws OptionException {
  +	public void testAppendUsage_NoAlias() {
   		final Option option = buildHelpOption();
   		final StringBuffer buffer = new StringBuffer();
   		final Set settings = new HashSet(HelpSetting.ALL);
  
  
  
  No                   revision
  No                   revision
  1.1.2.4   +7 -6      jakarta-commons/cli/src/test/org/apache/commons/cli2/defaults/impl/Attic/PropertiesBackedPreferences.java
  
  Index: PropertiesBackedPreferences.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/defaults/impl/Attic/PropertiesBackedPreferences.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- PropertiesBackedPreferences.java	4 Feb 2004 02:01:52 -0000	1.1.2.3
  +++ PropertiesBackedPreferences.java	8 Feb 2004 12:13:34 -0000	1.1.2.4
  @@ -21,7 +21,6 @@
   import java.util.Map;
   import java.util.Properties;
   import java.util.prefs.AbstractPreferences;
  -import java.util.prefs.BackingStoreException;
   
   /**
    * @author jkeyes
  @@ -72,7 +71,7 @@
       /* (non-Javadoc)
        * @see java.util.prefs.AbstractPreferences#removeNodeSpi()
        */
  -    protected void removeNodeSpi() throws BackingStoreException {
  +    protected void removeNodeSpi() {
           this.childNodes.clear();
           this.props.clear();
       }
  @@ -80,7 +79,7 @@
       /* (non-Javadoc)
        * @see java.util.prefs.AbstractPreferences#keysSpi()
        */
  -    protected String[] keysSpi() throws BackingStoreException {
  +    protected String[] keysSpi() {
           String[] names = new String[this.props.size()];
           
           int count = 0;
  @@ -95,7 +94,7 @@
       /* (non-Javadoc)
        * @see java.util.prefs.AbstractPreferences#childrenNamesSpi()
        */
  -    protected String[] childrenNamesSpi() throws BackingStoreException {
  +    protected String[] childrenNamesSpi() {
           String[] names = new String[this.childNodes.size()];
           
           int count = 0;
  @@ -120,13 +119,15 @@
       /* (non-Javadoc)
        * @see java.util.prefs.AbstractPreferences#syncSpi()
        */
  -    protected void syncSpi() throws BackingStoreException {
  +    protected void syncSpi() {
  +        // nothing to do
       }
   
       /* (non-Javadoc)
        * @see java.util.prefs.AbstractPreferences#flushSpi()
        */
  -    protected void flushSpi() throws BackingStoreException {
  +    protected void flushSpi() {
  +        // nothing to do
       }
   
   }
  
  
  
  1.1.2.4   +4 -4      jakarta-commons/cli/src/test/org/apache/commons/cli2/defaults/impl/Attic/PropertiesImplTest.java
  
  Index: PropertiesImplTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/defaults/impl/Attic/PropertiesImplTest.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- PropertiesImplTest.java	4 Feb 2004 02:01:52 -0000	1.1.2.3
  +++ PropertiesImplTest.java	8 Feb 2004 12:13:34 -0000	1.1.2.4
  @@ -40,13 +40,13 @@
   
       public void testNullConfiguration() throws Exception {
           try {
  -            Defaults defaults = 
  -                DefaultsFactory.createDefaults(
  -                    "org.apache.commons.cli2.defaults.impl.PropertiesImpl",
  -                    null);
  +            DefaultsFactory.createDefaults(
  +                "org.apache.commons.cli2.defaults.impl.PropertiesImpl",
  +                null);
               fail("Expected IllegalArgumentException not caught");
           }
           catch (final IllegalArgumentException exp) {
  +            assertEquals("The specified configuration object \"null\" is not a java.util.Properties
instance.",exp.getMessage());
           }
       }
   }
  
  
  
  1.1.2.4   +4 -4      jakarta-commons/cli/src/test/org/apache/commons/cli2/defaults/impl/Attic/PreferencesImplTest.java
  
  Index: PreferencesImplTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli2/defaults/impl/Attic/PreferencesImplTest.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- PreferencesImplTest.java	4 Feb 2004 02:01:52 -0000	1.1.2.3
  +++ PreferencesImplTest.java	8 Feb 2004 12:13:34 -0000	1.1.2.4
  @@ -43,13 +43,13 @@
       
       public void testNullConfiguration() throws Exception {
           try {
  -            Defaults defaults = 
  -                DefaultsFactory.createDefaults(
  -                    "org.apache.commons.cli2.defaults.impl.PreferencesImpl",
  -                    null);
  +            DefaultsFactory.createDefaults(
  +                "org.apache.commons.cli2.defaults.impl.PreferencesImpl",
  +                null);
               fail("Expected IllegalArgumentException not caught");
           }
           catch (final IllegalArgumentException exp) {
  +            assertEquals("The specified configuration object \"null\" is not a java.util.prefs.Preferences
instance.",exp.getMessage());
           }
       }
   
  
  
  
  No                   revision
  No                   revision
  1.1.2.4   +3 -3      jakarta-commons/cli/src/java/org/apache/commons/cli2/Attic/HelpFormatter.java
  
  Index: HelpFormatter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli2/Attic/HelpFormatter.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- HelpFormatter.java	4 Feb 2004 02:01:50 -0000	1.1.2.3
  +++ HelpFormatter.java	8 Feb 2004 12:13:34 -0000	1.1.2.4
  @@ -215,19 +215,19 @@
   		}
   	}
   
  -	public void printGutterLeft(final PrintWriter out) throws IOException {
  +	public void printGutterLeft(final PrintWriter out) {
   		if (gutterLeft != null) {
   			out.print(gutterLeft);
   		}
   	}
   
  -	public void printGutterRight(final PrintWriter out) throws IOException {
  +	public void printGutterRight(final PrintWriter out) {
   		if (gutterRight != null) {
   			out.print(gutterRight);
   		}
   	}
   
  -	public void printDivider(final PrintWriter out) throws IOException {
  +	public void printDivider(final PrintWriter out) {
   		if (divider != null) {
   			out.println(divider);
   		}
  
  
  
  No                   revision
  No                   revision
  1.1.2.4   +0 -3      jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/Attic/EnumValidator.java
  
  Index: EnumValidator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli2/validation/Attic/EnumValidator.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- EnumValidator.java	4 Feb 2004 02:01:52 -0000	1.1.2.3
  +++ EnumValidator.java	8 Feb 2004 12:13:34 -0000	1.1.2.4
  @@ -29,9 +29,6 @@
       /** List of permitted values */
       private Set validValues;
       
  -    /** Stringified version of values */
  -    private String valuesStr;
  -    
       /**
        * Creates a new StringValidator for the specified values.
        *  
  
  
  
  No                   revision
  No                   revision
  1.1.2.6   +2 -2      jakarta-commons/cli/src/java/org/apache/commons/cli2/resources/Attic/ResourceHelper.java
  
  Index: ResourceHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli2/resources/Attic/ResourceHelper.java,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- ResourceHelper.java	4 Feb 2004 02:01:54 -0000	1.1.2.5
  +++ ResourceHelper.java	8 Feb 2004 12:13:34 -0000	1.1.2.6
  @@ -60,7 +60,7 @@
               className.substring(0, className.lastIndexOf(".") + 1);
           
           final String bundleName = 
  -            packageName + "messages";
  +            packageName + DEFAULT_BUNDLE;
               
           // initialize the bundle
           try{
  @@ -198,6 +198,6 @@
           final String msgFormatStr = bundle.getString(key);
           final MessageFormat msgFormat = new MessageFormat(msgFormatStr);
           
  -        return msgFormat.format((Object) values);            
  +        return msgFormat.format(values);            
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message