commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36998] New: - Parsing error?
Date Mon, 10 Oct 2005 20:47:15 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36998>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36998

           Summary: Parsing error?
           Product: Commons
           Version: 1.0 Final
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: CLI
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: junk5@microserf.org.uk


Hi

If one accidentally confuses the long and short argument name styles, then the value of the
argument is 
incorrect. This is mad clear by an example:

If I have a program that I call as follows:

my_prog --file my_file.txt

or

my_prog -f my_file.txt

but I make a typo and write

my_prog -file my_file.txt

then getOptionValue('f') will return "ile" (i.e. it thinks the remainder of the argument's
name is the 
argument). "my_file.txt" will be ignored.

This is clearly an error that the user has made, but I think that CLI should be able to detect
such an 
error and throw an appropriate exception.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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