changeset 10108:f87c5be90e01 jdk9-b20

Merge
author lana
date Fri, 20 Jun 2014 10:15:30 -0700
parents 95e589d99134 2f3a16f9d8c7
children 2df45ac1bf49
files make/mapfiles/libnpt/mapfile-vers src/share/classes/sun/management/manifest src/share/classes/sun/misc/Timeable.java src/share/classes/sun/misc/Timer.java src/share/npt/README.txt src/share/npt/npt.c src/share/npt/npt.h src/share/npt/utf.c src/share/npt/utf.h src/solaris/npt/npt_md.h src/solaris/npt/utf_md.c src/solaris/npt/utf_md.h src/windows/npt/npt_md.h src/windows/npt/utf_md.c src/windows/npt/utf_md.h test/sun/security/pkcs11/nss/src/MD5SUMS test/sun/security/pkcs11/nss/src/SHA1SUMS test/sun/security/pkcs11/nss/src/nss-3.13.1.tar.gz test/sun/tools/jhat/HatRun.java
diffstat 480 files changed, 3084 insertions(+), 4018 deletions(-) [+]
line wrap: on
line diff
--- a/THIRD_PARTY_README	Thu Jun 19 11:22:38 2014 -0700
+++ b/THIRD_PARTY_README	Fri Jun 20 10:15:30 2014 -0700
@@ -1471,7 +1471,7 @@
 version 2.0.
 
 The NSS libraries are supplied in executable form, built from unmodified
-NSS source code labeled with the "NSS_3.13.1_RTM" release tag.
+NSS source code labeled with the "NSS_3_16_RTM" HG tag.
 
 The NSS source code is available in the OpenJDK source code repository at:
     jdk/test/sun/security/pkcs11/nss/src
--- a/make/CompileDemos.gmk	Thu Jun 19 11:22:38 2014 -0700
+++ b/make/CompileDemos.gmk	Fri Jun 20 10:15:30 2014 -0700
@@ -1,6 +1,5 @@
-
 #
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -320,7 +319,6 @@
 endif
 
 $(eval $(call SetupJVMTIDemo,hprof, java_crw_demo, \
-    -I$(JDK_TOPDIR)/src/share/npt -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt \
     $(BUILD_LIBHPROF_AIX_EXTRA_CFLAGS), C, \
     -ldl, ws2_32.lib winmm.lib, -lsocket -lnsl, -lpthread, $(BUILD_LIBHPROF_AIX_EXTRA_SRC)))
 
--- a/make/CreateJars.gmk	Thu Jun 19 11:22:38 2014 -0700
+++ b/make/CreateJars.gmk	Fri Jun 20 10:15:30 2014 -0700
@@ -676,15 +676,6 @@
 
 ##########################################################################################
 
-#
-# This is an empty jar (only contains manifest) and fits poorly into framework...
-# create simple rule instead
-#
-$(IMAGES_OUTPUTDIR)/lib/management-agent.jar: $(JDK_TOPDIR)/src/share/classes/sun/management/manifest
-	$(JAR) cfm $@ $<
-
-##########################################################################################
-
 # This file is imported from hotspot in Import.gmk. Copying it into images/lib so that
 # all jars can be found in one place when creating images in Images.gmk. It needs to be
 # done here so that clean targets can be simple and accurate.
--- a/make/lib/CoreLibraries.gmk	Thu Jun 19 11:22:38 2014 -0700
+++ b/make/lib/CoreLibraries.gmk	Fri Jun 20 10:15:30 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -526,30 +526,3 @@
   BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/libjli_static.a
 
 endif
-
-##########################################################################################
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBNPT, \
-    LIBRARY := npt, \
-    OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
-    SRC := $(JDK_TOPDIR)/src/share/npt $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt, \
-    LANG := C, \
-    OPTIMIZATION := LOW, \
-    CFLAGS := $(CFLAGS_JDKLIB) \
-        -I$(JDK_TOPDIR)/src/share/npt \
-        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt, \
-    MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnpt/mapfile-vers, \
-    LDFLAGS := $(LDFLAGS_JDKLIB) \
-        $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_macosx := -liconv, \
-    LDFLAGS_SUFFIX_windows := -export:nptInitialize -export:nptTerminate, \
-    LDFLAGS_SUFFIX_solaris := -lc, \
-    VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
-    RC_FLAGS := $(RC_FLAGS) \
-        -D "JDK_FNAME=npt.dll" \
-        -D "JDK_INTERNAL_NAME=npt" \
-        -D "JDK_FTYPE=0x2L", \
-    OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libnpt, \
-    DEBUG_SYMBOLS := true))
-
-BUILD_LIBRARIES += $(BUILD_LIBNPT)
--- a/make/lib/ServiceabilityLibraries.gmk	Thu Jun 19 11:22:38 2014 -0700
+++ b/make/lib/ServiceabilityLibraries.gmk	Fri Jun 20 10:15:30 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -147,8 +147,6 @@
     CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) -DJDWP_LOGGING \
         -I$(JDK_TOPDIR)/src/share/transport/export \
         -I$(JDK_TOPDIR)/src/share/back/export \
-        -I$(JDK_TOPDIR)/src/share/npt \
-        -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt \
         -I$(JDK_TOPDIR)/src/share/back \
         -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/back \
         -I$(JDK_OUTPUTDIR)/gensrc_jdwp_headers, \
@@ -158,6 +156,7 @@
     LDFLAGS_SUFFIX_linux := $(LIBDL), \
     LDFLAGS_SUFFIX_solaris := $(LIBDL) -lc, \
     LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX), \
+    LDFLAGS_SUFFIX_macosx := -liconv, \
     VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
     RC_FLAGS := $(RC_FLAGS) \
         -D "JDK_FNAME=jdwp.dll" \
@@ -340,8 +339,6 @@
 
 BUILD_LIBHPROF_SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/hprof $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/demo/jvmti/hprof
 BUILD_LIBHPROF_CFLAGS := -I$(JDK_TOPDIR)/src/share/demo/jvmti/hprof \
-    -I$(JDK_TOPDIR)/src/share/npt \
-    -I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/npt \
     -I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo
 
 ifeq ($(OPENJDK_TARGET_OS), aix)
--- a/make/mapfiles/libnpt/mapfile-vers	Thu Jun 19 11:22:38 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-# Define public interface.
-
-SUNWprivate_1.1 {
-	global:
-	    nptInitialize;
-	    nptTerminate;
-	local:
-	    *;
-};
--- a/make/profile-includes.txt	Thu Jun 19 11:22:38 2014 -0700
+++ b/make/profile-includes.txt	Fri Jun 20 10:15:30 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -127,12 +127,9 @@
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)jsdt.diz \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)management$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)management.diz \
-    $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)npt$(SHARED_LIBRARY_SUFFIX) \
-    $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)npt.diz \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)prefs$(SHARED_LIBRARY_SUFFIX) \
     $(OPENJDK_TARGET_CPU_LEGACY_LIB)/$(LIBRARY_PREFIX)sctp$(SHARED_LIBRARY_SUFFIX) \
     jvm.hprof.txt \
-    management-agent.jar \
     management/jmxremote.access \
     management/jmxremote.password.template \
     management/management.properties \
@@ -140,8 +137,7 @@
 
 PROFILE_3_JRE_OTHER_FILES :=
 
-PROFILE_3_JRE_JAR_FILES := \
-    management-agent.jar
+PROFILE_3_JRE_JAR_FILES :=
 
 
 FULL_JRE_BIN_FILES := \
--- a/make/src/classes/build/tools/buildmetaindex/BuildMetaIndex.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/make/src/classes/build/tools/buildmetaindex/BuildMetaIndex.java	Fri Jun 20 10:15:30 2014 -0700
@@ -53,7 +53,6 @@
 com/sun/net/
 javax/
 com/sun/security/
-# management-agent.jar
 ! rt.jar
 org/w3c/
 com/sun/image/
--- a/src/share/back/debugInit.c	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/back/debugInit.c	Fri Jun 20 10:15:30 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -202,8 +202,6 @@
     jint              jvmtiCompileTimeMajorVersion;
     jint              jvmtiCompileTimeMinorVersion;
     jint              jvmtiCompileTimeMicroVersion;
-    char              *boot_path = NULL;
-    char              npt_lib[MAXPATHLEN];
 
     /* See if it's already loaded */
     if ( gdata!=NULL && gdata->isLoaded==JNI_TRUE ) {
@@ -268,24 +266,6 @@
         forceExit(1); /* Kill entire process, no core dump wanted */
     }
 
