You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Yandell (JIRA)" <ji...@apache.org> on 2009/01/17 10:29:59 UTC

[jira] Created: (CLI-174) infinite loop in the wrapping code of HelpFormatter - Solve?

infinite loop in the wrapping code of HelpFormatter - Solve?
------------------------------------------------------------

                 Key: CLI-174
                 URL: https://issues.apache.org/jira/browse/CLI-174
             Project: Commons CLI
          Issue Type: Bug
          Components: Help formatter
    Affects Versions: 1.1
            Reporter: Emmanuel Bourg
             Fix For: 1.3


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:

{code}
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
{code}

An helpful exception indicating the insufficient width would be more appropriate than an OutOfMemoryError.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CLI-174) RuntimeException in the wrapping code of HelpFormatter

Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CLI-174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Yandell updated CLI-174:
------------------------------

    Summary: RuntimeException in the wrapping code of HelpFormatter  (was: infinite loop in the wrapping code of HelpFormatter - Solve?)

> RuntimeException in the wrapping code of HelpFormatter
> ------------------------------------------------------
>
>                 Key: CLI-174
>                 URL: https://issues.apache.org/jira/browse/CLI-174
>             Project: Commons CLI
>          Issue Type: Bug
>          Components: Help formatter
>    Affects Versions: 1.1
>            Reporter: Emmanuel Bourg
>             Fix For: 1.3
>
>
> 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:
> {code}
> 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
> {code}
> An helpful exception indicating the insufficient width would be more appropriate than an OutOfMemoryError.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (CLI-174) RuntimeException in the wrapping code of HelpFormatter

Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CLI-174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Yandell closed CLI-174.
-----------------------------

    Resolution: Won't Fix

No longer true - RuntimeException was removed prior to 1.2 being released.

> RuntimeException in the wrapping code of HelpFormatter
> ------------------------------------------------------
>
>                 Key: CLI-174
>                 URL: https://issues.apache.org/jira/browse/CLI-174
>             Project: Commons CLI
>          Issue Type: Bug
>          Components: Help formatter
>    Affects Versions: 1.1
>            Reporter: Emmanuel Bourg
>             Fix For: 1.3
>
>
> 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:
> {code}
> 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
> {code}
> An helpful exception indicating the insufficient width would be more appropriate than an OutOfMemoryError.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.