[ 
https://issues.apache.org/jira/browse/CLI-209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12915662#action_12915662
 ] 

Emmanuel Bourg commented on CLI-209:
------------------------------------

Just curious, what is the use case that would require making CLI thread safe? A 
typical application uses CLI on its main thread to parse the command line 
parameters, that's far from a multi thread scenario.

> OptionBuilder is not thread-safe
> --------------------------------
>
>                 Key: CLI-209
>                 URL: https://issues.apache.org/jira/browse/CLI-209
>             Project: Commons CLI
>          Issue Type: Bug
>          Components: CLI-1.x
>    Affects Versions: 1.0, 1.1, 1.2
>         Environment: Windows XP, Java 6
>            Reporter: Thomas Herre
>
> Class OptionBuilder is not thread-safe.
> It uses one OptionBuilder instance without synchronizing access to it.
> If more than one thread uses OptionBuilder, that can result in invalid 
> Options (suppose a scheduler component).
> Don't know if this should be fixed. At least the Javadoc should mention the 
> fact that the class is not thread-safe.
> As a workaround, use constructor of class Option.

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

Reply via email to