| @@ -140,7 +140,7 @@ public class DefaultLogger implements BuildLogger { | |||||
| String msg1 = error.toString(); | String msg1 = error.toString(); | ||||
| String msg2 = cause.toString(); | String msg2 = cause.toString(); | ||||
| if (msg1.endsWith(msg2)) { | if (msg1.endsWith(msg2)) { | ||||
| m.append(msg1.substring(0, msg1.length() - msg2.length())); | |||||
| m.append(msg1, 0, msg1.length() - msg2.length()); | |||||
| error = cause; | error = cause; | ||||
| } else { | } else { | ||||
| break; | break; | ||||
| @@ -380,7 +380,7 @@ public class TokenFilter extends BaseFilterReader | |||||
| while (found >= 0) { | while (found >= 0) { | ||||
| // write everything up to the from | // write everything up to the from | ||||
| if (found > start) { | if (found > start) { | ||||
| ret.append(line.substring(start, found)); | |||||
| ret.append(line, start, found); | |||||
| } | } | ||||
| // write the replacement to | // write the replacement to | ||||
| @@ -177,7 +177,7 @@ public class KeySubst extends Task { | |||||
| while ((index = origString.indexOf("${", i)) > -1) { | while ((index = origString.indexOf("${", i)) > -1) { | ||||
| key = origString.substring(index + 2, origString.indexOf("}", | key = origString.substring(index + 2, origString.indexOf("}", | ||||
| index + 3)); | index + 3)); | ||||
| finalString.append(origString.substring(i, index)); | |||||
| finalString.append(origString, i, index); | |||||
| if (keys.containsKey(key)) { | if (keys.containsKey(key)) { | ||||
| finalString.append(keys.get(key)); | finalString.append(keys.get(key)); | ||||
| } else { | } else { | ||||
| @@ -536,7 +536,7 @@ public class FilterSet extends DataType implements Cloneable { | |||||
| } | } | ||||
| String token = | String token = | ||||
| line.substring(index + beginToken.length(), endIndex); | line.substring(index + beginToken.length(), endIndex); | ||||
| b.append(line.substring(i, index)); | |||||
| b.append(line, i, index); | |||||
| if (tokens.containsKey(token)) { | if (tokens.containsKey(token)) { | ||||
| String value = tokens.get(token); | String value = tokens.get(token); | ||||
| if (recurse && !value.equals(token)) { | if (recurse && !value.equals(token)) { | ||||
| @@ -554,7 +554,7 @@ public class LayoutPreservingProperties extends Properties { | |||||
| } | } | ||||
| final int p = forEscaping.indexOf(c); | final int p = forEscaping.indexOf(c); | ||||
| if (p != -1) { | if (p != -1) { | ||||
| buffy.append("\\").append(escaped.substring(p, p + 1)); | |||||
| buffy.append("\\").append(escaped, p, p + 1); | |||||
| } else if (c < 0x0020 || c > 0x007e) { | } else if (c < 0x0020 || c > 0x007e) { | ||||
| buffy.append(escapeUnicode(c)); | buffy.append(escapeUnicode(c)); | ||||
| } else { | } else { | ||||
| @@ -57,7 +57,7 @@ public class SmtpResponseReader { | |||||
| String line = reader.readLine(); | String line = reader.readLine(); | ||||
| // CheckStyle:MagicNumber OFF | // CheckStyle:MagicNumber OFF | ||||
| if (line != null && line.length() >= 3) { | if (line != null && line.length() >= 3) { | ||||
| result.append(line.substring(0, 3)); | |||||
| result.append(line, 0, 3); | |||||
| result.append(" "); | result.append(" "); | ||||
| } | } | ||||
| // CheckStyle:MagicNumber ON | // CheckStyle:MagicNumber ON | ||||