jkeyes      2002/11/27 15:17:42

  Modified:    cli/src/java/org/apache/commons/cli Option.java
  Log:
  throw an exception if a value is attempted to be added to an Option that does not 
have any argument values
  
  Revision  Changes    Path
  1.19      +1 -1      jakarta-commons/cli/src/java/org/apache/commons/cli/Option.java
  
  Index: Option.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli/Option.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Option.java       25 Nov 2002 23:43:40 -0000      1.18
  +++ Option.java       27 Nov 2002 23:17:41 -0000      1.19
  @@ -396,7 +396,7 @@
       {
           switch( numberOfArgs ) {
               case UNINITIALIZED:
  -                break;
  +                throw new RuntimeException( "Cannot add value, no arguments 
allowed." );
               default:
                   processValue( value );
           }
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to