Description
This patch can be applied to the current svn checked out version of cli2 (2010-Feb-9th).
It will make the cli2 compatible to JDK 5 generic type, eliminating all compiling warnings,
and fix some minor but critical iterator boundary check bugs.
The bug could be found in the following way: creating some Option object WITHOUT description,
and use a HelpFormatter to print the helping message, then a NoSuchElementException will be thrown.
This is because the HelpFormatter.printHelp() did not correctly check the empty status of descriptionIterator.
And moreover, some implementation of Option.processParent() method did not check the empty status
of the argument "ListIterator<String> arguments".
Attachments
Attachments
Issue Links
- duplicates
-
CLI-173 Upgrade to Java 5 features
- Open