-    JVMTI_FUNC_PTR(gdata->jvmti, GetSystemProperty)
-        (gdata->jvmti, (const char *)"sun.boot.library.path",
-         &boot_path);
-
-    dbgsysBuildLibName(npt_lib, sizeof(npt_lib), boot_path, NPT_LIBNAME);
-    /* Npt and Utf function init */
-    NPT_INITIALIZE(npt_lib, &(gdata->npt), NPT_VERSION, NULL);
-    jvmtiDeallocate(boot_path);
-    if (gdata->npt == NULL) {
-        ERROR_MESSAGE(("JDWP: unable to initialize NPT library"));
-        return JNI_ERR;
-    }
-    gdata->npt->utf = (gdata->npt->utfInitialize)(NULL);
-    if (gdata->npt->utf == NULL) {
-        ERROR_MESSAGE(("JDWP: UTF function initialization failed"));
-        return JNI_ERR;
-    }
-
     /* Parse input options */
     if (!parseOptions(options)) {
         /* No message necessary, should have been printed out already */
@@ -1307,22 +1287,26 @@
     if ( error != JVMTI_ERROR_NONE ) {
         exit_code = 1;
         if ( docoredump ) {
+            LOG_MISC(("Dumping core as requested by command line"));
             finish_logging(exit_code);
             abort();
         }
     }
+
     if ( msg==NULL ) {
         msg = "";
     }
 
     LOG_MISC(("Exiting with error %s(%d): %s", jvmtiErrorText(error), error, msg));
 
-    gdata->vmDead = JNI_TRUE;
+    if (gdata != NULL) {
+        gdata->vmDead = JNI_TRUE;
 
-    /* Let's try and cleanup the JVMTI, if we even have one */
-    if ( gdata->jvmti != NULL ) {
-        /* Dispose of jvmti (gdata->jvmti becomes NULL) */
-        disposeEnvironment(gdata->jvmti);
+        /* Let's try and cleanup the JVMTI, if we even have one */
+        if ( gdata->jvmti != NULL ) {
+            /* Dispose of jvmti (gdata->jvmti becomes NULL) */
+            disposeEnvironment(gdata->jvmti);
+        }
     }
 
     /* Finish up logging. We reach here if JDWP is doing the exiting. */
--- a/src/share/back/error_messages.c	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/back/error_messages.c	Fri Jun 20 10:15:30 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,6 +47,7 @@
 #include <errno.h>
 
 #include "util.h"
+#include "utf_util.h"
 #include "proc_md.h"
 
 /* Maximim length of a message */
@@ -70,13 +71,8 @@
     len = (int)strlen((char*)utf8buf);
 
     /* Convert to platform encoding (ignore errors, dangerous area) */
-    if (gdata->npt != NULL) {
-        (void)(gdata->npt->utf8ToPlatform)(gdata->npt->utf,
-               utf8buf, len, pbuf, MAX_MESSAGE_LEN);
-    } else {
-        /* May be called before NPT is initialized so don't fault */
-        strncpy(pbuf, (char*)utf8buf, len);
-    }
+    (void)utf8ToPlatform(utf8buf, len, pbuf, MAX_MESSAGE_LEN);
+
     (void)fprintf(fp, "%s%s%s", prefix, pbuf, suffix);
 }
 
--- a/src/share/back/inStream.c	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/back/inStream.c	Fri Jun 20 10:15:30 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
  */
 
 #include "util.h"
+#include "utf_util.h"
 #include "stream.h"
 #include "inStream.h"
 #include "transport.h"
@@ -379,15 +380,12 @@
         string[length] = '\0';
 
         /* This is Standard UTF-8, convert to Modified UTF-8 if necessary */
-        new_length = (gdata->npt->utf8sToUtf8mLength)
-                             (gdata->npt->utf, (jbyte*)string, length);
+        new_length = utf8sToUtf8mLength((jbyte*)string, length);
         if ( new_length != length ) {
             char *new_string;
 
             new_string = jvmtiAllocate(new_length+1);
-            (gdata->npt->utf8sToUtf8m)
-                             (gdata->npt->utf, (jbyte*)string, length,
-                              (jbyte*)new_string, new_length);
+            utf8sToUtf8m((jbyte*)string, length, (jbyte*)new_string, new_length);
             jvmtiDeallocate(string);
             return new_string;
         }
--- a/src/share/back/outStream.c	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/back/outStream.c	Fri Jun 20 10:15:30 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
  */
 
 #include "util.h"
+#include "utf_util.h"
 #include "stream.h"
 #include "outStream.h"
 #include "inStream.h"
@@ -307,8 +308,7 @@
     } else {
         jint      new_length;
 
-        new_length = (gdata->npt->utf8mToUtf8sLength)
-                            (gdata->npt->utf, (jbyte*)string, length);
+        new_length = utf8mToUtf8sLength((jbyte*)string, length);
         if ( new_length == length ) {
             (void)outStream_writeInt(stream, length);
             error = writeBytes(stream, (jbyte *)string, length);
@@ -316,9 +316,7 @@
             char *new_string;
 
             new_string = jvmtiAllocate(new_length+1);
-            (gdata->npt->utf8mToUtf8s)
-                            (gdata->npt->utf, (jbyte*)string, length,
-                             (jbyte*)new_string, new_length);
+            utf8mToUtf8s((jbyte*)string, length, (jbyte*)new_string, new_length);
             (void)outStream_writeInt(stream, new_length);
             error = writeBytes(stream, (jbyte *)new_string, new_length);
             jvmtiDeallocate(new_string);
--- a/src/share/back/transport.c	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/back/transport.c	Fri Jun 20 10:15:30 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
  */
 
 #include "util.h"
+#include "utf_util.h"
 #include "transport.h"
 #include "debugLoop.h"
 #include "sys.h"
@@ -65,8 +66,7 @@
         len = (int)strlen(msg);
         maxlen = len+len/2+2; /* Should allow for plenty of room */
         utf8msg = (jbyte*)jvmtiAllocate(maxlen+1);
-        (void)(gdata->npt->utf8FromPlatform)(gdata->npt->utf,
-            msg, len, utf8msg, maxlen);
+        (void)utf8FromPlatform(msg, len, utf8msg, maxlen);
         utf8msg[maxlen] = 0;
     }
     if (rv == JDWPTRANSPORT_ERROR_NONE) {
@@ -110,8 +110,7 @@
         int  len;
 
         len = (int)strlen(libdir);
-        (void)(gdata->npt->utf8ToPlatform)(gdata->npt->utf,
-            (jbyte*)libdir, len, buf, (int)sizeof(buf));
+        (void)utf8ToPlatform((jbyte*)libdir, len, buf, (int)sizeof(buf));
         plibdir = buf;
     }
 
@@ -392,8 +391,7 @@
     /* Convert commandLine from UTF-8 to platform encoding */
     len = (int)strlen(commandLine);
     buf = jvmtiAllocate(len*3+3);
-    (void)(gdata->npt->utf8ToPlatform)(gdata->npt->utf,
-        (jbyte*)commandLine, len, buf, len*3+3);
+    (void)utf8ToPlatform((jbyte*)commandLine, len, buf, len*3+3);
 
     /* Exec commandLine */
     rc = dbgsysExec(buf);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/back/utf_util.c	Fri Jun 20 10:15:30 2014 -0700
@@ -0,0 +1,540 @@
+/*
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#include <stdlib.h>
+#include <ctype.h>
+
+#include "jni.h"
+
+#include "utf_util.h"
+
+
+/* Error and assert macros */
+#define UTF_ERROR(m) utfError(__FILE__, __LINE__,  m)
+#define UTF_ASSERT(x) ( (x)==0 ? UTF_ERROR("ASSERT ERROR " #x) : (void)0 )
+
+// Platform independed part
+
+static void utfError(char *file, int line, char *message) {
+    (void)fprintf(stderr, "UTF ERROR [\"%s\":%d]: %s\n", file, line, message);
+    abort();
+}
+
+/* Determine length of this Standard UTF-8 in Modified UTF-8.
+ *    Validation is done of the basic UTF encoding rules, returns
+ *    length (no change) when errors are detected in the UTF encoding.
+ *
+ *    Note: Accepts Modified UTF-8 also, no verification on the
+ *          correctness of Standard UTF-8 is done. e,g, 0xC080 input is ok.
+ */
+int JNICALL utf8sToUtf8mLength(jbyte *string, int length) {
+  int newLength;
+  int i;
+
+  newLength = 0;
+  for ( i = 0 ; i < length ; i++ ) {
+    unsigned byte;
+
+    byte = (unsigned char)string[i];
+    if ( (byte & 0x80) == 0 ) { /* 1byte encoding */
+      newLength++;
+      if ( byte == 0 ) {
+        newLength++; /* We gain one byte in length on NULL bytes */
+      }
+    } else if ( (byte & 0xE0) == 0xC0 ) { /* 2byte encoding */
+      /* Check encoding of following bytes */
+      if ( (i+1) >= length || (string[i+1] & 0xC0) != 0x80 ) {
+        break; /* Error condition */
+      }
+      i++; /* Skip next byte */
+      newLength += 2;
+    } else if ( (byte & 0xF0) == 0xE0 ) { /* 3byte encoding */
+      /* Check encoding of following bytes */
+      if ( (i+2) >= length || (string[i+1] & 0xC0) != 0x80
+        || (string[i+2] & 0xC0) != 0x80 ) {
+        break; /* Error condition */
+        }
+        i += 2; /* Skip next two bytes */
+        newLength += 3;
+    } else if ( (byte & 0xF8) == 0xF0 ) { /* 4byte encoding */
+      /* Check encoding of following bytes */
+      if ( (i+3) >= length || (string[i+1] & 0xC0) != 0x80
+        || (string[i+2] & 0xC0) != 0x80
+        || (string[i+3] & 0xC0) != 0x80 ) {
+        break; /* Error condition */
+        }
+        i += 3; /* Skip next 3 bytes */
+        newLength += 6; /* 4byte encoding turns into 2 3byte ones */
+    } else {
+      break; /* Error condition */
+    }
+  }
+  if ( i != length ) {
+    /* Error in finding new length, return old length so no conversion */
+    /* FIXUP: ERROR_MESSAGE? */
+    return length;
+  }
+  return newLength;
+}
+
+/* Convert Standard UTF-8 to Modified UTF-8.
+ *    Assumes the UTF-8 encoding was validated by utf8mLength() above.
+ *
+ *    Note: Accepts Modified UTF-8 also, no verification on the
+ *          correctness of Standard UTF-8 is done. e,g, 0xC080 input is ok.
+ */
+void JNICALL utf8sToUtf8m(jbyte *string, int length, jbyte *newString, int newLength) {
+    int i;
+    int j;
+
+    j = 0;
+    for ( i = 0 ; i < length ; i++ ) {
+        unsigned byte1;
+
+        byte1 = (unsigned char)string[i];
+
+        /* NULL bytes and bytes starting with 11110xxx are special */
+        if ( (byte1 & 0x80) == 0 ) { /* 1byte encoding */
+            if ( byte1 == 0 ) {
+                /* Bits out: 11000000 10000000 */
+                newString[j++] = (jbyte)0xC0;
+                newString[j++] = (jbyte)0x80;
+            } else {
+                /* Single byte */
+                newString[j++] = byte1;
+            }
+        } else if ( (byte1 & 0xE0) == 0xC0 ) { /* 2byte encoding */
+            newString[j++] = byte1;
+            newString[j++] = string[++i];
+        } else if ( (byte1 & 0xF0) == 0xE0 ) { /* 3byte encoding */
+            newString[j++] = byte1;
+            newString[j++] = string[++i];
+            newString[j++] = string[++i];
+        } else if ( (byte1 & 0xF8) == 0xF0 ) { /* 4byte encoding */
+            /* Beginning of 4byte encoding, turn into 2 3byte encodings */
+            unsigned byte2, byte3, byte4, u21;
+
+            /* Bits in: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx */
+            byte2 = (unsigned char)string[++i];
+            byte3 = (unsigned char)string[++i];
+            byte4 = (unsigned char)string[++i];
+            /* Reconstruct full 21bit value */
+            u21  = (byte1 & 0x07) << 18;
+            u21 += (byte2 & 0x3F) << 12;
+            u21 += (byte3 & 0x3F) << 6;
+            u21 += (byte4 & 0x3F);
+            /* Bits out: 11101101 1010xxxx 10xxxxxx */
+            newString[j++] = (jbyte)0xED;
+            newString[j++] = (jbyte)(0xA0 + (((u21 >> 16) - 1) & 0x0F));
+            newString[j++] = (jbyte)(0x80 + ((u21 >> 10) & 0x3F));
+            /* Bits out: 11101101 1011xxxx 10xxxxxx */
+            newString[j++] = (jbyte)0xED;
+            newString[j++] = (jbyte)(0xB0 + ((u21 >>  6) & 0x0F));
+            newString[j++] = byte4;
+        }
+    }
+    UTF_ASSERT(i==length);
+    UTF_ASSERT(j==newLength);
+    newString[j] = (jbyte)0;
+}
+
+/* Given a Modified UTF-8 string, calculate the Standard UTF-8 length.
+ *   Basic validation of the UTF encoding rules is done, and length is
+ *   returned (no change) when errors are detected.
+ *
+ *   Note: No validation is made that this is indeed Modified UTF-8 coming in.
+ *
+ */
+int JNICALL utf8mToUtf8sLength(jbyte *string, int length) {
+    int newLength;
+    int i;
+
+    newLength = 0;
+    for ( i = 0 ; i < length ; i++ ) {
+        unsigned byte1, byte2, byte3, byte4, byte5, byte6;
+
+        byte1 = (unsigned char)string[i];
+        if ( (byte1 & 0x80) == 0 ) { /* 1byte encoding */
+            newLength++;
+        } else if ( (byte1 & 0xE0) == 0xC0 ) { /* 2byte encoding */
+            /* Check encoding of following bytes */
+            if ( (i+1) >= length || (string[i+1] & 0xC0) != 0x80 ) {
+                break; /* Error condition */
+            }
+            byte2 = (unsigned char)string[++i];
+            if ( byte1 != 0xC0 || byte2 != 0x80 ) {
+                newLength += 2; /* Normal 2byte encoding, not 0xC080 */
+            } else {
+                newLength++;    /* We will turn 0xC080 into 0 */
+            }
+        } else if ( (byte1 & 0xF0) == 0xE0 ) { /* 3byte encoding */
+            /* Check encoding of following bytes */
+            if ( (i+2) >= length || (string[i+1] & 0xC0) != 0x80
+                                 || (string[i+2] & 0xC0) != 0x80 ) {
+                break; /* Error condition */
+            }
+            byte2 = (unsigned char)string[++i];
+            byte3 = (unsigned char)string[++i];
+            newLength += 3;
+            /* Possible process a second 3byte encoding */
+            if ( (i+3) < length && byte1 == 0xED && (byte2 & 0xF0) == 0xA0 ) {
+                /* See if this is a pair of 3byte encodings */
+                byte4 = (unsigned char)string[i+1];
+                byte5 = (unsigned char)string[i+2];
+                byte6 = (unsigned char)string[i+3];
+                if ( byte4 == 0xED && (byte5 & 0xF0) == 0xB0 ) {
+                    /* Check encoding of 3rd byte */
+                    if ( (byte6 & 0xC0) != 0x80 ) {
+                        break; /* Error condition */
+                    }
+                    newLength++; /* New string will have 4byte encoding */
+                    i += 3;       /* Skip next 3 bytes */
+                }
+            }
+        } else {
+            break; /* Error condition */
+        }
+    }
+    if ( i != length ) {
+        /* Error in UTF encoding */
+        /*  FIXUP: ERROR_MESSAGE()? */
+        return length;
+    }
+    return newLength;
+}
+
+/* Convert a Modified UTF-8 string into a Standard UTF-8 string
+ *   It is assumed that this string has been validated in terms of the
+ *   basic UTF encoding rules by utf8Length() above.
+ *
+ *   Note: No validation is made that this is indeed Modified UTF-8 coming in.
+ *
+ */
+void JNICALL utf8mToUtf8s(jbyte *string, int length, jbyte *newString, int newLength) {
+    int i;
+    int j;
+
+    j = 0;
+    for ( i = 0 ; i < length ; i++ ) {
+        unsigned byte1, byte2, byte3, byte4, byte5, byte6;
+
+        byte1 = (unsigned char)string[i];
+        if ( (byte1 & 0x80) == 0 ) { /* 1byte encoding */
+            /* Single byte */
+            newString[j++] = byte1;
+        } else if ( (byte1 & 0xE0) == 0xC0 ) { /* 2byte encoding */
+            byte2 = (unsigned char)string[++i];
+            if ( byte1 != 0xC0 || byte2 != 0x80 ) {
+                newString[j++] = byte1;
+                newString[j++] = byte2;
+            } else {
+                newString[j++] = 0;
+            }
+        } else if ( (byte1 & 0xF0) == 0xE0 ) { /* 3byte encoding */
+            byte2 = (unsigned char)string[++i];
+            byte3 = (unsigned char)string[++i];
+            if ( i+3 < length && byte1 == 0xED && (byte2 & 0xF0) == 0xA0 ) {
+                /* See if this is a pair of 3byte encodings */
+                byte4 = (unsigned char)string[i+1];
+                byte5 = (unsigned char)string[i+2];
+                byte6 = (unsigned char)string[i+3];
+                if ( byte4 == 0xED && (byte5 & 0xF0) == 0xB0 ) {
+                    unsigned u21;
+
+                    /* Bits in: 11101101 1010xxxx 10xxxxxx */
+                    /* Bits in: 11101101 1011xxxx 10xxxxxx */
+                    i += 3;
+
+                    /* Reconstruct 21 bit code */
+                    u21  = ((byte2 & 0x0F) + 1) << 16;
+                    u21 += (byte3 & 0x3F) << 10;
+                    u21 += (byte5 & 0x0F) << 6;
+                    u21 += (byte6 & 0x3F);
+
+                    /* Bits out: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx */
+
+                    /* Convert to 4byte encoding */
+                    newString[j++] = 0xF0 + ((u21 >> 18) & 0x07);
+                    newString[j++] = 0x80 + ((u21 >> 12) & 0x3F);
+                    newString[j++] = 0x80 + ((u21 >>  6) & 0x3F);
+                    newString[j++] = 0x80 + (u21 & 0x3F);
+                    continue;
+                }
+            }
+            /* Normal 3byte encoding */
+            newString[j++] = byte1;
+            newString[j++] = byte2;
+            newString[j++] = byte3;
+        }
+    }
+    UTF_ASSERT(i==length);
+    UTF_ASSERT(j==newLength);
+    newString[j] = 0;
+}
+
+#ifdef _WIN32
+// Microsoft Windows specific part
+
+#include <windows.h>
+
+static UINT getCodepage() {
+    LANGID langID;
+    LCID localeID;
+    TCHAR strCodePage[7];       // ANSI code page id
+
+    static UINT intCodePage = -1;
+
+    if (intCodePage == -1) {
+        // Firts call, get codepage from the os
+        langID = LANGIDFROMLCID(GetUserDefaultLCID());
+        localeID = MAKELCID(langID, SORT_DEFAULT);
+        if (GetLocaleInfo(localeID, LOCALE_IDEFAULTANSICODEPAGE,
+                         strCodePage, sizeof(strCodePage)/sizeof(TCHAR)) > 0 ) {
+            intCodePage = atoi(strCodePage);
+        }
+        else {
+            intCodePage = GetACP();
+        }
+    }
+
+    return intCodePage;
+}
+
+/*
+ * Get wide string  (assumes len>0)
+ */
+static WCHAR* getWideString(UINT codePage, char* str, int len, int *pwlen) {
+    int wlen;
+    WCHAR* wstr;
+
+    /* Convert the string to WIDE string */
+    wlen = MultiByteToWideChar(codePage, 0, str, len, NULL, 0);
+    *pwlen = wlen;
+    if (wlen <= 0) {
+        UTF_ERROR(("Can't get WIDE string length"));
+        return NULL;
+    }
+    wstr = (WCHAR*)malloc(wlen * sizeof(WCHAR));
+    if (wstr == NULL) {
+        UTF_ERROR(("Can't malloc() any space"));
+        return NULL;
+    }
+    if (MultiByteToWideChar(codePage, 0, str, len, wstr, wlen) == 0) {
+        UTF_ERROR(("Can't get WIDE string"));
+        return NULL;
+    }
+    return wstr;
+}
+
+/*
+ * Convert UTF-8 to a platform string
+ */
+int JNICALL utf8ToPlatform(jbyte *utf8, int len, char* output, int outputMaxLen) {
+    int wlen;
+    int plen;
+    WCHAR* wstr;
+    UINT codepage;
+
+    UTF_ASSERT(utf8);
+    UTF_ASSERT(output);
+    UTF_ASSERT(outputMaxLen > len);
+
+    /* Zero length is ok, but we don't need to do much */
+    if ( len == 0 ) {
+        output[0] = 0;
+        return 0;
+    }
+
+    /* Get WIDE string version (assumes len>0) */
+    wstr = getWideString(CP_UTF8, (char*)utf8, len, &wlen);
+    if ( wstr == NULL ) {
+        // Can't allocate WIDE string
+        goto just_copy_bytes;
+    }
+
+    /* Convert WIDE string to MultiByte string */
+    codepage = getCodepage();
+    plen = WideCharToMultiByte(codepage, 0, wstr, wlen,
+                               output, outputMaxLen, NULL, NULL);
+    free(wstr);
+    if (plen <= 0) {
+        // Can't convert WIDE string to multi-byte
+        goto just_copy_bytes;
+    }
+    output[plen] = '\0';
+    return plen;
+
+just_copy_bytes:
+    (void)memcpy(output, utf8, len);
+    output[len] = 0;
+    return len;
+}
+
+/*
+ * Convert Platform Encoding to UTF-8.
+ */
+int JNICALL utf8FromPlatform(char *str, int len, jbyte *output, int outputMaxLen) {
+    int wlen;
+    int plen;
+    WCHAR* wstr;
+    UINT codepage;
+
+    UTF_ASSERT(str);
+    UTF_ASSERT(output);
+    UTF_ASSERT(outputMaxLen > len);
+
+    /* Zero length is ok, but we don't need to do much */
+    if ( len == 0 ) {
+        output[0] = 0;
+        return 0;
+    }
+
+    /* Get WIDE string version (assumes len>0) */
+    codepage = getCodepage();
+    wstr = getWideString(codepage, str, len, &wlen);
+    if ( wstr == NULL ) {
+        goto just_copy_bytes;
+    }
+
+    /* Convert WIDE string to UTF-8 string */
+    plen = WideCharToMultiByte(CP_UTF8, 0, wstr, wlen,
+                               (char*)output, outputMaxLen, NULL, NULL);
+    free(wstr);
+    if (plen <= 0) {
+        UTF_ERROR(("Can't convert WIDE string to multi-byte"));
+        goto just_copy_bytes;
+    }
+    output[plen] = '\0';
+    return plen;
+
+just_copy_bytes:
+    (void)memcpy(output, str, len);
+    output[len] = 0;
+    return len;
+}
+
+
+#else
+// *NIX specific part
+
+#include <iconv.h>
+#include <locale.h>
+#include <langinfo.h>
+#include <string.h>
+
+typedef enum {TO_UTF8, FROM_UTF8} conv_direction;
+
+/*
+ * Do iconv() conversion.
+ *    Returns length or -1 if output overflows.
+ */
+static int iconvConvert(conv_direction drn, char *bytes, size_t len, char *output, size_t outputMaxLen) {
+
+    static char *codeset = 0;
+    iconv_t func;
+    size_t bytes_converted;
+    size_t inLeft, outLeft;
+    char *inbuf, *outbuf;
+
+    UTF_ASSERT(bytes);
+    UTF_ASSERT(output);
+    UTF_ASSERT(outputMaxLen > len);
+
+    /* Zero length is ok, but we don't need to do much */
+    if ( len == 0 ) {
+        output[0] = 0;
+        return 0;
+    }
+
+    if (codeset == NULL && codeset != (char *) -1) {
+        // locale is not initialized, do it now
+        if (setlocale(LC_ALL, "") != NULL) {
+            // nl_langinfo returns ANSI_X3.4-1968 by default
+            codeset = (char*)nl_langinfo(CODESET);
+        }
+
+        if (codeset == NULL) {
+           // Not able to intialize process locale from platform one.
+           codeset = (char *) -1;
+        }
+    }
+
+    if (codeset == (char *) -1) {
+      // There was an error during initialization, so just bail out
+      goto just_copy_bytes;
+    }
+
+    func = (drn == TO_UTF8) ? iconv_open(codeset, "UTF-8") : iconv_open("UTF-8", codeset);
+    if (func == (iconv_t) -1) {
+        // Requested charset combination is not supported, conversion couldn't be done.
+        // make sure we will not try it again
+        codeset = (char *) -1;
+        goto just_copy_bytes;
+    }
+
+    // perform conversion
+    inbuf = bytes;
+    outbuf = output;
+    inLeft = len;
+    outLeft = outputMaxLen;
+
+    bytes_converted = iconv(func, (void*)&inbuf, &inLeft, &outbuf, &outLeft);
+    if (bytes_converted == (size_t) -1 || bytes_converted == 0 || inLeft != 0) {
+        // Input string is invalid, not able to convert entire string
+        // or some other iconv error happens.
+        iconv_close(func);
+        goto just_copy_bytes;
+    }
+
+    iconv_close(func);
+    // Overwrite bytes_converted with value of actually stored bytes
+    bytes_converted = outputMaxLen-outLeft;
+    output[bytes_converted] = 0;
+    return bytes_converted;
+
+
+just_copy_bytes:
+    (void)memcpy(output, bytes, len);
+    output[len] = 0;
+    return len;
+ }
+
+/*
+ * Convert UTF-8 to Platform Encoding.
+ *    Returns length or -1 if output overflows.
+ */
+int JNICALL utf8ToPlatform(jbyte *utf8, int len, char *output, int outputMaxLen) {
+    return iconvConvert(FROM_UTF8, (char*)utf8, len, output, outputMaxLen);
+}
+
+/*
+ * Convert Platform Encoding to UTF-8.
+ *    Returns length or -1 if output overflows.
+ */
+int JNICALL utf8FromPlatform(char *str, int len, jbyte *output, int outputMaxLen) {
+    return iconvConvert(TO_UTF8, str, len, (char*) output, outputMaxLen);
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/back/utf_util.h	Fri Jun 20 10:15:30 2014 -0700
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#ifndef _utf_util_h_
+#define _utf_util_h_
+
+#include "jni.h"
+
+
+int JNICALL utf8sToUtf8mLength(jbyte *string, int length);
+void JNICALL utf8sToUtf8m(jbyte *string, int length, jbyte *newString, int newLength);
+int JNICALL utf8mToUtf8sLength(jbyte *string, int length);
+void JNICALL utf8mToUtf8s(jbyte *string, int length, jbyte *newString, int newLength);
+
+int JNICALL utf8ToPlatform(jbyte *utf8, int len, char* output, int outputMaxLen);
+int JNICALL utf8FromPlatform(char *str, int len, jbyte *output, int outputMaxLen);
+
+#endif
--- a/src/share/back/util.h	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/back/util.h	Fri Jun 20 10:15:30 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -53,9 +53,6 @@
 #include "error_messages.h"
 #include "debugInit.h"
 
-/* Get access to Native Platform Toolkit functions */
-#include "npt.h"
-
 /* Definition of a CommonRef tracked by the backend for the frontend */
 typedef struct RefNode {
     jlong        seqNum;        /* ID of reference, also key for hash table */
@@ -123,9 +120,6 @@
 
     unsigned log_flags;
 
-    /* The Native Platform Toolkit access */
-    NptEnv *npt;
-
     /* Common References static data */
     jrawMonitorID refLock;
     jlong         nextSeqNum;
--- a/src/share/classes/com/sun/imageio/plugins/gif/GIFImageReader.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/imageio/plugins/gif/GIFImageReader.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/imageio/plugins/png/PNGMetadata.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/java/util/jar/pack/BandStructure.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/jmx/snmp/IPAcl/NetMaskImpl.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/jmx/snmp/IPAcl/ParseException.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/jmx/snmp/IPAcl/SnmpAcl.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/jmx/snmp/IPAcl/TokenMgrError.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/jmx/snmp/SnmpMessage.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/jmx/snmp/SnmpMsg.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/jmx/snmp/SnmpOpaque.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/jmx/snmp/SnmpV3Message.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/jndi/cosnaming/CNNameParser.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/jndi/dns/DnsContextFactory.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/jndi/dns/DnsName.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/jndi/dns/ResourceRecord.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/jndi/ldap/ClientId.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/jndi/ldap/DigestClientId.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/jndi/ldap/LdapSchemaParser.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/jndi/ldap/ServiceLocator.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/jndi/ldap/sasl/DefaultCallbackHandler.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/jndi/toolkit/dir/SearchFilter.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/media/sound/SoftPerformer.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/media/sound/WaveExtensibleFileReader.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/org/apache/xml/internal/security/utils/Base64.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/security/sasl/CramMD5Base.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/security/sasl/CramMD5Server.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/security/sasl/digest/DigestMD5Base.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/security/sasl/digest/DigestMD5Server.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/security/sasl/util/AbstractSaslImpl.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/ExceptionSpec.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/LineBreakpointSpec.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/bdi/MethodBreakpointSpec.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/expr/ParseException.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/CommandInterpreter.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/ContextManager.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/gui/SourceModel.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/BreakpointSpec.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/Commands.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/Env.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/debug/tty/TTY.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/tools/example/trace/Trace.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/tools/hat/internal/util/Misc.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/tools/jdi/FieldImpl.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/tools/jdi/JNITypeParser.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/tools/jdi/MethodImpl.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/tools/jdi/ReferenceTypeImpl.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/tools/jdi/SDE.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/tools/jdi/TargetVM.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/beans/Introspector.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/beans/Statement.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/io/RandomAccessFile.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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/lang/invoke/InvokerBytecodeGenerator.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Fri Jun 20 10:15:30 2014 -0700
@@ -40,6 +40,7 @@
 import static java.lang.invoke.MethodHandleNatives.Constants.*;
 import static java.lang.invoke.LambdaForm.BasicType.*;
 import sun.invoke.util.VerifyType;
+import sun.reflect.misc.ReflectUtil;
 
 /**
  * Code generation backend for LambdaForm.
@@ -594,6 +595,8 @@
             return false;  // inner class of some sort
         if (cls.getClassLoader() != MethodHandle.class.getClassLoader())
             return false;  // not on BCP
+        if (ReflectUtil.isVMAnonymousClass(cls)) // FIXME: switch to supported API once it is added
+            return false;
         MethodType mtype = member.getMethodOrFieldType();
         if (!isStaticallyNameable(mtype.returnType()))
             return false;
@@ -612,6 +615,8 @@
             cls = cls.getComponentType();
         if (cls.isPrimitive())
             return true;  // int[].class, for example
+        if (ReflectUtil.isVMAnonymousClass(cls)) // FIXME: switch to supported API once it is added
+            return false;
         // could use VerifyAccess.isClassAccessible but the following is a safe approximation
         if (cls.getClassLoader() != Object.class.getClassLoader())
             return false;
--- a/src/share/classes/java/net/IDN.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/net/IDN.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/net/SocketPermission.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/net/URI.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/net/URISyntaxException.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/net/URLDecoder.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/net/URLEncoder.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/net/URLStreamHandler.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/nio/file/InvalidPathException.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/rmi/dgc/VMID.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/security/CodeSigner.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/security/Timestamp.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/security/cert/CertPath.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/security/cert/CollectionCertStoreParameters.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/security/cert/LDAPCertStoreParameters.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/security/cert/PKIXBuilderParameters.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/security/cert/PKIXCertPathBuilderResult.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/security/cert/PKIXCertPathValidatorResult.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/security/cert/PKIXParameters.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/security/cert/PolicyQualifierInfo.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/security/cert/TrustAnchor.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/security/cert/X509CRLSelector.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/security/cert/X509CertSelector.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/text/AttributedString.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/text/ChoiceFormat.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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/time/Instant.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/time/Instant.java	Fri Jun 20 10:15:30 2014 -0700
@@ -375,7 +375,7 @@
             return Instant.ofEpochSecond(instantSecs, nanoOfSecond);
         } catch (DateTimeException ex) {
             throw new DateTimeException("Unable to obtain Instant from TemporalAccessor: " +
-                    temporal + " of type " + temporal.getClass().getName());
+                    temporal + " of type " + temporal.getClass().getName(), ex);
         }
     }
 
@@ -1058,7 +1058,8 @@
         }
         // inline TemporalAccessor.super.query(query) as an optimization
         if (query == TemporalQueries.chronology() || query == TemporalQueries.zoneId() ||
-                query == TemporalQueries.zone() || query == TemporalQueries.offset()) {
+                query == TemporalQueries.zone() || query == TemporalQueries.offset() ||
+                query == TemporalQueries.localDate() || query == TemporalQueries.localTime()) {
             return null;
         }
         return query.queryFrom(this);
--- a/src/share/classes/java/time/OffsetDateTime.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/time/OffsetDateTime.java	Fri Jun 20 10:15:30 2014 -0700
@@ -357,10 +357,11 @@
         }
         try {
             ZoneOffset offset = ZoneOffset.from(temporal);
-            try {
-                LocalDateTime ldt = LocalDateTime.from(temporal);
-                return OffsetDateTime.of(ldt, offset);
-            } catch (DateTimeException ignore) {
+            LocalDate date = temporal.query(TemporalQueries.localDate());
+            LocalTime time = temporal.query(TemporalQueries.localTime());
+            if (date != null && time != null) {
+                return OffsetDateTime.of(date, time, offset);
+            } else {
                 Instant instant = Instant.from(temporal);
                 return OffsetDateTime.ofInstant(instant, offset);
             }
--- a/src/share/classes/java/time/ZonedDateTime.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/time/ZonedDateTime.java	Fri Jun 20 10:15:30 2014 -0700
@@ -81,6 +81,7 @@
 import java.time.temporal.TemporalAdjuster;
 import java.time.temporal.TemporalAmount;
 import java.time.temporal.TemporalField;
+import java.time.temporal.TemporalQueries;
 import java.time.temporal.TemporalQuery;
 import java.time.temporal.TemporalUnit;
 import java.time.temporal.UnsupportedTemporalTypeException;
@@ -551,14 +552,14 @@
         }
         try {
             ZoneId zone = ZoneId.from(temporal);
-            try {
+            if (temporal.isSupported(INSTANT_SECONDS)) {
                 long epochSecond = temporal.getLong(INSTANT_SECONDS);
                 int nanoOfSecond = temporal.get(NANO_OF_SECOND);
                 return create(epochSecond, nanoOfSecond, zone);
-
-            } catch (DateTimeException ex1) {
-                LocalDateTime ldt = LocalDateTime.from(temporal);
-                return of(ldt, zone);
+            } else {
+                LocalDate date = LocalDate.from(temporal);
+                LocalTime time = LocalTime.from(temporal);
+                return of(date, time, zone);
             }
         } catch (DateTimeException ex) {
             throw new DateTimeException("Unable to obtain ZonedDateTime from TemporalAccessor: " +
@@ -2039,8 +2040,12 @@
      * @throws DateTimeException if unable to query (defined by the query)
      * @throws ArithmeticException if numeric overflow occurs (defined by the query)
      */
+    @SuppressWarnings("unchecked")
     @Override  // override for Javadoc
     public <R> R query(TemporalQuery<R> query) {
+        if (query == TemporalQueries.localDate()) {
+            return (R) toLocalDate();
+        }
         return ChronoZonedDateTime.super.query(query);
     }
 
--- a/src/share/classes/java/time/format/DateTimeFormatterBuilder.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/time/format/DateTimeFormatterBuilder.java	Fri Jun 20 10:15:30 2014 -0700
@@ -3283,7 +3283,7 @@
             } catch (RuntimeException ex) {
                 return ~position;
             }
-            int successPos = text.length();
+            int successPos = pos;
             successPos = context.setParsedField(INSTANT_SECONDS, instantSecs, position, successPos);
             return context.setParsedField(NANO_OF_SECOND, nano, position, successPos);
         }
--- a/src/share/classes/java/time/format/Parsed.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/time/format/Parsed.java	Fri Jun 20 10:15:30 2014 -0700
@@ -66,6 +66,7 @@
 import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_DAY;
 import static java.time.temporal.ChronoField.HOUR_OF_AMPM;
 import static java.time.temporal.ChronoField.HOUR_OF_DAY;
+import static java.time.temporal.ChronoField.INSTANT_SECONDS;
 import static java.time.temporal.ChronoField.MICRO_OF_DAY;
 import static java.time.temporal.ChronoField.MICRO_OF_SECOND;
 import static java.time.temporal.ChronoField.MILLI_OF_DAY;
@@ -74,14 +75,17 @@
 import static java.time.temporal.ChronoField.MINUTE_OF_HOUR;
 import static java.time.temporal.ChronoField.NANO_OF_DAY;
 import static java.time.temporal.ChronoField.NANO_OF_SECOND;
+import static java.time.temporal.ChronoField.OFFSET_SECONDS;
 import static java.time.temporal.ChronoField.SECOND_OF_DAY;
 import static java.time.temporal.ChronoField.SECOND_OF_MINUTE;
 
 import java.time.DateTimeException;
+import java.time.Instant;
 import java.time.LocalDate;
 import java.time.LocalTime;
 import java.time.Period;
 import java.time.ZoneId;
+import java.time.ZoneOffset;
 import java.time.chrono.ChronoLocalDate;
 import java.time.chrono.ChronoLocalDateTime;
 import java.time.chrono.ChronoZonedDateTime;
@@ -241,12 +245,15 @@
         resolveTimeLenient();
         crossCheck();
         resolvePeriod();
+        resolveFractional();
+        resolveInstant();
         return this;
     }
 
     //-----------------------------------------------------------------------
     private void resolveFields() {
         // resolve ChronoField
+        resolveInstantFields();
         resolveDateFields();
         resolveTimeFields();
 
@@ -300,6 +307,7 @@
             }
             // if something changed then have to redo ChronoField resolve
             if (changedCount > 0) {
+                resolveInstantFields();
                 resolveDateFields();
                 resolveTimeFields();
             }
