stevel 02/04/15 22:47:41
Modified: src/main/org/apache/tools/ant ProjectHelper.java
Log:
add rule that"$"->"$"; retaining "$$"->"$"
Fundamental changes like this scare me. I wonder what the gump is going to
show up here. If all is well; nothing.
Revision Changes Path
1.84 +13 -1
jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java
Index: ProjectHelper.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -r1.83 -r1.84
--- ProjectHelper.java 15 Apr 2002 15:33:08 -0000 1.83
+++ ProjectHelper.java 16 Apr 2002 05:47:41 -0000 1.84
@@ -472,7 +472,7 @@
while ((pos = value.indexOf("$", prev)) >= 0) {
//if there was any text before this, add it as a fragment
- //TODO, this check could me modified to go if pos>prev;
+ //TODO, this check could be modified to go if pos>prev;
//seems like this current version could stick empty strings
//into the list
if (pos > 0) {
@@ -486,8 +486,20 @@
} else if (value.charAt(pos + 1) != '{') {
//peek ahead to see if the next char is a property or not
//not a property: insert the char as a literal
+ /*
fragments.addElement(value.substring(pos + 1, pos + 2));
prev = pos + 2;
+ */
+ if(value.charAt(pos + 1) == '$') {
+ //backwards compatibility two $ map to one mode
+ fragments.addElement("$");
+ prev = pos + 2;
+ } else {
+ //new behaviour: $X maps to $X for all values of X!='$'
+ fragments.addElement(value.substring(pos, pos + 2));
+ prev = pos + 2;
+ }
+
} else {
//property found, extract its name or bail on a typo
int endName = value.indexOf('}', pos);
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>