Closed harshdes closed 7 years ago
Thanks for the clear report, I will try and get a test case and fix committed for this today
I was planning to make a release for a little while yet but I would be able to push out a snapshot build with the fix for you to test/use if that is okay?
Fix will probably be tomorrow as have run out of time today
A fix and test cases for this based on your report has been created.
The snapshot builds will be available from oss.sonatype.org shortly - see http://central.sonatype.org/pages/ossrh-guide.html for the necessary repository settings
Actually realised code was at a point where it could be released so have gone ahead and cut a 2.2.0 release. It may take a few hours before the artefacts are available on Maven Central.
I've verified and the fix works. Thanks @rvesse !
I have a CLI that has a server group and a cache sub-group.
When running any command from the server group (not 'cache' sub-group), for example the
ServerAdd
command, the parsing goes into an infinite loop.Following is the gist of the CLI building code.
After debugging more into the airline code, I found the infinite loop is occuring in
AbstractCommandParser.parseGroup(PeekingIterator<String> tokens, ParseState<T> state)
in the following linesBelow is what's happening:
ServerAdd
command ("add")CollectionUtils.find
returnsnull
for "add" since there is no sub-group by that name. Remember, that the only sub-group present is cache.tokens
never move to the next iterator and while loop continues with steps 1-4 foreverLet me know if you need more information. I'm happy to share my user code for this bug.