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/option DefaultOption.java Switch.java Command.java
Date Fri, 08 Oct 2004 22:52:53 GMT
roxspring    2004/10/08 15:52:53

  Modified:    cli/src/java/org/apache/commons/cli2 messages.properties
               cli/src/java/org/apache/commons/cli2/option
                        DefaultOption.java Switch.java Command.java
  Log:
  Added "missing required option" message
  
  Revision  Changes    Path
  1.3       +1 -0      jakarta-commons/cli/src/java/org/apache/commons/cli2/messages.properties
  
  Index: messages.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli2/messages.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- messages.properties	22 Apr 2004 23:00:06 -0000	1.2
  +++ messages.properties	8 Oct 2004 22:52:53 -0000	1.3
  @@ -4,3 +4,4 @@
   cli.error.missing.option = Missing option
   cli.error.burst = Could not burst "{0}" while processing 
   cli.error.badproperty = Could not understand property: {0}
  +cli.error.missing.required = Missing required option
  
  
  
  1.4       +1 -1      jakarta-commons/cli/src/java/org/apache/commons/cli2/option/DefaultOption.java
  
  Index: DefaultOption.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli2/option/DefaultOption.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultOption.java	7 Sep 2004 00:18:23 -0000	1.3
  +++ DefaultOption.java	8 Oct 2004 22:52:53 -0000	1.4
  @@ -184,7 +184,7 @@
       public void validate(WriteableCommandLine commandLine)
           throws OptionException {
           if (isRequired() && !commandLine.hasOption(this)) {
  -            throw new OptionException(this);
  +            throw new OptionException(this,"cli.error.missing.required", getPreferredName());
           }
   
           super.validate(commandLine);
  
  
  
  1.6       +1 -1      jakarta-commons/cli/src/java/org/apache/commons/cli2/option/Switch.java
  
  Index: Switch.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli2/option/Switch.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Switch.java	2 Oct 2004 13:16:21 -0000	1.5
  +++ Switch.java	8 Oct 2004 22:52:53 -0000	1.6
  @@ -165,7 +165,7 @@
       public void validate(WriteableCommandLine commandLine)
           throws OptionException {
           if (isRequired() && !commandLine.hasOption(this)) {
  -            throw new OptionException(this);
  +            throw new OptionException(this,"cli.error.missing.required", getPreferredName());
           }
   
           super.validate(commandLine);
  
  
  
  1.3       +1 -1      jakarta-commons/cli/src/java/org/apache/commons/cli2/option/Command.java
  
  Index: Command.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli2/option/Command.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Command.java	22 Apr 2004 23:00:07 -0000	1.2
  +++ Command.java	8 Oct 2004 22:52:53 -0000	1.3
  @@ -129,7 +129,7 @@
       public void validate(WriteableCommandLine commandLine)
           throws OptionException {
           if (isRequired() && !commandLine.hasOption(this)) {
  -            throw new OptionException(this);
  +            throw new OptionException(this,"cli.error.missing.required", getPreferredName());
           }
   
           super.validate(commandLine);
  
  
  

---------------------------------------------------------------------
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