@@ -316,6 +324,29 @@
     }
 
     //-----------------------------------------------------------------------
+    private void resolveInstantFields() {
+        // resolve parsed instant seconds to date and time if zone available
+        if (fieldValues.containsKey(INSTANT_SECONDS)) {
+            if (zone != null) {
+                resolveInstantFields0(zone);
+            } else {
+                Long offsetSecs = fieldValues.get(OFFSET_SECONDS);
+                if (offsetSecs != null) {
+                    ZoneOffset offset = ZoneOffset.ofTotalSeconds(offsetSecs.intValue());
+                    resolveInstantFields0(offset);
+                }
+            }
+        }
+    }
+
+    private void resolveInstantFields0(ZoneId selectedZone) {
+        Instant instant = Instant.ofEpochSecond(fieldValues.remove(INSTANT_SECONDS));
+        ChronoZonedDateTime<?> zdt = chrono.zonedDateTime(instant, selectedZone);
+        updateCheckConflict(zdt.toLocalDate());
+        updateCheckConflict(INSTANT_SECONDS, SECOND_OF_DAY, (long) zdt.toLocalTime().toSecondOfDay());
+    }
+
+    //-----------------------------------------------------------------------
     private void resolveDateFields() {
         updateCheckConflict(chrono.resolveDate(fieldValues, resolverStyle));
     }
@@ -533,6 +564,42 @@
         }
     }
 
