diff options
author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2008-05-07 00:18:12 +0000 |
---|---|---|
committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2008-05-07 00:18:12 +0000 |
commit | 998631591c593065ebc14c556fbe73b900e18b71 (patch) | |
tree | 6855c130ab313626da16dc5398dd81243aa1cc33 /javax/naming | |
parent | be7ec498b9f7468d6d526c287a774c2be20ac407 (diff) | |
download | classpath-998631591c593065ebc14c556fbe73b900e18b71.tar.gz |
2008-05-07 Andrew John Hughes <gnu_andrew@member.fsf.org>
PR classpath/21869
* javax/accessibility/AccessibleRelationSet.java,
* javax/accessibility/AccessibleStateSet.java,
* javax/imageio/plugins/jpeg/JPEGHuffmanTable.java,
* javax/imageio/plugins/jpeg/JPEGQTable.java,
* javax/imageio/stream/ImageInputStreamImpl.java,
* javax/management/ObjectName.java,
* javax/naming/BinaryRefAddr.java,
* javax/naming/CompositeName.java,
* javax/naming/CompoundName.java,
* javax/naming/NamingException.java,
* javax/naming/spi/NamingManager.java,
* javax/security/auth/x500/X500Principal.java,
* javax/security/sasl/SaslException.java,
* javax/sound/sampled/AudioFormat.java,
* javax/sound/sampled/CompoundControl.java,
* javax/sound/sampled/DataLine.java:
Swap use of StringBuffer for CPStringBuilder.
Diffstat (limited to 'javax/naming')
-rw-r--r-- | javax/naming/BinaryRefAddr.java | 4 | ||||
-rw-r--r-- | javax/naming/CompositeName.java | 6 | ||||
-rw-r--r-- | javax/naming/CompoundName.java | 6 | ||||
-rw-r--r-- | javax/naming/NamingException.java | 4 | ||||
-rw-r--r-- | javax/naming/spi/NamingManager.java | 4 |
5 files changed, 17 insertions, 7 deletions
diff --git a/javax/naming/BinaryRefAddr.java b/javax/naming/BinaryRefAddr.java index 0b813abc3..923c48e23 100644 --- a/javax/naming/BinaryRefAddr.java +++ b/javax/naming/BinaryRefAddr.java @@ -37,6 +37,8 @@ exception statement from your version. */ package javax.naming; +import gnu.java.lang.CPStringBuilder; + import java.util.Arrays; /** @@ -139,7 +141,7 @@ public class BinaryRefAddr extends RefAddr */ public String toString() { - StringBuffer sb = new StringBuffer("[RefAddr type: "); + CPStringBuilder sb = new CPStringBuilder("[RefAddr type: "); sb.append(getType()); sb.append(" content: 0x"); byte[] b = (byte[]) getContent(); diff --git a/javax/naming/CompositeName.java b/javax/naming/CompositeName.java index 7227f9d78..4593bae63 100644 --- a/javax/naming/CompositeName.java +++ b/javax/naming/CompositeName.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.naming; +import gnu.java.lang.CPStringBuilder; + import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; @@ -85,7 +87,7 @@ public class CompositeName implements Name, Cloneable, Serializable final char no_quote = 'x'; // Use 'x' to mean no quoting. char quote = no_quote; boolean escaped = false; - StringBuffer new_element = new StringBuffer (); + StringBuilder new_element = new StringBuilder (); for (int i = 0; i < n.length (); ++i) { char c = n.charAt (i); @@ -294,7 +296,7 @@ public class CompositeName implements Name, Cloneable, Serializable public String toString () { - StringBuffer result = new StringBuffer (); + CPStringBuilder result = new CPStringBuilder (); for (int i = 0; i < elts.size (); ++i) { // For simplicity we choose to always quote using escapes and diff --git a/javax/naming/CompoundName.java b/javax/naming/CompoundName.java index f345d3efd..26b44c16f 100644 --- a/javax/naming/CompoundName.java +++ b/javax/naming/CompoundName.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.naming; +import gnu.java.lang.CPStringBuilder; + import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; @@ -95,7 +97,7 @@ public class CompoundName implements Name, Cloneable, Serializable mySyntax = syntax; initializeSyntax (); - StringBuffer new_element = new StringBuffer (); + StringBuilder new_element = new StringBuilder (); int i = 0; // QUOTE==null means no quoting right now. When it is set it is // the value of the closing quote. @@ -376,7 +378,7 @@ public class CompoundName implements Name, Cloneable, Serializable public String toString () { - StringBuffer result = new StringBuffer (); + CPStringBuilder result = new CPStringBuilder (); int size = elts.size (); for (int i = 0; i < size; ++i) { diff --git a/javax/naming/NamingException.java b/javax/naming/NamingException.java index dbe1e3792..7a5c35eb5 100644 --- a/javax/naming/NamingException.java +++ b/javax/naming/NamingException.java @@ -37,6 +37,8 @@ exception statement from your version. */ package javax.naming; +import gnu.java.lang.CPStringBuilder; + import java.io.PrintStream; import java.io.PrintWriter; @@ -237,7 +239,7 @@ public class NamingException extends Exception */ public String toString(boolean objectInfo) { - StringBuffer sb = new StringBuffer(super.toString()); + CPStringBuilder sb = new CPStringBuilder(super.toString()); Throwable cause = getRootCause(); if (cause != null) { diff --git a/javax/naming/spi/NamingManager.java b/javax/naming/spi/NamingManager.java index 3dfba0f66..cc8d46fa4 100644 --- a/javax/naming/spi/NamingManager.java +++ b/javax/naming/spi/NamingManager.java @@ -41,6 +41,8 @@ package javax.naming.spi; import gnu.classpath.VMStackWalker; +import gnu.java.lang.CPStringBuilder; + import java.util.Enumeration; import java.util.Hashtable; import java.util.StringTokenizer; @@ -197,7 +199,7 @@ public class NamingManager // The final default location, as specified in the documentation. String finalPrefix = "com.sun.jndi.url"; - StringBuffer allPrefixes = new StringBuffer(); + CPStringBuilder allPrefixes = new CPStringBuilder(); String prefixes; if (environment != null) |