Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 10EA9C899 for ; Mon, 20 Aug 2012 11:28:41 +0000 (UTC) Received: (qmail 83143 invoked by uid 500); 20 Aug 2012 11:28:40 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 83044 invoked by uid 500); 20 Aug 2012 11:28:39 -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 82946 invoked by uid 99); 20 Aug 2012 11:28:38 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Aug 2012 11:28:38 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 1FCA42C5BF0 for ; Mon, 20 Aug 2012 11:28:38 +0000 (UTC) Date: Mon, 20 Aug 2012 22:28:38 +1100 (NCT) From: "Karel Vervaeke (JIRA)" To: issues@commons.apache.org Message-ID: <432138275.29584.1345462118131.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (CLI-209) OptionBuilder is not thread-safe 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:comment-tabpanel&focusedCommentId=13437793#comment-13437793 ] Karel Vervaeke commented on CLI-209: ------------------------------------ I would mark this 'wont fix', since OptionBuilder still is not, by any definition threadsafe. CLI-224 seems to be a duplicate. Perhaps you could keep this one closed (won't fix in 1.x line) and keep the other one open for 2.0. Two hypothetical use cases for making CLI thread safe: * A container where multiple users enter commands simultaneously, and where the parsing of the command happens in the container). * A program designed to execute multiple commands in parallel: The commands are read from configuration files, and for each line a parallel process is started to parse and execute the command. > 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. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira