Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 71329 invoked from network); 3 Oct 2006 21:35:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Oct 2006 21:35:12 -0000 Received: (qmail 65755 invoked by uid 500); 3 Oct 2006 21:35:11 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 65716 invoked by uid 500); 3 Oct 2006 21:35:10 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 65705 invoked by uid 500); 3 Oct 2006 21:35:10 -0000 Received: (qmail 65702 invoked by uid 99); 3 Oct 2006 21:35:10 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Oct 2006 14:35:10 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME Received: from [140.211.166.113] ([140.211.166.113:63098] helo=eris.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 69/C2-00170-D87D2254 for ; Tue, 03 Oct 2006 14:35:09 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 9DA741A981A; Tue, 3 Oct 2006 14:35:07 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r452635 - /ant/core/trunk/src/main/org/apache/tools/ant/RuntimeConfigurable.java Date: Tue, 03 Oct 2006 21:35:07 -0000 To: ant-cvs@apache.org From: peterreilly@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061003213507.9DA741A981A@eris.apache.org> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: peterreilly Date: Tue Oct 3 14:35:06 2006 New Revision: 452635 URL: http://svn.apache.org/viewvc?view=rev&rev=452635 Log: Always handle refid first. Refid normally cannot be used with other attributes and some types check for this. The code is broken in a number of places - if refid is not set first. To fix this, runtimeconfigurable will now always process refid first. Modified: ant/core/trunk/src/main/org/apache/tools/ant/RuntimeConfigurable.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/RuntimeConfigurable.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/RuntimeConfigurable.java?view=diff&rev=452635&r1=452634&r2=452635 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/RuntimeConfigurable.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/RuntimeConfigurable.java Tue Oct 3 14:35:06 2006 @@ -70,6 +70,12 @@ * We could also just use SAX2 Attributes and convert to SAX1 ( DOM * attribute Nodes can also be stored in SAX2 Attributes ) * XXX under JDK 1.4 you can just use a LinkedHashMap for this purpose -jglick + * The only exception to this order is the treatment of + * refid. A number of datatypes check if refid is set + * when other attributes are set. This check will not + * work if the build script has the other attribute before + * the "refid" attribute, so now (ANT 1.7) the refid + * attribute will be processed first. */ private List/**/ attributeNames = null; @@ -185,7 +191,11 @@ attributeNames = new ArrayList(); attributeMap = new HashMap(); } - attributeNames.add(name); + if (name.toLowerCase(Locale.US).equals("refid")) { + attributeNames.add(0, name); + } else { + attributeNames.add(name); + } attributeMap.put(name, value); if (name.equals("id")) { this.id = value; --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org