+    private void resolveFractional() {
+        // ensure fractional seconds available as ChronoField requires
+        // resolveTimeLenient() will have merged MICRO_OF_SECOND/MILLI_OF_SECOND to NANO_OF_SECOND
+        if (time == null &&
+                (fieldValues.containsKey(INSTANT_SECONDS) ||
+                    fieldValues.containsKey(SECOND_OF_DAY) ||
+                    fieldValues.containsKey(SECOND_OF_MINUTE))) {
+            if (fieldValues.containsKey(NANO_OF_SECOND)) {
+                long nos = fieldValues.get(NANO_OF_SECOND);
+                fieldValues.put(MICRO_OF_SECOND, nos / 1000);
+                fieldValues.put(MILLI_OF_SECOND, nos / 1000000);
+            } else {
+                fieldValues.put(NANO_OF_SECOND, 0L);
+                fieldValues.put(MICRO_OF_SECOND, 0L);
+                fieldValues.put(MILLI_OF_SECOND, 0L);
+            }
+        }
+    }
+
+    private void resolveInstant() {
+        // add instant seconds if we have date, time and zone
+        if (date != null && time != null) {
+            if (zone != null) {
+                long instant = date.atTime(time).atZone(zone).getLong(ChronoField.INSTANT_SECONDS);
+                fieldValues.put(INSTANT_SECONDS, instant);
+            } else {
+                Long offsetSecs = fieldValues.get(OFFSET_SECONDS);
+                if (offsetSecs != null) {
+                    ZoneOffset offset = ZoneOffset.ofTotalSeconds(offsetSecs.intValue());
+                    long instant = date.atTime(time).atZone(offset).getLong(ChronoField.INSTANT_SECONDS);
+                    fieldValues.put(INSTANT_SECONDS, instant);
+                }
+            }
+        }
+    }
+
     private void updateCheckConflict(LocalTime timeToSet, Period periodToSet) {
         if (time != null) {
             if (time.equals(timeToSet) == false) {
@@ -568,18 +635,20 @@
         for (Iterator<Entry<TemporalField, Long>> it = fieldValues.entrySet().iterator(); it.hasNext(); ) {
             Entry<TemporalField, Long> entry = it.next();
             TemporalField field = entry.getKey();
-            long val1;
-            try {
-                val1 = target.getLong(field);
-            } catch (RuntimeException ex) {
-                continue;
+            if (target.isSupported(field)) {
+                long val1;
+                try {
+                    val1 = target.getLong(field);
+                } catch (RuntimeException ex) {
+                    continue;
+                }
+                long val2 = entry.getValue();
+                if (val1 != val2) {
+                    throw new DateTimeException("Conflict found: Field " + field + " " + val1 +
+                            " differs from " + field + " " + val2 + " derived from " + target);
+                }
+                it.remove();
             }
-            long val2 = entry.getValue();
-            if (val1 != val2) {
-                throw new DateTimeException("Conflict found: Field " + field + " " + val1 +
-                        " differs from " + field + " " + val2 + " derived from " + target);
-            }
-            it.remove();
         }
     }
 
--- a/src/share/classes/java/util/Properties.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/util/Properties.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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/concurrent/ConcurrentHashMap.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/util/concurrent/ConcurrentHashMap.java	Fri Jun 20 10:15:30 2014 -0700
@@ -133,12 +133,12 @@
  * mapped values are (perhaps transiently) not used or all take the
  * same mapping value.
  *
- * <p>A ConcurrentHashMap can be used as scalable frequency map (a
+ * <p>A ConcurrentHashMap can be used as a scalable frequency map (a
  * form of histogram or multiset) by using {@link
  * java.util.concurrent.atomic.LongAdder} values and initializing via
  * {@link #computeIfAbsent computeIfAbsent}. For example, to add a count
  * to a {@code ConcurrentHashMap<String,LongAdder> freqs}, you can use
- * {@code freqs.computeIfAbsent(k -> new LongAdder()).increment();}
+ * {@code freqs.computeIfAbsent(key, k -> new LongAdder()).increment();}
  *
  * <p>This class and its views and iterators implement all of the
  * <em>optional</em> methods of the {@link Map} and {@link Iterator}
--- a/src/share/classes/java/util/concurrent/atomic/LongAdder.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/util/concurrent/atomic/LongAdder.java	Fri Jun 20 10:15:30 2014 -0700
@@ -57,7 +57,7 @@
  * frequency map (a form of histogram or multiset). For example, to
  * add a count to a {@code ConcurrentHashMap<String,LongAdder> freqs},
  * initializing if not already present, you can use {@code
- * freqs.computeIfAbsent(k -> new LongAdder()).increment();}
+ * freqs.computeIfAbsent(key, k -> new LongAdder()).increment();}
  *
  * <p>This class extends {@link Number}, but does <em>not</em> define
  * methods such as {@code equals}, {@code hashCode} and {@code
--- a/src/share/classes/java/util/prefs/Base64.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/util/prefs/Base64.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/java/util/regex/PatternSyntaxException.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/imageio/stream/ImageInputStreamImpl.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/naming/BinaryRefAddr.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/naming/NameImpl.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/naming/RefAddr.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/naming/Reference.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/naming/directory/BasicAttribute.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/print/MimeType.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/print/attribute/ResolutionSyntax.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/print/attribute/SetOfIntegerSyntax.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/print/attribute/Size2DSyntax.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/security/auth/kerberos/KerberosTicket.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sound/sampled/CompoundControl.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sound/sampled/DataLine.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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/sql/CommonDataSource.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/CommonDataSource.java	Fri Jun 20 10:15:30 2014 -0700
@@ -34,6 +34,7 @@
  * Interface that defines the methods which are common between <code>DataSource</code>,
  * <code>XADataSource</code> and <code>ConnectionPoolDataSource</code>.
  *
+ * @since 1.6
  */
 public interface CommonDataSource {
 
--- a/src/share/classes/javax/sql/rowset/BaseRowSet.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/BaseRowSet.java	Fri Jun 20 10:15:30 2014 -0700
@@ -291,6 +291,8 @@
 * extending class overrides and reimplements any <code>BaseRowSet</code> method and encounters
 * connectivity or underlying data source issues, that method <b>may</b> in addition throw an
 * <code>SQLException</code> object for that reason.
+*
+* @since 1.5
 */
 
 public abstract class BaseRowSet implements Serializable, Cloneable {
--- a/src/share/classes/javax/sql/rowset/CachedRowSet.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/CachedRowSet.java	Fri Jun 20 10:15:30 2014 -0700
@@ -626,6 +626,7 @@
  * </PRE>
  *
  * @author Jonathan Bruce
+ * @since 1.5
  */
 
 public interface CachedRowSet extends RowSet, Joinable {
--- a/src/share/classes/javax/sql/rowset/FilteredRowSet.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/FilteredRowSet.java	Fri Jun 20 10:15:30 2014 -0700
@@ -122,6 +122,7 @@
  * synchronized with the data source.
  *
  * @author Jonathan Bruce
+ * @since 1.5
  */
 
 public interface FilteredRowSet extends WebRowSet {
--- a/src/share/classes/javax/sql/rowset/JdbcRowSet.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/JdbcRowSet.java	Fri Jun 20 10:15:30 2014 -0700
@@ -118,6 +118,7 @@
  * requirements of connected and disconnected <code>RowSet</code> objects.
  *
  * @author Jonathan Bruce
+ * @since 1.5
  */
 
 public interface JdbcRowSet extends RowSet, Joinable {
--- a/src/share/classes/javax/sql/rowset/JoinRowSet.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/JoinRowSet.java	Fri Jun 20 10:15:30 2014 -0700
@@ -217,6 +217,7 @@
  *       This method creates a copy that can be persisted to the data source.
  * </UL>
  *
+ * @since 1.5
  */
 
 public interface JoinRowSet extends WebRowSet {
--- a/src/share/classes/javax/sql/rowset/Joinable.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/Joinable.java	Fri Jun 20 10:15:30 2014 -0700
@@ -129,6 +129,7 @@
  *
  * @see JoinRowSet
  * @author  Jonathan Bruce
+ * @since 1.5
  */
 public interface Joinable {
 
--- a/src/share/classes/javax/sql/rowset/Predicate.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/Predicate.java	Fri Jun 20 10:15:30 2014 -0700
@@ -97,6 +97,7 @@
  * applications that use both column identification conventions.
  *
  * @author Jonathan Bruce, Amit Handa
+ * @since 1.5
  *
  */
 
--- a/src/share/classes/javax/sql/rowset/RowSetMetaDataImpl.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/RowSetMetaDataImpl.java	Fri Jun 20 10:15:30 2014 -0700
@@ -48,6 +48,8 @@
  * Therefore, any <code>RowSetMetaDataImpl</code> method that retrieves information
  * is defined as having unspecified behavior when it is called
  * before the <code>RowSet</code> object contains data.
+ *
+ * @since 1.5
  */
 public class RowSetMetaDataImpl implements RowSetMetaData,  Serializable {
 
--- a/src/share/classes/javax/sql/rowset/RowSetWarning.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/RowSetWarning.java	Fri Jun 20 10:15:30 2014 -0700
@@ -50,6 +50,8 @@
  * The inherited methods <code>getMessage</code>, <code>getSQLState</code>,
  * and <code>getErrorCode</code> retrieve information contained in a
  * <code>RowSetWarning</code> object.
+ *
+ * @since 1.5
  */
 public class RowSetWarning extends SQLException {
 
--- a/src/share/classes/javax/sql/rowset/WebRowSet.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/WebRowSet.java	Fri Jun 20 10:15:30 2014 -0700
@@ -408,6 +408,7 @@
  * @see javax.sql.rowset.CachedRowSet
  * @see javax.sql.rowset.FilteredRowSet
  * @see javax.sql.rowset.JoinRowSet
+ * @since 1.5
  */
 
 public interface WebRowSet extends CachedRowSet {
--- a/src/share/classes/javax/sql/rowset/serial/SQLOutputImpl.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/serial/SQLOutputImpl.java	Fri Jun 20 10:15:30 2014 -0700
@@ -52,6 +52,8 @@
  * to write data from the <code>SQLData</code> object to
  * the <code>SQLOutputImpl</code> output stream as the
  * representation of an SQL user-defined type.
+ *
+ * @since 1.5
  */
 public class SQLOutputImpl implements SQLOutput {
 
--- a/src/share/classes/javax/sql/rowset/serial/SerialArray.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/serial/SerialArray.java	Fri Jun 20 10:15:30 2014 -0700
@@ -56,6 +56,7 @@
  * SerialArray is to be used by more than one thread then access to the
  * SerialArray should be controlled by appropriate synchronization.
  *
+ * @since 1.5
  */
 public class SerialArray implements Array, Serializable, Cloneable {
 
--- a/src/share/classes/javax/sql/rowset/serial/SerialBlob.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/serial/SerialBlob.java	Fri Jun 20 10:15:30 2014 -0700
@@ -58,6 +58,7 @@
  * should be controlled by appropriate synchronization.
  *
  * @author Jonathan Bruce
+ * @since 1.5
  */
 public class SerialBlob implements Blob, Serializable, Cloneable {
 
--- a/src/share/classes/javax/sql/rowset/serial/SerialClob.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/serial/SerialClob.java	Fri Jun 20 10:15:30 2014 -0700
@@ -49,7 +49,9 @@
  * <p> A SerialClob is not safe for use by multiple concurrent threads.  If a
  * SerialClob is to be used by more than one thread then access to the SerialClob
  * should be controlled by appropriate synchronization.
+ *
  * @author Jonathan Bruce
+ * @since 1.5
  */
 public class SerialClob implements Clob, Serializable, Cloneable {
 
--- a/src/share/classes/javax/sql/rowset/serial/SerialDatalink.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/serial/SerialDatalink.java	Fri Jun 20 10:15:30 2014 -0700
@@ -48,6 +48,8 @@
  * A SerialDatalink is not safe for use by multiple concurrent threads.  If a
  * SerialDatalink is to be used by more than one thread then access to the
  * SerialDatalink should be controlled by appropriate synchronization.
+ *
+ * @since 1.5
  */
 public class SerialDatalink implements Serializable, Cloneable {
 
--- a/src/share/classes/javax/sql/rowset/serial/SerialException.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/serial/SerialException.java	Fri Jun 20 10:15:30 2014 -0700
@@ -32,6 +32,7 @@
  * SQL types such as <code>BLOB, CLOB, STRUCT or ARRAY</code> in
  * addition to SQL types such as <code>DATALINK and JAVAOBJECT</code>
  *
+ * @since 1.5
  */
 public class SerialException extends java.sql.SQLException {
 
--- a/src/share/classes/javax/sql/rowset/serial/SerialJavaObject.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/serial/SerialJavaObject.java	Fri Jun 20 10:15:30 2014 -0700
@@ -54,6 +54,7 @@
  * SerialJavaObject should be controlled by appropriate synchronization.
  *
  * @author Jonathan Bruce
+ * @since 1.5
  */
 public class SerialJavaObject implements Serializable, Cloneable {
 
--- a/src/share/classes/javax/sql/rowset/serial/SerialRef.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/serial/SerialRef.java	Fri Jun 20 10:15:30 2014 -0700
@@ -43,6 +43,7 @@
  * SerialRef is to be used by more than one thread then access to the SerialRef
  * should be controlled by appropriate synchronization.
  *
+ * @since 1.5
  */
 public class SerialRef implements Ref, Serializable, Cloneable {
 
--- a/src/share/classes/javax/sql/rowset/serial/SerialStruct.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/serial/SerialStruct.java	Fri Jun 20 10:15:30 2014 -0700
@@ -57,6 +57,7 @@
  * SerialStruct is to be used by more than one thread then access to the
  * SerialStruct should be controlled by appropriate synchronization.
  *
+ * @since 1.5
  */
 public class SerialStruct implements Struct, Serializable, Cloneable {
 
--- a/src/share/classes/javax/sql/rowset/spi/SyncFactory.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/spi/SyncFactory.java	Fri Jun 20 10:15:30 2014 -0700
@@ -200,6 +200,7 @@
  * @author  Jonathan Bruce
  * @see javax.sql.rowset.spi.SyncProvider
  * @see javax.sql.rowset.spi.SyncFactoryException
+ * @since 1.5
  */
 public class SyncFactory {
 
--- a/src/share/classes/javax/sql/rowset/spi/SyncFactoryException.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/spi/SyncFactoryException.java	Fri Jun 20 10:15:30 2014 -0700
@@ -35,6 +35,7 @@
  * @author Jonathan Bruce
  * @see javax.sql.rowset.spi.SyncFactory
  * @see javax.sql.rowset.spi.SyncFactoryException
+ * @since 1.5
  */
 public class SyncFactoryException extends java.sql.SQLException {
 
--- a/src/share/classes/javax/sql/rowset/spi/SyncProvider.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/spi/SyncProvider.java	Fri Jun 20 10:15:30 2014 -0700
@@ -209,6 +209,7 @@
  * @author Jonathan Bruce
  * @see javax.sql.rowset.spi.SyncFactory
  * @see javax.sql.rowset.spi.SyncFactoryException
+ * @since 1.5
  */
 public abstract class SyncProvider {
 
--- a/src/share/classes/javax/sql/rowset/spi/SyncProviderException.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/spi/SyncProviderException.java	Fri Jun 20 10:15:30 2014 -0700
@@ -61,6 +61,7 @@
  * @see javax.sql.rowset.spi.SyncFactory
  * @see javax.sql.rowset.spi.SyncResolver
  * @see javax.sql.rowset.spi.SyncFactoryException
+ * @since 1.5
  */
 public class SyncProviderException extends java.sql.SQLException {
 
--- a/src/share/classes/javax/sql/rowset/spi/SyncResolver.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/spi/SyncResolver.java	Fri Jun 20 10:15:30 2014 -0700
@@ -231,7 +231,9 @@
  *          }
  *      }
  * }</PRE>
+ *
  * @author  Jonathan Bruce
+ * @since 1.5
  */
 
 public interface SyncResolver extends RowSet {
--- a/src/share/classes/javax/sql/rowset/spi/TransactionalWriter.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/spi/TransactionalWriter.java	Fri Jun 20 10:15:30 2014 -0700
@@ -44,6 +44,8 @@
  * the <code>CachedRowSet</code> constant <code>COMMIT_ON_ACCEPT_CHANGES</code>
  * to <code>false</code> and use the <code>commit</code> and <code>rollback</code>
  * methods defined in this interface to manage transaction boundaries.
+ *
+ * @since 1.5
  */
 public interface TransactionalWriter extends RowSetWriter {
 
--- a/src/share/classes/javax/sql/rowset/spi/XmlReader.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/spi/XmlReader.java	Fri Jun 20 10:15:30 2014 -0700
@@ -46,6 +46,8 @@
  * rowset's <code>xmlReader</code> field. When the <code>WebRowSet</code>
  * object's <code>readXml</code> method is invoked, it in turn invokes
  * its XML reader's <code>readXML</code> method.
+ *
+ * @since 1.5
  */
 public interface XmlReader extends RowSetReader {
 
--- a/src/share/classes/javax/sql/rowset/spi/XmlWriter.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/sql/rowset/spi/XmlWriter.java	Fri Jun 20 10:15:30 2014 -0700
@@ -44,6 +44,8 @@
  * Writing a <code>WebRowSet</code> object includes printing the
  * rowset's data, metadata, and properties, all with the
  * appropriate XML tags.
+ *
+ * @since 1.5
  */
 public interface XmlWriter extends RowSetWriter {
 
--- a/src/share/classes/javax/swing/AbstractButton.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/AbstractButton.java	Fri Jun 20 10:15:30 2014 -0700
@@ -947,6 +947,7 @@
      * <p>
      * This is a JavaBeans bound property.
      *
+     * @param iconTextGap the space between icon and text if these properties are set.
      * @since 1.4
      * @see #getIconTextGap
      * @beaninfo
@@ -1337,6 +1338,7 @@
      * that of the <code>Action</code>.
      *
      * @param a the button's action
+     * @return the {@code PropertyChangeListener}
      * @since 1.3
      * @see Action
      * @see #setAction
@@ -2070,12 +2072,20 @@
         }
     }
 
-
+    /**
+     * Returns {@code ActionListener} that is added to model.
+     *
+     * @return the {@code ActionListener}
+     */
     protected ActionListener createActionListener() {
         return getHandler();
     }
 
-
+    /**
+     * Returns {@code ItemListener} that is added to model.
+     *
+     * @return the {@code ItemListener}
+     */
     protected ItemListener createItemListener() {
         return getHandler();
     }
@@ -2148,7 +2158,7 @@
         return listenerList.getListeners(ItemListener.class);
     }
 
-   /**
+    /**
      * Returns an array (length 1) containing the label or
      * <code>null</code> if the button is not selected.
      *
@@ -2164,6 +2174,12 @@
         return selectedObjects;
     }
 
+    /**
+     * Initialization of the {@code AbstractButton}.
+     *
+     * @param text  the text of the button
+     * @param icon  the Icon image to display on the button
+     */
     protected void init(String text, Icon icon) {
         if(text != null) {
             setText(text);
--- a/src/share/classes/javax/swing/AbstractSpinnerModel.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/AbstractSpinnerModel.java	Fri Jun 20 10:15:30 2014 -0700
@@ -131,6 +131,7 @@
      * myAbstractSpinnerModel.getListeners(ChangeListener.class);
      * </pre>
      *
+     * @param <T> the type of requested listeners
      * @param listenerType the type of listeners to return, e.g. ChangeListener.class
      * @return all of the objects receiving <em>listenerType</em> notifications
      *         from this model
--- a/src/share/classes/javax/swing/Action.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/Action.java	Fri Jun 20 10:15:30 2014 -0700
@@ -337,6 +337,9 @@
     /**
      * Gets one of this object's properties
      * using the associated key.
+     *
+     * @param key a {@code String} containing the key
+     * @return the {@code Object} value
      * @see #putValue
      */
     public Object getValue(String key);
--- a/src/share/classes/javax/swing/ActionMap.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/ActionMap.java	Fri Jun 20 10:15:30 2014 -0700
@@ -94,6 +94,9 @@
      * for <code>key</code>.
      * <p>In most instances, <code>key</code> will be
      * <code>action.getValue(NAME)</code>.
+     *
+     * @param key a key
+     * @param action a binding for {@code key}
      */
     public void put(Object key, Action action) {
         if (key == null) {
@@ -113,6 +116,9 @@
     /**
      * Returns the binding for <code>key</code>, messaging the
      * parent <code>ActionMap</code> if the binding is not locally defined.
+     *
+     * @param key a key
+     * @return the binding for {@code key}
      */
     public Action get(Object key) {
         Action value = (arrayTable == null) ? null :
@@ -130,6 +136,8 @@
 
     /**
      * Removes the binding for <code>key</code> from this <code>ActionMap</code>.
+     *
+     * @param key a key
      */
     public void remove(Object key) {
         if (arrayTable != null) {
@@ -148,6 +156,8 @@
 
     /**
      * Returns the <code>Action</code> names that are bound in this <code>ActionMap</code>.
+     *
+     * @return an array of the keys
      */
     public Object[] keys() {
         if (arrayTable == null) {
@@ -172,6 +182,8 @@
      * Returns an array of the keys defined in this <code>ActionMap</code> and
      * its parent. This method differs from <code>keys()</code> in that
      * this method includes the keys defined in the parent.
+     *
+     * @return an array of the keys
      */
     public Object[] allKeys() {
         int           count = size();
--- a/src/share/classes/javax/swing/ButtonGroup.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/ButtonGroup.java	Fri Jun 20 10:15:30 2014 -0700
@@ -167,9 +167,11 @@
     }
 
     /**
-     * Returns whether a <code>ButtonModel</code> is selected.
-     * @return <code>true</code> if the button is selected,
-     *   otherwise returns <code>false</code>
+     * Returns whether a {@code ButtonModel} is selected.
+     *
+     * @param m an isntance of {@code ButtonModel}
+     * @return {@code true} if the button is selected,
+     *   otherwise returns {@code false}
      */
     public boolean isSelected(ButtonModel m) {
         return (m == selection);
--- a/src/share/classes/javax/swing/ComboBoxEditor.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/ComboBoxEditor.java	Fri Jun 20 10:15:30 2014 -0700
@@ -34,23 +34,44 @@
  */
 public interface ComboBoxEditor {
 
-  /** Return the component that should be added to the tree hierarchy for
-    * this editor
-    */
+  /**
+   * Returns the component that should be added to the tree hierarchy for
+   * this editor
+   *
+   * @return the component
+   */
   public Component getEditorComponent();
 
-  /** Set the item that should be edited. Cancel any editing if necessary **/
+  /**
+   * Set the item that should be edited. Cancel any editing if necessary
+   *
+   * @param anObject an item
+   */
   public void setItem(Object anObject);
 
-  /** Return the edited item **/
+  /**
+   * Returns the edited item
+   *
+   * @return the edited item
+   */
   public Object getItem();
 
-  /** Ask the editor to start editing and to select everything **/
+  /**
+   * Ask the editor to start editing and to select everything
+   */
   public void selectAll();
 
-  /** Add an ActionListener. An action event is generated when the edited item changes **/
+  /**
+   * Add an ActionListener. An action event is generated when the edited item changes
+   *
+   * @param l an {@code ActionListener}
+   */
   public void addActionListener(ActionListener l);
 
-  /** Remove an ActionListener **/
+  /**
+   * Remove an ActionListener
+   *
+   * @param l an {@code ActionListener}
+   */
   public void removeActionListener(ActionListener l);
 }
--- a/src/share/classes/javax/swing/ComponentInputMap.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/ComponentInputMap.java	Fri Jun 20 10:15:30 2014 -0700
@@ -78,7 +78,9 @@
     }
 
     /**
-     * Returns the component the <code>InputMap</code> was created for.
+     * Returns the component the {@code InputMap} was created for.
+     *
+     * @return the component the {@code InputMap} was created for.
      */
     public JComponent getComponent() {
         return component;
--- a/src/share/classes/javax/swing/DefaultButtonModel.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/DefaultButtonModel.java	Fri Jun 20 10:15:30 2014 -0700
@@ -477,6 +477,7 @@
      * If no such listeners exist,
      * this method returns an empty array.
      *
+     * @param <T> the type of requested listeners
      * @param listenerType  the type of listeners requested;
      *          this parameter should specify an interface
      *          that descends from <code>java.util.EventListener</code>
--- a/src/share/classes/javax/swing/FocusManager.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/FocusManager.java	Fri Jun 20 10:15:30 2014 -0700
@@ -140,6 +140,7 @@
      * Returns whether the application has invoked
      * <code>disableSwingFocusManager()</code>.
      *
+     * @return {@code true} if focus manager is enabled.
      * @see #disableSwingFocusManager
      * @deprecated As of 1.4, replaced by
      *   <code>KeyboardFocusManager.getDefaultFocusTraversalPolicy()</code>
--- a/src/share/classes/javax/swing/GroupLayout.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/GroupLayout.java	Fri Jun 20 10:15:30 2014 -0700
@@ -670,6 +670,7 @@
      * @param resizable whether the group is resizable
      * @param anchorBaselineToTop whether the baseline is anchored to
      *        the top or bottom of the group
+     * @return the {@code ParallelGroup}
      * @see #createBaselineGroup
      * @see ParallelGroup
      */
--- a/src/share/classes/javax/swing/JColorChooser.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/JColorChooser.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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/JComboBox.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/JComboBox.java	Fri Jun 20 10:15:30 2014 -0700
@@ -232,6 +232,13 @@
         updateUI();
     }
 
+    /**
+     * Registers ancestor listener so that it will receive
+     * {@code AncestorEvents} when it or any of its ancestors
+     * move or are made visible or invisible.
+     * Events are also sent when the component or its ancestors are added
+     * or removed from the containment hierarchy.
+     */
     protected void installAncestorListener() {
         addAncestorListener(new AncestorListener(){
                                 public void ancestorAdded(AncestorEvent event){ hidePopup();}
@@ -812,6 +819,8 @@
 
     /**
      * Sets the visibility of the popup.
+     *
+     * @param v if {@code true} shows the popup, otherwise, hides the popup.
      */
     public void setPopupVisible(boolean v) {
         getUI().setPopupVisible(this, v);
@@ -1144,6 +1153,7 @@
      * that of the <code>Action</code>.
      *
      * @param a the combobox's action
+     * @return the {@code PropertyChangeListener}
      * @since 1.3
      * @see Action
      * @see #setAction
@@ -1357,6 +1367,8 @@
      *
      * @param keyChar a char, typically this is a keyboard key
      *                  typed by the user
+     * @return {@code true} if there is an item corresponding to that character.
+     *         Otherwise, returns {@code false}.
      */
     public boolean selectWithKeyChar(char keyChar) {
         int index;
@@ -1443,6 +1455,7 @@
      * selection. Typically, the first selection with a matching first
      * character becomes the selected item.
      *
+     * @param aManager a key selection manager
      * @beaninfo
      *       expert: true
      *  description: The objects that changes the selection when a key is pressed.
--- a/src/share/classes/javax/swing/JOptionPane.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/JOptionPane.java	Fri Jun 20 10:15:30 2014 -0700
@@ -435,6 +435,7 @@
      * @exception HeadlessException if
      *   <code>GraphicsEnvironment.isHeadless</code> returns
      *   <code>true</code>
+     * @return user's input
      * @see java.awt.GraphicsEnvironment#isHeadless
      */
     public static String showInputDialog(Object message)
@@ -451,6 +452,7 @@
      * @param message the <code>Object</code> to display
      * @param initialSelectionValue the value used to initialize the input
      *                 field
+     * @return user's input
      * @since 1.4
      */
     public static String showInputDialog(Object message, Object initialSelectionValue) {
@@ -469,6 +471,7 @@
      * @exception HeadlessException if
      *    <code>GraphicsEnvironment.isHeadless</code> returns
      *    <code>true</code>
+     * @return user's input
      * @see java.awt.GraphicsEnvironment#isHeadless
      */
     public static String showInputDialog(Component parentComponent,
@@ -489,6 +492,7 @@
      * @param message the <code>Object</code> to display
      * @param initialSelectionValue the value used to initialize the input
      *                 field
+     * @return user's input
      * @since 1.4
      */
     public static String showInputDialog(Component parentComponent, Object message,
@@ -515,6 +519,7 @@
      *                  <code>WARNING_MESSAGE</code>,
      *                  <code>QUESTION_MESSAGE</code>,
      *                  or <code>PLAIN_MESSAGE</code>
+     * @return user's input
      * @exception HeadlessException if
      *   <code>GraphicsEnvironment.isHeadless</code> returns
      *   <code>true</code>
@@ -1348,6 +1353,7 @@
      * @param parentComponent  the parent <code>Component</code>
      *          for the dialog
      * @param message  the <code>Object</code> to display
+     * @return user's input
      */
     public static String showInternalInputDialog(Component parentComponent,
                                                  Object message) {
@@ -1368,6 +1374,7 @@
      * @param messageType the type of message that is to be displayed:
      *                    ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE,
      *                    QUESTION_MESSAGE, or PLAIN_MESSAGE
+     * @return user's input
      */
     public static String showInternalInputDialog(Component parentComponent,
                              Object message, String title, int messageType) {
@@ -2246,6 +2253,8 @@
      * <p>
      * This is a bound property.
      *
+     * @param newValue if true, an input component whose parent is {@code parentComponent}
+     *                 is provided to allow the user to input a value.
      * @see #setSelectionValues
      * @see #setInputValue
      * @beaninfo
--- a/src/share/classes/javax/swing/JProgressBar.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/JProgressBar.java	Fri Jun 20 10:15:30 2014 -0700
@@ -665,6 +665,7 @@
      * to the {@code ChangeListener}s that have been added directly to the
      * progress bar.
      *
+     * @return the instance of a custom {@code ChangeListener} implementation.
      * @see #changeListener
      * @see #fireStateChanged
      * @see javax.swing.event.ChangeListener
--- a/src/share/classes/javax/swing/JRadioButton.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/JRadioButton.java	Fri Jun 20 10:15:30 2014 -0700
@@ -118,6 +118,7 @@
      * Creates a radiobutton where properties are taken from the
      * Action supplied.
      *
+     * @param a an {@code Action}
      * @since 1.3
      */
     public JRadioButton(Action a) {
@@ -175,6 +176,8 @@
      *
      * @param text  the string displayed on the radio button
      * @param icon  the image that the button should display
+     * @param selected if {@code true}, the button is initially selected
+     *                 otherwise, the button is initially unselected
      */
     public JRadioButton (String text, Icon icon, boolean selected) {
         super(text, icon, selected);
--- a/src/share/classes/javax/swing/JRadioButtonMenuItem.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/JRadioButtonMenuItem.java	Fri Jun 20 10:15:30 2014 -0700
@@ -173,6 +173,8 @@
      *
      * @param text  the string displayed on the radio button
      * @param icon  the image that the button should display
+     * @param selected if {@code true}, the button is initially selected,
+     *                 otherwise, the button is initially unselected
      */
     public JRadioButtonMenuItem(String text, Icon icon, boolean selected) {
         super(text, icon);
--- a/src/share/classes/javax/swing/JScrollBar.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/JScrollBar.java	Fri Jun 20 10:15:30 2014 -0700
@@ -149,6 +149,12 @@
      * @see #setVisibleAmount
      * @see #setMinimum
      * @see #setMaximum
+     *
+     * @param orientation an orientation of the {@code JScrollBar}
+     * @param value an int giving the current value
+     * @param extent an int giving the amount by which the value can "jump"
+     * @param min an int giving the minimum value
+     * @param max an int giving the maximum value
      */
     public JScrollBar(int orientation, int value, int extent, int min, int max)
     {
@@ -172,6 +178,8 @@
      * value = 0
      * extent = 10
      * </pre>
+     *
+     * @param orientation an orientation of the {@code JScrollBar}
      */
     public JScrollBar(int orientation) {
         this(orientation, 0, 10, 0, 100);
@@ -213,6 +221,7 @@
      * Returns the delegate that implements the look and feel for
      * this component.
      *
+     * @return the scroll bar's current UI.
      * @see JComponent#setUI
      */
     public ScrollBarUI getUI() {
@@ -258,6 +267,7 @@
      * Set the scrollbar's orientation to either VERTICAL or
      * HORIZONTAL.
      *
+     * @param orientation an orientation of the {@code JScrollBar}
      * @exception IllegalArgumentException if orientation is not one of VERTICAL, HORIZONTAL
      * @see #getOrientation
      * @beaninfo
@@ -293,6 +303,8 @@
      * Returns data model that handles the scrollbar's four
      * fundamental properties: minimum, maximum, value, extent.
      *
+     * @return the data model
+     *
      * @see #setModel
      */
     public BoundedRangeModel getModel() {
@@ -304,6 +316,7 @@
      * Sets the model that handles the scrollbar's four
      * fundamental properties: minimum, maximum, value, extent.
      *
+     * @param newModel a new model
      * @see #getModel
      * @beaninfo
      *       bound: true
@@ -583,6 +596,8 @@
      * scrollbar model will not generate ChangeEvents while
      * valueIsAdjusting is true.
      *
+     * @param b {@code true} if the upcoming changes to the value property are part of a series
+     *
      * @see #getValueIsAdjusting
      * @see BoundedRangeModel#setValueIsAdjusting
      * @beaninfo
@@ -610,6 +625,10 @@
      * minimum &le; value &le; value+extent &le; maximum
      * </pre>
      *
+     * @param newValue an int giving the current value
+     * @param newExtent an int giving the amount by which the value can "jump"
+     * @param newMin an int giving the minimum value
+     * @param newMax an int giving the maximum value
      *
      * @see BoundedRangeModel#setRangeProperties
      * @see #setValue
@@ -681,6 +700,10 @@
     /**
      * Notify listeners that the scrollbar's model has changed.
      *
+     * @param id an integer indicating the type of event.
+     * @param type an integer indicating the adjustment type.
+     * @param value the current value of the adjustment
+     *
      * @see #addAdjustmentListener
      * @see EventListenerList
      */
--- a/src/share/classes/javax/swing/JToggleButton.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/JToggleButton.java	Fri Jun 20 10:15:30 2014 -0700
@@ -140,6 +140,7 @@
      * Creates a toggle button where properties are taken from the
      * Action supplied.
      *
+     * @param a an instance of an {@code Action}
      * @since 1.3
      */
     public JToggleButton(Action a) {
@@ -390,6 +391,9 @@
     protected class AccessibleJToggleButton extends AccessibleAbstractButton
             implements ItemListener {
 
+        /**
+         * Constructs {@code AccessibleJToggleButton}
+         */
         public AccessibleJToggleButton() {
             super();
             JToggleButton.this.addItemListener(this);
--- a/src/share/classes/javax/swing/JToolBar.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/JToolBar.java	Fri Jun 20 10:15:30 2014 -0700
@@ -161,6 +161,8 @@
 
     /**
      * Returns the tool bar's current UI.
+     *
+     * @return the tool bar's current UI.
      * @see #setUI
      */
     public ToolBarUI getUI() {
@@ -555,7 +557,8 @@
      * or <code>null</code> if the default
      * property change listener for the control is desired.
      *
-     * @return <code>null</code>
+     * @param b a {@code JButton}
+     * @return {@code null}
      */
     protected PropertyChangeListener createActionChangeListener(JButton b) {
         return null;
--- a/src/share/classes/javax/swing/JTree.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/JTree.java	Fri Jun 20 10:15:30 2014 -0700
@@ -986,6 +986,7 @@
      * or equal to 0 the height for each row is determined by the
      * renderer.
      *
+     * @return the height of each row
      */
     public int getRowHeight()
     {
@@ -1115,6 +1116,7 @@
      * <p>
      * This is a bound property.
      *
+     * @param clickCount the number of mouse clicks to get a node expanded or closed
      * @since 1.3
      * @beaninfo
      *        bound: true
@@ -1508,6 +1510,7 @@
      * is provided as an entry point for subclassers to add filtered
      * editing without having to resort to creating a new editor.
      *
+     * @param path a {@code TreePath} identifying a node
      * @return true if every parent node and the node itself is editable
      * @see #isEditable
      */
@@ -1984,6 +1987,8 @@
     /**
      * Returns true if the node identified by the path has ever been
      * expanded.
+     *
+     * @param path a {@code TreePath} identifying a node
      * @return true if the <code>path</code> has ever been expanded
      */
     public boolean hasBeenExpanded(TreePath path) {
@@ -2079,6 +2084,7 @@
      * which means it is either the root or all of its parents are expanded.
      * Otherwise, this method returns false.
      *
+     * @param path {@code TreePath} identifying a node
      * @return true if the node is viewable, otherwise false
      */
     public boolean isVisible(TreePath path) {
@@ -2472,6 +2478,7 @@
      * set the selection model to <code>null</code>, which forces an empty
      * selection model to be used.
      *
+     * @return the model for selections
      * @see #setSelectionModel
      */
     public TreeSelectionModel getSelectionModel() {
@@ -2817,6 +2824,7 @@
      *
      * @param path the <code>TreePath</code> indicating the node that was
      *          expanded
+     * @throws ExpandVetoException if the expansion is prevented from occurring
      * @see EventListenerList
      */
      public void fireTreeWillExpand(TreePath path) throws ExpandVetoException {
@@ -2843,6 +2851,7 @@
      *
      * @param path the <code>TreePath</code> indicating the node that was
      *          expanded
+     * @throws ExpandVetoException if the collapse is prevented from occurring
      * @see EventListenerList
      */
      public void fireTreeWillCollapse(TreePath path) throws ExpandVetoException {
@@ -3541,6 +3550,11 @@
      * <code>path</code> are marked EXPANDED, but <code>path</code> itself
      * is marked collapsed.<p>
      * This will fail if a <code>TreeWillExpandListener</code> vetos it.
+     *
+     * @param path a {@code TreePath} identifying a node
+     * @param state if {@code true}, all parents of @{code path} and path are marked as expanded.
+     *              Otherwise, all parents of {@code path} are marked EXPANDED,
+     *              but {@code path} itself is marked collapsed.
      */
     protected void setExpandedState(TreePath path, boolean state) {
         if(path != null) {
@@ -3636,9 +3650,12 @@
     }
 
     /**
-     * Returns an <code>Enumeration</code> of <code>TreePaths</code>
+     * Returns an {@code Enumeration} of {@code TreePaths}
      * that have been expanded that
-     * are descendants of <code>parent</code>.
+     * are descendants of {@code parent}.
+     *
+     * @param parent a path
+     * @return the {@code Enumeration} of {@code TreePaths}
      */
     protected Enumeration<TreePath>
         getDescendantToggledPaths(TreePath parent)
@@ -3701,6 +3718,8 @@
       * <p>
       * For more information on what expanded state means, see the
       * <a href=#jtree_description>JTree description</a> above.
+      *
+      * @return the instance of {@code TreeModelHandler}
       */
      protected TreeModelListener createTreeModelListener() {
          return new TreeModelHandler();
@@ -3711,6 +3730,9 @@
      * <code>path</code>. If <code>includePath</code> is true and
      * <code>path</code> is selected, it will be removed from the selection.
      *
+     * @param path a path
+     * @param includePath is {@code true} and {@code path} is selected,
+     *                    it will be removed from the selection.
      * @return true if a descendant was selected
      * @since 1.3
      */
@@ -3891,6 +3913,9 @@
          * elements are added is children, otherwise if <code>children</code>
          * is a hashtable all the key/value pairs are added in the order
          * <code>Enumeration</code> returns them.
+         *
+         * @param parent the parent node
+         * @param children the children
          */
         public static void createChildren(DefaultMutableTreeNode parent,
                                           Object children) {
@@ -4113,6 +4138,9 @@
         TreePath   leadSelectionPath;
         Accessible leadSelectionAccessible;
 
+        /**
+         * Constructs {@code AccessibleJTree}
+         */
         public AccessibleJTree() {
             // Add a tree model listener for JTree
             TreeModel model = JTree.this.getModel();
@@ -4551,7 +4579,11 @@
             private boolean isLeaf = false;
 
             /**
-             *  Constructs an AccessibleJTreeNode
+             * Constructs an AccessibleJTreeNode
+             *
+             * @param t an instance of {@code JTree}
+             * @param p an instance of {@code TreePath}
+             * @param ap an instance of {@code Accessible}
              * @since 1.4
              */
             public AccessibleJTreeNode(JTree t, TreePath p, Accessible ap) {
@@ -5183,6 +5215,11 @@
                 }
             }
 
+            /**
+             * Returns the relative location of the node
+             *
+             * @return the relative location of the node
+             */
             protected Point getLocationInJTree() {
                 Rectangle r = tree.getPathBounds(path);
                 if (r != null) {
--- a/src/share/classes/javax/swing/ListSelectionModel.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/ListSelectionModel.java	Fri Jun 20 10:15:30 2014 -0700
@@ -134,18 +134,25 @@
 
     /**
      * Returns the first selected index or -1 if the selection is empty.
+     *
+     * @return the first selected index or -1 if the selection is empty.
      */
     int getMinSelectionIndex();
 
 
     /**
      * Returns the last selected index or -1 if the selection is empty.
+     *
+     * @return the last selected index or -1 if the selection is empty.
      */
     int getMaxSelectionIndex();
 
 
     /**
      * Returns true if the specified index is selected.
+     *
+     * @param index an index
+     * @return {@code true} if the specified index is selected
      */
     boolean isSelectedIndex(int index);
 
@@ -158,6 +165,7 @@
      * indices specially, e.g. Windows95 displays the lead index with a
      * dotted yellow outline.
      *
+     * @return the anchor selection index
      * @see #getLeadSelectionIndex
      * @see #setSelectionInterval
      * @see #addSelectionInterval
@@ -168,6 +176,7 @@
     /**
      * Set the anchor selection index.
      *
+     * @param index the anchor selection index
      * @see #getAnchorSelectionIndex
      */
     void setAnchorSelectionIndex(int index);
@@ -177,6 +186,7 @@
      * Return the second index argument from the most recent call to
      * setSelectionInterval(), addSelectionInterval() or removeSelectionInterval().
      *
+     * @return the lead selection index.
      * @see #getAnchorSelectionIndex
      * @see #setSelectionInterval
      * @see #addSelectionInterval
@@ -186,6 +196,7 @@
     /**
      * Set the lead selection index.
      *
+     * @param index the lead selection index
      * @see #getLeadSelectionIndex
      */
     void setLeadSelectionIndex(int index);
@@ -200,20 +211,30 @@
 
     /**
      * Returns true if no indices are selected.
+     *
+     * @return {@code true} if no indices are selected.
      */
     boolean isSelectionEmpty();
 
     /**
-     * Insert length indices beginning before/after index.  This is typically
+     * Insert {@code length} indices beginning before/after {@code index}. This is typically
      * called to sync the selection model with a corresponding change
      * in the data model.
+     *
+     * @param index the beginning of the interval
+     * @param length the length of the interval
+     * @param before if {@code true}, interval inserts before the {@code index},
+     *               otherwise, interval inserts after the {@code index}
      */
     void insertIndexInterval(int index, int length, boolean before);
 
     /**
-     * Remove the indices in the interval index0,index1 (inclusive) from
+     * Remove the indices in the interval {@code index0,index1} (inclusive) from
      * the selection model.  This is typically called to sync the selection
      * model width a corresponding change in the data model.
+     *
+     * @param index0 the beginning of the interval
+     * @param index1 the end of the interval
      */
     void removeIndexInterval(int index0, int index1);
 
@@ -272,6 +293,7 @@
      *   In this mode, there's no restriction on what can be selected.
      * </ul>
      *
+     * @param selectionMode the selection mode
      * @see #getSelectionMode
      * @throws IllegalArgumentException if the selection mode isn't
      *         one of those allowed
--- a/src/share/classes/javax/swing/MultiUIDefaults.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/MultiUIDefaults.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/RepaintManager.java	Fri Jun 20 10:15:30 2014 -0700
@@ -331,6 +331,7 @@
      * for the event dispatching thread that will validate the components
      * first isValidateRoot() ancestor.
      *
+     * @param invalidComponent a component
      * @see JComponent#isValidateRoot
      * @see #removeInvalidComponent
      */
@@ -374,6 +375,7 @@
     /**
      * Remove a component from the list of invalid components.
      *
+     * @param component a component
      * @see #addInvalidComponent
      */
     public synchronized void removeInvalidComponent(JComponent component) {
@@ -610,9 +612,13 @@
         return false;
     }
 
-    /** Return the current dirty region for a component.
-     *  Return an empty rectangle if the component is not
-     *  dirty.
+    /**
+     * Return the current dirty region for a component.
+     * Return an empty rectangle if the component is not
+     * dirty.
+     *
+     * @param aComponent a component
+     * @return the region
      */
     public Rectangle getDirtyRegion(JComponent aComponent) {
         RepaintManager delegate = getDelegate(aComponent);
@@ -632,6 +638,8 @@
     /**
      * Mark a component completely dirty. <b>aComponent</b> will be
      * completely painted during the next paintDirtyRegions() call.
+     *
+     * @param aComponent a component
      */
     public void markCompletelyDirty(JComponent aComponent) {
         RepaintManager delegate = getDelegate(aComponent);
@@ -645,6 +653,8 @@
     /**
      * Mark a component completely clean. <b>aComponent</b> will not
      * get painted during the next paintDirtyRegions() call.
+     *
+     * @param aComponent a component
      */
     public void markCompletelyClean(JComponent aComponent) {
         RepaintManager delegate = getDelegate(aComponent);
@@ -662,6 +672,10 @@
      * painted during the next paintDirtyRegions(). If computing dirty regions is
      * expensive for your component, use this method and avoid computing dirty region
      * if it return true.
+     *
+     * @param aComponent a component
+     * @return {@code true} if <b>aComponent</b> will be completely
+     *         painted during the next paintDirtyRegions().
      */
     public boolean isCompletelyDirty(JComponent aComponent) {
         RepaintManager delegate = getDelegate(aComponent);
@@ -975,20 +989,26 @@
      * @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();
     }
 
 
-   /**
+    /**
      * Return the offscreen buffer that should be used as a double buffer with
      * the component <code>c</code>.
      * By default there is a double buffer per RepaintManager.
      * The buffer might be smaller than <code>(proposedWidth,proposedHeight)</code>
      * This happens when the maximum double buffer size as been set for the receiving
      * repaint manager.
+     *
+     * @param c the component
+     * @param proposedWidth the width of the buffer
+     * @param proposedHeight the height of the buffer
+     *
+     * @return the image
      */
     public Image getOffscreenBuffer(Component c,int proposedWidth,int proposedHeight) {
         RepaintManager delegate = getDelegate(c);
@@ -998,18 +1018,23 @@
         return _getOffscreenBuffer(c, proposedWidth, proposedHeight);
     }
 
-  /**
-   * Return a volatile offscreen buffer that should be used as a
-   * double buffer with the specified component <code>c</code>.
-   * The image returned will be an instance of VolatileImage, or null
-   * if a VolatileImage object could not be instantiated.
-   * This buffer might be smaller than <code>(proposedWidth,proposedHeight)</code>.
-   * This happens when the maximum double buffer size has been set for this
-   * repaint manager.
-   *
-   * @see java.awt.image.VolatileImage
-   * @since 1.4
-   */
+    /**
+     * Return a volatile offscreen buffer that should be used as a
+     * double buffer with the specified component <code>c</code>.
+     * The image returned will be an instance of VolatileImage, or null
+     * if a VolatileImage object could not be instantiated.
+     * This buffer might be smaller than <code>(proposedWidth,proposedHeight)</code>.
+     * This happens when the maximum double buffer size has been set for this
+     * repaint manager.
+     *
+     * @param c the component
+     * @param proposedWidth the width of the buffer
+     * @param proposedHeight the height of the buffer
+     *
+     * @return the volatile image
+     * @see java.awt.image.VolatileImage
+     * @since 1.4
+     */
     public Image getVolatileOffscreenBuffer(Component c,
                                             int proposedWidth,int proposedHeight) {
         RepaintManager delegate = getDelegate(c);
@@ -1104,7 +1129,11 @@
     }
 
 
-    /** Set the maximum double buffer size. **/
+    /**
+     * Set the maximum double buffer size.
+     *
+     * @param d the dimension
+     */
     public void setDoubleBufferMaximumSize(Dimension d) {
         doubleBufferMaxSize = d;
         if (doubleBufferMaxSize == null) {
--- a/src/share/classes/javax/swing/RootPaneContainer.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/RootPaneContainer.java	Fri Jun 20 10:15:30 2014 -0700
@@ -132,6 +132,7 @@
      * Generally implemented with<pre>
      *    getRootPane().setLayeredPane(layeredPane);</pre>
      *
+     * @param layeredPane the layered pane
      * @exception java.awt.IllegalComponentStateException (a runtime
      *            exception) if the layered pane parameter is null
      * @see #getLayeredPane
@@ -162,6 +163,7 @@
      * Generally implemented with
      * <code>getRootPane().setGlassPane(glassPane);</code>
      *
+     * @param glassPane the glass pane
      * @see #getGlassPane
      * @see JRootPane#setGlassPane
      */
--- a/src/share/classes/javax/swing/ScrollPaneLayout.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/ScrollPaneLayout.java	Fri Jun 20 10:15:30 2014 -0700
@@ -168,6 +168,8 @@
      * };
      * scrollpane.setLayout(mySPLayout):
      * </pre>
+     *
+     * @param sp an instance of the {@code JScrollPane}
      */
     public void syncWithScrollPane(JScrollPane sp) {
         viewport = sp.getViewport();
@@ -1106,6 +1108,7 @@
      * Returns the bounds of the border around the specified scroll pane's
      * viewport.
      *
+     * @param scrollpane an instance of the {@code JScrollPane}
      * @return the size and position of the viewport border
      * @deprecated As of JDK version Swing1.1
      *    replaced by <code>JScrollPane.getViewportBorderBounds()</code>.
--- a/src/share/classes/javax/swing/SwingUtilities.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/SwingUtilities.java	Fri Jun 20 10:15:30 2014 -0700
@@ -103,15 +103,23 @@
     }
 
     /**
-     * Return true if <code>a</code> contains <code>b</code>
+     * Return {@code true} if @{code a} contains {@code b}
+     *
+     * @param a the first rectangle
+     * @param b the second rectangle
+     *
+     * @return {@code true} if @{code a} contains {@code b}
      */
-    public static final boolean isRectangleContainingRectangle(Rectangle a,Rectangle b) {
+    public static boolean isRectangleContainingRectangle(Rectangle a,Rectangle b) {
         return b.x >= a.x && (b.x + b.width) <= (a.x + a.width) &&
                 b.y >= a.y && (b.y + b.height) <= (a.y + a.height);
     }
 
     /**
-     * Return the rectangle (0,0,bounds.width,bounds.height) for the component <code>aComponent</code>
+     * Return the rectangle (0,0,bounds.width,bounds.height) for the component {@code aComponent}
+     *
+     * @param aComponent a component
+     * @return the local bounds for the component {@code aComponent}
      */
     public static Rectangle getLocalBounds(Component aComponent) {
         Rectangle b = new Rectangle(aComponent.getBounds());
@@ -165,6 +173,12 @@
      * root component coordinate system.
      * If both <code>source</code> and <code>destination</code> are {@code null}, return <code>aPoint</code>
      * without any conversion.
+     *
+     * @param source the source component
+     * @param aPoint the point
+     * @param destination the destination component
+     *
+     * @return the converted coordinate
      */
     public static Point convertPoint(Component source,Point aPoint,Component destination) {
         Point p;
@@ -196,6 +210,13 @@
      * root component coordinate system.
      * If both <code>source</code> and <code>destination</code> are {@code null}, return <code>(x,y)</code>
      * without any conversion.
+     *
+     * @param source the source component
+     * @param x the x-coordinate of the point
+     * @param y the y-coordinate of the point
+     * @param destination the destination component
+     *
+     * @return the converted coordinate
      */
     public static Point convertPoint(Component source,int x, int y,Component destination) {
         Point point = new Point(x,y);
@@ -211,6 +232,12 @@
      * root component coordinate system.
      * If both <code>source</code> and <code>destination</code> are {@code null}, return <code>aRectangle</code>
      * without any conversion.
+     *
+     * @param source the source component
+     * @param aRectangle a rectangle
+     * @param destination the destination component
+     *
+     * @return the converted rectangle
      */
     public static Rectangle convertRectangle(Component source,Rectangle aRectangle,Component destination) {
         Point point = new Point(aRectangle.x,aRectangle.y);
@@ -222,6 +249,12 @@
      * Convenience method for searching above <code>comp</code> in the
      * component hierarchy and returns the first object of class <code>c</code> it
      * finds. Can return {@code null}, if a class <code>c</code> cannot be found.
+     *
+     * @param c the class of a component
+     * @param comp the component
+     *
+     * @return the ancestor of the {@code comp},
+     *         or {@code null} if {@code c} cannot be found.
      */
     public static Container getAncestorOfClass(Class<?> c, Component comp)
     {
@@ -238,6 +271,12 @@
      * Convenience method for searching above <code>comp</code> in the
      * component hierarchy and returns the first object of <code>name</code> it
      * finds. Can return {@code null}, if <code>name</code> cannot be found.
+     *
+     * @param name the name of a component
+     * @param comp the component
+     *
+     * @return the ancestor of the {@code comp},
+     *         or {@code null} if {@code name} cannot be found.
      */
     public static Container getAncestorNamed(String name, Component comp) {
         if(comp == null || name == null)
@@ -260,6 +299,8 @@
      * @param parent the root component to begin the search
      * @param x the x target location
      * @param y the y target location
+     *
+     * @return the deepest component
      */
     public static Component getDeepestComponentAt(Component parent, int x, int y) {
         if (!parent.contains(x, y)) {
@@ -297,6 +338,12 @@
      * to <code>destination</code> if destination is non-{@code null}
      * use the translateMouseEvent() method to translate a mouse event from
      * one component to another without changing the source.
+     *
+     * @param source the source component
+     * @param sourceEvent the source mouse event
+     * @param destination the destination component
+     *
+     * @return the new mouse event
      */
     public static MouseEvent convertMouseEvent(Component source,
                                                MouseEvent sourceEvent,
@@ -456,7 +503,11 @@
     }
 
     /**
-     * Return <code>true</code> if a component <code>a</code> descends from a component <code>b</code>
+     * Return {@code true} if a component {@code a} descends from a component {@code b}
+     *
+     * @param a the first component
+     * @param b the second component
+     * @return {@code true} if a component {@code a} descends from a component {@code b}
      */
     public static boolean isDescendingFrom(Component a,Component b) {
         if(a == b)
@@ -531,6 +582,12 @@
      * Convenience returning an array of rect representing the regions within
      * <code>rectA</code> that do not overlap with <code>rectB</code>. If the
      * two Rects do not overlap, returns an empty array
+     *
+     * @param rectA the first rectangle
+     * @param rectB the second rectangle
+     *
+     * @return an array of rectangles representing the regions within {@code rectA}
+     *         that do not overlap with {@code rectB}.
      */
     public static Rectangle[] computeDifference(Rectangle rectA,Rectangle rectB) {
         if (rectB == null || !rectA.intersects(rectB) || isRectangleContainingRectangle(rectB,rectA)) {
@@ -841,6 +898,21 @@
      * relative to the viewR rectangle.
      * The JComponents orientation (LEADING/TRAILING) will also be taken
      * into account and translated into LEFT/RIGHT values accordingly.
+     *
+     * @param c the component
+     * @param fm the instance of {@code FontMetrics}
+     * @param text the text
+     * @param icon the icon
+     * @param verticalAlignment the vertical alignment
+     * @param horizontalAlignment the horizontal alignment
+     * @param verticalTextPosition the vertical text position
+     * @param horizontalTextPosition the horizontal text position
+     * @param viewR the available rectangle
+     * @param iconR the rectangle for the icon
+     * @param textR the rectangle for the text
+     * @param textIconGap the gap between text and icon
+     *
+     * @return the possibly clipped version of the compound labels string
      */
     public static String layoutCompoundLabel(JComponent c,
                                              FontMetrics fm,
@@ -910,6 +982,20 @@
      * values in horizontalTextPosition (they will default to RIGHT) and in
      * horizontalAlignment (they will default to CENTER).
      * Use the other version of layoutCompoundLabel() instead.
+     *
+     * @param fm the instance of {@code FontMetrics}
+     * @param text the text
+     * @param icon the icon
+     * @param verticalAlignment the vertical alignment
+     * @param horizontalAlignment the horizontal alignment
+     * @param verticalTextPosition the vertical text position
+     * @param horizontalTextPosition the horizontal text position
+     * @param viewR the available rectangle
+     * @param iconR the rectangle for the icon
+     * @param textR the rectangle for the text
+     * @param textIconGap the gap between text and icon
+     *
+     * @return the possibly clipped version of the compound labels string
      */
     public static String layoutCompoundLabel(
         FontMetrics fm,
@@ -1219,6 +1305,8 @@
      * A simple minded look and feel change: ask each node in the tree
      * to <code>updateUI()</code> -- that is, to initialize its UI property
      * with the current look and feel.
+     *
+     * @param c the component
      */
     public static void updateComponentTreeUI(Component c) {
         updateComponentTreeUI0(c);
@@ -1284,6 +1372,7 @@
      * <p>
      * Unlike the rest of Swing, this method can be invoked from any thread.
      *
+     * @param doRun the instance of {@code Runnable}
      * @see #invokeAndWait
      */
     public static void invokeLater(Runnable doRun) {
@@ -1334,6 +1423,7 @@
      * As of 1.3 this method is just a cover for
      * <code>java.awt.EventQueue.invokeAndWait()</code>.
      *
+     * @param doRun the instance of {@code Runnable}
      * @exception  InterruptedException if we're interrupted while waiting for
      *             the event dispatching thread to finish executing
      *             <code>doRun.run()</code>
@@ -1374,6 +1464,7 @@
      * Component.AccessibleAWTComponent.getAccessibleIndexInParent() instead
      * of using this method.
      *
+     * @param c the component
      * @return -1 of this object does not have an accessible parent.
      * Otherwise, the index of the child in its accessible parent.
      */
@@ -1386,6 +1477,8 @@
      * local coordinate <code>Point</code>, if one exists.
      * Otherwise returns <code>null</code>.
      *
+     * @param c the component
+     * @param p the local coordinate
      * @return the <code>Accessible</code> at the specified location,
      *    if it exists; otherwise <code>null</code>
      */
@@ -1431,6 +1524,7 @@
      * Component.AccessibleAWTComponent.getAccessibleIndexInParent() instead
      * of using this method.
      *
+     * @param c the component
      * @return an instance of AccessibleStateSet containing the current state
      * set of the object
      * @see AccessibleState
@@ -1448,6 +1542,7 @@
      * Component.AccessibleAWTComponent.getAccessibleIndexInParent() instead
      * of using this method.
      *
+     * @param c the component
      * @return the number of accessible children in the object.
      */
     public static int getAccessibleChildrenCount(Component c) {
@@ -1461,6 +1556,7 @@
      * Component.AccessibleAWTComponent.getAccessibleIndexInParent() instead
      * of using this method.
      *
+     * @param c the component
      * @param i zero-based index of child
      * @return the nth Accessible child of the object
      */
@@ -1502,6 +1598,8 @@
     /**
      * If c is a JRootPane descendant return its JRootPane ancestor.
      * If c is a RootPaneContainer then return its JRootPane.
+     *
+     * @param c the component
      * @return the JRootPane for Component c or {@code null}.
      */
     public static JRootPane getRootPane(Component c) {
@@ -1519,6 +1617,8 @@
 
     /**
      * Returns the root component for the current component tree.
+     *
+     * @param c the component
      * @return the first ancestor of c that's a Window or the last Applet ancestor
      */
     public static Component getRoot(Component c) {
@@ -1616,6 +1716,14 @@
      * This will return true if <code>action</code> is non-{@code null} and
      * actionPerformed is invoked on it.
      *
+     * @param action an action
+     * @param ks a key stroke
+     * @param event a key event
+     * @param sender a sender
+     * @param modifiers action modifiers
+     * @return {@code true} if {@code action} is non-{@code null} and
+     *         actionPerformed is invoked on it.
+     *
      * @since 1.3
      */
     public static boolean notifyAction(Action action, KeyStroke ks,
@@ -1672,6 +1780,9 @@
      * to <code>uiInputMap</code>. If <code>uiInputMap</code> is {@code null},
      * this removes any previously installed UI InputMap.
      *
+     * @param component a component
+     * @param type a type
+     * @param uiInputMap an {@code InputMap}
      * @since 1.3
      */
     public static void replaceUIInputMap(JComponent component, int type,
@@ -1694,6 +1805,8 @@
      * to <code>uiActionMap</code>. If <code>uiActionMap</code> is {@code null},
      * this removes any previously installed UI ActionMap.
      *
+     * @param component a component
+     * @param uiActionMap an {@code ActionMap}
      * @since 1.3
      */
     public static void replaceUIActionMap(JComponent component,
@@ -1714,9 +1827,14 @@
     /**
      * Returns the InputMap provided by the UI for condition
      * <code>condition</code> in component <code>component</code>.
-     * <p>This will return {@code null} if the UI has not installed a InputMap
+     * <p>This will return {@code null} if the UI has not installed an InputMap
      * of the specified type.
      *
+     * @param component a component
+     * @param condition a condition
+     * @return the {@code ActionMap} provided by the UI for {@code condition}
+     *         in the component, or {@code null} if the UI has not installed
+     *         an InputMap of the specified type.
      * @since 1.3
      */
     public static InputMap getUIInputMap(JComponent component, int condition) {
@@ -1736,6 +1854,9 @@
      * in component <code>component</code>.
      * <p>This will return {@code null} if the UI has not installed an ActionMap.
      *
+     * @param component a component
+     * @return the {@code ActionMap} provided by the UI in the component,
+     *         or {@code null} if the UI has not installed an ActionMap.
      * @since 1.3
      */
     public static ActionMap getUIActionMap(JComponent component) {
--- a/src/share/classes/javax/swing/event/TreeModelEvent.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/event/TreeModelEvent.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/plaf/basic/BasicListUI.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/plaf/basic/BasicTableUI.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/plaf/nimbus/State.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/plaf/synth/ParsedSynthStyle.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/javax/swing/tree/TreePath.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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/ApacheNodeSetData.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/org/jcp/xml/dsig/internal/dom/ApacheNodeSetData.java	Fri Jun 20 10:15:30 2014 -0700
@@ -21,7 +21,7 @@
  * under the License.
  */
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * $Id: ApacheNodeSetData.java 1203890 2011-11-18 22:47:56Z mullan $
@@ -47,7 +47,7 @@
         this.xi = xi;
     }
 
-    public Iterator iterator() {
+    public Iterator<Node> iterator() {
         // If nodefilters are set, must execute them first to create node-set
         if (xi.getNodeFilters() != null && !xi.getNodeFilters().isEmpty()) {
             return Collections.unmodifiableSet
--- a/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMExcC14NMethod.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMExcC14NMethod.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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/org/jcp/xml/dsig/internal/dom/DOMKeyInfo.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfo.java	Fri Jun 20 10:15:30 2014 -0700
@@ -21,7 +21,7 @@
  * under the License.
  */
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * $Id: DOMKeyInfo.java 1333869 2012-05-04 10:42:44Z coheigea $
@@ -138,7 +138,7 @@
         return id;
     }
 
-    public List getContent() {
+    public List<XMLStructure> getContent() {
         return keyInfoTypes;
     }
 
--- a/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyInfoFactory.java	Fri Jun 20 10:15:30 2014 -0700
@@ -21,7 +21,7 @@
  * under the License.
  */
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * $Id: DOMKeyInfoFactory.java 1333869 2012-05-04 10:42:44Z coheigea $
@@ -48,11 +48,12 @@
 
     public DOMKeyInfoFactory() { }
 
+    @SuppressWarnings("rawtypes")
     public KeyInfo newKeyInfo(List content) {
         return newKeyInfo(content, null);
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     public KeyInfo newKeyInfo(List content, String id) {
         return new DOMKeyInfo(content, id);
     }
@@ -78,12 +79,12 @@
         return newPGPData(keyId, null, null);
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     public PGPData newPGPData(byte[] keyId, byte[] keyPacket, List other) {
         return new DOMPGPData(keyId, keyPacket, other);
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     public PGPData newPGPData(byte[] keyPacket, List other) {
         return new DOMPGPData(keyPacket, other);
     }
@@ -92,7 +93,7 @@
         return newRetrievalMethod(uri, null, null);
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     public RetrievalMethod newRetrievalMethod(String uri, String type,
         List transforms) {
         if (uri == null) {
@@ -101,7 +102,7 @@
         return new DOMRetrievalMethod(uri, type, transforms);
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings("rawtypes")
     public X509Data newX509Data(List content) {
         return new DOMX509Data(content);
     }
--- a/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyValue.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMKeyValue.java	Fri Jun 20 10:15:30 2014 -0700
@@ -21,7 +21,7 @@
  * under the License.
  */
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * $Id: DOMKeyValue.java 1333415 2012-05-03 12:03:51Z coheigea $
@@ -364,15 +364,16 @@
         }
 
         void getMethods() throws ClassNotFoundException, NoSuchMethodException {
-            Class c  = Class.forName("sun.security.ec.ECParameters");
-            Class[] params = new Class[] { ECPoint.class, EllipticCurve.class };
+            Class<?> c  = Class.forName("sun.security.ec.ECParameters");
+            Class<?>[] params = new Class<?>[] { ECPoint.class,
+                                                 EllipticCurve.class };
             encodePoint = c.getMethod("encodePoint", params);
-            params = new Class[] { ECParameterSpec.class };
+            params = new Class<?>[] { ECParameterSpec.class };
             getCurveName = c.getMethod("getCurveName", params);
-            params = new Class[] { byte[].class, EllipticCurve.class };
+            params = new Class<?>[] { byte[].class, EllipticCurve.class };
             decodePoint = c.getMethod("decodePoint", params);
             c  = Class.forName("sun.security.ec.NamedCurve");
-            params = new Class[] { String.class };
+            params = new Class<?>[] { String.class };
             getECParameterSpec = c.getMethod("getECParameterSpec", params);
         }
 
--- a/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMManifest.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMManifest.java	Fri Jun 20 10:15:30 2014 -0700
@@ -21,7 +21,7 @@
  * under the License.
  */
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * $Id: DOMManifest.java 1333415 2012-05-03 12:03:51Z coheigea $
@@ -127,7 +127,12 @@
         return id;
     }
 
-    public List getReferences() {
+    @SuppressWarnings("unchecked")
+    static List<Reference> getManifestReferences(Manifest mf) {
+        return mf.getReferences();
+    }
+
+    public List<Reference> getReferences() {
         return references;
     }
 
--- a/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMPGPData.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMPGPData.java	Fri Jun 20 10:15:30 2014 -0700
@@ -21,7 +21,7 @@
  * under the License.
  */
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * $Id: DOMPGPData.java 1203846 2011-11-18 21:18:17Z mullan $
@@ -184,7 +184,7 @@
         return (keyPacket == null ? null : keyPacket.clone());
     }
 
-    public List getExternalElements() {
+    public List<XMLStructure> getExternalElements() {
         return externalElements;
     }
 
--- a/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMReference.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMReference.java	Fri Jun 20 10:15:30 2014 -0700
@@ -21,7 +21,7 @@
  * under the License.
  */
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * ===========================================================================
@@ -293,7 +293,7 @@
         return type;
     }
 
-    public List getTransforms() {
+    public List<Transform> getTransforms() {
         return Collections.unmodifiableList(allTransforms);
     }
 
@@ -643,7 +643,7 @@
                 try {
                     final Set<Node> s = xsi.getNodeSet();
                     return new NodeSetData() {
-                        public Iterator iterator() { return s.iterator(); }
+                        public Iterator<Node> iterator() { return s.iterator(); }
                     };
                 } catch (Exception e) {
                     // log a warning
--- a/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMRetrievalMethod.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMRetrievalMethod.java	Fri Jun 20 10:15:30 2014 -0700
@@ -21,7 +21,7 @@
  * under the License.
  */
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * ===========================================================================
@@ -177,7 +177,7 @@
         return type;
     }
 
-    public List getTransforms() {
+    public List<Transform> getTransforms() {
         return transforms;
     }
 
@@ -245,7 +245,7 @@
         // guard against RetrievalMethod loops
         if ((data instanceof NodeSetData) && Utils.secureValidation(context)) {
             NodeSetData nsd = (NodeSetData)data;
-            Iterator i = nsd.iterator();
+            Iterator<?> i = nsd.iterator();
             if (i.hasNext()) {
                 Node root = (Node)i.next();
                 if ("RetrievalMethod".equals(root.getLocalName())) {
--- a/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperties.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperties.java	Fri Jun 20 10:15:30 2014 -0700
@@ -21,7 +21,7 @@
  * under the License.
  */
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * $Id: DOMSignatureProperties.java 1333415 2012-05-03 12:03:51Z coheigea $
@@ -125,7 +125,7 @@
         }
     }
 
-    public List getProperties() {
+    public List<SignatureProperty> getProperties() {
         return properties;
     }
 
--- a/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperty.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignatureProperty.java	Fri Jun 20 10:15:30 2014 -0700
@@ -21,7 +21,7 @@
  * under the License.
  */
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * $Id: DOMSignatureProperty.java 1333415 2012-05-03 12:03:51Z coheigea $
@@ -123,7 +123,7 @@
         }
     }
 
-    public List getContent() {
+    public List<XMLStructure> getContent() {
         return content;
     }
 
--- a/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignedInfo.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSignedInfo.java	Fri Jun 20 10:15:30 2014 -0700
@@ -21,7 +21,7 @@
  * under the License.
  */
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * $Id: DOMSignedInfo.java 1333415 2012-05-03 12:03:51Z coheigea $
@@ -206,7 +206,7 @@
         return id;
     }
 
-    public List getReferences() {
+    public List<Reference> getReferences() {
         return references;
     }
 
--- a/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSubTreeData.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMSubTreeData.java	Fri Jun 20 10:15:30 2014 -0700
@@ -21,7 +21,7 @@
  * under the License.
  */
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * $Id$
@@ -54,7 +54,7 @@
         this.excludeComments = excludeComments;
     }
 
-    public Iterator iterator() {
+    public Iterator<Node> iterator() {
         return new DelayedNodeIterator(root, excludeComments);
     }
 
--- a/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMURIDereferencer.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMURIDereferencer.java	Fri Jun 20 10:15:30 2014 -0700
@@ -21,7 +21,7 @@
  * under the License.
  */
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * $Id: DOMURIDereferencer.java 1231033 2012-01-13 12:12:12Z coheigea $
@@ -111,7 +111,8 @@
         try {
             ResourceResolver apacheResolver =
                 ResourceResolver.getInstance(uriAttr, baseURI, secVal);
-            XMLSignatureInput in = apacheResolver.resolve(uriAttr, baseURI);
+            XMLSignatureInput in = apacheResolver.resolve(uriAttr,
+                                                          baseURI, secVal);
             if (in.isOctetStream()) {
                 return new ApacheOctetStreamData(in);
             } else {
--- a/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMX509Data.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMX509Data.java	Fri Jun 20 10:15:30 2014 -0700
@@ -21,7 +21,7 @@
  * under the License.
  */
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * $Id: DOMX509Data.java 1333415 2012-05-03 12:03:51Z coheigea $
@@ -135,7 +135,7 @@
         this.content = Collections.unmodifiableList(content);
     }
 
-    public List getContent() {
+    public List<Object> getContent() {
         return content;
     }
 
--- a/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLObject.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLObject.java	Fri Jun 20 10:15:30 2014 -0700
@@ -21,7 +21,7 @@
  * under the License.
  */
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * $Id: DOMXMLObject.java 1333415 2012-05-03 12:03:51Z coheigea $
@@ -139,7 +139,7 @@
         this.objectElem = objElem;
     }
 
-    public List getContent() {
+    public List<XMLStructure> getContent() {
         return content;
     }
 
--- a/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignature.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignature.java	Fri Jun 20 10:15:30 2014 -0700
@@ -21,7 +21,7 @@
  * under the License.
  */
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * ===========================================================================
@@ -188,7 +188,7 @@
         return si;
     }
 
-    public List getObjects() {
+    public List<XMLObject> getObjects() {
         return objects;
     }
 
@@ -471,7 +471,8 @@
                     digestReference((DOMReference)xs, signContext);
                 } else if (xs instanceof Manifest) {
                     Manifest man = (Manifest)xs;
-                    List manRefs = man.getReferences();
+                    List<Reference> manRefs =
+                        DOMManifest.getManifestReferences(man);
                     for (int i = 0, size = manRefs.size(); i < size; i++) {
                         digestReference((DOMReference)manRefs.get(i),
                                         signContext);
--- a/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java	Fri Jun 20 10:15:30 2014 -0700
@@ -58,7 +58,7 @@
         return new DOMXMLSignature(si, ki, null, null, null);
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     public XMLSignature newXMLSignature(SignedInfo si, KeyInfo ki,
         List objects, String id, String signatureValueId) {
         return new DOMXMLSignature(si, ki, objects, id, signatureValueId);
@@ -68,13 +68,13 @@
         return newReference(uri, dm, null, null, null);
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     public Reference newReference(String uri, DigestMethod dm, List transforms,
         String type, String id) {
         return new DOMReference(uri, type, dm, transforms, id, getProvider());
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     public Reference newReference(String uri, DigestMethod dm,
         List appliedTransforms, Data result, List transforms, String type,
         String id) {
@@ -91,7 +91,7 @@
             (uri, type, dm, appliedTransforms, result, transforms, id, getProvider());
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     public Reference newReference(String uri, DigestMethod dm, List transforms,
         String type, String id, byte[] digestValue) {
         if (digestValue == null) {
@@ -101,41 +101,41 @@
             (uri, type, dm, null, null, transforms, id, digestValue, getProvider());
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings("rawtypes")
     public SignedInfo newSignedInfo(CanonicalizationMethod cm,
         SignatureMethod sm, List references) {
         return newSignedInfo(cm, sm, references, null);
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     public SignedInfo newSignedInfo(CanonicalizationMethod cm,
         SignatureMethod sm, List references, String id) {
         return new DOMSignedInfo(cm, sm, references, id);
     }
 
     // Object factory methods
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     public XMLObject newXMLObject(List content, String id, String mimeType,
         String encoding) {
         return new DOMXMLObject(content, id, mimeType, encoding);
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings("rawtypes")
     public Manifest newManifest(List references) {
         return newManifest(references, null);
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     public Manifest newManifest(List references, String id) {
         return new DOMManifest(references, id);
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     public SignatureProperties newSignatureProperties(List props, String id) {
         return new DOMSignatureProperties(props, id);
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     public SignatureProperty newSignatureProperty
         (List info, String target, String id) {
         return new DOMSignatureProperty(info, target, id);
--- a/src/share/classes/sun/applet/AppletViewer.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/applet/AppletViewer.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/font/Decoration.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/font/ExtendedTextSourceLabel.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/font/StandardTextSource.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/font/Type1Font.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/java2d/opengl/OGLContext.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/java2d/pipe/Region.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/java2d/pipe/hw/ContextCapabilities.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/jvmstat/monitor/HostIdentifier.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/jvmstat/monitor/MonitoredHost.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/jvmstat/monitor/VmIdentifier.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/management/Agent.java	Fri Jun 20 10:15:30 2014 -0700
@@ -34,7 +34,6 @@
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.net.InetAddress;
-import java.net.Socket;
 import java.net.UnknownHostException;
 import java.text.MessageFormat;
 import java.util.MissingResourceException;
@@ -88,7 +87,7 @@
     // return empty property set
     private static Properties parseString(String args) {
         Properties argProps = new Properties();
-        if (args != null) {
+        if (args != null && !args.trim().equals("")) {
             for (String option : args.split(",")) {
                 String s[] = option.split("=", 2);
                 String name = s[0].trim();
@@ -160,53 +159,59 @@
             throw new RuntimeException(getText(INVALID_STATE, "Agent already started"));
         }
 
-        Properties argProps = parseString(args);
-        Properties configProps = new Properties();
+        try {
+            Properties argProps = parseString(args);
+            Properties configProps = new Properties();
 
-        // Load the management properties from the config file
-        // if config file is not specified readConfiguration implicitly
-        // reads <java.home>/lib/management/management.properties
+            // Load the management properties from the config file
+            // if config file is not specified readConfiguration implicitly
+            // reads <java.home>/lib/management/management.properties
 
-        String fname = System.getProperty(CONFIG_FILE);
-        readConfiguration(fname, configProps);
+            String fname = System.getProperty(CONFIG_FILE);
+            readConfiguration(fname, configProps);
 
-        // management properties can be overridden by system properties
-        // which take precedence
-        Properties sysProps = System.getProperties();
-        synchronized (sysProps) {
-            configProps.putAll(sysProps);
-        }
+            // management properties can be overridden by system properties
+            // which take precedence
+            Properties sysProps = System.getProperties();
+            synchronized (sysProps) {
+                configProps.putAll(sysProps);
+            }
 
-        // if user specifies config file into command line for either
-        // jcmd utilities or attach command it overrides properties set in
-        // command line at the time of VM start
-        String fnameUser = argProps.getProperty(CONFIG_FILE);
-        if (fnameUser != null) {
-            readConfiguration(fnameUser, configProps);
-        }
+            // if user specifies config file into command line for either
+            // jcmd utilities or attach command it overrides properties set in
+            // command line at the time of VM start
+            String fnameUser = argProps.getProperty(CONFIG_FILE);
+            if (fnameUser != null) {
+                readConfiguration(fnameUser, configProps);
+            }
 
-        // arguments specified in command line of jcmd utilities
-        // override both system properties and one set by config file
-        // specified in jcmd command line
-        configProps.putAll(argProps);
+            // arguments specified in command line of jcmd utilities
+            // override both system properties and one set by config file
+            // specified in jcmd command line
+            configProps.putAll(argProps);
 
-        // jcmd doesn't allow to change ThreadContentionMonitoring, but user
-        // can specify this property inside config file, so enable optional
-        // monitoring functionality if this property is set
-        final String enableThreadContentionMonitoring =
-                configProps.getProperty(ENABLE_THREAD_CONTENTION_MONITORING);
+            // jcmd doesn't allow to change ThreadContentionMonitoring, but user
+            // can specify this property inside config file, so enable optional
+            // monitoring functionality if this property is set
+            final String enableThreadContentionMonitoring =
+                    configProps.getProperty(ENABLE_THREAD_CONTENTION_MONITORING);
 
-        if (enableThreadContentionMonitoring != null) {
-            ManagementFactory.getThreadMXBean().
-                    setThreadContentionMonitoringEnabled(true);
-        }
+            if (enableThreadContentionMonitoring != null) {
+                ManagementFactory.getThreadMXBean().
+                        setThreadContentionMonitoringEnabled(true);
+            }
 
-        String jmxremotePort = configProps.getProperty(JMXREMOTE_PORT);
-        if (jmxremotePort != null) {
-            jmxServer = ConnectorBootstrap.
-                    startRemoteConnectorServer(jmxremotePort, configProps);
+            String jmxremotePort = configProps.getProperty(JMXREMOTE_PORT);
+            if (jmxremotePort != null) {
+                jmxServer = ConnectorBootstrap.
+                        startRemoteConnectorServer(jmxremotePort, configProps);
 
-            startDiscoveryService(configProps);
+                startDiscoveryService(configProps);
+            } else {
+                throw new AgentConfigurationError(INVALID_JMXREMOTE_PORT, "No port specified");
+            }
+        } catch (AgentConfigurationError err) {
+            error(err.getError(), err.getParams());
         }
     }
 
@@ -401,7 +406,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 +500,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]);
             }
@@ -507,7 +512,7 @@
         String keyText = getText(key);
         System.err.print(getText("agent.err.error") + ": " + keyText);
         System.err.println(": " + message);
-        throw new RuntimeException(keyText);
+        throw new RuntimeException(keyText + ": " + message);
     }
 
     public static void error(Exception e) {
--- a/src/share/classes/sun/management/manifest	Thu Jun 19 11:22:38 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-Premain-Class: sun.management.Agent
-Agent-Class: sun.management.Agent
-
--- a/src/share/classes/sun/management/resources/agent.properties	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/management/resources/agent.properties	Fri Jun 20 10:15:30 2014 -0700
@@ -43,7 +43,7 @@
 agent.err.premain.notfound         = premain(String) does not exist in agent class
 agent.err.agentclass.access.denied = Access to premain(String) is denied
 agent.err.invalid.agentclass       = Invalid com.sun.management.agent.class property value
-agent.err.invalid.state            = Invalid agent state
+agent.err.invalid.state            = Invalid agent state: {0}
 agent.err.invalid.jmxremote.port   = Invalid com.sun.management.jmxremote.port number
 agent.err.invalid.jmxremote.rmi.port = Invalid com.sun.management.jmxremote.rmi.port number
 
--- a/src/share/classes/sun/management/snmp/jvminstr/JvmThreadInstanceEntryImpl.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/management/snmp/jvminstr/JvmThreadInstanceEntryImpl.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/misc/MessageUtils.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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/Timeable.java	Thu Jun 19 11:22:38 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 1995, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.misc;
-
-/**
- * This interface is used by the Timer class.  A class that uses
- * Timer objects must implement this interface.
- *
- * @see Timer
- * @author Patrick Chan
- */
-public interface Timeable {
-    /**
-     * This method is executed every time a timer owned by this
-     * object ticks.  An object can own more than one timer but
-     * all timers call this method when they tick;
-     * you can use the supplied timer parameter to determine
-     * which timer has ticked.
-     * @param timer a handle to the timer that has just ticked.
-     */
-    public void tick(Timer timer);
-}
--- a/src/share/classes/sun/misc/Timer.java	Thu Jun 19 11:22:38 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,647 +0,0 @@
-/*
- * Copyright (c) 1995, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.misc;
-
-/**
-    A Timer object is used by algorithms that require timed events.
-    For example, in an animation loop, a timer would help in
-    determining when to change frames.
-
-    A timer has an interval which determines when it "ticks";
-    that is, a timer delays for the specified interval and then
-    it calls the owner's tick() method.
-
-    Here's an example of creating a timer with a 5 sec interval:
-
-    <pre>
-    class Main implements Timeable {
-        public void tick(Timer timer) {
-            System.out.println("tick");
-        }
-        public static void main(String args[]) {
-            (new Timer(this, 5000)).cont();
-        }
-    }
-    </pre>
-
-    A timer can be stopped, continued, or reset at any time.
-    A timer's state is not stopped while it's calling the
-    owner's tick() method.
-
-    A timer can be regular or irregular.  If in regular mode,
-    a timer ticks at the specified interval, regardless of
-    how long the owner's tick() method takes.  While the timer
-    is running, no ticks are ever discarded.  That means that if
-    the owner's tick() method takes longer than the interval,
-    the ticks that would have occurred are delivered immediately.
-
-    In irregular mode, a timer starts delaying for exactly
-    the specified interval only after the tick() method returns.
-
-    Synchronization issues: do not hold the timer's monitor
-    while calling any of the Timer operations below otherwise
-    the Timer class will deadlock.
-
-    @author     Patrick Chan
-*/
-
-/*
-    Synchronization issues:  there are two data structures that
-    require locking.  A Timer object and the Timer queue
-    (described in the TimerThread class).  To avoid deadlock,
-    the timer queue monitor is always acquired before the timer
-    object's monitor.  However, the timer queue monitor is acquired
-    only if the timer operation will make use of the timer
-    queue, e.g. stop().
-
-    The class monitor on the class TimerThread severs as the monitor
-    to the timer queue.
-
-    Possible feature: perhaps a timer should have an associated
-    thread priority.  The thread that makes the callback temporarily
-    takes on that priority before calling the owner's tick() method.
-*/
-
-public class Timer {
-    /**
-     * This is the owner of the timer.  Its tick method is
-     * called when the timer ticks.
-     */
-    public Timeable owner;
-
-    /*
-     * This is the interval of time in ms.
-     */
-    long interval;
-
-    /*
-     * This variable is used for two different purposes.
-     * This is done in order to save space.
-     * If 'stopped' is true, this variable holds the time
-     * that the timer was stopped; otherwise, this variable
-     * is used by the TimerThread to determine when the timer
-     * should tick.
-     */
-    long sleepUntil;
-
-    /*
-     * This is the time remaining before the timer ticks.  It
-     * is only valid if 'stopped' is true.  If the timer is
-     * continued, the next tick will happen remaingTime
-     * milliseconds later.
-     */
-    long remainingTime;
-
-    /*
-     * True iff the timer is in regular mode.
-     */
-    boolean regular;
-
-    /*
-     * True iff the timer has been stopped.
-     */
-    boolean stopped;
-
-    /* **************************************************************
-     * Timer queue-related variables
-     * ************************************************************** */
-
-    /*
-     * A link to another timer object.  This is used while the
-     * timer object is enqueued in the timer queue.
-     */
-    Timer next;
-
-    /* **************************************************************
-     * Timer methods
-     * ************************************************************** */
-
-    /*
-     * This variable holds a handle to the TimerThread class for
-     * the purpose of getting at the class monitor.  The reason
-     * why Class.forName("TimerThread") is not used is because it
-     * doesn't appear to work when loaded via a net class loader.
-     */
-    static TimerThread timerThread = null;
-
-    /**
-     * Creates a timer object that is owned by 'owner' and
-     * with the interval 'interval' milliseconds.  The new timer
-     * object is stopped and is regular.  getRemainingTime()
-     * return 'interval' at this point.  getStopTime() returns
-     * the time this object was created.
-     * @param owner    owner of the timer object
-     * @param interval interval of the timer in milliseconds
-     */
-    public Timer(Timeable owner, long interval) {
-        this.owner = owner;
-        this.interval = interval;
-        remainingTime = interval;
-        regular = true;
-        sleepUntil = System.currentTimeMillis();
-        stopped = true;
-        synchronized (getClass()) {
-            if (timerThread == null) {
-                timerThread = new TimerThread();
-            }
-        }
-    }
-
-    /**
-     * Returns true if this timer is stopped.
-     */
-    public synchronized boolean isStopped() {
-        return stopped;
-    }
-
-    /**
-     * Stops the timer.  The amount of time the timer has already
-     * delayed is saved so if the timer is continued, it will only
-     * delay for the amount of time remaining.
-     * Note that even after stopping a timer, one more tick may
-     * still occur.
-     * This method is MT-safe; i.e. it is synchronized but for
-     * implementation reasons, the synchronized modifier cannot
-     * be included in the method declaration.
-     */
-    public void stop() {
-        long now = System.currentTimeMillis();
-
-        synchronized (timerThread) {
-            synchronized (this) {
-                if (!stopped) {
-                    TimerThread.dequeue(this);
-                    remainingTime = Math.max(0, sleepUntil - now);
-                    sleepUntil = now;        // stop time
-                    stopped = true;
-                }
-            }
-        }
-    }
-
-    /**
-     * Continue the timer.  The next tick will come at getRemainingTime()
-     * milliseconds later.  If the timer is not stopped, this
-     * call will be a no-op.
-     * This method is MT-safe; i.e. it is synchronized but for
-     * implementation reasons, the synchronized modifier cannot
-     * be included in the method declaration.
-     */
-    public void cont() {
-        synchronized (timerThread) {
-            synchronized (this) {
-                if (stopped) {
-                    // The TimerTickThread avoids requeuing the
-                    // timer only if the sleepUntil value has changed.
-                    // The following guarantees that the sleepUntil
-                    // value will be different; without this guarantee,
-                    // it's theoretically possible for the timer to be
-                    // inserted twice.
-                    sleepUntil = Math.max(sleepUntil + 1,
-                        System.currentTimeMillis() + remainingTime);
-                    TimerThread.enqueue(this);
-                    stopped = false;
-                }
-            }
-        }
-    }
-
-    /**
-     * Resets the timer's remaining time to the timer's interval.
-     * If the timer's running state is not altered.
-     */
-    public void reset() {
-        synchronized (timerThread) {
-            synchronized (this) {
-                setRemainingTime(interval);
-            }
-        }
-    }
-
-    /**
-     * Returns the time at which the timer was last stopped.  The
-     * return value is valid only if the timer is stopped.
-     */
-    public synchronized long getStopTime() {
-        return sleepUntil;
-    }
-
-    /**
-     * Returns the timer's interval.
-     */
-    public synchronized long getInterval() {
-        return interval;
-    }
-
-    /**
-     * Changes the timer's interval.  The new interval setting
-     * does not take effect until after the next tick.
-     * This method does not alter the remaining time or the
-     * running state of the timer.
-     * @param interval new interval of the timer in milliseconds
-     */
-    public synchronized void setInterval(long interval) {
-        this.interval = interval;
-    }
-
-    /**
-     * Returns the remaining time before the timer's next tick.
-     * The return value is valid only if timer is stopped.
-     */
-    public synchronized long getRemainingTime() {
-        return remainingTime;
-    }
-
-    /**
-     * Sets the remaining time before the timer's next tick.
-     * This method does not alter the timer's running state.
-     * This method is MT-safe; i.e. it is synchronized but for
-     * implementation reasons, the synchronized modifier cannot
-     * be included in the method declaration.
-     * @param time new remaining time in milliseconds.
-     */
-    public void setRemainingTime(long time) {
-        synchronized (timerThread) {
-            synchronized (this) {
-                if (stopped) {
-                    remainingTime = time;
-                } else {
-                    stop();
-                    remainingTime = time;
-                    cont();
-                }
-            }
-        }
-    }
-
-    /**
-     * In regular mode, a timer ticks at the specified interval,
-     * regardless of how long the owner's tick() method takes.
-     * While the timer is running, no ticks are ever discarded.
-     * That means that if the owner's tick() method takes longer
-     * than the interval, the ticks that would have occurred are
-     * delivered immediately.
-     *
-     * In irregular mode, a timer starts delaying for exactly
-     * the specified interval only after the tick() method returns.
-     */
-    public synchronized void setRegular(boolean regular) {
-        this.regular = regular;
-    }
-
-    /*
-     * This method is used only for testing purposes.
-     */
-    protected Thread getTimerThread() {
-        return TimerThread.timerThread;
-    }
-}
-
-
-/*
-
-This class implements the timer queue and is exclusively used by the
-Timer class.  There are only two methods exported to the Timer class -
-enqueue, for inserting a timer into queue and dequeue, for removing
-a timer from the queue.
-
-A timer in the timer queue is awaiting a tick.  When a timer is to be
-ticked, it is removed from the timer queue before the owner's tick()
-method is called.
-
-A single timer thread manages the timer queue.  This timer thread
-looks at the head of the timer queue and delays until it's time for
-the timer to tick.  When the time comes, the timer thread creates a
-callback thread to call the timer owner's tick() method.  The timer
-thread then processes the next timer in the queue.
-
-When a timer is inserted at the head of the queue, the timer thread is
-notified.  This causes the timer thread to prematurely wake up and
-process the new head of the queue.
-
-*/
-
-class TimerThread extends Thread {
-    /*
-     * Set to true to get debugging output.
-     */
-    public static boolean debug = false;
-
-    /*
-     * This is a handle to the thread managing the thread queue.
-     */
-    static TimerThread timerThread;
-
-    /*
-     * This flag is set if the timer thread has been notified
-     * while it was in the timed wait.  This flag allows the
-     * timer thread to tell whether or not the wait completed.
-     */
-    static boolean notified = false;
-
-    protected TimerThread() {
-        super("TimerThread");
-        timerThread = this;
-        start();
-    }
-
-    public synchronized void run() {
-        while (true) {
-            long delay;
-
-            while (timerQueue == null) {
-                try {
-                    wait();
-                } catch (InterruptedException ex) {
-                   // Just drop through and check timerQueue.
-                }
-            }
-            notified = false;
-            delay = timerQueue.sleepUntil - System.currentTimeMillis();
-            if (delay > 0) {
-                try {
-                    wait(delay);
-                } catch (InterruptedException ex) {
-                    // Just drop through.
-                }
-            }
-            // remove from timer queue.
-            if (!notified) {
-                Timer timer = timerQueue;
-                timerQueue = timerQueue.next;
-                TimerTickThread thr = TimerTickThread.call(
-                    timer, timer.sleepUntil);
-                if (debug) {
-                    long delta = (System.currentTimeMillis() - timer.sleepUntil);
-                    System.out.println("tick(" + thr.getName() + ","
-                        + timer.interval + ","+delta+ ")");
-                    if (delta > 250) {
-                        System.out.println("*** BIG DELAY ***");
-                    }
-                }
-            }
-        }
-    }
-
-    /* *******************************************************
-       Timer Queue
-       ******************************************************* */
-
-    /*
-     * The timer queue is a queue of timers waiting to tick.
-     */
-    static Timer timerQueue = null;
-
-    /*
-     * Uses timer.sleepUntil to determine where in the queue
-     * to insert the timer object.
-     * A new ticker thread is created only if the timer
-     * is inserted at the beginning of the queue.
-     * The timer must not already be in the queue.
-     * Assumes the caller has the TimerThread monitor.
-     */
-    static protected void enqueue(Timer timer) {
-        Timer prev = null;
-        Timer cur = timerQueue;
-
-        if (cur == null || timer.sleepUntil <= cur.sleepUntil) {
-            // insert at front of queue
-            timer.next = timerQueue;
-            timerQueue = timer;
-            notified = true;
-            timerThread.notify();
-        } else {
-            do {
-                prev = cur;
-                cur = cur.next;
-            } while (cur != null && timer.sleepUntil > cur.sleepUntil);
-            // insert or append to the timer queue
-            timer.next = cur;
-            prev.next = timer;
-        }
-        if (debug) {
-            long now = System.currentTimeMillis();
-
-            System.out.print(Thread.currentThread().getName()
-                + ": enqueue " + timer.interval + ": ");
-            cur = timerQueue;
-            while(cur != null) {
-                long delta = cur.sleepUntil - now;
-                System.out.print(cur.interval + "(" + delta + ") ");
-                cur = cur.next;
-            }
-            System.out.println();
-        }
-    }
-
-    /*
-     * If the timer is not in the queue, returns false;
-     * otherwise removes the timer from the timer queue and returns true.
-     * Assumes the caller has the TimerThread monitor.
-     */
-    static protected boolean dequeue(Timer timer) {
-        Timer prev = null;
-        Timer cur = timerQueue;
-
-        while (cur != null && cur != timer) {
-            prev = cur;
-            cur = cur.next;
-        }
-        if (cur == null) {
-            if (debug) {
-                System.out.println(Thread.currentThread().getName()
-                    + ": dequeue " + timer.interval + ": no-op");
-            }
-            return false;
-        }       if (prev == null) {
-            timerQueue = timer.next;
-            notified = true;
-            timerThread.notify();
-        } else {
-            prev.next = timer.next;
-        }
-        timer.next = null;
-        if (debug) {
-            long now = System.currentTimeMillis();
-
-            System.out.print(Thread.currentThread().getName()
-                + ": dequeue " + timer.interval + ": ");
-            cur = timerQueue;
-            while(cur != null) {
-                long delta = cur.sleepUntil - now;
-                System.out.print(cur.interval + "(" + delta + ") ");
-                cur = cur.next;
-            }
-            System.out.println();
-        }
-        return true;
-    }
-
-    /*
-     * Inserts the timer back into the queue.  This method
-     * is used by a callback thread after it has called the
-     * timer owner's tick() method.  This method recomputes
-     * the sleepUntil field.
-     * Assumes the caller has the TimerThread and Timer monitor.
-     */
-    protected static void requeue(Timer timer) {
-        if (!timer.stopped) {
-            long now = System.currentTimeMillis();
-            if (timer.regular) {
-                timer.sleepUntil += timer.interval;
-            } else {
-                timer.sleepUntil = now + timer.interval;
-            }
-            enqueue(timer);
-        } else if (debug) {
-            System.out.println(Thread.currentThread().getName()
-                + ": requeue " + timer.interval + ": no-op");
-        }
-    }
-}
-
-/*
-
-This class implements a simple thread whose only purpose is to call a
-timer owner's tick() method.  A small fixed-sized pool of threads is
-maintained and is protected by the class monitor.  If the pool is
-exhausted, a new thread is temporarily created and destroyed when
-done.
-
-A thread that's in the pool waits on it's own monitor.  When the
-thread is retrieved from the pool, the retriever notifies the thread's
-monitor.
-
-*/
-
-class TimerTickThread extends Thread {
-    /*
-     * Maximum size of the thread pool.
-     */
-    static final int MAX_POOL_SIZE = 3;
-
-    /*
-     * Number of threads in the pool.
-     */
-    static int curPoolSize = 0;
-
-    /*
-     * The pool of timer threads.
-     */
-    static TimerTickThread pool = null;
-
-    /*
-     * Is used when linked into the thread pool.
-     */
-    TimerTickThread next = null;
-
-    /*
-     * This is the handle to the timer whose owner's
-     * tick() method will be called.
-     */
-    Timer timer;
-
-    /*
-     * The value of a timer's sleepUntil value is captured here.
-     * This is used to determine whether or not the timer should
-     * be reinserted into the queue.  If the timer's sleepUntil
-     * value has changed, the timer is not reinserted.
-     */
-    long lastSleepUntil;
-
-    /*
-     * Creates a new callback thread to call the timer owner's
-     * tick() method.  A thread is taken from the pool if one
-     * is available, otherwise, a new thread is created.
-     * The thread handle is returned.
-     */
-    protected static synchronized TimerTickThread call(
-            Timer timer, long sleepUntil) {
-        TimerTickThread thread = pool;
-
-        if (thread == null) {
-            // create one.
-            thread = new TimerTickThread();
-            thread.timer = timer;
-            thread.lastSleepUntil = sleepUntil;
-            thread.start();
-        } else {
-            pool = pool.next;
-            thread.timer = timer;
-            thread.lastSleepUntil = sleepUntil;
-            synchronized (thread) {
-                thread.notify();
-            }
-        }
-        return thread;
-    }
-
-    /*
-     * Returns false if the thread should simply exit;
-     * otherwise the thread is returned the pool, where
-     * it waits to be notified.  (I did try to use the
-     * class monitor but the time between the notify
-     * and breaking out of the wait seemed to take
-     * significantly longer; need to look into this later.)
-     */
-    private boolean returnToPool() {
-        synchronized (getClass()) {
-            if (curPoolSize >= MAX_POOL_SIZE) {
-                return false;
-            }
-            next = pool;
-            pool = this;
-            curPoolSize++;
-            timer = null;
-        }
-        while (timer == null) {
-            synchronized (this) {
-                try {
-                    wait();
-                } catch (InterruptedException ex) {
-                   // Just drop through and retest timer.
-                }
-            }
-        }
-        synchronized (getClass()) {
-            curPoolSize--;
-        }
-        return true;
-    }
-
-    public void run() {
-        do {
-            timer.owner.tick(timer);
-            synchronized (TimerThread.timerThread) {
-                synchronized (timer) {
-                    if (lastSleepUntil == timer.sleepUntil) {
-                        TimerThread.requeue(timer);
-                    }
-                }
-            }
-        } while (returnToPool());
-    }
-}
--- a/src/share/classes/sun/misc/UUDecoder.java	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/misc/UUDecoder.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/net/TransferProtocolClient.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/net/ftp/impl/FtpClient.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/net/www/MimeEntry.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/net/www/http/HttpClient.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/net/www/protocol/file/FileURLConnection.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/net/www/protocol/http/DigestAuthentication.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/nio/ch/ServerSocketChannelImpl.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/nio/ch/SocketChannelImpl.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/print/PSPrinterJob.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/reflect/MethodAccessorGenerator.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/rmi/server/Activation.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/rmi/server/LoaderHandler.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/rmi/server/Util.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/acl/AclImpl.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/jgss/GSSCredentialImpl.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/jgss/GSSHeader.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/jgss/GSSToken.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/jgss/ProviderList.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/jgss/TokenTracker.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/jgss/krb5/InitialToken.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/jgss/krb5/Krb5Context.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/jgss/wrapper/Krb5Util.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/jgss/wrapper/NativeGSSContext.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/krb5/Credentials.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/krb5/KrbException.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/krb5/PrincipalName.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/krb5/internal/EncTicketPart.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/krb5/internal/TicketFlags.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/krb5/internal/crypto/EType.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/krb5/internal/crypto/dk/DkCrypto.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/krb5/internal/ktab/KeyTabEntry.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/pkcs/PKCS9Attribute.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/pkcs/PKCS9Attributes.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/pkcs/SigningCertificateInfo.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_AES_CTR_PARAMS.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_DATE.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_ECDH1_DERIVE_PARAMS.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_ECDH2_DERIVE_PARAMS.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_INFO.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_MECHANISM.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_MECHANISM_INFO.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_PBE_PARAMS.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_PKCS5_PBKD2_PARAMS.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_RSA_PKCS_OAEP_PARAMS.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_RSA_PKCS_PSS_PARAMS.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_SESSION_INFO.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_SLOT_INFO.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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	Thu Jun 19 11:22:38 2014 -0700
+++ b/src/share/classes/sun/security/pkcs11/wrapper/CK_TOKEN_INFO.java	Fri Jun 20 10:15:30 2014 -0700
@@ -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.tokenInfoFlagsToStr