Browse Source

Merge branch '1.9.x'

closes #42 closes #43
master
Stefan Bodewig 7 years ago
parent
commit
b2b058dcf7
2 changed files with 5 additions and 4 deletions
  1. +2
    -2
      src/main/org/apache/tools/ant/Main.java
  2. +3
    -2
      src/main/org/apache/tools/ant/filters/ReplaceTokens.java

+ 2
- 2
src/main/org/apache/tools/ant/Main.java View File

@@ -1284,9 +1284,9 @@ public class Main implements AntMain {
// now, start printing the targets and their descriptions // now, start printing the targets and their descriptions
final String lSep = System.getProperty("line.separator"); final String lSep = System.getProperty("line.separator");
// got a bit annoyed that I couldn't find a pad function // got a bit annoyed that I couldn't find a pad function
String spaces = " ";
StringBuilder spaces = new StringBuilder(" ");
while (spaces.length() <= maxlen) { while (spaces.length() <= maxlen) {
spaces += spaces;
spaces.append(spaces);
} }
final StringBuilder msg = new StringBuilder(); final StringBuilder msg = new StringBuilder();
msg.append(heading).append(lSep).append(lSep); msg.append(heading).append(lSep).append(lSep);


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

@@ -23,6 +23,7 @@ import java.io.InputStream;
import java.io.Reader; import java.io.Reader;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.Hashtable; import java.util.Hashtable;
import java.util.Map;
import java.util.Properties; import java.util.Properties;
import java.util.SortedMap; import java.util.SortedMap;
import java.util.TreeMap; import java.util.TreeMap;
@@ -116,8 +117,8 @@ public final class ReplaceTokens


if (!resolvedTokensBuilt) { if (!resolvedTokensBuilt) {
// build the resolved tokens tree map. // build the resolved tokens tree map.
for (String key : hash.keySet()) {
resolvedTokens.put(beginToken + key + endToken, hash.get(key));
for (Map.Entry<String, String> entry : hash.entrySet()) {
resolvedTokens.put(beginToken + entry.getKey() + endToken, entry.getValue());
} }
resolvedTokensBuilt = true; resolvedTokensBuilt = true;
} }


Loading…
Cancel
Save