changeset 10086:319f26fadef4

8041679: Replace uses of StringBuffer with StringBuilder within core library classes Reviewed-by: psandoz, alanb, xuelei, dfuchs, jfranck, prr, serb, chegar Contributed-by: otaviopolianasantana@gmail.com
author psandoz
date Mon, 16 Jun 2014 17:45:26 +0100
parents c5e7ba8e1d4b
children ade4491b571e
files src/share/classes/com/sun/imageio/plugins/gif/GIFImageReader.java src/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java src/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java src/share/classes/com/sun/java/util/jar/pack/BandStructure.java src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java src/share/classes/com/sun/jmx/snmp/IPAcl/NetMaskImpl.java src/share/classes/com/sun/jmx/snmp/IPAcl/ParseException.java src/share/classes/com/sun/jmx/snmp/IPAcl/SnmpAcl.java src/share/classes/com/sun/jmx/snmp/IPAcl/TokenMgrError.java src/share/classes/com/sun/jmx/snmp/SnmpMessage.java src/share/classes/com/sun/jmx/snmp/SnmpMsg.java src/share/classes/com/sun/jmx/snmp/SnmpOpaque.java src/share/classes/com/sun/jmx/snmp/SnmpV3Message.java src/share/classes/com/sun/jndi/cosnaming/CNNameParser.java src/share/classes/com/sun/jndi/dns/DnsContextFactory.java src/share/classes/com/sun/jndi/dns/DnsName.java src/share/classes/com/sun/jndi/dns/ResourceRecord.java src/share/classes/com/sun/jndi/ldap/ClientId.java src/share/classes/com/sun/jndi/ldap/DigestClientId.java src/share/classes/com/sun/jndi/ldap/LdapSchemaParser.java src/share/classes/com/sun/jndi/ldap/ServiceLocator.java src/share/classes/com/sun/jndi/ldap/sasl/DefaultCallbackHandler.java src/share/classes/com/sun/jndi/toolkit/dir/SearchFilter.java src/share/classes/com/sun/media/sound/SoftPerformer.java src/share/classes/com/sun/media/sound/WaveExtensibleFileReader.java src/share/classes/com/sun/org/apache/xml/internal/security/utils/Base64.java src/share/classes/com/sun/security/sasl/CramMD5Base.java src/share/classes/com/sun/security/sasl/CramMD5Server.java src/share/classes/com/sun/security/sasl/digest/DigestMD5Base.java src/share/classes/com/sun/security/sasl/digest/DigestMD5Server.java src/share/classes/com/sun/security/sasl/util/AbstractSaslImpl.java src/share/classes/com/sun/tools/example/debug/bdi/ExceptionSpec.java src/share/classes/com/sun/tools/example/debug/bdi/LineBreakpointSpec.java src/share/classes/com/sun/tools/example/debug/bdi/MethodBreakpointSpec.java src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java src/share/classes/com/sun/tools/example/debug/expr/ParseException.java src/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java src/share/classes/com/sun/tools/example/debug/gui/CommandInterpreter.java src/share/classes/com/sun/tools/example/debug/gui/ContextManager.java src/share/classes/com/sun/tools/example/debug/gui/SourceModel.java src/share/classes/com/sun/tools/example/debug/tty/BreakpointSpec.java src/share/classes/com/sun/tools/example/debug/tty/Commands.java src/share/classes/com/sun/tools/example/debug/tty/Env.java src/share/classes/com/sun/tools/example/debug/tty/TTY.java src/share/classes/com/sun/tools/example/trace/Trace.java src/share/classes/com/sun/tools/hat/internal/util/Misc.java src/share/classes/com/sun/tools/jdi/FieldImpl.java src/share/classes/com/sun/tools/jdi/JNITypeParser.java src/share/classes/com/sun/tools/jdi/MethodImpl.java src/share/classes/com/sun/tools/jdi/ReferenceTypeImpl.java src/share/classes/com/sun/tools/jdi/SDE.java src/share/classes/com/sun/tools/jdi/TargetVM.java src/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java src/share/classes/java/beans/Introspector.java src/share/classes/java/beans/Statement.java src/share/classes/java/io/RandomAccessFile.java src/share/classes/java/net/IDN.java src/share/classes/java/net/SocketPermission.java src/share/classes/java/net/URI.java src/share/classes/java/net/URISyntaxException.java src/share/classes/java/net/URLDecoder.java src/share/classes/java/net/URLEncoder.java src/share/classes/java/net/URLStreamHandler.java src/share/classes/java/nio/file/InvalidPathException.java src/share/classes/java/rmi/dgc/VMID.java src/share/classes/java/security/CodeSigner.java src/share/classes/java/security/Timestamp.java src/share/classes/java/security/cert/CertPath.java src/share/classes/java/security/cert/CollectionCertStoreParameters.java src/share/classes/java/security/cert/LDAPCertStoreParameters.java src/share/classes/java/security/cert/PKIXBuilderParameters.java src/share/classes/java/security/cert/PKIXCertPathBuilderResult.java src/share/classes/java/security/cert/PKIXCertPathValidatorResult.java src/share/classes/java/security/cert/PKIXParameters.java src/share/classes/java/security/cert/PolicyQualifierInfo.java src/share/classes/java/security/cert/TrustAnchor.java src/share/classes/java/security/cert/X509CRLSelector.java src/share/classes/java/security/cert/X509CertSelector.java src/share/classes/java/text/AttributedString.java src/share/classes/java/text/ChoiceFormat.java src/share/classes/java/util/Properties.java src/share/classes/java/util/prefs/Base64.java src/share/classes/java/util/regex/PatternSyntaxException.java src/share/classes/javax/imageio/stream/ImageInputStreamImpl.java src/share/classes/javax/naming/BinaryRefAddr.java src/share/classes/javax/naming/NameImpl.java src/share/classes/javax/naming/RefAddr.java src/share/classes/javax/naming/Reference.java src/share/classes/javax/naming/directory/BasicAttribute.java src/share/classes/javax/print/MimeType.java src/share/classes/javax/print/attribute/ResolutionSyntax.java src/share/classes/javax/print/attribute/SetOfIntegerSyntax.java src/share/classes/javax/print/attribute/Size2DSyntax.java src/share/classes/javax/security/auth/kerberos/KerberosTicket.java src/share/classes/javax/sound/sampled/CompoundControl.java src/share/classes/javax/sound/sampled/DataLine.java src/share/classes/javax/swing/JColorChooser.java src/share/classes/javax/swing/MultiUIDefaults.java src/share/classes/javax/swing/RepaintManager.java src/share/classes/javax/swing/event/TreeModelEvent.java src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java src/share/classes/javax/swing/plaf/basic/BasicListUI.java src/share/classes/javax/swing/plaf/basic/BasicTableUI.java src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java src/share/classes/javax/swing/plaf/nimbus/State.java src/share/classes/javax/swing/plaf/synth/ParsedSynthStyle.java src/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java src/share/classes/javax/swing/tree/TreePath.java src/share/classes/org/jcp/xml/dsig/internal/dom/DOMExcC14NMethod.java src/share/classes/sun/applet/AppletViewer.java src/share/classes/sun/font/Decoration.java src/share/classes/sun/font/ExtendedTextSourceLabel.java src/share/classes/sun/font/StandardTextSource.java src/share/classes/sun/font/Type1Font.java src/share/classes/sun/java2d/opengl/OGLContext.java src/share/classes/sun/java2d/pipe/Region.java src/share/classes/sun/java2d/pipe/hw/ContextCapabilities.java src/share/classes/sun/jvmstat/monitor/HostIdentifier.java src/share/classes/sun/jvmstat/monitor/MonitoredHost.java src/share/classes/sun/jvmstat/monitor/VmIdentifier.java src/share/classes/sun/management/Agent.java src/share/classes/sun/management/snmp/jvminstr/JvmThreadInstanceEntryImpl.java src/share/classes/sun/misc/MessageUtils.java src/share/classes/sun/misc/UUDecoder.java src/share/classes/sun/net/TransferProtocolClient.java src/share/classes/sun/net/ftp/impl/FtpClient.java src/share/classes/sun/net/www/MimeEntry.java src/share/classes/sun/net/www/http/HttpClient.java src/share/classes/sun/net/www/protocol/file/FileURLConnection.java src/share/classes/sun/net/www/protocol/http/DigestAuthentication.java src/share/classes/sun/nio/ch/ServerSocketChannelImpl.java src/share/classes/sun/nio/ch/SocketChannelImpl.java src/share/classes/sun/print/PSPrinterJob.java src/share/classes/sun/reflect/MethodAccessorGenerator.java src/share/classes/sun/rmi/server/Activation.java src/share/classes/sun/rmi/server/LoaderHandler.java src/share/classes/sun/rmi/server/Util.java src/share/classes/sun/security/acl/AclImpl.java src/share/classes/sun/security/jgss/GSSCredentialImpl.java src/share/classes/sun/security/jgss/GSSHeader.java src/share/classes/sun/security/jgss/GSSToken.java src/share/classes/sun/security/jgss/ProviderList.java src/share/classes/sun/security/jgss/TokenTracker.java src/share/classes/sun/security/jgss/krb5/InitialToken.java src/share/classes/sun/security/jgss/krb5/Krb5Context.java src/share/classes/sun/security/jgss/wrapper/Krb5Util.java src/share/classes/sun/security/jgss/wrapper/NativeGSSContext.java src/share/classes/sun/security/krb5/Credentials.java src/share/classes/sun/security/krb5/KrbException.java src/share/classes/sun/security/krb5/PrincipalName.java src/share/classes/sun/security/krb5/internal/EncTicketPart.java src/share/classes/sun/security/krb5/internal/TicketFlags.java src/share/classes/sun/security/krb5/internal/crypto/EType.java src/share/classes/sun/security/krb5/internal/crypto/dk/DkCrypto.java src/share/classes/sun/security/krb5/internal/ktab/KeyTabEntry.java src/share/classes/sun/security/pkcs/PKCS9Attribute.java src/share/classes/sun/security/pkcs/PKCS9Attributes.java src/share/classes/sun/security/pkcs/SigningCertificateInfo.java src/share/classes/sun/security/pkcs11/wrapper/CK_AES_CTR_PARAMS.java src/share/classes/sun/security/pkcs11/wrapper/CK_DATE.java src/share/classes/sun/security/pkcs11/wrapper/CK_ECDH1_DERIVE_PARAMS.java src/share/classes/sun/security/pkcs11/wrapper/CK_ECDH2_DERIVE_PARAMS.java src/share/classes/sun/security/pkcs11/wrapper/CK_INFO.java src/share/classes/sun/security/pkcs11/wrapper/CK_MECHANISM.java src/share/classes/sun/security/pkcs11/wrapper/CK_MECHANISM_INFO.java src/share/classes/sun/security/pkcs11/wrapper/CK_PBE_PARAMS.java src/share/classes/sun/security/pkcs11/wrapper/CK_PKCS5_PBKD2_PARAMS.java src/share/classes/sun/security/pkcs11/wrapper/CK_RSA_PKCS_OAEP_PARAMS.java src/share/classes/sun/security/pkcs11/wrapper/CK_RSA_PKCS_PSS_PARAMS.java src/share/classes/sun/security/pkcs11/wrapper/CK_SESSION_INFO.java src/share/classes/sun/security/pkcs11/wrapper/CK_SLOT_INFO.java src/share/classes/sun/security/pkcs11/wrapper/CK_TOKEN_INFO.java src/share/classes/sun/security/pkcs11/wrapper/CK_X9_42_DH1_DERIVE_PARAMS.java src/share/classes/sun/security/pkcs11/wrapper/CK_X9_42_DH2_DERIVE_PARAMS.java src/share/classes/sun/security/pkcs11/wrapper/Functions.java src/share/classes/sun/security/provider/AuthPolicyFile.java src/share/classes/sun/security/provider/X509Factory.java src/share/classes/sun/security/smartcardio/PCSC.java src/share/classes/sun/security/ssl/HandshakeMessage.java src/share/classes/sun/security/ssl/SSLSocketImpl.java src/share/classes/sun/security/ssl/ServerNameExtension.java src/share/classes/sun/security/ssl/SessionId.java src/share/classes/sun/security/ssl/SignatureAlgorithmsExtension.java src/share/classes/sun/security/tools/jarsigner/Main.java src/share/classes/sun/security/tools/keytool/Main.java src/share/classes/sun/security/tools/policytool/PolicyTool.java src/share/classes/sun/security/util/Debug.java src/share/classes/sun/security/util/ManifestEntryVerifier.java src/share/classes/sun/security/util/ObjectIdentifier.java src/share/classes/sun/security/util/PropertyExpander.java src/share/classes/sun/security/util/SignatureFileVerifier.java src/share/classes/sun/security/x509/X509CRLImpl.java src/share/classes/sun/swing/SwingUtilities2.java src/share/classes/sun/swing/plaf/synth/DefaultSynthStyle.java src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java src/share/classes/sun/text/normalizer/UTF16.java src/share/classes/sun/tools/java/MemberDefinition.java src/share/classes/sun/tools/java/MethodSet.java src/share/classes/sun/tools/java/MethodType.java src/share/classes/sun/tools/java/Parser.java src/share/classes/sun/tools/java/Type.java src/share/classes/sun/tools/jconsole/Formatter.java src/share/classes/sun/tools/jstatd/RemoteHostImpl.java src/share/classes/sun/tools/native2ascii/N2AFilter.java src/share/classes/sun/tools/serialver/SerialVer.java src/share/classes/sun/tools/tree/FieldExpression.java src/share/classes/sun/tools/tree/Vset.java src/share/classes/sun/tracing/PrintStreamProviderFactory.java
diffstat 212 files changed, 1125 insertions(+), 1125 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/imageio/plugins/gif/GIFImageReader.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/imageio/plugins/gif/GIFImageReader.java	Mon Jun 16 17:45:26 2014 +0100
@@ -509,7 +509,7 @@
             byte[] signature = new byte[6];
             stream.readFully(signature);
 
-            StringBuffer version = new StringBuffer(3);
+            StringBuilder version = new StringBuilder(3);
             version.append((char)signature[3]);
             version.append((char)signature[4]);
             version.append((char)signature[5]);
--- a/src/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java	Mon Jun 16 17:45:26 2014 +0100
@@ -900,7 +900,7 @@
         if (times == 1) {
             return s;
         }
-        StringBuffer sb = new StringBuffer((s.length() + 1)*times - 1);
+        StringBuilder sb = new StringBuilder((s.length() + 1)*times - 1);
         sb.append(s);
         for (int i = 1; i < times; i++) {
             sb.append(" ");
--- a/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java	Mon Jun 16 17:45:26 2014 +0100
@@ -169,23 +169,23 @@
             result.add(typedInName);
         }
 
-        StringBuffer buf = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         len = result.size();
 
         // construct the resulting string
         for (int i=0; i<len; i++) {
             if (i > 0) {
-                buf.append(" ");
+                sb.append(" ");
             }
             if (len > 1) {
-                buf.append("\"");
+                sb.append("\"");
             }
-            buf.append(result.get(i));
+            sb.append(result.get(i));
             if (len > 1) {
-                buf.append("\"");
+                sb.append("\"");
             }
         }
