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

Emmanuel Bourg resolved CLI-209.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3

I updated the Javadoc as suggested by Thomas.

Ideally I'd like to rewrite OptionBuilder with non static methods, beside the 
thread safety issue this cause my IDE to show a lot of ugly warnings, that's 
not a pleasant experience. Due to the incompatible nature of this modification 
it will have to wait for a major release. We might also deprecate the class and 
rewrite it under a new name, for example OptionsBuilder.

> 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
>            Reporter: Thomas Herre
>            Priority: Minor
>             Fix For: 1.3
>
>
> 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