Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.1
-
None
Description
If there is not enough space to display a word on a single line, HelpFormatter goes into a infinite loops until the JVM crashes with an OutOfMemoryError.
Test case:
Options options = new Options(); options.addOption("h", "help", false, "This is a looooong description"); HelpFormatter formatter = new HelpFormatter(); formatter.setWidth(20); formatter.printHelp("app", options); // hang & crash
An helpful exception indicating the insufficient width would be more appropriate than an OutOfMemoryError.
Attachments
Attachments
Issue Links
- is cloned by
-
CLI-174 RuntimeException in the wrapping code of HelpFormatter
- Closed