-        return buf.toString();
+        return sb.toString();
     }
 
     public void setFileName(String fileName) {
--- a/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java	Mon Jun 16 17:45:26 2014 +0100
@@ -533,13 +533,13 @@
                     // Pending: verify character encoding spec for gconf
                     Reader reader = new InputStreamReader(url.openStream(), "ISO-8859-1");
                     char[] buf = new char[1024];
-                    StringBuffer strBuf = new StringBuffer();
+                    StringBuilder sb = new StringBuilder();
                     int n;
                     while ((n = reader.read(buf)) >= 0) {
-                        strBuf.append(buf, 0, n);
+                        sb.append(buf, 0, n);
                     }
                     reader.close();
-                    String str = strBuf.toString();
+                    String str = sb.toString();
                     if (str != null) {
                         String strLowerCase = str.toLowerCase();
                         int i = strLowerCase.indexOf("<entry name=\"theme\"");
--- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java	Mon Jun 16 17:45:26 2014 +0100
@@ -121,20 +121,20 @@
     }
 
     private String fileNameString(File[] files) {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (int i = 0; files != null && i < files.length; i++) {
             if (i > 0) {
-                buf.append(" ");
+                sb.append(" ");
             }
             if (files.length > 1) {
-                buf.append("\"");
+                sb.append("\"");
             }
-            buf.append(fileNameString(files[i]));
+            sb.append(fileNameString(files[i]));
             if (files.length > 1) {
-                buf.append("\"");
+                sb.append("\"");
             }
         }
-        return buf.toString();
+        return sb.toString();
     }
 
     public MotifFileChooserUI(JFileChooser filechooser) {
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java	Mon Jun 16 17:45:26 2014 +0100
@@ -690,7 +690,7 @@
     }
 
     private String fileNameString(File[] files) {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         for (int i = 0; files != null && i < files.length; i++) {
             if (i > 0) {
                 buf.append(" ");
--- a/src/share/classes/com/sun/java/util/jar/pack/BandStructure.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/java/util/jar/pack/BandStructure.java	Mon Jun 16 17:45:26 2014 +0100
@@ -628,7 +628,7 @@
             }
             if (metaCoding.length > 0
                 && (verbose > 2 || verbose > 1 && metaCoding.length > 1)) {
-                StringBuffer sb = new StringBuffer();
+                StringBuilder sb = new StringBuilder();
                 for (int i = 0; i < metaCoding.length; i++) {
                     if (i == 1)  sb.append(" /");
                     sb.append(" ").append(metaCoding[i] & 0xFF);
@@ -756,7 +756,7 @@
                          " size="+outputSize()+
                          irr+" coding="+bandCoding);
                 if (metaCoding != noMetaCoding) {
-                    StringBuffer sb = new StringBuffer();
+                    StringBuilder sb = new StringBuilder();
                     for (int i = 0; i < metaCoding.length; i++) {
                         if (i == 1)  sb.append(" /");
                         sb.append(" ").append(metaCoding[i] & 0xFF);
--- a/src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java	Mon Jun 16 17:45:26 2014 +0100
@@ -1026,7 +1026,7 @@
         }
         static
         String stringValueOf(MethodHandleEntry bsmRef, Entry[] argRefs) {
-            StringBuffer sb = new StringBuffer(bsmRef.stringValue());
+            StringBuilder sb = new StringBuilder(bsmRef.stringValue());
             // Arguments are formatted as "<foo;bar;baz>" instead of "[foo,bar,baz]".
             // This ensures there will be no confusion if "[,]" appear inside of names.
             char nextSep = '<';
--- a/src/share/classes/com/sun/jmx/snmp/IPAcl/NetMaskImpl.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/jmx/snmp/IPAcl/NetMaskImpl.java	Mon Jun 16 17:45:26 2014 +0100
@@ -63,12 +63,12 @@
         if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
             SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(),
                 "extractSubNet", "BINARY ARRAY :");
-            StringBuffer buff = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             for(int i =0; i < addrLength; i++) {
-                buff.append((b[i] &0xFF) +":");
+                sb.append((b[i] & 0xFF) + ":");
             }
             SNMP_LOGGER.logp(Level.FINEST, NetMaskImpl.class.getName(),
-                "extractSubNet", buff.toString());
+                "extractSubNet", sb.toString());
         }
 
         // 8 is a byte size. Common to any InetAddress (V4 or V6).
--- a/src/share/classes/com/sun/jmx/snmp/IPAcl/ParseException.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/jmx/snmp/IPAcl/ParseException.java	Mon Jun 16 17:45:26 2014 +0100
@@ -170,7 +170,7 @@
    * string literal.
    */
   protected String add_escapes(String str) {
-      StringBuffer retval = new StringBuffer();
+      StringBuilder retval = new StringBuilder();
       char ch;
       for (int i = 0; i < str.length(); i++) {
         switch (str.charAt(i))
--- a/src/share/classes/com/sun/jmx/snmp/IPAcl/SnmpAcl.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/jmx/snmp/IPAcl/SnmpAcl.java	Mon Jun 16 17:45:26 2014 +0100
@@ -186,8 +186,8 @@
     public static String getDefaultAclFileName() {
         final String fileSeparator =
             System.getProperty("file.separator");
-        final StringBuffer defaultAclName =
-            new StringBuffer(System.getProperty("java.home")).
+        final StringBuilder defaultAclName =
+            new StringBuilder(System.getProperty("java.home")).
             append(fileSeparator).append("lib").append(fileSeparator).
             append("snmp.acl");
         return defaultAclName.toString();
--- a/src/share/classes/com/sun/jmx/snmp/IPAcl/TokenMgrError.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/jmx/snmp/IPAcl/TokenMgrError.java	Mon Jun 16 17:45:26 2014 +0100
@@ -65,7 +65,7 @@
     * equivalents in the given string
     */
    protected static final String addEscapes(String str) {
-      StringBuffer retval = new StringBuffer();
+      StringBuilder retval = new StringBuilder();
       char ch;
       for (int i = 0; i < str.length(); i++) {
         switch (str.charAt(i))
--- a/src/share/classes/com/sun/jmx/snmp/SnmpMessage.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/jmx/snmp/SnmpMessage.java	Mon Jun 16 17:45:26 2014 +0100
@@ -347,7 +347,7 @@
      * @return The string containing the dump.
      */
     public String printMessage() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         if (community == null) {
             sb.append("Community: null") ;
         }
--- a/src/share/classes/com/sun/jmx/snmp/SnmpMsg.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/jmx/snmp/SnmpMsg.java	Mon Jun 16 17:45:26 2014 +0100
@@ -181,22 +181,22 @@
      * @return The string containing the dump.
      */
     public static String dumpHexBuffer(byte [] b, int offset, int len) {
-        StringBuffer buf = new StringBuffer(len << 1) ;
+        StringBuilder sb = new StringBuilder(len << 1) ;
         int k = 1 ;
         int flen = offset + len ;
 
         for (int i = offset; i < flen ; i++) {
             int j = b[i] & 0xFF ;
-            buf.append(Character.forDigit((j >>> 4) , 16)) ;
-            buf.append(Character.forDigit((j & 0x0F), 16)) ;
+            sb.append(Character.forDigit((j >>> 4), 16)) ;
+            sb.append(Character.forDigit((j & 0x0F), 16)) ;
             k++ ;
             if (k%16 == 0) {
-                buf.append('\n') ;
+                sb.append('\n') ;
                 k = 1 ;
             } else
-                buf.append(' ') ;
+                sb.append(' ') ;
         }
-        return buf.toString() ;
+        return sb.toString() ;
     }
 
     /**
@@ -205,7 +205,7 @@
      * @return The string containing the dump.
      */
     public String printMessage() {
-        StringBuffer sb = new StringBuffer() ;
+        StringBuilder sb = new StringBuilder() ;
         sb.append("Version: ") ;
         sb.append(version) ;
         sb.append("\n") ;
--- a/src/share/classes/com/sun/jmx/snmp/SnmpOpaque.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/jmx/snmp/SnmpOpaque.java	Mon Jun 16 17:45:26 2014 +0100
@@ -73,7 +73,7 @@
      * @return The <CODE>String</CODE> representation of the value.
      */
     public String toString() {
-        StringBuffer result = new StringBuffer() ;
+        StringBuilder result = new StringBuilder() ;
         for (int i = 0 ; i < value.length ; i++) {
             byte b = value[i] ;
             int n = (b >= 0) ? b : b + 256 ;
--- a/src/share/classes/com/sun/jmx/snmp/SnmpV3Message.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/jmx/snmp/SnmpV3Message.java	Mon Jun 16 17:45:26 2014 +0100
@@ -478,7 +478,7 @@
      * @return The string containing the dump.
      */
     public String printMessage() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("msgId : " + msgId + "\n");
         sb.append("msgMaxSize : " + msgMaxSize + "\n");
         sb.append("msgFlags : " + msgFlags + "\n");
--- a/src/share/classes/com/sun/jndi/cosnaming/CNNameParser.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/jndi/cosnaming/CNNameParser.java	Mon Jun 16 17:45:26 2014 +0100
@@ -96,7 +96,7 @@
      * Used by CNCtx.getNameInNamespace(), CNCompoundName.toString().
      */
     static String cosNameToInsString(NameComponent[] cname) {
-      StringBuffer str = new StringBuffer();
+      StringBuilder str = new StringBuilder();
       for ( int i = 0; i < cname.length; i++) {
           if ( i > 0) {
               str.append(compSeparator);
@@ -254,7 +254,7 @@
     }
 
     private static String stringifyComponent(NameComponent comp) {
-        StringBuffer one = new StringBuffer(escape(comp.id));
+        StringBuilder one = new StringBuilder(escape(comp.id));
         if (comp.kind != null && !comp.kind.equals("")) {
             one.append(kindSeparator + escape(comp.kind));
         }
--- a/src/share/classes/com/sun/jndi/dns/DnsContextFactory.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/jndi/dns/DnsContextFactory.java	Mon Jun 16 17:45:26 2014 +0100
@@ -198,14 +198,14 @@
             }
         }
 
-        StringBuffer buf = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (int i = 0; i < servers.length; i++) {
             if (i > 0) {
-                buf.append(' ');
+                sb.append(' ');
             }
-            buf.append("dns://").append(servers[i]).append(path);
+            sb.append("dns://").append(servers[i]).append(path);
         }
-        return buf.toString();
+        return sb.toString();
     }
 
     /*
--- a/src/share/classes/com/sun/jndi/dns/DnsName.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/jndi/dns/DnsName.java	Mon Jun 16 17:45:26 2014 +0100
@@ -415,7 +415,7 @@
      */
     private void parse(String name) throws InvalidNameException {
 
-        StringBuffer label = new StringBuffer();        // label being parsed
+        StringBuilder label = new StringBuilder();      // label being parsed
 
         for (int i = 0; i < name.length(); i++) {
             char c = name.charAt(i);
@@ -564,15 +564,15 @@
      * into account.  See compareLabels().
      */
     private static String keyForLabel(String label) {
-        StringBuffer buf = new StringBuffer(label.length());
+        StringBuilder sb = new StringBuilder(label.length());
         for (int i = 0; i < label.length(); i++) {
             char c = label.charAt(i);
             if (c >= 'A' && c <= 'Z') {
                 c += 'a' - 'A';                         // to lower case
             }
-            buf.append(c);
+            sb.append(c);
         }
-        return buf.toString();
+        return sb.toString();
     }
 
 
--- a/src/share/classes/com/sun/jndi/dns/ResourceRecord.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/jndi/dns/ResourceRecord.java	Mon Jun 16 17:45:26 2014 +0100
@@ -596,21 +596,21 @@
         // If bestBase != -1, compress zeros in [bestBase, bestBase+bestLen)
         boolean compress = (bestBase != -1);
 
-        StringBuffer buf = new StringBuffer(40);
+        StringBuilder sb = new StringBuilder(40);
         if (bestBase == 0) {
-            buf.append(':');
+            sb.append(':');
         }
         for (int i = 0; i < 8; i++) {
             if (!compress || (i < bestBase) || (i >= bestBase + bestLen)) {
-                buf.append(Integer.toHexString(addr6[i]));
+                sb.append(Integer.toHexString(addr6[i]));
                 if (i < 7) {
-                    buf.append(':');
+                    sb.append(':');
                 }
             } else if (compress && (i == bestBase)) {  // first compressed zero
-                buf.append(':');
+                sb.append(':');
             }
         }
 
-        return buf.toString();
+        return sb.toString();
     }
 }
--- a/src/share/classes/com/sun/jndi/ldap/ClientId.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/jndi/ldap/ClientId.java	Mon Jun 16 17:45:26 2014 +0100
@@ -210,7 +210,7 @@
         if (ctls == null) {
             return "";
         }
-        StringBuffer str = new StringBuffer();
+        StringBuilder str = new StringBuilder();
         for (int i = 0; i < ctls.length; i++) {
             str.append(ctls[i].getID());
             str.append(' ');
--- a/src/share/classes/com/sun/jndi/ldap/DigestClientId.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/jndi/ldap/DigestClientId.java	Mon Jun 16 17:45:26 2014 +0100
@@ -103,14 +103,14 @@
 
     public String toString() {
         if (propvals != null) {
-            StringBuffer buf = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             for (int i = 0; i < propvals.length; i++) {
-                buf.append(':');
+                sb.append(':');
                 if (propvals[i] != null) {
-                    buf.append(propvals[i]);
+                    sb.append(propvals[i]);
                 }
             }
-            return super.toString() + buf.toString();
+            return super.toString() + sb.toString();
         } else {
             return super.toString();
         }
--- a/src/share/classes/com/sun/jndi/ldap/LdapSchemaParser.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/jndi/ldap/LdapSchemaParser.java	Mon Jun 16 17:45:26 2014 +0100
@@ -767,7 +767,7 @@
     final private String classDef2ObjectDesc(Attributes attrs)
         throws NamingException {
 
-        StringBuffer objectDesc = new StringBuffer("( ");
+        StringBuilder objectDesc = new StringBuilder("( ");
 
         Attribute attr = null;
         int count = 0;
@@ -879,7 +879,7 @@
     final private String attrDef2AttrDesc(Attributes attrs)
         throws NamingException {
 
-        StringBuffer attrDesc = new StringBuffer("( "); // opening parens
+        StringBuilder attrDesc = new StringBuilder("( "); // opening parens
 
         Attribute attr = null;
         int count = 0;
@@ -1012,7 +1012,7 @@
     final private String syntaxDef2SyntaxDesc(Attributes attrs)
         throws NamingException {
 
-        StringBuffer syntaxDesc = new StringBuffer("( "); // opening parens
+        StringBuilder syntaxDesc = new StringBuilder("( "); // opening parens
 
         Attribute attr = null;
         int count = 0;
@@ -1068,7 +1068,7 @@
     final private String matchRuleDef2MatchRuleDesc(Attributes attrs)
         throws NamingException {
 
-        StringBuffer matchRuleDesc = new StringBuffer("( "); // opening parens
+        StringBuilder matchRuleDesc = new StringBuilder("( "); // opening parens
 
         Attribute attr = null;
         int count = 0;
@@ -1196,7 +1196,7 @@
 
         // write QDList
 
-        StringBuffer qdList = new StringBuffer(attr.getID());
+        StringBuilder qdList = new StringBuilder(attr.getID());
         qdList.append(WHSP);
         qdList.append(OID_LIST_BEGIN);
 
@@ -1233,7 +1233,7 @@
 
         // write OID List
 
-        StringBuffer oidList = new StringBuffer(oidsAttr.getID());
+        StringBuilder oidList = new StringBuilder(oidsAttr.getID());
         oidList.append(WHSP);
         oidList.append(OID_LIST_BEGIN);
 
--- a/src/share/classes/com/sun/jndi/ldap/ServiceLocator.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/jndi/ldap/ServiceLocator.java	Mon Jun 16 17:45:26 2014 +0100
@@ -68,7 +68,7 @@
         if (dn == null) {
             return null;
         }
-        StringBuffer domain = new StringBuffer();
+        StringBuilder domain = new StringBuilder();
         LdapName ldapName = new LdapName(dn);
 
         // process RDNs left-to-right
--- a/src/share/classes/com/sun/jndi/ldap/sasl/DefaultCallbackHandler.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/jndi/ldap/sasl/DefaultCallbackHandler.java	Mon Jun 16 17:45:26 2014 +0100
@@ -88,7 +88,7 @@
                             }
                         }
                         if (selected == -1) {
-                            StringBuffer allChoices = new StringBuffer();
+                            StringBuilder allChoices = new StringBuilder();
                             for (int j = 0; j <  choices.length; j++) {
                                 allChoices.append(choices[j] + ",");
                             }
--- a/src/share/classes/com/sun/jndi/toolkit/dir/SearchFilter.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/jndi/toolkit/dir/SearchFilter.java	Mon Jun 16 17:45:26 2014 +0100
@@ -520,30 +520,30 @@
             str = (String)obj;
         }
         int len = str.length();
-        StringBuffer buf = new StringBuffer(len);
+        StringBuilder sb = new StringBuilder(len);
         char ch;
         for (int i = 0; i < len; i++) {
             switch (ch=str.charAt(i)) {
             case '*':
-                buf.append("\\2a");
+                sb.append("\\2a");
                 break;
             case '(':
-                buf.append("\\28");
+                sb.append("\\28");
                 break;
             case ')':
-                buf.append("\\29");
+                sb.append("\\29");
                 break;
             case '\\':
-                buf.append("\\5c");
+                sb.append("\\5c");
                 break;
             case 0:
-                buf.append("\\00");
+                sb.append("\\00");
                 break;
             default:
-                buf.append(ch);
+                sb.append(ch);
             }
         }
-        return buf.toString();
+        return sb.toString();
     }
 
 
@@ -585,7 +585,7 @@
 
          int param;
          int where = 0, start = 0;
-         StringBuffer answer = new StringBuffer(expr.length());
+         StringBuilder answer = new StringBuilder(expr.length());
 
          while ((where = findUnescaped('{', expr, start)) >= 0) {
              int pstart = where + 1; // skip '{'
--- a/src/share/classes/com/sun/media/sound/SoftPerformer.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/media/sound/SoftPerformer.java	Mon Jun 16 17:45:26 2014 +0100
@@ -326,7 +326,7 @@
     private static KeySortComparator keySortComparator = new KeySortComparator();
 
     private String extractKeys(ModelConnectionBlock conn) {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         if (conn.getSources() != null) {
             sb.append("[");
             ModelSource[] srcs = conn.getSources();
--- a/src/share/classes/com/sun/media/sound/WaveExtensibleFileReader.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/media/sound/WaveExtensibleFileReader.java	Mon Jun 16 17:45:26 2014 +0100
@@ -162,7 +162,7 @@
             0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
 
     private String decodeChannelMask(long channelmask) {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         long m = 1;
         for (int i = 0; i < allchannelnames.length; i++) {
             if ((channelmask & m) != 0L) {
--- a/src/share/classes/com/sun/org/apache/xml/internal/security/utils/Base64.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/org/apache/xml/internal/security/utils/Base64.java	Mon Jun 16 17:45:26 2014 +0100
@@ -257,7 +257,7 @@
     public static final byte[] decode(Element element) throws Base64DecodingException {
 
         Node sibling = element.getFirstChild();
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
         while (sibling != null) {
             if (sibling.getNodeType() == Node.TEXT_NODE) {
--- a/src/share/classes/com/sun/security/sasl/CramMD5Base.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/security/sasl/CramMD5Base.java	Mon Jun 16 17:45:26 2014 +0100
@@ -195,7 +195,7 @@
         digest = md5.digest();
 
         // Get character representation of digest
-        StringBuffer digestString = new StringBuffer();
+        StringBuilder digestString = new StringBuilder();
 
         for (i = 0; i < digest.length; i++) {
             if ((digest[i] & 0x000000ff) < 0x10) {
--- a/src/share/classes/com/sun/security/sasl/CramMD5Server.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/security/sasl/CramMD5Server.java	Mon Jun 16 17:45:26 2014 +0100
@@ -117,15 +117,15 @@
                 long rand = random.nextLong();
                 long timestamp = System.currentTimeMillis();
 
-                StringBuffer buf = new StringBuffer();
-                buf.append('<');
-                buf.append(rand);
-                buf.append('.');
-                buf.append(timestamp);
-                buf.append('@');
-                buf.append(fqdn);
-                buf.append('>');
-                String challengeStr = buf.toString();
+                StringBuilder sb = new StringBuilder();
+                sb.append('<');
+                sb.append(rand);
+                sb.append('.');
+                sb.append(timestamp);
+                sb.append('@');
+                sb.append(fqdn);
+                sb.append('>');
+                String challengeStr = sb.toString();
 
                 logger.log(Level.FINE,
                     "CRAMSRV01:Generated challenge: {0}", challengeStr);
--- a/src/share/classes/com/sun/security/sasl/digest/DigestMD5Base.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/security/sasl/digest/DigestMD5Base.java	Mon Jun 16 17:45:26 2014 +0100
@@ -387,7 +387,7 @@
     protected byte[] binaryToHex(byte[] digest) throws
     UnsupportedEncodingException {
 
-        StringBuffer digestString = new StringBuffer();
+        StringBuilder digestString = new StringBuilder();
 
         for (int i = 0; i < digest.length; i ++) {
             if ((digest[i] & 0x000000ff) < 0x10) {
@@ -598,7 +598,7 @@
     protected static String nonceCountToHex(int count) {
 
         String str = Integer.toHexString(count);
-        StringBuffer pad = new StringBuffer();
+        StringBuilder pad = new StringBuilder();
 
         if (str.length() < 8) {
             for (int i = 0; i < 8-str.length(); i ++) {
--- a/src/share/classes/com/sun/security/sasl/digest/DigestMD5Server.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/security/sasl/digest/DigestMD5Server.java	Mon Jun 16 17:45:26 2014 +0100
@@ -203,19 +203,19 @@
             String supportedCiphers = null;
             if ((allQop&PRIVACY_PROTECTION) != 0) {
                 myCiphers = getPlatformCiphers();
-                StringBuffer buf = new StringBuffer();
+                StringBuilder sb = new StringBuilder();
 
                 // myCipher[i] is a byte that indicates whether CIPHER_TOKENS[i]
                 // is supported
                 for (int i = 0; i < CIPHER_TOKENS.length; i++) {
                     if (myCiphers[i] != 0) {
-                        if (buf.length() > 0) {
-                            buf.append(',');
+                        if (sb.length() > 0) {
+                            sb.append(',');
                         }
-                        buf.append(CIPHER_TOKENS[i]);
+                        sb.append(CIPHER_TOKENS[i]);
                     }
                 }
-                supportedCiphers = buf.toString();
+                supportedCiphers = sb.toString();
             }
 
             try {
--- a/src/share/classes/com/sun/security/sasl/util/AbstractSaslImpl.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/security/sasl/util/AbstractSaslImpl.java	Mon Jun 16 17:45:26 2014 +0100
@@ -80,13 +80,13 @@
                     "SASLIMPL02:Preferred qop mask: {0}", new Byte(allQop));
 
                 if (qop.length > 0) {
-                    StringBuffer qopbuf = new StringBuffer();
+                    StringBuilder str = new StringBuilder();
                     for (int i = 0; i < qop.length; i++) {
-                        qopbuf.append(Byte.toString(qop[i]));
-                        qopbuf.append(' ');
+                        str.append(Byte.toString(qop[i]));
+                        str.append(' ');
                     }
                     logger.logp(Level.FINE, myClassName, "constructor",
-                        "SASLIMPL03:Preferred qops : {0}", qopbuf.toString());
+                            "SASLIMPL03:Preferred qops : {0}", str.toString());
                 }
             }
 
@@ -95,13 +95,13 @@
             logger.logp(Level.FINE, myClassName, "constructor",
                 "SASLIMPL04:Preferred strength property: {0}", prop);
             if (logger.isLoggable(Level.FINE) && strength.length > 0) {
-                StringBuffer strbuf = new StringBuffer();
+                StringBuilder str = new StringBuilder();
                 for (int i = 0; i < strength.length; i++) {
-                    strbuf.append(Byte.toString(strength[i]));
-                    strbuf.append(' ');
+                    str.append(Byte.toString(strength[i]));
+                    str.append(' ');
                 }
                 logger.logp(Level.FINE, myClassName, "constructor",
-                    "SASLIMPL05:Cipher strengths: {0}", strbuf.toString());
+                        "SASLIMPL05:Cipher strengths: {0}", str.toString());
             }
 
             // Max receive buffer size
--- a/src/share/classes/com/sun/tools/example/debug/bdi/ExceptionSpec.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/ExceptionSpec.java	Mon Jun 16 17:45:26 2014 +0100
@@ -102,8 +102,8 @@
 
     @Override
     public String toString() {
-        StringBuffer buffer = new StringBuffer("exception catch ");
-        buffer.append(refSpec.toString());
-        return buffer.toString();
+        StringBuilder sb = new StringBuilder("exception catch ");
+        sb.append(refSpec.toString());
+        return sb.toString();
     }
 }
--- a/src/share/classes/com/sun/tools/example/debug/bdi/LineBreakpointSpec.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/LineBreakpointSpec.java	Mon Jun 16 17:45:26 2014 +0100
@@ -118,13 +118,13 @@
 
     @Override
     public String toString() {
-        StringBuffer buffer = new StringBuffer("breakpoint ");
-        buffer.append(refSpec.toString());
-        buffer.append(':');
-        buffer.append(lineNumber);
-        buffer.append(" (");
-        buffer.append(getStatusString());
-        buffer.append(')');
-        return buffer.toString();
+        StringBuilder sb = new StringBuilder("breakpoint ");
+        sb.append(refSpec.toString());
+        sb.append(':');
+        sb.append(lineNumber);
+        sb.append(" (");
+        sb.append(getStatusString());
+        sb.append(')');
+        return sb.toString();
     }
 }
--- a/src/share/classes/com/sun/tools/example/debug/bdi/MethodBreakpointSpec.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/MethodBreakpointSpec.java	Mon Jun 16 17:45:26 2014 +0100
@@ -126,26 +126,26 @@
 
     @Override
     public String toString() {
-        StringBuffer buffer = new StringBuffer("breakpoint ");
-        buffer.append(refSpec.toString());
-        buffer.append('.');
-        buffer.append(methodId);
+        StringBuilder sb = new StringBuilder("breakpoint ");
+        sb.append(refSpec.toString());
+        sb.append('.');
+        sb.append(methodId);
         if (methodArgs != null) {
             boolean first = true;
-            buffer.append('(');
+            sb.append('(');
             for (String name : methodArgs) {
                 if (!first) {
-                    buffer.append(',');
+                    sb.append(',');
                 }
-                buffer.append(name);
+                sb.append(name);
                 first = false;
             }
-            buffer.append(")");
+            sb.append(")");
         }
-        buffer.append(" (");
-        buffer.append(getStatusString());
-        buffer.append(')');
-        return buffer.toString();
+        sb.append(" (");
+        sb.append(getStatusString());
+        sb.append(')');
+        return sb.toString();
     }
 
     private boolean isValidMethodName(String s) {
@@ -225,8 +225,8 @@
          * stripping whitespace after the name ends.
          */
         int i = 0;
-        StringBuffer typePart = new StringBuffer();
-        StringBuffer arrayPart = new StringBuffer();
+        StringBuilder typePart = new StringBuilder();
+        StringBuilder arrayPart = new StringBuilder();
         name = name.trim();
         int nameLength = name.length();
         /*
--- a/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java	Mon Jun 16 17:45:26 2014 +0100
@@ -185,7 +185,7 @@
   }
 
   final public String Name() throws ParseException {
- StringBuffer sb = new StringBuffer();
+    StringBuilder sb = new StringBuilder();
     jj_consume_token(IDENTIFIER);
                  sb.append(token);
     label_2:
--- a/src/share/classes/com/sun/tools/example/debug/expr/ParseException.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/expr/ParseException.java	Mon Jun 16 17:45:26 2014 +0100
@@ -114,7 +114,7 @@
                            int[][] expectedTokenSequences,
                            String[] tokenImage) {
     String eol = System.getProperty("line.separator", "\n");
-    StringBuffer expected = new StringBuffer();
+    StringBuilder expected = new StringBuilder();
     int maxSize = 0;
     for (int i = 0; i < expectedTokenSequences.length; i++) {
       if (maxSize < expectedTokenSequences[i].length) {
@@ -164,7 +164,7 @@
    * string literal.
    */
   static String add_escapes(String str) {
-      StringBuffer retval = new StringBuffer();
+      StringBuilder retval = new StringBuilder();
       char ch;
       for (int i = 0; i < str.length(); i++) {
         switch (str.charAt(i))
--- a/src/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java	Mon Jun 16 17:45:26 2014 +0100
@@ -73,7 +73,7 @@
    * equivalents in the given string
    */
   protected static final String addEscapes(String str) {
-    StringBuffer retval = new StringBuffer();
+    StringBuilder retval = new StringBuilder();
     char ch;
     for (int i = 0; i < str.length(); i++) {
       switch (str.charAt(i))
--- a/src/share/classes/com/sun/tools/example/debug/gui/CommandInterpreter.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/CommandInterpreter.java	Mon Jun 16 17:45:26 2014 +0100
@@ -267,7 +267,7 @@
                 buf[j] = ' ';
             }
             buf[79] = '\0';
-            StringBuffer sbOut = new StringBuffer();
+            StringBuilder sbOut = new StringBuilder();
             sbOut.append(buf);
 
             // Right-justify the thread number at start of output string
@@ -381,16 +381,16 @@
             }
         } else {
             clname = t.nextToken();
-            StringBuffer sbuf = new StringBuffer();
+            StringBuilder str = new StringBuilder();
             // Allow VM arguments to be specified here?
             while (t.hasMoreTokens()) {
                 String tok = t.nextToken();
-                sbuf.append(tok);
+                str.append(tok);
                 if (t.hasMoreTokens()) {
-                    sbuf.append(' ');
+                    str.append(' ');
                 }
             }
-            String args = sbuf.toString();
+            String args = str.toString();
             try {
                 String vmArgs = context.getVmArguments();
                 runtime.run(suspended, vmArgs, clname, args);
--- a/src/share/classes/com/sun/tools/example/debug/gui/ContextManager.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/ContextManager.java	Mon Jun 16 17:45:26 2014 +0100
@@ -333,7 +333,7 @@
 
     private String processClasspathDefaults(String javaArgs) {
         if (javaArgs.indexOf("-classpath ") == -1) {
-            StringBuffer munged = new StringBuffer(javaArgs);
+            StringBuilder munged = new StringBuilder(javaArgs);
             SearchPath classpath = classManager.getClassPath();
             if (classpath.isEmpty()) {
                 String envcp = System.getProperty("env.class.path");
--- a/src/share/classes/com/sun/tools/example/debug/gui/SourceModel.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/SourceModel.java	Mon Jun 16 17:45:26 2014 +0100
@@ -236,7 +236,7 @@
     private String expandTabs(String s) {
         int col = 0;
         int len = s.length();
-        StringBuffer sb = new StringBuffer(132);
+        StringBuilder sb = new StringBuilder(132);
         for (int i = 0; i < len; i++) {
             char c = s.charAt(i);
             sb.append(c);
--- a/src/share/classes/com/sun/tools/example/debug/tty/BreakpointSpec.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/BreakpointSpec.java	Mon Jun 16 17:45:26 2014 +0100
@@ -154,27 +154,27 @@
 
     @Override
     public String toString() {
-        StringBuffer buffer = new StringBuffer(refSpec.toString());
+        StringBuilder sb = new StringBuilder(refSpec.toString());
         if (isMethodBreakpoint()) {
-            buffer.append('.');
-            buffer.append(methodId);
+            sb.append('.');
+            sb.append(methodId);
             if (methodArgs != null) {
                 boolean first = true;
-                buffer.append('(');
+                sb.append('(');
                 for (String arg : methodArgs) {
                     if (!first) {
-                        buffer.append(',');
+                        sb.append(',');
                     }
-                    buffer.append(arg);
+                    sb.append(arg);
                     first = false;
                 }
-                buffer.append(")");
+                sb.append(")");
             }
         } else {
-            buffer.append(':');
-            buffer.append(lineNumber);
+            sb.append(':');
+            sb.append(lineNumber);
         }
-        return MessageOutput.format("breakpoint", buffer.toString());
+        return MessageOutput.format("breakpoint", sb.toString());
     }
 
     private Location location(ReferenceType refType) throws
@@ -275,8 +275,8 @@
          * stripping whitespace after the name ends
          */
         int i = 0;
-        StringBuffer typePart = new StringBuffer();
-        StringBuffer arrayPart = new StringBuffer();
+        StringBuilder typePart = new StringBuilder();
+        StringBuilder arrayPart = new StringBuilder();
         name = name.trim();
         int nameLength = name.length();
         /*
--- a/src/share/classes/com/sun/tools/example/debug/tty/Commands.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/Commands.java	Mon Jun 16 17:45:26 2014 +0100
@@ -164,30 +164,30 @@
     }
 
     String typedName(Method method) {
-        StringBuffer buf = new StringBuffer();
-        buf.append(method.name());
-        buf.append("(");
+        StringBuilder sb = new StringBuilder();
+        sb.append(method.name());
+        sb.append("(");
 
         List<String> args = method.argumentTypeNames();
         int lastParam = args.size() - 1;
         // output param types except for the last
         for (int ii = 0; ii < lastParam; ii++) {
-            buf.append(args.get(ii));
-            buf.append(", ");
+            sb.append(args.get(ii));
+            sb.append(", ");
         }
         if (lastParam >= 0) {
             // output the last param
             String lastStr = args.get(lastParam);
             if (method.isVarArgs()) {
                 // lastParam is an array.  Replace the [] with ...
-                buf.append(lastStr.substring(0, lastStr.length() - 2));
-                buf.append("...");
+                sb.append(lastStr.substring(0, lastStr.length() - 2));
+                sb.append("...");
             } else {
-                buf.append(lastStr);
+                sb.append(lastStr);
             }
         }
-        buf.append(")");
-        return buf.toString();
+        sb.append(")");
+        return sb.toString();
     }
 
     void commandConnectors(VirtualMachineManager vmm) {
@@ -226,7 +226,7 @@
     }
 
     void commandClasses() {
-        StringBuffer classList = new StringBuffer();
+        StringBuilder classList = new StringBuilder();
         for (ReferenceType refType : Env.vm().allClasses()) {
             classList.append(refType.name());
             classList.append("\n");
@@ -309,7 +309,7 @@
         String idClass = t.nextToken();
         ReferenceType cls = Env.getReferenceTypeFromToken(idClass);
         if (cls != null) {
-            StringBuffer methodsList = new StringBuffer();
+            StringBuilder methodsList = new StringBuilder();
             for (Method method : cls.allMethods()) {
                 methodsList.append(method.declaringType().name());
                 methodsList.append(" ");
@@ -333,7 +333,7 @@
         if (cls != null) {
             List<Field> fields = cls.allFields();
             List<Field> visible = cls.visibleFields();
-            StringBuffer fieldsList = new StringBuffer();
+            StringBuilder fieldsList = new StringBuilder();
             for (Field field : fields) {
                 String s;
                 if (!visible.contains(field)) {
@@ -391,11 +391,11 @@
              * very long thread names, at the possible cost of lines
              * being wrapped by the display device.
              */
-            StringBuffer idBuffer = new StringBuffer(Env.description(thr));
+            StringBuilder idBuffer = new StringBuilder(Env.description(thr));
             for (int i = idBuffer.length(); i < maxIdLength; i++) {
                 idBuffer.append(" ");
             }
-            StringBuffer nameBuffer = new StringBuffer(thr.name());
+            StringBuilder nameBuffer = new StringBuilder(thr.name());
             for (int i = nameBuffer.length(); i < maxNameLength; i++) {
                 nameBuffer.append(" ");
             }
@@ -1606,16 +1606,16 @@
     private void dump(ObjectReference obj, ReferenceType refType,
                       ReferenceType refTypeBase) {
         for (Field field : refType.fields()) {
-            StringBuffer o = new StringBuffer();
-            o.append("    ");
+            StringBuilder sb = new StringBuilder();
+            sb.append("    ");
             if (!refType.equals(refTypeBase)) {
-                o.append(refType.name());
-                o.append(".");
+                sb.append(refType.name());
+                sb.append(".");
             }
-            o.append(field.name());
-            o.append(MessageOutput.format("colon space"));
-            o.append(obj.getValue(field));
-            MessageOutput.printDirectln(o.toString()); // Special case: use printDirectln()
+            sb.append(field.name());
+            sb.append(MessageOutput.format("colon space"));
+            sb.append(obj.getValue(field));
+            MessageOutput.printDirectln(sb.toString()); // Special case: use printDirectln()
         }
         if (refType instanceof ClassType) {
             ClassType sup = ((ClassType)refType).superclass();
@@ -1954,7 +1954,7 @@
             }
         }
 
-        StringBuffer line = new StringBuffer(80);
+        StringBuilder line = new StringBuilder(80);
         line.append("0000: ");
         for (int i = 0; i < bytecodes.length; i++) {
             if ((i > 0) && (i % 16 == 0)) {
--- a/src/share/classes/com/sun/tools/example/debug/tty/Env.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/Env.java	Mon Jun 16 17:45:26 2014 +0100
@@ -114,12 +114,12 @@
     }
 
     static String excludesString() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (String pattern : excludes()) {
-            buffer.append(pattern);
-            buffer.append(",");
+            sb.append(pattern);
+            sb.append(",");
         }
-        return buffer.toString();
+        return sb.toString();
     }
 
     static void addExcludes(StepRequest request) {
--- a/src/share/classes/com/sun/tools/example/debug/tty/TTY.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/TTY.java	Mon Jun 16 17:45:26 2014 +0100
@@ -827,17 +827,17 @@
     private static String addArgument(String string, String argument) {
         if (hasWhitespace(argument) || argument.indexOf(',') != -1) {
             // Quotes were stripped out for this argument, add 'em back.
-            StringBuffer buffer = new StringBuffer(string);
-            buffer.append('"');
+            StringBuilder sb = new StringBuilder(string);
+            sb.append('"');
             for (int i = 0; i < argument.length(); i++) {
                 char c = argument.charAt(i);
                 if (c == '"') {
-                    buffer.append('\\');
+                    sb.append('\\');
                 }
-                buffer.append(c);
+                sb.append(c);
             }
-            buffer.append("\" ");
-            return buffer.toString();
+            sb.append("\" ");
+            return sb.toString();
         } else {
             return string + argument + ' ';
         }
--- a/src/share/classes/com/sun/tools/example/trace/Trace.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/trace/Trace.java	Mon Jun 16 17:45:26 2014 +0100
@@ -121,7 +121,7 @@
             usage();
             System.exit(1);
         }
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append(args[inx]);
         for (++inx; inx < args.length; ++inx) {
             sb.append(' ');
--- a/src/share/classes/com/sun/tools/hat/internal/util/Misc.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/tools/hat/internal/util/Misc.java	Mon Jun 16 17:45:26 2014 +0100
@@ -83,30 +83,30 @@
 
     public static String encodeHtml(String str) {
         final int len = str.length();
-        StringBuffer buf = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (int i = 0; i < len; i++) {
             char ch = str.charAt(i);
             if (ch == '<') {
-                buf.append("&lt;");
+                sb.append("&lt;");
             } else if (ch == '>') {
-                buf.append("&gt;");
+                sb.append("&gt;");
             } else if (ch == '"') {
-                buf.append("&quot;");
+                sb.append("&quot;");
             } else if (ch == '\'') {
-                buf.append("&#039;");
+                sb.append("&#039;");
             } else if (ch == '&') {
-                buf.append("&amp;");
+                sb.append("&amp;");
             } else if (ch < ' ') {
-                buf.append("&#" + Integer.toString(ch) + ";");
+                sb.append("&#" + Integer.toString(ch) + ";");
             } else {
                 int c = (ch & 0xFFFF);
                 if (c > 127) {
-                    buf.append("&#" + Integer.toString(c) + ";");
+                    sb.append("&#" + Integer.toString(c) + ";");
                 } else {
-                    buf.append(ch);
+                    sb.append(ch);
                 }
             }
         }
-        return buf.toString();
+        return sb.toString();
     }
 }
--- a/src/share/classes/com/sun/tools/jdi/FieldImpl.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/tools/jdi/FieldImpl.java	Mon Jun 16 17:45:26 2014 +0100
@@ -95,12 +95,12 @@
     }
 
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
-        buf.append(declaringType().name());
-        buf.append('.');
-        buf.append(name());
+        sb.append(declaringType().name());
+        sb.append('.');
+        sb.append(name());
 
-        return buf.toString();
+        return sb.toString();
     }
 }
--- a/src/share/classes/com/sun/tools/jdi/JNITypeParser.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/tools/jdi/JNITypeParser.java	Mon Jun 16 17:45:26 2014 +0100
@@ -44,11 +44,11 @@
     }
 
     static String typeNameToSignature(String signature) {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         int firstIndex = signature.indexOf('[');
         int index = firstIndex;
         while (index != -1) {
-            buffer.append('[');
+            sb.append('[');
             index = signature.indexOf('[', index + 1);
         }
 
@@ -57,28 +57,28 @@
         }
 
         if (signature.equals("boolean")) {
-            buffer.append('Z');
+            sb.append('Z');
         } else if (signature.equals("byte")) {
-            buffer.append('B');
+            sb.append('B');
         } else if (signature.equals("char")) {
-            buffer.append('C');
+            sb.append('C');
         } else if (signature.equals("short")) {
-            buffer.append('S');
+            sb.append('S');
         } else if (signature.equals("int")) {
-            buffer.append('I');
+            sb.append('I');
         } else if (signature.equals("long")) {
-            buffer.append('J');
+            sb.append('J');
         } else if (signature.equals("float")) {
-            buffer.append('F');
+            sb.append('F');
         } else if (signature.equals("double")) {
-            buffer.append('D');
+            sb.append('D');
         } else {
-            buffer.append('L');
-            buffer.append(signature.replace('.', '/'));
-            buffer.append(';');
+            sb.append('L');
+            sb.append(signature.replace('.', '/'));
+            sb.append(';');
         }
 
-        return buffer.toString();
+        return sb.toString();
     }
 
     String typeName() {
--- a/src/share/classes/com/sun/tools/jdi/MethodImpl.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/tools/jdi/MethodImpl.java	Mon Jun 16 17:45:26 2014 +0100
@@ -387,7 +387,7 @@
     }
 
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append(declaringType().name());
         sb.append(".");
         sb.append(name());
--- a/src/share/classes/com/sun/tools/jdi/ReferenceTypeImpl.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/tools/jdi/ReferenceTypeImpl.java	Mon Jun 16 17:45:26 2014 +0100
@@ -751,7 +751,7 @@
     String baseSourceDir() {
         if (baseSourceDir == null) {
             String typeName = name();
-            StringBuffer sb = new StringBuffer(typeName.length() + 10);
+            StringBuilder sb = new StringBuilder(typeName.length() + 10);
             int index = 0;
             int nextIndex;
 
--- a/src/share/classes/com/sun/tools/jdi/SDE.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/tools/jdi/SDE.java	Mon Jun 16 17:45:26 2014 +0100
@@ -56,16 +56,16 @@
                 if (sourcePath == null) {
                     sourcePath = refType.baseSourceDir() + sourceName;
                 } else {
-                    StringBuffer buf = new StringBuffer();
+                    StringBuilder sb = new StringBuilder();
                     for (int i = 0; i < sourcePath.length(); ++i) {
                         char ch = sourcePath.charAt(i);
                         if (ch == '/') {
-                            buf.append(File.separatorChar);
+                            sb.append(File.separatorChar);
                         } else {
-                            buf.append(ch);
+                            sb.append(ch);
                         }
                     }
-                    sourcePath = buf.toString();
+                    sourcePath = sb.toString();
                 }
                 isConverted = true;
             }
@@ -327,7 +327,7 @@
     }
 
     String readLine() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         char ch;
 
         ignoreWhite();
--- a/src/share/classes/com/sun/tools/jdi/TargetVM.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/tools/jdi/TargetVM.java	Mon Jun 16 17:45:26 2014 +0100
@@ -78,7 +78,7 @@
                           ", errorCode=" + packet.errorCode +
                           ", flags=" + packet.flags);
         }
-        StringBuffer line = new StringBuffer(80);
+        StringBuilder line = new StringBuilder(80);
         line.append("0000: ");
         for (int i = 0; i < packet.data.length; i++) {
             if ((i > 0) && (i % 16 == 0)) {
--- a/src/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java	Mon Jun 16 17:45:26 2014 +0100
@@ -742,7 +742,7 @@
     }
 
     void printReceiveTrace(int depth, String string) {
-        StringBuffer sb = new StringBuffer("Receiving:");
+        StringBuilder sb = new StringBuilder("Receiving:");
         for (int i = depth; i > 0; --i) {
             sb.append("    ");
         }
@@ -872,7 +872,7 @@
     ReferenceTypeImpl referenceType(long id, int tag,
                                                  String signature) {
         if ((vm.traceFlags & VirtualMachine.TRACE_REFTYPES) != 0) {
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             sb.append("Looking up ");
             if (tag == JDWP.TypeTag.CLASS) {
                 sb.append("Class");
--- a/src/share/classes/java/beans/Introspector.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/beans/Introspector.java	Mon Jun 16 17:45:26 2014 +0100
@@ -1282,7 +1282,7 @@
      * Creates a key for a method in a method cache.
      */
     private static String makeQualifiedMethodName(String name, String[] params) {
-        StringBuffer sb = new StringBuffer(name);
+        StringBuilder sb = new StringBuilder(name);
         sb.append('=');
         for (int i = 0; i < params.length; i++) {
             sb.append(':');
--- a/src/share/classes/java/beans/Statement.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/beans/Statement.java	Mon Jun 16 17:45:26 2014 +0100
@@ -340,7 +340,7 @@
         if (arguments == null) {
             arguments = emptyArray;
         }
-        StringBuffer result = new StringBuffer(instanceName(target) + "." + methodName + "(");
+        StringBuilder result = new StringBuilder(instanceName(target) + "." + methodName + "(");
         int n = arguments.length;
         for(int i = 0; i < n; i++) {
             result.append(instanceName(arguments[i]));
--- a/src/share/classes/java/io/RandomAccessFile.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/io/RandomAccessFile.java	Mon Jun 16 17:45:26 2014 +0100
@@ -890,7 +890,7 @@
      */
 
     public final String readLine() throws IOException {
-        StringBuffer input = new StringBuffer();
+        StringBuilder input = new StringBuilder();
         int c = -1;
         boolean eol = false;
 
--- a/src/share/classes/java/net/IDN.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/net/IDN.java	Mon Jun 16 17:45:26 2014 +0100
@@ -111,7 +111,7 @@
     public static String toASCII(String input, int flag)
     {
         int p = 0, q = 0;
-        StringBuffer out = new StringBuffer();
+        StringBuilder out = new StringBuilder();
 
         if (isRootLabel(input)) {
             return ".";
@@ -172,7 +172,7 @@
      */
     public static String toUnicode(String input, int flag) {
         int p = 0, q = 0;
-        StringBuffer out = new StringBuffer();
+        StringBuilder out = new StringBuilder();
 
         if (isRootLabel(input)) {
             return ".";
--- a/src/share/classes/java/net/SocketPermission.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/net/SocketPermission.java	Mon Jun 16 17:45:26 2014 +0100
@@ -733,7 +733,7 @@
         InetAddress auth;
 
         try {
-            StringBuffer sb = new StringBuffer(39);
+            StringBuilder sb = new StringBuilder(39);
 
             for (int i = 15; i >= 0; i--) {
                 sb.append(Integer.toHexString(((addr[i]) & 0x0f)));
--- a/src/share/classes/java/net/URI.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/net/URI.java	Mon Jun 16 17:45:26 2014 +0100
@@ -1957,7 +1957,7 @@
     private void defineString() {
         if (string != null) return;
 
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         if (scheme != null) {
             sb.append(scheme);
             sb.append(':');
@@ -2015,7 +2015,7 @@
             if (i >= 0)
                 path = base.substring(0, i + 1);
         } else {
-            StringBuffer sb = new StringBuffer(base.length() + cn);
+            StringBuilder sb = new StringBuilder(base.length() + cn);
             // 5.2 (6a)
             if (i >= 0)
                 sb.append(base.substring(0, i + 1));
@@ -2778,7 +2778,7 @@
         if (s.indexOf('%') < 0)
             return s;
 
-        StringBuffer sb = new StringBuffer(n);
+        StringBuilder sb = new StringBuilder(n);
         ByteBuffer bb = ByteBuffer.allocate(n);
         CharBuffer cb = CharBuffer.allocate(n);
         CharsetDecoder dec = ThreadLocalCoders.decoderFor("UTF-8")
--- a/src/share/classes/java/net/URISyntaxException.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/net/URISyntaxException.java	Mon Jun 16 17:45:26 2014 +0100
@@ -121,7 +121,7 @@
      * @return  A string describing the parse error
      */
     public String getMessage() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append(getReason());
         if (index > -1) {
             sb.append(" at index ");
--- a/src/share/classes/java/net/URLDecoder.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/net/URLDecoder.java	Mon Jun 16 17:45:26 2014 +0100
@@ -134,7 +134,7 @@
 
         boolean needToChange = false;
         int numChars = s.length();
-        StringBuffer sb = new StringBuffer(numChars > 500 ? numChars / 2 : numChars);
+        StringBuilder sb = new StringBuilder(numChars > 500 ? numChars / 2 : numChars);
         int i = 0;
 
         if (enc.length() == 0) {
--- a/src/share/classes/java/net/URLEncoder.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/net/URLEncoder.java	Mon Jun 16 17:45:26 2014 +0100
@@ -201,7 +201,7 @@
         throws UnsupportedEncodingException {
 
         boolean needToChange = false;
-        StringBuffer out = new StringBuffer(s.length());
+        StringBuilder out = new StringBuilder(s.length());
         Charset charset;
         CharArrayWriter charArrayWriter = new CharArrayWriter();
 
--- a/src/share/classes/java/net/URLStreamHandler.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/net/URLStreamHandler.java	Mon Jun 16 17:45:26 2014 +0100
@@ -486,7 +486,7 @@
         if (u.getRef() != null)
             len += 1 + u.getRef().length();
 
-        StringBuffer result = new StringBuffer(len);
+        StringBuilder result = new StringBuilder(len);
         result.append(u.getProtocol());
         result.append(":");
         if (u.getAuthority() != null && u.getAuthority().length() > 0) {
--- a/src/share/classes/java/nio/file/InvalidPathException.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/nio/file/InvalidPathException.java	Mon Jun 16 17:45:26 2014 +0100
@@ -117,7 +117,7 @@
      * @return  a string describing the error
      */
     public String getMessage() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append(getReason());
         if (index > -1) {
             sb.append(" at index ");
--- a/src/share/classes/java/rmi/dgc/VMID.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/rmi/dgc/VMID.java	Mon Jun 16 17:45:26 2014 +0100
@@ -120,15 +120,15 @@
      * Return string representation of this VMID.
      */
     public String toString() {
-        StringBuffer result = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         if (addr != null)
             for (int i = 0; i < addr.length; ++ i) {
                 int x = addr[i] & 0xFF;
-                result.append((x < 0x10 ? "0" : "") +
-                              Integer.toString(x, 16));
+                sb.append((x < 0x10 ? "0" : "") +
+                          Integer.toString(x, 16));
             }
-        result.append(':');
-        result.append(uid.toString());
-        return result.toString();
+        sb.append(':');
+        sb.append(uid.toString());
+        return sb.toString();
     }
 }
--- a/src/share/classes/java/security/CodeSigner.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/security/CodeSigner.java	Mon Jun 16 17:45:26 2014 +0100
@@ -154,7 +154,7 @@
      *         if present.
      */
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("(");
         sb.append("Signer: " + signerCertPath.getCertificates().get(0));
         if (timestamp != null) {
--- a/src/share/classes/java/security/Timestamp.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/security/Timestamp.java	Mon Jun 16 17:45:26 2014 +0100
@@ -141,7 +141,7 @@
      *         its signer's certificate.
      */
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("(");
         sb.append("timestamp: " + timestamp);
         List<? extends Certificate> certs = signerCertPath.getCertificates();
--- a/src/share/classes/java/security/cert/CertPath.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/security/cert/CertPath.java	Mon Jun 16 17:45:26 2014 +0100
@@ -220,7 +220,7 @@
      * @return a string representation of this certification path
      */
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         Iterator<? extends Certificate> stringIterator =
                                         getCertificates().iterator();
 
--- a/src/share/classes/java/security/cert/CollectionCertStoreParameters.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/security/cert/CollectionCertStoreParameters.java	Mon Jun 16 17:45:26 2014 +0100
@@ -132,7 +132,7 @@
      * @return a formatted string describing the parameters
      */
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("CollectionCertStoreParameters: [\n");
         sb.append("  collection: " + coll + "\n");
         sb.append("]");
--- a/src/share/classes/java/security/cert/LDAPCertStoreParameters.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/security/cert/LDAPCertStoreParameters.java	Mon Jun 16 17:45:26 2014 +0100
@@ -138,7 +138,7 @@
      * @return a formatted string describing the parameters
      */
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("LDAPCertStoreParameters: [\n");
 
         sb.append("  serverName: " + serverName + "\n");
--- a/src/share/classes/java/security/cert/PKIXBuilderParameters.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/security/cert/PKIXBuilderParameters.java	Mon Jun 16 17:45:26 2014 +0100
@@ -189,7 +189,7 @@
      * @return a formatted string describing the parameters
      */
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("[\n");
         sb.append(super.toString());
         sb.append("  Maximum Path Length: " + maxPathLength + "\n");
--- a/src/share/classes/java/security/cert/PKIXCertPathBuilderResult.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/security/cert/PKIXCertPathBuilderResult.java	Mon Jun 16 17:45:26 2014 +0100
@@ -107,7 +107,7 @@
      *         {@code PKIXCertPathBuilderResult}
      */
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("PKIXCertPathBuilderResult: [\n");
         sb.append("  Certification Path: " + certPath + "\n");
         sb.append("  Trust Anchor: " + getTrustAnchor().toString() + "\n");
--- a/src/share/classes/java/security/cert/PKIXCertPathValidatorResult.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/security/cert/PKIXCertPathValidatorResult.java	Mon Jun 16 17:45:26 2014 +0100
@@ -148,7 +148,7 @@
      *         {@code PKIXCertPathValidatorResult}
      */
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("PKIXCertPathValidatorResult: [\n");
         sb.append("  Trust Anchor: " + trustAnchor.toString() + "\n");
         sb.append("  Policy Tree: " + String.valueOf(policyTree) + "\n");
--- a/src/share/classes/java/security/cert/PKIXParameters.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/security/cert/PKIXParameters.java	Mon Jun 16 17:45:26 2014 +0100
@@ -693,7 +693,7 @@
      * @return a formatted string describing the parameters.
      */
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("[\n");
 
         /* start with trusted anchor info */
--- a/src/share/classes/java/security/cert/PolicyQualifierInfo.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/security/cert/PolicyQualifierInfo.java	Mon Jun 16 17:45:26 2014 +0100
@@ -161,7 +161,7 @@
         if (pqiString != null)
             return pqiString;
         HexDumpEncoder enc = new HexDumpEncoder();
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("PolicyQualifierInfo: [\n");
         sb.append("  qualifierID: " + mId + "\n");
         sb.append("  qualifier: " +
--- a/src/share/classes/java/security/cert/TrustAnchor.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/security/cert/TrustAnchor.java	Mon Jun 16 17:45:26 2014 +0100
@@ -317,7 +317,7 @@
      * @return a formatted string describing the {@code TrustAnchor}
      */
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("[\n");
         if (pubKey != null) {
             sb.append("  Trusted CA Public Key: " + pubKey.toString() + "\n");
--- a/src/share/classes/java/security/cert/X509CRLSelector.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/security/cert/X509CRLSelector.java	Mon Jun 16 17:45:26 2014 +0100
@@ -566,7 +566,7 @@
      *         {@code X509CRLSelector}.
      */
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("X509CRLSelector: [\n");
         if (issuerNames != null) {
             sb.append("  IssuerNames:\n");
--- a/src/share/classes/java/security/cert/X509CertSelector.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/security/cert/X509CertSelector.java	Mon Jun 16 17:45:26 2014 +0100
@@ -1811,7 +1811,7 @@
      *         {@code CertSelector}
      */
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("X509CertSelector: [\n");
         if (x509Cert != null) {
             sb.append("  Certificate: " + x509Cert.toString() + "\n");
--- a/src/share/classes/java/text/AttributedString.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/text/AttributedString.java	Mon Jun 16 17:45:26 2014 +0100
@@ -243,11 +243,11 @@
             throw new IllegalArgumentException("Invalid substring range");
 
         // Copy the given string
-        StringBuffer textBuffer = new StringBuffer();
+        StringBuilder textBuilder = new StringBuilder();
         text.setIndex(beginIndex);
         for (char c = text.current(); text.getIndex() < endIndex; c = text.next())
-            textBuffer.append(c);
-        this.text = textBuffer.toString();
+            textBuilder.append(c);
+        this.text = textBuilder.toString();
 
         if (beginIndex == endIndex)
             return;
--- a/src/share/classes/java/text/ChoiceFormat.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/text/ChoiceFormat.java	Mon Jun 16 17:45:26 2014 +0100
@@ -259,7 +259,7 @@
      * @return the pattern string
      */
     public String toPattern() {
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
         for (int i = 0; i < choiceLimits.length; ++i) {
             if (i != 0) {
                 result.append('|');
--- a/src/share/classes/java/util/Properties.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/util/Properties.java	Mon Jun 16 17:45:26 2014 +0100
@@ -602,7 +602,7 @@
         if (bufLen < 0) {
             bufLen = Integer.MAX_VALUE;
         }
-        StringBuffer outBuffer = new StringBuffer(bufLen);
+        StringBuilder outBuffer = new StringBuilder(bufLen);
 
         for(int x=0; x<len; x++) {
             char aChar = theString.charAt(x);
--- a/src/share/classes/java/util/prefs/Base64.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/util/prefs/Base64.java	Mon Jun 16 17:45:26 2014 +0100
@@ -57,7 +57,7 @@
         int numFullGroups = aLen/3;
         int numBytesInPartialGroup = aLen - 3*numFullGroups;
         int resultLen = 4*((aLen + 2)/3);
-        StringBuffer result = new StringBuffer(resultLen);
+        StringBuilder result = new StringBuilder(resultLen);
         char[] intToAlpha = (alternate ? intToAltBase64 : intToBase64);
 
         // Translate all full groups from byte array elements to Base64
--- a/src/share/classes/java/util/regex/PatternSyntaxException.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/java/util/regex/PatternSyntaxException.java	Mon Jun 16 17:45:26 2014 +0100
@@ -105,7 +105,7 @@
      * @return  The full detail message
      */
     public String getMessage() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append(desc);
         if (index >= 0) {
             sb.append(" near index ");
--- a/src/share/classes/javax/imageio/stream/ImageInputStreamImpl.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/imageio/stream/ImageInputStreamImpl.java	Mon Jun 16 17:45:26 2014 +0100
@@ -289,7 +289,7 @@
     }
 
     public String readLine() throws IOException {
-        StringBuffer input = new StringBuffer();
+        StringBuilder input = new StringBuilder();
         int c = -1;
         boolean eol = false;
 
--- a/src/share/classes/javax/naming/BinaryRefAddr.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/naming/BinaryRefAddr.java	Mon Jun 16 17:45:26 2014 +0100
@@ -165,7 +165,7 @@
       * @return The non-null string representation of this address.
       */
     public String toString(){
-        StringBuffer str = new StringBuffer("Address Type: " + addrType + "\n");
+        StringBuilder str = new StringBuilder("Address Type: " + addrType + "\n");
 
         str.append("AddressContents: ");
         for (int i = 0; i<buf.length && i < 32; i++) {
--- a/src/share/classes/javax/naming/NameImpl.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/naming/NameImpl.java	Mon Jun 16 17:45:26 2014 +0100
@@ -104,7 +104,7 @@
         String endQuote;
         boolean start = true;
         boolean one = false;
-        StringBuffer answer = new StringBuffer(len);
+        StringBuilder answer = new StringBuilder(len);
 
         while (i < len) {
             // handle quoted strings
--- a/src/share/classes/javax/naming/RefAddr.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/naming/RefAddr.java	Mon Jun 16 17:45:26 2014 +0100
@@ -139,7 +139,7 @@
       * @return The non-null string representation of this address.
       */
     public String toString(){
-        StringBuffer str = new StringBuffer("Type: " + addrType + "\n");
+        StringBuilder str = new StringBuilder("Type: " + addrType + "\n");
 
         str.append("Content: " + getContent() + "\n");
         return (str.toString());
--- a/src/share/classes/javax/naming/Reference.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/naming/Reference.java	Mon Jun 16 17:45:26 2014 +0100
@@ -364,13 +364,13 @@
       * @return The non-null string representation of this reference.
       */
     public String toString() {
-        StringBuffer buf = new StringBuffer("Reference Class Name: " +
-                                            className + "\n");
+        StringBuilder sb = new StringBuilder("Reference Class Name: " +
+                                             className + "\n");
         int len = addrs.size();
         for (int i = 0; i < len; i++)
-            buf.append(get(i).toString());
+            sb.append(get(i).toString());
 
-        return buf.toString();
+        return sb.toString();
     }
 
     /**
--- a/src/share/classes/javax/naming/directory/BasicAttribute.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/naming/directory/BasicAttribute.java	Mon Jun 16 17:45:26 2014 +0100
@@ -211,7 +211,7 @@
       * @return The non-null string representation of this attribute.
       */
     public String toString() {
-        StringBuffer answer = new StringBuffer(attrID + ": ");
+        StringBuilder answer = new StringBuilder(attrID + ": ");
         if (values.size() == 0) {
             answer.append("No values");
         } else {
--- a/src/share/classes/javax/print/MimeType.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/print/MimeType.java	Mon Jun 16 17:45:26 2014 +0100
@@ -285,7 +285,7 @@
      */
     private String getStringValue() {
         if (myStringValue == null) {
-            StringBuffer result = new StringBuffer();
+            StringBuilder result = new StringBuilder();
             result.append (myPieces[0]);
             result.append ('/');
             result.append (myPieces[1]);
@@ -510,7 +510,7 @@
         int n = s.length();
         int i;
         char c;
-        StringBuffer result = new StringBuffer (n+2);
+        StringBuilder result = new StringBuilder (n+2);
         result.append ('\"');
         for (i = 0; i < n; ++ i) {
             c = s.charAt (i);
--- a/src/share/classes/javax/print/attribute/ResolutionSyntax.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/print/attribute/ResolutionSyntax.java	Mon Jun 16 17:45:26 2014 +0100
@@ -241,7 +241,7 @@
      *     (unchecked exception) Thrown if {@code units < 1}.
      */
     public String toString(int units, String unitsName) {
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
         result.append(getCrossFeedResolution (units));
         result.append('x');
         result.append(getFeedResolution (units));
@@ -326,7 +326,7 @@
      * resolution. The values are reported in the internal units of dphi.
      */
     public String toString() {
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
         result.append(crossFeedResolution);
         result.append('x');
         result.append(feedResolution);
--- a/src/share/classes/javax/print/attribute/SetOfIntegerSyntax.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/print/attribute/SetOfIntegerSyntax.java	Mon Jun 16 17:45:26 2014 +0100
@@ -540,7 +540,7 @@
      * <CODE>"<I>i</I>-<I>j</I>"</CODE> otherwise.
      */
     public String toString() {
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
         int n = members.length;
         for (int i = 0; i < n; i++) {
             if (i > 0) {
--- a/src/share/classes/javax/print/attribute/Size2DSyntax.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/print/attribute/Size2DSyntax.java	Mon Jun 16 17:45:26 2014 +0100
@@ -257,7 +257,7 @@
      *     (unchecked exception) Thrown if {@code units < 1}.
      */
     public String toString(int units, String unitsName) {
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
         result.append(getX (units));
         result.append('x');
         result.append(getY (units));
@@ -312,7 +312,7 @@
      * The values are reported in the internal units of micrometers.
      */
     public String toString() {
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
         result.append(x);
         result.append('x');
         result.append(y);
--- a/src/share/classes/javax/security/auth/kerberos/KerberosTicket.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/security/auth/kerberos/KerberosTicket.java	Mon Jun 16 17:45:26 2014 +0100
@@ -636,11 +636,11 @@
     public String toString() {
         if (destroyed)
             throw new IllegalStateException("This ticket is no longer valid");
-        StringBuffer caddrBuf = new StringBuffer();
+        StringBuilder caddrString = new StringBuilder();
         if (clientAddresses != null) {
             for (int i = 0; i < clientAddresses.length; i++) {
-                caddrBuf.append("clientAddresses[" + i + "] = " +
-                                 clientAddresses[i].toString());
+                caddrString.append("clientAddresses[" + i + "] = " +
+                        clientAddresses[i].toString());
             }
         }
         return ("Ticket (hex) = " + "\n" +
@@ -660,7 +660,7 @@
                 "End Time = " + endTime.toString() + "\n" +
                 "Renew Till = " + String.valueOf(renewTill) + "\n" +
                 "Client Addresses " +
-                (clientAddresses == null ? " Null " : caddrBuf.toString() +
+                (clientAddresses == null ? " Null " : caddrString.toString() +
                 "\n"));
     }
 
--- a/src/share/classes/javax/sound/sampled/CompoundControl.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/sound/sampled/CompoundControl.java	Mon Jun 16 17:45:26 2014 +0100
@@ -94,18 +94,18 @@
      */
     public String toString() {
 
-        StringBuffer buf = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (int i = 0; i < controls.length; i++) {
             if (i != 0) {
-                buf.append(", ");
+                sb.append(", ");
                 if ((i + 1) == controls.length) {
-                    buf.append("and ");
+                    sb.append("and ");
                 }
             }
-            buf.append(controls[i].getType());
+            sb.append(controls[i].getType());
         }
 
-        return new String(getType() + " Control containing " + buf + " Controls.");
+        return new String(getType() + " Control containing " + sb + " Controls.");
     }
 
 
--- a/src/share/classes/javax/sound/sampled/DataLine.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/sound/sampled/DataLine.java	Mon Jun 16 17:45:26 2014 +0100
@@ -471,23 +471,23 @@
          */
         public String toString() {
 
-            StringBuffer buf = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
 
             if ( (formats.length == 1) && (formats[0] != null) ) {
-                buf.append(" supporting format " + formats[0]);
+                sb.append(" supporting format " + formats[0]);
             } else if (getFormats().length > 1) {
-                buf.append(" supporting " + getFormats().length + " audio formats");
+                sb.append(" supporting " + getFormats().length + " audio formats");
             }
 
             if ( (minBufferSize != AudioSystem.NOT_SPECIFIED) && (maxBufferSize != AudioSystem.NOT_SPECIFIED) ) {
-                buf.append(", and buffers of " + minBufferSize + " to " + maxBufferSize + " bytes");
+                sb.append(", and buffers of " + minBufferSize + " to " + maxBufferSize + " bytes");
             } else if ( (minBufferSize != AudioSystem.NOT_SPECIFIED) && (minBufferSize > 0) ) {
-                buf.append(", and buffers of at least " + minBufferSize + " bytes");
+                sb.append(", and buffers of at least " + minBufferSize + " bytes");
             } else if (maxBufferSize != AudioSystem.NOT_SPECIFIED) {
-                buf.append(", and buffers of up to " + minBufferSize + " bytes");
+                sb.append(", and buffers of up to " + minBufferSize + " bytes");
             }
 
-            return new String(super.toString() + buf);
+            return new String(super.toString() + sb);
         }
     } // class Info
 
--- a/src/share/classes/javax/swing/JColorChooser.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/swing/JColorChooser.java	Mon Jun 16 17:45:26 2014 +0100
@@ -542,7 +542,7 @@
      * @return  a string representation of this <code>JColorChooser</code>
      */
     protected String paramString() {
-        StringBuffer chooserPanelsString = new StringBuffer("");
+        StringBuilder chooserPanelsString = new StringBuilder("");
         for (int i=0; i<chooserPanels.length; i++) {
             chooserPanelsString.append("[" + chooserPanels[i].toString()
                                        + "]");
--- a/src/share/classes/javax/swing/MultiUIDefaults.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/swing/MultiUIDefaults.java	Mon Jun 16 17:45:26 2014 +0100
@@ -190,18 +190,18 @@
 
     @Override
     public synchronized String toString() {
-        StringBuffer buf = new StringBuffer();
-        buf.append("{");
+        StringBuilder sb = new StringBuilder();
+        sb.append("{");
         Enumeration keys = keys();
         while (keys.hasMoreElements()) {
             Object key = keys.nextElement();
-            buf.append(key + "=" + get(key) + ", ");
+            sb.append(key + "=" + get(key) + ", ");
         }
-        int length = buf.length();
+        int length = sb.length();
         if (length > 1) {
-            buf.delete(length-2, length);
+            sb.delete(length-2, length);
         }
-        buf.append("}");
-        return buf.toString();
+        sb.append("}");
+        return sb.toString();
     }
 }
--- a/src/share/classes/javax/swing/RepaintManager.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/swing/RepaintManager.java	Mon Jun 16 17:45:26 2014 +0100
@@ -975,7 +975,7 @@
      * @return a String representation of this object
      */
     public synchronized String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         if(dirtyComponents != null)
             sb.append("" + dirtyComponents);
         return sb.toString();
--- a/src/share/classes/javax/swing/event/TreeModelEvent.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/swing/event/TreeModelEvent.java	Mon Jun 16 17:45:26 2014 +0100
@@ -292,24 +292,24 @@
      * @return a String representation of this object
      */
     public String toString() {
-        StringBuffer   retBuffer = new StringBuffer();
+        StringBuilder   sb = new StringBuilder();
 
-        retBuffer.append(getClass().getName() + " " +
-                         Integer.toString(hashCode()));
+        sb.append(getClass().getName() + " " +
+                  Integer.toString(hashCode()));
         if(path != null)
-            retBuffer.append(" path " + path);
+            sb.append(" path " + path);
         if(childIndices != null) {
-            retBuffer.append(" indices [ ");
+            sb.append(" indices [ ");
             for(int counter = 0; counter < childIndices.length; counter++)
-                retBuffer.append(Integer.toString(childIndices[counter])+ " ");
-            retBuffer.append("]");
+                sb.append(Integer.toString(childIndices[counter])+ " ");
+            sb.append("]");
         }
         if(children != null) {
-            retBuffer.append(" children [ ");
+            sb.append(" children [ ");
             for(int counter = 0; counter < children.length; counter++)
-                retBuffer.append(children[counter] + " ");
-            retBuffer.append("]");
+                sb.append(children[counter] + " ");
+            sb.append("]");
         }
-        return retBuffer.toString();
+        return sb.toString();
     }
 }
--- a/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java	Mon Jun 16 17:45:26 2014 +0100
@@ -1322,8 +1322,8 @@
                 return null;
             }
 
-            StringBuffer plainBuf = new StringBuffer();
-            StringBuffer htmlBuf = new StringBuffer();
+            StringBuilder plainBuf = new StringBuilder();
+            StringBuilder htmlBuf = new StringBuilder();
 
             htmlBuf.append("<html>\n<body>\n<ul>\n");
 
--- a/src/share/classes/javax/swing/plaf/basic/BasicListUI.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/swing/plaf/basic/BasicListUI.java	Mon Jun 16 17:45:26 2014 +0100
@@ -2855,23 +2855,23 @@
                     return null;
                 }
 
-                StringBuffer plainBuf = new StringBuffer();
-                StringBuffer htmlBuf = new StringBuffer();
+                StringBuilder plainStr = new StringBuilder();
+                StringBuilder htmlStr = new StringBuilder();
 
-                htmlBuf.append("<html>\n<body>\n<ul>\n");
+                htmlStr.append("<html>\n<body>\n<ul>\n");
 
                 for (int i = 0; i < values.length; i++) {
                     Object obj = values[i];
                     String val = ((obj == null) ? "" : obj.toString());
-                    plainBuf.append(val + "\n");
-                    htmlBuf.append("  <li>" + val + "\n");
+                    plainStr.append(val + "\n");
+                    htmlStr.append("  <li>" + val + "\n");
                 }
 
                 // remove the last newline
-                plainBuf.deleteCharAt(plainBuf.length() - 1);
-                htmlBuf.append("</ul>\n</body>\n</html>");
+                plainStr.deleteCharAt(plainStr.length() - 1);
+                htmlStr.append("</ul>\n</body>\n</html>");
 
-                return new BasicTransferable(plainBuf.toString(), htmlBuf.toString());
+                return new BasicTransferable(plainStr.toString(), htmlStr.toString());
             }
 
             return null;
--- a/src/share/classes/javax/swing/plaf/basic/BasicTableUI.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/swing/plaf/basic/BasicTableUI.java	Mon Jun 16 17:45:26 2014 +0100
@@ -2182,29 +2182,29 @@
                     return null;
                 }
 
-                StringBuffer plainBuf = new StringBuffer();
-                StringBuffer htmlBuf = new StringBuffer();
+                StringBuilder plainStr = new StringBuilder();
+                StringBuilder htmlStr = new StringBuilder();
 
-                htmlBuf.append("<html>\n<body>\n<table>\n");
+                htmlStr.append("<html>\n<body>\n<table>\n");
 
                 for (int row = 0; row < rows.length; row++) {
-                    htmlBuf.append("<tr>\n");
+                    htmlStr.append("<tr>\n");
                     for (int col = 0; col < cols.length; col++) {
                         Object obj = table.getValueAt(rows[row], cols[col]);
                         String val = ((obj == null) ? "" : obj.toString());
-                        plainBuf.append(val + "\t");
-                        htmlBuf.append("  <td>" + val + "</td>\n");
+                        plainStr.append(val + "\t");
+                        htmlStr.append("  <td>" + val + "</td>\n");
                     }
                     // we want a newline at the end of each line and not a tab
-                    plainBuf.deleteCharAt(plainBuf.length() - 1).append("\n");
-                    htmlBuf.append("</tr>\n");
+                    plainStr.deleteCharAt(plainStr.length() - 1).append("\n");
+                    htmlStr.append("</tr>\n");
                 }
 
                 // remove the last newline
-                plainBuf.deleteCharAt(plainBuf.length() - 1);
-                htmlBuf.append("</table>\n</body>\n</html>");
+                plainStr.deleteCharAt(plainStr.length() - 1);
+                htmlStr.append("</table>\n</body>\n</html>");
 
-                return new BasicTransferable(plainBuf.toString(), htmlBuf.toString());
+                return new BasicTransferable(plainStr.toString(), htmlStr.toString());
             }
 
             return null;
--- a/src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java	Mon Jun 16 17:45:26 2014 +0100
@@ -3213,10 +3213,10 @@
                     return null;
                 }
 
-                StringBuffer plainBuf = new StringBuffer();
-                StringBuffer htmlBuf = new StringBuffer();
-
-                htmlBuf.append("<html>\n<body>\n<ul>\n");
+                StringBuilder plainStr = new StringBuilder();
+                StringBuilder htmlStr = new StringBuilder();
+
+                htmlStr.append("<html>\n<body>\n<ul>\n");
 
                 TreeModel model = tree.getModel();
                 TreePath lastPath = null;
@@ -3227,17 +3227,17 @@
                     boolean leaf = model.isLeaf(node);
                     String label = getDisplayString(path, true, leaf);
 
-                    plainBuf.append(label + "\n");
-                    htmlBuf.append("  <li>" + label + "\n");
+                    plainStr.append(label + "\n");
+                    htmlStr.append("  <li>" + label + "\n");
                 }
 
                 // remove the last newline
-                plainBuf.deleteCharAt(plainBuf.length() - 1);
-                htmlBuf.append("</ul>\n</body>\n</html>");
+                plainStr.deleteCharAt(plainStr.length() - 1);
+                htmlStr.append("</ul>\n</body>\n</html>");
 
                 tree = null;
 
-                return new BasicTransferable(plainBuf.toString(), htmlBuf.toString());
+                return new BasicTransferable(plainStr.toString(), htmlStr.toString());
             }
 
             return null;
--- a/src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java	Mon Jun 16 17:45:26 2014 +0100
@@ -618,20 +618,20 @@
     }
 
     private String fileNameString(File[] files) {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (int i = 0; files != null && i < files.length; i++) {
             if (i > 0) {
-                buf.append(" ");
+                sb.append(" ");
             }
             if (files.length > 1) {
-                buf.append("\"");
+                sb.append("\"");
             }
-            buf.append(fileNameString(files[i]));
+            sb.append(fileNameString(files[i]));
             if (files.length > 1) {
-                buf.append("\"");
+                sb.append("\"");
             }
         }
-        return buf.toString();
+        return sb.toString();
     }
 
     /* The following methods are used by the PropertyChange Listener */
--- a/src/share/classes/javax/swing/plaf/nimbus/State.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/swing/plaf/nimbus/State.java	Mon Jun 16 17:45:26 2014 +0100
@@ -179,35 +179,35 @@
         }
 
         private static String toString(int state) {
-            StringBuffer buffer = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             if ((state & SynthConstants.DEFAULT) == SynthConstants.DEFAULT) {
-                buffer.append("Default");
+                sb.append("Default");
             }
             if ((state & SynthConstants.DISABLED) == SynthConstants.DISABLED) {
-                if (buffer.length() > 0) buffer.append("+");
-                buffer.append("Disabled");
+                if (sb.length() > 0) sb.append("+");
+                sb.append("Disabled");
             }
             if ((state & SynthConstants.ENABLED) == SynthConstants.ENABLED) {
-                if (buffer.length() > 0) buffer.append("+");
-                buffer.append("Enabled");
+                if (sb.length() > 0) sb.append("+");
+                sb.append("Enabled");
             }
             if ((state & SynthConstants.FOCUSED) == SynthConstants.FOCUSED) {
-                if (buffer.length() > 0) buffer.append("+");
-                buffer.append("Focused");
+                if (sb.length() > 0) sb.append("+");
+                sb.append("Focused");
             }
             if ((state & SynthConstants.MOUSE_OVER) == SynthConstants.MOUSE_OVER) {
-                if (buffer.length() > 0) buffer.append("+");
-                buffer.append("MouseOver");
+                if (sb.length() > 0) sb.append("+");
+                sb.append("MouseOver");
             }
             if ((state & SynthConstants.PRESSED) == SynthConstants.PRESSED) {
-                if (buffer.length() > 0) buffer.append("+");
-                buffer.append("Pressed");
+                if (sb.length() > 0) sb.append("+");
+                sb.append("Pressed");
             }
             if ((state & SynthConstants.SELECTED) == SynthConstants.SELECTED) {
-                if (buffer.length() > 0) buffer.append("+");
-                buffer.append("Selected");
+                if (sb.length() > 0) sb.append("+");
+                sb.append("Selected");
             }
-            return buffer.toString();
+            return sb.toString();
         }
     }
 }
--- a/src/share/classes/javax/swing/plaf/synth/ParsedSynthStyle.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/swing/plaf/synth/ParsedSynthStyle.java	Mon Jun 16 17:45:26 2014 +0100
@@ -156,7 +156,7 @@
     }
 
     public String toString() {
-        StringBuffer text = new StringBuffer(super.toString());
+        StringBuilder text = new StringBuilder(super.toString());
         if (_painters != null) {
             text.append(",painters=[");
             for (int i = 0; i < +_painters.length; i++) {
@@ -208,7 +208,7 @@
         }
 
         public String toString() {
-            StringBuffer text = new StringBuffer(super.toString());
+            StringBuilder text = new StringBuilder(super.toString());
             text.append(",painters=[");
             if (_painterInfo != null) {
                 for (int i = 0; i < +_painterInfo.length; i++) {
--- a/src/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java	Mon Jun 16 17:45:26 2014 +0100
@@ -1153,23 +1153,23 @@
      */
     public String toString() {
         int                selCount = getSelectionCount();
-        StringBuffer       retBuffer = new StringBuffer();
+        StringBuilder      sb = new StringBuilder();
         int[]              rows;
 
         if(rowMapper != null)
             rows = rowMapper.getRowsForPaths(selection);
         else
             rows = null;
-        retBuffer.append(getClass().getName() + " " + hashCode() + " [ ");
+        sb.append(getClass().getName() + " " + hashCode() + " [ ");
         for(int counter = 0; counter < selCount; counter++) {
             if(rows != null)
-                retBuffer.append(selection[counter].toString() + "@" +
-                                 Integer.toString(rows[counter])+ " ");
+                sb.append(selection[counter].toString() + "@" +
+                          Integer.toString(rows[counter])+ " ");
             else
-                retBuffer.append(selection[counter].toString() + " ");
+                sb.append(selection[counter].toString() + " ");
         }
-        retBuffer.append("]");
-        return retBuffer.toString();
+        sb.append("]");
+        return sb.toString();
     }
 
     /**
--- a/src/share/classes/javax/swing/tree/TreePath.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/javax/swing/tree/TreePath.java	Mon Jun 16 17:45:26 2014 +0100
@@ -349,7 +349,7 @@
      * @return a String representation of this object
      */
     public String toString() {
-        StringBuffer tempSpot = new StringBuffer("[");
+        StringBuilder tempSpot = new StringBuilder("[");
 
         for(int counter = 0, maxCounter = getPathCount();counter < maxCounter;
             counter++) {
--- a/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMExcC14NMethod.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMExcC14NMethod.java	Mon Jun 16 17:45:26 2014 +0100
@@ -118,7 +118,7 @@
         }
 
         ExcC14NParameterSpec params = (ExcC14NParameterSpec)spec;
-        StringBuffer prefixListAttr = new StringBuffer("");
+        StringBuilder prefixListAttr = new StringBuilder("");
         @SuppressWarnings("unchecked")
         List<String> prefixList = params.getPrefixList();
         for (int i = 0, size = prefixList.size(); i < size; i++) {
--- a/src/share/classes/sun/applet/AppletViewer.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/applet/AppletViewer.java	Mon Jun 16 17:45:26 2014 +0100
@@ -1000,15 +1000,15 @@
      * Scan identifier
      */
     public static String scanIdentifier(Reader in) throws IOException {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         while (true) {
             if (((c >= 'a') && (c <= 'z')) ||
                 ((c >= 'A') && (c <= 'Z')) ||
                 ((c >= '0') && (c <= '9')) || (c == '_')) {
-                buf.append((char)c);
+                sb.append((char) c);
                 c = in.read();
             } else {
-                return buf.toString();
+                return sb.toString();
             }
         }
     }
@@ -1031,19 +1031,19 @@
                     quote = c;
                     c = in.read();
                 }
-                StringBuffer buf = new StringBuffer();
+                StringBuilder sb = new StringBuilder();
                 while ((c > 0) &&
                        (((quote < 0) && (c != ' ') && (c != '\t') &&
                          (c != '\n') && (c != '\r') && (c != '>'))
                         || ((quote >= 0) && (c != quote)))) {
-                    buf.append((char)c);
+                    sb.append((char) c);
                     c = in.read();
                 }
                 if (c == quote) {
                     c = in.read();
                 }
                 skipSpace(in);
-                val = buf.toString();
+                val = sb.toString();
             }
             //statusMsgStream.println("PUT " + att + " = '" + val + "'");
             if (! val.equals("")) {
--- a/src/share/classes/sun/font/Decoration.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/font/Decoration.java	Mon Jun 16 17:45:26 2014 +0100
@@ -428,17 +428,17 @@
 
 
         public String toString() {
-            StringBuffer buf = new StringBuffer();
-            buf.append(super.toString());
-            buf.append("[");
-            if (fgPaint != null) buf.append("fgPaint: " + fgPaint);
-            if (bgPaint != null) buf.append(" bgPaint: " + bgPaint);
-            if (swapColors) buf.append(" swapColors: true");
-            if (strikethrough) buf.append(" strikethrough: true");
-            if (stdUnderline != null) buf.append(" stdUnderline: " + stdUnderline);
-            if (imUnderline != null) buf.append(" imUnderline: " + imUnderline);
-            buf.append("]");
-            return buf.toString();
+            StringBuilder sb = new StringBuilder();
+            sb.append(super.toString());
+            sb.append("[");
+            if (fgPaint != null) sb.append("fgPaint: " + fgPaint);
+            if (bgPaint != null) sb.append(" bgPaint: " + bgPaint);
+            if (swapColors) sb.append(" swapColors: true");
+            if (strikethrough) sb.append(" strikethrough: true");
+            if (stdUnderline != null) sb.append(" stdUnderline: " + stdUnderline);
+            if (imUnderline != null) sb.append(" imUnderline: " + imUnderline);
+            sb.append("]");
+            return sb.toString();
         }
     }
 }
--- a/src/share/classes/sun/font/ExtendedTextSourceLabel.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/font/ExtendedTextSourceLabel.java	Mon Jun 16 17:45:26 2014 +0100
@@ -896,31 +896,31 @@
     if (true) {
         return source.toString(TextSource.WITHOUT_CONTEXT);
     }
-    StringBuffer buf = new StringBuffer();
-    buf.append(super.toString());
-    buf.append("[source:");
-    buf.append(source.toString(TextSource.WITHOUT_CONTEXT));
-    buf.append(", lb:");
-    buf.append(lb);
-    buf.append(", ab:");
-    buf.append(ab);
-    buf.append(", vb:");
-    buf.append(vb);
-    buf.append(", gv:");
-    buf.append(gv);
-    buf.append(", ci: ");
+    StringBuilder sb = new StringBuilder();
+    sb.append(super.toString());
+    sb.append("[source:");
+    sb.append(source.toString(TextSource.WITHOUT_CONTEXT));
+    sb.append(", lb:");
+    sb.append(lb);
+    sb.append(", ab:");
+    sb.append(ab);
+    sb.append(", vb:");
+    sb.append(vb);
+    sb.append(", gv:");
+    sb.append(gv);
+    sb.append(", ci: ");
     if (charinfo == null) {
-      buf.append("null");
+      sb.append("null");
     } else {
-      buf.append(charinfo[0]);
+      sb.append(charinfo[0]);
       for (int i = 1; i < charinfo.length;) {
-        buf.append(i % numvals == 0 ? "; " : ", ");
-        buf.append(charinfo[i]);
+        sb.append(i % numvals == 0 ? "; " : ", ");
+        sb.append(charinfo[i]);
       }
     }
-    buf.append("]");
+    sb.append("]");
 
-    return buf.toString();
+    return sb.toString();
   }
 
   //public static ExtendedTextLabel create(TextSource source) {
--- a/src/share/classes/sun/font/StandardTextSource.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/font/StandardTextSource.java	Mon Jun 16 17:45:26 2014 +0100
@@ -210,16 +210,16 @@
   }
 
   public String toString(boolean withContext) {
-    StringBuffer buf = new StringBuffer(super.toString());
-    buf.append("[start:");
-    buf.append(start);
-    buf.append(", len:" );
-    buf.append(len);
-    buf.append(", cstart:");
-    buf.append(cstart);
-    buf.append(", clen:" );
-    buf.append(clen);
-    buf.append(", chars:\"");
+    StringBuilder sb = new StringBuilder(super.toString());
+    sb.append("[start:");
+    sb.append(start);
+    sb.append(", len:" );
+    sb.append(len);
+    sb.append(", cstart:");
+    sb.append(cstart);
+    sb.append(", clen:" );
+    sb.append(clen);
+    sb.append(", chars:\"");
     int chStart, chLimit;
     if (withContext == WITH_CONTEXT) {
         chStart = cstart;
@@ -231,23 +231,23 @@
     }
     for (int i = chStart; i < chLimit; ++i) {
       if (i > chStart) {
-        buf.append(" ");
+        sb.append(" ");
       }
-      buf.append(Integer.toHexString(chars[i]));
+      sb.append(Integer.toHexString(chars[i]));
     }
-    buf.append("\"");
-    buf.append(", level:");
-    buf.append(level);
-    buf.append(", flags:");
-    buf.append(flags);
-    buf.append(", font:");
-    buf.append(font);
-    buf.append(", frc:");
-    buf.append(frc);
-    buf.append(", cm:");
-    buf.append(cm);
-    buf.append("]");
+    sb.append("\"");
+    sb.append(", level:");
+    sb.append(level);
+    sb.append(", flags:");
+    sb.append(flags);
+    sb.append(", font:");
+    sb.append(font);
+    sb.append(", frc:");
+    sb.append(frc);
+    sb.append(", cm:");
+    sb.append(cm);
+    sb.append("]");
 
-    return buf.toString();
+    return sb.toString();
   }
 }
--- a/src/share/classes/sun/font/Type1Font.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/font/Type1Font.java	Mon Jun 16 17:45:26 2014 +0100
@@ -529,7 +529,7 @@
     }
 
     private String expandName(String s, boolean tryExpandAbbreviations) {
-        StringBuffer res = new StringBuffer(s.length() + 10);
+        StringBuilder res = new StringBuilder(s.length() + 10);
         int start=0, end;
 
         while(start < s.length()) {
--- a/src/share/classes/sun/java2d/opengl/OGLContext.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/java2d/opengl/OGLContext.java	Mon Jun 16 17:45:26 2014 +0100
@@ -201,29 +201,29 @@
 
         @Override
         public String toString() {
-            StringBuffer buf = new StringBuffer(super.toString());
+            StringBuilder sb = new StringBuilder(super.toString());
             if ((caps & CAPS_EXT_FBOBJECT) != 0) {
-                buf.append("CAPS_EXT_FBOBJECT|");
+                sb.append("CAPS_EXT_FBOBJECT|");
             }
             if ((caps & CAPS_STORED_ALPHA) != 0) {
-                buf.append("CAPS_STORED_ALPHA|");
+                sb.append("CAPS_STORED_ALPHA|");
             }
             if ((caps & CAPS_DOUBLEBUFFERED) != 0) {
-                buf.append("CAPS_DOUBLEBUFFERED|");
+                sb.append("CAPS_DOUBLEBUFFERED|");
             }
             if ((caps & CAPS_EXT_LCD_SHADER) != 0) {
-                buf.append("CAPS_EXT_LCD_SHADER|");
+                sb.append("CAPS_EXT_LCD_SHADER|");
             }
             if ((caps & CAPS_EXT_BIOP_SHADER) != 0) {
-                buf.append("CAPS_BIOP_SHADER|");
+                sb.append("CAPS_BIOP_SHADER|");
             }
             if ((caps & CAPS_EXT_GRAD_SHADER) != 0) {
-                buf.append("CAPS_EXT_GRAD_SHADER|");
+                sb.append("CAPS_EXT_GRAD_SHADER|");
             }
             if ((caps & CAPS_EXT_TEXRECT) != 0) {
-                buf.append("CAPS_EXT_TEXRECT|");
+                sb.append("CAPS_EXT_TEXRECT|");
             }
-            return buf.toString();
+            return sb.toString();
         }
     }
 }
--- a/src/share/classes/sun/java2d/pipe/Region.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/java2d/pipe/Region.java	Mon Jun 16 17:45:26 2014 +0100
@@ -1277,7 +1277,7 @@
     }
 
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("Region[[");
         sb.append(lox);
         sb.append(", ");
--- a/src/share/classes/sun/java2d/pipe/hw/ContextCapabilities.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/java2d/pipe/hw/ContextCapabilities.java	Mon Jun 16 17:45:26 2014 +0100
@@ -93,37 +93,37 @@
 
     @Override
     public String toString() {
-        StringBuffer buf =
-            new StringBuffer("ContextCapabilities: adapter=" +
+        StringBuilder sb =
+            new StringBuilder("ContextCapabilities: adapter=" +
                              adapterId+", caps=");
         if (caps == CAPS_EMPTY) {
-            buf.append("CAPS_EMPTY");
+            sb.append("CAPS_EMPTY");
         } else {
             if ((caps & CAPS_RT_PLAIN_ALPHA) != 0) {
-                buf.append("CAPS_RT_PLAIN_ALPHA|");
+                sb.append("CAPS_RT_PLAIN_ALPHA|");
             }
             if ((caps & CAPS_RT_TEXTURE_ALPHA) != 0) {
-                buf.append("CAPS_RT_TEXTURE_ALPHA|");
+                sb.append("CAPS_RT_TEXTURE_ALPHA|");
             }
             if ((caps & CAPS_RT_TEXTURE_OPAQUE) != 0) {
-                buf.append("CAPS_RT_TEXTURE_OPAQUE|");
+                sb.append("CAPS_RT_TEXTURE_OPAQUE|");
             }
             if ((caps & CAPS_MULTITEXTURE) != 0) {
-                buf.append("CAPS_MULTITEXTURE|");
+                sb.append("CAPS_MULTITEXTURE|");
             }
             if ((caps & CAPS_TEXNONPOW2) != 0) {
-                buf.append("CAPS_TEXNONPOW2|");
+                sb.append("CAPS_TEXNONPOW2|");
             }
             if ((caps & CAPS_TEXNONSQUARE) != 0) {
-                buf.append("CAPS_TEXNONSQUARE|");
+                sb.append("CAPS_TEXNONSQUARE|");
             }
             if ((caps & CAPS_PS20) != 0) {
-                buf.append("CAPS_PS20|");
+                sb.append("CAPS_PS20|");
             }
             if ((caps & CAPS_PS30) != 0) {
-                buf.append("CAPS_PS30|");
+                sb.append("CAPS_PS30|");
             }
         }
-        return buf.toString();
+        return sb.toString();
     }
 }
--- a/src/share/classes/sun/jvmstat/monitor/HostIdentifier.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/jvmstat/monitor/HostIdentifier.java	Mon Jun 16 17:45:26 2014 +0100
@@ -358,7 +358,7 @@
 
         URI nuri = null;
 
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
         sb.append(scheme).append("://");
 
--- a/src/share/classes/sun/jvmstat/monitor/MonitoredHost.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/jvmstat/monitor/MonitoredHost.java	Mon Jun 16 17:45:26 2014 +0100
@@ -257,7 +257,7 @@
                      throws MonitorException {
         String hostname = hostId.getHost();
         String scheme = hostId.getScheme();
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
         assert hostname != null;
 
--- a/src/share/classes/sun/jvmstat/monitor/VmIdentifier.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/jvmstat/monitor/VmIdentifier.java	Mon Jun 16 17:45:26 2014 +0100
@@ -255,7 +255,7 @@
      *                            a MonitorException in a future version.
      */
     public HostIdentifier getHostIdentifier() throws URISyntaxException {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         if (getScheme() != null) {
             sb.append(getScheme()).append(":");
         }
--- a/src/share/classes/sun/management/Agent.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/management/Agent.java	Mon Jun 16 17:45:26 2014 +0100
@@ -401,7 +401,7 @@
             if (home == null) {
                 throw new Error("Can't find java.home ??");
             }
-            StringBuffer defaultFileName = new StringBuffer(home);
+            StringBuilder defaultFileName = new StringBuilder(home);
             defaultFileName.append(File.separator).append("lib");
             defaultFileName.append(File.separator).append("management");
             defaultFileName.append(File.separator).append("management.properties");
@@ -495,7 +495,7 @@
         if (params == null || params.length == 0) {
             error(key);
         } else {
-            StringBuffer message = new StringBuffer(params[0]);
+            StringBuilder message = new StringBuilder(params[0]);
             for (int i = 1; i < params.length; i++) {
                 message.append(" " + params[i]);
             }
--- a/src/share/classes/sun/management/snmp/jvminstr/JvmThreadInstanceEntryImpl.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/management/snmp/jvminstr/JvmThreadInstanceEntryImpl.java	Mon Jun 16 17:45:26 2014 +0100
@@ -311,19 +311,19 @@
         StackTraceElement[] stackTrace = info.getStackTrace();
         //We append the stack trace in a buffer
         // XXX Revisit: should check isDebugOn()
-        StringBuffer b = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         final int stackSize = stackTrace.length;
         log.debug("getJvmThreadInstStackTrace", "Stack size : " + stackSize);
         for(int i = 0; i < stackSize; i++) {
             log.debug("getJvmThreadInstStackTrace", "Append " +
                       stackTrace[i].toString());
-            b.append(stackTrace[i].toString());
+            sb.append(stackTrace[i].toString());
             //Append \n at the end of each line except the last one
             if(i < stackSize)
-                b.append("\n");
+                sb.append("\n");
         }
         //The stack trace is truncated if its size exceeds 255.
-        return validPathElementTC(b.toString());
+        return validPathElementTC(sb.toString());
     }
     static final MibLogger log =
         new MibLogger(JvmThreadInstanceEntryImpl.class);
--- a/src/share/classes/sun/misc/MessageUtils.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/misc/MessageUtils.java	Mon Jun 16 17:45:26 2014 +0100
@@ -55,7 +55,7 @@
     }
 
     public static String subst(String patt, String args[]) {
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
         int len = patt.length();
         for (int i = 0; i >= 0 && i < len; i++) {
             char ch = patt.charAt(i);
--- a/src/share/classes/sun/misc/UUDecoder.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/misc/UUDecoder.java	Mon Jun 16 17:45:26 2014 +0100
@@ -123,7 +123,7 @@
         throws IOException {
         int i, c1, c2, c3, c4;
         int a, b, c;
-        StringBuffer x = new StringBuffer();
+        StringBuilder x = new StringBuilder();
 
         for (i = 0; i < 4; i++) {
             c1 = inStream.read();
@@ -152,7 +152,7 @@
      */
     protected void decodeBufferPrefix(PushbackInputStream inStream, OutputStream outStream) throws IOException {
         int     c;
-        StringBuffer q = new StringBuffer(32);
+        StringBuilder q = new StringBuilder(32);
         String r;
         boolean sawNewLine;
 
--- a/src/share/classes/sun/net/TransferProtocolClient.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/net/TransferProtocolClient.java	Mon Jun 16 17:45:26 2014 +0100
@@ -53,7 +53,7 @@
      * number. Returns -1 on failure.
      */
     public int readServerResponse() throws IOException {
-        StringBuffer    replyBuf = new StringBuffer(32);
+        StringBuilder   replyBuf = new StringBuilder(32);
         int             c;
         int             continuingCode = -1;
         int             code;
--- a/src/share/classes/sun/net/ftp/impl/FtpClient.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/net/ftp/impl/FtpClient.java	Mon Jun 16 17:45:26 2014 +0100
@@ -408,7 +408,7 @@
      * number. Returns -1 on failure.
      */
     private int readServerResponse() throws IOException {
-        StringBuffer replyBuf = new StringBuffer(32);
+        StringBuilder replyBuf = new StringBuilder(32);
         int c;
         int continuingCode = -1;
         int code;
@@ -1050,7 +1050,7 @@
         // keep the welcome message around so we can
         // put it in the resulting HTML page.
         String l;
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (int i = 0; i < serverResponse.size(); i++) {
             l = serverResponse.elementAt(i);
             if (l != null) {
@@ -1095,7 +1095,7 @@
 
         // keep the welcome message around so we can
         // put it in the resulting HTML page.
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         if (serverResponse != null) {
             for (String l : serverResponse) {
                 if (l != null) {
@@ -1493,7 +1493,7 @@
          * So we need to remove the 1st and last line
          */
         Vector<String> resp = getResponseStrings();
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (int i = 1; i < resp.size() - 1; i++) {
             sb.append(resp.get(i));
         }
@@ -1985,7 +1985,7 @@
      *         by the server.
      */
     public String getLastResponseString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         if (serverResponse != null) {
             for (String l : serverResponse) {
                 if (l != null) {
@@ -2188,7 +2188,7 @@
         }
         // on multiple lines answers, like the ones above, remove 1st and last
         // line, concat the the others.
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (int i = 1; i < resp.size() - 1; i++) {
             sb.append(resp.get(i).substring(3));
         }
--- a/src/share/classes/sun/net/www/MimeEntry.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/net/www/MimeEntry.java	Mon Jun 16 17:45:26 2014 +0100
@@ -281,52 +281,52 @@
     }
 
     public synchronized String toProperty() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
         String separator = "; ";
         boolean needSeparator = false;
 
         int action = getAction();
         if (action != MimeEntry.UNKNOWN) {
-            buf.append("action=" + actionKeywords[action]);
+            sb.append("action=" + actionKeywords[action]);
             needSeparator = true;
         }
 
         String command = getLaunchString();
         if (command != null && command.length() > 0) {
             if (needSeparator) {
-                buf.append(separator);
+                sb.append(separator);
             }
-            buf.append("application=" + command);
+            sb.append("application=" + command);
             needSeparator = true;
         }
 
         if (getImageFileName() != null) {
             if (needSeparator) {
-                buf.append(separator);
+                sb.append(separator);
             }
-            buf.append("icon=" + getImageFileName());
+            sb.append("icon=" + getImageFileName());
             needSeparator = true;
         }
 
         String extensions = getExtensionsAsList();
         if (extensions.length() > 0) {
             if (needSeparator) {
-                buf.append(separator);
+                sb.append(separator);
             }
-            buf.append("file_extensions=" + extensions);
+            sb.append("file_extensions=" + extensions);
             needSeparator = true;
         }
 
         String description = getDescription();
         if (description != null && !description.equals(getType())) {
             if (needSeparator) {
-                buf.append(separator);
+                sb.append(separator);
             }
-            buf.append("description=" + description);
+            sb.append("description=" + description);
         }
 
-        return buf.toString();
+        return sb.toString();
     }
 
     public String toString() {
--- a/src/share/classes/sun/net/www/http/HttpClient.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/net/www/http/HttpClient.java	Mon Jun 16 17:45:26 2014 +0100
@@ -558,7 +558,7 @@
             // Do not use URLStreamHandler.toExternalForm as the fragment
             // should not be part of the RequestURI. It should be an
             // absolute URI which does not have a fragment part.
-            StringBuffer result = new StringBuffer(128);
+            StringBuilder result = new StringBuilder(128);
             result.append(url.getProtocol());
             result.append(":");
             if (url.getAuthority() != null && url.getAuthority().length() > 0) {
--- a/src/share/classes/sun/net/www/protocol/file/FileURLConnection.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/net/www/protocol/file/FileURLConnection.java	Mon Jun 16 17:45:26 2014 +0100
@@ -191,7 +191,7 @@
             if (isDirectory) {
                 FileNameMap map = java.net.URLConnection.getFileNameMap();
 
-                StringBuffer buf = new StringBuffer();
+                StringBuilder sb = new StringBuilder();
 
                 if (files == null) {
                     throw new FileNotFoundException(filename);
@@ -201,11 +201,11 @@
 
                 for (int i = 0 ; i < files.size() ; i++) {
                     String fileName = files.get(i);
-                    buf.append(fileName);
-                    buf.append("\n");
+                    sb.append(fileName);
+                    sb.append("\n");
                 }
                 // Put it into a (default) locale-specific byte-stream.
-                is = new ByteArrayInputStream(buf.toString().getBytes());
+                is = new ByteArrayInputStream(sb.toString().getBytes());
             } else {
                 throw new FileNotFoundException(filename);
             }
--- a/src/share/classes/sun/net/www/protocol/http/DigestAuthentication.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/net/www/protocol/http/DigestAuthentication.java	Mon Jun 16 17:45:26 2014 +0100
@@ -532,7 +532,7 @@
         }
         byte[] digest = md.digest();
 
-        StringBuffer res = new StringBuffer(digest.length * 2);
+        StringBuilder res = new StringBuilder(digest.length * 2);
         for (int i = 0; i < digest.length; i++) {
             int hashchar = ((digest[i] >>> 4) & 0xf);
             res.append(charArray[hashchar]);
--- a/src/share/classes/sun/nio/ch/ServerSocketChannelImpl.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/nio/ch/ServerSocketChannelImpl.java	Mon Jun 16 17:45:26 2014 +0100
@@ -382,7 +382,7 @@
     }
 
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append(this.getClass().getName());
         sb.append('[');
         if (!isOpen()) {
--- a/src/share/classes/sun/nio/ch/SocketChannelImpl.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/nio/ch/SocketChannelImpl.java	Mon Jun 16 17:45:26 2014 +0100
@@ -983,7 +983,7 @@
 
     @Override
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append(this.getClass().getSuperclass().getName());
         sb.append('[');
         if (!isOpen())
--- a/src/share/classes/sun/print/PSPrinterJob.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/print/PSPrinterJob.java	Mon Jun 16 17:45:26 2014 +0100
@@ -1269,7 +1269,7 @@
                     CharsetString cs = acs[i];
                     CharsetEncoder fontCS = cs.fontDescriptor.encoder;
 
-                    StringBuffer nativeStr = new StringBuffer();
+                    StringBuilder nativeStr = new StringBuilder();
                     byte[] strSeg = new byte[cs.length * 2];
                     int len = 0;
                     try {
--- a/src/share/classes/sun/reflect/MethodAccessorGenerator.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/reflect/MethodAccessorGenerator.java	Mon Jun 16 17:45:26 2014 +0100
@@ -751,14 +751,14 @@
     }
 
     private String buildInternalSignature() {
-        StringBuffer buf = new StringBuffer();
-        buf.append("(");
+        StringBuilder sb = new StringBuilder();
+        sb.append("(");
         for (int i = 0; i < parameterTypes.length; i++) {
-            buf.append(getClassName(parameterTypes[i], true));
+            sb.append(getClassName(parameterTypes[i], true));
         }
-        buf.append(")");
-        buf.append(getClassName(returnType, true));
-        return buf.toString();
+        sb.append(")");
+        sb.append(getClassName(returnType, true));
+        return sb.toString();
     }
 
     private static synchronized String generateName(boolean isConstructor,
--- a/src/share/classes/sun/rmi/server/Activation.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/rmi/server/Activation.java	Mon Jun 16 17:45:26 2014 +0100
@@ -1239,7 +1239,7 @@
                 checkArgs(desc, argv);
 
                 if (debugExec) {
-                    StringBuffer sb = new StringBuffer(argv[0]);
+                    StringBuilder sb = new StringBuilder(argv[0]);
                     int j;
                     for (j = 1; j < argv.length; j++) {
                         sb.append(' ');
--- a/src/share/classes/sun/rmi/server/LoaderHandler.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/rmi/server/LoaderHandler.java	Mon Jun 16 17:45:26 2014 +0100
@@ -793,7 +793,7 @@
         } else if (urls.length == 1) {
             return urls[0].toExternalForm();
         } else {
-            StringBuffer path = new StringBuffer(urls[0].toExternalForm());
+            StringBuilder path = new StringBuilder(urls[0].toExternalForm());
             for (int i = 1; i < urls.length; i++) {
                 path.append(' ');
                 path.append(urls[i].toExternalForm());
--- a/src/share/classes/sun/rmi/server/Util.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/rmi/server/Util.java	Mon Jun 16 17:45:26 2014 +0100
@@ -391,7 +391,7 @@
      * the definition of a "method descriptor".
      */
     private static String getMethodNameAndDescriptor(Method m) {
-        StringBuffer desc = new StringBuffer(m.getName());
+        StringBuilder desc = new StringBuilder(m.getName());
         desc.append('(');
         Class<?>[] paramTypes = m.getParameterTypes();
         for (int i = 0; i < paramTypes.length; i++) {
--- a/src/share/classes/sun/security/acl/AclImpl.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/acl/AclImpl.java	Mon Jun 16 17:45:26 2014 +0100
@@ -253,7 +253,7 @@
      * ACL.
      */
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         Enumeration<AclEntry> entries = entries();
         while (entries.hasMoreElements()) {
             AclEntry entry = entries.nextElement();
--- a/src/share/classes/sun/security/jgss/GSSCredentialImpl.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/jgss/GSSCredentialImpl.java	Mon Jun 16 17:45:26 2014 +0100
@@ -636,29 +636,29 @@
         }
 
         GSSCredentialSpi element = null;
-        StringBuffer buffer = new StringBuffer("[GSSCredential: ");
+        StringBuilder sb = new StringBuilder("[GSSCredential: ");
         Object[] elements = hashtable.entrySet().toArray();
         for (int i = 0; i < elements.length; i++) {
             try {
-                buffer.append('\n');
+                sb.append('\n');
                 element = (GSSCredentialSpi)
                     ((Map.Entry)elements[i]).getValue();
-                buffer.append(element.getName());
-                buffer.append(' ');
-                buffer.append(element.getMechanism());
-                buffer.append(element.isInitiatorCredential() ?
-                              " Initiate" : "");
-                buffer.append(element.isAcceptorCredential() ?
-                              " Accept" : "");
-                buffer.append(" [");
-                buffer.append(element.getClass());
-                buffer.append(']');
+                sb.append(element.getName());
+                sb.append(' ');
+                sb.append(element.getMechanism());
+                sb.append(element.isInitiatorCredential() ?
+                          " Initiate" : "");
+                sb.append(element.isAcceptorCredential() ?
+                          " Accept" : "");
+                sb.append(" [");
+                sb.append(element.getClass());
+                sb.append(']');
             } catch (GSSException e) {
                 // skip to next element
             }
         }
-        buffer.append(']');
-        return buffer.toString();
+        sb.append(']');
+        return sb.toString();
     }
 
     static class SearchKey {
--- a/src/share/classes/sun/security/jgss/GSSHeader.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/jgss/GSSHeader.java	Mon Jun 16 17:45:26 2014 +0100
@@ -327,7 +327,7 @@
     private  String getHexBytes(byte[] bytes, int len)
         throws IOException {
 
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (int i = 0; i < len; i++) {
 
             int b1 = (bytes[i]>>4) & 0x0f;
--- a/src/share/classes/sun/security/jgss/GSSToken.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/jgss/GSSToken.java	Mon Jun 16 17:45:26 2014 +0100
@@ -216,7 +216,7 @@
     }
 
     public static final String getHexBytes(byte[] bytes, int pos, int len) {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (int i = pos; i < (pos+len); i++) {
             int b1 = (bytes[i]>>4) & 0x0f;
             int b2 = bytes[i] & 0x0f;
--- a/src/share/classes/sun/security/jgss/ProviderList.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/jgss/ProviderList.java	Mon Jun 16 17:45:26 2014 +0100
@@ -536,12 +536,12 @@
 
         // For debugging
         public String toString() {
-            StringBuffer buf = new StringBuffer("<");
-            buf.append(p.getName());
-            buf.append(", ");
-            buf.append(oid);
-            buf.append(">");
-            return buf.toString();
+            StringBuilder sb = new StringBuilder("<");
+            sb.append(p.getName());
+            sb.append(", ");
+            sb.append(oid);
+            sb.append(">");
+            return sb.toString();
         }
     }
 }
--- a/src/share/classes/sun/security/jgss/TokenTracker.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/jgss/TokenTracker.java	Mon Jun 16 17:45:26 2014 +0100
@@ -336,19 +336,19 @@
     }
 
     public String toString() {
-        StringBuffer buf = new StringBuffer("TokenTracker: ");
-        buf.append(" initNumber=").append(initNumber);
-        buf.append(" windowStart=").append(windowStart);
-        buf.append(" expectedNumber=").append(expectedNumber);
-        buf.append(" windowStartIndex=").append(windowStartIndex);
-        buf.append("\n\tIntervals are: {");
+        StringBuilder sb = new StringBuilder("TokenTracker: ");
+        sb.append(" initNumber=").append(initNumber);
+        sb.append(" windowStart=").append(windowStart);
+        sb.append(" expectedNumber=").append(expectedNumber);
+        sb.append(" windowStartIndex=").append(windowStartIndex);
+        sb.append("\n\tIntervals are: {");
         for (int i = 0; i < list.size(); i++) {
             if (i != 0)
-                buf.append(", ");
-            buf.append(list.get(i).toString());
+                sb.append(", ");
+            sb.append(list.get(i).toString());
         }
-        buf.append('}');
-        return buf.toString();
+        sb.append('}');
+        return sb.toString();
     }
 
     /**
--- a/src/share/classes/sun/security/jgss/krb5/InitialToken.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/jgss/krb5/InitialToken.java	Mon Jun 16 17:45:26 2014 +0100
@@ -164,15 +164,15 @@
                     serviceTicket.getServer();
                 // Cannot use '\"' instead of "\"" in constructor because
                 // it is interpreted as suggested length!
-                StringBuffer buf = new StringBuffer("\"");
-                buf.append(delegateTo.getName()).append('\"');
+                StringBuilder sb = new StringBuilder("\"");
+                sb.append(delegateTo.getName()).append('\"');
                 String realm = delegateTo.getRealmAsString();
-                buf.append(" \"krbtgt/").append(realm).append('@');
-                buf.append(realm).append('\"');
+                sb.append(" \"krbtgt/").append(realm).append('@');
+                sb.append(realm).append('\"');
                 SecurityManager sm = System.getSecurityManager();
                 if (sm != null) {
                     DelegationPermission perm =
-                        new DelegationPermission(buf.toString());
+                        new DelegationPermission(sb.toString());
                     sm.checkPermission(perm);
                 }
 
--- a/src/share/classes/sun/security/jgss/krb5/Krb5Context.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/jgss/krb5/Krb5Context.java	Mon Jun 16 17:45:26 2014 +0100
@@ -1345,7 +1345,7 @@
 
     private static String getHexBytes(byte[] bytes, int pos, int len) {
 
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (int i = 0; i < len; i++) {
 
             int b1 = (bytes[i]>>4) & 0x0f;
--- a/src/share/classes/sun/security/jgss/wrapper/Krb5Util.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/jgss/wrapper/Krb5Util.java	Mon Jun 16 17:45:26 2014 +0100
@@ -41,9 +41,9 @@
         String krbPrinc = name.getKrbName();
         int atIndex = krbPrinc.indexOf('@');
         String realm = krbPrinc.substring(atIndex + 1);
-        StringBuffer buf = new StringBuffer("krbtgt/");
-        buf.append(realm).append('@').append(realm);
-        return buf.toString();
+        StringBuilder sb = new StringBuilder("krbtgt/");
+        sb.append(realm).append('@').append(realm);
+        return sb.toString();
     }
 
     // Perform the Service Permission check using the specified
--- a/src/share/classes/sun/security/jgss/wrapper/NativeGSSContext.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/jgss/wrapper/NativeGSSContext.java	Mon Jun 16 17:45:26 2014 +0100
@@ -139,10 +139,10 @@
         if (sm != null) {
             String targetStr = targetName.getKrbName();
             String tgsStr = Krb5Util.getTGSName(targetName);
-            StringBuffer buf = new StringBuffer("\"");
-            buf.append(targetStr).append("\" \"");
-            buf.append(tgsStr).append('\"');
-            String krbPrincPair = buf.toString();
+            StringBuilder sb = new StringBuilder("\"");
+            sb.append(targetStr).append("\" \"");
+            sb.append(tgsStr).append('\"');
+            String krbPrincPair = sb.toString();
             SunNativeProvider.debug("Checking DelegationPermission (" +
                                     krbPrincPair + ")");
             DelegationPermission perm =
--- a/src/share/classes/sun/security/krb5/Credentials.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/krb5/Credentials.java	Mon Jun 16 17:45:26 2014 +0100
@@ -510,21 +510,21 @@
     }
 
     public String toString() {
-        StringBuffer buffer = new StringBuffer("Credentials:");
-        buffer.append(    "\n      client=").append(client);
-        buffer.append(    "\n      server=").append(server);
+        StringBuilder sb = new StringBuilder("Credentials:");
+        sb.append(    "\n      client=").append(client);
+        sb.append(    "\n      server=").append(server);
         if (authTime != null) {
-            buffer.append("\n    authTime=").append(authTime);
+            sb.append("\n    authTime=").append(authTime);
         }
         if (startTime != null) {
-            buffer.append("\n   startTime=").append(startTime);
+            sb.append("\n   startTime=").append(startTime);
         }
-        buffer.append(    "\n     endTime=").append(endTime);
-        buffer.append(    "\n   renewTill=").append(renewTill);
-        buffer.append(    "\n       flags=").append(flags);
-        buffer.append(    "\nEType (skey)=").append(key.getEType());
-        buffer.append(    "\n   (tkt key)=").append(ticket.encPart.eType);
-        return buffer.toString();
+        sb.append(    "\n     endTime=").append(endTime);
+        sb.append(    "\n   renewTill=").append(renewTill);
+        sb.append(    "\n       flags=").append(flags);
+        sb.append(    "\nEType (skey)=").append(key.getEType());
+        sb.append(    "\n   (tkt key)=").append(ticket.encPart.eType);
+        return sb.toString();
     }
 
 }
--- a/src/share/classes/sun/security/krb5/KrbException.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/krb5/KrbException.java	Mon Jun 16 17:45:26 2014 +0100
@@ -96,7 +96,7 @@
 
 
     public String krbErrorMessage() {
-        StringBuffer strbuf = new StringBuffer("krb_error " + returnCode);
+        StringBuilder strbuf = new StringBuilder("krb_error " + returnCode);
         String msg =  getMessage();
         if (msg != null) {
             strbuf.append(" ");
@@ -112,7 +112,7 @@
      * If the error code is 0 then the first half is skipped.
      */
     public String getMessage() {
-        StringBuffer message = new StringBuffer();
+        StringBuilder message = new StringBuilder();
         int returnCode = returnCode();
         if (returnCode != 0) {
             message.append(returnCodeMessage());
--- a/src/share/classes/sun/security/krb5/PrincipalName.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/krb5/PrincipalName.java	Mon Jun 16 17:45:26 2014 +0100
@@ -480,7 +480,7 @@
     }
 
     public String getPrincipalNameAsString() {
-        StringBuffer temp = new StringBuffer(nameStrings[0]);
+        StringBuilder temp = new StringBuilder(nameStrings[0]);
         for (int i = 1; i < nameStrings.length; i++)
             temp.append(nameStrings[i]);
         return temp.toString();
@@ -521,7 +521,7 @@
 
     public String getSalt() {
         if (salt == null) {
-            StringBuffer salt = new StringBuffer();
+            StringBuilder salt = new StringBuilder();
             salt.append(nameRealm.toString());
             for (int i = 0; i < nameStrings.length; i++) {
                 salt.append(nameStrings[i]);
@@ -532,7 +532,7 @@
     }
 
     public String toString() {
-        StringBuffer str = new StringBuffer();
+        StringBuilder str = new StringBuilder();
         for (int i = 0; i < nameStrings.length; i++) {
             if (i > 0)
                 str.append("/");
@@ -544,7 +544,7 @@
     }
 
     public String getNameString() {
-        StringBuffer str = new StringBuffer();
+        StringBuilder str = new StringBuilder();
         for (int i = 0; i < nameStrings.length; i++) {
             if (i > 0)
                 str.append("/");
--- a/src/share/classes/sun/security/krb5/internal/EncTicketPart.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/krb5/internal/EncTicketPart.java	Mon Jun 16 17:45:26 2014 +0100
@@ -117,7 +117,7 @@
     private static String getHexBytes(byte[] bytes, int len)
             throws IOException {
 
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (int i = 0; i < len; i++) {
 
             int b1 = (bytes[i] >> 4) & 0x0f;
--- a/src/share/classes/sun/security/krb5/internal/TicketFlags.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/krb5/internal/TicketFlags.java	Mon Jun 16 17:45:26 2014 +0100
@@ -137,7 +137,7 @@
      * Returns the string representative of ticket flags.
      */
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         boolean[] flags = toBooleanArray();
         for (int i = 0; i < flags.length; i++) {
             if (flags[i] == true) {
--- a/src/share/classes/sun/security/krb5/internal/crypto/EType.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/krb5/internal/crypto/EType.java	Mon Jun 16 17:45:26 2014 +0100
@@ -269,7 +269,7 @@
         }
         int len = list.size();
         if (len <= 0) {
-            StringBuffer keystr = new StringBuffer();
+            StringBuilder keystr = new StringBuilder();
             for (int i = 0; i < keys.length; i++) {
                 keystr.append(toString(keys[i].getEType()));
                 keystr.append(" ");
--- a/src/share/classes/sun/security/krb5/internal/crypto/dk/DkCrypto.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/krb5/internal/crypto/dk/DkCrypto.java	Mon Jun 16 17:45:26 2014 +0100
@@ -636,7 +636,7 @@
     // Routines used for debugging
     static String bytesToString(byte[] digest) {
         // Get character representation of digest
-        StringBuffer digestString = new StringBuffer();
+        StringBuilder digestString = new StringBuilder();
 
         for (int i = 0; i < digest.length; i++) {
             if ((digest[i] & 0x000000ff) < 0x10) {
--- a/src/share/classes/sun/security/krb5/internal/ktab/KeyTabEntry.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/krb5/internal/ktab/KeyTabEntry.java	Mon Jun 16 17:45:26 2014 +0100
@@ -73,7 +73,7 @@
     }
 
     public String getKeyString() {
-        StringBuffer sb = new StringBuffer("0x");
+        StringBuilder sb = new StringBuilder("0x");
         for (int i = 0; i < keyblock.length; i++) {
             sb.append(String.format("%02x", keyblock[i]&0xff));
         }
--- a/src/share/classes/sun/security/pkcs/PKCS9Attribute.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/pkcs/PKCS9Attribute.java	Mon Jun 16 17:45:26 2014 +0100
@@ -790,26 +790,26 @@
      * Returns a string representation of this attribute.
      */
     public String toString() {
-        StringBuffer buf = new StringBuffer(100);
+        StringBuilder sb = new StringBuilder(100);
 
-        buf.append("[");
+        sb.append("[");
 
         if (index == -1) {
-            buf.append(oid.toString());
+            sb.append(oid.toString());
         } else {
-            buf.append(OID_NAME_TABLE.get(PKCS9_OIDS[index]));
+            sb.append(OID_NAME_TABLE.get(PKCS9_OIDS[index]));
         }
-        buf.append(": ");
+        sb.append(": ");
 
         if (index == -1 || SINGLE_VALUED[index]) {
             if (value instanceof byte[]) { // special case for octet string
                 HexDumpEncoder hexDump = new HexDumpEncoder();
-                buf.append(hexDump.encodeBuffer((byte[]) value));
+                sb.append(hexDump.encodeBuffer((byte[]) value));
             } else {
-                buf.append(value.toString());
+                sb.append(value.toString());
             }
-            buf.append("]");
-            return buf.toString();
+            sb.append("]");
+            return sb.toString();
         } else { // multi-valued
             boolean first = true;
             Object[] values = (Object[]) value;
@@ -818,11 +818,11 @@
                 if (first)
                     first = false;
                 else
-                    buf.append(", ");
+                    sb.append(", ");
 
-                buf.append(values[j].toString());
+                sb.append(values[j].toString());
             }
-            return buf.toString();
+            return sb.toString();
         }
     }
 
@@ -857,7 +857,7 @@
     private void throwTagException(Byte tag)
     throws IOException {
         Byte[] expectedTags = PKCS9_VALUE_TAGS[index];
-        StringBuffer msg = new StringBuffer(100);
+        StringBuilder msg = new StringBuilder(100);
         msg.append("Value of attribute ");
         msg.append(oid.toString());
         msg.append(" (");
--- a/src/share/classes/sun/security/pkcs/PKCS9Attributes.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/pkcs/PKCS9Attributes.java	Mon Jun 16 17:45:26 2014 +0100
@@ -323,8 +323,8 @@
      * Returns the PKCS9 block in a printable string form.
      */
     public String toString() {
-        StringBuffer buf = new StringBuffer(200);
-        buf.append("PKCS9 Attributes: [\n\t");
+        StringBuilder sb = new StringBuilder(200);
+        sb.append("PKCS9 Attributes: [\n\t");
 
         ObjectIdentifier oid;
         PKCS9Attribute value;
@@ -339,14 +339,14 @@
             if (first)
                 first = false;
             else
-                buf.append(";\n\t");
+                sb.append(";\n\t");
 
-            buf.append(value.toString());
+            sb.append(value.toString());
         }
 
-        buf.append("\n\t] (end PKCS9 Attributes)");
+        sb.append("\n\t] (end PKCS9 Attributes)");
 
-        return buf.toString();
+        return sb.toString();
     }
 
     /**
--- a/src/share/classes/sun/security/pkcs/SigningCertificateInfo.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/pkcs/SigningCertificateInfo.java	Mon Jun 16 17:45:26 2014 +0100
@@ -92,15 +92,15 @@
     }
 
     public String toString() {
-        StringBuffer buffer = new StringBuffer();
-        buffer.append("[\n");
+        StringBuilder sb = new StringBuilder();
+        sb.append("[\n");
         for (int i = 0; i < certId.length; i++) {
-            buffer.append(certId[i].toString());
+            sb.append(certId[i].toString());
         }
         // format policies as a string
-        buffer.append("\n]");
+        sb.append("\n]");
 
-        return buffer.toString();
+        return sb.toString();
     }
 
     public void parse(byte[] bytes) throws IOException {
@@ -151,17 +151,17 @@
     }
 
     public String toString() {
-        StringBuffer buffer = new StringBuffer();
-        buffer.append("[\n\tCertificate hash (SHA-1):\n");
+        StringBuilder sb = new StringBuilder();
+        sb.append("[\n\tCertificate hash (SHA-1):\n");
         if (hexDumper == null) {
             hexDumper = new HexDumpEncoder();
         }
-        buffer.append(hexDumper.encode(certHash));
+        sb.append(hexDumper.encode(certHash));
         if (issuer != null && serialNumber != null) {
-            buffer.append("\n\tIssuer: " + issuer + "\n");
-            buffer.append("\t" + serialNumber);
+            sb.append("\n\tIssuer: " + issuer + "\n");
+            sb.append("\t" + serialNumber);
         }
-        buffer.append("\n]");
-        return buffer.toString();
+        sb.append("\n]");
+        return sb.toString();
     }
 }
--- a/src/share/classes/sun/security/pkcs11/wrapper/CK_AES_CTR_PARAMS.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_AES_CTR_PARAMS.java	Mon Jun 16 17:45:26 2014 +0100
@@ -50,17 +50,17 @@
     }
 
     public String toString() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
-        buffer.append(Constants.INDENT);
-        buffer.append("ulCounterBits: ");
-        buffer.append(ulCounterBits);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("ulCounterBits: ");
+        sb.append(ulCounterBits);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("cb: ");
-        buffer.append(Functions.toHexString(cb));
+        sb.append(Constants.INDENT);
+        sb.append("cb: ");
+        sb.append(Functions.toHexString(cb));
 
-        return buffer.toString();
+        return sb.toString();
     }
 }
--- a/src/share/classes/sun/security/pkcs11/wrapper/CK_DATE.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_DATE.java	Mon Jun 16 17:45:26 2014 +0100
@@ -122,16 +122,16 @@
      * @return the string representation of CK_DATE
      */
     public String toString() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
-        buffer.append(new String(day));
-        buffer.append('.');
-        buffer.append(new String(month));
-        buffer.append('.');
-        buffer.append(new String(year));
-        buffer.append(" (DD.MM.YYYY)");
+        sb.append(new String(day));
+        sb.append('.');
+        sb.append(new String(month));
+        sb.append('.');
+        sb.append(new String(year));
+        sb.append(" (DD.MM.YYYY)");
 
-        return buffer.toString();
+        return sb.toString();
     }
 
 }
--- a/src/share/classes/sun/security/pkcs11/wrapper/CK_ECDH1_DERIVE_PARAMS.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_ECDH1_DERIVE_PARAMS.java	Mon Jun 16 17:45:26 2014 +0100
@@ -105,34 +105,34 @@
      * @return the string representation of CK_PKCS5_PBKD2_PARAMS
      */
     public String toString() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
-        buffer.append(Constants.INDENT);
-        buffer.append("kdf: 0x");
-        buffer.append(Functions.toFullHexString(kdf));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("kdf: 0x");
+        sb.append(Functions.toFullHexString(kdf));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pSharedDataLen: ");
-        buffer.append(pSharedData.length);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pSharedDataLen: ");
+        sb.append(pSharedData.length);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pSharedData: ");
-        buffer.append(Functions.toHexString(pSharedData));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pSharedData: ");
+        sb.append(Functions.toHexString(pSharedData));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pPublicDataLen: ");
-        buffer.append(pPublicData.length);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pPublicDataLen: ");
+        sb.append(pPublicData.length);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pPublicData: ");
-        buffer.append(Functions.toHexString(pPublicData));
+        sb.append(Constants.INDENT);
+        sb.append("pPublicData: ");
+        sb.append(Functions.toHexString(pPublicData));
         //buffer.append(Constants.NEWLINE);
 
-        return buffer.toString();
+        return sb.toString();
     }
 
 }
--- a/src/share/classes/sun/security/pkcs11/wrapper/CK_ECDH2_DERIVE_PARAMS.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_ECDH2_DERIVE_PARAMS.java	Mon Jun 16 17:45:26 2014 +0100
@@ -128,54 +128,54 @@
      * @return the string representation of CK_PKCS5_PBKD2_PARAMS
      */
     public String toString() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
-        buffer.append(Constants.INDENT);
-        buffer.append("kdf: 0x");
-        buffer.append(Functions.toFullHexString(kdf));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("kdf: 0x");
+        sb.append(Functions.toFullHexString(kdf));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pSharedDataLen: ");
-        buffer.append(pSharedData.length);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pSharedDataLen: ");
+        sb.append(pSharedData.length);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pSharedData: ");
-        buffer.append(Functions.toHexString(pSharedData));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pSharedData: ");
+        sb.append(Functions.toHexString(pSharedData));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pPublicDataLen: ");
-        buffer.append(pPublicData.length);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pPublicDataLen: ");
+        sb.append(pPublicData.length);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pPublicData: ");
-        buffer.append(Functions.toHexString(pPublicData));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pPublicData: ");
+        sb.append(Functions.toHexString(pPublicData));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("ulPrivateDataLen: ");
-        buffer.append(ulPrivateDataLen);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("ulPrivateDataLen: ");
+        sb.append(ulPrivateDataLen);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("hPrivateData: ");
-        buffer.append(hPrivateData);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("hPrivateData: ");
+        sb.append(hPrivateData);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pPublicDataLen2: ");
-        buffer.append(pPublicData2.length);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pPublicDataLen2: ");
+        sb.append(pPublicData2.length);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pPublicData2: ");
-        buffer.append(Functions.toHexString(pPublicData2));
+        sb.append(Constants.INDENT);
+        sb.append("pPublicData2: ");
+        sb.append(Functions.toHexString(pPublicData2));
         //buffer.append(Constants.NEWLINE);
 
-        return buffer.toString();
+        return sb.toString();
     }
 
 }
--- a/src/share/classes/sun/security/pkcs11/wrapper/CK_INFO.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_INFO.java	Mon Jun 16 17:45:26 2014 +0100
@@ -131,34 +131,34 @@
      * @return the string representation of CK_INFO
      */
     public String toString() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
-        buffer.append(Constants.INDENT);
-        buffer.append("cryptokiVersion: ");
-        buffer.append(cryptokiVersion.toString());
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("cryptokiVersion: ");
+        sb.append(cryptokiVersion.toString());
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("manufacturerID: ");
-        buffer.append(new String(manufacturerID));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("manufacturerID: ");
+        sb.append(new String(manufacturerID));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("flags: ");
-        buffer.append(Functions.toBinaryString(flags));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("flags: ");
+        sb.append(Functions.toBinaryString(flags));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("libraryDescription: ");
-        buffer.append(new String(libraryDescription));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("libraryDescription: ");
+        sb.append(new String(libraryDescription));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("libraryVersion: ");
-        buffer.append(libraryVersion.toString());
+        sb.append(Constants.INDENT);
+        sb.append("libraryVersion: ");
+        sb.append(libraryVersion.toString());
         //buffer.append(Constants.NEWLINE);
 
-        return buffer.toString() ;
+        return sb.toString() ;
     }
 
 }
--- a/src/share/classes/sun/security/pkcs11/wrapper/CK_MECHANISM.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_MECHANISM.java	Mon Jun 16 17:45:26 2014 +0100
@@ -143,24 +143,24 @@
      * @return the string representation of CK_MECHANISM
      */
     public String toString() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
-        buffer.append(Constants.INDENT);
-        buffer.append("mechanism: ");
-        buffer.append(mechanism);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("mechanism: ");
+        sb.append(mechanism);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pParameter: ");
-        buffer.append(pParameter.toString());
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pParameter: ");
+        sb.append(pParameter.toString());
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("ulParameterLen: ??");
+        sb.append(Constants.INDENT);
+        sb.append("ulParameterLen: ??");
         //buffer.append(pParameter.length);
         //buffer.append(Constants.NEWLINE);
 
-        return buffer.toString() ;
+        return sb.toString() ;
     }
 
 }
--- a/src/share/classes/sun/security/pkcs11/wrapper/CK_MECHANISM_INFO.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_MECHANISM_INFO.java	Mon Jun 16 17:45:26 2014 +0100
@@ -103,25 +103,25 @@
      * @return the string representation of CK_MECHANISM_INFO
      */
     public String toString() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
-        buffer.append(Constants.INDENT);
-        buffer.append("ulMinKeySize: ");
-        buffer.append(String.valueOf(ulMinKeySize));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("ulMinKeySize: ");
+        sb.append(String.valueOf(ulMinKeySize));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("ulMaxKeySize: ");
-        buffer.append(String.valueOf(ulMaxKeySize));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("ulMaxKeySize: ");
+        sb.append(String.valueOf(ulMaxKeySize));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("flags: ");
-        buffer.append(String.valueOf(flags));
-        buffer.append(" = ");
-        buffer.append(Functions.mechanismInfoFlagsToString(flags));
+        sb.append(Constants.INDENT);
+        sb.append("flags: ");
+        sb.append(String.valueOf(flags));
+        sb.append(" = ");
+        sb.append(Functions.mechanismInfoFlagsToString(flags));
         //buffer.append(Constants.NEWLINE);
 
-        return buffer.toString() ;
+        return sb.toString() ;
     }
 }
--- a/src/share/classes/sun/security/pkcs11/wrapper/CK_PBE_PARAMS.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_PBE_PARAMS.java	Mon Jun 16 17:45:26 2014 +0100
@@ -109,39 +109,39 @@
      * @return the string representation of CK_PBE_PARAMS
      */
     public String toString() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pInitVector: ");
-        buffer.append(pInitVector);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pInitVector: ");
+        sb.append(pInitVector);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("ulPasswordLen: ");
-        buffer.append(pPassword.length);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("ulPasswordLen: ");
+        sb.append(pPassword.length);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pPassword: ");
-        buffer.append(pPassword);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pPassword: ");
+        sb.append(pPassword);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("ulSaltLen: ");
-        buffer.append(pSalt.length);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("ulSaltLen: ");
+        sb.append(pSalt.length);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pSalt: ");
-        buffer.append(pSalt);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pSalt: ");
+        sb.append(pSalt);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("ulIteration: ");
-        buffer.append(ulIteration);
+        sb.append(Constants.INDENT);
+        sb.append("ulIteration: ");
+        sb.append(ulIteration);
         //buffer.append(Constants.NEWLINE);
 
-        return buffer.toString();
+        return sb.toString();
     }
 
 }
--- a/src/share/classes/sun/security/pkcs11/wrapper/CK_PKCS5_PBKD2_PARAMS.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_PKCS5_PBKD2_PARAMS.java	Mon Jun 16 17:45:26 2014 +0100
@@ -118,44 +118,44 @@
      * @return the string representation of CK_PKCS5_PBKD2_PARAMS
      */
     public String toString() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
-        buffer.append(Constants.INDENT);
-        buffer.append("saltSource: ");
-        buffer.append(saltSource);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("saltSource: ");
+        sb.append(saltSource);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pSaltSourceData: ");
-        buffer.append(Functions.toHexString(pSaltSourceData));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pSaltSourceData: ");
+        sb.append(Functions.toHexString(pSaltSourceData));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("ulSaltSourceDataLen: ");
-        buffer.append(pSaltSourceData.length);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("ulSaltSourceDataLen: ");
+        sb.append(pSaltSourceData.length);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("iterations: ");
-        buffer.append(iterations);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("iterations: ");
+        sb.append(iterations);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("prf: ");
-        buffer.append(prf);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("prf: ");
+        sb.append(prf);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pPrfData: ");
-        buffer.append(Functions.toHexString(pPrfData));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pPrfData: ");
+        sb.append(Functions.toHexString(pPrfData));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("ulPrfDataLen: ");
-        buffer.append(pPrfData.length);
+        sb.append(Constants.INDENT);
+        sb.append("ulPrfDataLen: ");
+        sb.append(pPrfData.length);
         //buffer.append(Constants.NEWLINE);
 
-        return buffer.toString();
+        return sb.toString();
     }
 
 }
--- a/src/share/classes/sun/security/pkcs11/wrapper/CK_RSA_PKCS_OAEP_PARAMS.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_RSA_PKCS_OAEP_PARAMS.java	Mon Jun 16 17:45:26 2014 +0100
@@ -110,34 +110,34 @@
      * @return the string representation of CK_RSA_PKCS_OAEP_PARAMS
      */
     public String toString() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
-        buffer.append(Constants.INDENT);
-        buffer.append("hashAlg: ");
-        buffer.append(hashAlg);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("hashAlg: ");
+        sb.append(hashAlg);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("mgf: ");
-        buffer.append(mgf);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("mgf: ");
+        sb.append(mgf);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("source: ");
-        buffer.append(source);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("source: ");
+        sb.append(source);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pSourceData: ");
-        buffer.append(pSourceData.toString());
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pSourceData: ");
+        sb.append(pSourceData.toString());
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pSourceDataLen: ");
-        buffer.append(Functions.toHexString(pSourceData));
+        sb.append(Constants.INDENT);
+        sb.append("pSourceDataLen: ");
+        sb.append(Functions.toHexString(pSourceData));
         //buffer.append(Constants.NEWLINE);
 
-        return buffer.toString() ;
+        return sb.toString() ;
     }
 
 }
--- a/src/share/classes/sun/security/pkcs11/wrapper/CK_RSA_PKCS_PSS_PARAMS.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_RSA_PKCS_PSS_PARAMS.java	Mon Jun 16 17:45:26 2014 +0100
@@ -95,24 +95,24 @@
      * @return the string representation of CK_PKCS5_PBKD2_PARAMS
      */
     public String toString() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
-        buffer.append(Constants.INDENT);
-        buffer.append("hashAlg: 0x");
-        buffer.append(Functions.toFullHexString(hashAlg));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("hashAlg: 0x");
+        sb.append(Functions.toFullHexString(hashAlg));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("mgf: 0x");
-        buffer.append(Functions.toFullHexString(mgf));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("mgf: 0x");
+        sb.append(Functions.toFullHexString(mgf));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("sLen: ");
-        buffer.append(sLen);
+        sb.append(Constants.INDENT);
+        sb.append("sLen: ");
+        sb.append(sLen);
         //buffer.append(Constants.NEWLINE);
 
-        return buffer.toString();
+        return sb.toString();
     }
 
 }
--- a/src/share/classes/sun/security/pkcs11/wrapper/CK_SESSION_INFO.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_SESSION_INFO.java	Mon Jun 16 17:45:26 2014 +0100
@@ -114,29 +114,29 @@
      * @return the string representation of CK_SESSION_INFO
      */
     public String toString() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
-        buffer.append(Constants.INDENT);
-        buffer.append("slotID: ");
-        buffer.append(String.valueOf(slotID));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("slotID: ");
+        sb.append(String.valueOf(slotID));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("state: ");
-        buffer.append(Functions.sessionStateToString(state));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("state: ");
+        sb.append(Functions.sessionStateToString(state));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("flags: ");
-        buffer.append(Functions.sessionInfoFlagsToString(flags));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("flags: ");
+        sb.append(Functions.sessionInfoFlagsToString(flags));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("ulDeviceError: ");
-        buffer.append(Functions.toHexString(ulDeviceError));
+        sb.append(Constants.INDENT);
+        sb.append("ulDeviceError: ");
+        sb.append(Functions.toHexString(ulDeviceError));
         //buffer.append(Constants.NEWLINE);
 
-        return buffer.toString() ;
+        return sb.toString() ;
     }
 
 }
--- a/src/share/classes/sun/security/pkcs11/wrapper/CK_SLOT_INFO.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_SLOT_INFO.java	Mon Jun 16 17:45:26 2014 +0100
@@ -130,34 +130,34 @@
      * @return the string representation of CK_SLOT_INFO
      */
     public String toString() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
-        buffer.append(Constants.INDENT);
-        buffer.append("slotDescription: ");
-        buffer.append(new String(slotDescription));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("slotDescription: ");
+        sb.append(new String(slotDescription));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("manufacturerID: ");
-        buffer.append(new String(manufacturerID));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("manufacturerID: ");
+        sb.append(new String(manufacturerID));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("flags: ");
-        buffer.append(Functions.slotInfoFlagsToString(flags));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("flags: ");
+        sb.append(Functions.slotInfoFlagsToString(flags));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("hardwareVersion: ");
-        buffer.append(hardwareVersion.toString());
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("hardwareVersion: ");
+        sb.append(hardwareVersion.toString());
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("firmwareVersion: ");
-        buffer.append(firmwareVersion.toString());
+        sb.append(Constants.INDENT);
+        sb.append("firmwareVersion: ");
+        sb.append(firmwareVersion.toString());
         //buffer.append(Constants.NEWLINE);
 
-        return buffer.toString() ;
+        return sb.toString() ;
     }
 
 }
--- a/src/share/classes/sun/security/pkcs11/wrapper/CK_TOKEN_INFO.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_TOKEN_INFO.java	Mon Jun 16 17:45:26 2014 +0100
@@ -271,119 +271,119 @@
      * @return the string representation of CK_TOKEN_INFO
      */
     public String toString() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
-        buffer.append(Constants.INDENT);
-        buffer.append("label: ");
-        buffer.append(new String(label));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("label: ");
+        sb.append(new String(label));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("manufacturerID: ");
-        buffer.append(new String(manufacturerID));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("manufacturerID: ");
+        sb.append(new String(manufacturerID));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("model: ");
-        buffer.append(new String(model));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("model: ");
+        sb.append(new String(model));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("serialNumber: ");
-        buffer.append(new String(serialNumber));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("serialNumber: ");
+        sb.append(new String(serialNumber));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("flags: ");
-        buffer.append(Functions.tokenInfoFlagsToString(flags));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("flags: ");
+        sb.append(Functions.tokenInfoFlagsToString(flags));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("ulMaxSessionCount: ");
-        buffer.append((ulMaxSessionCount == PKCS11Constants.CK_EFFECTIVELY_INFINITE)
+        sb.append(Constants.INDENT);
+        sb.append("ulMaxSessionCount: ");
+        sb.append((ulMaxSessionCount == PKCS11Constants.CK_EFFECTIVELY_INFINITE)
                   ? "CK_EFFECTIVELY_INFINITE"
                   : (ulMaxSessionCount == PKCS11Constants.CK_UNAVAILABLE_INFORMATION)
                     ? "CK_UNAVAILABLE_INFORMATION"
                     : String.valueOf(ulMaxSessionCount));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("ulSessionCount: ");
-        buffer.append((ulSessionCount == PKCS11Constants.CK_UNAVAILABLE_INFORMATION)
+        sb.append(Constants.INDENT);
+        sb.append("ulSessionCount: ");
+        sb.append((ulSessionCount == PKCS11Constants.CK_UNAVAILABLE_INFORMATION)
                   ? "CK_UNAVAILABLE_INFORMATION"
                   : String.valueOf(ulSessionCount));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("ulMaxRwSessionCount: ");
-        buffer.append((ulMaxRwSessionCount == PKCS11Constants.CK_EFFECTIVELY_INFINITE)
+        sb.append(Constants.INDENT);
+        sb.append("ulMaxRwSessionCount: ");
+        sb.append((ulMaxRwSessionCount == PKCS11Constants.CK_EFFECTIVELY_INFINITE)
                   ? "CK_EFFECTIVELY_INFINITE"
                   : (ulMaxRwSessionCount == PKCS11Constants.CK_UNAVAILABLE_INFORMATION)
                     ? "CK_UNAVAILABLE_INFORMATION"
                     : String.valueOf(ulMaxRwSessionCount));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("ulRwSessionCount: ");
-        buffer.append((ulRwSessionCount == PKCS11Constants.CK_UNAVAILABLE_INFORMATION)
+        sb.append(Constants.INDENT);
+        sb.append("ulRwSessionCount: ");
+        sb.append((ulRwSessionCount == PKCS11Constants.CK_UNAVAILABLE_INFORMATION)
                   ? "CK_UNAVAILABLE_INFORMATION"
                   : String.valueOf(ulRwSessionCount));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("ulMaxPinLen: ");
-        buffer.append(String.valueOf(ulMaxPinLen));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("ulMaxPinLen: ");
+        sb.append(String.valueOf(ulMaxPinLen));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("ulMinPinLen: ");
-        buffer.append(String.valueOf(ulMinPinLen));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("ulMinPinLen: ");
+        sb.append(String.valueOf(ulMinPinLen));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("ulTotalPublicMemory: ");
-        buffer.append((ulTotalPublicMemory == PKCS11Constants.CK_UNAVAILABLE_INFORMATION)
+        sb.append(Constants.INDENT);
+        sb.append("ulTotalPublicMemory: ");
+        sb.append((ulTotalPublicMemory == PKCS11Constants.CK_UNAVAILABLE_INFORMATION)
                   ? "CK_UNAVAILABLE_INFORMATION"
                   : String.valueOf(ulTotalPublicMemory));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("ulFreePublicMemory: ");
-        buffer.append((ulFreePublicMemory == PKCS11Constants.CK_UNAVAILABLE_INFORMATION)
+        sb.append(Constants.INDENT);
+        sb.append("ulFreePublicMemory: ");
+        sb.append((ulFreePublicMemory == PKCS11Constants.CK_UNAVAILABLE_INFORMATION)
                   ? "CK_UNAVAILABLE_INFORMATION"
                   : String.valueOf(ulFreePublicMemory));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("ulTotalPrivateMemory: ");
-        buffer.append((ulTotalPrivateMemory == PKCS11Constants.CK_UNAVAILABLE_INFORMATION)
+        sb.append(Constants.INDENT);
+        sb.append("ulTotalPrivateMemory: ");
+        sb.append((ulTotalPrivateMemory == PKCS11Constants.CK_UNAVAILABLE_INFORMATION)
                   ? "CK_UNAVAILABLE_INFORMATION"
                   : String.valueOf(ulTotalPrivateMemory));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("ulFreePrivateMemory: ");
-        buffer.append((ulFreePrivateMemory == PKCS11Constants.CK_UNAVAILABLE_INFORMATION)
+        sb.append(Constants.INDENT);
+        sb.append("ulFreePrivateMemory: ");
+        sb.append((ulFreePrivateMemory == PKCS11Constants.CK_UNAVAILABLE_INFORMATION)
                   ? "CK_UNAVAILABLE_INFORMATION"
                   : String.valueOf(ulFreePrivateMemory));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("hardwareVersion: ");
-        buffer.append(hardwareVersion.toString());
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("hardwareVersion: ");
+        sb.append(hardwareVersion.toString());
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("firmwareVersion: ");
-        buffer.append(firmwareVersion.toString());
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("firmwareVersion: ");
+        sb.append(firmwareVersion.toString());
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("utcTime: ");
-        buffer.append(new String(utcTime));
+        sb.append(Constants.INDENT);
+        sb.append("utcTime: ");
+        sb.append(new String(utcTime));
         //buffer.append(Constants.NEWLINE);
 
-        return buffer.toString() ;
+        return sb.toString() ;
     }
 
 }
--- a/src/share/classes/sun/security/pkcs11/wrapper/CK_X9_42_DH1_DERIVE_PARAMS.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_X9_42_DH1_DERIVE_PARAMS.java	Mon Jun 16 17:45:26 2014 +0100
@@ -99,34 +99,34 @@
      * @return the string representation of CK_PKCS5_PBKD2_PARAMS
      */
     public String toString() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
-        buffer.append(Constants.INDENT);
-        buffer.append("kdf: 0x");
-        buffer.append(Functions.toFullHexString(kdf));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("kdf: 0x");
+        sb.append(Functions.toFullHexString(kdf));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pOtherInfoLen: ");
-        buffer.append(pOtherInfo.length);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pOtherInfoLen: ");
+        sb.append(pOtherInfo.length);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pOtherInfo: ");
-        buffer.append(Functions.toHexString(pOtherInfo));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pOtherInfo: ");
+        sb.append(Functions.toHexString(pOtherInfo));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pPublicDataLen: ");
-        buffer.append(pPublicData.length);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pPublicDataLen: ");
+        sb.append(pPublicData.length);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pPublicData: ");
-        buffer.append(Functions.toHexString(pPublicData));
+        sb.append(Constants.INDENT);
+        sb.append("pPublicData: ");
+        sb.append(Functions.toHexString(pPublicData));
         //buffer.append(Constants.NEWLINE);
 
-        return buffer.toString();
+        return sb.toString();
     }
 
 }
--- a/src/share/classes/sun/security/pkcs11/wrapper/CK_X9_42_DH2_DERIVE_PARAMS.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_X9_42_DH2_DERIVE_PARAMS.java	Mon Jun 16 17:45:26 2014 +0100
@@ -128,54 +128,54 @@
      * @return the string representation of CK_PKCS5_PBKD2_PARAMS
      */
     public String toString() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
-        buffer.append(Constants.INDENT);
-        buffer.append("kdf: 0x");
-        buffer.append(Functions.toFullHexString(kdf));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("kdf: 0x");
+        sb.append(Functions.toFullHexString(kdf));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pOtherInfoLen: ");
-        buffer.append(pOtherInfo.length);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pOtherInfoLen: ");
+        sb.append(pOtherInfo.length);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pOtherInfo: ");
-        buffer.append(Functions.toHexString(pOtherInfo));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pOtherInfo: ");
+        sb.append(Functions.toHexString(pOtherInfo));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pPublicDataLen: ");
-        buffer.append(pPublicData.length);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pPublicDataLen: ");
+        sb.append(pPublicData.length);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pPublicData: ");
-        buffer.append(Functions.toHexString(pPublicData));
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pPublicData: ");
+        sb.append(Functions.toHexString(pPublicData));
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("ulPrivateDataLen: ");
-        buffer.append(ulPrivateDataLen);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("ulPrivateDataLen: ");
+        sb.append(ulPrivateDataLen);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("hPrivateData: ");
-        buffer.append(hPrivateData);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("hPrivateData: ");
+        sb.append(hPrivateData);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pPublicDataLen2: ");
-        buffer.append(pPublicData2.length);
-        buffer.append(Constants.NEWLINE);
+        sb.append(Constants.INDENT);
+        sb.append("pPublicDataLen2: ");
+        sb.append(pPublicData2.length);
+        sb.append(Constants.NEWLINE);
 
-        buffer.append(Constants.INDENT);
-        buffer.append("pPublicData2: ");
-        buffer.append(Functions.toHexString(pPublicData2));
+        sb.append(Constants.INDENT);
+        sb.append("pPublicData2: ");
+        sb.append(Functions.toHexString(pPublicData2));
         //buffer.append(Constants.NEWLINE);
 
-        return buffer.toString();
+        return sb.toString();
     }
 
 }
--- a/src/share/classes/sun/security/pkcs11/wrapper/Functions.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/Functions.java	Mon Jun 16 17:45:26 2014 +0100
@@ -109,14 +109,14 @@
      */
     public static String toFullHexString(long value) {
         long currentValue = value;
-        StringBuffer stringBuffer = new StringBuffer(16);
+        StringBuilder sb = new StringBuilder(16);
         for(int j = 0; j < 16; j++) {
             int currentDigit = (int) currentValue & 0xf;
-            stringBuffer.append(HEX_DIGITS[currentDigit]);
+            sb.append(HEX_DIGITS[currentDigit]);
             currentValue >>>= 4;
         }
 
-        return stringBuffer.reverse().toString();
+        return sb.reverse().toString();
     }
 
     /**
@@ -128,14 +128,14 @@
      */
     public static String toFullHexString(int value) {
         int currentValue = value;
-        StringBuffer stringBuffer = new StringBuffer(8);
+        StringBuilder sb = new StringBuilder(8);
         for(int i = 0; i < 8; i++) {
             int currentDigit = currentValue & 0xf;
-            stringBuffer.append(HEX_DIGITS[currentDigit]);
+            sb.append(HEX_DIGITS[currentDigit]);
             currentValue >>>= 4;
         }
 
-        return stringBuffer.reverse().toString();
+        return sb.reverse().toString();
     }
 
     /**
@@ -161,20 +161,20 @@
             return null;
         }
 
-        StringBuffer buffer = new StringBuffer(2 * value.length);
+        StringBuilder sb = new StringBuilder(2 * value.length);
         int          single;
 
         for (int i = 0; i < value.length; i++) {
             single = value[i] & 0xFF;
 
             if (single < 0x10) {
-                buffer.append('0');
+                sb.append('0');
             }
 
-            buffer.append(Integer.toString(single, 16));
+            sb.append(Integer.toString(single, 16));
         }
 
-        return buffer.toString();
+        return sb.toString();
     }
 
     /**
--- a/src/share/classes/sun/security/provider/AuthPolicyFile.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/provider/AuthPolicyFile.java	Mon Jun 16 17:45:26 2014 +0100
@@ -944,7 +944,7 @@
                     }
                     File f = new File(path);
                     path = f.getCanonicalPath();
-                    StringBuffer sb = new StringBuffer(path);
+                    StringBuilder sb = new StringBuilder(path);
                     // reappend '*' to canonicalized filename (note that
                     // canonicalization may have removed trailing file
                     // separator, so we have to check for that, too)
@@ -1095,7 +1095,7 @@
 
         @Override
         public String toString(){
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             sb.append(rb.getString("LPARAM"));
             sb.append(getCodeSource());
             sb.append("\n");
--- a/src/share/classes/sun/security/provider/X509Factory.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/provider/X509Factory.java	Mon Jun 16 17:45:26 2014 +0100
@@ -519,7 +519,7 @@
 
             // Step 2: Read the rest of header, determine the line end
             int end;
-            StringBuffer header = new StringBuffer("-----");
+            StringBuilder header = new StringBuilder("-----");
             while (true) {
                 int next = is.read();
                 if (next == -1) {
@@ -562,7 +562,7 @@
             }
 
             // Step 4: Consume the footer
-            StringBuffer footer = new StringBuffer("-");
+            StringBuilder footer = new StringBuilder("-");
             while (true) {
                 int next = is.read();
                 // Add next == '\n' for maximum safety, in case endline
--- a/src/share/classes/sun/security/smartcardio/PCSC.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/smartcardio/PCSC.java	Mon Jun 16 17:45:26 2014 +0100
@@ -172,7 +172,7 @@
     private final static char[] hexDigits = "0123456789abcdef".toCharArray();
 
     public static String toString(byte[] b) {
-        StringBuffer sb = new StringBuffer(b.length * 3);
+        StringBuilder sb = new StringBuilder(b.length * 3);
         for (int i = 0; i < b.length; i++) {
             int k = b[i] & 0xff;
             if (i != 0) {
--- a/src/share/classes/sun/security/ssl/HandshakeMessage.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/ssl/HandshakeMessage.java	Mon Jun 16 17:45:26 2014 +0100
@@ -1474,17 +1474,17 @@
             s.println();
 
             if (protocolVersion.v >= ProtocolVersion.TLS12.v) {
-                StringBuffer buffer = new StringBuffer();
+                StringBuilder sb = new StringBuilder();
                 boolean opened = false;
                 for (SignatureAndHashAlgorithm signAlg : algorithms) {
                     if (opened) {
-                        buffer.append(", " + signAlg.getAlgorithmName());
+                        sb.append(", " + signAlg.getAlgorithmName());
                     } else {
-                        buffer.append(signAlg.getAlgorithmName());
+                        sb.append(signAlg.getAlgorithmName());
                         opened = true;
                     }
                 }
-                s.println("Supported Signature Algorithms: " + buffer);
+                s.println("Supported Signature Algorithms: " + sb);
             }
 
             s.println("Cert Authorities:");
--- a/src/share/classes/sun/security/ssl/SSLSocketImpl.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/ssl/SSLSocketImpl.java	Mon Jun 16 17:45:26 2014 +0100
@@ -2594,7 +2594,7 @@
      */
     @Override
     public String toString() {
-        StringBuffer retval = new StringBuffer(80);
+        StringBuilder retval = new StringBuilder(80);
 
         retval.append(Integer.toHexString(hashCode()));
         retval.append("[");
--- a/src/share/classes/sun/security/ssl/ServerNameExtension.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/ssl/ServerNameExtension.java	Mon Jun 16 17:45:26 2014 +0100
@@ -266,12 +266,12 @@
 
     @Override
     public String toString() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (SNIServerName sniName : sniMap.values()) {
-            buffer.append("[" + sniName + "]");
+            sb.append("[" + sniName + "]");
         }
 
-        return "Extension " + type + ", server_name: " + buffer;
+        return "Extension " + type + ", server_name: " + sb;
     }
 
     private static class UnknownServerName extends SNIServerName {
--- a/src/share/classes/sun/security/ssl/SessionId.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/ssl/SessionId.java	Mon Jun 16 17:45:26 2014 +0100
@@ -72,16 +72,16 @@
     public String toString ()
     {
         int             len = sessionId.length;
-        StringBuffer    s = new StringBuffer (10 + 2 * len);
+        StringBuilder    sb = new StringBuilder (10 + 2 * len);
 
-        s.append ("{");
+        sb.append("{");
         for (int i = 0; i < len; i++) {
-            s.append (0x0ff & sessionId [i]);
+            sb.append(0x0ff & sessionId[i]);
             if (i != (len - 1))
-                s.append (", ");
+                sb.append (", ");
         }
-        s.append ("}");
-        return s.toString ();
+        sb.append("}");
+        return sb.toString ();
     }
 
 
--- a/src/share/classes/sun/security/ssl/SignatureAlgorithmsExtension.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/ssl/SignatureAlgorithmsExtension.java	Mon Jun 16 17:45:26 2014 +0100
@@ -118,18 +118,18 @@
 
     @Override
     public String toString() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         boolean opened = false;
         for (SignatureAndHashAlgorithm signAlg : algorithms) {
             if (opened) {
-                buffer.append(", " + signAlg.getAlgorithmName());
+                sb.append(", " + signAlg.getAlgorithmName());
             } else {
-                buffer.append(signAlg.getAlgorithmName());
+                sb.append(signAlg.getAlgorithmName());
                 opened = true;
             }
         }
 
-        return "Extension " + type + ", signature_algorithms: " + buffer;
+        return "Extension " + type + ", signature_algorithms: " + sb;
     }
 }
 
--- a/src/share/classes/sun/security/tools/jarsigner/Main.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/tools/jarsigner/Main.java	Mon Jun 16 17:45:26 2014 +0100
@@ -728,7 +728,7 @@
                             output.put(label, new ArrayList<String>());
                         }
 
-                        StringBuffer fb = new StringBuffer();
+                        StringBuilder fb = new StringBuilder();
                         String s = Long.toString(je.getSize());
                         for (int i = 6 - s.length(); i > 0; --i) {
                             fb.append(' ');
@@ -1572,25 +1572,25 @@
         if (cacheForSignerInfo.containsKey(signer)) {
             return cacheForSignerInfo.get(signer);
         }
-        StringBuffer s = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         List<? extends Certificate> certs = signer.getSignerCertPath().getCertificates();
         // display the signature timestamp, if present
         Date timestamp;
         Timestamp ts = signer.getTimestamp();
         if (ts != null) {
-            s.append(printTimestamp(tab, ts));
-            s.append('\n');
+            sb.append(printTimestamp(tab, ts));
+            sb.append('\n');
             timestamp = ts.getTimestamp();
         } else {
             timestamp = null;
             noTimestamp = true;
         }
-        // display the certificate(s). The first one is end-entity cert and
+        // display the certificate(sb). The first one is end-entity cert and
         // its KeyUsage should be checked.
         boolean first = true;
         for (Certificate c : certs) {
-            s.append(printCert(tab, c, true, timestamp, first));
-            s.append('\n');
+            sb.append(printCert(tab, c, true, timestamp, first));
+            sb.append('\n');
             first = false;
         }
         try {
@@ -1605,11 +1605,11 @@
                 // No more warning, we alreay have hasExpiredCert or notYetValidCert
             } else {
                 chainNotValidated = true;
-                s.append(tab + rb.getString(".CertPath.not.validated.") +
+                sb.append(tab + rb.getString(".CertPath.not.validated.") +
                         e.getLocalizedMessage() + "]\n");   // TODO
             }
         }
-        String result = s.toString();
+        String result = sb.toString();
         cacheForSignerInfo.put(signer, result);
         return result;
     }
--- a/src/share/classes/sun/security/tools/keytool/Main.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/tools/keytool/Main.java	Mon Jun 16 17:45:26 2014 +0100
@@ -3664,7 +3664,7 @@
                     .startsWith(s.toLowerCase(Locale.ENGLISH))) {
                 match[nmatch++] = i;
             } else {
-                StringBuffer sb = new StringBuffer();
+                StringBuilder sb = new StringBuilder();
                 boolean first = true;
                 for (char c: one.toCharArray()) {
                     if (first) {
@@ -3690,7 +3690,7 @@
             if (match[1] > experiment) {
                 return match[0];
             }
-            StringBuffer sb = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
             MessageFormat form = new MessageFormat(rb.getString
                 ("command.{0}.is.ambiguous."));
             Object[] source = {s};
--- a/src/share/classes/sun/security/tools/policytool/PolicyTool.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/tools/policytool/PolicyTool.java	Mon Jun 16 17:45:26 2014 +0100
@@ -975,16 +975,16 @@
         String result = "";
         if ((grantEntry.principals != null) &&
             (!grantEntry.principals.isEmpty())) {
-            StringBuffer buffer = new StringBuffer(200);
+            StringBuilder sb = new StringBuilder(200);
             ListIterator<PolicyParser.PrincipalEntry> list =
                                 grantEntry.principals.listIterator();
             while (list.hasNext()) {
                 PolicyParser.PrincipalEntry pppe = list.next();
-                buffer.append(" Principal " + pppe.getDisplayClass() + " " +
+                sb.append(" Principal " + pppe.getDisplayClass() + " " +
                     pppe.getDisplayName(true));
-                if (list.hasNext()) buffer.append(", ");
+                if (list.hasNext()) sb.append(", ");
             }
-            result = buffer.toString();
+            result = sb.toString();
         }
         return result;
     }
--- a/src/share/classes/sun/security/util/Debug.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/util/Debug.java	Mon Jun 16 17:45:26 2014 +0100
@@ -188,13 +188,13 @@
      */
     public static String toHexString(BigInteger b) {
         String hexValue = b.toString(16);
-        StringBuffer buf = new StringBuffer(hexValue.length()*2);
+        StringBuilder sb = new StringBuilder(hexValue.length()*2);
 
         if (hexValue.startsWith("-")) {
-            buf.append("   -");
+            sb.append("   -");
             hexValue = hexValue.substring(1);
         } else {
-            buf.append("    ");     // four spaces
+            sb.append("    ");     // four spaces
         }
         if ((hexValue.length()%2) != 0) {
             // add back the leading 0
@@ -203,17 +203,17 @@
         int i=0;
         while (i < hexValue.length()) {
             // one byte at a time
-            buf.append(hexValue.substring(i, i+2));
+            sb.append(hexValue.substring(i, i + 2));
             i+=2;
             if (i!= hexValue.length()) {
                 if ((i%64) == 0) {
-                    buf.append("\n    ");     // line after eight words
+                    sb.append("\n    ");     // line after eight words
                 } else if (i%8 == 0) {
-                    buf.append(" ");     // space between words
+                    sb.append(" ");     // space between words
                 }
             }
         }
-        return buf.toString();
+        return sb.toString();
     }
 
     /**
@@ -221,7 +221,7 @@
      */
     private static String marshal(String args) {
         if (args != null) {
-            StringBuffer target = new StringBuffer();
+            StringBuilder target = new StringBuilder();
             StringBuffer source = new StringBuffer(args);
 
             // obtain the "permission=<classname>" options
--- a/src/share/classes/sun/security/util/ManifestEntryVerifier.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/util/ManifestEntryVerifier.java	Mon Jun 16 17:45:26 2014 +0100
@@ -238,7 +238,7 @@
 
     static String toHex(byte[] data) {
 
-        StringBuffer sb = new StringBuffer(data.length*2);
+        StringBuilder sb = new StringBuilder(data.length*2);
 
         for (int i=0; i<data.length; i++) {
             sb.append(hexc[(data[i] >>4) & 0x0f]);
--- a/src/share/classes/sun/security/util/ObjectIdentifier.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/util/ObjectIdentifier.java	Mon Jun 16 17:45:26 2014 +0100
@@ -418,7 +418,7 @@
         String s = stringForm;
         if (s == null) {
             int length = encoding.length;
-            StringBuffer sb = new StringBuffer(length * 4);
+            StringBuilder sb = new StringBuilder(length * 4);
 
             int fromPos = 0;
             for (int i = 0; i < length; i++) {
--- a/src/share/classes/sun/security/util/PropertyExpander.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/util/PropertyExpander.java	Mon Jun 16 17:45:26 2014 +0100
@@ -67,7 +67,7 @@
         // no special characters
         if (p == -1) return value;
 
-        StringBuffer sb = new StringBuffer(value.length());
+        StringBuilder sb = new StringBuilder(value.length());
         int max = value.length();
         int i = 0;  // index of last character we copied
 
--- a/src/share/classes/sun/security/util/SignatureFileVerifier.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/util/SignatureFileVerifier.java	Mon Jun 16 17:45:26 2014 +0100
@@ -552,7 +552,7 @@
 
     static String toHex(byte[] data) {
 
-        StringBuffer sb = new StringBuffer(data.length*2);
+        StringBuilder sb = new StringBuilder(data.length*2);
 
         for (int i=0; i<data.length; i++) {
             sb.append(hexc[(data[i] >>4) & 0x0f]);
--- a/src/share/classes/sun/security/x509/X509CRLImpl.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/security/x509/X509CRLImpl.java	Mon Jun 16 17:45:26 2014 +0100
@@ -536,7 +536,7 @@
      * @return value of this CRL in a printable form.
      */
     public String toString() {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append("X.509 CRL v" + (version+1) + "\n");
         if (sigAlgId != null)
             sb.append("Signature Algorithm: " + sigAlgId.toString() +
--- a/src/share/classes/sun/swing/SwingUtilities2.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/swing/SwingUtilities2.java	Mon Jun 16 17:45:26 2014 +0100
@@ -1431,7 +1431,7 @@
     }
 
     public static String displayPropertiesToCSS(Font font, Color fg) {
-        StringBuffer rule = new StringBuffer("body {");
+        StringBuilder rule = new StringBuilder("body {");
         if (font != null) {
             rule.append(" font-family: ");
             rule.append(font.getFamily());
--- a/src/share/classes/sun/swing/plaf/synth/DefaultSynthStyle.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/swing/plaf/synth/DefaultSynthStyle.java	Mon Jun 16 17:45:26 2014 +0100
@@ -673,33 +673,33 @@
 
 
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
-        buf.append(super.toString()).append(',');
+        sb.append(super.toString()).append(',');
 
-        buf.append("data=").append(data).append(',');
+        sb.append("data=").append(data).append(',');
 
-        buf.append("font=").append(font).append(',');
+        sb.append("font=").append(font).append(',');
 
-        buf.append("insets=").append(insets).append(',');
+        sb.append("insets=").append(insets).append(',');
 
-        buf.append("synthGraphics=").append(synthGraphics).append(',');
+        sb.append("synthGraphics=").append(synthGraphics).append(',');
 
-        buf.append("painter=").append(painter).append(',');
+        sb.append("painter=").append(painter).append(',');
 
         StateInfo[] states = getStateInfo();
         if (states != null) {
-            buf.append("states[");
+            sb.append("states[");
             for (StateInfo state : states) {
-                buf.append(state.toString()).append(',');
+                sb.append(state.toString()).append(',');
             }
-            buf.append(']').append(',');
+            sb.append(']').append(',');
         }
 
         // remove last newline
-        buf.deleteCharAt(buf.length() - 1);
+        sb.deleteCharAt(sb.length() - 1);
 
-        return buf.toString();
+        return sb.toString();
     }
 
 
@@ -909,19 +909,19 @@
         }
 
         public String toString() {
-            StringBuffer buf = new StringBuffer();
+            StringBuilder sb = new StringBuilder();
 
-            buf.append(super.toString()).append(',');
+            sb.append(super.toString()).append(',');
 
-            buf.append("state=").append(Integer.toString(state)).append(',');
+            sb.append("state=").append(Integer.toString(state)).append(',');
 
-            buf.append("font=").append(font).append(',');
+            sb.append("font=").append(font).append(',');
 
             if (colors != null) {
-                buf.append("colors=").append(Arrays.asList(colors)).
+                sb.append("colors=").append(Arrays.asList(colors)).
                     append(',');
             }
-            return buf.toString();
+            return sb.toString();
         }
     }
 }
--- a/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java	Mon Jun 16 17:45:26 2014 +0100
@@ -439,20 +439,20 @@
     }
 
     private String fileNameString(File[] files) {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (int i = 0; files != null && i < files.length; i++) {
             if (i > 0) {
-                buf.append(" ");
+                sb.append(" ");
             }
             if (files.length > 1) {
-                buf.append("\"");
+                sb.append("\"");
             }
-            buf.append(fileNameString(files[i]));
+            sb.append(fileNameString(files[i]));
             if (files.length > 1) {
-                buf.append("\"");
+                sb.append("\"");
             }
         }
-        return buf.toString();
+        return sb.toString();
     }
 
     public void uninstallUI(JComponent c) {
--- a/src/share/classes/sun/text/normalizer/UTF16.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/text/normalizer/UTF16.java	Mon Jun 16 17:45:26 2014 +0100
@@ -530,7 +530,7 @@
             return String.valueOf((char)ch);
         }
 
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
         result.append(getLeadSurrogate(ch));
         result.append(getTrailSurrogate(ch));
         return result.toString();
--- a/src/share/classes/sun/tools/java/MemberDefinition.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/tools/java/MemberDefinition.java	Mon Jun 16 17:45:26 2014 +0100
@@ -919,18 +919,18 @@
         if (isInitializer()) {
             return isStatic() ? "static {}" : "instance {}";
         } else if (isConstructor()) {
-            StringBuffer buf = new StringBuffer();
-            buf.append(name);
-            buf.append('(');
+            StringBuilder sb = new StringBuilder();
+            sb.append(name);
+            sb.append('(');
             Type argTypes[] = getType().getArgumentTypes();
             for (int i = 0 ; i < argTypes.length ; i++) {
                 if (i > 0) {
-                    buf.append(',');
+                    sb.append(',');
                 }
-                buf.append(argTypes[i].toString());
+                sb.append(argTypes[i].toString());
             }
-            buf.append(')');
-            return buf.toString();
+            sb.append(')');
+            return sb.toString();
         } else if (isInnerClass()) {
             return getInnerClass().toString();
         }
--- a/src/share/classes/sun/tools/java/MethodSet.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/tools/java/MethodSet.java	Mon Jun 16 17:45:26 2014 +0100
@@ -261,18 +261,18 @@
      */
     public String toString() {
         int len = size();
-        StringBuffer buf = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         Iterator all = iterator();
-        buf.append("{");
+        sb.append("{");
 
         while (all.hasNext()) {
-            buf.append(all.next().toString());
+            sb.append(all.next().toString());
             len--;
             if (len > 0) {
-                buf.append(", ");
+                sb.append(", ");
             }
         }
-        buf.append("}");
-        return buf.toString();
+        sb.append("}");
+        return sb.toString();
     }
 }
--- a/src/share/classes/sun/tools/java/MethodType.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/tools/java/MethodType.java	Mon Jun 16 17:45:26 2014 +0100
@@ -91,17 +91,17 @@
     }
 
     public String typeString(String id, boolean abbrev, boolean ret) {
-        StringBuffer buf = new StringBuffer();
-        buf.append(id);
-        buf.append('(');
+        StringBuilder sb = new StringBuilder();
+        sb.append(id);
+        sb.append('(');
         for (int i = 0 ; i < argTypes.length ; i++) {
             if (i > 0) {
-                buf.append(", ");
+                sb.append(", ");
             }
-            buf.append(argTypes[i].typeString("", abbrev, ret));
+            sb.append(argTypes[i].typeString("", abbrev, ret));
         }
-        buf.append(')');
+        sb.append(')');
 
-        return ret ? getReturnType().typeString(buf.toString(), abbrev, ret) : buf.toString();
+        return ret ? getReturnType().typeString(sb.toString(), abbrev, ret) : sb.toString();
     }
 }
--- a/src/share/classes/sun/tools/java/Parser.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/tools/java/Parser.java	Mon Jun 16 17:45:26 2014 +0100
@@ -1395,24 +1395,24 @@
             return res;
         }
 
-        StringBuffer buf = new StringBuffer(res.id.toString());
+        StringBuilder sb = new StringBuilder(res.id.toString());
 
         while (token == FIELD) {
             scan();
             if ((token == MUL) && star) {
                 scan();
-                buf.append(".*");
+                sb.append(".*");
                 break;
             }
 
-            buf.append('.');
+            sb.append('.');
             if (token == IDENT) {
-                buf.append(scanner.idValue);
+                sb.append(scanner.idValue);
             }
             expect(IDENT);
         }
 
-        res.id = Identifier.lookup(buf.toString());
+        res.id = Identifier.lookup(sb.toString());
         return res;
     }
     /**
--- a/src/share/classes/sun/tools/java/Type.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/tools/java/Type.java	Mon Jun 16 17:45:26 2014 +0100
@@ -274,15 +274,15 @@
      * Create a method type with arguments.
      */
     public static synchronized Type tMethod(Type returnType, Type argTypes[]) {
-        StringBuffer buf = new StringBuffer();
-        buf.append(SIG_METHOD);
+        StringBuilder sb = new StringBuilder();
+        sb.append(SIG_METHOD);
         for (int i = 0 ; i < argTypes.length ; i++) {
-            buf.append(argTypes[i].getTypeSignature());
+            sb.append(argTypes[i].getTypeSignature());
         }
-        buf.append(SIG_ENDMETHOD);
-        buf.append(returnType.getTypeSignature());
+        sb.append(SIG_ENDMETHOD);
+        sb.append(returnType.getTypeSignature());
 
-        String sig = buf.toString();
+        String sig = sb.toString();
         Type t = (Type)typeHash.get(sig);
         if (t == null) {
             t = new MethodType(sig, returnType, argTypes);
--- a/src/share/classes/sun/tools/jconsole/Formatter.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/tools/jconsole/Formatter.java	Mon Jun 16 17:45:26 2014 +0100
@@ -232,15 +232,15 @@
     }
 
     static String justify(String str, int size) {
-        StringBuffer buf = new StringBuffer();
-        buf.append("<TT>");
+        StringBuilder sb = new StringBuilder();
+        sb.append("<TT>");
         int n = size - str.length();
         for (int i = 0; i < n; i++) {
-            buf.append("&nbsp;");
+            sb.append("&nbsp;");
         }
-        buf.append(str);
-        buf.append("</TT>");
-        return buf.toString();
+        sb.append(str);
+        sb.append("</TT>");
+        return sb.toString();
     }
 
     static String newRow(String label, String value) {
--- a/src/share/classes/sun/tools/jstatd/RemoteHostImpl.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/tools/jstatd/RemoteHostImpl.java	Mon Jun 16 17:45:26 2014 +0100
@@ -64,7 +64,7 @@
                     throws RemoteException, MonitorException {
         Integer v = new Integer(lvmid);
         RemoteVm stub = null;
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
 
         sb.append("local://").append(lvmid).append("@localhost");
         if (mode != null) {
--- a/src/share/classes/sun/tools/native2ascii/N2AFilter.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/tools/native2ascii/N2AFilter.java	Mon Jun 16 17:45:26 2014 +0100
@@ -58,7 +58,7 @@
                 out.write('u');
                 String hex =
                     Integer.toHexString(buf[i]);
-                StringBuffer hex4 = new StringBuffer(hex);
+                StringBuilder hex4 = new StringBuilder(hex);
                 hex4.reverse();
                 int length = 4 - hex4.length();
                 for (int j = 0; j < length; j++) {
--- a/src/share/classes/sun/tools/serialver/SerialVer.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/tools/serialver/SerialVer.java	Mon Jun 16 17:45:26 2014 +0100
@@ -85,7 +85,7 @@
                 /* Class not found so far */
             }
             if (!classFound) {
-                StringBuffer workBuffer = new StringBuffer(classname);
+                StringBuilder workBuffer = new StringBuilder(classname);
                 String workName = workBuffer.toString();
                 int i;
                 while ((i = workName.lastIndexOf('.')) != -1 && !classFound) {
--- a/src/share/classes/sun/tools/tree/FieldExpression.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/tools/tree/FieldExpression.java	Mon Jun 16 17:45:26 2014 +0100
@@ -79,21 +79,21 @@
      * Convert an '.' expression to a qualified identifier
      */
     static public Identifier toIdentifier(Expression e) {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         while (e.op == FIELD) {
             FieldExpression fe = (FieldExpression)e;
             if (fe.id == idThis || fe.id == idClass) {
                 return null;
             }
-            buf.insert(0, fe.id);
-            buf.insert(0, '.');
+            sb.insert(0, fe.id);
+            sb.insert(0, '.');
             e = fe.right;
         }
         if (e.op != IDENT) {
             return null;
         }
-        buf.insert(0, ((IdentifierExpression)e).id);
-        return Identifier.lookup(buf.toString());
+        sb.insert(0, ((IdentifierExpression) e).id);
+        return Identifier.lookup(sb.toString());
     }
 
     /**
--- a/src/share/classes/sun/tools/tree/Vset.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/tools/tree/Vset.java	Mon Jun 16 17:45:26 2014 +0100
@@ -495,7 +495,7 @@
     public String toString() {
         if (this == DEAD_END)
             return "{DEAD_END}";
-        StringBuffer sb = new StringBuffer("{");
+        StringBuilder sb = new StringBuilder("{");
         int maxVar = VBITS * (1 + (x.length+1)/2);
         for (int i = 0; i < maxVar; i++) {
             if (!testVarUnassigned(i)) {
--- a/src/share/classes/sun/tracing/PrintStreamProviderFactory.java	Mon Jun 16 08:09:30 2014 -0700
+++ b/src/share/classes/sun/tracing/PrintStreamProviderFactory.java	Mon Jun 16 17:45:26 2014 +0100
@@ -99,7 +99,7 @@
     }
 
     public void uncheckedTrigger(Object[] args) {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         sb.append(provider.getName());
         sb.append(".");
         sb.append(name);