Browse Source

Don't die on empty values.

PR: 18625


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274424 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
abaeb89103
2 changed files with 7 additions and 2 deletions
  1. +3
    -0
      WHATSNEW
  2. +4
    -2
      src/main/org/apache/tools/ant/filters/ReplaceTokens.java

+ 3
- 0
WHATSNEW View File

@@ -90,6 +90,9 @@ Fixed bugs:
* <tar> and <zip> didn't honor the defaultexcludes attribute for the
implicit fileset. Bugzilla Report 18637.

* The <replacetokens> filter would throw an exception if the token's
value was an empty string. Bugzilla Report 18625.

Other changes:
--------------
* Shipped XML parser is now Xerces 2.4.0


+ 4
- 2
src/main/org/apache/tools/ant/filters/ReplaceTokens.java View File

@@ -190,8 +190,10 @@ public final class ReplaceTokens
final String replaceWith = (String) hash.get(key.toString());
if (replaceWith != null) {
replaceData = replaceWith;
replaceIndex = 0;
if (replaceWith.length() > 0) {
replaceData = replaceWith;
replaceIndex = 0;
}
return read();
} else {
String newData = key.toString() + endToken;


Loading…
Cancel
Save