[ 
https://issues.apache.org/jira/browse/CLI-351?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claude Warren updated CLI-351:
------------------------------
    Description: 
Analysis shows this is not a regression of CLI-162 but a different problem with 
similar user experience.

 

As reported by Damien Carbonne:

Starting with commons-cli-1.10.0, HelpFormatter enters an infinite loop when 
its is passed a header or footer that contains 2 or more new line (\n) 
characters. The following code shows this behaviour:        

{final HelpFormatter formatter = HelpFormatter.builder().get(); 

formatter.printHelp("CL syntax",
                       "Header\n\n",
                        Collections.emptyList(),
                         "Footer",  
                          true); 

}

 

 

Mailing list discussion: 
[https://lists.apache.org/thread/d0q7mpcz83b7p7otnws08sdbcc8g17xh]

 

 

  was:
Analysis shows this is not a regression of CLI-162 but a different problem with 
similar user experience.

 

As reported by Damien Carbonne:

Starting with commons-cli-1.10.0, HelpFormatter enters an infinite loop when 
its is passed a header or footer that contains 2 or more new line (\n) 
characters. The following code shows this behaviour:        

{{{{}}{}}}final HelpFormatter formatter = HelpFormatter.builder().get(); 

formatter.printHelp("CL syntax",
                       "Header\n\n",
                        Collections.emptyList(),
                         "Footer",  
                          true); \{{}}

 

 

Mailing list discussion: 
[https://lists.apache.org/thread/d0q7mpcz83b7p7otnws08sdbcc8g17xh]

 

 


> Multiple traililng BREAK_CHAR_SET characters cause infinite loop in 
> HelpFormatter
> ---------------------------------------------------------------------------------
>
>                 Key: CLI-351
>                 URL: https://issues.apache.org/jira/browse/CLI-351
>             Project: Commons CLI
>          Issue Type: Task
>          Components: Help formatter
>    Affects Versions: 1.10.0
>            Reporter: Claude Warren
>            Priority: Major
>
> Analysis shows this is not a regression of CLI-162 but a different problem 
> with similar user experience.
>  
> As reported by Damien Carbonne:
> Starting with commons-cli-1.10.0, HelpFormatter enters an infinite loop when 
> its is passed a header or footer that contains 2 or more new line (\n) 
> characters. The following code shows this behaviour:        
> {final HelpFormatter formatter = HelpFormatter.builder().get(); 
> formatter.printHelp("CL syntax",
>                        "Header\n\n",
>                         Collections.emptyList(),
>                          "Footer",  
>                           true); 
> }
>  
>  
> Mailing list discussion: 
> [https://lists.apache.org/thread/d0q7mpcz83b7p7otnws08sdbcc8g17xh]
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to