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-sandbox/cli/src/java/org/apache/commons/cli2 DefaultOption.java
Date Wed, 22 Oct 2003 23:48:32 GMT
roxspring    2003/10/22 16:48:32

  Modified:    cli/src/java/org/apache/commons/cli2 DefaultOption.java
  Log:
  DefaultOption now allows options with arguments immediately following 
  the short option, just as I thought it always had done.
  
  E.g. "-Flogfile" has an option "-F" and argument "logfile"
  
  Revision  Changes    Path
  1.3       +12 -5     jakarta-commons-sandbox/cli/src/java/org/apache/commons/cli2/DefaultOption.java
  
  Index: DefaultOption.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/cli/src/java/org/apache/commons/cli2/DefaultOption.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultOption.java	21 Oct 2003 19:28:14 -0000	1.2
  +++ DefaultOption.java	22 Oct 2003 23:48:32 -0000	1.3
  @@ -154,8 +154,15 @@
   
   				//HMM test bursting all vs bursting one by one.
   				arguments.set(preferredName);
  -				arguments.add(shortPrefix + argument.substring(burstLength));
  -				arguments.previous();
  +                
  +                if(getArgument()==null){
  +                    arguments.add(shortPrefix + argument.substring(burstLength));
  +                }
  +                else{
  +                    arguments.add(argument.substring(burstLength));
  +                }
  +                
  +                arguments.previous();
   			} else {
   				throw new BurstException(this, argument);
   			}
  
  
  

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