Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3C8D2ED12 for ; Wed, 30 Jan 2013 18:19:41 +0000 (UTC) Received: (qmail 27207 invoked by uid 500); 30 Jan 2013 18:19:40 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 27019 invoked by uid 500); 30 Jan 2013 18:19:40 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 27005 invoked by uid 99); 30 Jan 2013 18:19:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2013 18:19:40 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jak-commons-dev@m.gmane.org designates 80.91.229.3 as permitted sender) Received: from [80.91.229.3] (HELO plane.gmane.org) (80.91.229.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2013 18:19:31 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1U0cFl-000077-PA for dev@commons.apache.org; Wed, 30 Jan 2013 19:19:21 +0100 Received: from hsi-kbw-095-208-058-089.hsi5.kabel-badenwuerttemberg.de ([95.208.58.89]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Jan 2013 19:19:21 +0100 Received: from joerg.schaible by hsi-kbw-095-208-058-089.hsi5.kabel-badenwuerttemberg.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Jan 2013 19:19:21 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: dev@commons.apache.org From: =?UTF-8?B?SsO2cmc=?= Schaible Subject: Re: svn commit: r1440524 - /commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java Date: Wed, 30 Jan 2013 19:18:52 +0100 Lines: 30 Message-ID: References: <20130130170551.BF19323888E7@eris.apache.org> Reply-To: joerg.schaible@gmx.de Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: hsi-kbw-095-208-058-089.hsi5.kabel-badenwuerttemberg.de User-Agent: KNode/4.9.5 X-Virus-Checked: Checked by ClamAV on apache.org Hi, sebb wrote: [snip] >>> /** a map of the required options */ >>> + // N.B. This can contain either a String (addOption) or an >>> OptionGroup (addOptionGroup) >>> + // TODO this seems wrong >>> private List requiredOpts = new ArrayList(); >>> >> >> Indeed, I also spotted this and failed to resolve it, as the logic in the >> parsers is somehow taken advantage of it in a way I do not yet fully >> understand. > > Me neither. > > Maybe the code would still work if the entries were always OptionGroups. > This could perhaps be done by converting the Option into a > single-entry OptionGroup and storing that, rather than storing the > Option key String. > In theory that might work ... Or create a package local marker interface OptionEntry and let both classes implement it. - Jörg --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org