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 ArgumentImpl.java
Date Thu, 09 Sep 2004 11:39:15 GMT
roxspring    2004/09/09 04:39:15

  Modified:    cli/src/java/org/apache/commons/cli2/option
                        ArgumentImpl.java
  Log:
  ArgumentImpl now deals with defaults a little better
  
  Revision  Changes    Path
  1.4       +1 -6      jakarta-commons/cli/src/java/org/apache/commons/cli2/option/ArgumentImpl.java
  
  Index: ArgumentImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli2/option/ArgumentImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ArgumentImpl.java	6 Sep 2004 22:57:44 -0000	1.3
  +++ ArgumentImpl.java	9 Sep 2004 11:39:15 -0000	1.4
  @@ -146,7 +146,7 @@
           final ListIterator arguments,
           final Option option)
           throws OptionException {
  -        int argumentCount = commandLine.getValues(option).size();
  +        int argumentCount = commandLine.getValues(option,Collections.EMPTY_LIST).size();
           final int initialCount = argumentCount;
           while (arguments.hasNext() && argumentCount < maximum) {
   
  @@ -193,11 +193,6 @@
                   ++argumentCount;
                   commandLine.addValue(option, allValues);
               }
  -        }
  -
  -        if (this.defaultValues == null
  -            && (argumentCount < minimum || initialCount == argumentCount)) {
  -                throw new OptionException(option, "cli.error.missing.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