commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Bourg (JIRA)" <>
Subject [jira] Resolved: (CLI-209) OptionBuilder is not thread-safe
Date Fri, 29 Oct 2010 10:34:20 GMT


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:
>             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.

View raw message