Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 15976 invoked from network); 29 Oct 2010 10:34:43 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Oct 2010 10:34:43 -0000 Received: (qmail 62520 invoked by uid 500); 29 Oct 2010 10:34:43 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 62405 invoked by uid 500); 29 Oct 2010 10:34:42 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 62393 invoked by uid 99); 29 Oct 2010 10:34:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Oct 2010 10:34:41 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Oct 2010 10:34:41 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o9TAYKT0023286 for ; Fri, 29 Oct 2010 10:34:21 GMT Message-ID: <29893966.139581288348460911.JavaMail.jira@thor> Date: Fri, 29 Oct 2010 06:34:20 -0400 (EDT) From: "Emmanuel Bourg (JIRA)" To: issues@commons.apache.org Subject: [jira] Resolved: (CLI-209) OptionBuilder is not thread-safe In-Reply-To: <50778.421141285597653417.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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.