Return-Path: Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: (qmail 82221 invoked from network); 12 Apr 2010 10:26:09 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Apr 2010 10:26:09 -0000 Received: (qmail 17491 invoked by uid 500); 12 Apr 2010 10:26:09 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 17402 invoked by uid 500); 12 Apr 2010 10:26:07 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 17395 invoked by uid 99); 12 Apr 2010 10:26:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Apr 2010 10:26:07 +0000 X-ASF-Spam-Status: No, hits=-1314.6 required=10.0 tests=ALL_TRUSTED,AWL 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; Mon, 12 Apr 2010 10:26:06 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7C86223889D5; Mon, 12 Apr 2010 10:25:46 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r933177 - /ant/antlibs/props/trunk/src/main/org/apache/ant/props/NestedPropertyExpander.java Date: Mon, 12 Apr 2010 10:25:46 -0000 To: notifications@ant.apache.org From: bodewig@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100412102546.7C86223889D5@eris.apache.org> Author: bodewig Date: Mon Apr 12 10:25:46 2010 New Revision: 933177 URL: http://svn.apache.org/viewvc?rev=933177&view=rev Log: remove costly indexOf - see revision 932588 of core's PropertyHelper Modified: ant/antlibs/props/trunk/src/main/org/apache/ant/props/NestedPropertyExpander.java Modified: ant/antlibs/props/trunk/src/main/org/apache/ant/props/NestedPropertyExpander.java URL: http://svn.apache.org/viewvc/ant/antlibs/props/trunk/src/main/org/apache/ant/props/NestedPropertyExpander.java?rev=933177&r1=933176&r2=933177&view=diff ============================================================================== --- ant/antlibs/props/trunk/src/main/org/apache/ant/props/NestedPropertyExpander.java (original) +++ ant/antlibs/props/trunk/src/main/org/apache/ant/props/NestedPropertyExpander.java Mon Apr 12 10:25:46 2010 @@ -39,7 +39,8 @@ public class NestedPropertyExpander impl public String parsePropertyName(String value, ParsePosition pos, ParseNextProperty parseNextProperty) { int start = pos.getIndex(); - if (value.indexOf("${", start) == start) { + if (value.length() - start >= 3 + && '$' == value.charAt(start) && '{' == value.charAt(start + 1)) { parseNextProperty.getProject().log("Attempting nested property processing", Project.MSG_DEBUG); pos.setIndex(start + 2);