Issue Details (XML | Word | Printable)

Key: CLI-23
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Jarek Gawor
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons CLI

[cli] Passing properties in Parser does not work for options with a single argument

Created: 10/Sep/04 01:55 AM   Updated: 15/Mar/07 04:49 PM
Return to search "STDCXX Intel C++ issues"
Component/s: CLI-1.x
Affects Version/s: Nightly Builds
Fix Version/s: 1.1

Time Tracking:
Not Specified

Environment:
Operating System: other
Platform: Other

Bugzilla Id: 31148


 Description  « Hide
processProperties(Properties properties) in Parser.java calls opt.hasArgs().
The hasArgs() function in Option.java returns true if the option has multiple
values (this.numberOfArgs > 1). So for options with a single argument this
returns false.
A simple fix is to change the opt.hasArgs() call to opt.hasArg() in Parser.java.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Henri Yandell made changes - 16/May/06 09:45 AM
Field Original Value New Value
issue.field.bugzillaimportkey 31148 12341711
Henri Yandell made changes - 16/May/06 11:12 AM
Affects Version/s Nightly Builds [ 12311648 ]
Project Commons [ 12310458 ] Commons CLI [ 12310463 ]
Component/s CLI [ 12311104 ]
Key COM-1559 CLI-23
Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
Henri Yandell made changes - 16/May/06 12:20 PM
Affects Version/s Nightly Builds [ 12311742 ]
Henri Yandell made changes - 10/Jul/06 01:21 PM
Fix Version/s 1.1 [ 12311979 ]
Bugzilla Id 31148
Henri Yandell made changes - 15/Mar/07 04:36 PM
Component/s CLI-1.x [ 12311672 ]
Henri Yandell made changes - 15/Mar/07 04:49 PM
Status Resolved [ 5 ] Closed [ 6 ]