diff options
author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2008-05-05 00:31:16 +0000 |
---|---|---|
committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2008-05-05 00:31:16 +0000 |
commit | e2ad5244af7a35012573c150ef7cbcdd65de287f (patch) | |
tree | 9a18071b58453c8217b43799e7cec5c1c657914d /gnu | |
parent | 94d30171de2375f6bdb70ac6c1745304c828f59f (diff) | |
download | classpath-e2ad5244af7a35012573c150ef7cbcdd65de287f.tar.gz |
2008-05-05 Andrew John Hughes <gnu_andrew@member.fsf.org>
PR classpath/21869
* gnu/CORBA/BigDecimalHelper.java,
* gnu/CORBA/CDR/LittleEndianInputStream.java,
* gnu/CORBA/CDR/Vio.java,
* gnu/CORBA/CDR/gnuRuntime.java,
* gnu/CORBA/GIOP/MessageHeader.java,
* gnu/CORBA/GIOP/RequestHeader.java,
* gnu/CORBA/GIOP/v1_0/ReplyHeader.java,
* gnu/CORBA/GIOP/v1_0/RequestHeader.java,
* gnu/CORBA/IOR.java,
* gnu/CORBA/NamingService/NameParser.java,
* gnu/CORBA/NamingService/NameTransformer.java,
* gnu/CORBA/Poa/gnuPOA.java,
* gnu/CORBA/Poa/gnuServantObject.java:
Swap use of StringBuffer for CPStringBuilder.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/CORBA/BigDecimalHelper.java | 6 | ||||
-rw-r--r-- | gnu/CORBA/CDR/LittleEndianInputStream.java | 6 | ||||
-rw-r--r-- | gnu/CORBA/CDR/Vio.java | 6 | ||||
-rw-r--r-- | gnu/CORBA/CDR/gnuRuntime.java | 4 | ||||
-rw-r--r-- | gnu/CORBA/GIOP/MessageHeader.java | 6 | ||||
-rw-r--r-- | gnu/CORBA/GIOP/RequestHeader.java | 4 | ||||
-rw-r--r-- | gnu/CORBA/GIOP/v1_0/ReplyHeader.java | 4 | ||||
-rw-r--r-- | gnu/CORBA/GIOP/v1_0/RequestHeader.java | 6 | ||||
-rw-r--r-- | gnu/CORBA/IOR.java | 16 | ||||
-rw-r--r-- | gnu/CORBA/NamingService/NameParser.java | 8 | ||||
-rw-r--r-- | gnu/CORBA/NamingService/NameTransformer.java | 8 | ||||
-rw-r--r-- | gnu/CORBA/Poa/gnuPOA.java | 4 | ||||
-rw-r--r-- | gnu/CORBA/Poa/gnuServantObject.java | 6 |
13 files changed, 55 insertions, 29 deletions
diff --git a/gnu/CORBA/BigDecimalHelper.java b/gnu/CORBA/BigDecimalHelper.java index 119db045f..33b74bb77 100644 --- a/gnu/CORBA/BigDecimalHelper.java +++ b/gnu/CORBA/BigDecimalHelper.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.CORBA; +import gnu.java.lang.CPStringBuilder; + import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -135,7 +137,7 @@ public class BigDecimalHelper public static void write(java.io.OutputStream out, BigDecimal x) throws IOException, BadKind { - StringBuffer v = new StringBuffer(x.unscaledValue().toString()); + CPStringBuilder v = new CPStringBuilder(x.unscaledValue().toString()); boolean negative = v.charAt(0) == '-'; @@ -165,7 +167,7 @@ public class BigDecimalHelper */ private static BigDecimal createFixed(int scale, byte[] d) { - StringBuffer s = new StringBuffer(2 * d.length); + CPStringBuilder s = new CPStringBuilder(2 * d.length); int last = d.length - 1; diff --git a/gnu/CORBA/CDR/LittleEndianInputStream.java b/gnu/CORBA/CDR/LittleEndianInputStream.java index a439b658b..93d18fb11 100644 --- a/gnu/CORBA/CDR/LittleEndianInputStream.java +++ b/gnu/CORBA/CDR/LittleEndianInputStream.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.CORBA.CDR; +import gnu.java.lang.CPStringBuilder; + import java.io.EOFException; import java.io.FilterInputStream; import java.io.IOException; @@ -360,7 +362,7 @@ public class LittleEndianInputStream public String readLine() throws IOException { - StringBuffer strb = new StringBuffer(); + CPStringBuilder strb = new CPStringBuilder(); while (true) { @@ -629,4 +631,4 @@ public class LittleEndianInputStream { throw new InternalError(); } -}
\ No newline at end of file +} diff --git a/gnu/CORBA/CDR/Vio.java b/gnu/CORBA/CDR/Vio.java index 67a69b874..86f842c34 100644 --- a/gnu/CORBA/CDR/Vio.java +++ b/gnu/CORBA/CDR/Vio.java @@ -41,6 +41,8 @@ package gnu.CORBA.CDR; import gnu.CORBA.Minor; import gnu.CORBA.ObjectCreator; +import gnu.java.lang.CPStringBuilder; + import org.omg.CORBA.CustomMarshal; import org.omg.CORBA.DataInputStream; import org.omg.CORBA.DataOutputStream; @@ -754,7 +756,7 @@ public abstract class Vio return "null"; else { - StringBuffer b = new StringBuffer("{"); + CPStringBuilder b = new CPStringBuilder("{"); for (int i = 0; i < s.length; i++) { b.append(s[i]); @@ -1469,4 +1471,4 @@ public abstract class Vio return VMVio.allocateObject(clazz, constructor.getDeclaringClass(), constructor); } -}
\ No newline at end of file +} diff --git a/gnu/CORBA/CDR/gnuRuntime.java b/gnu/CORBA/CDR/gnuRuntime.java index 929dc72ec..4af8c6851 100644 --- a/gnu/CORBA/CDR/gnuRuntime.java +++ b/gnu/CORBA/CDR/gnuRuntime.java @@ -40,6 +40,8 @@ package gnu.CORBA.CDR; import gnu.CORBA.Minor; +import gnu.java.lang.CPStringBuilder; + import org.omg.CORBA.LocalObject; import org.omg.CORBA.MARSHAL; @@ -318,7 +320,7 @@ public class gnuRuntime */ public String dump() { - StringBuffer b = new StringBuffer(" Stream content: \n"); + CPStringBuilder b = new CPStringBuilder(" Stream content: \n"); // Sort by position. TreeSet t = new TreeSet(positions.keySet()); diff --git a/gnu/CORBA/GIOP/MessageHeader.java b/gnu/CORBA/GIOP/MessageHeader.java index cac2405fc..f63cbea17 100644 --- a/gnu/CORBA/GIOP/MessageHeader.java +++ b/gnu/CORBA/GIOP/MessageHeader.java @@ -47,6 +47,8 @@ import gnu.CORBA.CDR.LittleEndianOutputStream; import gnu.CORBA.CDR.AbstractDataInput; import gnu.CORBA.CDR.AbstractDataOutput; +import gnu.java.lang.CPStringBuilder; + import org.omg.CORBA.MARSHAL; import org.omg.CORBA.portable.IDLEntity; @@ -286,7 +288,7 @@ public class MessageHeader int minor; if (! Arrays.equals(xMagic, MAGIC)) { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); if (r == - 1) { b.append("Immediate EOF"); @@ -460,4 +462,4 @@ public class MessageHeader throw m; } } -}
\ No newline at end of file +} diff --git a/gnu/CORBA/GIOP/RequestHeader.java b/gnu/CORBA/GIOP/RequestHeader.java index 3cfadfd78..45997ab3d 100644 --- a/gnu/CORBA/GIOP/RequestHeader.java +++ b/gnu/CORBA/GIOP/RequestHeader.java @@ -41,6 +41,8 @@ package gnu.CORBA.GIOP; import gnu.CORBA.CDR.AbstractCdrInput; import gnu.CORBA.CDR.AbstractCdrOutput; +import gnu.java.lang.CPStringBuilder; + import org.omg.CORBA.portable.IDLEntity; /** @@ -123,7 +125,7 @@ public abstract class RequestHeader */ public String bytes(byte[] array) { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); for (int i = 0; i < array.length; i++) { b.append(Integer.toHexString(array[i] & 0xFF)); diff --git a/gnu/CORBA/GIOP/v1_0/ReplyHeader.java b/gnu/CORBA/GIOP/v1_0/ReplyHeader.java index c085c17fb..dcb00c0eb 100644 --- a/gnu/CORBA/GIOP/v1_0/ReplyHeader.java +++ b/gnu/CORBA/GIOP/v1_0/ReplyHeader.java @@ -43,6 +43,8 @@ import gnu.CORBA.CDR.AbstractCdrOutput; import gnu.CORBA.GIOP.ServiceContext; import gnu.CORBA.GIOP.CodeSetServiceContext; +import gnu.java.lang.CPStringBuilder; + /** * The header of the standard reply. * @@ -80,7 +82,7 @@ public class ReplyHeader */ public String contexts() { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); for (int i = 0; i < service_context.length; i++) { b.append(service_context [ i ].toString()); diff --git a/gnu/CORBA/GIOP/v1_0/RequestHeader.java b/gnu/CORBA/GIOP/v1_0/RequestHeader.java index 5cf723cbc..d2bea9d88 100644 --- a/gnu/CORBA/GIOP/v1_0/RequestHeader.java +++ b/gnu/CORBA/GIOP/v1_0/RequestHeader.java @@ -43,6 +43,8 @@ import gnu.CORBA.CDR.AbstractCdrOutput; import gnu.CORBA.GIOP.ServiceContext; import gnu.CORBA.GIOP.CodeSetServiceContext; +import gnu.java.lang.CPStringBuilder; + import org.omg.CORBA.portable.IDLEntity; /** @@ -81,7 +83,7 @@ public class RequestHeader public String bytes(byte[] array) { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); for (int i = 0; i < array.length; i++) { b.append(Integer.toHexString(array [ i ] & 0xFF)); @@ -95,7 +97,7 @@ public class RequestHeader */ public String contexts() { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); for (int i = 0; i < service_context.length; i++) { b.append(service_context [ i ].toString()); diff --git a/gnu/CORBA/IOR.java b/gnu/CORBA/IOR.java index 5e13aecab..7f63471ee 100644 --- a/gnu/CORBA/IOR.java +++ b/gnu/CORBA/IOR.java @@ -45,6 +45,8 @@ import gnu.CORBA.CDR.AbstractCdrOutput; import gnu.CORBA.GIOP.CharSets_OSF; import gnu.CORBA.GIOP.CodeSetServiceContext; +import gnu.java.lang.CPStringBuilder; + import org.omg.CORBA.BAD_PARAM; import org.omg.CORBA.CompletionStatus; import org.omg.CORBA.MARSHAL; @@ -126,7 +128,7 @@ public class IOR */ public String toString() { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); b.append("native " + name(native_set)); if (conversion != null && conversion.length > 0) { @@ -146,7 +148,7 @@ public class IOR */ public String toStringFormatted() { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); b.append("\n Native set " + name(native_set)); if (conversion != null && conversion.length > 0) { @@ -282,7 +284,7 @@ public class IOR */ public String toString() { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); b.append(host); b.append(":"); b.append(port); @@ -591,7 +593,7 @@ public class IOR */ public String toString() { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); b.append(Id); b.append(" at "); b.append(Internet); @@ -618,7 +620,7 @@ public class IOR */ public String toStringFormatted() { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); b.append("\nObject Id:\n "); b.append(Id); b.append("\nObject is accessible at:\n "); @@ -656,7 +658,7 @@ public class IOR _write(out); - StringBuffer b = new StringBuffer("IOR:"); + CPStringBuilder b = new CPStringBuilder("IOR:"); byte[] binary = out.buffer.toByteArray(); String s; @@ -819,4 +821,4 @@ public class IOR } return (int) adler.getValue(); } -}
\ No newline at end of file +} diff --git a/gnu/CORBA/NamingService/NameParser.java b/gnu/CORBA/NamingService/NameParser.java index 205ad8bec..5d4b729a5 100644 --- a/gnu/CORBA/NamingService/NameParser.java +++ b/gnu/CORBA/NamingService/NameParser.java @@ -44,6 +44,8 @@ import gnu.CORBA.IOR; import gnu.CORBA.Unexpected; import gnu.CORBA.Version; +import gnu.java.lang.CPStringBuilder; + import org.omg.CORBA.BAD_PARAM; import org.omg.CORBA.DATA_CONVERSION; import org.omg.CORBA.ORB; @@ -301,7 +303,7 @@ public class NameParser ior.Internet.version = new Version(major, minor); // Then host data goes till '/' or ':'. - StringBuffer bhost = new StringBuffer(corbaloc.length()); + CPStringBuilder bhost = new CPStringBuilder(corbaloc.length()); while (!t[p].equals(":") && !t[p].equals("/") && !t[p].equals(",")) bhost.append(t[p++]); @@ -394,7 +396,7 @@ public class NameParser { InputStreamReader r = new InputStreamReader(u.openStream()); - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); int c; while ((c = r.read()) > 0) @@ -465,7 +467,7 @@ public class NameParser + "' found"); } - StringBuffer bKey = new StringBuffer(); + CPStringBuilder bKey = new CPStringBuilder(); p++; while (p < t.length && !t[p].equals("#")) diff --git a/gnu/CORBA/NamingService/NameTransformer.java b/gnu/CORBA/NamingService/NameTransformer.java index 7109fdb93..132c5dd8f 100644 --- a/gnu/CORBA/NamingService/NameTransformer.java +++ b/gnu/CORBA/NamingService/NameTransformer.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.CORBA.NamingService; +import gnu.java.lang.CPStringBuilder; + import org.omg.CORBA.IntHolder; import org.omg.CosNaming.NameComponent; import org.omg.CosNaming.NamingContextPackage.InvalidName; @@ -125,7 +127,7 @@ public class NameTransformer { NameValidator.check(a_name); - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); NameComponent n; @@ -152,7 +154,7 @@ public class NameTransformer * @param b a buffer to append the contents to. * @param s a string to append. */ - private void appEscaping(StringBuffer b, String s) + private void appEscaping(CPStringBuilder b, String s) { char c; for (int i = 0; i < s.length(); i++) @@ -271,7 +273,7 @@ public class NameTransformer */ private String readPart(IntHolder p, String[] t) { - StringBuffer part = new StringBuffer(); + CPStringBuilder part = new CPStringBuilder(); while (t [ p.value ] != null && !t [ p.value ].equals(".") && !t [ p.value ].equals("/") diff --git a/gnu/CORBA/Poa/gnuPOA.java b/gnu/CORBA/Poa/gnuPOA.java index 82e520904..32fc5bfd2 100644 --- a/gnu/CORBA/Poa/gnuPOA.java +++ b/gnu/CORBA/Poa/gnuPOA.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.CORBA.Poa; +import gnu.java.lang.CPStringBuilder; + import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; @@ -1604,7 +1606,7 @@ public class gnuPOA */ public String toString() { - StringBuffer b = new StringBuffer(name); + CPStringBuilder b = new CPStringBuilder(name); if (children.size() != 0) { diff --git a/gnu/CORBA/Poa/gnuServantObject.java b/gnu/CORBA/Poa/gnuServantObject.java index 115f4f850..7e9b4f2f5 100644 --- a/gnu/CORBA/Poa/gnuServantObject.java +++ b/gnu/CORBA/Poa/gnuServantObject.java @@ -51,6 +51,8 @@ import gnu.CORBA.Unexpected; import gnu.CORBA.ResponseHandlerImpl; import gnu.CORBA.StreamHolder; +import gnu.java.lang.CPStringBuilder; + import org.omg.CORBA.Any; import org.omg.CORBA.BAD_OPERATION; import org.omg.CORBA.BAD_PARAM; @@ -357,7 +359,7 @@ public class gnuServantObject extends ObjectImpl */ public String toString() { - StringBuffer b = new StringBuffer("Servant object ("); + CPStringBuilder b = new CPStringBuilder("Servant object ("); for (int i = 0; i < Id.length; i++) { b.append(Integer.toHexString(Id [ i ] & 0xFF)); @@ -820,4 +822,4 @@ public class gnuServantObject extends ObjectImpl } return super._is_equivalent(other); } -}
\ No newline at end of file +} |