Issue Details (XML | Word | Printable)

Key: CLI-28
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Simon Raess
Votes: 0
Watchers: 0
Operations

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

[CLI] Infinite Loop in Command-Line processing

Created: 29/Mar/04 02:56 AM   Updated: 15/Mar/07 04:49 PM
Return to search
Component/s: CLI-1.x
Affects Version/s: None
Fix Version/s: 1.1

Time Tracking:
Not Specified

Environment:
Operating System: All
Platform: All

Bugzilla Id: 28005


 Description  « Hide
In some cases, CLI-2 hangs in an infinite loop. I've created the following Group:

– snip –
Option inputFormatOption = optionBuilder.withLongName("input-format")
.create();
Argument argument = argumentBuilder.withName("file")
.create();
Group children = groupBuilder.withName("options")
.withOption(inputFormatOption)
.create();
Command command = commandBuilder.withName("convert")
.withChildren(children)
.withArgument(argument)
.create();
Group root = groupBuilder.withName("commands")
.withOption(createConvertCommand())
.create();
– snip –

When I use the group:
-snip-
Parser parser = new Parser();
parser.setGroup(root);
parser.parse(args);
– snip

and use the following command line:
convert test.txt --input-format a

the parser hangs in an infinite loop.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.