This moves more classes from StringBuilder to CPStringBuilder. ChangeLog:
2008-03-16 Andrew John Hughes <[EMAIL PROTECTED]> PR classpath/21869 * gnu/java/security/Engine.java, * gnu/java/security/hash/Whirlpool.java, * gnu/java/security/key/dss/DSSKey.java, * gnu/java/security/key/dss/DSSPrivateKey.java, * gnu/java/security/key/dss/DSSPublicKey.java, * gnu/java/security/key/rsa/GnuRSAKey.java, * gnu/java/security/key/rsa/GnuRSAPrivateKey.java, * gnu/java/security/key/rsa/GnuRSAPublicKey.java, * java/awt/datatransfer/MimeType.java, * java/io/BufferedReader.java, * java/io/DataInputStream.java, * java/lang/Double.java, * java/lang/Float.java, * java/lang/String.java, * java/lang/reflect/Proxy.java, * java/math/BigDecimal.java, * java/net/URI.java, * java/net/URLClassLoader.java, * java/net/URLEncoder.java: Use CPStringBuilder in preference to StringBuilder. -- Andrew :) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
Index: gnu/java/security/Engine.java =================================================================== RCS file: /sources/classpath/classpath/gnu/java/security/Engine.java,v retrieving revision 1.8 diff -u -3 -p -u -r1.8 Engine.java --- gnu/java/security/Engine.java 9 Jan 2008 20:42:38 -0000 1.8 +++ gnu/java/security/Engine.java 16 Mar 2008 21:59:54 -0000 @@ -37,6 +37,8 @@ exception statement from your version. * package gnu.java.security; +import gnu.java.lang.CPStringBuilder; + import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; @@ -150,7 +152,7 @@ public final class Engine String alias; int count = 0; boolean algorithmFound = false; - StringBuilder sb = new StringBuilder(); + CPStringBuilder sb = new CPStringBuilder(); while (enumer.hasMoreElements()) { key = (String) enumer.nextElement(); Index: gnu/java/security/hash/Whirlpool.java =================================================================== RCS file: /sources/classpath/classpath/gnu/java/security/hash/Whirlpool.java,v retrieving revision 1.6 diff -u -3 -p -u -r1.6 Whirlpool.java --- gnu/java/security/hash/Whirlpool.java 25 Jun 2006 22:45:27 -0000 1.6 +++ gnu/java/security/hash/Whirlpool.java 16 Mar 2008 21:59:54 -0000 @@ -38,6 +38,8 @@ exception statement from your version. package gnu.java.security.hash; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Configuration; import gnu.java.security.Registry; import gnu.java.security.util.Util; @@ -177,10 +179,10 @@ public final class Whirlpool { log.fine("Static data"); log.fine("T0[]:"); - StringBuilder sb; + CPStringBuilder sb; for (i = 0; i < 64; i++) { - sb = new StringBuilder(); + sb = new CPStringBuilder(); for (j = 0; j < 4; j++) sb.append("0x").append(Util.toString(T0[i * 4 + j])).append(", "); @@ -189,7 +191,7 @@ public final class Whirlpool log.fine("T1[]:"); for (i = 0; i < 64; i++) { - sb = new StringBuilder(); + sb = new CPStringBuilder(); for (j = 0; j < 4; j++) sb.append("0x").append(Util.toString(T1[i * 4 + j])).append(", "); @@ -198,7 +200,7 @@ public final class Whirlpool log.fine("T2[]:"); for (i = 0; i < 64; i++) { - sb = new StringBuilder(); + sb = new CPStringBuilder(); for (j = 0; j < 4; j++) sb.append("0x").append(Util.toString(T2[i * 4 + j])).append(", "); @@ -207,7 +209,7 @@ public final class Whirlpool log.fine("T3[]:"); for (i = 0; i < 64; i++) { - sb = new StringBuilder(); + sb = new CPStringBuilder(); for (j = 0; j < 4; j++) sb.append("0x").append(Util.toString(T3[i * 4 + j])).append(", "); @@ -216,7 +218,7 @@ public final class Whirlpool log.fine("\nT4[]:"); for (i = 0; i < 64; i++) { - sb = new StringBuilder(); + sb = new CPStringBuilder(); for (j = 0; j < 4; j++) sb.append("0x").append(Util.toString(T4[i * 4 + j])).append(", "); @@ -225,7 +227,7 @@ public final class Whirlpool log.fine("T5[]:"); for (i = 0; i < 64; i++) { - sb = new StringBuilder(); + sb = new CPStringBuilder(); for (j = 0; j < 4; j++) sb.append("0x").append(Util.toString(T5[i * 4 + j])).append(", "); @@ -234,7 +236,7 @@ public final class Whirlpool log.fine("T6[]:"); for (i = 0; i < 64; i++) { - sb = new StringBuilder(); + sb = new CPStringBuilder(); for (j = 0; j < 4; j++) sb.append("0x").append(Util.toString(T5[i * 4 + j])).append(", "); @@ -243,7 +245,7 @@ public final class Whirlpool log.fine("T7[]:"); for (i = 0; i < 64; i++) { - sb = new StringBuilder(); + sb = new CPStringBuilder(); for (j = 0; j < 4; j++) sb.append("0x").append(Util.toString(T5[i * 4 + j])).append(", "); Index: gnu/java/security/key/dss/DSSKey.java =================================================================== RCS file: /sources/classpath/classpath/gnu/java/security/key/dss/DSSKey.java,v retrieving revision 1.10 diff -u -3 -p -u -r1.10 DSSKey.java --- gnu/java/security/key/dss/DSSKey.java 5 Aug 2006 03:23:27 -0000 1.10 +++ gnu/java/security/key/dss/DSSKey.java 16 Mar 2008 21:59:54 -0000 @@ -38,6 +38,8 @@ exception statement from your version. package gnu.java.security.key.dss; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Registry; import gnu.java.security.action.GetPropertyAction; import gnu.java.security.util.FormatUtil; @@ -181,7 +183,7 @@ public abstract class DSSKey if (str == null) { String ls = (String) AccessController.doPrivileged(new GetPropertyAction("line.separator")); - StringBuilder sb = new StringBuilder(ls) + CPStringBuilder sb = new CPStringBuilder(ls) .append("defaultFormat=").append(defaultFormat).append(",") .append(ls); if (hasInheritedParameters()) Index: gnu/java/security/key/dss/DSSPrivateKey.java =================================================================== RCS file: /sources/classpath/classpath/gnu/java/security/key/dss/DSSPrivateKey.java,v retrieving revision 1.8 diff -u -3 -p -u -r1.8 DSSPrivateKey.java --- gnu/java/security/key/dss/DSSPrivateKey.java 11 Jul 2006 16:04:00 -0000 1.8 +++ gnu/java/security/key/dss/DSSPrivateKey.java 16 Mar 2008 21:59:58 -0000 @@ -38,6 +38,8 @@ exception statement from your version. package gnu.java.security.key.dss; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Configuration; import gnu.java.security.Registry; import gnu.java.security.action.GetPropertyAction; @@ -191,7 +193,7 @@ public class DSSPrivateKey { String ls = (String) AccessController.doPrivileged (new GetPropertyAction("line.separator")); - str = new StringBuilder(this.getClass().getName()).append("(") + str = new CPStringBuilder(this.getClass().getName()).append("(") .append(super.toString()).append(",").append(ls) .append("x=0x").append(Configuration.DEBUG ? x.toString(16) : "**...*").append(ls) Index: gnu/java/security/key/dss/DSSPublicKey.java =================================================================== RCS file: /sources/classpath/classpath/gnu/java/security/key/dss/DSSPublicKey.java,v retrieving revision 1.6 diff -u -3 -p -u -r1.6 DSSPublicKey.java --- gnu/java/security/key/dss/DSSPublicKey.java 11 Jul 2006 16:04:00 -0000 1.6 +++ gnu/java/security/key/dss/DSSPublicKey.java 16 Mar 2008 21:59:58 -0000 @@ -38,6 +38,8 @@ exception statement from your version. package gnu.java.security.key.dss; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Registry; import gnu.java.security.action.GetPropertyAction; import gnu.java.security.key.IKeyPairCodec; @@ -190,7 +192,7 @@ public class DSSPublicKey { String ls = (String) AccessController.doPrivileged (new GetPropertyAction("line.separator")); - str = new StringBuilder(this.getClass().getName()).append("(") + str = new CPStringBuilder(this.getClass().getName()).append("(") .append(super.toString()).append(",").append(ls) .append("y=0x").append(y.toString(16)).append(ls) .append(")") Index: gnu/java/security/key/rsa/GnuRSAKey.java =================================================================== RCS file: /sources/classpath/classpath/gnu/java/security/key/rsa/GnuRSAKey.java,v retrieving revision 1.7 diff -u -3 -p -u -r1.7 GnuRSAKey.java --- gnu/java/security/key/rsa/GnuRSAKey.java 11 Jul 2006 16:04:00 -0000 1.7 +++ gnu/java/security/key/rsa/GnuRSAKey.java 16 Mar 2008 21:59:58 -0000 @@ -38,6 +38,8 @@ exception statement from your version. package gnu.java.security.key.rsa; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Registry; import gnu.java.security.action.GetPropertyAction; import gnu.java.security.util.FormatUtil; @@ -163,7 +165,7 @@ public abstract class GnuRSAKey { String ls = (String) AccessController.doPrivileged (new GetPropertyAction("line.separator")); - str = new StringBuilder(ls) + str = new CPStringBuilder(ls) .append("defaultFormat=").append(defaultFormat).append(",").append(ls) .append("n=0x").append(n.toString(16)).append(",").append(ls) .append("e=0x").append(e.toString(16)) Index: gnu/java/security/key/rsa/GnuRSAPrivateKey.java =================================================================== RCS file: /sources/classpath/classpath/gnu/java/security/key/rsa/GnuRSAPrivateKey.java,v retrieving revision 1.9 diff -u -3 -p -u -r1.9 GnuRSAPrivateKey.java --- gnu/java/security/key/rsa/GnuRSAPrivateKey.java 11 Jul 2006 16:04:00 -0000 1.9 +++ gnu/java/security/key/rsa/GnuRSAPrivateKey.java 16 Mar 2008 21:59:58 -0000 @@ -38,6 +38,8 @@ exception statement from your version. package gnu.java.security.key.rsa; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Configuration; import gnu.java.security.action.GetPropertyAction; import gnu.java.security.Registry; @@ -289,7 +291,7 @@ public class GnuRSAPrivateKey { String ls = (String) AccessController.doPrivileged (new GetPropertyAction("line.separator")); - str = new StringBuilder(this.getClass().getName()).append("(") + str = new CPStringBuilder(this.getClass().getName()).append("(") .append(super.toString()).append(",").append(ls) .append("d=0x").append(Configuration.DEBUG ? d.toString(16) : "**...*").append(ls) Index: gnu/java/security/key/rsa/GnuRSAPublicKey.java =================================================================== RCS file: /sources/classpath/classpath/gnu/java/security/key/rsa/GnuRSAPublicKey.java,v retrieving revision 1.6 diff -u -3 -p -u -r1.6 GnuRSAPublicKey.java --- gnu/java/security/key/rsa/GnuRSAPublicKey.java 11 Jul 2006 16:04:00 -0000 1.6 +++ gnu/java/security/key/rsa/GnuRSAPublicKey.java 16 Mar 2008 21:59:58 -0000 @@ -38,6 +38,8 @@ exception statement from your version. package gnu.java.security.key.rsa; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Registry; import gnu.java.security.action.GetPropertyAction; import gnu.java.security.key.IKeyPairCodec; @@ -178,7 +180,7 @@ public class GnuRSAPublicKey { String ls = (String) AccessController.doPrivileged (new GetPropertyAction("line.separator")); - str = new StringBuilder(this.getClass().getName()).append("(") + str = new CPStringBuilder(this.getClass().getName()).append("(") .append(super.toString()).append(",").append(ls) .append(")") .toString(); Index: java/awt/datatransfer/MimeType.java =================================================================== RCS file: /sources/classpath/classpath/java/awt/datatransfer/MimeType.java,v retrieving revision 1.1 diff -u -3 -p -u -r1.1 MimeType.java --- java/awt/datatransfer/MimeType.java 30 Oct 2006 13:19:49 -0000 1.1 +++ java/awt/datatransfer/MimeType.java 16 Mar 2008 21:59:59 -0000 @@ -38,6 +38,8 @@ exception statement from your version. * package java.awt.datatransfer; +import gnu.java.lang.CPStringBuilder; + import java.io.Externalizable; import java.io.IOException; import java.io.ObjectInput; @@ -224,7 +226,7 @@ class MimeType */ public String toString() { - StringBuilder s = new StringBuilder(); + CPStringBuilder s = new CPStringBuilder(); s.append(primaryType); s.append('/'); s.append(subType); Index: java/io/BufferedReader.java =================================================================== RCS file: /sources/classpath/classpath/java/io/BufferedReader.java,v retrieving revision 1.28 diff -u -3 -p -u -r1.28 BufferedReader.java --- java/io/BufferedReader.java 5 Feb 2008 14:59:04 -0000 1.28 +++ java/io/BufferedReader.java 16 Mar 2008 21:59:59 -0000 @@ -39,6 +39,8 @@ exception statement from your version. * package java.io; +import gnu.java.lang.CPStringBuilder; + /* Written using "Java Class Libraries", 2nd edition, plus online * API docs for JDK 1.2 beta from http://www.javasoft.com. * Status: Believed complete and correct. @@ -450,7 +452,7 @@ public class BufferedReader extends Read pos++; return str; } - StringBuilder sbuf = new StringBuilder(200); + CPStringBuilder sbuf = new CPStringBuilder(200); sbuf.append(buffer, pos, i - pos); pos = i; // We only want to return null when no characters were read before Index: java/io/DataInputStream.java =================================================================== RCS file: /sources/classpath/classpath/java/io/DataInputStream.java,v retrieving revision 1.33 diff -u -3 -p -u -r1.33 DataInputStream.java --- java/io/DataInputStream.java 5 Feb 2008 14:59:04 -0000 1.33 +++ java/io/DataInputStream.java 16 Mar 2008 21:59:59 -0000 @@ -38,6 +38,8 @@ exception statement from your version. * package java.io; +import gnu.java.lang.CPStringBuilder; + /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 * "The Java Language Specification", ISBN 0-201-63451-1 * plus online API docs for JDK 1.2 beta from http://www.javasoft.com. @@ -350,7 +352,7 @@ public class DataInputStream extends Fil */ public final String readLine() throws IOException { - StringBuilder strb = new StringBuilder(); + CPStringBuilder strb = new CPStringBuilder(); while (true) { @@ -747,7 +749,7 @@ public class DataInputStream extends Fil { // Give StringBuffer an initial estimated size to avoid // enlarge buffer frequently - StringBuilder strbuf = new StringBuilder (buf.length / 2 + 2); + CPStringBuilder strbuf = new CPStringBuilder (buf.length / 2 + 2); for (int i = 0; i < buf.length; ) { Index: java/lang/Double.java =================================================================== RCS file: /sources/classpath/classpath/java/lang/Double.java,v retrieving revision 1.44 diff -u -3 -p -u -r1.44 Double.java --- java/lang/Double.java 8 Feb 2008 16:39:30 -0000 1.44 +++ java/lang/Double.java 16 Mar 2008 22:00:00 -0000 @@ -38,6 +38,7 @@ exception statement from your version. * package java.lang; +import gnu.java.lang.CPStringBuilder; /** * Instances of class <code>Double</code> represent primitive @@ -201,7 +202,7 @@ public final class Double extends Number return d < 0 ? "-Infinity" : "Infinity"; long bits = doubleToLongBits(d); - StringBuilder result = new StringBuilder(); + CPStringBuilder result = new CPStringBuilder(); if (bits < 0) result.append('-'); Index: java/lang/Float.java =================================================================== RCS file: /sources/classpath/classpath/java/lang/Float.java,v retrieving revision 1.38 diff -u -3 -p -u -r1.38 Float.java --- java/lang/Float.java 8 Feb 2008 18:18:31 -0000 1.38 +++ java/lang/Float.java 16 Mar 2008 22:00:00 -0000 @@ -39,6 +39,8 @@ exception statement from your version. * package java.lang; +import gnu.java.lang.CPStringBuilder; + /** * Instances of class <code>Float</code> represent primitive * <code>float</code> values. @@ -211,7 +213,7 @@ public final class Float extends Number return f < 0 ? "-Infinity" : "Infinity"; int bits = floatToIntBits(f); - StringBuilder result = new StringBuilder(); + CPStringBuilder result = new CPStringBuilder(); if (bits < 0) result.append('-'); Index: java/lang/String.java =================================================================== RCS file: /sources/classpath/classpath/java/lang/String.java,v retrieving revision 1.88 diff -u -3 -p -u -r1.88 String.java --- java/lang/String.java 7 Feb 2008 17:09:04 -0000 1.88 +++ java/lang/String.java 16 Mar 2008 22:00:00 -0000 @@ -40,6 +40,7 @@ exception statement from your version. * package java.lang; import gnu.java.lang.CharData; +import gnu.java.lang.CPStringBuilder; import java.io.Serializable; import java.io.UnsupportedEncodingException; @@ -2072,7 +2073,7 @@ public final class String int replaceLength = replacement.length(); int startPos = this.indexOf(targetString); - StringBuilder result = new StringBuilder(this); + CPStringBuilder result = new CPStringBuilder(this); while (startPos != -1) { // Replace the target with the replacement Index: java/lang/reflect/Proxy.java =================================================================== RCS file: /sources/classpath/classpath/java/lang/reflect/Proxy.java,v retrieving revision 1.29 diff -u -3 -p -u -r1.29 Proxy.java --- java/lang/reflect/Proxy.java 5 Feb 2008 14:59:05 -0000 1.29 +++ java/lang/reflect/Proxy.java 16 Mar 2008 22:00:01 -0000 @@ -38,6 +38,8 @@ exception statement from your version. * package java.lang.reflect; +import gnu.java.lang.CPStringBuilder; + import gnu.java.lang.reflect.TypeSignature; import java.io.Serializable; @@ -1033,7 +1035,7 @@ public class Proxy implements Serializab code_length += 9; // new, dup_x1, swap, invokespecial, athrow } int handler_pc = code_length - 1; - StringBuilder signature = new StringBuilder("("); + CPStringBuilder signature = new CPStringBuilder("("); for (int j = 0; j < paramtypes.length; j++) signature.append(TypeSignature.getEncodingOfClass(paramtypes[j])); signature.append(")").append(TypeSignature.getEncodingOfClass(ret_type)); @@ -1492,7 +1494,7 @@ public class Proxy implements Serializab if (i == len) return str; - final StringBuilder sb = new StringBuilder(str); + final CPStringBuilder sb = new CPStringBuilder(str); sb.setLength(i); for ( ; i < len; i++) { Index: java/math/BigDecimal.java =================================================================== RCS file: /sources/classpath/classpath/java/math/BigDecimal.java,v retrieving revision 1.25 diff -u -3 -p -u -r1.25 BigDecimal.java --- java/math/BigDecimal.java 10 Dec 2006 20:25:45 -0000 1.25 +++ java/math/BigDecimal.java 16 Mar 2008 22:00:01 -0000 @@ -37,6 +37,8 @@ exception statement from your version. * package java.math; +import gnu.java.lang.CPStringBuilder; + public class BigDecimal extends Number implements Comparable<BigDecimal> { private BigInteger intVal; @@ -451,7 +453,7 @@ public class BigDecimal extends Number i // val is a StringBuilder from which we'll create a BigInteger // which will be the unscaled value for this BigDecimal - StringBuilder val = new StringBuilder(point - start - 1); + CPStringBuilder val = new CPStringBuilder(point - start - 1); if (dot != -1) { // If there was a decimal we must combine the two parts that @@ -1070,7 +1072,7 @@ public class BigDecimal extends Number i boolean negative = (bigStr.charAt(0) == '-'); int point = bigStr.length() - scale - (negative ? 1 : 0); - StringBuilder val = new StringBuilder(); + CPStringBuilder val = new CPStringBuilder(); if (scale >= 0 && (point - 1) >= -6) { @@ -1137,7 +1139,7 @@ public class BigDecimal extends Number i // This is the adjusted exponent described above. int adjExp = point - 1; - StringBuilder val = new StringBuilder(); + CPStringBuilder val = new CPStringBuilder(); if (scale >= 0 && adjExp >= -6) { Index: java/net/URI.java =================================================================== RCS file: /sources/classpath/classpath/java/net/URI.java,v retrieving revision 1.23 diff -u -3 -p -u -r1.23 URI.java --- java/net/URI.java 21 Feb 2008 21:30:10 -0000 1.23 +++ java/net/URI.java 16 Mar 2008 22:00:02 -0000 @@ -38,6 +38,8 @@ exception statement from your version. * package java.net; +import gnu.java.lang.CPStringBuilder; + import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; @@ -483,7 +485,7 @@ public final class URI */ private static String quote(String str, String legalCharacters) { - StringBuilder sb = new StringBuilder(str.length()); + CPStringBuilder sb = new CPStringBuilder(str.length()); for (int i = 0; i < str.length(); i++) { char c = str.charAt(i); @@ -778,8 +780,8 @@ public final class URI This follows the algorithm in section 5.2.4. of RFC3986, but doesn't modify the input buffer. */ - StringBuilder input = new StringBuilder(relativePath); - StringBuilder output = new StringBuilder(); + CPStringBuilder input = new CPStringBuilder(relativePath); + CPStringBuilder output = new CPStringBuilder(); int start = 0; while (start < input.length()) { @@ -853,7 +855,7 @@ public final class URI * * @param buffer the buffer containing the path. */ - private void removeLastSegment(StringBuilder buffer) + private void removeLastSegment(CPStringBuilder buffer) { int lastSlash = buffer.lastIndexOf("/"); if (lastSlash == -1) @@ -899,7 +901,7 @@ public final class URI path = ""; if (! (path.startsWith("/"))) { - StringBuilder basepath = new StringBuilder(this.path); + CPStringBuilder basepath = new CPStringBuilder(this.path); int i = this.path.lastIndexOf('/'); if (i >= 0) @@ -1388,8 +1390,8 @@ public final class URI { String strRep = toString(); boolean inNonAsciiBlock = false; - StringBuilder buffer = new StringBuilder(); - StringBuilder encBuffer = null; + CPStringBuilder buffer = new CPStringBuilder(); + CPStringBuilder encBuffer = null; for (int i = 0; i < strRep.length(); i++) { char c = strRep.charAt(i); @@ -1406,7 +1408,7 @@ public final class URI { if (!inNonAsciiBlock) { - encBuffer = new StringBuilder(); + encBuffer = new CPStringBuilder(); inNonAsciiBlock = true; } encBuffer.append(c); @@ -1428,7 +1430,7 @@ public final class URI { try { - StringBuilder sb = new StringBuilder(); + CPStringBuilder sb = new CPStringBuilder(); // this is far from optimal, but it works byte[] utf8 = str.getBytes("utf-8"); for (int j = 0; j < utf8.length; j++) Index: java/net/URLClassLoader.java =================================================================== RCS file: /sources/classpath/classpath/java/net/URLClassLoader.java,v retrieving revision 1.55 diff -u -3 -p -u -r1.55 URLClassLoader.java --- java/net/URLClassLoader.java 5 Feb 2008 14:59:05 -0000 1.55 +++ java/net/URLClassLoader.java 16 Mar 2008 22:00:02 -0000 @@ -39,6 +39,8 @@ exception statement from your version. * package java.net; +import gnu.java.lang.CPStringBuilder; + import gnu.java.net.loader.FileURLLoader; import gnu.java.net.loader.JarURLLoader; import gnu.java.net.loader.RemoteURLLoader; @@ -452,7 +454,7 @@ public class URLClassLoader extends Secu { // Compute the name of the package as it may appear in the // Manifest. - StringBuilder xform = new StringBuilder(name); + CPStringBuilder xform = new CPStringBuilder(name); for (int i = xform.length () - 1; i >= 0; --i) if (xform.charAt(i) == '.') xform.setCharAt(i, '/'); @@ -641,7 +643,7 @@ public class URLClassLoader extends Secu { if (thisString == null) { - StringBuilder sb = new StringBuilder(); + CPStringBuilder sb = new CPStringBuilder(); sb.append(this.getClass().getName()); sb.append("{urls=[" ); URL[] thisURLs = getURLs(); Index: java/net/URLEncoder.java =================================================================== RCS file: /sources/classpath/classpath/java/net/URLEncoder.java,v retrieving revision 1.15 diff -u -3 -p -u -r1.15 URLEncoder.java --- java/net/URLEncoder.java 5 Feb 2008 14:59:05 -0000 1.15 +++ java/net/URLEncoder.java 16 Mar 2008 22:00:02 -0000 @@ -37,6 +37,8 @@ exception statement from your version. * package java.net; +import gnu.java.lang.CPStringBuilder; + import java.io.UnsupportedEncodingException; @@ -113,7 +115,7 @@ public class URLEncoder int start = 0; int i = 0; - StringBuilder result = new StringBuilder(length); + CPStringBuilder result = new CPStringBuilder(length); while (true) { while (i < length && isSafe(s.charAt(i)))
signature.asc
Description: Digital signature