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 A22E5ECE8 for ; Wed, 30 Jan 2013 18:14:19 +0000 (UTC) Received: (qmail 11145 invoked by uid 500); 30 Jan 2013 18:14:19 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 11045 invoked by uid 500); 30 Jan 2013 18:14:19 -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 11037 invoked by uid 99); 30 Jan 2013 18:14:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2013 18:14:19 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sebbaz@gmail.com designates 209.85.212.177 as permitted sender) Received: from [209.85.212.177] (HELO mail-wi0-f177.google.com) (209.85.212.177) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2013 18:14:12 +0000 Received: by mail-wi0-f177.google.com with SMTP id hm14so1960333wib.10 for ; Wed, 30 Jan 2013 10:13:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=KV1rff7vddWJZ7lVp+m0j643N8CJBqX4BeHKxWrsgkk=; b=lOSYJTq3y2l/pGeZ10g+Cl21P9+qa4WEXgVG9CG7K7hKS8ASP0SOn/UH5YfnS3ARIC bn0F7DpnkTX/AfkAHNmXJwXLUnFbUFXTZlaYMIfIkywIEgs4q8bhKx5n/G5sYUFUdWYv 3Cfc5J9CE5UNfwcfQJkU1LGWffawlJa0+ctgqFVpGNC+npuoqVKW26afakgXr+U8G+RA wmO4jiid1Xo7C3SOTOKZWGgBUgte+i1yOum2lnRDw+xdoN/J0e+vW7LyB6Ks/oi1jWYy nHTkPZ2FckECjYdR6DiKEaqqBEUCbVdHChsaVzGJh/BF4uuzYfjG2OkhC2hERJK0+rdC VknQ== MIME-Version: 1.0 X-Received: by 10.180.80.170 with SMTP id s10mr10574166wix.27.1359569629187; Wed, 30 Jan 2013 10:13:49 -0800 (PST) Received: by 10.194.234.164 with HTTP; Wed, 30 Jan 2013 10:13:48 -0800 (PST) In-Reply-To: References: <20130130170551.BF19323888E7@eris.apache.org> Date: Wed, 30 Jan 2013 18:13:48 +0000 Message-ID: Subject: Re: svn commit: r1440524 - /commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java From: sebb To: Commons Developers List Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On 30 January 2013 17:12, Thomas Neidhart wrote: > On Wed, Jan 30, 2013 at 6:05 PM, wrote: > >> Author: sebb >> Date: Wed Jan 30 17:05:51 2013 >> New Revision: 1440524 >> >> URL: http://svn.apache.org/viewvc?rev=1440524&view=rev >> Log: >> Document unexpected list contents >> >> Modified: >> >> commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java >> >> Modified: >> commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java >> URL: >> http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java?rev=1440524&r1=1440523&r2=1440524&view=diff >> >> ============================================================================== >> --- >> commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java >> (original) >> +++ >> commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java >> Wed Jan 30 17:05:51 2013 >> @@ -55,6 +55,8 @@ public class Options implements Serializ >> private Map longOpts = new LinkedHashMap> Option>(); >> >> /** 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 ... > Thomas --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org