Return-Path: Delivered-To: apmail-commons-commits-archive@locus.apache.org Received: (qmail 19857 invoked from network); 30 May 2008 07:44:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 May 2008 07:44:57 -0000 Received: (qmail 58467 invoked by uid 500); 30 May 2008 07:44:58 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 58401 invoked by uid 500); 30 May 2008 07:44:58 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 58392 invoked by uid 99); 30 May 2008 07:44:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 May 2008 00:44:58 -0700 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.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 May 2008 07:44:11 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7CAC423889C4; Fri, 30 May 2008 00:44:33 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r661583 - /commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/GnuParser.java Date: Fri, 30 May 2008 07:44:33 -0000 To: commits@commons.apache.org From: ebourg@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080530074433.7CAC423889C4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ebourg Date: Fri May 30 00:44:33 2008 New Revision: 661583 URL: http://svn.apache.org/viewvc?rev=661583&view=rev Log: Minor simplification in GnuParser to make the token list local to the flatten method Modified: commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/GnuParser.java Modified: commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/GnuParser.java URL: http://svn.apache.org/viewvc/commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/GnuParser.java?rev=661583&r1=661582&r2=661583&view=diff ============================================================================== --- commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/GnuParser.java (original) +++ commons/proper/cli/branches/cli-1.x/src/java/org/apache/commons/cli/GnuParser.java Fri May 30 00:44:33 2008 @@ -14,9 +14,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.apache.commons.cli; import java.util.ArrayList; +import java.util.List; /** * The class GnuParser provides an implementation of the @@ -28,18 +30,6 @@ */ public class GnuParser extends Parser { - /** holder for flattened tokens */ - private ArrayList tokens = new ArrayList(); - - /** - *

Resets the members to their original state i.e. remove - * all of tokens entries. - */ - private void init() - { - tokens.clear(); - } - /** *

This flatten method does so using the following rules: *

    @@ -62,7 +52,7 @@ protected String[] flatten(Options options, String[] arguments, boolean stopAtNonOption) { - init(); + List tokens = new ArrayList(); boolean eatTheRest = false; Option currentOption = null;