ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r933177 - /ant/antlibs/props/trunk/src/main/org/apache/ant/props/NestedPropertyExpander.java
Date Mon, 12 Apr 2010 10:25:46 GMT
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);



Mime
View raw message