changeset 11171:07175dc5b2da

Merge
author prr
date Tue, 16 Dec 2014 09:58:02 -0800
parents 258959486dc2 e934242d0c1f
children 8a6e695a34b5
files src/java.base/share/native/libjli/version_comp.c src/java.base/share/native/libjli/version_comp.h src/java.desktop/share/classes/java/awt/Container.java src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java src/java.desktop/share/classes/javax/swing/GroupLayout.java src/java.desktop/share/classes/javax/swing/JComponent.java src/java.desktop/share/classes/javax/swing/JList.java src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java src/java.desktop/share/classes/javax/swing/table/JTableHeader.java src/java.desktop/share/classes/javax/swing/text/html/FormView.java src/java.desktop/share/classes/javax/swing/text/html/IsindexView.java src/java.desktop/share/classes/javax/swing/text/html/LineView.java src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java src/java.desktop/unix/classes/sun/awt/X11/XScrollPanePeer.java src/java.desktop/unix/classes/sun/awt/X11/XTextFieldPeer.java
diffstat 375 files changed, 2869 insertions(+), 2380 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Dec 16 09:57:33 2014 -0800
+++ b/.hgtags	Tue Dec 16 09:58:02 2014 -0800
@@ -284,3 +284,4 @@
 ca6edf957fe1c6ea818530b503578e872cea7239 jdk9-b39
 f1ed1540da70a066527fd043413107e47721edbf jdk9-b40
 e336cbd8b15e959e70ed02f0f5e93fa76ebd4c07 jdk9-b41
+6b2314173433467245261364a52fb8e347fe6342 jdk9-b42
--- a/make/CompileInterimRmic.gmk	Tue Dec 16 09:57:33 2014 -0800
+++ b/make/CompileInterimRmic.gmk	Tue Dec 16 09:58:02 2014 -0800
@@ -46,8 +46,7 @@
     SRC := $(JDK_TOPDIR)/src/jdk.rmic/share/classes, \
     INCLUDES := $(RMIC_PKGS), \
     BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_classes, \
-    COPY := .properties, \
-    JAVAC_SOURCE_PATH_OVERRIDE := $(addprefix $(JDK_TOPDIR)/src/jdk.rmic/share/classes/, $(RMIC_PKGS))))
+    COPY := .properties))
 
 ##########################################################################################
 
--- a/make/Import.gmk	Tue Dec 16 09:57:33 2014 -0800
+++ b/make/Import.gmk	Tue Dec 16 09:58:02 2014 -0800
@@ -221,8 +221,13 @@
 # even if zip is already unpacked.
 $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services: $(HOTSPOT_DIST)/lib/sa-jdi.jar
 
-SA_TARGETS += $(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/_the.sa.jar.unpacked \
-    $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services
+# Some platforms don't have the serviceability agent
+ifeq (, $(filter $(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), aix-ppc64))
+  ifneq ($(JVM_VARIANT_ZERO), true)
+    SA_TARGETS += $(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/_the.sa.jar.unpacked \
+        $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services
+  endif
+endif
 
 ################################################################################
 
--- a/make/gendata/GendataBreakIterator.gmk	Tue Dec 16 09:57:33 2014 -0800
+++ b/make/gendata/GendataBreakIterator.gmk	Tue Dec 16 09:58:02 2014 -0800
@@ -44,17 +44,10 @@
 # Generate BreakIteratorData
 BREAK_ITERATOR_CLASSES := $(BUILDTOOLS_OUTPUTDIR)/break_iterator_classes
 
-# JAVAC_SOURCE_PATH_OVERRIDE is set to isolate the compile to just those
-# two files in that directory and not get anything implicit from
-# surrounding directories which aren't jdk N-1 compatible.
-# Because we are targeting jdk N-1, but the surrounding source code is jdk N.
-# These two files should be moved out to a build tool! We have to disable
-# sjavac here as well.
+# These two files should be moved out to a build tool!
 $(eval $(call SetupJavaCompilation,BUILD_BREAKITERATOR, \
     SETUP := GENERATE_OLDBYTECODE, \
     SRC := $(TEXT_SRCDIR), \
-    DISABLE_SJAVAC := true, \
-    JAVAC_SOURCE_PATH_OVERRIDE := $(patsubst %, %/$(TEXT_PKG), $(TEXT_SRCDIR)), \
     INCLUDES := $(TEXT_PKG), \
     INCLUDE_FILES := $(TEXT_SOURCES), \
     BIN := $(BREAK_ITERATOR_CLASSES)))
--- a/make/gensrc/Gensrc-jdk.jdi.gmk	Tue Dec 16 09:57:33 2014 -0800
+++ b/make/gensrc/Gensrc-jdk.jdi.gmk	Tue Dec 16 09:58:02 2014 -0800
@@ -78,8 +78,13 @@
     $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector
 	$(install-file)
 
-GENSRC_JDK_JDI += $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector \
-    $(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/META-INF/services/com.sun.jdi.connect.Connector
+# Some platforms don't have the serviceability agent
+ifeq (, $(filter $(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), aix-ppc64))
+  ifneq ($(JVM_VARIANT_ZERO), true)
+    GENSRC_JDK_JDI += $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector \
+        $(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/META-INF/services/com.sun.jdi.connect.Connector
+  endif
+endif
 
 ################################################################################
 
--- a/make/launcher/LauncherCommon.gmk	Tue Dec 16 09:57:33 2014 -0800
+++ b/make/launcher/LauncherCommon.gmk	Tue Dec 16 09:58:02 2014 -0800
@@ -116,7 +116,7 @@
   endif
 
   ifeq ($(OPENJDK_TARGET_OS), aix)
-    $1_LDFLAGS_SUFFIX += -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE) -ljli_static
+    $1_LDFLAGS_SUFFIX += -L$(SUPPORT_OUTPUTDIR)/native/java.base -ljli_static
   endif
 
   ifeq ($(USE_EXTERNAL_LIBZ), true)
--- a/make/lib/Awt2dLibraries.gmk	Tue Dec 16 09:57:33 2014 -0800
+++ b/make/lib/Awt2dLibraries.gmk	Tue Dec 16 09:58:02 2014 -0800
@@ -367,7 +367,7 @@
             $(X_LIBS) $(LIBAWT_XAWT_LDFLAGS) \
             $(call SET_SHARED_LIBRARY_ORIGIN) \
             $(call SET_SHARED_LIBRARY_ORIGIN,/..) \
-            -L $(INSTALL_LIBRARIES_HERE), \
+            -L$(INSTALL_LIBRARIES_HERE), \
         LDFLAGS_SUFFIX := $(LIBAWT_XAWT_LDFLAGS_SUFFIX), \
         VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
         RC_FLAGS := $(RC_FLAGS) \
@@ -421,7 +421,7 @@
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/liblcms/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_unix := -L $(INSTALL_LIBRARIES_HERE), \
+    LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
     LDFLAGS_solaris := /usr/lib$(OPENJDK_TARGET_CPU_ISADIR)/libm.so.2, \
     LDFLAGS_windows := $(WIN_AWT_LIB) $(WIN_JAVA_LIB), \
     LDFLAGS_SUFFIX_solaris := -lawt -ljava -ljvm -lc $(LCMS_LIBS), \
@@ -581,7 +581,7 @@
     MAPFILE := $(BUILD_LIBFONTMANAGER_MAPFILE), \
     LDFLAGS := $(subst -Xlinker -z -Xlinker defs,,$(LDFLAGS_JDKLIB)) $(LDFLAGS_CXX_JDK) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
-    LDFLAGS_unix := -L $(INSTALL_LIBRARIES_HERE), \
+    LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
     LDFLAGS_SUFFIX := $(BUILD_LIBFONTMANAGER_FONTLIB), \
     LDFLAGS_SUFFIX_linux := -lawt $(LIBM) $(LIBCXX) -ljava -ljvm -lc, \
     LDFLAGS_SUFFIX_solaris := $(filter-out -R%, $(X_LIBS)) \
@@ -698,7 +698,7 @@
       MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjawt/mapfile-vers, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
-      LDFLAGS_unix := -L $(INSTALL_LIBRARIES_HERE), \
+      LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
       LDFLAGS_solaris := $(X_LIBS), \
       LDFLAGS_SUFFIX_linux := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX), \
       LDFLAGS_SUFFIX_aix := $(JAWT_LIBS) $(LDFLAGS_JDKLIB_SUFFIX),\
@@ -775,7 +775,7 @@
         MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libawt_headless/mapfile-vers, \
         LDFLAGS := $(LDFLAGS_JDKLIB) \
             $(call SET_SHARED_LIBRARY_ORIGIN), \
-        LDFLAGS_unix := -L $(INSTALL_LIBRARIES_HERE), \
+        LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
         LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
         LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \
         LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN)., \
@@ -954,7 +954,7 @@
           $(LIBAWT_LWAWT_CFLAGS), \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN) \
-          -L $(INSTALL_LIBRARIES_HERE), \
+          -L$(INSTALL_LIBRARIES_HERE), \
       LDFLAGS_SUFFIX_macosx := -lawt -lmlib_image -losxapp -ljvm $(LIBM) \
           -framework Accelerate \
           -framework ApplicationServices \
@@ -1002,7 +1002,7 @@
       LDFLAGS := $(LDFLAGS_JDKLIB) \
           $(call SET_SHARED_LIBRARY_ORIGIN) \
           -Xlinker -rpath -Xlinker @loader_path \
-          -L $(INSTALL_LIBRARIES_HERE), \
+          -L$(INSTALL_LIBRARIES_HERE), \
       LDFLAGS_SUFFIX_macosx := -lawt -losxapp -lawt_lwawt \
           -framework Cocoa \
           -framework Carbon \
--- a/make/lib/Lib-java.instrument.gmk	Tue Dec 16 09:57:33 2014 -0800
+++ b/make/lib/Lib-java.instrument.gmk	Tue Dec 16 09:58:02 2014 -0800
@@ -72,8 +72,8 @@
         -framework Cocoa -framework Security -framework ApplicationServices, \
     LDFLAGS_SUFFIX := $(LIBINSTRUMENT_LDFLAGS_SUFFIX), \
     LDFLAGS_SUFFIX_macosx := -liconv $(LIBZ), \
-    LDFLAGS_SUFFIX_solaris := $(LIBZ) -L $(call FindLibDirForModule, java.base)/jli -ljli $(LIBDL) -lc, \
-    LDFLAGS_SUFFIX_linux := $(LIBZ) -L $(call FindLibDirForModule, java.base)/jli -ljli $(LIBDL), \
+    LDFLAGS_SUFFIX_solaris := $(LIBZ) -L$(call FindLibDirForModule, java.base)/jli -ljli $(LIBDL) -lc, \
+    LDFLAGS_SUFFIX_linux := $(LIBZ) -L$(call FindLibDirForModule, java.base)/jli -ljli $(LIBDL), \
     LDFLAGS_SUFFIX_aix := $(LIBZ) -L$(SUPPORT_OUTPUTDIR)/native/java.base -ljli_static $(LIBDL),\
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
--- a/make/lib/LibCommon.gmk	Tue Dec 16 09:57:33 2014 -0800
+++ b/make/lib/LibCommon.gmk	Tue Dec 16 09:58:02 2014 -0800
@@ -79,7 +79,9 @@
 # Param 2 - library name
 # Param 3 - subdir for library
 define FindLib
-  $(call FindLibDirForModule, $(strip $1))$(strip $3)/$(LIBRARY_PREFIX)$(strip $2)$(SHARED_LIBRARY_SUFFIX)
+$(strip \
+  $(call FindLibDirForModule, $(strip $1))$(strip $3)/$(LIBRARY_PREFIX)$(strip $2)$(SHARED_LIBRARY_SUFFIX) \
+)
 endef
 
 ################################################################################
--- a/make/src/classes/build/tools/module/ModuleArchive.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/make/src/classes/build/tools/module/ModuleArchive.java	Tue Dec 16 09:58:02 2014 -0800
@@ -227,10 +227,12 @@
 
         private static String nativeDir(String filename) {
             if (System.getProperty("os.name").startsWith("Windows")) {
-                if (filename.endsWith(".dll"))
+                if (filename.endsWith(".dll") || filename.endsWith(".diz")
+                    || filename.endsWith(".pdb") || filename.endsWith(".map")) {
                     return "bin";
-                 else
+                } else {
                     return "lib";
+                }
             } else {
                 return "lib";
             }
--- a/src/demo/share/jfc/TableExample/TableSorter.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/demo/share/jfc/TableExample/TableSorter.java	Tue Dec 16 09:58:02 2014 -0800
@@ -267,7 +267,7 @@
         than assigned otherwise sister calls in the recursion might
         get out of sinc.  When the number of elements is three they
         are partitioned so that the first set, [low, mid), has one
-        element and and the second, [mid, high), has two. We skip the
+        element and the second, [mid, high), has two. We skip the
         optimisation when the number of elements is three or less as
         the first compare in the normal merge will produce the same
         sequence of steps. This optimisation seems to be worthwhile
--- a/src/java.base/macosx/native/libjli/java_md_macosx.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/macosx/native/libjli/java_md_macosx.c	Tue Dec 16 09:58:02 2014 -0800
@@ -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
@@ -38,7 +38,6 @@
 #include <sys/time.h>
 
 #include "manifest_info.h"
-#include "version_comp.h"
 
 /* Support Cocoa event loop on the main thread */
 #include <Cocoa/Cocoa.h>
@@ -104,10 +103,6 @@
  *  (incoming argv)
  *  |
  * \|/
- * SelectVersion
- * (selects the JRE version, note: not data model)
- *  |
- * \|/
  * CreateExecutionEnvironment
  * (determines desired data model)
  *  |
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/ClassReader.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/ClassReader.java	Tue Dec 16 09:58:02 2014 -0800
@@ -497,7 +497,7 @@
                     code.max_locals  >= TOO_BIG ||
                     code.getLength() >= TOO_BIG ||
                     name.endsWith("X")) {
-                    // No, we don't really know what to do this this one.
+                    // No, we don't really know what to do with this one.
                     // Do not compress the rare and strange "u4" and "X" cases.
                     a = null;
                 }
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/Coding.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/Coding.java	Tue Dec 16 09:58:02 2014 -0800
@@ -95,7 +95,7 @@
       If S>0, the unsigned value of a byte sequence is regarded as a binary
       integer.  If any of the S low-order bits are zero, the corresponding
       signed value will be non-negative.  If all of the S low-order bits
-      (S>0) are one, the the corresponding signed value will be negative.
+      (S>0) are one, the corresponding signed value will be negative.
 
       The non-negative signed values are compact and monotonically increasing
       (from 0) in the ordering of the corresponding unsigned values.
--- a/src/java.base/share/classes/java/io/FileInputStream.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/io/FileInputStream.java	Tue Dec 16 09:58:02 2014 -0800
@@ -26,6 +26,7 @@
 package java.io;
 
 import java.nio.channels.FileChannel;
+import java.util.concurrent.atomic.AtomicBoolean;
 import sun.nio.ch.FileChannelImpl;
 
 
@@ -57,10 +58,9 @@
      */
     private final String path;
 
-    private FileChannel channel = null;
+    private volatile FileChannel channel;
 
-    private final Object closeLock = new Object();
-    private volatile boolean closed = false;
+    private final AtomicBoolean closed = new AtomicBoolean(false);
 
     /**
      * Creates a <code>FileInputStream</code> by
@@ -313,14 +313,14 @@
      * @spec JSR-51
      */
     public void close() throws IOException {
-        synchronized (closeLock) {
-            if (closed) {
-                return;
-            }
-            closed = true;
+        if (!closed.compareAndSet(false, true)) {
+            // if compareAndSet() returns false closed was already true
+            return;
         }
-        if (channel != null) {
-           channel.close();
+
+        FileChannel fc = channel;
+        if (fc != null) {
+           fc.close();
         }
 
         fd.closeAll(new Closeable() {
@@ -364,12 +364,23 @@
      * @spec JSR-51
      */
     public FileChannel getChannel() {
-        synchronized (this) {
-            if (channel == null) {
-                channel = FileChannelImpl.open(fd, path, true, false, this);
+        FileChannel fc = this.channel;
+        if (fc == null) {
+            synchronized (this) {
+                fc = this.channel;
+                if (fc == null) {
+                    this.channel = fc = FileChannelImpl.open(fd, path, true, false, this);
+                    if (closed.get()) {
+                        try {
+                            fc.close();
+                        } catch (IOException ioe) {
+                            throw new InternalError(ioe); // should not happen
+                        }
+                    }
+                }
             }
-            return channel;
         }
+        return fc;
     }
 
     private static native void initIDs();
--- a/src/java.base/share/classes/java/io/FileOutputStream.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/io/FileOutputStream.java	Tue Dec 16 09:58:02 2014 -0800
@@ -26,6 +26,7 @@
 package java.io;
 
 import java.nio.channels.FileChannel;
+import java.util.concurrent.atomic.AtomicBoolean;
 import sun.misc.SharedSecrets;
 import sun.misc.JavaIOFileDescriptorAccess;
 import sun.nio.ch.FileChannelImpl;
@@ -68,7 +69,7 @@
     /**
      * The associated channel, initialized lazily.
      */
-    private FileChannel channel;
+    private volatile FileChannel channel;
 
     /**
      * The path of the referenced file
@@ -76,8 +77,7 @@
      */
     private final String path;
 
-    private final Object closeLock = new Object();
-    private volatile boolean closed = false;
+    private final AtomicBoolean closed = new AtomicBoolean(false);
 
     /**
      * Creates a file output stream to write to the file with the
@@ -341,15 +341,14 @@
      * @spec JSR-51
      */
     public void close() throws IOException {
-        synchronized (closeLock) {
-            if (closed) {
-                return;
-            }
-            closed = true;
+        if (!closed.compareAndSet(false, true)) {
+            // if compareAndSet() returns false closed was already true
+            return;
         }
 
-        if (channel != null) {
-            channel.close();
+        FileChannel fc = channel;
+        if (fc != null) {
+           fc.close();
         }
 
         fd.closeAll(new Closeable() {
@@ -394,12 +393,23 @@
      * @spec JSR-51
      */
     public FileChannel getChannel() {
-        synchronized (this) {
-            if (channel == null) {
-                channel = FileChannelImpl.open(fd, path, false, true, this);
+        FileChannel fc = this.channel;
+        if (fc == null) {
+            synchronized (this) {
+                fc = this.channel;
+                if (fc == null) {
+                    this.channel = fc = FileChannelImpl.open(fd, path, false, true, this);
+                    if (closed.get()) {
+                        try {
+                            fc.close();
+                        } catch (IOException ioe) {
+                            throw new InternalError(ioe); // should not happen
+                        }
+                    }
+                }
             }
-            return channel;
         }
+        return fc;
     }
 
     /**
--- a/src/java.base/share/classes/java/io/InputStream.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/io/InputStream.java	Tue Dec 16 09:58:02 2014 -0800
@@ -25,6 +25,8 @@
 
 package java.io;
 
+import java.util.Objects;
+
 /**
  * This abstract class is the superclass of all classes representing
  * an input stream of bytes.
@@ -48,6 +50,8 @@
     // use when skipping.
     private static final int MAX_SKIP_BUFFER_SIZE = 2048;
 
+    private static final int TRANSFER_BUFFER_SIZE = 8192;
+
     /**
      * Reads the next byte of data from the input stream. The value byte is
      * returned as an <code>int</code> in the range <code>0</code> to
@@ -364,4 +368,40 @@
         return false;
     }
 
+    /**
+     * Reads all bytes from this input stream and writes the bytes to the
+     * given output stream in the order that they are read. On return, this
+     * input stream will be at end of stream. This method does not close either
+     * stream.
+     * <p>
+     * This method may block indefinitely reading from the input stream, or
+     * writing to the output stream. The behavior for the case where the input
+     * and/or output stream is <i>asynchronously closed</i>, or the thread
+     * interrupted during the transfer, is highly input and output stream
+     * specific, and therefore not specified.
+     * <p>
+     * If an I/O error occurs reading from the input stream or writing to the
+     * output stream, then it may do so after some bytes have been read or
+     * written. Consequently the input stream may not be at end of stream and
+     * one, or both, streams may be in an inconsistent state. It is strongly
+     * recommended that both streams be promptly closed if an I/O error occurs.
+     *
+     * @param  out the output stream, non-null
+     * @return the number of bytes transferred
+     * @throws IOException if an I/O error occurs when reading or writing
+     * @throws NullPointerException if {@code out} is {@code null}
+     *
+     * @since 1.9
+     */
+    public long transferTo(OutputStream out) throws IOException {
+        Objects.requireNonNull(out, "out");
+        long transferred = 0;
+        byte[] buffer = new byte[TRANSFER_BUFFER_SIZE];
+        int read;
+        while ((read = this.read(buffer, 0, TRANSFER_BUFFER_SIZE)) >= 0) {
+            out.write(buffer, 0, read);
+            transferred += read;
+        }
+        return transferred;
+    }
 }
--- a/src/java.base/share/classes/java/io/RandomAccessFile.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/io/RandomAccessFile.java	Tue Dec 16 09:58:02 2014 -0800
@@ -26,6 +26,7 @@
 package java.io;
 
 import java.nio.channels.FileChannel;
+import java.util.concurrent.atomic.AtomicBoolean;
 import sun.nio.ch.FileChannelImpl;
 
 
@@ -59,7 +60,7 @@
 public class RandomAccessFile implements DataOutput, DataInput, Closeable {
 
     private FileDescriptor fd;
-    private FileChannel channel = null;
+    private volatile FileChannel channel;
     private boolean rw;
 
     /**
@@ -68,8 +69,7 @@
      */
     private final String path;
 
-    private Object closeLock = new Object();
-    private volatile boolean closed = false;
+    private final AtomicBoolean closed = new AtomicBoolean(false);
 
     private static final int O_RDONLY = 1;
     private static final int O_RDWR =   2;
@@ -276,13 +276,24 @@
      * @since 1.4
      * @spec JSR-51
      */
-    public final FileChannel getChannel() {
-        synchronized (this) {
-            if (channel == null) {
-                channel = FileChannelImpl.open(fd, path, true, rw, this);
+    public FileChannel getChannel() {
+        FileChannel fc = this.channel;
+        if (fc == null) {
+            synchronized (this) {
+                fc = this.channel;
+                if (fc == null) {
+                    this.channel = fc = FileChannelImpl.open(fd, path, true, rw, this);
+                    if (closed.get()) {
+                        try {
+                            fc.close();
+                        } catch (IOException ioe) {
+                            throw new InternalError(ioe); // should not happen
+                        }
+                    }
+                }
             }
-            return channel;
         }
+        return fc;
     }
 
     /**
@@ -604,14 +615,14 @@
      * @spec JSR-51
      */
     public void close() throws IOException {
-        synchronized (closeLock) {
-            if (closed) {
-                return;
-            }
-            closed = true;
+        if (!closed.compareAndSet(false, true)) {
+            // if compareAndSet() returns false closed was already true
+            return;
         }
-        if (channel != null) {
-            channel.close();
+
+        FileChannel fc = channel;
+        if (fc != null) {
+           fc.close();
         }
 
         fd.closeAll(new Closeable() {
--- a/src/java.base/share/classes/java/lang/Class.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/lang/Class.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1529,7 +1529,7 @@
      * the accessible public fields of the class or interface represented by
      * this {@code Class} object.
      *
-     * <p> If this {@code Class} object represents a class or interface with no
+     * <p> If this {@code Class} object represents a class or interface with
      * no accessible public fields, then this method returns an array of length
      * 0.
      *
--- a/src/java.base/share/classes/java/lang/ClassValue.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/lang/ClassValue.java	Tue Dec 16 09:58:02 2014 -0800
@@ -162,7 +162,7 @@
      * observe the time-dependent states as it computes {@code V1}, etc.
      * This does not remove the threat of a stale value, since there is a window of time
      * between the return of {@code computeValue} in {@code T} and the installation
-     * of the the new value.  No user synchronization is possible during this time.
+     * of the new value.  No user synchronization is possible during this time.
      *
      * @param type the type whose class value must be removed
      * @throws NullPointerException if the argument is null
@@ -285,7 +285,7 @@
      * will receive the notification without delay.
      * <p>
      * If version were not volatile, one thread T1 could persistently hold onto
-     * a stale value this.value == V1, while while another thread T2 advances
+     * a stale value this.value == V1, while another thread T2 advances
      * (under a lock) to this.value == V2.  This will typically be harmless,
      * but if T1 and T2 interact causally via some other channel, such that
      * T1's further actions are constrained (in the JMM) to happen after
--- a/src/java.base/share/classes/java/lang/Integer.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/lang/Integer.java	Tue Dec 16 09:58:02 2014 -0800
@@ -840,7 +840,7 @@
     /**
      * Parses the string argument as an unsigned decimal integer. The
      * characters in the string must all be decimal digits, except
-     * that the first character may be an an ASCII plus sign {@code
+     * that the first character may be an ASCII plus sign {@code
      * '+'} ({@code '\u005Cu002B'}). The resulting integer value
      * is returned, exactly as if the argument and the radix 10 were
      * given as arguments to the {@link
--- a/src/java.base/share/classes/java/lang/Long.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/lang/Long.java	Tue Dec 16 09:58:02 2014 -0800
@@ -971,7 +971,7 @@
     /**
      * Parses the string argument as an unsigned decimal {@code long}. The
      * characters in the string must all be decimal digits, except
-     * that the first character may be an an ASCII plus sign {@code
+     * that the first character may be an ASCII plus sign {@code
      * '+'} ({@code '\u005Cu002B'}). The resulting integer value
      * is returned, exactly as if the argument and the radix 10 were
      * given as arguments to the {@link
--- a/src/java.base/share/classes/java/lang/Math.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/lang/Math.java	Tue Dec 16 09:58:02 2014 -0800
@@ -2224,7 +2224,7 @@
          * multiply-store result is subnormal, the next multiply will
          * round it away to zero.  This is done by first multiplying
          * by 2 ^ (scaleFactor % n) and then multiplying several
-         * times by by 2^n as needed where n is the exponent of number
+         * times by 2^n as needed where n is the exponent of number
          * that is a covenient power of two.  In this way, at most one
          * real rounding error occurs.  If the double value set is
          * being used exclusively, the rounding will occur on a
@@ -2249,7 +2249,7 @@
 
         // magnitude of a power of two so large that scaling a finite
         // nonzero value by it would be guaranteed to over or
-        // underflow; due to rounding, scaling down takes takes an
+        // underflow; due to rounding, scaling down takes an
         // additional power of two which is reflected here
         final int MAX_SCALE = DoubleConsts.MAX_EXPONENT + -DoubleConsts.MIN_EXPONENT +
                               DoubleConsts.SIGNIFICAND_WIDTH + 1;
@@ -2318,7 +2318,7 @@
     public static float scalb(float f, int scaleFactor) {
         // magnitude of a power of two so large that scaling a finite
         // nonzero value by it would be guaranteed to over or
-        // underflow; due to rounding, scaling down takes takes an
+        // underflow; due to rounding, scaling down takes an
         // additional power of two which is reflected here
         final int MAX_SCALE = FloatConsts.MAX_EXPONENT + -FloatConsts.MIN_EXPONENT +
                               FloatConsts.SIGNIFICAND_WIDTH + 1;
--- a/src/java.base/share/classes/java/lang/ProcessBuilder.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/lang/ProcessBuilder.java	Tue Dec 16 09:58:02 2014 -0800
@@ -750,7 +750,7 @@
      * {@link Process#getErrorStream()} will return a
      * <a href="#redirect-output">null input stream</a>.
      *
-     * <p>If the {@link #redirectErrorStream redirectErrorStream}
+     * <p>If the {@link #redirectErrorStream() redirectErrorStream}
      * attribute has been set {@code true}, then the redirection set
      * by this method has no effect.
      *
--- a/src/java.base/share/classes/java/lang/String.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/lang/String.java	Tue Dec 16 09:58:02 2014 -0800
@@ -184,8 +184,8 @@
      *         The length
      *
      * @throws  IndexOutOfBoundsException
-     *          If the {@code offset} and {@code count} arguments index
-     *          characters outside the bounds of the {@code value} array
+     *          If {@code offset} is negative, {@code count} is negative, or
+     *          {@code offset} is greater than {@code value.length - count}
      */
     public String(char value[], int offset, int count) {
         if (offset < 0) {
@@ -224,8 +224,8 @@
      *          codePoints}
      *
      * @throws  IndexOutOfBoundsException
-     *          If the {@code offset} and {@code count} arguments index
-     *          characters outside the bounds of the {@code codePoints} array
+     *          If {@code offset} is negative, {@code count} is negative, or
+     *          {@code offset} is greater than {@code codePoints.length - count}
      *
      * @since  1.5
      */
@@ -297,7 +297,8 @@
      *         The length
      *
      * @throws  IndexOutOfBoundsException
-     *          If the {@code offset} or {@code count} argument is invalid
+     *          If {@code offset} is negative, {@code count} is negative, or
+     *          {@code offset} is greater than {@code ascii.length - count}
      *
      * @see  #String(byte[], int)
      * @see  #String(byte[], int, int, java.lang.String)
@@ -401,8 +402,8 @@
      *          If the named charset is not supported
      *
      * @throws  IndexOutOfBoundsException
-     *          If the {@code offset} and {@code length} arguments index
-     *          characters outside the bounds of the {@code bytes} array
+     *          If {@code offset} is negative, {@code length} is negative, or
+     *          {@code offset} is greater than {@code bytes.length - length}
      *
      * @since  1.1
      */
@@ -439,8 +440,8 @@
      *         decode the {@code bytes}
      *
      * @throws  IndexOutOfBoundsException
-     *          If the {@code offset} and {@code length} arguments index
-     *          characters outside the bounds of the {@code bytes} array
+     *          If {@code offset} is negative, {@code length} is negative, or
+     *          {@code offset} is greater than {@code bytes.length - length}
      *
      * @since  1.6
      */
@@ -524,8 +525,8 @@
      *         The number of bytes to decode
      *
      * @throws  IndexOutOfBoundsException
-     *          If the {@code offset} and the {@code length} arguments index
-     *          characters outside the bounds of the {@code bytes} array
+     *          If {@code offset} is negative, {@code length} is negative, or
+     *          {@code offset} is greater than {@code bytes.length - length}
      *
      * @since  1.1
      */
--- a/src/java.base/share/classes/java/lang/Throwable.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/lang/Throwable.java	Tue Dec 16 09:58:02 2014 -0800
@@ -202,7 +202,7 @@
      * The field is initialized to a zero-length array.  A {@code
      * null} value of this field indicates subsequent calls to {@link
      * #setStackTrace(StackTraceElement[])} and {@link
-     * #fillInStackTrace()} will be be no-ops.
+     * #fillInStackTrace()} will be no-ops.
      *
      * @serial
      * @since 1.4
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Tue Dec 16 09:58:02 2014 -0800
@@ -2028,7 +2028,7 @@
         MethodType oldType = target.type();
         if (oldType == newType)  return target;
         if (oldType.explicitCastEquivalentToAsType(newType)) {
-            return target.asType(newType);
+            return target.asFixedArity().asType(newType);
         }
         return MethodHandleImpl.makePairwiseConvert(target, newType, false);
     }
--- a/src/java.base/share/classes/java/lang/invoke/MethodType.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/lang/invoke/MethodType.java	Tue Dec 16 09:58:02 2014 -0800
@@ -116,7 +116,7 @@
     /**
      * Construct a temporary unchecked instance of MethodType for use only as a key to the intern table.
      * Does not check the given parameters for validity, and must be discarded after it is used as a searching key.
-     * The parameters are reversed for this constructor, so that is is not accidentally used.
+     * The parameters are reversed for this constructor, so that it is not accidentally used.
      */
     private MethodType(Class<?>[] ptypes, Class<?> rtype) {
         this.rtype = rtype;
@@ -1006,7 +1006,7 @@
      * Therefore, the number returned is the number of arguments
      * <em>including</em> and <em>after</em> the given parameter,
      * <em>plus</em> the number of long or double arguments
-     * at or after after the argument for the given parameter.
+     * at or after the argument for the given parameter.
      * <p>
      * This method is included for the benefit of applications that must
      * generate bytecodes that process method handles and invokedynamic.
--- a/src/java.base/share/classes/java/security/DomainCombiner.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/security/DomainCombiner.java	Tue Dec 16 09:58:02 2014 -0800
@@ -92,7 +92,7 @@
      * @param currentDomains the ProtectionDomains associated with the
      *          current execution Thread, up to the most recent
      *          privileged {@code ProtectionDomain}.
-     *          The ProtectionDomains are are listed in order of execution,
+     *          The ProtectionDomains are listed in order of execution,
      *          with the most recently executing {@code ProtectionDomain}
      *          residing at the beginning of the array. This parameter may
      *          be {@code null} if the current execution Thread
--- a/src/java.base/share/classes/java/security/Provider.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/security/Provider.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1711,7 +1711,7 @@
          *
          * @param parameter the parameter to test
          *
-         * @return false if this this service cannot use the specified
+         * @return false if this service cannot use the specified
          * parameter; true if it can possibly use the parameter
          *
          * @throws InvalidParameterException if the value of parameter is
--- a/src/java.base/share/classes/java/security/Signature.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/security/Signature.java	Tue Dec 16 09:58:02 2014 -0800
@@ -776,7 +776,7 @@
     /**
      * Updates the data to be signed or verified using the specified
      * ByteBuffer. Processes the {@code data.remaining()} bytes
-     * starting at at {@code data.position()}.
+     * starting at {@code data.position()}.
      * Upon return, the buffer's position will be equal to its limit;
      * its limit will not have changed.
      *
--- a/src/java.base/share/classes/java/security/SignatureSpi.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/security/SignatureSpi.java	Tue Dec 16 09:58:02 2014 -0800
@@ -131,7 +131,7 @@
     /**
      * Updates the data to be signed or verified using the specified
      * ByteBuffer. Processes the {@code data.remaining()} bytes
-     * starting at at {@code data.position()}.
+     * starting at {@code data.position()}.
      * Upon return, the buffer's position will be equal to its limit;
      * its limit will not have changed.
      *
--- a/src/java.base/share/classes/java/security/interfaces/DSAKeyPairGenerator.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/security/interfaces/DSAKeyPairGenerator.java	Tue Dec 16 09:58:02 2014 -0800
@@ -54,7 +54,7 @@
  *
  * </ol>
  *
- * <p>Note: it is not always necessary to do do algorithm-specific
+ * <p>Note: it is not always necessary to do algorithm-specific
  * initialization for a DSA key pair generator. That is, it is not always
  * necessary to call an {@code initialize} method in this interface.
  * Algorithm-independent initialization using the {@code initialize} method
--- a/src/java.base/share/classes/java/text/ChoiceFormat.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/text/ChoiceFormat.java	Tue Dec 16 09:58:02 2014 -0800
@@ -272,7 +272,7 @@
             double tryLess = Math.abs(Math.IEEEremainder(less, 1.0d));
 
             if (tryLessOrEqual < tryLess) {
-                result.append(""+choiceLimits[i]);
+                result.append(choiceLimits[i]);
                 result.append('#');
             } else {
                 if (choiceLimits[i] == Double.POSITIVE_INFINITY) {
@@ -280,7 +280,7 @@
                 } else if (choiceLimits[i] == Double.NEGATIVE_INFINITY) {
                     result.append("-\u221E");
                 } else {
-                    result.append(""+less);
+                    result.append(less);
                 }
                 result.append('<');
             }
--- a/src/java.base/share/classes/java/time/format/DateTimeFormatter.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/time/format/DateTimeFormatter.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1097,7 +1097,7 @@
      * This returns an immutable formatter capable of formatting and parsing
      * the ISO-8601 instant format.
      * When formatting, the second-of-minute is always output.
-     * The nano-of-second outputs zero, three, six or nine digits digits as necessary.
+     * The nano-of-second outputs zero, three, six or nine digits as necessary.
      * When parsing, time to at least the seconds field is required.
      * Fractional seconds from zero to nine are parsed.
      * The localized decimal style is not used.
--- a/src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java	Tue Dec 16 09:58:02 2014 -0800
@@ -793,7 +793,7 @@
      * They are converted to a date-time with a zone-offset of UTC and formatted
      * using the standard ISO-8601 format.
      * With this method, formatting nano-of-second outputs zero, three, six
-     * or nine digits digits as necessary.
+     * or nine digits as necessary.
      * The localized decimal style is not used.
      * <p>
      * The instant is obtained using {@link ChronoField#INSTANT_SECONDS INSTANT_SECONDS}
--- a/src/java.base/share/classes/java/util/Arrays.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/util/Arrays.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1221,7 +1221,7 @@
      *
      * <p>The implementation takes equal advantage of ascending and
      * descending order in its input array, and can take advantage of
-     * ascending and descending order in different parts of the the same
+     * ascending and descending order in different parts of the same
      * input array.  It is well-suited to merging two or more sorted arrays:
      * simply concatenate the arrays and sort the resulting array.
      *
@@ -1280,7 +1280,7 @@
      *
      * <p>The implementation takes equal advantage of ascending and
      * descending order in its input array, and can take advantage of
-     * ascending and descending order in different parts of the the same
+     * ascending and descending order in different parts of the same
      * input array.  It is well-suited to merging two or more sorted arrays:
      * simply concatenate the arrays and sort the resulting array.
      *
@@ -1407,7 +1407,7 @@
      *
      * <p>The implementation takes equal advantage of ascending and
      * descending order in its input array, and can take advantage of
-     * ascending and descending order in different parts of the the same
+     * ascending and descending order in different parts of the same
      * input array.  It is well-suited to merging two or more sorted arrays:
      * simply concatenate the arrays and sort the resulting array.
      *
@@ -1473,7 +1473,7 @@
      *
      * <p>The implementation takes equal advantage of ascending and
      * descending order in its input array, and can take advantage of
-     * ascending and descending order in different parts of the the same
+     * ascending and descending order in different parts of the same
      * input array.  It is well-suited to merging two or more sorted arrays:
      * simply concatenate the arrays and sort the resulting array.
      *
--- a/src/java.base/share/classes/java/util/Base64.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/util/Base64.java	Tue Dec 16 09:58:02 2014 -0800
@@ -556,7 +556,7 @@
          *
          * <p> It is the responsibility of the invoker of this method to make
          * sure the output byte array {@code dst} has enough space for decoding
-         * all bytes from the input byte array. No bytes will be be written to
+         * all bytes from the input byte array. No bytes will be written to
          * the output byte array if the output byte array is not big enough.
          *
          * <p> If the input byte array is not in valid Base64 encoding scheme
--- a/src/java.base/share/classes/java/util/Calendar.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/util/Calendar.java	Tue Dec 16 09:58:02 2014 -0800
@@ -2993,7 +2993,7 @@
     }
 
     /**
-     * Sets the date of this {@code Calendar} with the the given date
+     * Sets the date of this {@code Calendar} with the given date
      * specifiers - week year, week of year, and day of week.
      *
      * <p>Unlike the {@code set} method, all of the calendar fields
--- a/src/java.base/share/classes/java/util/Locale.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/util/Locale.java	Tue Dec 16 09:58:02 2014 -0800
@@ -95,7 +95,7 @@
  *   <code>Locale</code> always canonicalizes to lower case.</dd>
  *
  *   <dd>Well-formed language values have the form
- *   <code>[a-zA-Z]{2,8}</code>.  Note that this is not the the full
+ *   <code>[a-zA-Z]{2,8}</code>.  Note that this is not the full
  *   BCP47 language production, since it excludes extlang.  They are
  *   not needed since modern three-letter language codes replace
  *   them.</dd>
@@ -1691,7 +1691,7 @@
     }
 
     /**
-     * Returns a name for the the locale's script that is appropriate for display to
+     * Returns a name for the locale's script that is appropriate for display to
      * the user. If possible, the name will be localized for the default
      * {@link Locale.Category#DISPLAY DISPLAY} locale.  Returns
      * the empty string if this locale doesn't specify a script code.
--- a/src/java.base/share/classes/java/util/ResourceBundle.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/util/ResourceBundle.java	Tue Dec 16 09:58:02 2014 -0800
@@ -994,7 +994,7 @@
      * bundle is found, the default control's {@link Control#getFallbackLocale
      * getFallbackLocale} method is called, which returns the current default
      * locale.  A new sequence of candidate locale names is generated using this
-     * locale and and searched again, as above.
+     * locale and searched again, as above.
      *
      * <p>If still no result bundle is found, the base name alone is looked up. If
      * this still fails, a <code>MissingResourceException</code> is thrown.
--- a/src/java.base/share/classes/java/util/Spliterator.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/util/Spliterator.java	Tue Dec 16 09:58:02 2014 -0800
@@ -84,7 +84,7 @@
  * via the {@link #estimateSize} method.  Ideally, as reflected in characteristic
  * {@link #SIZED}, this value corresponds exactly to the number of elements
  * that would be encountered in a successful traversal.  However, even when not
- * exactly known, an estimated value value may still be useful to operations
+ * exactly known, an estimated value may still be useful to operations
  * being performed on the source, such as helping to determine whether it is
  * preferable to split further or traverse the remaining elements sequentially.
  *
--- a/src/java.base/share/classes/java/util/Spliterators.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/util/Spliterators.java	Tue Dec 16 09:58:02 2014 -0800
@@ -132,7 +132,7 @@
      * @param array The array, assumed to be unmodified during use
      * @param additionalCharacteristics Additional spliterator characteristics
      *        of this spliterator's source or elements beyond {@code SIZED} and
-     *        {@code SUBSIZED} which are are always reported
+     *        {@code SUBSIZED} which are always reported
      * @return A spliterator for an array
      * @throws NullPointerException if the given array is {@code null}
      * @see Arrays#spliterator(Object[])
@@ -164,7 +164,7 @@
      * @param toIndex One past the greatest index to cover
      * @param additionalCharacteristics Additional spliterator characteristics
      *        of this spliterator's source or elements beyond {@code SIZED} and
-     *        {@code SUBSIZED} which are are always reported
+     *        {@code SUBSIZED} which are always reported
      * @return A spliterator for an array
      * @throws NullPointerException if the given array is {@code null}
      * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
@@ -196,7 +196,7 @@
      * @param array The array, assumed to be unmodified during use
      * @param additionalCharacteristics Additional spliterator characteristics
      *        of this spliterator's source or elements beyond {@code SIZED} and
-     *        {@code SUBSIZED} which are are always reported
+     *        {@code SUBSIZED} which are always reported
      * @return A spliterator for an array
      * @throws NullPointerException if the given array is {@code null}
      * @see Arrays#spliterator(int[])
@@ -226,7 +226,7 @@
      * @param toIndex One past the greatest index to cover
      * @param additionalCharacteristics Additional spliterator characteristics
      *        of this spliterator's source or elements beyond {@code SIZED} and
-     *        {@code SUBSIZED} which are are always reported
+     *        {@code SUBSIZED} which are always reported
      * @return A spliterator for an array
      * @throws NullPointerException if the given array is {@code null}
      * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
@@ -258,7 +258,7 @@
      * @param array The array, assumed to be unmodified during use
      * @param additionalCharacteristics Additional spliterator characteristics
      *        of this spliterator's source or elements beyond {@code SIZED} and
-     *        {@code SUBSIZED} which are are always reported
+     *        {@code SUBSIZED} which are always reported
      * @return A spliterator for an array
      * @throws NullPointerException if the given array is {@code null}
      * @see Arrays#spliterator(long[])
@@ -282,7 +282,7 @@
      * {@code SIZED} and {@code SUBSIZED}.  The caller may provide additional
      * characteristics for the spliterator to report.  (For example, if it is
      * known the array will not be further modified, specify {@code IMMUTABLE};
-     * if the array data is considered to have an an encounter order, specify
+     * if the array data is considered to have an encounter order, specify
      * {@code ORDERED}).  The method {@link Arrays#spliterator(long[], int, int)} can
      * often be used instead, which returns a spliterator that reports
      * {@code SIZED}, {@code SUBSIZED}, {@code IMMUTABLE}, and {@code ORDERED}.
@@ -292,7 +292,7 @@
      * @param toIndex One past the greatest index to cover
      * @param additionalCharacteristics Additional spliterator characteristics
      *        of this spliterator's source or elements beyond {@code SIZED} and
-     *        {@code SUBSIZED} which are are always reported
+     *        {@code SUBSIZED} which are always reported
      * @return A spliterator for an array
      * @throws NullPointerException if the given array is {@code null}
      * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
@@ -324,7 +324,7 @@
      * @param array The array, assumed to be unmodified during use
      * @param additionalCharacteristics Additional spliterator characteristics
      *        of this spliterator's source or elements beyond {@code SIZED} and
-     *        {@code SUBSIZED} which are are always reported
+     *        {@code SUBSIZED} which are always reported
      * @return A spliterator for an array
      * @throws NullPointerException if the given array is {@code null}
      * @see Arrays#spliterator(double[])
@@ -348,7 +348,7 @@
      * {@code SIZED} and {@code SUBSIZED}.  The caller may provide additional
      * characteristics for the spliterator to report.  (For example, if it is
      * known the array will not be further modified, specify {@code IMMUTABLE};
-     * if the array data is considered to have an an encounter order, specify
+     * if the array data is considered to have an encounter order, specify
      * {@code ORDERED}).  The method {@link Arrays#spliterator(long[], int, int)} can
      * often be used instead, which returns a spliterator that reports
      * {@code SIZED}, {@code SUBSIZED}, {@code IMMUTABLE}, and {@code ORDERED}.
@@ -358,7 +358,7 @@
      * @param toIndex One past the greatest index to cover
      * @param additionalCharacteristics Additional spliterator characteristics
      *        of this spliterator's source or elements beyond {@code SIZED} and
-     *        {@code SUBSIZED} which are are always reported
+     *        {@code SUBSIZED} which are always reported
      * @return A spliterator for an array
      * @throws NullPointerException if the given array is {@code null}
      * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
@@ -907,7 +907,7 @@
          * @param array the array, assumed to be unmodified during use
          * @param additionalCharacteristics Additional spliterator characteristics
          * of this spliterator's source or elements beyond {@code SIZED} and
-         * {@code SUBSIZED} which are are always reported
+         * {@code SUBSIZED} which are always reported
          */
         public ArraySpliterator(Object[] array, int additionalCharacteristics) {
             this(array, 0, array.length, additionalCharacteristics);
@@ -920,7 +920,7 @@
          * @param fence one past the greatest index to cover
          * @param additionalCharacteristics Additional spliterator characteristics
          * of this spliterator's source or elements beyond {@code SIZED} and
-         * {@code SUBSIZED} which are are always reported
+         * {@code SUBSIZED} which are always reported
          */
         public ArraySpliterator(Object[] array, int origin, int fence, int additionalCharacteristics) {
             this.array = array;
@@ -992,7 +992,7 @@
          * @param array the array, assumed to be unmodified during use
          * @param additionalCharacteristics Additional spliterator characteristics
          *        of this spliterator's source or elements beyond {@code SIZED} and
-         *        {@code SUBSIZED} which are are always reported
+         *        {@code SUBSIZED} which are always reported
          */
         public IntArraySpliterator(int[] array, int additionalCharacteristics) {
             this(array, 0, array.length, additionalCharacteristics);
@@ -1005,7 +1005,7 @@
          * @param fence one past the greatest index to cover
          * @param additionalCharacteristics Additional spliterator characteristics
          *        of this spliterator's source or elements beyond {@code SIZED} and
-         *        {@code SUBSIZED} which are are always reported
+         *        {@code SUBSIZED} which are always reported
          */
         public IntArraySpliterator(int[] array, int origin, int fence, int additionalCharacteristics) {
             this.array = array;
@@ -1075,7 +1075,7 @@
          * @param array the array, assumed to be unmodified during use
          * @param additionalCharacteristics Additional spliterator characteristics
          *        of this spliterator's source or elements beyond {@code SIZED} and
-         *        {@code SUBSIZED} which are are always reported
+         *        {@code SUBSIZED} which are always reported
          */
         public LongArraySpliterator(long[] array, int additionalCharacteristics) {
             this(array, 0, array.length, additionalCharacteristics);
@@ -1088,7 +1088,7 @@
          * @param fence one past the greatest index to cover
          * @param additionalCharacteristics Additional spliterator characteristics
          *        of this spliterator's source or elements beyond {@code SIZED} and
-         *        {@code SUBSIZED} which are are always reported
+         *        {@code SUBSIZED} which are always reported
          */
         public LongArraySpliterator(long[] array, int origin, int fence, int additionalCharacteristics) {
             this.array = array;
@@ -1158,7 +1158,7 @@
          * @param array the array, assumed to be unmodified during use
          * @param additionalCharacteristics Additional spliterator characteristics
          *        of this spliterator's source or elements beyond {@code SIZED} and
-         *        {@code SUBSIZED} which are are always reported
+         *        {@code SUBSIZED} which are always reported
          */
         public DoubleArraySpliterator(double[] array, int additionalCharacteristics) {
             this(array, 0, array.length, additionalCharacteristics);
@@ -1171,7 +1171,7 @@
          * @param fence one past the greatest index to cover
          * @param additionalCharacteristics Additional spliterator characteristics
          *        of this spliterator's source or elements beyond {@code SIZED} and
-         *        {@code SUBSIZED} which are are always reported
+         *        {@code SUBSIZED} which are always reported
          */
         public DoubleArraySpliterator(double[] array, int origin, int fence, int additionalCharacteristics) {
             this.array = array;
@@ -1698,7 +1698,7 @@
         private int batch;            // batch size for splits
 
         /**
-         * Creates a spliterator using the given given
+         * Creates a spliterator using the given
          * collection's {@link java.util.Collection#iterator()) for traversal,
          * and reporting its {@link java.util.Collection#size()) as its initial
          * size.
--- a/src/java.base/share/classes/java/util/zip/CRC32C.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/java/util/zip/CRC32C.java	Tue Dec 16 09:58:02 2014 -0800
@@ -204,7 +204,6 @@
     /**
      * Updates the CRC-32C checksum with the specified array of bytes.
      */
-    @SuppressWarnings("deprecation") // Unsafe.{getInt, getLong}
     private static int updateBytes(int crc, byte[] b, int off, int end) {
 
         // Do only byte reads for arrays so short they can't be aligned
@@ -228,11 +227,11 @@
                 int secondHalf;
                 if (Unsafe.ADDRESS_SIZE == 4) {
                     // On 32 bit platforms read two ints instead of a single 64bit long
-                    firstHalf = UNSAFE.getInt(b, Unsafe.ARRAY_BYTE_BASE_OFFSET + off);
-                    secondHalf = UNSAFE.getInt(b, Unsafe.ARRAY_BYTE_BASE_OFFSET + off
+                    firstHalf = UNSAFE.getInt(b, (long)Unsafe.ARRAY_BYTE_BASE_OFFSET + off);
+                    secondHalf = UNSAFE.getInt(b, (long)Unsafe.ARRAY_BYTE_BASE_OFFSET + off
                                                + Integer.BYTES);
                 } else {
-                    long value = UNSAFE.getLong(b, Unsafe.ARRAY_BYTE_BASE_OFFSET + off);
+                    long value = UNSAFE.getLong(b, (long)Unsafe.ARRAY_BYTE_BASE_OFFSET + off);
                     if (ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN) {
                         firstHalf = (int) value;
                         secondHalf = (int) (value >>> 32);
--- a/src/java.base/share/classes/javax/security/auth/Policy.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/javax/security/auth/Policy.java	Tue Dec 16 09:58:02 2014 -0800
@@ -76,7 +76,7 @@
  * </pre>
  *
  * The CodeBase and Signedby components of the triplet name/value pairs
- * are optional.  If they are not present, then any any codebase will match,
+ * are optional.  If they are not present, then any codebase will match,
  * and any signer (including unsigned code) will match.
  * For Example,
  *
--- a/src/java.base/share/classes/javax/security/auth/SubjectDomainCombiner.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/javax/security/auth/SubjectDomainCombiner.java	Tue Dec 16 09:58:02 2014 -0800
@@ -137,7 +137,7 @@
      * @param currentDomains the ProtectionDomains associated with the
      *          current execution Thread, up to the most recent
      *          privileged {@code ProtectionDomain}.
-     *          The ProtectionDomains are are listed in order of execution,
+     *          The ProtectionDomains are listed in order of execution,
      *          with the most recently executing {@code ProtectionDomain}
      *          residing at the beginning of the array. This parameter may
      *          be {@code null} if the current execution Thread
--- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Frame.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Frame.java	Tue Dec 16 09:58:02 2014 -0800
@@ -192,7 +192,7 @@
     private static final int LOCAL = 0x2000000;
 
     /**
-     * Kind of the the types that are relative to the stack of an input stack
+     * Kind of the types that are relative to the stack of an input stack
      * map frame. The value of such types is a position relatively to the top of
      * this stack.
      */
--- a/src/java.base/share/classes/jdk/internal/util/xml/XMLStreamWriter.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/jdk/internal/util/xml/XMLStreamWriter.java	Tue Dec 16 09:58:02 2014 -0800
@@ -116,7 +116,7 @@
     public void writeStartDocument() throws XMLStreamException;
 
     /**
-     * Write the XML Declaration. Defaults the the encoding to utf-8
+     * Write the XML Declaration. Defaults the encoding to utf-8
      * @param version version of the xml document
      * @throws XMLStreamException
      */
--- a/src/java.base/share/classes/sun/invoke/util/VerifyAccess.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/invoke/util/VerifyAccess.java	Tue Dec 16 09:58:02 2014 -0800
@@ -80,7 +80,7 @@
      * @param defc the class in which the proposed member is actually defined
      * @param mods modifier flags for the proposed member
      * @param lookupClass the class for which the access check is being made
-     * @return true iff the the accessing class can access such a member
+     * @return true iff the accessing class can access such a member
      */
     public static boolean isMemberAccessible(Class<?> refc,  // symbolic ref class
                                              Class<?> defc,  // actual def class
--- a/src/java.base/share/classes/sun/launcher/LauncherHelper.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/launcher/LauncherHelper.java	Tue Dec 16 09:58:02 2014 -0800
@@ -369,10 +369,9 @@
     static void appendVmErgoMessage(boolean isServerClass, String vm) {
         outBuf = outBuf.append(getLocalizedMessage("java.launcher.ergo.message1",
                 vm));
-        outBuf = (isServerClass)
-             ? outBuf.append(",\n" +
-                getLocalizedMessage("java.launcher.ergo.message2") + "\n\n")
-             : outBuf.append(".\n\n");
+        outBuf = (isServerClass) ? outBuf.append(",\n")
+                .append(getLocalizedMessage("java.launcher.ergo.message2"))
+                .append("\n\n") : outBuf.append(".\n\n");
     }
 
     /**
--- a/src/java.base/share/classes/sun/misc/JavaNioAccess.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/misc/JavaNioAccess.java	Tue Dec 16 09:58:02 2014 -0800
@@ -42,7 +42,7 @@
 
     /**
      * Constructs a direct ByteBuffer referring to the block of memory starting
-     * at the given memory address and and extending {@code cap} bytes.
+     * at the given memory address and extending {@code cap} bytes.
      * The {@code ob} parameter is an arbitrary object that is attached
      * to the resulting buffer.
      */
--- a/src/java.base/share/classes/sun/misc/Unsafe.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/misc/Unsafe.java	Tue Dec 16 09:58:02 2014 -0800
@@ -958,6 +958,8 @@
      * other threads. This method is generally only useful if the
      * underlying field is a Java volatile (or if an array cell, one
      * that is otherwise only accessed using volatile accesses).
+     *
+     * Corresponds to C11 atomic_store_explicit(..., memory_order_release).
      */
     public native void    putOrderedObject(Object o, long offset, Object x);
 
@@ -1111,22 +1113,40 @@
 
 
     /**
-     * Ensures lack of reordering of loads before the fence
-     * with loads or stores after the fence.
+     * Ensures that loads before the fence will not be reordered with loads and
+     * stores after the fence; a "LoadLoad plus LoadStore barrier".
+     *
+     * Corresponds to C11 atomic_thread_fence(memory_order_acquire)
+     * (an "acquire fence").
+     *
+     * A pure LoadLoad fence is not provided, since the addition of LoadStore
+     * is almost always desired, and most current hardware instructions that
+     * provide a LoadLoad barrier also provide a LoadStore barrier for free.
      * @since 1.8
      */
     public native void loadFence();
 
     /**
-     * Ensures lack of reordering of stores before the fence
-     * with loads or stores after the fence.
+     * Ensures that loads and stores before the fence will not be reordered with
+     * stores after the fence; a "StoreStore plus LoadStore barrier".
+     *
+     * Corresponds to C11 atomic_thread_fence(memory_order_release)
+     * (a "release fence").
+     *
+     * A pure StoreStore fence is not provided, since the addition of LoadStore
+     * is almost always desired, and most current hardware instructions that
+     * provide a StoreStore barrier also provide a LoadStore barrier for free.
      * @since 1.8
      */
     public native void storeFence();
 
     /**
-     * Ensures lack of reordering of loads or stores before the fence
-     * with loads or stores after the fence.
+     * Ensures that loads and stores before the fence will not be reordered
+     * with loads and stores after the fence.  Implies the effects of both
+     * loadFence() and storeFence(), and in addition, the effect of a StoreLoad
+     * barrier.
+     *
+     * Corresponds to C11 atomic_thread_fence(memory_order_seq_cst).
      * @since 1.8
      */
     public native void fullFence();
--- a/src/java.base/share/classes/sun/misc/VM.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/misc/VM.java	Tue Dec 16 09:58:02 2014 -0800
@@ -150,7 +150,7 @@
     private static volatile boolean booted = false;
     private static final Object lock = new Object();
 
-    // Invoked by by System.initializeSystemClass just before returning.
+    // Invoked by System.initializeSystemClass just before returning.
     // Subsystems that are invoked during initialization can check this
     // property in order to avoid doing things that should wait until the
     // application class loader has been set up.
--- a/src/java.base/share/classes/sun/net/ftp/impl/FtpClient.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/net/ftp/impl/FtpClient.java	Tue Dec 16 09:58:02 2014 -0800
@@ -2187,7 +2187,7 @@
             return resp.get(0).substring(4);
         }
         // on multiple lines answers, like the ones above, remove 1st and last
-        // line, concat the the others.
+        // line, concat the others.
         StringBuilder sb = new StringBuilder();
         for (int i = 1; i < resp.size() - 1; i++) {
             sb.append(resp.get(i).substring(3));
--- a/src/java.base/share/classes/sun/net/www/HeaderParser.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/net/www/HeaderParser.java	Tue Dec 16 09:58:02 2014 -0800
@@ -220,21 +220,23 @@
 
     public String toString () {
         Iterator<String> k = keys();
-        StringBuffer sbuf = new StringBuffer();
-        sbuf.append ("{size="+asize+" nkeys="+nkeys+" ");
+        StringBuilder sb = new StringBuilder();
+        sb.append("{size=").append(asize).append(" nkeys=").append(nkeys)
+                .append(' ');
         for (int i=0; k.hasNext(); i++) {
             String key = k.next();
             String val = findValue (i);
             if (val != null && "".equals (val)) {
                 val = null;
             }
-            sbuf.append (" {"+key+(val==null?"":","+val)+"}");
+            sb.append(" {").append(key).append(val == null ? "" : "," + val)
+                    .append('}');
             if (k.hasNext()) {
-                sbuf.append (",");
+                sb.append (',');
             }
         }
-        sbuf.append (" }");
-        return new String (sbuf);
+        sb.append (" }");
+        return sb.toString();
     }
 
     public int findInt(String k, int Default) {
--- a/src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java	Tue Dec 16 09:58:02 2014 -0800
@@ -110,6 +110,9 @@
     // -- Standard channel operations --
 
     protected void implCloseChannel() throws IOException {
+        if (!fd.valid())
+            return; // nothing to do
+
         // Release and invalidate any locks that we still hold
         if (fileLockTable != null) {
             for (FileLock fl: fileLockTable.removeAll()) {
--- a/src/java.base/share/classes/sun/reflect/Label.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/Label.java	Tue Dec 16 09:58:02 2014 -0800
@@ -52,7 +52,7 @@
         final short patchBCI;
         final int   stackDepth;
     }
-    private List<PatchInfo> patches = new ArrayList<>();
+    private final List<PatchInfo> patches = new ArrayList<>();
 
     public Label() {
     }
--- a/src/java.base/share/classes/sun/reflect/ReflectionFactory.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/ReflectionFactory.java	Tue Dec 16 09:58:02 2014 -0800
@@ -135,7 +135,7 @@
      * be initialized and therefore must not be called until the
      * first get/set of this field.
      * @param field the field
-     * @param override true if caller has overridden aaccessibility
+     * @param override true if caller has overridden accessibility
      */
     public FieldAccessor newFieldAccessor(Field field, boolean override) {
         checkInitted();
--- a/src/java.base/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java	Tue Dec 16 09:58:02 2014 -0800
@@ -280,19 +280,25 @@
      * be rare).
      */
     private Method[] getMemberMethods() {
-        if (memberMethods == null) {
-            memberMethods = AccessController.doPrivileged(
-                new PrivilegedAction<Method[]>() {
-                    public Method[] run() {
-                        final Method[] mm = type.getDeclaredMethods();
-                        validateAnnotationMethods(mm);
-                        AccessibleObject.setAccessible(mm, true);
-                        return mm;
-                    }
-                });
+        Method[] value = memberMethods;
+        if (value == null) {
+            value = computeMemberMethods();
+            memberMethods = value;
         }
-        return memberMethods;
+        return value;
     }
+
+    private Method[] computeMemberMethods() {
+        return AccessController.doPrivileged(
+            new PrivilegedAction<Method[]>() {
+                public Method[] run() {
+                    final Method[] methods = type.getDeclaredMethods();
+                    validateAnnotationMethods(methods);
+                    AccessibleObject.setAccessible(methods, true);
+                    return methods;
+                }});
+    }
+
     private transient volatile Method[] memberMethods = null;
 
     /**
--- a/src/java.base/share/classes/sun/reflect/annotation/AnnotationParser.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/annotation/AnnotationParser.java	Tue Dec 16 09:58:02 2014 -0800
@@ -772,7 +772,7 @@
     }
 
     /**
-     * Return an appropriate exception proxy for a mismatching array
+     * Returns an appropriate exception proxy for a mismatching array
      * annotation where the erroneous array has the specified tag.
      */
     private static ExceptionProxy exceptionProxy(int tag) {
--- a/src/java.base/share/classes/sun/reflect/annotation/AnnotationSupport.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/annotation/AnnotationSupport.java	Tue Dec 16 09:58:02 2014 -0800
@@ -115,7 +115,7 @@
 
 
     /**
-     * Figures out if conatiner class comes before containee class among the
+     * Figures out if container class comes before containee class among the
      * keys of the given map.
      *
      * @return true if container class is found before containee class when
--- a/src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java	Tue Dec 16 09:58:02 2014 -0800
@@ -55,7 +55,7 @@
     private final Map<String, Object> memberDefaults;
 
     /**
-     * Member name -> Method object mapping. This (and its assoicated
+     * Member name -> Method object mapping. This (and its associated
      * accessor) are used only to generate AnnotationTypeMismatchExceptions.
      */
     private final Map<String, Method> members;
@@ -117,7 +117,7 @@
         memberDefaults = new HashMap<String, Object>(0);
         members = new HashMap<String, Method>(methods.length+1, 1.0f);
 
-        for (Method method :  methods) {
+        for (Method method : methods) {
             if (method.getParameterTypes().length != 0)
                 throw new IllegalArgumentException(method + " has params");
             String name = method.getName();
@@ -213,7 +213,7 @@
     }
 
     /**
-     * Returns true if this this annotation type is inherited.
+     * Returns true if this annotation type is inherited.
      */
     public boolean isInherited() {
         return inherited;
--- a/src/java.base/share/classes/sun/reflect/annotation/AnnotationTypeMismatchExceptionProxy.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/annotation/AnnotationTypeMismatchExceptionProxy.java	Tue Dec 16 09:58:02 2014 -0800
@@ -36,7 +36,7 @@
 class AnnotationTypeMismatchExceptionProxy extends ExceptionProxy {
     private static final long serialVersionUID = 7844069490309503934L;
     private Method member;
-    private String foundType;
+    private final String foundType;
 
     /**
      * It turns out to be convenient to construct these proxies in
--- a/src/java.base/share/classes/sun/reflect/annotation/EnumConstantNotPresentExceptionProxy.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/annotation/EnumConstantNotPresentExceptionProxy.java	Tue Dec 16 09:58:02 2014 -0800
@@ -33,8 +33,8 @@
  */
 public class EnumConstantNotPresentExceptionProxy extends ExceptionProxy {
     private static final long serialVersionUID = -604662101303187330L;
-    Class<? extends Enum<?>> enumType;
-    String constName;
+    final Class<? extends Enum<?>> enumType;
+    final String constName;
 
     public EnumConstantNotPresentExceptionProxy(Class<? extends Enum<?>> enumType,
                                                 String constName) {
--- a/src/java.base/share/classes/sun/reflect/annotation/TypeNotPresentExceptionProxy.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/annotation/TypeNotPresentExceptionProxy.java	Tue Dec 16 09:58:02 2014 -0800
@@ -34,8 +34,8 @@
  */
 public class TypeNotPresentExceptionProxy extends ExceptionProxy {
     private static final long serialVersionUID = 5565925172427947573L;
-    String typeName;
-    Throwable cause;
+    final String typeName;
+    final Throwable cause;
 
     public TypeNotPresentExceptionProxy(String typeName, Throwable cause) {
         this.typeName = typeName;
--- a/src/java.base/share/classes/sun/reflect/generics/factory/CoreReflectionFactory.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/generics/factory/CoreReflectionFactory.java	Tue Dec 16 09:58:02 2014 -0800
@@ -76,11 +76,11 @@
      * kind. Classes produced will be those that would be loaded by the
      * defining class loader of the declaration <tt>d</tt> (if <tt>d</tt>
      * is a type declaration, or by the defining loader of the declaring
-     * class of <tt>d</tt>  otherwise.
+     * class of <tt>d</tt> otherwise.
      * <p> Type variables will be created or lookup as necessary in the
      * scope <tt> s</tt>.
      * @param d - the generic declaration (class, interface, method or
-     * constructor) that thsi factory services
+     * constructor) that this factory services
      * @param s  the scope in which the factory will allocate and search for
      * type variables
      * @return an instance of <tt>CoreReflectionFactory</tt>
--- a/src/java.base/share/classes/sun/reflect/generics/factory/GenericsFactory.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/generics/factory/GenericsFactory.java	Tue Dec 16 09:58:02 2014 -0800
@@ -42,7 +42,7 @@
  * of a specific implementation by using this interface. For example,
  * repositories of generic type information are initialized with a
  * factory conforming to this interface, and use it to generate the
- * tpe information they are required to provide. As a result, such
+ * type information they are required to provide. As a result, such
  * repository code can be shared across different reflective systems.
  */
 public interface GenericsFactory {
@@ -60,7 +60,7 @@
     TypeVariable<?> makeTypeVariable(String name,
                                      FieldTypeSignature[] bounds);
     /**
-     * Return an instance of the <tt>ParameterizedType</tt> interface
+     * Returns an instance of the <tt>ParameterizedType</tt> interface
      * that corresponds to a generic type instantiation of the
      * generic declaration <tt>declaration</tt> with actual type arguments
      * <tt>typeArgs</tt>.
@@ -123,7 +123,7 @@
     /**
      * Returns a (possibly generic) array type.
      * If the component type is a parameterized type, it must
-     * only have unbounded wildcard arguemnts, otherwise
+     * only have unbounded wildcard arguments, otherwise
      * a MalformedParameterizedTypeException is thrown.
      * @param componentType - the component type of the array
      * @return a (possibly generic) array type.
--- a/src/java.base/share/classes/sun/reflect/generics/parser/SignatureParser.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/generics/parser/SignatureParser.java	Tue Dec 16 09:58:02 2014 -0800
@@ -227,7 +227,7 @@
      *     "<" FormalTypeParameter+ ">"
      */
     private FormalTypeParameter[] parseFormalTypeParameters(){
-        List<FormalTypeParameter> ftps =  new ArrayList<>(3);
+        List<FormalTypeParameter> ftps = new ArrayList<>(3);
         assert(current() == '<'); // should not have been called at all
         if (current() != '<') { throw error("expected '<'");}
         advance();
--- a/src/java.base/share/classes/sun/reflect/generics/reflectiveObjects/GenericArrayTypeImpl.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/generics/reflectiveObjects/GenericArrayTypeImpl.java	Tue Dec 16 09:58:02 2014 -0800
@@ -53,10 +53,10 @@
 
 
     /**
-     * Returns  a <tt>Type</tt> object representing the component type
+     * Returns a <tt>Type</tt> object representing the component type
      * of this array.
      *
-     * @return  a <tt>Type</tt> object representing the component type
+     * @return a <tt>Type</tt> object representing the component type
      *     of this array
      * @since 1.5
      */
--- a/src/java.base/share/classes/sun/reflect/generics/reflectiveObjects/LazyReflectiveObjectGenerator.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/generics/reflectiveObjects/LazyReflectiveObjectGenerator.java	Tue Dec 16 09:58:02 2014 -0800
@@ -25,7 +25,9 @@
 
 package sun.reflect.generics.reflectiveObjects;
 
+import java.lang.reflect.Type;
 import sun.reflect.generics.factory.GenericsFactory;
+import sun.reflect.generics.tree.FieldTypeSignature;
 import sun.reflect.generics.visitor.Reifier;
 
 
@@ -54,4 +56,16 @@
     // produce a reifying visitor (could this be typed as a TypeTreeVisitor?
     protected Reifier getReifier(){return Reifier.make(getFactory());}
 
+    Type[] reifyBounds(FieldTypeSignature[] boundASTs) {
+        final int length = boundASTs.length;
+        final Type[] bounds = new Type[length];
+        // iterate over bound trees, reifying each in turn
+        for (int i = 0; i < length; i++) {
+            Reifier r = getReifier();
+            boundASTs[i].accept(r);
+            bounds[i] = r.getResult();
+        }
+        return bounds;
+    }
+
 }
--- a/src/java.base/share/classes/sun/reflect/generics/reflectiveObjects/TypeVariableImpl.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/generics/reflectiveObjects/TypeVariableImpl.java	Tue Dec 16 09:58:02 2014 -0800
@@ -51,17 +51,16 @@
  */
 public class TypeVariableImpl<D extends GenericDeclaration>
     extends LazyReflectiveObjectGenerator implements TypeVariable<D> {
-    D genericDeclaration;
-    private String name;
-    // upper bounds - evaluated lazily
-    private Type[] bounds;
+    private final D genericDeclaration;
+    private final String name;
 
-    // The ASTs for the bounds. We are required to evaluate the bounds
-    // lazily, so we store these at least until we are first asked
-    // for the bounds. This also neatly solves the
-    // problem with F-bounds - you can't reify them before the formal
-    // is defined.
-    private FieldTypeSignature[] boundASTs;
+    /**
+     * The upper bounds.  Lazily converted from FieldTypeSignature[] to Type[].
+     * We are required to evaluate the bounds lazily, so we store them as ASTs
+     * until we are first asked for them.  This also neatly solves the problem
+     * with F-bounds - you can't reify them before the formal is defined.
+     */
+    private volatile Object[] bounds;
 
     // constructor is private to enforce access through static factory
     private TypeVariableImpl(D decl, String n, FieldTypeSignature[] bs,
@@ -69,18 +68,7 @@
         super(f);
         genericDeclaration = decl;
         name = n;
-        boundASTs = bs;
-    }
-
-    // Accessors
-
-    // accessor for ASTs for bounds. Must not be called after
-    // bounds have been evaluated, because we might throw the ASTs
-    // away (but that is not thread-safe, is it?)
-    private FieldTypeSignature[] getBoundASTs() {
-        // check that bounds were not evaluated yet
-        assert(bounds == null);
-        return boundASTs;
+        bounds = bs;
     }
 
     /**
@@ -123,7 +111,7 @@
      *  <li>Otherwise, B is resolved.
      * </ul>
      *
-     * @throws <tt>TypeNotPresentException</tt>  if any of the
+     * @throws <tt>TypeNotPresentException</tt> if any of the
      *     bounds refers to a non-existent type declaration
      * @throws <tt>MalformedParameterizedTypeException</tt> if any of the
      *     bounds refer to a parameterized type that cannot be instantiated
@@ -132,34 +120,23 @@
      *     type variable
     */
     public Type[] getBounds() {
-        // lazily initialize bounds if necessary
-        if (bounds == null) {
-            FieldTypeSignature[] fts = getBoundASTs(); // get AST
-            // allocate result array; note that
-            // keeping ts and bounds separate helps with threads
-            Type[] ts = new Type[fts.length];
-            // iterate over bound trees, reifying each in turn
-            for ( int j = 0; j  < fts.length; j++) {
-                Reifier r = getReifier();
-                fts[j].accept(r);
-                ts[j] = r.getResult();
-            }
-            // cache result
-            bounds = ts;
-            // could throw away bound ASTs here; thread safety?
+        Object[] value = bounds;
+        if (value instanceof FieldTypeSignature[]) {
+            value = reifyBounds((FieldTypeSignature[])value);
+            bounds = value;
         }
-        return bounds.clone(); // return cached bounds
+        return (Type[])value.clone();
     }
 
     /**
-     * Returns the <tt>GenericDeclaration</tt>  object representing the
+     * Returns the <tt>GenericDeclaration</tt> object representing the
      * generic declaration that declared this type variable.
      *
      * @return the generic declaration that declared this type variable.
      *
      * @since 1.5
      */
-    public D getGenericDeclaration(){
+    public D getGenericDeclaration() {
         if (genericDeclaration instanceof Class)
             ReflectUtil.checkPackageAccess((Class)genericDeclaration);
         else if ((genericDeclaration instanceof Method) ||
--- a/src/java.base/share/classes/sun/reflect/generics/reflectiveObjects/WildcardTypeImpl.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/generics/reflectiveObjects/WildcardTypeImpl.java	Tue Dec 16 09:58:02 2014 -0800
@@ -39,25 +39,26 @@
  */
 public class WildcardTypeImpl extends LazyReflectiveObjectGenerator
     implements WildcardType {
-    // upper bounds - evaluated lazily
-    private Type[] upperBounds;
-    // lower bounds - evaluated lazily
-    private Type[] lowerBounds;
-    // The ASTs for the bounds. We are required to evaluate the bounds
-    // lazily, so we store these at least until we are first asked
-    // for the bounds. This also neatly solves the
-    // problem with F-bounds - you can't reify them before the formal
-    // is defined.
-    private FieldTypeSignature[] upperBoundASTs;
-    private FieldTypeSignature[] lowerBoundASTs;
+
+    /*
+     * We are required to evaluate the bounds lazily, so we store them as ASTs
+     * until we are first asked for them.  This also neatly solves the problem
+     * with F-bounds - you can't reify them before the formal is defined.
+     */
+
+    /** The upper bounds.  Lazily converted from FieldTypeSignature[] to Type[]. */
+    private volatile Object[] upperBounds;
+
+    /** The lower bounds.  Lazily converted from FieldTypeSignature[] to Type[]. */
+    private volatile Object[] lowerBounds;
 
     // constructor is private to enforce access through static factory
     private WildcardTypeImpl(FieldTypeSignature[] ubs,
                              FieldTypeSignature[] lbs,
                              GenericsFactory f) {
         super(f);
-        upperBoundASTs = ubs;
-        lowerBoundASTs = lbs;
+        upperBounds = ubs;
+        lowerBounds = lbs;
     }
 
     /**
@@ -76,27 +77,8 @@
         return new WildcardTypeImpl(ubs, lbs, f);
     }
 
-    // Accessors
-
-    // accessor for ASTs for upper bounds. Must not be called after upper
-    // bounds have been evaluated, because we might throw the ASTs
-    // away (but that is not thread-safe, is it?)
-    private FieldTypeSignature[] getUpperBoundASTs() {
-        // check that upper bounds were not evaluated yet
-        assert(upperBounds == null);
-        return upperBoundASTs;
-    }
-    // accessor for ASTs for lower bounds. Must not be called after lower
-    // bounds have been evaluated, because we might throw the ASTs
-    // away (but that is not thread-safe, is it?)
-    private FieldTypeSignature[] getLowerBoundASTs() {
-        // check that lower bounds were not evaluated yet
-        assert(lowerBounds == null);
-        return lowerBoundASTs;
-    }
-
     /**
-     * Returns an array of <tt>Type</tt> objects representing the  upper
+     * Returns an array of <tt>Type</tt> objects representing the upper
      * bound(s) of this type variable.  Note that if no upper bound is
      * explicitly declared, the upper bound is <tt>Object</tt>.
      *
@@ -117,24 +99,12 @@
      *     for any reason
      */
     public Type[] getUpperBounds() {
-        // lazily initialize bounds if necessary
-        if (upperBounds == null) {
-            FieldTypeSignature[] fts = getUpperBoundASTs(); // get AST
-
-            // allocate result array; note that
-            // keeping ts and bounds separate helps with threads
-            Type[] ts = new Type[fts.length];
-            // iterate over bound trees, reifying each in turn
-            for ( int j = 0; j  < fts.length; j++) {
-                Reifier r = getReifier();
-                fts[j].accept(r);
-                ts[j] = r.getResult();
-            }
-            // cache result
-            upperBounds = ts;
-            // could throw away upper bound ASTs here; thread safety?
+        Object[] value = upperBounds;
+        if (value instanceof FieldTypeSignature[]) {
+            value = reifyBounds((FieldTypeSignature[])value);
+            upperBounds = value;
         }
-        return upperBounds.clone(); // return cached bounds
+        return (Type[])value.clone();
     }
 
     /**
@@ -160,23 +130,12 @@
      *     for any reason
      */
     public Type[] getLowerBounds() {
-        // lazily initialize bounds if necessary
-        if (lowerBounds == null) {
-            FieldTypeSignature[] fts = getLowerBoundASTs(); // get AST
-            // allocate result array; note that
-            // keeping ts and bounds separate helps with threads
-            Type[] ts = new Type[fts.length];
-            // iterate over bound trees, reifying each in turn
-            for ( int j = 0; j  < fts.length; j++) {
-                Reifier r = getReifier();
-                fts[j].accept(r);
-                ts[j] = r.getResult();
-            }
-            // cache result
-            lowerBounds = ts;
-            // could throw away lower bound ASTs here; thread safety?
+        Object[] value = lowerBounds;
+        if (value instanceof FieldTypeSignature[]) {
+            value = reifyBounds((FieldTypeSignature[])value);
+            lowerBounds = value;
         }
-        return lowerBounds.clone(); // return cached bounds
+        return (Type[])value.clone();
     }
 
     public String toString() {
--- a/src/java.base/share/classes/sun/reflect/generics/repository/AbstractRepository.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/generics/repository/AbstractRepository.java	Tue Dec 16 09:58:02 2014 -0800
@@ -56,7 +56,7 @@
     /**
      * Returns a <tt>Reifier</tt> used to convert parts of the
      * AST into reflective objects.
-     * @return  a <tt>Reifier</tt> used to convert parts of the
+     * @return a <tt>Reifier</tt> used to convert parts of the
      * AST into reflective objects
      */
     protected Reifier getReifier(){return Reifier.make(getFactory());}
@@ -76,7 +76,7 @@
     }
 
     /**
-     * Returns the AST for the genric type info of this entity.
+     * Returns the AST for the generic type info of this entity.
      * @param s - a string representing the generic signature of this
      * entity
      * @return the AST for the generic type info of this entity.
--- a/src/java.base/share/classes/sun/reflect/generics/repository/ClassRepository.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/generics/repository/ClassRepository.java	Tue Dec 16 09:58:02 2014 -0800
@@ -25,12 +25,12 @@
 
 package sun.reflect.generics.repository;
 
+import java.lang.reflect.Type;
 import sun.reflect.generics.factory.GenericsFactory;
 import sun.reflect.generics.tree.ClassSignature;
 import sun.reflect.generics.tree.TypeTree;
 import sun.reflect.generics.visitor.Reifier;
 import sun.reflect.generics.parser.SignatureParser;
-import java.lang.reflect.Type;
 
 
 /**
@@ -70,47 +70,54 @@
         return new ClassRepository(rawSig, f);
     }
 
-    // public API
  /*
  * When queried for a particular piece of type information, the
  * general pattern is to consult the corresponding cached value.
  * If the corresponding field is non-null, it is returned.
  * If not, it is created lazily. This is done by selecting the appropriate
  * part of the tree and transforming it into a reflective object
- * using a visitor.
- * a visitor, which is created by feeding it the factory
+ * using a visitor, which is created by feeding it the factory
  * with which the repository was created.
  */
 
     public Type getSuperclass() {
-        Type superclass = this.superclass;
-        if (superclass == null) { // lazily initialize superclass
-            Reifier r = getReifier(); // obtain visitor
-            // Extract superclass subtree from AST and reify
-            getTree().getSuperclass().accept(r);
-            // extract result from visitor and cache it
-            superclass = r.getResult();
-            this.superclass = superclass;
+        Type value = superclass;
+        if (value == null) {
+            value = computeSuperclass();
+            superclass = value;
         }
-        return superclass; // return cached result
+        return value;
     }
 
     public Type[] getSuperInterfaces() {
-        Type[] superInterfaces = this.superInterfaces;
-        if (superInterfaces == null) { // lazily initialize super interfaces
-            // first, extract super interface subtree(s) from AST
-            TypeTree[] ts  = getTree().getSuperInterfaces();
-            // create array to store reified subtree(s)
-            superInterfaces = new Type[ts.length];
-            // reify all subtrees
-            for (int i = 0; i < ts.length; i++) {
-                Reifier r = getReifier(); // obtain visitor
-                ts[i].accept(r);// reify subtree
-                // extract result from visitor and store it
-                superInterfaces[i] = r.getResult();
-            }
-            this.superInterfaces = superInterfaces;
+        Type[] value = superInterfaces;
+        if (value == null) {
+            value = computeSuperInterfaces();
+            superInterfaces = value;
         }
-        return superInterfaces.clone(); // return cached result
+        return value.clone();
+    }
+
+    private Type computeSuperclass() {
+        Reifier r = getReifier(); // obtain visitor
+        // Extract superclass subtree from AST and reify
+        getTree().getSuperclass().accept(r);
+        return r.getResult();
+    }
+
+    private Type[] computeSuperInterfaces() {
+        // first, extract super interface subtree(s) from AST
+        TypeTree[] ts = getTree().getSuperInterfaces();
+        // create array to store reified subtree(s)
+        int length = ts.length;
+        Type[] superInterfaces = new Type[length];
+        // reify all subtrees
+        for (int i = 0; i < length; i++) {
+            Reifier r = getReifier(); // obtain visitor
+            ts[i].accept(r);// reify subtree
+            // extract result from visitor and store it
+            superInterfaces[i] = r.getResult();
+        }
+        return superInterfaces;
     }
 }
--- a/src/java.base/share/classes/sun/reflect/generics/repository/ConstructorRepository.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/generics/repository/ConstructorRepository.java	Tue Dec 16 09:58:02 2014 -0800
@@ -43,8 +43,11 @@
 public class ConstructorRepository
     extends GenericDeclRepository<MethodTypeSignature> {
 
-    private Type[] paramTypes; // caches the generic parameter types info
-    private Type[] exceptionTypes; // caches the generic exception types info
+    /** The generic parameter types.  Lazily initialized. */
+    private volatile Type[] parameterTypes;
+
+    /** The generic exception types.  Lazily initialized. */
+    private volatile Type[] exceptionTypes;
 
  // protected, to enforce use of static factory yet allow subclassing
     protected ConstructorRepository(String rawSig, GenericsFactory f) {
@@ -64,57 +67,67 @@
      * @return a <tt>ConstructorRepository</tt> that manages the generic type
      * information represented in the signature <tt>rawSig</tt>
      */
-    public static ConstructorRepository make(String rawSig,
-                                             GenericsFactory f) {
+    public static ConstructorRepository make(String rawSig, GenericsFactory f) {
         return new ConstructorRepository(rawSig, f);
     }
 
-    // public API
-
  /*
  * When queried for a particular piece of type information, the
  * general pattern is to consult the corresponding cached value.
  * If the corresponding field is non-null, it is returned.
  * If not, it is created lazily. This is done by selecting the appropriate
  * part of the tree and transforming it into a reflective object
- * using a visitor.
- * a visitor, which is created by feeding it the factory
+ * using a visitor, which is created by feeding it the factory
  * with which the repository was created.
  */
 
-    public Type[] getParameterTypes(){
-        if (paramTypes == null) { // lazily initialize parameter types
-            // first, extract parameter type subtree(s) from AST
-            TypeSignature[] pts = getTree().getParameterTypes();
-            // create array to store reified subtree(s)
-            Type[] ps = new Type[pts.length];
-            // reify all subtrees
-            for (int i = 0; i < pts.length; i++) {
-                Reifier r = getReifier(); // obtain visitor
-                pts[i].accept(r); // reify subtree
-                // extract result from visitor and store it
-                ps[i] = r.getResult();
-            }
-            paramTypes = ps; // cache overall result
+    public Type[] getParameterTypes() {
+        Type[] value = parameterTypes;
+        if (value == null) {
+            value = computeParameterTypes();
+            parameterTypes = value;
         }
-        return paramTypes.clone(); // return cached result
+        return value.clone();
     }
 
-    public Type[] getExceptionTypes(){
-        if (exceptionTypes == null) { // lazily initialize exception types
-            // first, extract exception type subtree(s) from AST
-            FieldTypeSignature[] ets = getTree().getExceptionTypes();
-            // create array to store reified subtree(s)
-            Type[] es = new Type[ets.length];
-            // reify all subtrees
-            for (int i = 0; i < ets.length; i++) {
-                Reifier r = getReifier(); // obtain visitor
-                ets[i].accept(r); // reify subtree
-                // extract result from visitor and store it
-                es[i] = r.getResult();
-            }
-            exceptionTypes = es; // cache overall result
+    public Type[] getExceptionTypes() {
+        Type[] value = exceptionTypes;
+        if (value == null) {
+            value = computeExceptionTypes();
+            exceptionTypes = value;
         }
-        return exceptionTypes.clone(); // return cached result
+        return value.clone();
+    }
+
+    private Type[] computeParameterTypes() {
+        // first, extract parameter type subtree(s) from AST
+        TypeSignature[] pts = getTree().getParameterTypes();
+        // create array to store reified subtree(s)
+        int length = pts.length;
+        Type[] parameterTypes = new Type[length];
+        // reify all subtrees
+        for (int i = 0; i < length; i++) {
+            Reifier r = getReifier(); // obtain visitor
+            pts[i].accept(r); // reify subtree
+            // extract result from visitor and store it
+            parameterTypes[i] = r.getResult();
+        }
+        return parameterTypes;
+    }
+
+    private Type[] computeExceptionTypes() {
+        // first, extract exception type subtree(s) from AST
+        FieldTypeSignature[] ets = getTree().getExceptionTypes();
+        // create array to store reified subtree(s)
+        int length = ets.length;
+        Type[] exceptionTypes = new Type[length];
+        // reify all subtrees
+        for (int i = 0; i < length; i++) {
+            Reifier r = getReifier(); // obtain visitor
+            ets[i].accept(r); // reify subtree
+            // extract result from visitor and store it
+            exceptionTypes[i] = r.getResult();
+        }
+        return exceptionTypes;
     }
 }
--- a/src/java.base/share/classes/sun/reflect/generics/repository/FieldRepository.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/generics/repository/FieldRepository.java	Tue Dec 16 09:58:02 2014 -0800
@@ -41,7 +41,8 @@
  */
 public class FieldRepository extends AbstractRepository<TypeSignature> {
 
-    private Type genericType; // caches the generic type info
+    /** The generic type info.  Lazily initialized. */
+    private volatile Type genericType;
 
  // protected, to enforce use of static factory yet allow subclassing
     protected FieldRepository(String rawSig, GenericsFactory f) {
@@ -61,31 +62,32 @@
      * @return a <tt>FieldRepository</tt> that manages the generic type
      * information represented in the signature <tt>rawSig</tt>
      */
-    public static FieldRepository make(String rawSig,
-                                             GenericsFactory f) {
+    public static FieldRepository make(String rawSig, GenericsFactory f) {
         return new FieldRepository(rawSig, f);
     }
 
-    // public API
-
  /*
  * When queried for a particular piece of type information, the
  * general pattern is to consult the corresponding cached value.
  * If the corresponding field is non-null, it is returned.
  * If not, it is created lazily. This is done by selecting the appropriate
  * part of the tree and transforming it into a reflective object
- * using a visitor.
- * a visitor, which is created by feeding it the factory
+ * using a visitor, which is created by feeding it the factory
  * with which the repository was created.
  */
 
-    public Type getGenericType(){
-        if (genericType == null) { // lazily initialize generic type
-            Reifier r = getReifier(); // obtain visitor
-            getTree().accept(r); // reify subtree
-            // extract result from visitor and cache it
-            genericType = r.getResult();
+    public Type getGenericType() {
+        Type value = genericType;
+        if (value == null) {
+            value = computeGenericType();
+            genericType = value;
         }
-        return genericType; // return cached result
+        return value;
+    }
+
+    private Type computeGenericType() {
+        Reifier r = getReifier();       // obtain visitor
+        getTree().accept(r);            // reify subtree
+        return r.getResult();           // extract result from visitor
     }
 }
--- a/src/java.base/share/classes/sun/reflect/generics/repository/GenericDeclRepository.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/generics/repository/GenericDeclRepository.java	Tue Dec 16 09:58:02 2014 -0800
@@ -43,13 +43,12 @@
     extends AbstractRepository<S> {
 
     /** The formal type parameters.  Lazily initialized. */
-    private volatile TypeVariable<?>[] typeParams;
+    private volatile TypeVariable<?>[] typeParameters;
 
     protected GenericDeclRepository(String rawSig, GenericsFactory f) {
         super(rawSig, f);
     }
 
-    // public API
  /*
  * When queried for a particular piece of type information, the
  * general pattern is to consult the corresponding cached value.
@@ -61,25 +60,31 @@
  */
 
     /**
-     * Return the formal type parameters of this generic declaration.
+     * Returns the formal type parameters of this generic declaration.
      * @return the formal type parameters of this generic declaration
      */
     public TypeVariable<?>[] getTypeParameters() {
-        TypeVariable<?>[] typeParams = this.typeParams;
-        if (typeParams == null) { // lazily initialize type parameters
-            // first, extract type parameter subtree(s) from AST
-            FormalTypeParameter[] ftps = getTree().getFormalTypeParameters();
-            // create array to store reified subtree(s)
-            typeParams = new TypeVariable<?>[ftps.length];
-            // reify all subtrees
-            for (int i = 0; i < ftps.length; i++) {
-                Reifier r = getReifier(); // obtain visitor
-                ftps[i].accept(r); // reify subtree
-                // extract result from visitor and store it
-                typeParams[i] = (TypeVariable<?>) r.getResult();
-            }
-            this.typeParams = typeParams; // cache overall result
+        TypeVariable<?>[] value = typeParameters;
+        if (value == null) {
+            value = computeTypeParameters();
+            typeParameters = value;
         }
-        return typeParams.clone(); // return cached result
+        return value.clone();
+    }
+
+    private TypeVariable<?>[] computeTypeParameters() {
+        // first, extract type parameter subtree(s) from AST
+        FormalTypeParameter[] ftps = getTree().getFormalTypeParameters();
+        // create array to store reified subtree(s)
+        int length = ftps.length;
+        TypeVariable<?>[] typeParameters = new TypeVariable<?>[length];
+        // reify all subtrees
+        for (int i = 0; i < length; i++) {
+            Reifier r = getReifier(); // obtain visitor
+            ftps[i].accept(r); // reify subtree
+            // extract result from visitor and store it
+            typeParameters[i] = (TypeVariable<?>) r.getResult();
+        }
+        return typeParameters;
     }
 }
--- a/src/java.base/share/classes/sun/reflect/generics/repository/MethodRepository.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/generics/repository/MethodRepository.java	Tue Dec 16 09:58:02 2014 -0800
@@ -39,7 +39,8 @@
  */
 public class MethodRepository extends ConstructorRepository {
 
-    private Type returnType; // caches the generic return type info
+    /** The generic return type info.  Lazily initialized. */
+    private volatile Type returnType;
 
  // private, to enforce use of static factory
     private MethodRepository(String rawSig, GenericsFactory f) {
@@ -59,18 +60,21 @@
         return new MethodRepository(rawSig, f);
     }
 
-    // public API
-
     public Type getReturnType() {
-        if (returnType == null) { // lazily initialize return type
-            Reifier r = getReifier(); // obtain visitor
-            // Extract return type subtree from AST and reify
-            getTree().getReturnType().accept(r);
-            // extract result from visitor and cache it
-            returnType = r.getResult();
-            }
-        return returnType; // return cached result
+        Type value = returnType;
+        if (value == null) {
+            value = computeReturnType();
+            returnType = value;
+        }
+        return value;
     }
 
+    private Type computeReturnType() {
+        Reifier r = getReifier(); // obtain visitor
+        // Extract return type subtree from AST and reify
+        getTree().getReturnType().accept(r);
+        // extract result from visitor and cache it
+        return r.getResult();
+    }
 
 }
--- a/src/java.base/share/classes/sun/reflect/generics/scope/AbstractScope.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/generics/scope/AbstractScope.java	Tue Dec 16 09:58:02 2014 -0800
@@ -29,7 +29,6 @@
 import java.lang.reflect.TypeVariable;
 
 
-
 /**
  * Abstract superclass for lazy scope objects, used when building
  * factories for generic information repositories.
@@ -49,7 +48,7 @@
     /**
      * Constructor. Takes a reflective object whose scope the newly
      * constructed instance will represent.
-     * @param D - A generic declaration whose scope the newly
+     * @param decl - A generic declaration whose scope the newly
      * constructed instance will represent
      */
     protected AbstractScope(D decl){ recvr = decl;}
@@ -63,7 +62,7 @@
 
     /** This method must be implemented by any concrete subclass.
      * It must return the enclosing scope of this scope. If this scope
-     * is a top-level scope, an instance of  DummyScope must be returned.
+     * is a top-level scope, an instance of DummyScope must be returned.
      * @return The enclosing scope of this scope
      */
     protected abstract Scope computeEnclosingScope();
@@ -72,13 +71,13 @@
      * Accessor for the enclosing scope, which is computed lazily and cached.
      * @return the enclosing scope
      */
-    protected Scope getEnclosingScope(){
-        Scope enclosingScope = this.enclosingScope;
-        if (enclosingScope == null) {
-            enclosingScope = computeEnclosingScope();
-            this.enclosingScope = enclosingScope;
+    protected Scope getEnclosingScope() {
+        Scope value = enclosingScope;
+        if (value == null) {
+            value = computeEnclosingScope();
+            enclosingScope = value;
         }
-        return enclosingScope;
+        return value;
     }
 
     /**
--- a/src/java.base/share/classes/sun/reflect/generics/tree/Signature.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/generics/tree/Signature.java	Tue Dec 16 09:58:02 2014 -0800
@@ -27,7 +27,7 @@
 
 /**
  * Common superinterface for generic signatures. These are the signatures
- * of complete class and method/constructor delcarations.
+ * of complete class and method/constructor declarations.
  */
 public interface Signature extends Tree{
     FormalTypeParameter[] getFormalTypeParameters();
--- a/src/java.base/share/classes/sun/reflect/generics/tree/Wildcard.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/generics/tree/Wildcard.java	Tue Dec 16 09:58:02 2014 -0800
@@ -28,8 +28,8 @@
 import sun.reflect.generics.visitor.TypeTreeVisitor;
 
 public class Wildcard implements TypeArgument {
-    private FieldTypeSignature[] upperBounds;
-    private FieldTypeSignature[] lowerBounds;
+    private final FieldTypeSignature[] upperBounds;
+    private final FieldTypeSignature[] lowerBounds;
 
     private Wildcard(FieldTypeSignature[] ubs, FieldTypeSignature[] lbs) {
         upperBounds = ubs;
@@ -43,11 +43,11 @@
         return new Wildcard(ubs, lbs);
     }
 
-    public FieldTypeSignature[] getUpperBounds(){
+    public FieldTypeSignature[] getUpperBounds() {
         return upperBounds;
     }
 
-    public FieldTypeSignature[] getLowerBounds(){
+    public FieldTypeSignature[] getLowerBounds() {
         if (lowerBounds.length == 1 &&
             lowerBounds[0] == BottomSignature.make())
             return emptyBounds;
--- a/src/java.base/share/classes/sun/reflect/generics/visitor/Reifier.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/generics/visitor/Reifier.java	Tue Dec 16 09:58:02 2014 -0800
@@ -39,7 +39,7 @@
  */
 public class Reifier implements TypeTreeVisitor<Type> {
     private Type resultType;
-    private GenericsFactory factory;
+    private final GenericsFactory factory;
 
     private Reifier(GenericsFactory f){
         factory = f;
--- a/src/java.base/share/classes/sun/reflect/misc/MethodUtil.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/misc/MethodUtil.java	Tue Dec 16 09:58:02 2014 -0800
@@ -40,6 +40,7 @@
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.AccessibleObject;
 import java.lang.reflect.Modifier;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
 import sun.misc.IOUtils;
@@ -216,17 +217,21 @@
      * key in the method cache.
      */
     private static class Signature {
-        private String methodName;
-        private Class<?>[] argClasses;
-
-        private volatile int hashCode = 0;
+        private final String methodName;
+        private final Class<?>[] argClasses;
+        private final int hashCode;
 
         Signature(Method m) {
             this.methodName = m.getName();
             this.argClasses = m.getParameterTypes();
+            this.hashCode = methodName.hashCode() + Arrays.hashCode(argClasses);
         }
 
-        public boolean equals(Object o2) {
+        @Override public int hashCode() {
+            return hashCode;
+        }
+
+        @Override public boolean equals(Object o2) {
             if (this == o2) {
                 return true;
             }
@@ -244,25 +249,6 @@
             }
             return true;
         }
-
-        /**
-         * Hash code computed using algorithm suggested in
-         * Effective Java, Item 8.
-         */
-        public int hashCode() {
-            if (hashCode == 0) {
-                int result = 17;
-                result = 37 * result + methodName.hashCode();
-                if (argClasses != null) {
-                    for (int i = 0; i < argClasses.length; i++) {
-                        result = 37 * result + ((argClasses[i] == null) ? 0 :
-                            argClasses[i].hashCode());
-                    }
-                }
-                hashCode = result;
-            }
-            return hashCode;
-        }
     }
 
 
--- a/src/java.base/share/classes/sun/reflect/misc/ReflectUtil.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/reflect/misc/ReflectUtil.java	Tue Dec 16 09:58:02 2014 -0800
@@ -319,7 +319,7 @@
             return;
         }
 
-        // disallow any method not declared in one of the proxy intefaces
+        // disallow any method not declared in one of the proxy interfaces
         throw new IllegalArgumentException("Can't handle: " + method);
     }
 
--- a/src/java.base/share/classes/sun/security/provider/PolicyFile.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/security/provider/PolicyFile.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1040,7 +1040,7 @@
     }
 
     /**
-     * Evaluates the the global policy for the permissions granted to
+     * Evaluates the global policy for the permissions granted to
      * the ProtectionDomain and tests whether the permission is
      * granted.
      *
--- a/src/java.base/share/classes/sun/security/ssl/EphemeralKeyManager.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/security/ssl/EphemeralKeyManager.java	Tue Dec 16 09:58:02 2014 -0800
@@ -41,7 +41,7 @@
 
     /*
      * Current cached RSA KeyPairs. Elements are never null.
-     * Indexed via the the constants above.
+     * Indexed via the constants above.
      */
     private final EphemeralKeyPair[] keys = new EphemeralKeyPair[] {
         new EphemeralKeyPair(null),
--- a/src/java.base/share/classes/sun/security/ssl/HandshakeMessage.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/security/ssl/HandshakeMessage.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1478,7 +1478,7 @@
                 boolean opened = false;
                 for (SignatureAndHashAlgorithm signAlg : algorithms) {
                     if (opened) {
-                        sb.append(", " + signAlg.getAlgorithmName());
+                        sb.append(", ").append(signAlg.getAlgorithmName());
                     } else {
                         sb.append(signAlg.getAlgorithmName());
                         opened = true;
--- a/src/java.base/share/classes/sun/security/ssl/MAC.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/security/ssl/MAC.java	Tue Dec 16 09:58:02 2014 -0800
@@ -120,7 +120,7 @@
      * @param buf compressed record on which the MAC is computed
      * @param offset start of compressed record data
      * @param len the size of the compressed record
-     * @param isSimulated if true, simulate the the MAC computation
+     * @param isSimulated if true, simulate the MAC computation
      */
     final byte[] compute(byte type, byte buf[],
             int offset, int len, boolean isSimulated) {
@@ -147,7 +147,7 @@
      * @param type record type
      * @param bb a ByteBuffer in which the position and limit
      *          demarcate the data to be MAC'd.
-     * @param isSimulated if true, simulate the the MAC computation
+     * @param isSimulated if true, simulate the MAC computation
      */
     final byte[] compute(byte type, ByteBuffer bb, boolean isSimulated) {
         if (macAlg.size == 0) {
--- a/src/java.base/share/classes/sun/security/ssl/SSLEngineImpl.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/security/ssl/SSLEngineImpl.java	Tue Dec 16 09:58:02 2014 -0800
@@ -77,7 +77,7 @@
  *      All data is routed through
  *      EngineInputRecord/EngineOutputRecord.  However, all handshake
  *      data (ct_alert/ct_change_cipher_spec/ct_handshake) are passed
- *      through to the the underlying InputRecord/OutputRecord, and
+ *      through to the underlying InputRecord/OutputRecord, and
  *      the data uses the internal buffers.
  *
  *      Application data is handled slightly different, we copy the data
@@ -158,7 +158,7 @@
      *                v                                     |
      *               ERROR>------>----->CLOSED<--------<----+
      *
-     * ALSO, note that the the purpose of handshaking (renegotiation is
+     * ALSO, note that the purpose of handshaking (renegotiation is
      * included) is to assign a different, and perhaps new, session to
      * the connection.  The SSLv3 spec is a bit confusing on that new
      * protocol feature.
--- a/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java	Tue Dec 16 09:58:02 2014 -0800
@@ -144,7 +144,7 @@
      *                                     v
      *                                 APP_CLOSED
      *
-     * ALSO, note that the the purpose of handshaking (renegotiation is
+     * ALSO, note that the purpose of handshaking (renegotiation is
      * included) is to assign a different, and perhaps new, session to
      * the connection.  The SSLv3 spec is a bit confusing on that new
      * protocol feature.
@@ -2190,7 +2190,7 @@
     }
 
     /**
-     * Returns the the SSL Session in use by this connection.  These can
+     * Returns the SSL Session in use by this connection.  These can
      * be long lived, and frequently correspond to an entire login session
      * for some user.
      */
--- a/src/java.base/share/classes/sun/security/ssl/ServerHandshaker.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/security/ssl/ServerHandshaker.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1467,7 +1467,7 @@
                 if (serverPrincipal != null) {
                     // When service is bound, we check ASAP. Otherwise,
                     // will check after client request is received
-                    // in in Kerberos ClientKeyExchange
+                    // in Kerberos ClientKeyExchange
                     SecurityManager sm = System.getSecurityManager();
                     try {
                         if (sm != null) {
--- a/src/java.base/share/classes/sun/security/x509/AlgorithmId.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/security/x509/AlgorithmId.java	Tue Dec 16 09:58:02 2014 -0800
@@ -39,7 +39,7 @@
  * algorithm type, and may also be used in other cases.  Equivalence is
  * defined according to OID and (where relevant) parameters.
  *
- * <P>Subclasses may be used, for example when when the algorithm ID has
+ * <P>Subclasses may be used, for example when the algorithm ID has
  * associated parameters which some code (e.g. code using public keys) needs
  * to have parsed.  Two examples of such algorithms are Diffie-Hellman key
  * exchange, and the Digital Signature Standard Algorithm (DSS/DSA).
--- a/src/java.base/share/classes/sun/security/x509/GeneralName.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/security/x509/GeneralName.java	Tue Dec 16 09:58:02 2014 -0800
@@ -221,7 +221,7 @@
     /**
      * Encode the name to the specified DerOutputStream.
      *
-     * @param out the DerOutputStream to encode the the GeneralName to.
+     * @param out the DerOutputStream to encode the GeneralName to.
      * @exception IOException on encoding errors.
      */
     public void encode(DerOutputStream out) throws IOException {
--- a/src/java.base/share/classes/sun/security/x509/URIName.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/security/x509/URIName.java	Tue Dec 16 09:58:02 2014 -0800
@@ -302,7 +302,7 @@
      * <p>
      * RFC5280: For URIs, the constraint applies to the host part of the name.
      * The constraint may specify a host or a domain.  Examples would be
-     * "foo.bar.com";  and ".xyz.com".  When the the constraint begins with
+     * "foo.bar.com";  and ".xyz.com".  When the constraint begins with
      * a period, it may be expanded with one or more subdomains.  That is,
      * the constraint ".xyz.com" is satisfied by both abc.xyz.com and
      * abc.def.xyz.com.  However, the constraint ".xyz.com" is not satisfied
--- a/src/java.base/share/classes/sun/security/x509/X500Name.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/security/x509/X500Name.java	Tue Dec 16 09:58:02 2014 -0800
@@ -336,7 +336,7 @@
     }
 
     /**
-     * Return an immutable List of the the AVAs contained in all the
+     * Return an immutable List of the AVAs contained in all the
      * RDNs of this X500Name.
      */
     public List<AVA> allAvas() {
--- a/src/java.base/share/classes/sun/text/normalizer/NormalizerBase.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/text/normalizer/NormalizerBase.java	Tue Dec 16 09:58:02 2014 -0800
@@ -646,9 +646,9 @@
 
     /**
      * Compose a string.
-     * The string will be composed to according the the specified mode.
+     * The string will be composed according to the specified mode.
      * @param str        The string to compose.
-     * @param compat     If true the string will be composed accoding to
+     * @param compat     If true the string will be composed according to
      *                    NFKC rules and if false will be composed according to
      *                    NFC rules.
      * @param options    The only recognized option is UNICODE_3_2
@@ -694,9 +694,9 @@
 
     /**
      * Decompose a string.
-     * The string will be decomposed to according the the specified mode.
+     * The string will be decomposed according to the specified mode.
      * @param str       The string to decompose.
-     * @param compat    If true the string will be decomposed accoding to NFKD
+     * @param compat    If true the string will be decomposed according to NFKD
      *                   rules and if false will be decomposed according to NFD
      *                   rules.
      * @return String   The decomposed string
@@ -708,9 +708,9 @@
 
     /**
      * Decompose a string.
-     * The string will be decomposed to according the the specified mode.
+     * The string will be decomposed according to the specified mode.
      * @param str     The string to decompose.
-     * @param compat  If true the string will be decomposed accoding to NFKD
+     * @param compat  If true the string will be decomposed according to NFKD
      *                 rules and if false will be decomposed according to NFD
      *                 rules.
      * @param options The normalization options, ORed together (0 for no options).
@@ -756,7 +756,7 @@
 
     /**
      * Normalize a string.
-     * The string will be normalized according the the specified normalization
+     * The string will be normalized according to the specified normalization
      * mode and options.
      * @param src       The char array to compose.
      * @param srcStart  Start index of the source
--- a/src/java.base/share/classes/sun/text/normalizer/UCharacterIterator.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/text/normalizer/UCharacterIterator.java	Tue Dec 16 09:58:02 2014 -0800
@@ -247,7 +247,7 @@
 
     //// for StringPrep
     /**
-     * Convenience method for returning the underlying text storage as as string
+     * Convenience method for returning the underlying text storage as a string
      * @return the underlying text storage in the iterator as a string
      * @stable ICU 2.4
      */
--- a/src/java.base/share/classes/sun/text/normalizer/UTF16.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/classes/sun/text/normalizer/UTF16.java	Tue Dec 16 09:58:02 2014 -0800
@@ -94,7 +94,7 @@
  *   </li>
  *   <li>
  *    <strong>Exceptions:</strong> The error checking will throw an exception
- *   if indices are out of bounds. Other than than that, all methods will
+ *   if indices are out of bounds. Other than that, all methods will
  *   behave reasonably, even if unmatched surrogates or out-of-bounds UTF-32
  *   values are present. <code>UCharacter.isLegal()</code> can be used to check
  *   for validity if desired.
--- a/src/java.base/share/native/libjli/emessages.h	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/native/libjli/emessages.h	Tue Dec 16 09:58:02 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -72,9 +72,6 @@
 #define CFG_ERROR8      "Error: missing `%s' JVM at `%s'.\nPlease install or use the JRE or JDK that contains these missing components."
 #define CFG_ERROR9      "Error: could not determine JVM type."
 
-
-#define SPC_ERROR1      "Error: Syntax error in version specification \"%s\""
-
 #define JRE_ERROR1      "Error: Could not find Java SE Runtime Environment."
 #define JRE_ERROR2      "Error: This Java instance does not support a %d-bit JVM.\nPlease install the desired version."
 #define JRE_ERROR3      "Error: Improper value at line %d."
@@ -89,6 +86,9 @@
 #define JRE_ERROR12     "Error: Exec of %s failed"
 #define JRE_ERROR13     "Error: String processing operation failed"
 
+#define SPC_ERROR1      "Error: Specifying an alternate JDK/JRE version is no longer supported.\n  The use of the flag '-version:' is no longer valid.\n  Please download and execute the appropriate version."
+#define SPC_ERROR2      "Error: Specifying an alternate JDK/JRE is no longer supported.\n  The related flags -jre-restrict-search | -jre-no-restrict-search are also no longer valid."
+
 #define DLL_ERROR1      "Error: dl failure on line %d"
 #define DLL_ERROR2      "Error: failed %s, because %s"
 #define DLL_ERROR3      "Error: could not find executable %s"
--- a/src/java.base/share/native/libjli/java.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/native/libjli/java.c	Tue Dec 16 09:58:02 2014 -0800
@@ -216,21 +216,14 @@
     }
 
     /*
-     * Make sure the specified version of the JRE is running.
+     * SelectVersion() has several responsibilities:
      *
-     * There are three things to note about the SelectVersion() routine:
-     *  1) If the version running isn't correct, this routine doesn't
-     *     return (either the correct version has been exec'd or an error
-     *     was issued).
-     *  2) Argc and Argv in this scope are *not* altered by this routine.
-     *     It is the responsibility of subsequent code to ignore the
-     *     arguments handled by this routine.
-     *  3) As a side-effect, the variable "main_class" is guaranteed to
-     *     be set (if it should ever be set).  This isn't exactly the
-     *     poster child for structured programming, but it is a small
-     *     price to pay for not processing a jar file operand twice.
-     *     (Note: This side effect has been disabled.  See comment on
-     *     bugid 5030265 below.)
+     *  1) Disallow specification of another JRE.  With 1.9, another
+     *     version of the JRE cannot be invoked.
+     *  2) Allow for a JRE version to invoke JDK 1.9 or later.  Since
+     *     all mJRE directives have been stripped from the request but
+     *     the pre 1.9 JRE [ 1.6 thru 1.8 ], it is as if 1.9+ has been
+     *     invoked from the command line.
      */
     SelectVersion(argc, argv, &main_class);
 
@@ -744,7 +737,7 @@
 }
 
 /*
- * Adds a new VM option with the given given name and value.
+ * Adds a new VM option with the given name and value.
  */
 void
 AddOption(char *str, void *info)
@@ -829,8 +822,6 @@
 SelectVersion(int argc, char **argv, char **main_class)
 {
     char    *arg;
-    char    **new_argv;
-    char    **new_argp;
     char    *operand;
     char    *version = NULL;
     char    *jre = NULL;
@@ -849,6 +840,17 @@
      * with the value passed through the environment (if any) and
      * simply return.
      */
+
+    /*
+     * This environmental variable can be set by mJRE capable JREs
+     * [ 1.5 thru 1.8 ].  All other aspects of mJRE processing have been
+     * stripped by those JREs.  This environmental variable allows 1.9+
+     * JREs to be started by these mJRE capable JREs.
+     * Note that mJRE directives in the jar manifest file would have been
+     * ignored for a JRE started by another JRE...
+     * .. skipped for JRE 1.5 and beyond.
+     * .. not even checked for pre 1.5.
+     */
     if ((env_in = getenv(ENV_ENTRY)) != NULL) {
         if (*env_in != '\0')
             *main_class = JLI_StringDup(env_in);
@@ -857,41 +859,26 @@
 
     /*
      * Scan through the arguments for options relevant to multiple JRE
-     * support.  For reference, the command line syntax is defined as:
+     * support.  Multiple JRE support existed in JRE versions 1.5 thru 1.8.
      *
-     * SYNOPSIS
-     *      java [options] class [argument...]
-     *
-     *      java [options] -jar file.jar [argument...]
-     *
-     * As the scan is performed, make a copy of the argument list with
-     * the version specification options (new to 1.5) removed, so that
-     * a version less than 1.5 can be exec'd.
-     *
-     * Note that due to the syntax of the native Windows interface
-     * CreateProcess(), processing similar to the following exists in
-     * the Windows platform specific routine ExecJRE (in java_md.c).
-     * Changes here should be reproduced there.
+     * This capability is no longer available with JRE versions 1.9 and later.
+     * These command line options are reported as errors.
      */
-    new_argv = JLI_MemAlloc((argc + 1) * sizeof(char*));
-    new_argv[0] = argv[0];
-    new_argp = &new_argv[1];
     argc--;
     argv++;
     while ((arg = *argv) != 0 && *arg == '-') {
         if (JLI_StrCCmp(arg, "-version:") == 0) {
-            version = arg + 9;
+            JLI_ReportErrorMessage(SPC_ERROR1);
         } else if (JLI_StrCmp(arg, "-jre-restrict-search") == 0) {
-            restrict_search = 1;
-        } else if (JLI_StrCmp(arg, "-no-jre-restrict-search") == 0) {
-            restrict_search = 0;
+            JLI_ReportErrorMessage(SPC_ERROR2);
+        } else if (JLI_StrCmp(arg, "-jre-no-restrict-search") == 0) {
+            JLI_ReportErrorMessage(SPC_ERROR2);
         } else {
             if (JLI_StrCmp(arg, "-jar") == 0)
                 jarflag = 1;
             /* deal with "unfortunate" classpath syntax */
             if ((JLI_StrCmp(arg, "-classpath") == 0 || JLI_StrCmp(arg, "-cp") == 0) &&
               (argc >= 2)) {
-                *new_argp++ = arg;
                 argc--;
                 argv++;
                 arg = *argv;
@@ -908,7 +895,6 @@
             } else if (JLI_StrCCmp(arg, "-splash:") == 0) {
                 splash_file_name = arg+8;
             }
-            *new_argp++ = arg;
         }
         argc--;
         argv++;
@@ -917,11 +903,8 @@
         operand = NULL;
     } else {
         argc--;
-        *new_argp++ = operand = *argv++;
+        operand = *argv++;
     }
-    while (argc-- > 0)  /* Copy over [argument...] */
-        *new_argp++ = *argv++;
-    *new_argp = NULL;
 
     /*
      * If there is a jar file, read the manifest. If the jarfile can't be
@@ -974,14 +957,6 @@
         putenv(splash_jar_entry);
     }
 
-    /*
-     * The JRE-Version and JRE-Restrict-Search values (if any) from the
-     * manifest are overwritten by any specified on the command line.
-     */
-    if (version != NULL)
-        info.jre_version = version;
-    if (restrict_search != -1)
-        info.jre_restrict_search = restrict_search;
 
     /*
      * "Valid" returns (other than unrecoverable errors) follow.  Set
@@ -990,72 +965,11 @@
     if (info.main_class != NULL)
         *main_class = JLI_StringDup(info.main_class);
 
-    /*
-     * If no version selection information is found either on the command
-     * line or in the manifest, simply return.
-     */
     if (info.jre_version == NULL) {
         JLI_FreeManifest();
-        JLI_MemFree(new_argv);
         return;
     }
 
-    /*
-     * Check for correct syntax of the version specification (JSR 56).
-     */
-    if (!JLI_ValidVersionString(info.jre_version)) {
-        JLI_ReportErrorMessage(SPC_ERROR1, info.jre_version);
-        exit(1);
-    }
-
-    /*
-     * Find the appropriate JVM on the system. Just to be as forgiving as
-     * possible, if the standard algorithms don't locate an appropriate
-     * jre, check to see if the one running will satisfy the requirements.
-     * This can happen on systems which haven't been set-up for multiple
-     * JRE support.
-     */
-    jre = LocateJRE(&info);
-    JLI_TraceLauncher("JRE-Version = %s, JRE-Restrict-Search = %s Selected = %s\n",
-        (info.jre_version?info.jre_version:"null"),
-        (info.jre_restrict_search?"true":"false"), (jre?jre:"null"));
-
-    if (jre == NULL) {
-        if (JLI_AcceptableRelease(GetFullVersion(), info.jre_version)) {
-            JLI_FreeManifest();
-            JLI_MemFree(new_argv);
-            return;
-        } else {
-            JLI_ReportErrorMessage(CFG_ERROR4, info.jre_version);
-            exit(1);
-        }
-    }
-
-    /*
-     * If I'm not the chosen one, exec the chosen one.  Returning from
-     * ExecJRE indicates that I am indeed the chosen one.
-     *
-     * The private environment variable _JAVA_VERSION_SET is used to
-     * prevent the chosen one from re-reading the manifest file and
-     * using the values found within to override the (potential) command
-     * line flags stripped from argv (because the target may not
-     * understand them).  Passing the MainClass value is an optimization
-     * to avoid locating, expanding and parsing the manifest extra
-     * times.
-     */
-    if (info.main_class != NULL) {
-        if (JLI_StrLen(info.main_class) <= MAXNAMELEN) {
-            (void)JLI_StrCat(env_entry, info.main_class);
-        } else {
-            JLI_ReportErrorMessage(CLS_ERROR5, MAXNAMELEN);
-            exit(1);
-        }
-    }
-    (void)putenv(env_entry);
-    ExecJRE(jre, new_argv);
-    JLI_FreeManifest();
-    JLI_MemFree(new_argv);
-    return;
 }
 
 /*
@@ -1154,10 +1068,7 @@
                    JLI_StrCmp(arg, "-noasyncgc") == 0) {
             /* No longer supported */
             JLI_ReportErrorMessage(ARG_WARN, arg);
-        } else if (JLI_StrCCmp(arg, "-version:") == 0 ||
-                   JLI_StrCmp(arg, "-no-jre-restrict-search") == 0 ||
-                   JLI_StrCmp(arg, "-jre-restrict-search") == 0 ||
-                   JLI_StrCCmp(arg, "-splash:") == 0) {
+        } else if (JLI_StrCCmp(arg, "-splash:") == 0) {
             ; /* Ignore machine independent options already handled */
         } else if (ProcessPlatformOption(arg)) {
             ; /* Processing of platform dependent options */
--- a/src/java.base/share/native/libjli/java.h	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/native/libjli/java.h	Tue Dec 16 09:58:02 2014 -0800
@@ -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
@@ -40,9 +40,7 @@
 #include "emessages.h"
 #include "java_md.h"
 #include "jli_util.h"
-
 #include "manifest_info.h"
-#include "version_comp.h"
 #include "wildcard.h"
 #include "splashscreen.h"
 
--- a/src/java.base/share/native/libjli/parse_manifest.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/share/native/libjli/parse_manifest.c	Tue Dec 16 09:58:02 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, 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
@@ -588,15 +588,16 @@
     }
     lp = manifest;
     while ((rc = parse_nv_pair(&lp, &name, &value)) > 0) {
-        if (JLI_StrCaseCmp(name, "Manifest-Version") == 0)
+        if (JLI_StrCaseCmp(name, "Manifest-Version") == 0) {
             info->manifest_version = value;
-        else if (JLI_StrCaseCmp(name, "Main-Class") == 0)
+        } else if (JLI_StrCaseCmp(name, "Main-Class") == 0) {
             info->main_class = value;
-        else if (JLI_StrCaseCmp(name, "JRE-Version") == 0)
-            info->jre_version = value;
-        else if (JLI_StrCaseCmp(name, "JRE-Restrict-Search") == 0) {
-            if (JLI_StrCaseCmp(value, "true") == 0)
-                info->jre_restrict_search = 1;
+        } else if (JLI_StrCaseCmp(name, "JRE-Version") == 0) {
+            /*
+             * Manifest specification overridden by command line option
+             * so we will silently override there with no specification.
+             */
+            info->jre_version = 0;
         } else if (JLI_StrCaseCmp(name, "Splashscreen-Image") == 0) {
             info->splashscreen_image_file_name = value;
         }
--- a/src/java.base/share/native/libjli/version_comp.c	Tue Dec 16 09:57:33 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,357 +0,0 @@
-/*
- * Copyright (c) 2003, 2006, 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 <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include "jni.h"
-#include "jli_util.h"
-#include "version_comp.h"
-
-/*
- *      A collection of useful strings. One should think of these as #define
- *      entries, but actual strings can be more efficient (with many compilers).
- */
-static const char *separators   = ".-_";
-static const char *zero_string  = "0";
-
-/*
- *      Validate a string as parsable as a "Java int". If so parsable,
- *      return true (non-zero) and store the numeric value at the address
- *      passed in as "value"; otherwise return false (zero).
- *
- *      Note that the maximum allowable value is 2147483647 as defined by
- *      the "Java Language Specification" which precludes the use of native
- *      conversion routines which may have other limits.
- *
- *      Also note that we don't have to worry about the alternate maximum
- *      allowable value of 2147483648 because it is only allowed after
- *      the unary negation operator and this grammar doesn't have one
- *      of those.
- *
- *      Finally, note that a value which exceeds the maximum jint value will
- *      return false (zero). This results in the otherwise purely numeric
- *      string being compared as a string of characters (as per the spec.)
- */
-static int
-isjavaint(const char *s, jint *value)
-{
-    jlong sum = 0;
-    jint digit;
-    while (*s != '\0')
-        if (isdigit(*s)) {
-            digit = (jint)((int)(*s++) - (int)('0'));
-            sum = (sum * 10) + digit;
-            if (sum > 2147483647)
-                return (0);     /* Overflows jint (but not jlong) */
-        } else
-            return (0);
-    *value = (jint)sum;
-    return (1);
-}
-
-/*
- *      Modeled after strcmp(), compare two strings (as in the grammar defined
- *      in Appendix A of JSR 56).  If both strings can be interpreted as
- *      Java ints, do a numeric comparison, else it is strcmp().
- */
-static int
-comp_string(const char *s1, const char *s2)
-{
-    jint v1, v2;
-    if (isjavaint(s1, &v1) && isjavaint(s2, &v2))
-        return ((int)(v1 - v2));
-    else
-        return (JLI_StrCmp(s1, s2));
-}
-
-/*
- *      Modeled after strcmp(), compare two version-ids for a Prefix
- *      Match as defined in JSR 56.
- */
-int
-JLI_PrefixVersionId(const char *id1, char *id2)
-{
-    char        *s1 = JLI_StringDup(id1);
-    char        *s2 = JLI_StringDup(id2);
-    char        *m1 = s1;
-    char        *m2 = s2;
-    char        *end1 = NULL;
-    char        *end2 = NULL;
-    int res = 0;
-
-    do {
-
-        if ((s1 != NULL) && ((end1 = JLI_StrPBrk(s1, ".-_")) != NULL))
-            *end1 = '\0';
-        if ((s2 != NULL) && ((end2 = JLI_StrPBrk(s2, ".-_")) != NULL))
-            *end2 = '\0';
-
-        res = comp_string(s1, s2);
-
-        if (end1 != NULL)
-            s1 = end1 + 1;
-        else
-            s1 = NULL;
-        if (end2 != NULL)
-            s2 = end2 + 1;
-        else
-            s2 = NULL;
-
-    } while (res == 0 && ((s1 != NULL) && (s2 != NULL)));
-
-    JLI_MemFree(m1);
-    JLI_MemFree(m2);
-    return (res);
-}
-
-/*
- *      Modeled after strcmp(), compare two version-ids for an Exact
- *      Match as defined in JSR 56.
- */
-int
-JLI_ExactVersionId(const char *id1, char *id2)
-{
-    char        *s1 = JLI_StringDup(id1);
-    char        *s2 = JLI_StringDup(id2);
-    char        *m1 = s1;
-    char        *m2 = s2;
-    char        *end1 = NULL;
-    char        *end2 = NULL;
-    int res = 0;
-
-    do {
-
-        if ((s1 != NULL) && ((end1 = JLI_StrPBrk(s1, separators)) != NULL))
-            *end1 = '\0';
-        if ((s2 != NULL) && ((end2 = JLI_StrPBrk(s2, separators)) != NULL))
-            *end2 = '\0';
-
-        if ((s1 != NULL) && (s2 == NULL))
-            res = comp_string(s1, zero_string);
-        else if ((s1 == NULL) && (s2 != NULL))
-            res = comp_string(zero_string, s2);
-        else
-            res = comp_string(s1, s2);
-
-        if (end1 != NULL)
-            s1 = end1 + 1;
-        else
-            s1 = NULL;
-        if (end2 != NULL)
-            s2 = end2 + 1;
-        else
-            s2 = NULL;
-
-    } while (res == 0 && ((s1 != NULL) || (s2 != NULL)));
-
-    JLI_MemFree(m1);
-    JLI_MemFree(m2);
-    return (res);
-}
-
-/*
- *      Return true if this simple-element (as defined in JSR 56) forms
- *      an acceptable match.
- *
- *      JSR 56 is modified by the Java Web Start <rel> Developer Guide
- *      where it is stated "... Java Web Start will not consider an installed
- *      non-FCS (i.e., milestone) JRE as a match. ... a JRE from Sun
- *      Microsystems, Inc., is by convention a non-FCS (milestone) JRE
- *      if there is a dash (-) in the version string."
- *
- *      An undocumented caveat to the above is that an exact match with a
- *      hyphen is accepted as a development extension.
- *
- *      These modifications are addressed by the specific comparisons
- *      for releases with hyphens.
- */
-static int
-acceptable_simple_element(const char *release, char *simple_element)
-{
-    char        *modifier;
-    modifier = simple_element + JLI_StrLen(simple_element) - 1;
-    if (*modifier == '*') {
-        *modifier = '\0';
-        if (JLI_StrChr(release, '-'))
-            return ((JLI_StrCmp(release, simple_element) == 0)?1:0);
-        return ((JLI_PrefixVersionId(release, simple_element) == 0)?1:0);
-    } else if (*modifier == '+') {
-        *modifier = '\0';
-        if (JLI_StrChr(release, '-'))
-            return ((JLI_StrCmp(release, simple_element) == 0)?1:0);
-        return ((JLI_ExactVersionId(release, simple_element) >= 0)?1:0);
-    } else {
-        return ((JLI_ExactVersionId(release, simple_element) == 0)?1:0);
-    }
-}
-
-/*
- *      Return true if this element (as defined in JSR 56) forms
- *      an acceptable match. An element is the intersection (and)
- *      of multiple simple-elements.
- */
-static int
-acceptable_element(const char *release, char *element)
-{
-    char        *end;
-    do {
-        if ((end = JLI_StrChr(element, '&')) != NULL)
-            *end = '\0';
-        if (!acceptable_simple_element(release, element))
-            return (0);
-        if (end != NULL)
-            element = end + 1;
-    } while (end != NULL);
-    return (1);
-}
-
-/*
- *      Checks if release is acceptable by the specification version-string.
- *      Return true if this version-string (as defined in JSR 56) forms
- *      an acceptable match. A version-string is the union (or) of multiple
- *      elements.
- */
-int
-JLI_AcceptableRelease(const char *release, char *version_string)
-{
-    char        *vs;
-    char        *m1;
-    char        *end;
-    m1 = vs = JLI_StringDup(version_string);
-    do {
-        if ((end = JLI_StrChr(vs, ' ')) != NULL)
-            *end = '\0';
-        if (acceptable_element(release, vs)) {
-            JLI_MemFree(m1);
-            return (1);
-        }
-        if (end != NULL)
-            vs = end + 1;
-    } while (end != NULL);
-    JLI_MemFree(m1);
-    return (0);
-}
-
-/*
- *      Return true if this is a valid simple-element (as defined in JSR 56).
- *
- *      The official grammar for a simple-element is:
- *
- *              simple-element  ::= version-id | version-id modifier
- *              modifier        ::= '+' | '*'
- *              version-id      ::= string ( separator  string )*
- *              string          ::= char ( char )*
- *              char            ::= Any ASCII character except a space, an
- *                                  ampersand, a separator or a modifier
- *              separator       ::= '.' | '-' | '_'
- *
- *      However, for efficiency, it is time to abandon the top down parser
- *      implementation.  After deleting the potential trailing modifier, we
- *      are left with a version-id.
- *
- *      Note that a valid version-id has three simple properties:
- *
- *      1) Doesn't contain a space, an ampersand or a modifier.
- *
- *      2) Doesn't begin or end with a separator.
- *
- *      3) Doesn't contain two adjacent separators.
- *
- *      Any other line noise constitutes a valid version-id.
- */
-static int
-valid_simple_element(char *simple_element)
-{
-    char        *last;
-    size_t      len;
-
-    if ((simple_element == NULL) || ((len = JLI_StrLen(simple_element)) == 0))
-        return (0);
-    last = simple_element + len - 1;
-    if (*last == '*' || *last == '+') {
-        if (--len == 0)
-            return (0);
-        *last-- = '\0';
-    }
-    if (JLI_StrPBrk(simple_element, " &+*") != NULL)    /* Property #1 */
-        return (0);
-    if ((JLI_StrChr(".-_", *simple_element) != NULL) || /* Property #2 */
-      (JLI_StrChr(".-_", *last) != NULL))
-        return (0);
-    for (; simple_element != last; simple_element++)    /* Property #3 */
-        if ((JLI_StrChr(".-_", *simple_element) != NULL) &&
-          (JLI_StrChr(".-_", *(simple_element + 1)) != NULL))
-            return (0);
-    return (1);
-}
-
-/*
- *      Return true if this is a valid element (as defined in JSR 56).
- *      An element is the intersection (and) of multiple simple-elements.
- */
-static int
-valid_element(char *element)
-{
-    char        *end;
-    if ((element == NULL) || (JLI_StrLen(element) == 0))
-        return (0);
-    do {
-        if ((end = JLI_StrChr(element, '&')) != NULL)
-            *end = '\0';
-        if (!valid_simple_element(element))
-            return (0);
-        if (end != NULL)
-            element = end + 1;
-    } while (end != NULL);
-    return (1);
-}
-
-/*
- *      Validates a version string by the extended JSR 56 grammar.
- */
-int
-JLI_ValidVersionString(char *version_string)
-{
-    char        *vs;
-    char        *m1;
-    char        *end;
-    if ((version_string == NULL) || (JLI_StrLen(version_string) == 0))
-        return (0);
-    m1 = vs = JLI_StringDup(version_string);
-    do {
-        if ((end = JLI_StrChr(vs, ' ')) != NULL)
-            *end = '\0';
-        if (!valid_element(vs)) {
-            JLI_MemFree(m1);
-            return (0);
-        }
-        if (end != NULL)
-            vs = end + 1;
-    } while (end != NULL);
-    JLI_MemFree(m1);
-    return (1);
-}
--- a/src/java.base/share/native/libjli/version_comp.h	Tue Dec 16 09:57:33 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2003, 2005, 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 _VERSION_COMP_H
-#define _VERSION_COMP_H
-
-/*
- * Function prototypes.
- */
-int JLI_ExactVersionId(const char *id1, char *id2);
-int JLI_PrefixVersionId(const char *id1, char *id2);
-int JLI_AcceptableRelease(const char *release, char *version_string);
-int JLI_ValidVersionString(char *version_string);
-
-#endif /* _VERSION_COMP_H */
--- a/src/java.base/unix/classes/sun/nio/ch/FileKey.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/unix/classes/sun/nio/ch/FileKey.java	Tue Dec 16 09:58:02 2014 -0800
@@ -38,13 +38,9 @@
 
     private FileKey() { }
 
-    public static FileKey create(FileDescriptor fd) {
+    public static FileKey create(FileDescriptor fd) throws IOException {
         FileKey fk = new FileKey();
-        try {
-            fk.init(fd);
-        } catch (IOException ioe) {
-            throw new Error(ioe);
-        }
+        fk.init(fd);
         return fk;
     }
 
--- a/src/java.base/unix/classes/sun/nio/fs/UnixChannelFactory.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/unix/classes/sun/nio/fs/UnixChannelFactory.java	Tue Dec 16 09:58:02 2014 -0800
@@ -270,6 +270,22 @@
             throw x;
         }
 
+        // fail if the file is a directory
+        if (flags.read) {
+            UnixException exc = null;
+            try {
+                if (UnixFileAttributes.get(fd).isDirectory()) {
+                    exc = new UnixException(EISDIR);
+                }
+            } catch (UnixException x) {
+                exc = x;
+            }
+            if (exc != null) {
+                close(fd);
+                throw exc;
+            }
+        }
+
         // unlink file immediately if delete on close. The spec is clear that
         // an implementation cannot guarantee to unlink the correct file when
         // replaced by an attacker after it is opened.
--- a/src/java.base/unix/native/libjli/java_md.h	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/unix/native/libjli/java_md.h	Tue Dec 16 09:58:02 2014 -0800
@@ -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
@@ -43,11 +43,6 @@
 #define MAXNAMELEN              PATH_MAX
 #endif
 
-/*
- * Common function prototypes and sundries.
- */
-char *LocateJRE(manifest_info *info);
-void ExecJRE(char *jre, char **argv);
 int UnsetEnv(char *name);
 char *FindExecName(char *program);
 const char *SetExecname(char **argv);
--- a/src/java.base/unix/native/libjli/java_md_common.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/unix/native/libjli/java_md_common.c	Tue Dec 16 09:58:02 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 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
@@ -191,200 +191,6 @@
 }
 
 /*
- *      Determine if there is an acceptable JRE in the directory dirname.
- *      Upon locating the "best" one, return a fully qualified path to
- *      it. "Best" is defined as the most advanced JRE meeting the
- *      constraints contained in the manifest_info. If no JRE in this
- *      directory meets the constraints, return NULL.
- *
- *      Note that we don't check for errors in reading the directory
- *      (which would be done by checking errno).  This is because it
- *      doesn't matter if we get an error reading the directory, or
- *      we just don't find anything interesting in the directory.  We
- *      just return NULL in either case.
- *
- *      The historical names of j2sdk and j2re were changed to jdk and
- *      jre respecively as part of the 1.5 rebranding effort.  Since the
- *      former names are legacy on Linux, they must be recognized for
- *      all time.  Fortunately, this is a minor cost.
- */
-static char
-*ProcessDir(manifest_info *info, char *dirname)
-{
-    DIR     *dirp;
-    struct dirent *dp;
-    char    *best = NULL;
-    int     offset;
-    int     best_offset = 0;
-    char    *ret_str = NULL;
-    char    buffer[PATH_MAX];
-
-    if ((dirp = opendir(dirname)) == NULL)
-        return (NULL);
-
-    do {
-        if ((dp = readdir(dirp)) != NULL) {
-            offset = 0;
-            if ((JLI_StrNCmp(dp->d_name, "jre", 3) == 0) ||
-                (JLI_StrNCmp(dp->d_name, "jdk", 3) == 0))
-                offset = 3;
-            else if (JLI_StrNCmp(dp->d_name, "j2re", 4) == 0)
-                offset = 4;
-            else if (JLI_StrNCmp(dp->d_name, "j2sdk", 5) == 0)
-                offset = 5;
-            if (offset > 0) {
-                if ((JLI_AcceptableRelease(dp->d_name + offset,
-                    info->jre_version)) && CheckSanity(dirname, dp->d_name))
-                    if ((best == NULL) || (JLI_ExactVersionId(
-                      dp->d_name + offset, best + best_offset) > 0)) {
-                        if (best != NULL)
-                            JLI_MemFree(best);
-                        best = JLI_StringDup(dp->d_name);
-                        best_offset = offset;
-                    }
-            }
-        }
-    } while (dp != NULL);
-    (void) closedir(dirp);
-    if (best == NULL)
-        return (NULL);
-    else {
-        ret_str = JLI_MemAlloc(JLI_StrLen(dirname) + JLI_StrLen(best) + 2);
-        sprintf(ret_str, "%s/%s", dirname, best);
-        JLI_MemFree(best);
-        return (ret_str);
-    }
-}
-
-/*
- *      This is the global entry point. It examines the host for the optimal
- *      JRE to be used by scanning a set of directories.  The set of directories
- *      is platform dependent and can be overridden by the environment
- *      variable JAVA_VERSION_PATH.
- *
- *      This routine itself simply determines the set of appropriate
- *      directories before passing control onto ProcessDir().
- */
-char*
-LocateJRE(manifest_info* info)
-{
-    char        *path;
-    char        *home;
-    char        *target = NULL;
-    char        *dp;
-    char        *cp;
-
-    /*
-     * Start by getting JAVA_VERSION_PATH
-     */
-    if (info->jre_restrict_search) {
-        path = JLI_StringDup(system_dir);
-    } else if ((path = getenv("JAVA_VERSION_PATH")) != NULL) {
-        path = JLI_StringDup(path);
-    } else {
-        if ((home = getenv("HOME")) != NULL) {
-            path = (char *)JLI_MemAlloc(JLI_StrLen(home) + \
-                        JLI_StrLen(system_dir) + JLI_StrLen(user_dir) + 2);
-            sprintf(path, "%s%s:%s", home, user_dir, system_dir);
-        } else {
-            path = JLI_StringDup(system_dir);
-        }
-    }
-
-    /*
-     * Step through each directory on the path. Terminate the scan with
-     * the first directory with an acceptable JRE.
-     */
-    cp = dp = path;
-    while (dp != NULL) {
-        cp = JLI_StrChr(dp, (int)':');
-        if (cp != NULL)
-            *cp = '\0';
-        if ((target = ProcessDir(info, dp)) != NULL)
-            break;
-        dp = cp;
-        if (dp != NULL)
-            dp++;
-    }
-    JLI_MemFree(path);
-    return (target);
-}
-
-/*
- * Given a path to a jre to execute, this routine checks if this process
- * is indeed that jre.  If not, it exec's that jre.
- *
- * We want to actually check the paths rather than just the version string
- * built into the executable, so that given version specification (and
- * JAVA_VERSION_PATH) will yield the exact same Java environment, regardless
- * of the version of the arbitrary launcher we start with.
- */
-void
-ExecJRE(char *jre, char **argv)
-{
-    char    wanted[PATH_MAX];
-    const char* progname = GetProgramName();
-    const char* execname = NULL;
-
-    /*
-     * Resolve the real path to the directory containing the selected JRE.
-     */
-    if (realpath(jre, wanted) == NULL) {
-        JLI_ReportErrorMessage(JRE_ERROR9, jre);
-        exit(1);
-    }
-
-    /*
-     * Resolve the real path to the currently running launcher.
-     */
-    SetExecname(argv);
-    execname = GetExecName();
-    if (execname == NULL) {
-        JLI_ReportErrorMessage(JRE_ERROR10);
-        exit(1);
-    }
-
-    /*
-     * If the path to the selected JRE directory is a match to the initial
-     * portion of the path to the currently executing JRE, we have a winner!
-     * If so, just return.
-     */
-    if (JLI_StrNCmp(wanted, execname, JLI_StrLen(wanted)) == 0)
-        return;                 /* I am the droid you were looking for */
-
-
-    /*
-     * This should never happen (because of the selection code in SelectJRE),
-     * but check for "impossibly" long path names just because buffer overruns
-     * can be so deadly.
-     */
-    if (JLI_StrLen(wanted) + JLI_StrLen(progname) + 6 > PATH_MAX) {
-        JLI_ReportErrorMessage(JRE_ERROR11);
-        exit(1);
-    }
-
-    /*
-     * Construct the path and exec it.
-     */
-    (void)JLI_StrCat(JLI_StrCat(wanted, "/bin/"), progname);
-    argv[0] = JLI_StringDup(progname);
-    if (JLI_IsTraceLauncher()) {
-        int i;
-        printf("ReExec Command: %s (%s)\n", wanted, argv[0]);
-        printf("ReExec Args:");
-        for (i = 1; argv[i] != NULL; i++)
-            printf(" %s", argv[i]);
-        printf("\n");
-    }
-    JLI_TraceLauncher("TRACER_MARKER:About to EXEC\n");
-    (void)fflush(stdout);
-    (void)fflush(stderr);
-    execv(wanted, argv);
-    JLI_ReportErrorMessageSys(JRE_ERROR12, wanted);
-    exit(1);
-}
-
-/*
  * "Borrowed" from Solaris 10 where the unsetenv() function is being added
  * to libc thanks to SUSv3 (Standard Unix Specification, version 3). As
  * such, in the fullness of time this will appear in libc on all relevant
--- a/src/java.base/unix/native/libjli/java_md_solinux.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/unix/native/libjli/java_md_solinux.c	Tue Dec 16 09:58:02 2014 -0800
@@ -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
@@ -36,7 +36,6 @@
 #include <unistd.h>
 #include <sys/types.h>
 #include "manifest_info.h"
-#include "version_comp.h"
 
 
 #define JVM_DLL "libjvm.so"
@@ -90,7 +89,7 @@
  *
  * However, if the environment contains a LD_LIBRARY_PATH, this will cause the
  * launcher to inspect the LD_LIBRARY_PATH. The launcher will check
- *  a. if the LD_LIBRARY_PATH's first component is the the path to the desired
+ *  a. if the LD_LIBRARY_PATH's first component is the path to the desired
  *     libjvm.so
  *  b. if any other libjvm.so is found in any of the paths.
  * If case b is true, then the launcher will set the LD_LIBRARY_PATH to the
@@ -100,10 +99,6 @@
  *  (incoming argv)
  *  |
  * \|/
- * SelectVersion
- * (selects the JRE version, note: not data model)
- *  |
- * \|/
  * CreateExecutionEnvironment
  * (determines desired data model)
  *  |
--- a/src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c	Tue Dec 16 09:58:02 2014 -0800
@@ -2070,7 +2070,7 @@
              * so we switch to IPV6_ADD_MEMBERSHIP socket option.
              * As of 2.4.7 kernel IPV6_ADD_MEMBERSHIP can't handle IPv4-mapped
              * addresses so we have to use IP_ADD_MEMBERSHIP for IPv4 multicast
-             * groups. However if the socket is an IPv6 socket then then setsockopt
+             * groups. However if the socket is an IPv6 socket then setsockopt
              * should return ENOPROTOOPT. We assume this will be fixed in Linux
              * at some stage.
              */
--- a/src/java.base/unix/native/libnet/PlainSocketImpl.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/unix/native/libnet/PlainSocketImpl.c	Tue Dec 16 09:58:02 2014 -0800
@@ -1053,7 +1053,7 @@
     } else {
         fd = (*env)->GetIntField(env, fdObj, IO_fd_fdID);
         /* Bug 4086704 - If the Socket associated with this file descriptor
-         * was closed (sysCloseFD), the the file descriptor is set to -1.
+         * was closed (sysCloseFD), the file descriptor is set to -1.
          */
         if (fd == -1) {
             JNU_ThrowByName(env, "java/net/SocketException", "Socket closed");
--- a/src/java.base/unix/native/libnet/SocketOutputStream.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/unix/native/libnet/SocketOutputStream.c	Tue Dec 16 09:58:02 2014 -0800
@@ -74,7 +74,7 @@
     } else {
         fd = (*env)->GetIntField(env, fdObj, IO_fd_fdID);
         /* Bug 4086704 - If the Socket associated with this file descriptor
-         * was closed (sysCloseFD), the the file descriptor is set to -1.
+         * was closed (sysCloseFD), the file descriptor is set to -1.
          */
         if (fd == -1) {
             JNU_ThrowByName(env, "java/net/SocketException", "Socket closed");
--- a/src/java.base/unix/native/libnet/net_util_md.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/unix/native/libnet/net_util_md.c	Tue Dec 16 09:58:02 2014 -0800
@@ -1433,7 +1433,7 @@
 
     /*
      * On Linux the receive buffer is used for both socket
-     * structures and the the packet payload. The implication
+     * structures and the packet payload. The implication
      * is that if SO_RCVBUF is too small then small packets
      * must be discard.
      */
--- a/src/java.base/windows/classes/sun/nio/ch/FileKey.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/windows/classes/sun/nio/ch/FileKey.java	Tue Dec 16 09:58:02 2014 -0800
@@ -39,13 +39,9 @@
 
     private FileKey() { }
 
-    public static FileKey create(FileDescriptor fd) {
+    public static FileKey create(FileDescriptor fd) throws IOException {
         FileKey fk = new FileKey();
-        try {
-            fk.init(fd);
-        } catch (IOException ioe) {
-            throw new Error(ioe);
-        }
+        fk.init(fd);
         return fk;
     }
 
--- a/src/java.base/windows/native/libjli/cmdtoargs.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/windows/native/libjli/cmdtoargs.c	Tue Dec 16 09:58:02 2014 -0800
@@ -26,7 +26,7 @@
 
 /*
  * Converts a single string command line to the traditional argc, argv.
- * There are rules which govern the breaking of the the arguments, and
+ * There are rules which govern the breaking of the arguments, and
  * these rules are embodied in the regression tests below, and duplicated
  * in the jdk regression tests.
  */
--- a/src/java.base/windows/native/libjli/java_md.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/windows/native/libjli/java_md.c	Tue Dec 16 09:58:02 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -37,7 +37,6 @@
 
 #include <jni.h>
 #include "java.h"
-#include "version_comp.h"
 
 #define JVM_DLL "jvm.dll"
 #define JAVA_DLL "java.dll"
@@ -675,420 +674,6 @@
 }
 
 /*
- * Determine if there is an acceptable JRE in the registry directory top_key.
- * Upon locating the "best" one, return a fully qualified path to it.
- * "Best" is defined as the most advanced JRE meeting the constraints
- * contained in the manifest_info. If no JRE in this directory meets the
- * constraints, return NULL.
- *
- * It doesn't matter if we get an error reading the registry, or we just
- * don't find anything interesting in the directory.  We just return NULL
- * in either case.
- */
-static char *
-ProcessDir(manifest_info* info, HKEY top_key) {
-    DWORD   index = 0;
-    HKEY    ver_key;
-    char    name[MAXNAMELEN];
-    int     len;
-    char    *best = NULL;
-
-    /*
-     * Enumerate "<top_key>/SOFTWARE/JavaSoft/Java Runtime Environment"
-     * searching for the best available version.
-     */
-    while (RegEnumKey(top_key, index, name, MAXNAMELEN) == ERROR_SUCCESS) {
-        index++;
-        if (JLI_AcceptableRelease(name, info->jre_version))
-            if ((best == NULL) || (JLI_ExactVersionId(name, best) > 0)) {
-                if (best != NULL)
-                    JLI_MemFree(best);
-                best = JLI_StringDup(name);
-            }
-    }
-
-    /*
-     * Extract "JavaHome" from the "best" registry directory and return
-     * that path.  If no appropriate version was located, or there is an
-     * error in extracting the "JavaHome" string, return null.
-     */
-    if (best == NULL)
-        return (NULL);
-    else {
-        if (RegOpenKeyEx(top_key, best, 0, KEY_READ, &ver_key)
-          != ERROR_SUCCESS) {
-            JLI_MemFree(best);
-            if (ver_key != NULL)
-                RegCloseKey(ver_key);
-            return (NULL);
-        }
-        JLI_MemFree(best);
-        len = MAXNAMELEN;
-        if (RegQueryValueEx(ver_key, "JavaHome", NULL, NULL, (LPBYTE)name, &len)
-          != ERROR_SUCCESS) {
-            if (ver_key != NULL)
-                RegCloseKey(ver_key);
-            return (NULL);
-        }
-        if (ver_key != NULL)
-            RegCloseKey(ver_key);
-        return (JLI_StringDup(name));
-    }
-}
-
-/*
- * This is the global entry point. It examines the host for the optimal
- * JRE to be used by scanning a set of registry entries.  This set of entries
- * is hardwired on Windows as "Software\JavaSoft\Java Runtime Environment"
- * under the set of roots "{ HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE }".
- *
- * This routine simply opens each of these registry directories before passing
- * control onto ProcessDir().
- */
-char *
-LocateJRE(manifest_info* info) {
-    HKEY    key = NULL;
-    char    *path;
-    int     key_index;
-    HKEY    root_keys[2] = { HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE };
-
-    for (key_index = 0; key_index <= 1; key_index++) {
-        if (RegOpenKeyEx(root_keys[key_index], JRE_KEY, 0, KEY_READ, &key)
-          == ERROR_SUCCESS)
-            if ((path = ProcessDir(info, key)) != NULL) {
-                if (key != NULL)
-                    RegCloseKey(key);
-                return (path);
-            }
-        if (key != NULL)
-            RegCloseKey(key);
-    }
-    return NULL;
-}
-
-/*
- * Local helper routine to isolate a single token (option or argument)
- * from the command line.
- *
- * This routine accepts a pointer to a character pointer.  The first
- * token (as defined by MSDN command-line argument syntax) is isolated
- * from that string.
- *
- * Upon return, the input character pointer pointed to by the parameter s
- * is updated to point to the remainding, unscanned, portion of the string,
- * or to a null character if the entire string has been consummed.
- *
- * This function returns a pointer to a null-terminated string which
- * contains the isolated first token, or to the null character if no
- * token could be isolated.
- *
- * Note the side effect of modifying the input string s by the insertion
- * of a null character, making it two strings.
- *
- * See "Parsing C Command-Line Arguments" in the MSDN Library for the
- * parsing rule details.  The rule summary from that specification is:
- *
- *  * Arguments are delimited by white space, which is either a space or a tab.
- *
- *  * A string surrounded by double quotation marks is interpreted as a single
- *    argument, regardless of white space contained within. A quoted string can
- *    be embedded in an argument. Note that the caret (^) is not recognized as
- *    an escape character or delimiter.
- *
- *  * A double quotation mark preceded by a backslash, \", is interpreted as a
- *    literal double quotation mark (").
- *
- *  * Backslashes are interpreted literally, unless they immediately precede a
- *    double quotation mark.
- *
- *  * If an even number of backslashes is followed by a double quotation mark,
- *    then one backslash (\) is placed in the argv array for every pair of
- *    backslashes (\\), and the double quotation mark (") is interpreted as a
- *    string delimiter.
- *
- *  * If an odd number of backslashes is followed by a double quotation mark,
- *    then one backslash (\) is placed in the argv array for every pair of
- *    backslashes (\\) and the double quotation mark is interpreted as an
- *    escape sequence by the remaining backslash, causing a literal double
- *    quotation mark (") to be placed in argv.
- */
-static char*
-nextarg(char** s) {
-    char    *p = *s;
-    char    *head;
-    int     slashes = 0;
-    int     inquote = 0;
-
-    /*
-     * Strip leading whitespace, which MSDN defines as only space or tab.
-     * (Hence, no locale specific "isspace" here.)
-     */
-    while (*p != (char)0 && (*p == ' ' || *p == '\t'))
-        p++;
-    head = p;                   /* Save the start of the token to return */
-
-    /*
-     * Isolate a token from the command line.
-     */
-    while (*p != (char)0 && (inquote || !(*p == ' ' || *p == '\t'))) {
-        if (*p == '\\' && *(p+1) == '"' && slashes % 2 == 0)
-            p++;
-        else if (*p == '"')
-            inquote = !inquote;
-        slashes = (*p++ == '\\') ? slashes + 1 : 0;
-    }
-
-    /*
-     * If the token isolated isn't already terminated in a "char zero",
-     * then replace the whitespace character with one and move to the
-     * next character.
-     */
-    if (*p != (char)0)
-        *p++ = (char)0;
-
-    /*
-     * Update the parameter to point to the head of the remaining string
-     * reflecting the command line and return a pointer to the leading
-     * token which was isolated from the command line.
-     */
-    *s = p;
-    return (head);
-}
-
-/*
- * Local helper routine to return a string equivalent to the input string
- * s, but with quotes removed so the result is a string as would be found
- * in argv[].  The returned string should be freed by a call to JLI_MemFree().
- *
- * The rules for quoting (and escaped quotes) are:
- *
- *  1 A double quotation mark preceded by a backslash, \", is interpreted as a
- *    literal double quotation mark (").
- *
- *  2 Backslashes are interpreted literally, unless they immediately precede a
- *    double quotation mark.
- *
- *  3 If an even number of backslashes is followed by a double quotation mark,
- *    then one backslash (\) is placed in the argv array for every pair of
- *    backslashes (\\), and the double quotation mark (") is interpreted as a
- *    string delimiter.
- *
- *  4 If an odd number of backslashes is followed by a double quotation mark,
- *    then one backslash (\) is placed in the argv array for every pair of
- *    backslashes (\\) and the double quotation mark is interpreted as an
- *    escape sequence by the remaining backslash, causing a literal double
- *    quotation mark (") to be placed in argv.
- */
-static char*
-unquote(const char *s) {
-    const char *p = s;          /* Pointer to the tail of the original string */
-    char *un = (char*)JLI_MemAlloc(JLI_StrLen(s) + 1);  /* Ptr to unquoted string */
-    char *pun = un;             /* Pointer to the tail of the unquoted string */
-
-    while (*p != '\0') {
-        if (*p == '"') {
-            p++;
-        } else if (*p == '\\') {
-            const char *q = p + JLI_StrSpn(p,"\\");
-            if (*q == '"')
-                do {
-                    *pun++ = '\\';
-                    p += 2;
-                 } while (*p == '\\' && p < q);
-            else
-                while (p < q)
-                    *pun++ = *p++;
-        } else {
-            *pun++ = *p++;
-        }
-    }
-    *pun = '\0';
-    return un;
-}
-
-/*
- * Given a path to a jre to execute, this routine checks if this process
- * is indeed that jre.  If not, it exec's that jre.
- *
- * We want to actually check the paths rather than just the version string
- * built into the executable, so that given version specification will yield
- * the exact same Java environment, regardless of the version of the arbitrary
- * launcher we start with.
- */
-void
-ExecJRE(char *jre, char **argv) {
-    jint     len;
-    char    path[MAXPATHLEN + 1];
-
-    const char *progname = GetProgramName();
-
-    /*
-     * Resolve the real path to the currently running launcher.
-     */
-    len = GetModuleFileName(NULL, path, MAXPATHLEN + 1);
-    if (len == 0 || len > MAXPATHLEN) {
-        JLI_ReportErrorMessageSys(JRE_ERROR9, progname);
-        exit(1);
-    }
-
-    JLI_TraceLauncher("ExecJRE: old: %s\n", path);
-    JLI_TraceLauncher("ExecJRE: new: %s\n", jre);
-
-    /*
-     * If the path to the selected JRE directory is a match to the initial
-     * portion of the path to the currently executing JRE, we have a winner!
-     * If so, just return.
-     */
-    if (JLI_StrNCaseCmp(jre, path, JLI_StrLen(jre)) == 0)
-        return;                 /* I am the droid you were looking for */
-
-    /*
-     * If this isn't the selected version, exec the selected version.
-     */
-    JLI_Snprintf(path, sizeof(path), "%s\\bin\\%s.exe", jre, progname);
-
-    /*
-     * Although Windows has an execv() entrypoint, it doesn't actually
-     * overlay a process: it can only create a new process and terminate
-     * the old process.  Therefore, any processes waiting on the initial
-     * process wake up and they shouldn't.  Hence, a chain of pseudo-zombie
-     * processes must be retained to maintain the proper wait semantics.
-     * Fortunately the image size of the launcher isn't too large at this
-     * time.
-     *
-     * If it weren't for this semantic flaw, the code below would be ...
-     *
-     *     execv(path, argv);
-     *     JLI_ReportErrorMessage("Error: Exec of %s failed\n", path);
-     *     exit(1);
-     *
-     * The incorrect exec semantics could be addressed by:
-     *
-     *     exit((int)spawnv(_P_WAIT, path, argv));
-     *
-     * Unfortunately, a bug in Windows spawn/exec impementation prevents
-     * this from completely working.  All the Windows POSIX process creation
-     * interfaces are implemented as wrappers around the native Windows
-     * function CreateProcess().  CreateProcess() takes a single string
-     * to specify command line options and arguments, so the POSIX routine
-     * wrappers build a single string from the argv[] array and in the
-     * process, any quoting information is lost.
-     *
-     * The solution to this to get the original command line, to process it
-     * to remove the new multiple JRE options (if any) as was done for argv
-     * in the common SelectVersion() routine and finally to pass it directly
-     * to the native CreateProcess() Windows process control interface.
-     */
-    {
-        char    *cmdline;
-        char    *p;
-        char    *np;
-        char    *ocl;
-        char    *ccl;
-        char    *unquoted;
-        DWORD   exitCode;
-        STARTUPINFO si;
-        PROCESS_INFORMATION pi;
-
-        /*
-         * The following code block gets and processes the original command
-         * line, replacing the argv[0] equivalent in the command line with
-         * the path to the new executable and removing the appropriate
-         * Multiple JRE support options. Note that similar logic exists
-         * in the platform independent SelectVersion routine, but is
-         * replicated here due to the syntax of CreateProcess().
-         *
-         * The magic "+ 4" characters added to the command line length are
-         * 2 possible quotes around the path (argv[0]), a space after the
-         * path and a terminating null character.
-         */
-        ocl = GetCommandLine();
-        np = ccl = JLI_StringDup(ocl);
-        p = nextarg(&np);               /* Discard argv[0] */
-        cmdline = (char *)JLI_MemAlloc(JLI_StrLen(path) + JLI_StrLen(np) + 4);
-        if (JLI_StrChr(path, (int)' ') == NULL && JLI_StrChr(path, (int)'\t') == NULL)
-            cmdline = JLI_StrCpy(cmdline, path);
-        else
-            cmdline = JLI_StrCat(JLI_StrCat(JLI_StrCpy(cmdline, "\""), path), "\"");
-
-        while (*np != (char)0) {                /* While more command-line */
-            p = nextarg(&np);
-            if (*p != (char)0) {                /* If a token was isolated */
-                unquoted = unquote(p);
-                if (*unquoted == '-') {         /* Looks like an option */
-                    if (JLI_StrCmp(unquoted, "-classpath") == 0 ||
-                      JLI_StrCmp(unquoted, "-cp") == 0) {       /* Unique cp syntax */
-                        cmdline = JLI_StrCat(JLI_StrCat(cmdline, " "), p);
-                        p = nextarg(&np);
-                        if (*p != (char)0)      /* If a token was isolated */
-                            cmdline = JLI_StrCat(JLI_StrCat(cmdline, " "), p);
-                    } else if (JLI_StrNCmp(unquoted, "-version:", 9) != 0 &&
-                      JLI_StrCmp(unquoted, "-jre-restrict-search") != 0 &&
-                      JLI_StrCmp(unquoted, "-no-jre-restrict-search") != 0) {
-                        cmdline = JLI_StrCat(JLI_StrCat(cmdline, " "), p);
-                    }
-                } else {                        /* End of options */
-                    cmdline = JLI_StrCat(JLI_StrCat(cmdline, " "), p);
-                    cmdline = JLI_StrCat(JLI_StrCat(cmdline, " "), np);
-                    JLI_MemFree((void *)unquoted);
-                    break;
-                }
-                JLI_MemFree((void *)unquoted);
-            }
-        }
-        JLI_MemFree((void *)ccl);
-
-        if (JLI_IsTraceLauncher()) {
-            np = ccl = JLI_StringDup(cmdline);
-            p = nextarg(&np);
-            printf("ReExec Command: %s (%s)\n", path, p);
-            printf("ReExec Args: %s\n", np);
-            JLI_MemFree((void *)ccl);
-        }
-        (void)fflush(stdout);
-        (void)fflush(stderr);
-
-        /*
-         * The following code is modeled after a model presented in the
-         * Microsoft Technical Article "Moving Unix Applications to
-         * Windows NT" (March 6, 1994) and "Creating Processes" on MSDN
-         * (Februrary 2005).  It approximates UNIX spawn semantics with
-         * the parent waiting for termination of the child.
-         */
-        memset(&si, 0, sizeof(si));
-        si.cb =sizeof(STARTUPINFO);
-        memset(&pi, 0, sizeof(pi));
-
-        if (!CreateProcess((LPCTSTR)path,       /* executable name */
-          (LPTSTR)cmdline,                      /* command line */
-          (LPSECURITY_ATTRIBUTES)NULL,          /* process security attr. */
-          (LPSECURITY_ATTRIBUTES)NULL,          /* thread security attr. */
-          (BOOL)TRUE,                           /* inherits system handles */
-          (DWORD)0,                             /* creation flags */
-          (LPVOID)NULL,                         /* environment block */
-          (LPCTSTR)NULL,                        /* current directory */
-          (LPSTARTUPINFO)&si,                   /* (in) startup information */
-          (LPPROCESS_INFORMATION)&pi)) {        /* (out) process information */
-            JLI_ReportErrorMessageSys(SYS_ERROR1, path);
-            exit(1);
-        }
-
-        if (WaitForSingleObject(pi.hProcess, INFINITE) != WAIT_FAILED) {
-            if (GetExitCodeProcess(pi.hProcess, &exitCode) == FALSE)
-                exitCode = 1;
-        } else {
-            JLI_ReportErrorMessage(SYS_ERROR2);
-            exitCode = 1;
-        }
-
-        CloseHandle(pi.hThread);
-        CloseHandle(pi.hProcess);
-
-        exit(exitCode);
-    }
-}
-
-/*
  * Wrapper for platform dependent unsetenv function.
  */
 int
--- a/src/java.base/windows/native/libjli/java_md.h	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/windows/native/libjli/java_md.h	Tue Dec 16 09:58:02 2014 -0800
@@ -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
@@ -50,8 +50,7 @@
 /*
  * Function prototypes.
  */
-char *LocateJRE(manifest_info *info);
-void ExecJRE(char *jre, char **argv);
+
 int UnsetEnv(char *name);
 
 #endif /* JAVA_MD_H */
--- a/src/java.base/windows/native/libnet/TwoStacksPlainSocketImpl.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.base/windows/native/libnet/TwoStacksPlainSocketImpl.c	Tue Dec 16 09:58:02 2014 -0800
@@ -1159,7 +1159,7 @@
     } else {
         fd = (*env)->GetIntField(env, fdObj, IO_fd_fdID);
         /* Bug 4086704 - If the Socket associated with this file descriptor
-         * was closed (sysCloseFD), the the file descriptor is set to -1.
+         * was closed (sysCloseFD), the file descriptor is set to -1.
          */
         if (fd == -1) {
             JNU_ThrowByName(env, "java/net/SocketException", "Socket closed");
--- a/src/java.corba/share/classes/com/sun/jndi/cosnaming/CNNameParser.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.corba/share/classes/com/sun/jndi/cosnaming/CNNameParser.java	Tue Dec 16 09:58:02 2014 -0800
@@ -256,7 +256,7 @@
     private static String stringifyComponent(NameComponent comp) {
         StringBuilder one = new StringBuilder(escape(comp.id));
         if (comp.kind != null && !comp.kind.equals("")) {
-            one.append(kindSeparator + escape(comp.kind));
+            one.append(kindSeparator).append(escape(comp.kind));
         }
         if (one.length() == 0) {
             return ""+kindSeparator;  // if neither id nor kind specified
--- a/src/java.desktop/macosx/classes/com/apple/laf/AquaScrollPaneUI.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/macosx/classes/com/apple/laf/AquaScrollPaneUI.java	Tue Dec 16 09:58:02 2014 -0800
@@ -41,7 +41,7 @@
 
     // This is a grody hack to trick BasicScrollPaneUI into scrolling horizontally
     // when we notice that the shift key is down. This should be removed when AWT/Swing
-    // becomes aware of of multi-axis scroll wheels.
+    // becomes aware of multi-axis scroll wheels.
     protected class XYMouseWheelHandler extends javax.swing.plaf.basic.BasicScrollPaneUI.MouseWheelHandler {
         public void mouseWheelMoved(final MouseWheelEvent e) {
             JScrollBar vScrollBar = null;
--- a/src/java.desktop/macosx/classes/sun/java2d/OSXSurfaceData.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/macosx/classes/sun/java2d/OSXSurfaceData.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1094,7 +1094,7 @@
     }
 
     /**
-     * Clips the copy area to the heavywieght bounds and returns the cliped rectangle. The tricky part here is the the
+     * Clips the copy area to the heavywieght bounds and returns the cliped rectangle. The tricky part here is the
      * passed arguments x, y are in the coordinate space of the sg2d/lightweight comp. In order to do the clipping we
      * translate them to the coordinate space of the surface, and the returned clipped rectangle is in the coordinate
      * space of the surface.
--- a/src/java.desktop/macosx/native/libawt_lwawt/awt/ImageSurfaceData.m	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/ImageSurfaceData.m	Tue Dec 16 09:58:02 2014 -0800
@@ -1692,7 +1692,7 @@
 {
     ImageSDOps *isdo = (ImageSDOps*)ops;
 
-    // For every ImageSD_Unlock, we need to be be conservative and mark the pixels
+    // For every ImageSD_Unlock, we need to be conservative and mark the pixels
     // as modified by the Sun2D renderer.
     isdo->javaImageInfo[sun_java2d_OSXOffScreenSurfaceData_kNeedToSyncFromJavaPixelsIndex] = 1;
 
--- a/src/java.desktop/macosx/native/libawt_lwawt/awt/QuartzSurfaceData.m	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/QuartzSurfaceData.m	Tue Dec 16 09:58:02 2014 -0800
@@ -72,7 +72,7 @@
 
 // given a UInt32 color, it tries to find that find the corresponding CGColorRef in the hash cache. If the CGColorRef
 // doesn't exist or there is a collision, it creates a new one CGColorRef and put's in the cache. Then,
-// it sets with current fill/stroke color for the the CGContext passed in (qsdo->cgRef).
+// it sets with current fill/stroke color for the CGContext passed in (qsdo->cgRef).
 void setCachedColor(QuartzSDOps *qsdo, UInt32 color)
 {
     static const CGFloat kColorConversionMultiplier = 1.0f/255.0f;
--- a/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKColorChooserPanel.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKColorChooserPanel.java	Tue Dec 16 09:58:02 2014 -0800
@@ -898,7 +898,7 @@
                              y > innerR)) {
                 return false;
             }
-            // Rotate to origin and and verify x is valid.
+            // Rotate to origin and verify x is valid.
             int triangleSize = innerR * 3 / 2;
             double x1 = Math.cos(angle) * x - Math.sin(angle) * y;
             double y1 = Math.sin(angle) * x + Math.cos(angle) * y;
--- a/src/java.desktop/share/classes/com/sun/media/sound/AbstractMidiDevice.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/com/sun/media/sound/AbstractMidiDevice.java	Tue Dec 16 09:58:02 2014 -0800
@@ -87,7 +87,7 @@
      * @param info the description of the device
      */
     /*
-     * The initial mode and and only supported mode default to OMNI_ON_POLY.
+     * The initial mode and only supported mode default to OMNI_ON_POLY.
      */
     protected AbstractMidiDevice(MidiDevice.Info info) {
 
@@ -108,7 +108,7 @@
 
     /** Open the device from an application program.
      * Setting the open reference count to -1 here prevents Transmitters and Receivers that
-     * opened the the device implicitly from closing it. The only way to close the device after
+     * opened the device implicitly from closing it. The only way to close the device after
      * this call is a call to close().
      */
     public final void open() throws MidiUnavailableException {
--- a/src/java.desktop/share/classes/java/awt/Button.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/Button.java	Tue Dec 16 09:58:02 2014 -0800
@@ -609,7 +609,7 @@
          * Perform the specified Action on the object
          *
          * @param i zero-based index of actions
-         * @return true if the the action was performed; else false.
+         * @return true if the action was performed; else false.
          */
         public boolean doAccessibleAction(int i) {
             if (i == 0) {
--- a/src/java.desktop/share/classes/java/awt/Checkbox.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/Checkbox.java	Tue Dec 16 09:58:02 2014 -0800
@@ -788,7 +788,7 @@
          * Perform the specified Action on the object
          *
          * @param i zero-based index of actions
-         * @return true if the the action was performed; else false.
+         * @return true if the action was performed; else false.
          */
         public boolean doAccessibleAction(int i) {
             return false;    //  To be fully implemented in a future release
--- a/src/java.desktop/share/classes/java/awt/Component.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/Component.java	Tue Dec 16 09:58:02 2014 -0800
@@ -4281,7 +4281,7 @@
         }
 
         /**
-         * Makes specified region of the the next available buffer visible
+         * Makes specified region of the next available buffer visible
          * by either blitting or flipping.
          */
         void showSubRegion(int x1, int y1, int x2, int y2) {
@@ -7431,7 +7431,7 @@
      * @param id one of KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
      *        KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, or
      *        KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS
-     * @return <code>true</code> if the the Set of focus traversal keys for the
+     * @return <code>true</code> if the Set of focus traversal keys for the
      *         given focus traversal operation has been explicitly defined for
      *         this Component; <code>false</code> otherwise.
      * @throws IllegalArgumentException if id is not one of
--- a/src/java.desktop/share/classes/java/awt/Container.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/Container.java	Tue Dec 16 09:58:02 2014 -0800
@@ -3195,7 +3195,7 @@
      *        KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS,
      *        KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or
      *        KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS
-     * @return <code>true</code> if the the Set of focus traversal keys for the
+     * @return <code>true</code> if the Set of focus traversal keys for the
      *         given focus traversal operation has been explicitly defined for
      *         this Component; <code>false</code> otherwise.
      * @throws IllegalArgumentException if id is not one of
--- a/src/java.desktop/share/classes/java/awt/EventQueue.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/EventQueue.java	Tue Dec 16 09:58:02 2014 -0800
@@ -823,7 +823,7 @@
     }
 
     /**
-     * Returns the the event currently being dispatched by the
+     * Returns the event currently being dispatched by the
      * <code>EventQueue</code> associated with the calling thread. This is
      * useful if a method needs access to the event, but was not designed to
      * receive a reference to it as an argument. Note that this method should
--- a/src/java.desktop/share/classes/java/awt/FlowLayout.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/FlowLayout.java	Tue Dec 16 09:58:02 2014 -0800
@@ -503,7 +503,7 @@
      * @param width the width dimensions
      * @param height the height dimensions
      * @param rowStart the beginning of the row
-     * @param rowEnd the the ending of the row
+     * @param rowEnd the ending of the row
      * @param useBaseline Whether or not to align on baseline.
      * @param ascent Ascent for the components. This is only valid if
      *               useBaseline is true.
--- a/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1771,7 +1771,7 @@
      * will be notified in the order in which they were added; the current
      * KeyboardFocusManager will be notified last. Notifications will halt
      * as soon as one KeyEventPostProcessor returns <code>true</code> from its
-     * <code>postProcessKeyEvent</code> method. There is no limit to the the
+     * <code>postProcessKeyEvent</code> method. There is no limit to the
      * total number of KeyEventPostProcessors that can be added, nor to the
      * number of times that a particular KeyEventPostProcessor instance can be
      * added.
@@ -2666,7 +2666,7 @@
                      * We allow to trigger restoreFocus() in the dispatching process
                      * only if we have the last request to dispatch. If the last request
                      * fails, focus will be restored to either the component of the last
-                     * previously succeeded request, or to to the focus owner that was
+                     * previously succeeded request, or to the focus owner that was
                      * before this clearing process.
                      */
                     if (!iter.hasNext()) {
--- a/src/java.desktop/share/classes/java/awt/List.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/List.java	Tue Dec 16 09:58:02 2014 -0800
@@ -347,7 +347,7 @@
     }
 
     /**
-     * Adds the specified item to the the scrolling list
+     * Adds the specified item to the scrolling list
      * at the position indicated by the index.  The index is
      * zero-based.  If the value of the index is less than zero,
      * or if the value of the index is greater than or equal to
@@ -364,7 +364,7 @@
     }
 
     /**
-     * Adds the specified item to the the list
+     * Adds the specified item to the list
      * at the position indicated by the index.
      *
      * @param  item the item to be added
--- a/src/java.desktop/share/classes/java/awt/MultipleGradientPaintContext.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/MultipleGradientPaintContext.java	Tue Dec 16 09:58:02 2014 -0800
@@ -418,7 +418,7 @@
             // each interval
             gradients[i] = new int[GRADIENT_SIZE];
 
-            // get the the 2 colors
+            // get the 2 colors
             rgb1 = colors[i].getRGB();
             rgb2 = colors[i+1].getRGB();
 
--- a/src/java.desktop/share/classes/java/awt/RadialGradientPaint.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/RadialGradientPaint.java	Tue Dec 16 09:58:02 2014 -0800
@@ -94,7 +94,7 @@
  * Note that some minor variations in distances may occur due to sampling at
  * the granularity of a pixel.
  * If no cycle method is specified, {@code NO_CYCLE} will be chosen by
- * default, which means the the last keyframe color will be used to fill the
+ * default, which means the last keyframe color will be used to fill the
  * remaining area.
  * <p>
  * The colorSpace parameter allows the user to specify in which colorspace
--- a/src/java.desktop/share/classes/java/awt/WaitDispatchSupport.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/WaitDispatchSupport.java	Tue Dec 16 09:58:02 2014 -0800
@@ -208,7 +208,7 @@
                     }
                 }, interval);
             }
-            // Dispose SequencedEvent we are dispatching on the the current
+            // Dispose SequencedEvent we are dispatching on the current
             // AppContext, to prevent us from hang - see 4531693 for details
             SequencedEvent currentSE = KeyboardFocusManager.
                 getCurrentKeyboardFocusManager().getCurrentSequencedEvent();
@@ -220,7 +220,7 @@
             }
             // In case the exit() method is called before starting
             // new event pump it will post the waking event to EDT.
-            // The event will be handled after the the new event pump
+            // The event will be handled after the new event pump
             // starts. Thus, the enter() method will not hang.
             //
             // Event pump should be privileged. See 6300270.
--- a/src/java.desktop/share/classes/java/awt/datatransfer/DataFlavor.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/datatransfer/DataFlavor.java	Tue Dec 16 09:58:02 2014 -0800
@@ -384,7 +384,7 @@
      * @param representationClass the class used to transfer data in this flavor
      * @param humanPresentableName the human-readable string used to identify
      *                 this flavor; if this parameter is <code>null</code>
-     *                 then the value of the the MIME Content Type is used
+     *                 then the value of the MIME Content Type is used
      * @exception NullPointerException if <code>representationClass</code> is null
      */
     public DataFlavor(Class<?> representationClass, String humanPresentableName) {
@@ -418,7 +418,7 @@
      *                 is thrown
      * @param humanPresentableName the human-readable string used to identify
      *                 this flavor; if this parameter is <code>null</code>
-     *                 then the value of the the MIME Content Type is used
+     *                 then the value of the MIME Content Type is used
      * @exception IllegalArgumentException if <code>mimeType</code> is
      *                 invalid or if the class is not successfully loaded
      * @exception NullPointerException if <code>mimeType</code> is null
--- a/src/java.desktop/share/classes/java/awt/event/KeyEvent.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/event/KeyEvent.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1309,7 +1309,7 @@
     /**
      * Set the keyChar value to indicate a logical character.
      *
-     * @param keyChar a char corresponding to to the combination of keystrokes
+     * @param keyChar a char corresponding to the combination of keystrokes
      *                that make up this event.
      */
     public void setKeyChar(char keyChar) {
--- a/src/java.desktop/share/classes/java/awt/font/GlyphVector.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/font/GlyphVector.java	Tue Dec 16 09:58:02 2014 -0800
@@ -341,7 +341,7 @@
     /**
      * Returns the position of the specified glyph relative to the
      * origin of this <code>GlyphVector</code>.
-     * If <code>glyphIndex</code> equals the number of of glyphs in
+     * If <code>glyphIndex</code> equals the number of glyphs in
      * this <code>GlyphVector</code>, this method returns the position after
      * the last glyph. This position is used to define the advance of
      * the entire <code>GlyphVector</code>.
@@ -358,7 +358,7 @@
     /**
      * Sets the position of the specified glyph within this
      * <code>GlyphVector</code>.
-     * If <code>glyphIndex</code> equals the number of of glyphs in
+     * If <code>glyphIndex</code> equals the number of glyphs in
      * this <code>GlyphVector</code>, this method sets the position after
      * the last glyph. This position is used to define the advance of
      * the entire <code>GlyphVector</code>.
@@ -477,7 +477,7 @@
      * coordinates of the glyph numbered <code>beginGlyphIndex + position/2</code>.
      * Odd numbered array entries beginning with position one are the Y
      * coordinates of the glyph numbered <code>beginGlyphIndex + (position-1)/2</code>.
-     * If <code>beginGlyphIndex</code> equals the number of of glyphs in
+     * If <code>beginGlyphIndex</code> equals the number of glyphs in
      * this <code>GlyphVector</code>, this method gets the position after
      * the last glyph and this position is used to define the advance of
      * the entire <code>GlyphVector</code>.
--- a/src/java.desktop/share/classes/java/awt/font/TextAttribute.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/font/TextAttribute.java	Tue Dec 16 09:58:02 2014 -0800
@@ -832,7 +832,7 @@
     /**
      * Attribute key for the embedding level of the text.  Values are
      * instances of <b><code>Integer</code></b>.  The default value is
-     * <code>null</code>, indicating that the the Bidirectional
+     * <code>null</code>, indicating that the Bidirectional
      * algorithm should run without explicit embeddings.
      *
      * <p>Positive values 1 through 61 are <em>embedding</em> levels,
--- a/src/java.desktop/share/classes/java/awt/image/ColorConvertOp.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/image/ColorConvertOp.java	Tue Dec 16 09:58:02 2014 -0800
@@ -577,7 +577,7 @@
 
     /**
      * Returns the bounding box of the destination, given this source.
-     * Note that this will be the same as the the bounding box of the
+     * Note that this will be the same as the bounding box of the
      * source.
      * @param src the source <code>BufferedImage</code>
      * @return a <code>Rectangle2D</code> that is the bounding box
@@ -589,7 +589,7 @@
 
     /**
      * Returns the bounding box of the destination, given this source.
-     * Note that this will be the same as the the bounding box of the
+     * Note that this will be the same as the bounding box of the
      * source.
      * @param src the source <code>Raster</code>
      * @return a <code>Rectangle2D</code> that is the bounding box
--- a/src/java.desktop/share/classes/java/awt/image/ComponentColorModel.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/image/ComponentColorModel.java	Tue Dec 16 09:58:02 2014 -0800
@@ -92,7 +92,7 @@
  * <p>
  * For instances with unsigned sample values,
  * the unnormalized color/alpha component representation is only
- * supported if two conditions hold.  First, sample value value 0 must
+ * supported if two conditions hold.  First, sample value 0 must
  * map to normalized component value 0.0 and sample value 2<sup>n</sup> - 1
  * to 1.0.  Second the min/max range of all color components of the
  * <code>ColorSpace</code> must be 0.0 to 1.0.  In this case, the
--- a/src/java.desktop/share/classes/java/awt/print/PrinterIOException.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/java/awt/print/PrinterIOException.java	Tue Dec 16 09:58:02 2014 -0800
@@ -76,7 +76,7 @@
     }
 
     /**
-     * Returns the the cause of this exception (the <code>IOException</code>
+     * Returns the cause of this exception (the <code>IOException</code>
      * that terminated the print job).
      *
      * @return  the cause of this exception.
--- a/src/java.desktop/share/classes/java/beans/Encoder.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/java/beans/Encoder.java	Tue Dec 16 09:58:02 2014 -0800
@@ -121,7 +121,7 @@
      * it is returned.
      * <li>
      * A persistence delegate is then looked up by the name
-     * composed of the the fully qualified name of the given type
+     * composed of the fully qualified name of the given type
      * and the "PersistenceDelegate" postfix.
      * For example, a persistence delegate for the {@code Bean} class
      * should be named {@code BeanPersistenceDelegate}
--- a/src/java.desktop/share/classes/java/beans/Transient.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/java/beans/Transient.java	Tue Dec 16 09:58:02 2014 -0800
@@ -41,7 +41,7 @@
  * indicates to encoders derived from {@link Encoder}
  * that this feature should be ignored.
  * <p>
- * The {@code Transient} annotation may be be used
+ * The {@code Transient} annotation may be used
  * in any of the methods that are involved
  * in a {@link FeatureDescriptor} subclass
  * to identify the transient feature in the annotated class and its subclasses.
--- a/src/java.desktop/share/classes/javax/imageio/IIOParam.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/imageio/IIOParam.java	Tue Dec 16 09:58:02 2014 -0800
@@ -442,7 +442,7 @@
     }
 
     /**
-     * Returns the set of of source bands to be used. The returned
+     * Returns the set of source bands to be used. The returned
      * value is that set by the most recent call to
      * <code>setSourceBands</code>, or <code>null</code> if there have
      * been no calls to <code>setSourceBands</code>.
--- a/src/java.desktop/share/classes/javax/imageio/event/IIOReadUpdateListener.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/imageio/event/IIOReadUpdateListener.java	Tue Dec 16 09:58:02 2014 -0800
@@ -70,7 +70,7 @@
      * a value of 1 means no gaps.
      * @param periodY the vertical spacing between updated pixels;
      * a value of 1 means no gaps.
-     * @param bands an array of <code>int</code>s indicating the the
+     * @param bands an array of <code>int</code>s indicating the
      * set bands that may be updated.
      */
     void passStarted(ImageReader source,
@@ -187,7 +187,7 @@
      * a value of 1 means no gaps.
      * @param periodY the vertical spacing between updated pixels;
      * a value of 1 means no gaps.
-     * @param bands an array of <code>int</code>s indicating the the
+     * @param bands an array of <code>int</code>s indicating the
      * set bands that may be updated.
      *
      * @see #passStarted
--- a/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/JPEGQTable.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/imageio/plugins/jpeg/JPEGQTable.java	Tue Dec 16 09:58:02 2014 -0800
@@ -136,7 +136,7 @@
     /**
      * Constructs a quantization table from the argument, which must
      * contain 64 elements in natural order (not zig-zag order).
-     * A copy is made of the the input array.
+     * A copy is made of the input array.
      * @param table the quantization table, as an <code>int</code> array.
      * @throws IllegalArgumentException if <code>table</code> is
      * <code>null</code> or <code>table.length</code> is not equal to 64.
--- a/src/java.desktop/share/classes/javax/sound/midi/MidiMessage.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/sound/midi/MidiMessage.java	Tue Dec 16 09:58:02 2014 -0800
@@ -52,7 +52,7 @@
  * API uses integers instead of bytes when expressing MIDI data. For example,
  * the {@link #getStatus()} method of {@code MidiMessage} returns MIDI status
  * bytes as integers. If you are processing MIDI data that originated outside
- * Java Sound and now is encoded as signed bytes, the bytes can can be
+ * Java Sound and now is encoded as signed bytes, the bytes can be
  * converted to integers using this conversion:
  *
  * <center>{@code int i = (int)(byte & 0xFF)}</center>
--- a/src/java.desktop/share/classes/javax/sound/midi/ShortMessage.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/sound/midi/ShortMessage.java	Tue Dec 16 09:58:02 2014 -0800
@@ -303,7 +303,7 @@
      * @param  status the MIDI status byte
      * @param  data1 the first data byte
      * @param  data2 the second data byte
-     * @throws InvalidMidiDataException if the the status byte, or all data
+     * @throws InvalidMidiDataException if the status byte, or all data
      *         bytes belonging to the message, do not specify a valid MIDI
      *         message
      * @see #setMessage(int, int, int, int)
--- a/src/java.desktop/share/classes/javax/sound/sampled/Clip.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/sound/sampled/Clip.java	Tue Dec 16 09:58:02 2014 -0800
@@ -178,7 +178,7 @@
     /**
      * Sets the first and last sample frames that will be played in the loop.
      * The ending point must be greater than or equal to the starting point, and
-     * both must fall within the the size of the loaded media. A value of 0 for
+     * both must fall within the size of the loaded media. A value of 0 for
      * the starting point means the beginning of the loaded media. Similarly, a
      * value of -1 for the ending point indicates the last frame of the media.
      *
--- a/src/java.desktop/share/classes/javax/swing/AbstractButton.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/AbstractButton.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1474,7 +1474,7 @@
      * area.  If you wish to have a transparent button, such as
      * an icon only button, for example, then you should set
      * this to <code>false</code>. Do not call <code>setOpaque(false)</code>.
-     * The default value for the the <code>contentAreaFilled</code>
+     * The default value for the <code>contentAreaFilled</code>
      * property is <code>true</code>.
      * <p>
      * This function may cause the component's opaque property to change.
@@ -1538,7 +1538,7 @@
     }
 
     /**
-     * Returns the keyboard mnemonic from the the current model.
+     * Returns the keyboard mnemonic from the current model.
      * @return the keyboard mnemonic from the model
      */
     public int getMnemonic() {
@@ -2562,7 +2562,7 @@
          * Perform the specified Action on the object
          *
          * @param i zero-based index of actions
-         * @return true if the the action was performed; else false.
+         * @return true if the action was performed; else false.
          */
         public boolean doAccessibleAction(int i) {
             if (i == 0) {
--- a/src/java.desktop/share/classes/javax/swing/ArrayTable.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/ArrayTable.java	Tue Dec 16 09:58:02 2014 -0800
@@ -51,7 +51,7 @@
     /**
      * Writes the passed in ArrayTable to the passed in ObjectOutputStream.
      * The data is saved as an integer indicating how many key/value
-     * pairs are being archived, followed by the the key/value pairs. If
+     * pairs are being archived, followed by the key/value pairs. If
      * <code>table</code> is null, 0 will be written to <code>s</code>.
      * <p>
      * This is a convenience method that ActionMap/InputMap and
--- a/src/java.desktop/share/classes/javax/swing/Box.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/Box.java	Tue Dec 16 09:58:02 2014 -0800
@@ -82,7 +82,7 @@
 
     /**
      * Creates a <code>Box</code> that displays its components
-     * along the the specified axis.
+     * along the specified axis.
      *
      * @param axis  can be {@link BoxLayout#X_AXIS},
      *              {@link BoxLayout#Y_AXIS},
--- a/src/java.desktop/share/classes/javax/swing/GroupLayout.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/GroupLayout.java	Tue Dec 16 09:58:02 2014 -0800
@@ -2396,7 +2396,7 @@
      * {@code CONSTANT_DESCENT}; otherwise the baseline is anchored to the top
      * of the group.
      * <p>
-     * Elements aligned to the baseline are resizable if they have have
+     * Elements aligned to the baseline are resizable if they have
      * a baseline resize behavior of {@code CONSTANT_ASCENT} or
      * {@code CONSTANT_DESCENT}. Elements with a baseline resize
      * behavior of {@code OTHER} or {@code CENTER_OFFSET} are not resizable.
--- a/src/java.desktop/share/classes/javax/swing/JComboBox.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/JComboBox.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1919,7 +1919,7 @@
          * Perform the specified Action on the object
          *
          * @param i zero-based index of actions
-         * @return true if the the action was performed; else false.
+         * @return true if the action was performed; else false.
          */
         public boolean doAccessibleAction(int i) {
             if (i == 0) {
--- a/src/java.desktop/share/classes/javax/swing/JComponent.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/JComponent.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1882,7 +1882,7 @@
     }
 
     /**
-     * Sets the the horizontal alignment.
+     * Sets the horizontal alignment.
      *
      * @param alignmentY  the new horizontal alignment
      * @see #getAlignmentY
@@ -1911,7 +1911,7 @@
     }
 
     /**
-     * Sets the the vertical alignment.
+     * Sets the vertical alignment.
      *
      * @param alignmentX  the new vertical alignment
      * @see #getAlignmentX
@@ -4799,7 +4799,7 @@
     /**
      * Notifies this component that it no longer has a parent component.
      * When this method is invoked, any <code>KeyboardAction</code>s
-     * set up in the the chain of parent components are removed.
+     * set up in the chain of parent components are removed.
      * This method is called by the toolkit internally and should
      * not be called directly by programs.
      *
@@ -5576,7 +5576,7 @@
      * the UI before any of the <code>JComponent</code>'s children
      * (or its <code>LayoutManager</code> etc.) are written,
      * and we don't want to restore the UI until the most derived
-     * <code>JComponent</code> subclass has been been stored.
+     * <code>JComponent</code> subclass has been stored.
      *
      * @param s the <code>ObjectOutputStream</code> in which to write
      */
--- a/src/java.desktop/share/classes/javax/swing/JEditorPane.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/JEditorPane.java	Tue Dec 16 09:58:02 2014 -0800
@@ -716,7 +716,7 @@
      * like fetch the stream from a cache, monitor the progress
      * of the stream, etc.
      * <p>
-     * This method is expected to have the the side effect of
+     * This method is expected to have the side effect of
      * establishing the content type, and therefore setting the
      * appropriate <code>EditorKit</code> to use for loading the stream.
      * <p>
@@ -1826,7 +1826,7 @@
              * Perform the specified Action on the object
              *
              * @param i zero-based index of actions
-             * @return true if the the action was performed; else false.
+             * @return true if the action was performed; else false.
              * @see #getAccessibleActionCount
              */
             public boolean doAccessibleAction(int i) {
--- a/src/java.desktop/share/classes/javax/swing/JLayer.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/JLayer.java	Tue Dec 16 09:58:02 2014 -0800
@@ -131,7 +131,7 @@
  * <li>{@link Container#add(java.awt.Component, Object)}</li>
  * <li>{@link Container#add(java.awt.Component, Object, int)}</li>
  * </ul>
- * using any of of them will cause {@code UnsupportedOperationException} to be thrown,
+ * using any of them will cause {@code UnsupportedOperationException} to be thrown,
  * to add a component to {@code JLayer}
  * use {@link #setView(Component)} or {@link #setGlassPane(JPanel)}.
  *
--- a/src/java.desktop/share/classes/javax/swing/JList.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/JList.java	Tue Dec 16 09:58:02 2014 -0800
@@ -140,7 +140,7 @@
  * <p>
  * The preferred way to listen for changes in list selection is to add
  * {@code ListSelectionListener}s directly to the {@code JList}. {@code JList}
- * then takes care of listening to the the selection model and notifying your
+ * then takes care of listening to the selection model and notifying your
  * listeners of change.
  * <p>
  * Responsibility for listening to selection changes in order to keep the list's
@@ -717,7 +717,7 @@
      * <p>
      * This is a JavaBeans bound property.
      *
-     * @param height the height to be used for for all cells in the list
+     * @param height the height to be used for all cells in the list
      * @see #setPrototypeCellValue
      * @see #setFixedCellWidth
      * @see JComponent#addPropertyChangeListener
--- a/src/java.desktop/share/classes/javax/swing/JMenuItem.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/JMenuItem.java	Tue Dec 16 09:58:02 2014 -0800
@@ -178,7 +178,7 @@
     }
 
     /**
-     * Inititalizes the focusability of the the <code>JMenuItem</code>.
+     * Inititalizes the focusability of the <code>JMenuItem</code>.
      * <code>JMenuItem</code>'s are focusable, but subclasses may
      * want to be, this provides them the opportunity to override this
      * and invoke something else, or nothing at all. Refer to
--- a/src/java.desktop/share/classes/javax/swing/JProgressBar.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/JProgressBar.java	Tue Dec 16 09:58:02 2014 -0800
@@ -330,7 +330,7 @@
     public JProgressBar(int orient, int min, int max)
     {
         // Creating the model this way is a bit simplistic, but
-        //  I believe that it is the the most common usage of this
+        //  I believe that it is the most common usage of this
         //  component - it's what people will expect.
         setModel(new DefaultBoundedRangeModel(min, 0, min, max));
         updateUI();
--- a/src/java.desktop/share/classes/javax/swing/JSpinner.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/JSpinner.java	Tue Dec 16 09:58:02 2014 -0800
@@ -447,7 +447,7 @@
      * Sends a <code>ChangeEvent</code>, whose source is this
      * <code>JSpinner</code>, to each <code>ChangeListener</code>.
      * When a <code>ChangeListener</code> has been added
-     * to the spinner, this method method is called each time
+     * to the spinner, this method is called each time
      * a <code>ChangeEvent</code> is received from the model.
      *
      * @see #addChangeListener
@@ -1798,7 +1798,7 @@
                 Rectangle editorRect = at.getCharacterBounds(i);
                 if (editorRect != null &&
                     sameWindowAncestor(JSpinner.this, editor)) {
-                    // return rectangle in the the JSpinner bounds
+                    // return rectangle in the JSpinner bounds
                     return SwingUtilities.convertRectangle(editor,
                                                            editorRect,
                                                            JSpinner.this);
--- a/src/java.desktop/share/classes/javax/swing/JTree.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/JTree.java	Tue Dec 16 09:58:02 2014 -0800
@@ -5575,7 +5575,7 @@
              * object behind the TreeCellRenderer.
              *
              * @param i zero-based index of actions
-             * @return true if the the action was performed; else false.
+             * @return true if the action was performed; else false.
              */
             public boolean doAccessibleAction(int i) {
                 if (i < 0 || i >= getAccessibleActionCount()) {
--- a/src/java.desktop/share/classes/javax/swing/OverlayLayout.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/OverlayLayout.java	Tue Dec 16 09:58:02 2014 -0800
@@ -97,7 +97,7 @@
      * this class to know when to invalidate layout.
      *
      * @param name the name of the component
-     * @param comp the the component to be added
+     * @param comp the component to be added
      */
     public void addLayoutComponent(String name, Component comp) {
         invalidateLayout(comp.getParent());
--- a/src/java.desktop/share/classes/javax/swing/ScrollPaneLayout.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/ScrollPaneLayout.java	Tue Dec 16 09:58:02 2014 -0800
@@ -225,7 +225,7 @@
      * </ul>
      *
      * @param s the component identifier
-     * @param c the the component to be added
+     * @param c the component to be added
      * @exception IllegalArgumentException if <code>s</code> is an invalid key
      */
     public void addLayoutComponent(String s, Component c)
--- a/src/java.desktop/share/classes/javax/swing/SpinnerModel.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/SpinnerModel.java	Tue Dec 16 09:58:02 2014 -0800
@@ -53,7 +53,7 @@
  *   <dd>The preceding element or null if <code>value</code> is the
  *     first element of the sequence.
  * </dl>
- * When the the <code>value</code> property changes,
+ * When the <code>value</code> property changes,
  * <code>ChangeListeners</code> are notified.  <code>SpinnerModel</code> may
  * choose to notify the <code>ChangeListeners</code> under other circumstances.
  *
--- a/src/java.desktop/share/classes/javax/swing/UIDefaults.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/UIDefaults.java	Tue Dec 16 09:58:02 2014 -0800
@@ -167,7 +167,7 @@
     }
 
     /**
-     * Looks up up the given key in our Hashtable and resolves LazyValues
+     * Looks up the given key in our Hashtable and resolves LazyValues
      * or ActiveValues.
      */
     private Object getFromHashtable(Object key) {
@@ -1181,7 +1181,7 @@
     /**
      * <code>LazyInputMap</code> will create a <code>InputMap</code>
      * in its <code>createValue</code>
-     * method. The bindings are passed in in the constructor.
+     * method. The bindings are passed in the constructor.
      * The bindings are an array with
      * the even number entries being string <code>KeyStrokes</code>
      * (eg "alt SPACE") and
--- a/src/java.desktop/share/classes/javax/swing/ViewportLayout.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/ViewportLayout.java	Tue Dec 16 09:58:02 2014 -0800
@@ -66,7 +66,7 @@
     /**
      * Adds the specified component to the layout. Not used by this class.
      * @param name the name of the component
-     * @param c the the component to be added
+     * @param c the component to be added
      */
     public void addLayoutComponent(String name, Component c) { }
 
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1144,7 +1144,7 @@
 
 
     /**
-     * This is is a utility method that helps event handlers figure out where to
+     * This is a utility method that helps event handlers figure out where to
      * send the focus when the popup is brought up.  The standard implementation
      * delegates the focus to the editor (if the combo box is editable) or to
      * the JComboBox if it is not editable.
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSliderUI.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSliderUI.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1449,7 +1449,7 @@
 
     /**
      * Returns the value at the y position. If {@code yPos} is beyond the
-     * track at the the bottom or the top, this method sets the value to either
+     * track at the bottom or the top, this method sets the value to either
      * the minimum or maximum value of the slider, depending on if the slider
      * is inverted or not.
      *
@@ -1927,7 +1927,7 @@
      * The recommended approach to creating bindings is to use a
      * combination of an <code>ActionMap</code>, to contain the action,
      * and an <code>InputMap</code> to contain the mapping from KeyStroke
-     * to action description. The InputMap is is usually described in the
+     * to action description. The InputMap is usually described in the
      * LookAndFeel tables.
      * <p>
      * Please refer to the key bindings specification for further details.
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java	Tue Dec 16 09:58:02 2014 -0800
@@ -344,7 +344,7 @@
             }
 
             // In cases where the lead is not within the search range,
-            // we need to bring it within one cell for the the search
+            // we need to bring it within one cell for the search
             // to work properly. Check these here.
             leadRow = Math.min(Math.max(leadRow, minY - 1), maxY + 1);
             leadColumn = Math.min(Math.max(leadColumn, minX - 1), maxX + 1);
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java	Tue Dec 16 09:58:02 2014 -0800
@@ -137,7 +137,7 @@
     /**
      * Fetches the name of the keymap that will be installed/used
      * by default for this UI. This is implemented to create a
-     * name based upon the classname.  The name is the the name
+     * name based upon the classname.  The name is the name
      * of the class with the package prefix removed.
      *
      * @return the name
--- a/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthGraphicsUtils.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthGraphicsUtils.java	Tue Dec 16 09:58:02 2014 -0800
@@ -245,7 +245,7 @@
     }
 
     /**
-     * Returns the maximum height of the the Font from the passed in
+     * Returns the maximum height of the Font from the passed in
      * SynthContext.
      *
      * @param context SynthContext used to determine font.
--- a/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/table/JTableHeader.java	Tue Dec 16 09:58:02 2014 -0800
@@ -242,7 +242,7 @@
     }
 
     /**
-     * Returns the the dragged column, if and only if, a drag is in
+     * Returns the dragged column, if and only if, a drag is in
      * process, otherwise returns <code>null</code>.
      *
      * @return  the dragged column, if a drag is in
--- a/src/java.desktop/share/classes/javax/swing/table/TableColumn.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/table/TableColumn.java	Tue Dec 16 09:58:02 2014 -0800
@@ -127,7 +127,7 @@
     /**
      *  This object is not used internally by the drawing machinery of
      *  the <code>JTable</code>; identifiers may be set in the
-     *  <code>TableColumn</code> as as an
+     *  <code>TableColumn</code> as an
      *  optional way to tag and locate table columns. The table package does
      *  not modify or invoke any methods in these identifier objects other
      *  than the <code>equals</code> method which is used in the
--- a/src/java.desktop/share/classes/javax/swing/text/BoxView.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/BoxView.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1128,7 +1128,7 @@
      * indicating the <code>View</code>s are layed out in ascending order.
      * <p>
      * If the receiver is laying its <code>View</code>s along the
-     * <code>Y_AXIS</code>, this will will return the value from
+     * <code>Y_AXIS</code>, this will return the value from
      * invoking the same method on the <code>View</code>
      * responsible for rendering <code>position</code> and
      * <code>bias</code>. Otherwise this will return false.
--- a/src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java	Tue Dec 16 09:58:02 2014 -0800
@@ -409,7 +409,7 @@
 
 
     /**
-     * Fetches the list of of style names.
+     * Fetches the list of style names.
      *
      * @return all the style names
      */
--- a/src/java.desktop/share/classes/javax/swing/text/ElementIterator.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/ElementIterator.java	Tue Dec 16 09:58:02 2014 -0800
@@ -79,7 +79,7 @@
      * as well as a child index.  If the
      * index is -1, then the element represented
      * on the stack is the element itself.
-     * Otherwise, the index functions as as index
+     * Otherwise, the index functions as an index
      * into the vector of children of the element.
      * In this case, the item on the stack
      * represents the "index"th child of the element
--- a/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java	Tue Dec 16 09:58:02 2014 -0800
@@ -403,7 +403,7 @@
      * This is implemented to try and locate a <code>TabSet</code>
      * in the paragraph element's attribute set.  If one can be
      * found, its settings will be used, otherwise a default expansion
-     * will be provided.  The base location for for tab expansion
+     * will be provided.  The base location for tab expansion
      * is the left inset from the paragraphs most recent allocation
      * (which is what the layout of the children is based upon).
      *
--- a/src/java.desktop/share/classes/javax/swing/text/PlainView.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/PlainView.java	Tue Dec 16 09:58:02 2014 -0800
@@ -385,11 +385,11 @@
         int x = (int) fx;
         int y = (int) fy;
         if (y < alloc.y) {
-            // above the area covered by this icon, so the the position
+            // above the area covered by this icon, so the position
             // is assumed to be the start of the coverage for this view.
             return getStartOffset();
         } else if (y > alloc.y + alloc.height) {
-            // below the area covered by this icon, so the the position
+            // below the area covered by this icon, so the position
             // is assumed to be the end of the coverage for this view.
             return getEndOffset() - 1;
         } else {
--- a/src/java.desktop/share/classes/javax/swing/text/WrappedPlainView.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/WrappedPlainView.java	Tue Dec 16 09:58:02 2014 -0800
@@ -668,11 +668,11 @@
             int x = (int) fx;
             int y = (int) fy;
             if (y < alloc.y) {
-                // above the area covered by this icon, so the the position
+                // above the area covered by this icon, so the position
                 // is assumed to be the start of the coverage for this view.
                 return getStartOffset();
             } else if (y > alloc.y + alloc.height) {
-                // below the area covered by this icon, so the the position
+                // below the area covered by this icon, so the position
                 // is assumed to be the end of the coverage for this view.
                 return getEndOffset() - 1;
             } else {
--- a/src/java.desktop/share/classes/javax/swing/text/html/CSS.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/html/CSS.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1588,7 +1588,7 @@
 
                 /*
                  * HTML.Attribute.ALIGN needs special processing.
-                 * It can map to to 1 of many(3) possible CSS attributes
+                 * It can map to 1 of many(3) possible CSS attributes
                  * depending on the nature of the tag the attribute is
                  * part off and depending on the value of the attribute.
                  */
--- a/src/java.desktop/share/classes/javax/swing/text/html/FormView.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/html/FormView.java	Tue Dec 16 09:58:02 2014 -0800
@@ -37,7 +37,7 @@
  * Component decorator that implements the view interface
  * for form elements, &lt;input&gt;, &lt;textarea&gt;,
  * and &lt;select&gt;.  The model for the component is stored
- * as an attribute of the the element (using StyleConstants.ModelAttribute),
+ * as an attribute of the element (using StyleConstants.ModelAttribute),
  * and is used to build the component of the view.  The type
  * of the model is assumed to of the type that would be set by
  * <code>HTMLDocument.HTMLReader.FormAction</code>.  If there are
--- a/src/java.desktop/share/classes/javax/swing/text/html/HTMLDocument.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/html/HTMLDocument.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1345,7 +1345,7 @@
     }
 
     /**
-     * Inserts the HTML specified as a string after the the end of the
+     * Inserts the HTML specified as a string after the end of the
      * given element.
      *
      * <p>Consider the following structure (the <code>elem</code>
--- a/src/java.desktop/share/classes/javax/swing/text/html/IsindexView.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/html/IsindexView.java	Tue Dec 16 09:58:02 2014 -0800
@@ -53,7 +53,7 @@
     }
 
     /**
-     * Creates the components necessary to to implement
+     * Creates the components necessary to implement
      * this view.  The component returned is a <code>JPanel</code>,
      * that contains the PROMPT to the left and <code>JTextField</code>
      * to the right.
--- a/src/java.desktop/share/classes/javax/swing/text/html/LineView.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/html/LineView.java	Tue Dec 16 09:58:02 2014 -0800
@@ -136,7 +136,7 @@
      * This is implemented to try and locate a <code>TabSet</code>
      * in the paragraph element's attribute set.  If one can be
      * found, its settings will be used, otherwise a default expansion
-     * will be provided.  The base location for for tab expansion
+     * will be provided.  The base location for tab expansion
      * is the left inset from the paragraphs most recent allocation
      * (which is what the layout of the children is based upon).
      *
--- a/src/java.desktop/share/classes/javax/swing/text/html/parser/DTDConstants.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/html/parser/DTDConstants.java	Tue Dec 16 09:58:02 2014 -0800
@@ -27,7 +27,7 @@
 
 /**
  * SGML constants used in a DTD. The names of the
- * constants correspond the the equivalent SGML constructs
+ * constants correspond to the equivalent SGML constructs
  * as described in "The SGML Handbook" by  Charles F. Goldfarb.
  *
  * @see DTD
--- a/src/java.desktop/share/classes/javax/swing/text/html/parser/Entity.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/html/parser/Entity.java	Tue Dec 16 09:58:02 2014 -0800
@@ -35,7 +35,7 @@
 
 /**
  * An entity is described in a DTD using the ENTITY construct.
- * It defines the type and value of the the entity.
+ * It defines the type and value of the entity.
  *
  * @see DTD
  * @author Arthur van Hoff
--- a/src/java.desktop/share/classes/javax/swing/text/html/parser/Parser.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/text/html/parser/Parser.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1846,7 +1846,7 @@
 
             if (unknown) {
                 // we will not see a corresponding start tag
-                // on the the stack.  If we are seeing an
+                // on the stack.  If we are seeing an
                 // end tag, lets send this on as an empty
                 // tag with the end tag attribute set to
                 // true.
--- a/src/java.desktop/share/classes/javax/swing/undo/UndoManager.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/javax/swing/undo/UndoManager.java	Tue Dec 16 09:58:02 2014 -0800
@@ -283,7 +283,7 @@
 
 
     /**
-     * Returns the the next significant edit to be undone if <code>undo</code>
+     * Returns the next significant edit to be undone if <code>undo</code>
      * is invoked. This returns <code>null</code> if there are no edits
      * to be undone.
      *
@@ -302,7 +302,7 @@
     }
 
     /**
-     * Returns the the next significant edit to be redone if <code>redo</code>
+     * Returns the next significant edit to be redone if <code>redo</code>
      * is invoked. This returns <code>null</code> if there are no edits
      * to be redone.
      *
--- a/src/java.desktop/share/classes/sun/font/BidiUtils.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/sun/font/BidiUtils.java	Tue Dec 16 09:58:02 2014 -0800
@@ -47,7 +47,7 @@
      * array instead of iterating over the runs.
      *
      * @param levels the array to receive the character levels
-     * @param start the starting offset into the the array
+     * @param start the starting offset into the array
      * @throws IndexOutOfBoundsException if <code>start</code> is less than 0 or
      * <code>start + getLength()</code> is greater than <code>levels.length</code>.
      */
--- a/src/java.desktop/share/classes/sun/font/Decoration.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/sun/font/Decoration.java	Tue Dec 16 09:58:02 2014 -0800
@@ -105,7 +105,7 @@
     }
 
     /**
-     * Return a Decoration appropriate for the the given Map.
+     * Return a Decoration appropriate for the given Map.
      * @param attributes the Map used to determine the Decoration
      */
     public static Decoration getDecoration(Map<? extends Attribute, ?> attributes) {
--- a/src/java.desktop/share/classes/sun/font/FileFontStrike.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/sun/font/FileFontStrike.java	Tue Dec 16 09:58:02 2014 -0800
@@ -898,7 +898,7 @@
 
     /* The caller of this can be trusted to return a copy of this
      * return value rectangle to public API. In fact frequently it
-     * can't use use this return value directly anyway.
+     * can't use this return value directly anyway.
      * This returns bounds in device space. Currently the only
      * caller is SGV and it converts back to user space.
      * We could change things so that this code does the conversion so
--- a/src/java.desktop/share/classes/sun/font/FontUtilities.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/sun/font/FontUtilities.java	Tue Dec 16 09:58:02 2014 -0800
@@ -214,7 +214,7 @@
      * char which means it may include undecoded surrogate pairs.
      * The distinction is made so that code which needs to identify all
      * cases in which we do not have a simple mapping from
-     * char->unicode character->glyph can be be identified.
+     * char->unicode character->glyph can be identified.
      * For example measurement cannot simply sum advances of 'chars',
      * the caret in editable text cannot advance one 'char' at a time, etc.
      * These callers really are asking for more than whether 'layout'
--- a/src/java.desktop/share/classes/sun/font/SunFontManager.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/sun/font/SunFontManager.java	Tue Dec 16 09:58:02 2014 -0800
@@ -575,7 +575,7 @@
      * that claims to support the Microsoft Windows encoding corresponding to
      * the default file.encoding property of this JRE instance.
      * This narrow value is useful for Swing to decide if the font is useful
-     * for the the Windows Look and Feel, or, if a  composite font should be
+     * for the Windows Look and Feel, or, if a composite font should be
      * used instead.
      * The information used to make the decision is obtained from
      * the ulCodePageRange fields in the font.
@@ -1611,7 +1611,7 @@
      * all non-null file names first.
      * They are added in to a map with nominally the first
      * word in the name of the family as the key. In all the cases
-     * we are using the the family name is a single word, and as is
+     * we are using the family name is a single word, and as is
      * more or less required the family name is the initial sequence
      * in a full name. So lookup first finds the matching description,
      * then registers the whole family, returning the right font.
--- a/src/java.desktop/share/classes/sun/font/SunLayoutEngine.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/sun/font/SunLayoutEngine.java	Tue Dec 16 09:58:02 2014 -0800
@@ -72,7 +72,7 @@
  * font tables (the selector indicates which).  Then layout is called,
  * the contents are copied (or not), and the stack is destroyed on
  * exit. So the association is between the font/script (layout engine
- * desc) and and one of a few permanent engine objects, which are
+ * desc) and one of a few permanent engine objects, which are
  * handed the key when they need to process something.  In the native
  * case, the engine holds an index, and just passes it together with
  * the key info down to native.  Some default cases are the 'default
--- a/src/java.desktop/share/classes/sun/font/TrueTypeFont.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/sun/font/TrueTypeFont.java	Tue Dec 16 09:58:02 2014 -0800
@@ -154,7 +154,7 @@
     /* number of table entries in the directory/offsets table */
     int numTables;
 
-    /* The contents of the the directory/offsets table */
+    /* The contents of the directory/offsets table */
     DirectoryEntry []tableDirectory;
 
 //     protected byte []gposTable = null;
@@ -228,7 +228,7 @@
             return false; /* useNatives is false */
         } else if (nativeNames instanceof String) {
             String name = (String)nativeNames;
-            /* Don't do do this for Latin fonts */
+            /* Don't do this for Latin fonts */
             if (name.indexOf("8859") > 0) {
                 checkedNatives = true;
                 return false;
--- a/src/java.desktop/share/classes/sun/java2d/loops/ProcessPath.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/sun/java2d/loops/ProcessPath.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1418,7 +1418,7 @@
                                               */
                                  );
         } else {
-            /* Clamping starting from first vertex of the the processed
+            /* Clamping starting from first vertex of the processed
              * segment
              *
              * CLIPCLAMP(xMin, xMax, x1, y1, x2, y2, x3, y3, res);
@@ -1438,7 +1438,7 @@
                 return;
             }
 
-            /* Clamping starting from last vertex of the the processed
+            /* Clamping starting from last vertex of the processed
              * segment
              *
              * CLIPCLAMP(xMin, xMax, x2, y2, x1, y1, x3, y3, res);
@@ -2062,7 +2062,7 @@
                 if (res == CRES_INVISIBLE) return;
                 lastClipped = IS_CLIPPED(res);
 
-                /* Clamping starting from first vertex of the the processed
+                /* Clamping starting from first vertex of the processed
                  * segment
                  *
                  * CLIPCLAMP(outXMin, outXMax, x1, y1, x2, y2, x3, y3, res);
@@ -2078,7 +2078,7 @@
                     return;
                 }
 
-                /* Clamping starting from last vertex of the the processed
+                /* Clamping starting from last vertex of the processed
                  * segment
                  *
                  * CLIPCLAMP(outXMin, outXMax, x2, y2, x1, y1, x3, y3, res);
--- a/src/java.desktop/share/classes/sun/java2d/pipe/BufferedContext.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/sun/java2d/pipe/BufferedContext.java	Tue Dec 16 09:58:02 2014 -0800
@@ -451,7 +451,7 @@
     public abstract RenderQueue getRenderQueue();
 
     /**
-     * Saves the the state of this context.
+     * Saves the state of this context.
      * It may reset the current context.
      *
      * Note: must be called while the RenderQueue lock is held.
--- a/src/java.desktop/share/classes/sun/print/PathGraphics.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/sun/print/PathGraphics.java	Tue Dec 16 09:58:02 2014 -0800
@@ -888,7 +888,7 @@
              * since it doesn't actually require "layout" (even though its
              * considered a layout attribute), it just requires a fractional
              * tweak to the[default]advances. So we need to specifically
-             * check for tracking until such time as as we can trust
+             * check for tracking until such time as we can trust
              * the GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS bit.
              */
             Map<TextAttribute, ?> map = font.getAttributes();
--- a/src/java.desktop/share/classes/sun/print/PeekGraphics.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/sun/print/PeekGraphics.java	Tue Dec 16 09:58:02 2014 -0800
@@ -871,7 +871,7 @@
      * paint or color, and composite attributes.
      * For characters in script systems such as Hebrew and Arabic,
      * the glyphs may be draw from right to left, in which case the
-     * coordinate supplied is the the location of the leftmost character
+     * coordinate supplied is the location of the leftmost character
      * on the baseline.
      * @param iterator the iterator whose text is to be drawn
      * @param x,y the coordinates where the iterator's text should be drawn.
@@ -897,7 +897,7 @@
      * paint or color, and composite attributes.
      * For characters in script systems such as Hebrew and Arabic,
      * the glyphs may be draw from right to left, in which case the
-     * coordinate supplied is the the location of the leftmost character
+     * coordinate supplied is the location of the leftmost character
      * on the baseline.
      * @param iterator the iterator whose text is to be drawn
      * @param x,y the coordinates where the iterator's text should be drawn.
--- a/src/java.desktop/share/classes/sun/print/PrintJob2D.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/sun/print/PrintJob2D.java	Tue Dec 16 09:58:02 2014 -0800
@@ -837,7 +837,7 @@
      * The resolution of the page is chosen so that it
      * is similar to the screen resolution.
      * Except (since 1.3) when the application specifies a resolution.
-     * In that case it it scaled accordingly.
+     * In that case it is scaled accordingly.
      */
     public Dimension getPageDimension() {
         double wid, hgt, scale;
--- a/src/java.desktop/share/classes/sun/print/ProxyGraphics2D.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/sun/print/ProxyGraphics2D.java	Tue Dec 16 09:58:02 2014 -0800
@@ -744,7 +744,7 @@
      * paint or color, and composite attributes.
      * For characters in script systems such as Hebrew and Arabic,
      * the glyphs may be draw from right to left, in which case the
-     * coordinate supplied is the the location of the leftmost character
+     * coordinate supplied is the location of the leftmost character
      * on the baseline.
      * @param iterator the iterator whose text is to be drawn
      * @param x,y the coordinates where the iterator's text should be drawn.
@@ -769,7 +769,7 @@
      * paint or color, and composite attributes.
      * For characters in script systems such as Hebrew and Arabic,
      * the glyphs may be draw from right to left, in which case the
-     * coordinate supplied is the the location of the leftmost character
+     * coordinate supplied is the location of the leftmost character
      * on the baseline.
      * @param iterator the iterator whose text is to be drawn
      * @param x,y the coordinates where the iterator's text should be drawn.
--- a/src/java.desktop/share/classes/sun/swing/AccumulativeRunnable.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/sun/swing/AccumulativeRunnable.java	Tue Dec 16 09:58:02 2014 -0800
@@ -64,7 +64,7 @@
  * </pre>
  *
  * <p>
- * Say we want want to implement addDirtyRegion(Rectangle rect)
+ * Say we want to implement addDirtyRegion(Rectangle rect)
  * which sends this region to the
  * handleDirtyRegions(List<Rect> regiouns) on the EDT.
  * addDirtyRegions better be accumulated before handling on the EDT.
--- a/src/java.desktop/share/classes/sun/swing/CachedPainter.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/classes/sun/swing/CachedPainter.java	Tue Dec 16 09:58:02 2014 -0800
@@ -79,7 +79,7 @@
     }
 
     /**
-     * Renders the cached image to the the passed in <code>Graphic</code>.
+     * Renders the cached image to the passed in <code>Graphic</code>.
      * If there is no cached image <code>paintToImage</code> will be invoked.
      * <code>paintImage</code> is invoked to paint the cached image.
      *
--- a/src/java.desktop/share/native/common/font/fontscalerdefs.h	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/native/common/font/fontscalerdefs.h	Tue Dec 16 09:58:02 2014 -0800
@@ -87,7 +87,7 @@
 #define t2kScalarAverage(a, b) (((a) + (b)) / (t2kScalar)(2))
 
   /* managed: 1 means the glyph has a hardware cached
-   * copy, and its freeing is managed by the the usual
+   * copy, and its freeing is managed by the usual
    * 2D disposer code.
    * A value of 0 means its either unaccelerated (and so has no cellInfos)
    * or we want to free this in a different way.
--- a/src/java.desktop/share/native/libawt/awt/image/gif/gifdecoder.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/native/libawt/awt/image/gif/gifdecoder.c	Tue Dec 16 09:58:02 2014 -0800
@@ -399,7 +399,7 @@
          * and therefore we have to continue looping through data
          * but skip internal output loop.
          *
-         * In particular this is is possible when
+         * In particular this is possible when
          * width of the frame is set to zero. If
          * global width (i.e. width of the logical screen)
          * is zero too then zero-length scanline buffer
--- a/src/java.desktop/share/native/libawt/java2d/loops/ProcessPath.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/native/libawt/java2d/loops/ProcessPath.c	Tue Dec 16 09:58:02 2014 -0800
@@ -1418,7 +1418,7 @@
                                             */
                                );
     } else {
-        /* Clamping starting from first vertex of the the processed segment
+        /* Clamping starting from first vertex of the processed segment
          */
         CLIPCLAMP(xMin, xMax, x1, y1, x2, y2, x3, y3, jfloat, res);
         X1 = (jint)(x1*MDP_MULT);
@@ -1435,7 +1435,7 @@
             return;
         }
 
-        /* Clamping starting from last vertex of the the processed segment
+        /* Clamping starting from last vertex of the processed segment
          */
         CLIPCLAMP(xMin, xMax, x2, y2, x1, y1, x3, y3, jfloat, res);
 
@@ -2121,7 +2121,7 @@
         if (res == CRES_INVISIBLE) return;
         lastClipped = IS_CLIPPED(res);
 
-        /* Clamping starting from first vertex of the the processed segment */
+        /* Clamping starting from first vertex of the processed segment */
         CLIPCLAMP(outXMin, outXMax, x1, y1, x2, y2, x3, y3, jint, res);
 
         /* Clamping only by left boundary */
@@ -2133,7 +2133,7 @@
             return;
         }
 
-        /* Clamping starting from last vertex of the the processed segment */
+        /* Clamping starting from last vertex of the processed segment */
         CLIPCLAMP(outXMin, outXMax, x2, y2, x1, y1, x3, y3, jint, res);
 
         /* Checking if there was a clip by right boundary */
--- a/src/java.desktop/share/native/libfontmanager/freetypeScaler.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/native/libfontmanager/freetypeScaler.c	Tue Dec 16 09:58:02 2014 -0800
@@ -183,7 +183,7 @@
                                           bBuffer, offset, numBytes);
             return bread;
         } else {
-            /* We probably hit bug bug 4845371. For reasons that
+            /* We probably hit bug 4845371. For reasons that
              * are currently unclear, the call stacks after the initial
              * createScaler call that read large amounts of data seem to
              * be OK and can create the byte buffer above, but this code
@@ -253,7 +253,7 @@
        We can consider sharing freetype library between different
        scalers. However, Freetype docs suggest to use different libraries
        for different threads. Also, our architecture implies that single
-       FontScaler object is shared for for different sizes/transforms/styles
+       FontScaler object is shared for different sizes/transforms/styles
        of the same font.
 
        On other hand these methods can not be concurrently executed
--- a/src/java.desktop/share/native/libfontmanager/layout/LayoutEngine.h	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/native/libfontmanager/layout/LayoutEngine.h	Tue Dec 16 09:58:02 2014 -0800
@@ -297,7 +297,7 @@
      * This method does character to glyph mapping. The default implementation
      * uses the font instance to do the mapping. It will allocate the glyph and
      * character index arrays if they're not already allocated. If it allocates the
-     * character index array, it will fill it it.
+     * character index array, it will fill it.
      *
      * This method supports right to left
      * text with the ability to store the glyphs in reverse order, and by supporting
@@ -537,4 +537,3 @@
 
 U_NAMESPACE_END
 #endif
-
--- a/src/java.desktop/share/native/liblcms/LCMS.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/share/native/liblcms/LCMS.c	Tue Dec 16 09:58:02 2014 -0800
@@ -879,7 +879,7 @@
         cmsCloseProfile(p);
         p =  NULL;
     } else {
-        // do final check whether we can read and handle the the target tag.
+        // do final check whether we can read and handle the target tag.
         const void* pTag = cmsReadTag(pfSanity, sig);
         if (pTag == NULL) {
             // the tag can not be cooked
--- a/src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java	Tue Dec 16 09:58:02 2014 -0800
@@ -48,7 +48,7 @@
     private final int BORDER_WIDTH; // Width of border drawn around the list
                                     // of items
     private final int ITEM_MARGIN;  // Margin between the border of the list
-                                    // of items and and item's bg, and between
+                                    // of items and item's bg, and between
                                     // items
     private final int TEXT_SPACE;   // Space between the edge of an item and
                                     // the text
--- a/src/java.desktop/unix/classes/sun/awt/X11/XEmbeddedFramePeer.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XEmbeddedFramePeer.java	Tue Dec 16 09:58:02 2014 -0800
@@ -251,7 +251,7 @@
                 embedder.registerAccelerator(iter.next(), i++);
             }
         }
-        // Now we know that the the embedder is an XEmbed server, so we
+        // Now we know that the embedder is an XEmbed server, so we
         // reregister the drop target to enable XDnD protocol support via
         // XEmbed.
         updateDropTarget();
--- a/src/java.desktop/unix/classes/sun/awt/X11/XScrollPanePeer.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XScrollPanePeer.java	Tue Dec 16 09:58:02 2014 -0800
@@ -204,7 +204,7 @@
 
         // Check to see if we hid either of the scrollbars but left
         // ourselves scrolled off of the top and/or right of the pane.
-        // If we did, we need to scroll to the top and/or right of of
+        // If we did, we need to scroll to the top and/or right of
         // the pane to make it visible.
         //
         // Reminder: see if there is a better place to put this code.
--- a/src/java.desktop/unix/classes/sun/awt/X11/XTextFieldPeer.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XTextFieldPeer.java	Tue Dec 16 09:58:02 2014 -0800
@@ -288,7 +288,7 @@
     }
 
     /**
-     * Deselects the the highlighted text.
+     * Deselects the highlighted text.
      */
     public void deselect() {
         int selStart=xtext.getSelectionStart();
--- a/src/java.desktop/unix/classes/sun/font/NativeFont.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/unix/classes/sun/font/NativeFont.java	Tue Dec 16 09:58:02 2014 -0800
@@ -369,7 +369,7 @@
          */
 //      sb.replace(hPos[6]+1, hPos[7], "0");
 
-        /* comment out this block to the the 1.4.2 behaviour */
+        /* comment out this block to the 1.4.2 behaviour */
         if (hPos[0] == 0 && hPos[1] == 1) {
             /* null foundry name : some linux font configuration files have
              * symbol font entries like this and its just plain wrong.
--- a/src/java.desktop/unix/native/common/awt/awt_Font.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/unix/native/common/awt/awt_Font.c	Tue Dec 16 09:58:02 2014 -0800
@@ -723,7 +723,7 @@
     }
 
     /* AWT fonts are always "multifonts" and probably have been in
-     * all post 1.0 releases, so this test test for multi fonts is
+     * all post 1.0 releases, so this test for multi fonts is
      * probably not needed, and the singleton xfont is probably never used.
      */
     if (fdata->charset_num > 0) {
--- a/src/java.desktop/unix/native/common/awt/medialib/mlib_v_ImageCopy_f.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/unix/native/common/awt/medialib/mlib_v_ImageCopy_f.c	Tue Dec 16 09:58:02 2014 -0800
@@ -196,7 +196,7 @@
 /***************************************************************/
 /*
  * Either source or destination data are not 8-byte aligned.
- * And size is is in bytes.
+ * And size is in bytes.
  */
 
 void mlib_ImageCopy_na(const mlib_u8 *sa,
--- a/src/java.desktop/unix/native/libawt_xawt/awt/multiVis.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/unix/native/libawt_xawt/awt/multiVis.c	Tue Dec 16 09:58:02 2014 -0800
@@ -1103,7 +1103,7 @@
                                          * of those supports a transparent
                                          * pixel. */
     int32_t             *numVisuals;            /* Number of XVisualInfo struct's
-                                         * pointed to to by pVisuals. */
+                                         * pointed to by pVisuals. */
     XVisualInfo **pVisuals;             /* All of the device's visuals. */
     int32_t             *numOverlayVisuals;     /* Number of OverlayInfo's pointed
                                          * to by pOverlayVisuals.  If this
--- a/src/java.desktop/unix/native/libawt_xawt/awt/wsutils.h	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/unix/native/libawt_xawt/awt/wsutils.h	Tue Dec 16 09:58:02 2014 -0800
@@ -167,7 +167,7 @@
                                          * of those supports a transparent
                                          * pixel. */
     int32_t             *numVisuals,            /* Number of XVisualInfo struct's
-                                         * pointed to to by pVisuals. */
+                                         * pointed to by pVisuals. */
     XVisualInfo **pVisuals,             /* All of the device's visuals. */
     int32_t             *numOverlayVisuals,     /* Number of OverlayInfo's pointed
                                          * to by pOverlayVisuals.  If this
--- a/src/java.desktop/unix/native/libmlib_image/mlib_v_ImageChannelExtract_43.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/unix/native/libmlib_image/mlib_v_ImageChannelExtract_43.c	Tue Dec 16 09:58:02 2014 -0800
@@ -252,7 +252,7 @@
 /***************************************************************/
 /*
  * Either source or destination data are not 8-byte aligned.
- * And dsize is is in pixels.
+ * And dsize is in pixels.
  */
 
 void mlib_v_ImageChannelExtract_U8_43R_D1(const mlib_u8 *src,
@@ -1182,7 +1182,7 @@
 /***************************************************************/
 /*
  * Either source or destination data are not 8-byte aligned.
- * And size is is in pixels.
+ * And size is in pixels.
  */
 
 void mlib_v_ImageChannelExtract_S16_43L_D1(const mlib_s16 *src,
--- a/src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolder2.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolder2.java	Tue Dec 16 09:58:02 2014 -0800
@@ -251,7 +251,7 @@
                         // Get a child pidl relative to 'parent'
                         long childPIDL = copyFirstPIDLEntry(pIDL);
                         if (childPIDL != 0) {
-                            // Get a handle to the the rest of the ID list
+                            // Get a handle to the rest of the ID list
                             // i,e, parent's grandchilren and down
                             pIDL = getNextPIDLEntry(pIDL);
                             if (pIDL != 0) {
--- a/src/java.desktop/windows/classes/sun/awt/windows/TranslucentWindowPainter.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/windows/classes/sun/awt/windows/TranslucentWindowPainter.java	Tue Dec 16 09:58:02 2014 -0800
@@ -110,7 +110,7 @@
     protected abstract Image getBackBuffer(boolean clear);
 
     /**
-     * Updates the the window associated with this painter with the contents
+     * Updates the window associated with this painter with the contents
      * of the passed image.
      * The image can not be null, and NPE will be thrown if it is.
      */
--- a/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java	Tue Dec 16 09:58:02 2014 -0800
@@ -183,7 +183,7 @@
     /**
      * Initializes the Toolkit for use in an embedded environment.
      *
-     * @return true if the the initialization succeeded; false if it failed.
+     * @return true if the initialization succeeded; false if it failed.
      *         The function will fail if the Toolkit was already initialized.
      * @since 1.3
      */
--- a/src/java.desktop/windows/native/libawt/java2d/windows/GDIWindowSurfaceData.cpp	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/windows/native/libawt/java2d/windows/GDIWindowSurfaceData.cpp	Tue Dec 16 09:58:02 2014 -0800
@@ -77,7 +77,7 @@
         ZeroMemory(info, sizeof(ThreadGraphicsInfo));
         TlsSetValue(threadInfoIndex, (LPVOID)info);
         J2dTraceLn2(J2D_TRACE_VERBOSE,
-                    "  current batch limit for for thread 0x%x is %d",
+                    "  current batch limit for thread 0x%x is %d",
                      GetCurrentThreadId(), ::GdiGetBatchLimit());
         J2dTraceLn(J2D_TRACE_VERBOSE, "  setting to the limit to 1");
         // Fix for bug 4374079
--- a/src/java.desktop/windows/native/libawt/windows/awt_Debug.h	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/windows/native/libawt/windows/awt_Debug.h	Tue Dec 16 09:58:02 2014 -0800
@@ -40,7 +40,7 @@
 
             static void AssertCallback(const char * expr, const char * file,
                                        int line);
-            /* This method signals that the VM is exiting cleanly, and thus the
+            /* This method signals that the VM is exiting cleanly, and thus
                the debug memory manager should dump a leaks report when the
                VM has finished exiting. This method should not be called for
                termination exits (such as <CTRL>-C) */
--- a/src/java.desktop/windows/native/libawt/windows/awt_Frame.h	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/windows/native/libawt/windows/awt_Frame.h	Tue Dec 16 09:58:02 2014 -0800
@@ -215,7 +215,7 @@
      * Hashtable<Thread, BlockedThreadStruct> - a table that contains all the
      * information about non-toolkit threads with modal blocked embedded
      * frames. This information includes: number of blocked embedded frames
-     * created on the the thread, and mouse and modal hooks installed for
+     * created on the thread, and mouse and modal hooks installed for
      * that thread. For every thread each hook is installed only once
      */
     static Hashtable sm_BlockedThreads;
--- a/src/java.desktop/windows/native/libawt/windows/awt_Palette.cpp	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/windows/native/libawt/windows/awt_Palette.cpp	Tue Dec 16 09:58:02 2014 -0800
@@ -113,7 +113,7 @@
 }
 
 /**
- * Retrieves system palette entries. Includes a workaround for for some
+ * Retrieves system palette entries. Includes a workaround for some
  * video drivers which may not support the GSPE call but may return
  * valid values from this procedure.
  */
--- a/src/java.desktop/windows/native/libawt/windows/awt_Toolkit.h	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/windows/native/libawt/windows/awt_Toolkit.h	Tue Dec 16 09:58:02 2014 -0800
@@ -553,7 +553,7 @@
         bool Terminate(bool wrongThread);
         bool InvokeAndTerminate(void(_cdecl *fn)(void *), void *param);
 
-        // waits for the the thread completion;
+        // waits for the thread completion;
         // use the method after Terminate() only if Terminate() returned true
         INLINE void Wait4Finish() {
             ::WaitForSingleObject(hFinished, INFINITE);
--- a/src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_MidiIn.cpp	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_MidiIn.cpp	Tue Dec 16 09:58:02 2014 -0800
@@ -426,7 +426,7 @@
 
     err = midiInStart((HMIDIIN) handle->deviceHandle);
         /* $$mp 200308-11: This method is already called in ...open(). It is
-           unclear why is is called again. The specification says that
+           unclear why it is called again. The specification says that
            MidiDevice.getMicrosecondPosition() returns the time since the
            device was opened (the spec doesn't know about start/stop).
            So I guess this call is obsolete. */
--- a/src/java.instrument/share/native/libinstrument/InvocationAdapter.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.instrument/share/native/libinstrument/InvocationAdapter.c	Tue Dec 16 09:58:02 2014 -0800
@@ -564,7 +564,7 @@
 /*
  * Evaluates all escapes in s.  Assumes that escapes are well-formed
  * syntactically, i.e., of the form %XX.
- * If the path does not require decoding the the original path is
+ * If the path does not require decoding the original path is
  * returned. Otherwise the decoded path (heap allocated) is returned,
  * along with the length of the decoded path. Note that the return
  * string will not be null terminated after decoding.
--- a/src/java.management/share/classes/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.management/share/classes/com/sun/jmx/interceptor/DefaultMBeanServerInterceptor.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -1707,16 +1707,19 @@
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
+    @SuppressWarnings("deprecation")
     public ObjectInputStream deserialize(ObjectName name, byte[] data) throws InstanceNotFoundException,
                                                                               OperationsException {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
+    @SuppressWarnings("deprecation")
     public ObjectInputStream deserialize(String className, byte[] data) throws OperationsException,
                                                                                ReflectionException {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
+    @SuppressWarnings("deprecation")
     public ObjectInputStream deserialize(String className, ObjectName loaderName,
             byte[] data) throws InstanceNotFoundException, OperationsException,
                                 ReflectionException {
--- a/src/java.management/share/classes/com/sun/jmx/mbeanserver/JmxMBeanServer.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.management/share/classes/com/sun/jmx/mbeanserver/JmxMBeanServer.java	Tue Dec 16 09:58:02 2014 -0800
@@ -576,7 +576,7 @@
      * the selected MBeans.
      *
      * @param name The object name pattern identifying the MBeans to
-     *      be retrieved. If null or or no domain and key properties
+     *      be retrieved. If null or no domain and key properties
      *      are specified, all the MBeans registered will be retrieved.
      * @param query The query expression to be applied for selecting
      *      MBeans. If null no query expression will be applied for
@@ -598,7 +598,7 @@
      * the names of a set of MBeans specified by pattern matching on the
      * <CODE>ObjectName</CODE> and/or a Query expression, a specific
      * MBean name (equivalent to testing whether an MBean is registered).
-     * When the object name is null or or no domain and key properties are
+     * When the object name is null or no domain and key properties are
      * specified, all objects are selected (and filtered if a query is
      * specified). It returns the set of ObjectNames for the MBeans
      * selected.
--- a/src/java.management/share/classes/com/sun/jmx/remote/internal/ClientNotifForwarder.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.management/share/classes/com/sun/jmx/remote/internal/ClientNotifForwarder.java	Tue Dec 16 09:58:02 2014 -0800
@@ -140,7 +140,7 @@
     }
 
     /**
-     * Called to to fetch notifications from a server.
+     * Called to fetch notifications from a server.
      */
     abstract protected NotificationResult fetchNotifs(long clientSequenceNumber,
                                                       int maxNotifications,
--- a/src/java.management/share/classes/com/sun/management/GarbageCollectionNotificationInfo.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.management/share/classes/com/sun/management/GarbageCollectionNotificationInfo.java	Tue Dec 16 09:58:02 2014 -0800
@@ -42,7 +42,7 @@
  * The notification emitted will contain the garbage collection notification
  * information about the status of the memory:
  * <u1>
- *   <li>The name of the garbage collector used perform the collection.</li>
+ *   <li>The name of the garbage collector used to perform the collection.</li>
  *   <li>The action performed by the garbage collector.</li>
  *   <li>The cause of the garbage collection action.</li>
  *   <li>A {@link GcInfo} object containing some statistics about the GC cycle
@@ -109,7 +109,7 @@
      *
      * @param gcName The name of the garbage collector used to perform the collection
      * @param gcAction The name of the action performed by the garbage collector
-     * @param gcCause The cause the garbage collection action
+     * @param gcCause The cause of the garbage collection action
      * @param gcInfo  a GcInfo object providing statistics about the GC cycle
      */
     public GarbageCollectionNotificationInfo(String gcName,
@@ -152,18 +152,18 @@
     }
 
     /**
-     * Returns the action of the performed by the garbage collector
+     * Returns the action performed by the garbage collector
      *
-     * @return the the action of the performed by the garbage collector
+     * @return the action performed by the garbage collector
      */
     public String getGcAction() {
         return gcAction;
     }
 
     /**
-     * Returns the cause  the garbage collection
+     * Returns the cause of the garbage collection
      *
-     * @return the the cause  the garbage collection
+     * @return the cause of the garbage collection
      */
     public String getGcCause() {
         return gcCause;
--- a/src/java.management/share/classes/javax/management/MBeanPermission.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.management/share/classes/javax/management/MBeanPermission.java	Tue Dec 16 09:58:02 2014 -0800
@@ -455,11 +455,11 @@
         name.append(className);
         if (member == null)
             member = "-";
-        name.append("#" + member);
+        name.append('#').append(member);
         if (objectName == null)
             name.append("[-]");
         else
-            name.append("[").append(objectName.getCanonicalName()).append("]");
+            name.append('[').append(objectName.getCanonicalName()).append(']');
 
         /* In the interests of legibility for Permission.toString(), we
            transform the empty string into "*".  */
--- a/src/java.management/share/classes/javax/management/modelmbean/RequiredModelMBean.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.management/share/classes/javax/management/modelmbean/RequiredModelMBean.java	Tue Dec 16 09:58:02 2014 -0800
@@ -716,15 +716,14 @@
         }
 
         retStr.append("\nMBeanInfo for ModelMBean is:");
-        retStr.append("\nCLASSNAME: \t"+ info.getClassName());
-        retStr.append("\nDESCRIPTION: \t"+ info.getDescription());
+        retStr.append("\nCLASSNAME: \t").append(info.getClassName());
+        retStr.append("\nDESCRIPTION: \t").append(info.getDescription());
 
 
         try {
-            retStr.append("\nMBEAN DESCRIPTOR: \t"+
-                          info.getMBeanDescriptor());
+            retStr.append("\nMBEAN DESCRIPTOR: \t").append(info.getMBeanDescriptor());
         } catch (Exception e) {
-            retStr.append("\nMBEAN DESCRIPTOR: \t" + " is invalid");
+            retStr.append("\nMBEAN DESCRIPTOR: \t  is invalid");
         }
 
         retStr.append("\nATTRIBUTES");
@@ -734,13 +733,12 @@
             for (int i=0; i<attrInfo.length; i++) {
                 final ModelMBeanAttributeInfo attInfo =
                     (ModelMBeanAttributeInfo)attrInfo[i];
-                retStr.append(" ** NAME: \t"+ attInfo.getName());
-                retStr.append("    DESCR: \t"+ attInfo.getDescription());
-                retStr.append("    TYPE: \t"+ attInfo.getType() +
-                              "    READ: \t"+ attInfo.isReadable() +
-                              "    WRITE: \t"+ attInfo.isWritable());
-                retStr.append("    DESCRIPTOR: " +
-                              attInfo.getDescriptor().toString());
+                retStr.append(" ** NAME: \t").append(attInfo.getName());
+                retStr.append("    DESCR: \t").append(attInfo.getDescription());
+                retStr.append("    TYPE: \t").append(attInfo.getType())
+                        .append("    READ: \t").append(attInfo.isReadable())
+                        .append("    WRITE: \t").append(attInfo.isWritable());
+                retStr.append("    DESCRIPTOR: ").append(attInfo.getDescriptor());
             }
         } else {
             retStr.append(" ** No attributes **");
@@ -752,14 +750,13 @@
             for (int i=0; i<constrInfo.length; i++) {
                 final ModelMBeanConstructorInfo ctorInfo =
                     (ModelMBeanConstructorInfo)constrInfo[i];
-                retStr.append(" ** NAME: \t"+ ctorInfo.getName());
-                retStr.append("    DESCR: \t"+
-                              ctorInfo.getDescription());
-                retStr.append("    PARAM: \t"+
-                              ctorInfo.getSignature().length +
-                              " parameter(s)");
-                retStr.append("    DESCRIPTOR: " +
-                              ctorInfo.getDescriptor().toString());
+                retStr.append(" ** NAME: \t").append(ctorInfo.getName());
+                retStr.append("    DESCR: \t").append(ctorInfo.getDescription());
+                retStr.append("    PARAM: \t")
+                        .append(ctorInfo.getSignature().length)
+                        .append(" parameter(s)");
+                retStr.append("    DESCRIPTOR: ").append(
+                        ctorInfo.getDescriptor());
             }
         } else {
             retStr.append(" ** No Constructors **");
@@ -771,13 +768,12 @@
             for (int i=0; i<opsInfo.length; i++) {
                 final ModelMBeanOperationInfo operInfo =
                     (ModelMBeanOperationInfo)opsInfo[i];
-                retStr.append(" ** NAME: \t"+ operInfo.getName());
-                retStr.append("    DESCR: \t"+ operInfo.getDescription());
-                retStr.append("    PARAM: \t"+
-                              operInfo.getSignature().length +
-                              " parameter(s)");
-                retStr.append("    DESCRIPTOR: " +
-                              operInfo.getDescriptor().toString());
+                retStr.append(" ** NAME: \t").append(operInfo.getName());
+                retStr.append("    DESCR: \t").append(operInfo.getDescription());
+                retStr.append("    PARAM: \t")
+                        .append(operInfo.getSignature().length)
+                        .append(" parameter(s)");
+                retStr.append("    DESCRIPTOR: ").append(operInfo.getDescriptor());
             }
         } else {
             retStr.append(" ** No operations ** ");
@@ -790,10 +786,9 @@
             for (int i=0; i<notifInfo.length; i++) {
                 final ModelMBeanNotificationInfo nInfo =
                     (ModelMBeanNotificationInfo)notifInfo[i];
-                retStr.append(" ** NAME: \t"+ nInfo.getName());
-                retStr.append("    DESCR: \t"+ nInfo.getDescription());
-                retStr.append("    DESCRIPTOR: " +
-                              nInfo.getDescriptor().toString());
+                retStr.append(" ** NAME: \t").append(nInfo.getName());
+                retStr.append("    DESCR: \t").append(nInfo.getDescription());
+                retStr.append("    DESCRIPTOR: ").append(nInfo.getDescriptor());
             }
         } else {
             retStr.append(" ** No notifications **");
--- a/src/java.management/share/classes/javax/management/openmbean/ArrayType.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.management/share/classes/javax/management/openmbean/ArrayType.java	Tue Dec 16 09:58:02 2014 -0800
@@ -458,8 +458,8 @@
             elementType = at.getElementOpenType();
             isPrimitiveArray = at.isPrimitiveArray();
         }
-        StringBuilder result =
-            new StringBuilder(dimension + "-dimension array of ");
+        StringBuilder result = new StringBuilder();
+        result.append(dimension).append("-dimension array of ");
         final String elementClassName = elementType.getClassName();
         if (isPrimitiveArray) {
             // Convert from wrapper type to primitive type
@@ -570,7 +570,7 @@
         // In case this ArrayType instance describes an array of classes implementing the TabularData or CompositeData interface,
         // we first check for the assignability of obj to such an array of TabularData or CompositeData,
         // which ensures that:
-        //  . obj is of the the same dimension as this ArrayType instance,
+        //  . obj is of the same dimension as this ArrayType instance,
         //  . it is declared as an array of elements which are either all TabularData or all CompositeData.
         //
         // If the assignment check is positive,
--- a/src/java.management/share/classes/javax/management/openmbean/SimpleType.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.management/share/classes/javax/management/openmbean/SimpleType.java	Tue Dec 16 09:58:02 2014 -0800
@@ -244,7 +244,7 @@
 
     /**
      * Returns the hash code value for this <code>SimpleType</code> instance.
-     * The hash code of a <code>SimpleType</code> instance is the the hash code of
+     * The hash code of a <code>SimpleType</code> instance is the hash code of
      * the string value returned by the {@link OpenType#getClassName() getClassName} method.
      * <p>
      * As <code>SimpleType</code> instances are immutable, the hash code for this instance is calculated once,
--- a/src/java.management/share/classes/javax/management/openmbean/TabularDataSupport.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.management/share/classes/javax/management/openmbean/TabularDataSupport.java	Tue Dec 16 09:58:02 2014 -0800
@@ -212,7 +212,7 @@
     /**
      * Returns <tt>true</tt> if and only if this <tt>TabularData</tt> instance contains a <tt>CompositeData</tt> value
      * (ie a row) whose index is the specified <var>key</var>. If <var>key</var> cannot be cast to a one dimension array
-     * of Object instances, this method simply returns <tt>false</tt>; otherwise it returns the the result of the call to
+     * of Object instances, this method simply returns <tt>false</tt>; otherwise it returns the result of the call to
      * <tt>this.containsKey((Object[]) key)</tt>.
      *
      * @param  key  the index value whose presence in this <tt>TabularData</tt> instance is to be tested.
--- a/src/java.management/share/classes/sun/management/Agent.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.management/share/classes/sun/management/Agent.java	Tue Dec 16 09:58:02 2014 -0800
@@ -499,7 +499,7 @@
         } else {
             StringBuilder message = new StringBuilder(params[0]);
             for (int i = 1; i < params.length; i++) {
-                message.append(" " + params[i]);
+                message.append(' ').append(params[i]);
             }
             error(key, message.toString());
         }
--- a/src/java.management/share/classes/sun/management/MappedMXBeanType.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.management/share/classes/sun/management/MappedMXBeanType.java	Tue Dec 16 09:58:02 2014 -0800
@@ -289,7 +289,7 @@
             if (et.isPrimitive()) {
                 className = new StringBuilder(c.getName());
             } else {
-                className.append("L" + baseElementType.getTypeName() + ";");
+                className.append('L').append(baseElementType.getTypeName()).append(';');
             }
             try {
                 mappedTypeClass = Class.forName(className.toString());
@@ -385,7 +385,7 @@
             if (elementType instanceof Class && ((Class) elementType).isPrimitive()) {
                 className = new StringBuilder(gat.toString());
             } else {
-                className.append("L" + baseElementType.getTypeName() + ";");
+                className.append('L').append(baseElementType.getTypeName()).append(';');
             }
             try {
                 mappedTypeClass = Class.forName(className.toString());
--- a/src/java.naming/share/classes/com/sun/jndi/ldap/EventSupport.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.naming/share/classes/com/sun/jndi/ldap/EventSupport.java	Tue Dec 16 09:58:02 2014 -0800
@@ -260,7 +260,7 @@
         if (unsolicited == null || unsolicited.size() == 0) {
             // This shouldn't really happen, but might in case
             // there is a timing problem that removes a listener
-            // before a fired event event reaches here.
+            // before a fired event reaches here.
             return;
         }
 
--- a/src/java.naming/share/classes/com/sun/jndi/ldap/LdapCtx.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.naming/share/classes/com/sun/jndi/ldap/LdapCtx.java	Tue Dec 16 09:58:02 2014 -0800
@@ -989,7 +989,7 @@
     }
 
     /*
-     * Append the the second Vector onto the first Vector
+     * Append the second Vector onto the first Vector
      * (v2 must be non-null)
      */
     private static <T> Vector<T> appendVector(Vector<T> v1, Vector<T> v2) {
--- a/src/java.naming/share/classes/com/sun/jndi/ldap/LdapReferralException.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.naming/share/classes/com/sun/jndi/ldap/LdapReferralException.java	Tue Dec 16 09:58:02 2014 -0800
@@ -59,7 +59,7 @@
   * objects.
   * <p>
   * If an exception was recorded while processing a chain of
-  * <tt>LdapReferralException</tt> objects then is is throw once
+  * <tt>LdapReferralException</tt> objects then it is throw once
   * processing has completed.
   *
   * @author Vincent Ryan
--- a/src/java.naming/share/classes/com/sun/jndi/ldap/sasl/DefaultCallbackHandler.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.naming/share/classes/com/sun/jndi/ldap/sasl/DefaultCallbackHandler.java	Tue Dec 16 09:58:02 2014 -0800
@@ -90,7 +90,7 @@
                         if (selected == -1) {
                             StringBuilder allChoices = new StringBuilder();
                             for (int j = 0; j <  choices.length; j++) {
-                                allChoices.append(choices[j] + ",");
+                                allChoices.append(choices[j]).append(',');
                             }
                             throw new IOException("Cannot match " +
                                 "'java.naming.security.sasl.realm' property value, '" +
--- a/src/java.naming/share/classes/com/sun/jndi/toolkit/ctx/AtomicContext.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.naming/share/classes/com/sun/jndi/toolkit/ctx/AtomicContext.java	Tue Dec 16 09:58:02 2014 -0800
@@ -533,7 +533,7 @@
       * This function is used when implementing a naming system that
       * supports junctions.  For example, when the a_list_nns(newobj)
       * method is invoked, that means the caller is attempting to list the
-      * the nns context of of this context.  For a context that supports
+      * the nns context of this context.  For a context that supports
       * junctions, it by default does not have any nns.  Consequently,
       * a NameNotFoundException is thrown.
       */
--- a/src/java.naming/share/classes/javax/naming/NameImpl.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.naming/share/classes/javax/naming/NameImpl.java	Tue Dec 16 09:58:02 2014 -0800
@@ -170,7 +170,7 @@
                 endQuote = one ? syntaxEndQuote1 : syntaxEndQuote2;
 
                 i += syntaxTypevalSeparator.length();
-                answer.append(syntaxTypevalSeparator+beginQuote); // add back
+                answer.append(syntaxTypevalSeparator).append(beginQuote); // add back
 
                 // consume string until matching quote
                 for (i += beginQuote.length();
--- a/src/java.naming/share/classes/javax/naming/ldap/Rdn.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.naming/share/classes/javax/naming/ldap/Rdn.java	Tue Dec 16 09:58:02 2014 -0800
@@ -505,7 +505,7 @@
      *
      * @param val The non-null object to be escaped.
      * @return Escaped string value.
-     * @throws ClassCastException if val is is not a String or byte array.
+     * @throws ClassCastException if val is not a String or byte array.
      */
     public static String escapeValue(Object val) {
         return (val instanceof byte[])
--- a/src/java.prefs/unix/classes/java/util/prefs/FileSystemPreferences.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.prefs/unix/classes/java/util/prefs/FileSystemPreferences.java	Tue Dec 16 09:58:02 2014 -0800
@@ -981,7 +981,7 @@
     private static int MAX_ATTEMPTS = 5;
 
     /**
-     * Release the the appropriate file lock (user or system).
+     * Release the appropriate file lock (user or system).
      * @throws SecurityException if file access denied.
      */
     private void unlockFile() {
--- a/src/java.rmi/share/classes/java/rmi/registry/LocateRegistry.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.rmi/share/classes/java/rmi/registry/LocateRegistry.java	Tue Dec 16 09:58:02 2014 -0800
@@ -62,7 +62,7 @@
     private LocateRegistry() {}
 
     /**
-     * Returns a reference to the the remote object <code>Registry</code> for
+     * Returns a reference to the remote object <code>Registry</code> for
      * the local host on the default registry port of 1099.
      *
      * @return reference (a stub) to the remote object registry
@@ -76,7 +76,7 @@
     }
 
     /**
-     * Returns a reference to the the remote object <code>Registry</code> for
+     * Returns a reference to the remote object <code>Registry</code> for
      * the local host on the specified <code>port</code>.
      *
      * @param port port on which the registry accepts requests
--- a/src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl.java	Tue Dec 16 09:58:02 2014 -0800
@@ -336,13 +336,12 @@
      * Main program to start a registry. <br>
      * The port number can be specified on the command line.
      */
-    @SuppressWarnings("deprecation")
     public static void main(String args[])
     {
         // Create and install the security manager if one is not installed
         // already.
         if (System.getSecurityManager() == null) {
-            System.setSecurityManager(new RMISecurityManager());
+            System.setSecurityManager(new SecurityManager());
         }
 
         try {
--- a/src/java.rmi/share/classes/sun/rmi/server/MarshalOutputStream.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.rmi/share/classes/sun/rmi/server/MarshalOutputStream.java	Tue Dec 16 09:58:02 2014 -0800
@@ -88,7 +88,7 @@
     }
 
     /**
-     * Serializes a location from which to load the the specified class.
+     * Serializes a location from which to load the specified class.
      */
     protected void annotateClass(Class<?> cl) throws IOException {
         writeLocation(java.rmi.server.RMIClassLoader.getClassAnnotation(cl));
--- a/src/java.rmi/share/classes/sun/rmi/transport/tcp/ConnectionMultiplexer.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.rmi/share/classes/sun/rmi/transport/tcp/ConnectionMultiplexer.java	Tue Dec 16 09:58:02 2014 -0800
@@ -35,7 +35,7 @@
  * ConnectionMultiplexer manages the transparent multiplexing of
  * multiple virtual connections from one endpoint to another through
  * one given real connection to that endpoint.  The input and output
- * streams for the the underlying real connection must be supplied.
+ * streams for the underlying real connection must be supplied.
  * A callback object is also supplied to be informed of new virtual
  * connections opened by the remote endpoint.  After creation, the
  * run() method must be called in a thread created for demultiplexing
--- a/src/java.scripting/share/classes/javax/script/ScriptContext.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.scripting/share/classes/javax/script/ScriptContext.java	Tue Dec 16 09:58:02 2014 -0800
@@ -130,7 +130,7 @@
      * is determined by the numeric value of the scope parameter (lowest
      * scope values first.)
      *
-     * @param name The name of the the attribute to retrieve.
+     * @param name The name of the attribute to retrieve.
      * @return The value of the attribute in the lowest scope for
      * which an attribute with the given name is defined.  Returns
      * null if no attribute with the name exists in any scope.
--- a/src/java.scripting/share/classes/javax/script/ScriptEngineManager.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.scripting/share/classes/javax/script/ScriptEngineManager.java	Tue Dec 16 09:58:02 2014 -0800
@@ -407,7 +407,7 @@
     /** Map of script file extension to script engine factory. */
     private HashMap<String, ScriptEngineFactory> extensionAssociations;
 
-    /** Map of script script MIME type to script engine factory. */
+    /** Map of script MIME type to script engine factory. */
     private HashMap<String, ScriptEngineFactory> mimeTypeAssociations;
 
     /** Global bindings associated with script engines created by this manager. */
--- a/src/java.scripting/share/classes/javax/script/SimpleScriptContext.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.scripting/share/classes/javax/script/SimpleScriptContext.java	Tue Dec 16 09:58:02 2014 -0800
@@ -132,7 +132,7 @@
      * is determined by the numeric value of the scope parameter (lowest
      * scope values first.)
      *
-     * @param name The name of the the attribute to retrieve.
+     * @param name The name of the attribute to retrieve.
      * @return The value of the attribute in the lowest scope for
      * which an attribute with the given name is defined.  Returns
      * null if no attribute with the name exists in any scope.
--- a/src/java.security.jgss/share/classes/javax/security/auth/kerberos/KerberosTicket.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.security.jgss/share/classes/javax/security/auth/kerberos/KerberosTicket.java	Tue Dec 16 09:58:02 2014 -0800
@@ -535,7 +535,7 @@
      * allowable renew time has passed. Any other error returned by the
      * KDC will also cause this method to fail.
      *
-     * Note: This method is not synchronized with the the accessor
+     * Note: This method is not synchronized with the accessor
      * methods of this object. Hence callers need to be aware of multiple
      * threads that might access this and try to renew it at the same
      * time.
--- a/src/java.security.jgss/share/classes/org/ietf/jgss/GSSContext.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.security.jgss/share/classes/org/ietf/jgss/GSSContext.java	Tue Dec 16 09:58:02 2014 -0800
@@ -558,7 +558,7 @@
      * @param msgProp instance of MessageProp that is used by the
      * application to set the desired QOP and privacy state. Set the
      * desired QOP to 0 to request the default QOP. Upon return from this
-     * method, this object will contain the the actual privacy state that
+     * method, this object will contain the actual privacy state that
      * was applied to the message by the underlying mechanism.
      * @return a byte[] containing the token to be sent to the peer.
      *
@@ -605,7 +605,7 @@
      * @param msgProp instance of MessageProp that is used by the
      * application to set the desired QOP and privacy state. Set the
      * desired QOP to 0 to request the default QOP. Upon return from this
-     * method, this object will contain the the actual privacy state that
+     * method, this object will contain the actual privacy state that
      * was applied to the message by the underlying mechanism.
      *
      * @throws GSSException containing the following
--- a/src/java.security.jgss/share/classes/sun/security/jgss/TokenTracker.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.security.jgss/share/classes/sun/security/jgss/TokenTracker.java	Tue Dec 16 09:58:02 2014 -0800
@@ -368,7 +368,7 @@
 
         /**
          * Returns -1 if this interval represented by this entry precedes
-         * the number, 0 if the the number is contained in the interval,
+         * the number, 0 if the number is contained in the interval,
          * and -1 if the interval occurs after the number.
          */
         final int compareTo(int number) {
--- a/src/java.security.jgss/share/classes/sun/security/krb5/Config.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/Config.java	Tue Dec 16 09:58:02 2014 -0800
@@ -30,19 +30,19 @@
  */
 package sun.security.krb5;
 
-import java.io.File;
-import java.io.FilePermission;
+import java.io.*;
 import java.nio.file.DirectoryStream;
 import java.nio.file.Files;
 import java.nio.file.Paths;
 import java.nio.file.Path;
 import java.security.PrivilegedAction;
 import java.util.*;
-import java.io.IOException;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.security.AccessController;
 import java.security.PrivilegedExceptionAction;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 import sun.net.dns.ResolverConfiguration;
 import sun.security.krb5.internal.crypto.EType;
@@ -315,6 +315,72 @@
     }
 
     /**
+     * Translates a duration value into seconds.
+     *
+     * The format can be one of "h:m[:s]", "NdNhNmNs", and "N". See
+     * http://web.mit.edu/kerberos/krb5-devel/doc/basic/date_format.html#duration
+     * for definitions.
+     *
+     * @param s the string duration
+     * @return time in seconds
+     * @throw KrbException if format is illegal
+     */
+    public static int duration(String s) throws KrbException {
+
+        if (s.isEmpty()) {
+            throw new KrbException("Duration cannot be empty");
+        }
+
+        // N
+        if (s.matches("\\d+")) {
+            return Integer.parseInt(s);
+        }
+
+        // h:m[:s]
+        Matcher m = Pattern.compile("(\\d+):(\\d+)(:(\\d+))?").matcher(s);
+        if (m.matches()) {
+            int hr = Integer.parseInt(m.group(1));
+            int min = Integer.parseInt(m.group(2));
+            if (min >= 60) {
+                throw new KrbException("Illegal duration format " + s);
+            }
+            int result = hr * 3600 + min * 60;
+            if (m.group(4) != null) {
+                int sec = Integer.parseInt(m.group(4));
+                if (sec >= 60) {
+                    throw new KrbException("Illegal duration format " + s);
+                }
+                result += sec;
+            }
+            return result;
+        }
+
+        // NdNhNmNs
+        // 120m allowed. Maybe 1h120m is not good, but still allowed
+        m = Pattern.compile(
+                    "((\\d+)d)?\\s*((\\d+)h)?\\s*((\\d+)m)?\\s*((\\d+)s)?",
+                Pattern.CASE_INSENSITIVE).matcher(s);
+        if (m.matches()) {
+            int result = 0;
+            if (m.group(2) != null) {
+                result += 86400 * Integer.parseInt(m.group(2));
+            }
+            if (m.group(4) != null) {
+                result += 3600 * Integer.parseInt(m.group(4));
+            }
+            if (m.group(6) != null) {
+                result += 60 * Integer.parseInt(m.group(6));
+            }
+            if (m.group(8) != null) {
+                result += Integer.parseInt(m.group(8));
+            }
+            return result;
+        }
+
+        throw new KrbException("Illegal duration format " + s);
+    }
+
+    /**
      * Gets the int value for the specified keys.
      * @param keys the keys
      * @return the int value, Integer.MIN_VALUE is returned if it cannot be
--- a/src/java.security.jgss/share/classes/sun/security/krb5/Credentials.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/Credentials.java	Tue Dec 16 09:58:02 2014 -0800
@@ -527,4 +527,23 @@
         return sb.toString();
     }
 
+    public sun.security.krb5.internal.ccache.Credentials toCCacheCreds() {
+        return new sun.security.krb5.internal.ccache.Credentials(
+                getClient(), getServer(),
+                getSessionKey(),
+                date2kt(getAuthTime()),
+                date2kt(getStartTime()),
+                date2kt(getEndTime()),
+                date2kt(getRenewTill()),
+                false,
+                flags,
+                new HostAddresses(getClientAddresses()),
+                getAuthzData(),
+                getTicket(),
+                null);
+    }
+
+    private static KerberosTime date2kt(Date d) {
+        return d == null ? null : new KerberosTime(d);
+    }
 }
--- a/src/java.security.jgss/share/classes/sun/security/krb5/KrbApReq.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/KrbApReq.java	Tue Dec 16 09:58:02 2014 -0800
@@ -102,7 +102,7 @@
      * @param useSubkey Whether the subkey is to be used to protect this
      *        specific application session. If this is not set then the
      *        session key from the ticket will be used.
-     * @param checksum checksum of the the application data that accompanies
+     * @param checksum checksum of the application data that accompanies
      *        the KRB_AP_REQ.
      * @throws KrbException for any Kerberos protocol specific error
      * @throws IOException for any IO related errors
--- a/src/java.security.jgss/share/classes/sun/security/krb5/KrbAsReq.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/KrbAsReq.java	Tue Dec 16 09:58:02 2014 -0800
@@ -35,6 +35,7 @@
 import sun.security.krb5.internal.crypto.Nonce;
 import sun.security.krb5.internal.crypto.KeyUsage;
 import java.io.IOException;
+import java.time.Instant;
 
 /**
  * This class encapsulates the KRB-AS-REQ message that the client
@@ -64,7 +65,6 @@
         if (options == null) {
             options = new KDCOptions();
         }
-
         // check if they are valid arguments. The optional fields should be
         // consistent with settings in KDCOptions. Mar 17 2000
         if (options.get(KDCOptions.FORWARDED) ||
@@ -82,12 +82,6 @@
         } else {
             if (from != null)  from = null;
         }
-        if (options.get(KDCOptions.RENEWABLE)) {
-            //  if (rtime == null)
-            //          throw new KrbException(Krb5.KRB_AP_ERR_REQ_OPTIONS);
-        } else {
-            if (rtime != null)  rtime = null;
-        }
 
         PAData[] paData = null;
         if (pakey != null) {
@@ -109,8 +103,10 @@
             System.out.println(">>> KrbAsReq creating message");
         }
 
+        Config cfg = Config.getInstance();
+
         // check to use addresses in tickets
-        if (addresses == null && Config.getInstance().useAddresses()) {
+        if (addresses == null && cfg.useAddresses()) {
             addresses = HostAddresses.getLocalAddresses();
         }
 
@@ -120,7 +116,26 @@
         }
 
         if (till == null) {
-            till = new KerberosTime(0); // Choose KDC maximum allowed
+            String d = cfg.get("libdefaults", "ticket_lifetime");
+            if (d != null) {
+                till = new KerberosTime(Instant.now().plusSeconds(Config.duration(d)));
+            } else {
+                till = new KerberosTime(0); // Choose KDC maximum allowed
+            }
+        }
+
+        if (rtime == null) {
+            String d = cfg.get("libdefaults", "renew_lifetime");
+            if (d != null) {
+                rtime = new KerberosTime(Instant.now().plusSeconds(Config.duration(d)));
+            }
+        }
+
+        if (rtime != null) {
+            options.set(KDCOptions.RENEWABLE, true);
+            if (till.greaterThan(rtime)) {
+                rtime = till;
+            }
         }
 
         // enc-authorization-data and additional-tickets never in AS-REQ
--- a/src/java.security.jgss/share/classes/sun/security/krb5/KrbAsReqBuilder.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/KrbAsReqBuilder.java	Tue Dec 16 09:58:02 2014 -0800
@@ -224,6 +224,16 @@
         this.options = options;
     }
 
+    public void setTill(KerberosTime till) {
+        checkState(State.INIT, "Cannot specify till");
+        this.till = till;
+    }
+
+    public void setRTime(KerberosTime rtime) {
+        checkState(State.INIT, "Cannot specify rtime");
+        this.rtime = rtime;
+    }
+
     /**
      * Sets or clears target. If cleared, KrbAsReq might choose krbtgt
      * for cname realm
--- a/src/java.security.jgss/share/classes/sun/security/krb5/KrbException.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/KrbException.java	Tue Dec 16 09:58:02 2014 -0800
@@ -96,13 +96,14 @@
 
 
     public String krbErrorMessage() {
-        StringBuilder strbuf = new StringBuilder("krb_error " + returnCode);
+        StringBuilder sb = new StringBuilder();
+        sb.append("krb_error ").append(returnCode);
         String msg =  getMessage();
         if (msg != null) {
-            strbuf.append(" ");
-            strbuf.append(msg);
+            sb.append(" ");
+            sb.append(msg);
         }
-        return strbuf.toString();
+        return sb.toString();
     }
 
     /**
--- a/src/java.security.jgss/share/classes/sun/security/krb5/KrbKdcRep.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/KrbKdcRep.java	Tue Dec 16 09:58:02 2014 -0800
@@ -80,49 +80,41 @@
             rep.encKDCRepPart.flags.get(KDCOptions.RENEWABLE)) {
             throw new KrbApErrException(Krb5.KRB_AP_ERR_MODIFIED);
         }
-        if ((req.reqBody.from == null) || req.reqBody.from.isZero())
+
+        if ((req.reqBody.from == null) || req.reqBody.from.isZero()) {
             // verify this is allowed
             if ((rep.encKDCRepPart.starttime != null) &&
-                !rep.encKDCRepPart.starttime.inClockSkew()) {
+                    !rep.encKDCRepPart.starttime.inClockSkew()) {
                 rep.encKDCRepPart.key.destroy();
                 throw new KrbApErrException(Krb5.KRB_AP_ERR_SKEW);
             }
+        }
 
-        if ((req.reqBody.from != null) && !req.reqBody.from.isZero())
+        if ((req.reqBody.from != null) && !req.reqBody.from.isZero()) {
             // verify this is allowed
             if ((rep.encKDCRepPart.starttime != null) &&
-                !req.reqBody.from.equals(rep.encKDCRepPart.starttime)) {
+                    !req.reqBody.from.equals(rep.encKDCRepPart.starttime)) {
                 rep.encKDCRepPart.key.destroy();
                 throw new KrbApErrException(Krb5.KRB_AP_ERR_MODIFIED);
             }
+        }
 
         if (!req.reqBody.till.isZero() &&
-            rep.encKDCRepPart.endtime.greaterThan(req.reqBody.till)) {
+                rep.encKDCRepPart.endtime.greaterThan(req.reqBody.till)) {
             rep.encKDCRepPart.key.destroy();
             throw new KrbApErrException(Krb5.KRB_AP_ERR_MODIFIED);
         }
 
-        if (req.reqBody.kdcOptions.get(KDCOptions.RENEWABLE))
-            if (req.reqBody.rtime != null && !req.reqBody.rtime.isZero())
-                                // verify this is required
+        if (req.reqBody.kdcOptions.get(KDCOptions.RENEWABLE)) {
+            if (req.reqBody.rtime != null && !req.reqBody.rtime.isZero()) {
+                // verify this is required
                 if ((rep.encKDCRepPart.renewTill == null) ||
-                    rep.encKDCRepPart.renewTill.greaterThan(req.reqBody.rtime)
-                    ) {
+                        rep.encKDCRepPart.renewTill.greaterThan(req.reqBody.rtime)
+                        ) {
                     rep.encKDCRepPart.key.destroy();
                     throw new KrbApErrException(Krb5.KRB_AP_ERR_MODIFIED);
                 }
-
-        if (req.reqBody.kdcOptions.get(KDCOptions.RENEWABLE_OK) &&
-            rep.encKDCRepPart.flags.get(KDCOptions.RENEWABLE))
-            if (!req.reqBody.till.isZero())
-                                // verify this is required
-                if ((rep.encKDCRepPart.renewTill == null) ||
-                    rep.encKDCRepPart.renewTill.greaterThan(req.reqBody.till)
-                    ) {
-                    rep.encKDCRepPart.key.destroy();
-                    throw new KrbApErrException(Krb5.KRB_AP_ERR_MODIFIED);
-                }
+            }
+        }
     }
-
-
 }
--- a/src/java.security.jgss/share/classes/sun/security/krb5/KrbTgsReq.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/KrbTgsReq.java	Tue Dec 16 09:58:02 2014 -0800
@@ -35,7 +35,6 @@
 import sun.security.krb5.internal.crypto.*;
 import java.io.IOException;
 import java.net.UnknownHostException;
-import java.util.Arrays;
 
 /**
  * This class encapsulates a Kerberos TGS-REQ that is sent from the
--- a/src/java.security.jgss/share/classes/sun/security/krb5/internal/HostAddresses.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/internal/HostAddresses.java	Tue Dec 16 09:58:02 2014 -0800
@@ -250,6 +250,10 @@
          */
 
     public void writeAddrs(CCacheOutputStream cos) throws IOException {
+        if (addresses == null || addresses.length == 0) {
+            cos.write32(0);
+            return;
+        }
         cos.write32(addresses.length);
         for (int i = 0; i < addresses.length; i++) {
             cos.write16(addresses[i].addrType);
--- a/src/java.security.jgss/share/classes/sun/security/krb5/internal/KerberosTime.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/internal/KerberosTime.java	Tue Dec 16 09:58:02 2014 -0800
@@ -38,6 +38,7 @@
 import sun.security.util.DerValue;
 
 import java.io.IOException;
+import java.time.Instant;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.TimeZone;
@@ -129,6 +130,14 @@
     }
 
     /**
+     * Creates a KerberosTime object from an Instant object
+     */
+    public KerberosTime(Instant instant) {
+        this(instant.getEpochSecond()*1000 + instant.getNano()/1000000L,
+                instant.getNano()/1000%1000);
+    }
+
+    /**
      * Creates a KerberosTime object for now. It uses System.nanoTime()
      * to get a more precise time than "new Date()".
      */
--- a/src/java.security.jgss/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java	Tue Dec 16 09:58:02 2014 -0800
@@ -390,7 +390,7 @@
          * /tmp/krb5cc_uid ; for all other platforms  we use
          * {user_home}/krb5cc_{user_name}
          * Please note that for Windows we will use LSA to get
-         * the TGT from the the default cache even before we come here;
+         * the TGT from the default cache even before we come here;
          * however when we create cache we will create a cache under
          * {user_home}/krb5cc_{user_name} for non-Unix platforms including
          * Windows.
--- a/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/DkCrypto.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/DkCrypto.java	Tue Dec 16 09:58:02 2014 -0800
@@ -640,8 +640,7 @@
 
         for (int i = 0; i < digest.length; i++) {
             if ((digest[i] & 0x000000ff) < 0x10) {
-                digestString.append("0" +
-                    Integer.toHexString(digest[i] & 0x000000ff));
+                digestString.append('0').append(Integer.toHexString(digest[i] & 0x000000ff));
             } else {
                 digestString.append(
                     Integer.toHexString(digest[i] & 0x000000ff));
--- a/src/java.security.jgss/windows/classes/sun/security/krb5/internal/tools/Kinit.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.security.jgss/windows/classes/sun/security/krb5/internal/tools/Kinit.java	Tue Dec 16 09:58:02 2014 -0800
@@ -36,7 +36,6 @@
 import sun.security.krb5.internal.ccache.*;
 import java.io.IOException;
 import java.util.Arrays;
-import javax.security.auth.kerberos.KerberosPrincipal;
 import sun.security.util.Password;
 import javax.security.auth.kerberos.KeyTab;
 
@@ -53,22 +52,9 @@
 
     /**
      * The main method is used to accept user command line input for ticket
-     * request.
-     * <p>
-     * Usage: kinit [-A] [-f] [-p] [-c cachename] [[-k [-t keytab_file_name]]
-     * [principal] [password]
-     * <ul>
-     * <li>    -A        do not include addresses
-     * <li>    -f        forwardable
-     * <li>    -p        proxiable
-     * <li>    -c        cache name (i.e., FILE://c:\temp\mykrb5cc)
-     * <li>    -k        use keytab
-     * <li>    -t        keytab file name
-     * <li>    principal the principal name (i.e., duke@java.sun.com)
-     * <li>    password  the principal's Kerberos password
-     * </ul>
-     * <p>
-     * Use java sun.security.krb5.tools.Kinit -help to bring up help menu.
+     * request. Read {@link KinitOptions#printHelp} for usages or call
+     *    java sun.security.krb5.internal.tools.Kinit -help
+     * to bring up help menu.
      * <p>
      * We currently support only file-based credentials cache to
      * store the tickets obtained from the KDC.
@@ -146,6 +132,49 @@
         } else {
             options = new KinitOptions(args);
         }
+        switch (options.action) {
+            case 1:
+                acquire();
+                break;
+            case 2:
+                renew();
+                break;
+            default:
+                throw new KrbException("kinit does not support action "
+                        + options.action);
+        }
+    }
+
+    private void renew()
+            throws IOException, RealmException, KrbException {
+
+        PrincipalName principal = options.getPrincipal();
+        String realm = principal.getRealmAsString();
+        CredentialsCache cache = CredentialsCache.getInstance(options.cachename);
+
+        if (cache == null) {
+            throw new IOException("Unable to find existing cache file " +
+                    options.cachename);
+        }
+        sun.security.krb5.internal.ccache.Credentials credentials =
+                cache.getCreds(PrincipalName.tgsService(realm, realm));
+
+        credentials = credentials.setKrbCreds()
+                .renew()
+                .toCCacheCreds();
+
+        cache = CredentialsCache.create(principal, options.cachename);
+        if (cache == null) {
+            throw new IOException("Unable to create the cache file " +
+                    options.cachename);
+        }
+        cache.update(credentials);
+        cache.save();
+    }
+
+    private void acquire()
+            throws IOException, RealmException, KrbException {
+
         String princName = null;
         PrincipalName principal = options.getPrincipal();
         if (principal != null) {
@@ -216,6 +245,9 @@
         if (options.getAddressOption())
             builder.setAddresses(HostAddresses.getLocalAddresses());
 
+        builder.setTill(options.lifetime);
+        builder.setRTime(options.renewable_lifetime);
+
         builder.action();
 
         sun.security.krb5.internal.ccache.Credentials credentials =
--- a/src/java.security.jgss/windows/classes/sun/security/krb5/internal/tools/KinitOptions.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.security.jgss/windows/classes/sun/security/krb5/internal/tools/KinitOptions.java	Tue Dec 16 09:58:02 2014 -0800
@@ -33,12 +33,8 @@
 import sun.security.krb5.*;
 import sun.security.krb5.internal.*;
 import sun.security.krb5.internal.ccache.*;
-import java.io.File;
 import java.io.IOException;
-import java.util.StringTokenizer;
-import java.util.Vector;
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
+import java.time.Instant;
 import java.io.FileInputStream;
 
 /**
@@ -49,14 +45,15 @@
  * @author Ram Marti
  */
 class KinitOptions {
-    public boolean validate = false;
+
+    // 1. acquire, 2. renew, 3. validate
+    public int action = 1;
 
     // forwardable and proxiable flags have two states:
     // -1 - flag set to be not forwardable or proxiable;
     // 1 - flag set to be forwardable or proxiable.
-    public short forwardable = -1;
-    public short proxiable = -1;
-    public boolean renew = false;
+    public short forwardable = 0;
+    public short proxiable = 0;
     public KerberosTime lifetime;
     public KerberosTime renewable_lifetime;
     public String target_service;
@@ -134,6 +131,12 @@
                 }
 
                 useKeytab = true;
+            } else if (args[i].equals("-R")) {
+                action = 2;
+            } else if (args[i].equals("-l")) {
+                lifetime = getTime(Config.duration(args[++i]));
+            } else if (args[i].equals("-r")) {
+                renewable_lifetime = getTime(Config.duration(args[++i]));
             } else if (args[i].equalsIgnoreCase("-help")) {
                 printHelp();
                 System.exit(0);
@@ -223,23 +226,28 @@
 
 
     void printHelp() {
-        System.out.println("Usage: kinit " +
-                           "[-A] [-f] [-p] [-c cachename] " +
-                           "[[-k [-t keytab_file_name]] [principal] " +
+        System.out.println("Usage:\n\n1. Initial ticket request:\n" +
+                "    kinit [-A] [-f] [-p] [-c cachename] " +
+                "[-l lifetime] [-r renewable_time]\n" +
+                "          [[-k [-t keytab_file_name]] [principal] " +
                            "[password]");
-        System.out.println("\tavailable options to " +
+        System.out.println("2. Renew a ticket:\n" +
+                "    kinit -R [-c cachename] [principal]");
+        System.out.println("\nAvailable options to " +
                            "Kerberos 5 ticket request:");
-        System.out.println("\t    -A   do not include addresses");
-        System.out.println("\t    -f   forwardable");
-        System.out.println("\t    -p   proxiable");
-        System.out.println("\t    -c   cache name " +
-                           "(i.e., FILE:\\d:\\myProfiles\\mykrb5cache)");
-        System.out.println("\t    -k   use keytab");
-        System.out.println("\t    -t   keytab file name");
-        System.out.println("\t    principal   the principal name "+
-                           "(i.e., qweadf@ATHENA.MIT.EDU qweadf)");
-        System.out.println("\t    password   " +
-                           "the principal's Kerberos password");
+        System.out.println("\t-A   do not include addresses");
+        System.out.println("\t-f   forwardable");
+        System.out.println("\t-p   proxiable");
+        System.out.println("\t-c   cache name " +
+                "(i.e., FILE:\\d:\\myProfiles\\mykrb5cache)");
+        System.out.println("\t-l   lifetime");
+        System.out.println("\t-r   renewable time " +
+                "(total lifetime a ticket can be renewed)");
+        System.out.println("\t-k   use keytab");
+        System.out.println("\t-t   keytab file name");
+        System.out.println("\tprincipal   the principal name "+
+                "(i.e., qweadf@ATHENA.MIT.EDU qweadf)");
+        System.out.println("\tpassword    the principal's Kerberos password");
     }
 
     public boolean getAddressOption() {
@@ -257,4 +265,8 @@
     public PrincipalName getPrincipal() {
         return principal;
     }
+
+    private KerberosTime getTime(int s) {
+        return new KerberosTime(Instant.now().plusSeconds(s));
+    }
 }
--- a/src/java.security.sasl/share/classes/com/sun/security/sasl/CramMD5Base.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.security.sasl/share/classes/com/sun/security/sasl/CramMD5Base.java	Tue Dec 16 09:58:02 2014 -0800
@@ -196,8 +196,7 @@
 
         for (i = 0; i < digest.length; i++) {
             if ((digest[i] & 0x000000ff) < 0x10) {
-                digestString.append("0" +
-                    Integer.toHexString(digest[i] & 0x000000ff));
+                digestString.append('0').append(Integer.toHexString(digest[i] & 0x000000ff));
             } else {
                 digestString.append(
                     Integer.toHexString(digest[i] & 0x000000ff));
--- a/src/java.security.sasl/share/classes/com/sun/security/sasl/PlainClient.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.security.sasl/share/classes/com/sun/security/sasl/PlainClient.java	Tue Dec 16 09:58:02 2014 -0800
@@ -49,7 +49,7 @@
      *  for which authorization is being granted; if null, same as
      *  authenticationID
      * @param authenticationID A non-null string representing the principal
-     * being authenticated. pw is associated with with this principal.
+     * being authenticated. pw is associated with this principal.
      * @param pw A non-null byte[] containing the password.
      */
     PlainClient(String authorizationID, String authenticationID, byte[] pw)
--- a/src/java.security.sasl/share/classes/com/sun/security/sasl/digest/DigestMD5Base.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.security.sasl/share/classes/com/sun/security/sasl/digest/DigestMD5Base.java	Tue Dec 16 09:58:02 2014 -0800
@@ -391,8 +391,7 @@
 
         for (int i = 0; i < digest.length; i ++) {
             if ((digest[i] & 0x000000ff) < 0x10) {
-                digestString.append("0"+
-                    Integer.toHexString(digest[i] & 0x000000ff));
+                digestString.append('0').append(Integer.toHexString(digest[i] & 0x000000ff));
             } else {
                 digestString.append(
                     Integer.toHexString(digest[i] & 0x000000ff));
--- a/src/java.sql.rowset/share/classes/com/sun/rowset/CachedRowSetImpl.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.sql.rowset/share/classes/com/sun/rowset/CachedRowSetImpl.java	Tue Dec 16 09:58:02 2014 -0800
@@ -431,7 +431,7 @@
      * provider to assist in determining the choice of the synchronizaton
      * provider such as:
      * <ul>
-     * <li><code>ROWSET_SYNC_PROVIDER</code> - the property specifying the the
+     * <li><code>ROWSET_SYNC_PROVIDER</code> - the property specifying the
      * <code>SyncProvider</code> class name to be instantiated by the
      * <code>SyncFacttory</code>
      * <li><code>ROWSET_SYNC_VENDOR</code> - the property specifying the software
@@ -3727,7 +3727,7 @@
 
         /*
          * Each call to internalPrevious may move the cursor
-         * over multiple rows, the absolute position moves one one row
+         * over multiple rows, the absolute position moves one row
          */
         if (ret == true)
             --absolutePos;
--- a/src/java.sql.rowset/share/classes/com/sun/rowset/JdbcRowSetImpl.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.sql.rowset/share/classes/com/sun/rowset/JdbcRowSetImpl.java	Tue Dec 16 09:58:02 2014 -0800
@@ -3993,7 +3993,7 @@
 
     /**
      * Retrieves the <code>DatabaseMetaData</code> associated with
-     * the connection handle associated this this
+     * the connection handle associated with this
      * <code>JdbcRowSet</code> object.
      *
      * @return the <code>DatabaseMetadata</code> associated
@@ -4007,7 +4007,7 @@
 
     /**
      * Retrieves the <code>ParameterMetaData</code> associated with
-     * the connection handle associated this this
+     * the connection handle associated with this
      * <code>JdbcRowSet</code> object.
      *
      * @return the <code>ParameterMetadata</code> associated
@@ -4325,7 +4325,7 @@
      * the connection is created using a JDBC technology-enabled driver
      * ("JDBC driver") and the <code>DriverManager</code>.
      * The correct JDBC URL for the specific driver to be used can be found
-     * in the driver documentation.  Although there are guidelines for for how
+     * in the driver documentation.  Although there are guidelines for how
      * a JDBC URL is formed,
      * a driver vendor can specify any <code>String</code> object except
      * one with a length of <code>0</code> (an empty string).
--- a/src/java.sql.rowset/share/classes/com/sun/rowset/JoinRowSetImpl.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.sql.rowset/share/classes/com/sun/rowset/JoinRowSetImpl.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1169,7 +1169,7 @@
      * @return the column value; if the value is SQL <code>NULL</code>, the
      *         result is <code>null</code>
      * @throws SQLException if the given column index is out of bounds,
-     *            the cursor is not on a valid row, or the the value to be
+     *            the cursor is not on a valid row, or the value to be
      *            retrieved is not binary
      */
     public byte[] getBytes(int columnIndex) throws SQLException {
@@ -4129,7 +4129,7 @@
     }
 
     /**
-     * Creates an an output stream of the internal state and contents of a
+     * Creates an output stream of the internal state and contents of a
      * <code>WebRowSet</code> for XML proceessing
      *
      * @throws SQLException if a datasource access occurs
--- a/src/java.sql.rowset/share/classes/com/sun/rowset/WebRowSetImpl.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.sql.rowset/share/classes/com/sun/rowset/WebRowSetImpl.java	Tue Dec 16 09:58:02 2014 -0800
@@ -93,7 +93,7 @@
     }
 
     /**
-     * Constructs a new <code>WebRowSet</code> object initialized with the the
+     * Constructs a new <code>WebRowSet</code> object initialized with the
      * synchronization SPI provider properties as specified in the <code>Hashtable</code>. If
      * this hashtable is empty or is <code>null</code> the default constructor is invoked.
      *
@@ -234,7 +234,7 @@
     /**
      * Writes this <code>WebRowSet</code> object to the given <code> OutputStream</code>
      * object in XML format.
-     * Creates an an output stream of the internal state and contents of a
+     * Creates an output stream of the internal state and contents of a
      * <code>WebRowSet</code> for XML proceessing
      *
      * @throws SQLException if a datasource access error occurs
--- a/src/java.sql.rowset/share/classes/com/sun/rowset/internal/CachedRowSetWriter.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.sql.rowset/share/classes/com/sun/rowset/internal/CachedRowSetWriter.java	Tue Dec 16 09:58:02 2014 -0800
@@ -843,7 +843,7 @@
                for (String pkName : primaryKeys) {
                    if (!isPKNameValid(pkName, rsmd)) {
 
-                       /* We came here as one of the the primary keys
+                       /* We came here as one of the primary keys
                         * of the table is not present in the cached
                         * rowset object, it should be an autoincrement column
                         * and not included while creating CachedRowSet
--- a/src/java.sql.rowset/share/classes/com/sun/rowset/internal/SyncResolverImpl.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.sql.rowset/share/classes/com/sun/rowset/internal/SyncResolverImpl.java	Tue Dec 16 09:58:02 2014 -0800
@@ -288,7 +288,7 @@
     }
 
     /**
-     * This passes a CachedRowSet as a row the the CachedRowSetWriter
+     * This passes a CachedRowSet as a row to the CachedRowSetWriter
      * after the values have been resolved, back to the datasource.
      *
      * @param row a <code>CachedRowSet</code> object which will hold the
--- a/src/java.sql.rowset/share/classes/com/sun/rowset/providers/package.html	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.sql.rowset/share/classes/com/sun/rowset/providers/package.html	Tue Dec 16 09:58:02 2014 -0800
@@ -137,7 +137,7 @@
  inserted or deleted. Any method that causes a change in the rowset's values
  or cursor position also notifies any object that has been registered as
 a  listener with the rowset. So, for example, a table that displays the rowset's
- data in an applet can can be notified of changes and make updates as they
+ data in an applet can be notified of changes and make updates as they
  occur.<br>
     <br>
   The changes made to a rowset can be propagated back to the original data
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/encryption/AbstractSerializer.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/encryption/AbstractSerializer.java	Tue Dec 16 09:58:02 2014 -0800
@@ -235,14 +235,15 @@
                     String nodeName = att.getNodeName();
                     if ((nodeName.equals("xmlns") || nodeName.startsWith("xmlns:"))
                         && !storedNamespaces.containsKey(att.getNodeName())) {
-                        sb.append(" " + nodeName + "=\"" + att.getNodeValue() + "\"");
+                        sb.append(' ').append(nodeName).append("=\"")
+                                .append(att.getNodeValue()).append('"');
                         storedNamespaces.put(nodeName, att.getNodeValue());
                     }
                 }
             }
             wk = wk.getParentNode();
         }
-        sb.append(">" + source + "</dummy>");
+        sb.append('>').append(source).append("</dummy>");
         return sb.toString();
     }
 
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/encryption/EncryptionMethod.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/encryption/EncryptionMethod.java	Tue Dec 16 09:58:02 2014 -0800
@@ -68,7 +68,7 @@
     void setKeySize(int size);
 
     /**
-     * Returns the OAEP parameters of the algorithm applied applied to the
+     * Returns the OAEP parameters of the algorithm applied to the
      * cipher data.
      *
      * @return the OAEP parameters.
@@ -130,4 +130,3 @@
      */
     void removeEncryptionMethodInformation(Element information);
 }
-
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/KeyUtils.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/KeyUtils.java	Tue Dec 16 09:58:02 2014 -0800
@@ -32,7 +32,7 @@
 import com.sun.org.apache.xml.internal.security.keys.content.X509Data;
 
 /**
- * Utility class for for <CODE>com.sun.org.apache.xml.internal.security.keys</CODE> package.
+ * Utility class for the <CODE>com.sun.org.apache.xml.internal.security.keys</CODE> package.
  *
  * @author $Author: coheigea $
  */
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/Reference.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/signature/Reference.java	Tue Dec 16 09:58:02 2014 -0800
@@ -571,7 +571,7 @@
     }
 
     /**
-     * This method only works works after a call to verify.
+     * This method only works after a call to verify.
      * @return the transformed output(i.e. what is going to be digested).
      */
     public XMLSignatureInput getTransformsOutput() {
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/transforms/params/InclusiveNamespaces.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/transforms/params/InclusiveNamespaces.java	Tue Dec 16 09:58:02 2014 -0800
@@ -85,7 +85,7 @@
             if (prefix.equals("xmlns")) {
                 sb.append("#default ");
             } else {
-                sb.append(prefix + " ");
+                sb.append(prefix).append(' ');
             }
         }
 
--- a/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/RFC2253Parser.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/utils/RFC2253Parser.java	Tue Dec 16 09:58:02 2014 -0800
@@ -88,7 +88,7 @@
                 l += countQuotes(DN, j, k);
 
                 if ((k > 0) && (DN.charAt(k - 1) != '\\') && (l % 2) == 0) {
-                    sb.append(parseRDN(DN.substring(i, k).trim(), toXml) + ",");
+                    sb.append(parseRDN(DN.substring(i, k).trim(), toXml)).append(',');
 
                     i = k + 1;
                     l = 0;
@@ -121,7 +121,7 @@
             l += countQuotes(str, j, k);
 
             if ((k > 0) && (str.charAt(k - 1) != '\\') && (l % 2) == 0) {
-                sb.append(parseATAV(trim(str.substring(i, k)), toXml) + "+");
+                sb.append(parseATAV(trim(str.substring(i, k)), toXml)).append('+');
 
                 i = k + 1;
                 l = 0;
@@ -369,7 +369,7 @@
         int k;
 
         for (int j = 0; (k = string.indexOf("\\20", j)) >= 0; j = k + 3) {
-            sb.append(trim(string.substring(i, k)) + "\\ ");
+            sb.append(trim(string.substring(i, k))).append("\\ ");
 
             i = k + 3;
         }
@@ -418,7 +418,7 @@
             l += countQuotes(str, j, k);
 
             if ((k > 0) && (str.charAt(k - 1) != '\\') && (l % 2) == 0) {
-                sb.append(trim(str.substring(i, k)) + replace);
+                sb.append(trim(str.substring(i, k))).append(replace);
 
                 i = k + 1;
                 l = 0;
--- a/src/jdk.attach/solaris/native/libattach/VirtualMachineImpl.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.attach/solaris/native/libattach/VirtualMachineImpl.c	Tue Dec 16 09:58:02 2014 -0800
@@ -320,7 +320,7 @@
         JNU_ThrowIOExceptionWithLastError(env, "door_call");
     } else {
         /*
-         * door_call succeeded but the call didn't return the the expected jint.
+         * door_call succeeded but the call didn't return the expected jint.
          */
         if (door_args.data_size < sizeof(jint)) {
             JNU_ThrowIOException(env, "Enqueue error - reason unknown as result is truncated!");
--- a/src/jdk.crypto.pkcs11/share/classes/sun/security/pkcs11/P11KeyStore.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.crypto.pkcs11/share/classes/sun/security/pkcs11/P11KeyStore.java	Tue Dec 16 09:58:02 2014 -0800
@@ -1641,7 +1641,7 @@
 
         // If the key is a token object on this token, update it instead
         // of creating a duplicate key object.
-        // Otherwise, treat a P11Key like any other key, if is is extractable.
+        // Otherwise, treat a P11Key like any other key, if it is extractable.
         if (key instanceof P11Key) {
             P11Key p11Key = (P11Key)key;
             if (p11Key.tokenObject && (p11Key.token == this.token)) {
--- a/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/NativeCipherWithJavaPadding.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/NativeCipherWithJavaPadding.java	Tue Dec 16 09:58:02 2014 -0800
@@ -89,7 +89,7 @@
 
     private static class PKCS5Padding implements Padding {
         private final int blockSize;
-        // buffer for storing the the potential padding bytes
+        // buffer for storing the potential padding bytes
         private ByteBuffer trailingBytes = null;
 
         PKCS5Padding(int blockSize)
--- a/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/JavaValueArray.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.dev/share/classes/com/sun/tools/hat/internal/model/JavaValueArray.java	Tue Dec 16 09:58:02 2014 -0800
@@ -346,12 +346,12 @@
 
     public String valueString(boolean bigLimit) {
         // Char arrays deserve special treatment
-        StringBuffer result;
+        StringBuilder result;
         byte[] value = getValue();
         int max = value.length;
         byte elementSignature = getElementType();
         if (elementSignature == 'C')  {
-            result = new StringBuffer();
+            result = new StringBuilder();
             for (int i = 0; i < value.length; ) {
                 char val = charAt(i, value);
                 result.append(val);
@@ -362,7 +362,7 @@
             if (bigLimit) {
                 limit = 1000;
             }
-            result = new StringBuffer("{");
+            result = new StringBuilder("{");
             int num = 0;
             for (int i = 0; i < value.length; ) {
                 if (num > 0) {
@@ -386,37 +386,37 @@
                     }
                     case 'B': {
                         int val = 0xFF & byteAt(i, value);
-                        result.append("0x" + Integer.toString(val, 16));
+                        result.append("0x").append(Integer.toString(val, 16));
                         i++;
                         break;
                     }
                     case 'S': {
                         short val = shortAt(i, value);
                         i += 2;
-                        result.append("" + val);
+                        result.append(val);
                         break;
                     }
                     case 'I': {
                         int val = intAt(i, value);
                         i += 4;
-                        result.append("" + val);
+                        result.append(val);
                         break;
                     }
                     case 'J': {         // long
                         long val = longAt(i, value);
-                        result.append("" + val);
+                        result.append(val);
                         i += 8;
                         break;
                     }
                     case 'F': {
                         float val = floatAt(i, value);
-                        result.append("" + val);
+                        result.append(val);
                         i += 4;
                         break;
                     }
                     case 'D': {         // double
                         double val = doubleAt(i, value);
-                        result.append("" + val);
+                        result.append(val);
                         i += 8;
                         break;
                     }
@@ -425,7 +425,7 @@
                     }
                 }
             }
-            result.append("}");
+            result.append('}');
         }
         return result.toString();
     }
--- a/src/jdk.dev/share/classes/com/sun/tools/hat/internal/util/Misc.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.dev/share/classes/com/sun/tools/hat/internal/util/Misc.java	Tue Dec 16 09:58:02 2014 -0800
@@ -97,11 +97,11 @@
             } else if (ch == '&') {
                 sb.append("&amp;");
             } else if (ch < ' ') {
-                sb.append("&#" + Integer.toString(ch) + ";");
+                sb.append("&#").append((int)ch).append(';');
             } else {
                 int c = (ch & 0xFFFF);
                 if (c > 127) {
-                    sb.append("&#" + Integer.toString(c) + ";");
+                    sb.append("&#").append(c).append(';');
                 } else {
                     sb.append(ch);
                 }
--- a/src/jdk.dev/share/classes/sun/security/tools/jarsigner/Main.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.dev/share/classes/sun/security/tools/jarsigner/Main.java	Tue Dec 16 09:58:02 2014 -0800
@@ -676,14 +676,13 @@
                             ((man.getAttributes(name) != null) ||
                              (man.getAttributes("./"+name) != null) ||
                              (man.getAttributes("/"+name) != null));
-                        sb.append(
-                          (isSigned ? rb.getString("s") : rb.getString("SPACE")) +
-                          (inManifest ? rb.getString("m") : rb.getString("SPACE")) +
-                          (inStore ? rb.getString("k") : rb.getString("SPACE")) +
-                          (inScope ? rb.getString("i") : rb.getString("SPACE")) +
-                          ((inStoreOrScope & NOT_ALIAS) != 0 ?"X":" ") +
-                          rb.getString("SPACE"));
-                        sb.append("|");
+                        sb.append(isSigned ? rb.getString("s") : rb.getString("SPACE"))
+                                .append(inManifest ? rb.getString("m") : rb.getString("SPACE"))
+                                .append(inStore ? rb.getString("k") : rb.getString("SPACE"))
+                                .append(inScope ? rb.getString("i") : rb.getString("SPACE"))
+                                .append((inStoreOrScope & NOT_ALIAS) != 0 ? 'X' : ' ')
+                                .append(rb.getString("SPACE"));
+                        sb.append('|');
                     }
 
                     // When -certs provided, display info has extra empty
@@ -704,11 +703,15 @@
                         // Print no info for unsigned entries when -verbose:all,
                         // to be consistent with old behavior.
                         if (signatureRelated(name)) {
-                            sb.append("\n" + tab + rb.getString(
-                                    ".Signature.related.entries.") + "\n\n");
+                            sb.append('\n')
+                                    .append(tab)
+                                    .append(rb
+                                            .getString(".Signature.related.entries."))
+                                    .append("\n\n");
                         } else {
-                            sb.append("\n" + tab + rb.getString(
-                                    ".Unsigned.entries.") + "\n\n");
+                            sb.append('\n').append(tab)
+                                    .append(rb.getString(".Unsigned.entries."))
+                                    .append("\n\n");
                         }
                     }
 
@@ -1605,8 +1608,8 @@
                 // No more warning, we alreay have hasExpiredCert or notYetValidCert
             } else {
                 chainNotValidated = true;
-                sb.append(tab + rb.getString(".CertPath.not.validated.") +
-                        e.getLocalizedMessage() + "]\n");   // TODO
+                sb.append(tab).append(rb.getString(".CertPath.not.validated."))
+                        .append(e.getLocalizedMessage()).append("]\n"); // TODO
             }
         }
         String result = sb.toString();
--- a/src/jdk.jcmd/share/classes/sun/tools/jps/Jps.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jcmd/share/classes/sun/tools/jps/Jps.java	Tue Dec 16 09:58:02 2014 -0800
@@ -92,28 +92,28 @@
                     vm = monitoredHost.getMonitoredVm(id, 0);
 
                     errorString = " -- main class information unavailable";
-                    output.append(" " + MonitoredVmUtil.mainClass(vm,
+                    output.append(' ').append(MonitoredVmUtil.mainClass(vm,
                             arguments.showLongPaths()));
 
                     if (arguments.showMainArgs()) {
                         errorString = " -- main args information unavailable";
                         String mainArgs = MonitoredVmUtil.mainArgs(vm);
                         if (mainArgs != null && mainArgs.length() > 0) {
-                            output.append(" " + mainArgs);
+                            output.append(' ').append(mainArgs);
                         }
                     }
                     if (arguments.showVmArgs()) {
                         errorString = " -- jvm args information unavailable";
                         String jvmArgs = MonitoredVmUtil.jvmArgs(vm);
                         if (jvmArgs != null && jvmArgs.length() > 0) {
-                          output.append(" " + jvmArgs);
+                          output.append(' ').append(jvmArgs);
                         }
                     }
                     if (arguments.showVmFlags()) {
                         errorString = " -- jvm flags information unavailable";
                         String jvmFlags = MonitoredVmUtil.jvmFlags(vm);
                         if (jvmFlags != null && jvmFlags.length() > 0) {
-                            output.append(" " + jvmFlags);
+                            output.append(' ').append(jvmFlags);
                         }
                     }
 
--- a/src/jdk.jcmd/share/classes/sun/tools/jstat/RawOutputFormatter.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jcmd/share/classes/sun/tools/jstat/RawOutputFormatter.java	Tue Dec 16 09:58:02 2014 -0800
@@ -50,7 +50,7 @@
             StringBuilder headerBuilder = new StringBuilder();
             for (Iterator<Monitor> i = logged.iterator(); i.hasNext(); /* empty */ ) {
                 Monitor m = i.next();
-                headerBuilder.append(m.getName() + " ");
+                headerBuilder.append(m.getName()).append(' ');
             }
             header = headerBuilder.toString();
         }
--- a/src/jdk.jcmd/share/classes/sun/tools/jstat/SyntaxException.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jcmd/share/classes/sun/tools/jstat/SyntaxException.java	Tue Dec 16 09:58:02 2014 -0800
@@ -65,24 +65,21 @@
     public SyntaxException(int lineno, Set<String> expected, Token found) {
         StringBuilder msg = new StringBuilder();
 
-        msg.append("Syntax error at line " + lineno + ": Expected one of \'");
+        msg.append("Syntax error at line ").append(lineno)
+                .append(": Expected one of \'");
 
-        boolean first = true;
-        for (Iterator<String> i = expected.iterator(); i.hasNext(); /* empty */) {
-            String keyWord = i.next();
-            if (first) {
-                msg.append(keyWord);
-                first = false;
-            } else {
-                msg.append("|" + keyWord);
-            }
+        for (String keyWord : expected) {
+            msg.append(keyWord).append('|');
+        }
+        if (!expected.isEmpty()) {
+            msg.setLength(msg.length() - 1);
         }
 
-        msg.append("\', Found " + found.toMessage());
-        message = msg.toString();
+        message = msg.append("\', Found ").append(found.toMessage()).toString();
     }
 
     public String getMessage() {
         return message;
     }
 }
+
--- a/src/jdk.jconsole/share/classes/sun/tools/jconsole/Plotter.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jconsole/share/classes/sun/tools/jconsole/Plotter.java	Tue Dec 16 09:58:02 2014 -0800
@@ -838,7 +838,7 @@
     private static class TimeStamps {
         // Time stamps (long) are split into offsets (long) and a
         // series of times from the offsets (int). A new offset is
-        // stored when the the time value doesn't fit in an int
+        // stored when the time value doesn't fit in an int
         // (approx every 24 days).  An array of indices is used to
         // define the starting point for each offset in the times
         // array.
--- a/src/jdk.jconsole/share/classes/sun/tools/jconsole/ThreadTab.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jconsole/share/classes/sun/tools/jconsole/ThreadTab.java	Tue Dec 16 09:58:02 2014 -0800
@@ -368,7 +368,7 @@
                             sb.append(Messages.STACK_TRACE);
                             int index = 0;
                             for (StackTraceElement e : ti.getStackTrace()) {
-                                sb.append(e.toString()+"\n");
+                                sb.append(e).append('\n');
                                 if (monitors != null) {
                                     for (MonitorInfo mi : monitors) {
                                         if (mi.getLockedStackDepth() == index) {
--- a/src/jdk.jconsole/share/classes/sun/tools/jconsole/inspector/XArrayDataViewer.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jconsole/share/classes/sun/tools/jconsole/inspector/XArrayDataViewer.java	Tue Dec 16 09:58:02 2014 -0800
@@ -79,25 +79,25 @@
             String textColor = String.format("%06x",
                                              foreground.getRGB() & 0xFFFFFF);
             StringBuilder sb = new StringBuilder();
-            sb.append("<html><body text=#"+textColor+"><table width=\"100%\">");
+            sb.append("<html><body text=#").append(textColor).append("><table width=\"100%\">");
             for (int i = 0; i < arr.length; i++) {
                 if (i % 2 == 0) {
-                    sb.append("<tr style=\"background-color: " +
-                            evenRowColorStr + "\"><td><pre>" +
-                            (arr[i] == null ?
-                                arr[i] : htmlize(arr[i].toString())) +
-                            "</pre></td></tr>");
+                    sb.append("<tr style=\"background-color: ")
+                            .append(evenRowColorStr).append("\"><td><pre>")
+                            .append(arr[i] == null ?
+                                    arr[i] : htmlize(arr[i].toString()))
+                      .append("</pre></td></tr>");
                 } else {
-                    sb.append("<tr style=\"background-color: " +
-                            oddRowColorStr + "\"><td><pre>" +
-                            (arr[i] == null ?
-                                arr[i] : htmlize(arr[i].toString())) +
-                            "</pre></td></tr>");
+                    sb.append("<tr style=\"background-color: ")
+                            .append(oddRowColorStr).append("\"><td><pre>")
+                            .append(arr[i] == null ?
+                                    arr[i] : htmlize(arr[i].toString()))
+                            .append("</pre></td></tr>");
                 }
             }
             if (arr.length == 0) {
-                sb.append("<tr style=\"background-color: " +
-                        evenRowColorStr + "\"><td></td></tr>");
+                sb.append("<tr style=\"background-color: ")
+                        .append(evenRowColorStr).append("\"><td></td></tr>");
             }
             sb.append("</table></body></html>");
             arrayEditor.setText(sb.toString());
--- a/src/jdk.jconsole/share/classes/sun/tools/jconsole/inspector/XObject.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jconsole/share/classes/sun/tools/jconsole/inspector/XObject.java	Tue Dec 16 09:58:02 2014 -0800
@@ -65,7 +65,7 @@
         return object;
     }
 
-    //if true the the object.hashcode is added to the label
+    //if true the object.hashcode is added to the label
     public static void
         useHashCodeRepresentation(boolean useHashCodeRepresentation) {
         XObject.useHashCodeRepresentation = useHashCodeRepresentation;
--- a/src/jdk.jconsole/share/classes/sun/tools/jconsole/inspector/XTree.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jconsole/share/classes/sun/tools/jconsole/inspector/XTree.java	Tue Dec 16 09:58:02 2014 -0800
@@ -507,13 +507,13 @@
         // key order defined by the "orderedKeyPropertyList"
         for (String key : orderedKeyPropertyList) {
             if (map.containsKey(key)) {
-                sb.append(key + "=" + map.get(key) + ",");
+                sb.append(key).append('=').append(map.get(key)).append(',');
                 map.remove(key);
             }
         }
         // Add the remaining key/value pairs to the buffer
         for (Map.Entry<String, String> entry : map.entrySet()) {
-            sb.append(entry.getKey() + "=" + entry.getValue() + ",");
+            sb.append(entry.getKey()).append('=').append(entry.getValue()).append(',');
         }
         String orderedKeyPropertyListString = sb.toString();
         orderedKeyPropertyListString = orderedKeyPropertyListString.substring(
@@ -622,7 +622,7 @@
                     //
                     StringBuilder sb = new StringBuilder();
                     for (MBeanParameterInfo mbpi : mboi.getSignature()) {
-                        sb.append(mbpi.getType() + ",");
+                        sb.append(mbpi.getType()).append(',');
                     }
                     String signature = sb.toString();
                     if (signature.length() > 0) {
--- a/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachineManager.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachineManager.java	Tue Dec 16 09:58:02 2014 -0800
@@ -225,7 +225,7 @@
  * file contains a provider configuration file named
  * <tt>com.sun.jdi.connect.spi.TransportService</tt> in the resource
  * directory <tt>META-INF/services</tt>, and the provider
- * configuration file lists the the full-qualified class name of the
+ * configuration file lists the full-qualified class name of the
  * TransportService implementation. A TransportService is a concrete
  * sub-class of {@link com.sun.jdi.connect.spi.TransportService
  * TransportService}. The format of the provider configuration file
--- a/src/jdk.jdi/share/classes/com/sun/jdi/connect/AttachingConnector.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/connect/AttachingConnector.java	Tue Dec 16 09:58:02 2014 -0800
@@ -38,7 +38,7 @@
 @jdk.Exported
 public interface AttachingConnector extends Connector {
     /**
-     * Attaches to a running application and and returns a
+     * Attaches to a running application and returns a
      * mirror of its VM.
      * <p>
      * The connector uses the given argument map in
--- a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java	Tue Dec 16 09:58:02 2014 -0800
@@ -59,6 +59,7 @@
         StackFrame get() throws IncompatibleThreadStateException;
   }
 
+  @SuppressWarnings("deprecation")
   public static Value evaluate(String expr, VirtualMachine vm,
                                GetFrame frameGetter) throws ParseException,
                                             InvocationException,
--- a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/expr/ParseException.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/expr/ParseException.java	Tue Dec 16 09:58:02 2014 -0800
@@ -198,7 +198,7 @@
            default:
               if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
                  String s = "0000" + Integer.toString(ch, 16);
-                 retval.append("\\u" + s.substring(s.length() - 4, s.length()));
+                 retval.append("\\u").append(s.substring(s.length() - 4, s.length()));
               } else {
                  retval.append(ch);
               }
--- a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/expr/TokenMgrError.java	Tue Dec 16 09:58:02 2014 -0800
@@ -107,7 +107,7 @@
         default:
           if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
             String s = "0000" + Integer.toString(ch, 16);
-            retval.append("\\u" + s.substring(s.length() - 4, s.length()));
+            retval.append("\\u").append(s.substring(s.length() - 4, s.length()));
           } else {
             retval.append(ch);
           }
--- a/src/jdk.jdi/share/classes/com/sun/tools/jdi/ThreadReferenceImpl.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jdi/share/classes/com/sun/tools/jdi/ThreadReferenceImpl.java	Tue Dec 16 09:58:02 2014 -0800
@@ -613,7 +613,7 @@
     }
 
     /**
-     * Propagate the the thread state change information
+     * Propagate the thread state change information
      * to registered listeners.
      * Must be entered while synchronized on vm.state()
      */
--- a/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java	Tue Dec 16 09:58:02 2014 -0800
@@ -881,12 +881,12 @@
             } else if (tag == JDWP.TypeTag.ARRAY) {
                 sb.append("ArrayType");
             } else {
-                sb.append("UNKNOWN TAG: " + tag);
+                sb.append("UNKNOWN TAG: ").append(tag);
             }
             if (signature != null) {
-                sb.append(", signature='" + signature + "'");
+                sb.append(", signature='").append(signature).append('\'');
             }
-            sb.append(", id=" + id);
+            sb.append(", id=").append(id);
             vm.printTrace(sb.toString());
         }
         if (id == 0) {
@@ -1250,7 +1250,7 @@
         Long key = id;
 
         /*
-         * Attempt to retrieve an existing object object reference
+         * Attempt to retrieve an existing object reference
          */
         SoftObjectReference ref = objectsByID.get(key);
         if (ref != null) {
--- a/src/jdk.jdwp.agent/share/native/libjdwp/eventHandler.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/eventHandler.c	Tue Dec 16 09:58:02 2014 -0800
@@ -438,7 +438,7 @@
                 do {
                     /* The events have been reported and this
                      * thread is about to continue, but it may
-                     * have been started up up just to perform a
+                     * have been started up just to perform a
                      * requested method invocation. If so, we do
                      * the invoke now and then stop again waiting
                      * for another continue. By then another
--- a/src/jdk.jdwp.agent/share/native/libjdwp/transport.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/transport.c	Tue Dec 16 09:58:02 2014 -0800
@@ -66,8 +66,10 @@
         len = (int)strlen(msg);
         maxlen = len+len/2+2; /* Should allow for plenty of room */
         utf8msg = (jbyte*)jvmtiAllocate(maxlen+1);
-        (void)utf8FromPlatform(msg, len, utf8msg, maxlen);
-        utf8msg[maxlen] = 0;
+        if (utf8msg != NULL) {
+           (void)utf8FromPlatform(msg, len, utf8msg, maxlen);
+           utf8msg[maxlen] = 0;
+        }
     }
     if (rv == JDWPTRANSPORT_ERROR_NONE) {
         ERROR_MESSAGE(("transport error %d: %s",err, utf8msg));
@@ -391,6 +393,10 @@
     /* Convert commandLine from UTF-8 to platform encoding */
     len = (int)strlen(commandLine);
     buf = jvmtiAllocate(len*3+3);
+    if (buf == NULL) {
+        jvmtiDeallocate(commandLine);
+        return JDWP_ERROR(OUT_OF_MEMORY);
+    }
     (void)utf8ToPlatform((jbyte*)commandLine, len, buf, len*3+3);
 
     /* Exec commandLine */
@@ -447,21 +453,23 @@
         if (info == NULL) {
             return JDWP_ERROR(OUT_OF_MEMORY);
         }
+        info->timeout = timeout;
+
         info->name = jvmtiAllocate((int)strlen(name)+1);
-        (void)strcpy(info->name, name);
-        info->address = NULL;
-        info->timeout = timeout;
         if (info->name == NULL) {
             serror = JDWP_ERROR(OUT_OF_MEMORY);
             goto handleError;
         }
+        (void)strcpy(info->name, name);
+
+        info->address = NULL;
         if (address != NULL) {
             info->address = jvmtiAllocate((int)strlen(address)+1);
-            (void)strcpy(info->address, address);
             if (info->address == NULL) {
                 serror = JDWP_ERROR(OUT_OF_MEMORY);
                 goto handleError;
             }
+            (void)strcpy(info->address, address);
         }
 
         info->transport = trans;
@@ -478,6 +486,10 @@
          */
         len = (int)strlen(name) + (int)strlen(retAddress) + 2; /* ':' and '\0' */
         prop_value = (char*)jvmtiAllocate(len);
+        if (prop_value == NULL) {
+            serror = JDWP_ERROR(OUT_OF_MEMORY);
+            goto handleError;
+        }
         strcpy(prop_value, name);
         strcat(prop_value, ":");
         strcat(prop_value, retAddress);
--- a/src/jdk.jvmstat/share/classes/sun/jvmstat/monitor/BufferedMonitoredVm.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jvmstat/share/classes/sun/jvmstat/monitor/BufferedMonitoredVm.java	Tue Dec 16 09:58:02 2014 -0800
@@ -47,7 +47,7 @@
     byte[] getBytes();
 
     /**
-     * Interface to get the the size of the instrumentation buffer
+     * Interface to get the size of the instrumentation buffer
      * for the target Java Virtual Machine.
      *
      * @return int - the size of the instrumentation buffer for the
--- a/src/jdk.jvmstat/share/classes/sun/jvmstat/monitor/HostIdentifier.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jvmstat/share/classes/sun/jvmstat/monitor/HostIdentifier.java	Tue Dec 16 09:58:02 2014 -0800
@@ -227,7 +227,7 @@
      *
      * The necessary components of the VmIdentifier are extracted and
      * reassembled into a HostIdentifier. If a "file:" scheme (protocol)
-     * is specified, the the returned HostIdentifier will always be
+     * is specified, the returned HostIdentifier will always be
      * equivalent to HostIdentifier("file://localhost").
      *
      * @param vmid the VmIdentifier use to construct the HostIdentifier.
--- a/src/jdk.jvmstat/share/classes/sun/jvmstat/monitor/MonitoredVm.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jvmstat/share/classes/sun/jvmstat/monitor/MonitoredVm.java	Tue Dec 16 09:58:02 2014 -0800
@@ -59,7 +59,7 @@
      *
      * @param name the name of the Instrumentation object to find.
      * @return Monitor - the {@link Monitor} object that can be used to
-     *                   monitor the the named instrumentation object, or
+     *                   monitor the named instrumentation object, or
      *                   <tt>null</tt> if the named object doesn't exist.
      * @throws MonitorException Thrown if an error occurs while communicating
      *                          with the target Java Virtual Machine.
--- a/src/jdk.jvmstat/share/classes/sun/jvmstat/monitor/MonitoredVmUtil.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jvmstat/share/classes/sun/jvmstat/monitor/MonitoredVmUtil.java	Tue Dec 16 09:58:02 2014 -0800
@@ -58,7 +58,7 @@
      *
      * @param vm the target MonitoredVm
      * @return String - contains the command line of the target Java
-     *                  application or the the string "Unknown" if the
+     *                  application or the string "Unknown" if the
      *                  command line cannot be determined.
      */
     public static String commandLine(MonitoredVm vm) throws MonitorException {
@@ -73,7 +73,7 @@
      *
      * @param vm the target MonitoredVm
      * @return String - contains the arguments to the main class for the
-     *                  target Java application or the the string "Unknown"
+     *                  target Java application or the string "Unknown"
      *                  if the command line cannot be determined.
      */
     public static String mainArgs(MonitoredVm vm) throws MonitorException {
@@ -97,7 +97,7 @@
      * @param vm the target MonitoredVm
      * @param fullPath include the full path to Jar file, where applicable
      * @return String - contains the main class of the target Java
-     *                  application or the the string "Unknown" if the
+     *                  application or the string "Unknown" if the
      *                  command line cannot be determined.
      */
     public static String mainClass(MonitoredVm vm, boolean fullPath)
@@ -138,7 +138,7 @@
      *
      * @param vm the target MonitoredVm
      * @return String - contains the arguments passed to the JVM for the
-     *                  target Java application or the the string "Unknown"
+     *                  target Java application or the string "Unknown"
      *                  if the command line cannot be determined.
      */
     public static String jvmArgs(MonitoredVm vm) throws MonitorException {
@@ -151,7 +151,7 @@
      *
      * @param vm the target MonitoredVm
      * @return String - contains the flags passed to the JVM for the
-     *                  target Java application or the the string "Unknown"
+     *                  target Java application or the string "Unknown"
      *                  if the command line cannot be determined.
      */
     public static String jvmFlags(MonitoredVm vm) throws MonitorException {
--- a/src/jdk.jvmstat/share/classes/sun/jvmstat/monitor/remote/RemoteVm.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jvmstat/share/classes/sun/jvmstat/monitor/remote/RemoteVm.java	Tue Dec 16 09:58:02 2014 -0800
@@ -49,7 +49,7 @@
     byte[] getBytes() throws RemoteException;
 
     /**
-     * Interface to get the the size of the instrumentation buffer
+     * Interface to get the size of the instrumentation buffer
      * for the target Java Virtual Machine.
      *
      * @return int - the size of the instrumentation buffer for the
--- a/src/jdk.jvmstat/share/classes/sun/jvmstat/perfdata/monitor/AbstractPerfDataBuffer.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jvmstat/share/classes/sun/jvmstat/perfdata/monitor/AbstractPerfDataBuffer.java	Tue Dec 16 09:58:02 2014 -0800
@@ -91,7 +91,7 @@
      *
      * @param name the name of the Instrumentation object to find.
      * @return Monitor - the {@link Monitor} object that can be used to
-     *                   monitor the the named instrumentation object, or
+     *                   monitor the named instrumentation object, or
      *                   <tt>null</tt> if the named object doesn't exist.
      * @throws MonitorException Thrown if an error occurs while communicating
      *                          with the target Java Virtual Machine.
--- a/src/jdk.jvmstat/share/classes/sun/jvmstat/perfdata/monitor/PerfDataBufferImpl.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jvmstat/share/classes/sun/jvmstat/perfdata/monitor/PerfDataBufferImpl.java	Tue Dec 16 09:58:02 2014 -0800
@@ -158,6 +158,7 @@
      * the sun.jvmstat.perfdata.aliasmap file indicates some other
      * file as the source.
      */
+    @SuppressWarnings("deprecation")
     private void buildAliasMap() {
         assert Thread.holdsLock(this);
 
@@ -228,7 +229,7 @@
      *
      * @param name the name of the Instrumentation object to find.
      * @return Monitor - the {@link Monitor} object that can be used to
-     *                   monitor the the named instrumentation object, or
+     *                   monitor the named instrumentation object, or
      *                   <tt>null</tt> if the named object doesn't exist.
      * @throws MonitorException Thrown if an error occurs while communicating
      *                          with the target Java Virtual Machine.
--- a/src/jdk.jvmstat/share/classes/sun/jvmstat/perfdata/monitor/PerfIntegerMonitor.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jvmstat/share/classes/sun/jvmstat/perfdata/monitor/PerfIntegerMonitor.java	Tue Dec 16 09:58:02 2014 -0800
@@ -63,7 +63,7 @@
      * The object returned contains an Integer object containing the
      * current value of the IntegerInstrument.
      *
-     * @return Object - the current value of the the IntegerInstrument. The
+     * @return Object - the current value of the IntegerInstrument. The
      *                   return type is guaranteed to be of type Integer.
      */
     public Object getValue() {
--- a/src/jdk.jvmstat/share/classes/sun/jvmstat/perfdata/monitor/PerfLongMonitor.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jvmstat/share/classes/sun/jvmstat/perfdata/monitor/PerfLongMonitor.java	Tue Dec 16 09:58:02 2014 -0800
@@ -62,7 +62,7 @@
      * The object returned contains a Long object containing the
      * current value of the LongInstrument.
      *
-     * @return Object - the current value of the the LongInstrument. The
+     * @return Object - the current value of the LongInstrument. The
      *                  return type is guaranteed to be of type Long.
      */
     public Object getValue() {
--- a/src/jdk.jvmstat/share/classes/sun/jvmstat/perfdata/monitor/v1_0/PerfDataBuffer.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jvmstat/share/classes/sun/jvmstat/perfdata/monitor/v1_0/PerfDataBuffer.java	Tue Dec 16 09:58:02 2014 -0800
@@ -429,7 +429,7 @@
 
                 /*
                  * replace the real counters with pseudo counters that are
-                 * initialized to to the correct values. The maximum size of
+                 * initialized to the correct values. The maximum size of
                  * the eden and survivor spaces are supposed to be:
                  *    max_eden_size = new_size - (2*alignment).
                  *    max_survivor_size = new_size - (2*alignment).
--- a/src/jdk.jvmstat/share/classes/sun/tools/jstatd/Jstatd.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jvmstat/share/classes/sun/tools/jstatd/Jstatd.java	Tue Dec 16 09:58:02 2014 -0800
@@ -76,6 +76,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation") // Use of RMISecurityManager
     public static void main(String[] args) {
         String rminame = null;
         int argc = 0;
--- a/src/jdk.jvmstat/share/classes/sun/tools/jstatd/RemoteHostImpl.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.jvmstat/share/classes/sun/tools/jstatd/RemoteHostImpl.java	Tue Dec 16 09:58:02 2014 -0800
@@ -68,7 +68,7 @@
 
         sb.append("local://").append(lvmid).append("@localhost");
         if (mode != null) {
-            sb.append("?mode=" + mode);
+            sb.append("?mode=").append(mode);
         }
 
         String vmidStr = sb.toString();
--- a/src/jdk.naming.dns/share/classes/com/sun/jndi/dns/ResourceRecord.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.naming.dns/share/classes/com/sun/jndi/dns/ResourceRecord.java	Tue Dec 16 09:58:02 2014 -0800
@@ -103,7 +103,7 @@
     int rrlen;                  // number of octets in encoded RR
     DnsName name;               // name field of RR, including root label
     int rrtype;                 // type field of RR
-    String rrtypeName;          // name of of rrtype
+    String rrtypeName;          // name of rrtype
     int rrclass;                // class field of RR
     String rrclassName;         // name of rrclass
     int ttl = 0;                // ttl field of RR
--- a/src/jdk.naming.dns/share/classes/sun/net/spi/nameservice/dns/DNSNameService.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.naming.dns/share/classes/sun/net/spi/nameservice/dns/DNSNameService.java	Tue Dec 16 09:58:02 2014 -0800
@@ -463,12 +463,12 @@
 
     // ---------
 
-    private static void appendIfLiteralAddress(String addr, StringBuffer sb) {
+    private static void appendIfLiteralAddress(String addr, StringBuilder sb) {
         if (IPAddressUtil.isIPv4LiteralAddress(addr)) {
-            sb.append("dns://" + addr + " ");
+            sb.append("dns://").append(addr).append(' ');
         } else {
             if (IPAddressUtil.isIPv6LiteralAddress(addr)) {
-                sb.append("dns://[" + addr + "] ");
+                sb.append("dns://[").append(addr).append("] ");
             }
         }
     }
@@ -478,7 +478,7 @@
      *         corresponding to the supplied List of nameservers.
      */
     private static String createProviderURL(List<String> nsList) {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         for (String s: nsList) {
             appendIfLiteralAddress(s, sb);
         }
@@ -491,7 +491,7 @@
      *         contained in the provided str.
      */
     private static String createProviderURL(String str) {
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         StringTokenizer st = new StringTokenizer(str, ",");
         while (st.hasMoreTokens()) {
             appendIfLiteralAddress(st.nextToken(), sb);
--- a/src/jdk.rmic/share/classes/sun/tools/java/ClassDefinition.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.rmic/share/classes/sun/tools/java/ClassDefinition.java	Tue Dec 16 09:58:02 2014 -0800
@@ -295,7 +295,7 @@
     }
 
     /**
-     * Tell if the class is local or or anonymous class, or inside
+     * Tell if the class is local or anonymous class, or inside
      * such a class, which means it cannot be mentioned outside of
      * its file.
      */
@@ -770,7 +770,7 @@
     }
 
     /**
-     * We know the the field is marked protected (and not public) and that
+     * We know the field is marked protected (and not public) and that
      * the field is visible (as per canAccess).  Can we access the field as
      * <accessor>.<field>, where <accessor> has the type <accessorType>?
      *
--- a/src/jdk.runtime/share/classes/sun/security/tools/policytool/PolicyTool.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.runtime/share/classes/sun/security/tools/policytool/PolicyTool.java	Tue Dec 16 09:58:02 2014 -0800
@@ -980,8 +980,9 @@
                                 grantEntry.principals.listIterator();
             while (list.hasNext()) {
                 PolicyParser.PrincipalEntry pppe = list.next();
-                sb.append(" Principal " + pppe.getDisplayClass() + " " +
-                    pppe.getDisplayName(true));
+                sb.append(" Principal ").append(pppe.getDisplayClass())
+                        .append(' ')
+                        .append(pppe.getDisplayName(true));
                 if (list.hasNext()) sb.append(", ");
             }
             result = sb.toString();
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpMultiChannel.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpMultiChannel.java	Tue Dec 16 09:58:02 2014 -0800
@@ -219,7 +219,7 @@
      *         bind the socket to an automatically assigned socket address
      *
      * @param  backlog
-     *         The maximum number number of pending connections
+     *         The maximum number of pending connections
      *
      * @return  This channel
      *
@@ -706,7 +706,7 @@
      *
      * @throws  SecurityException
      *          If a security manager has been installed and it does not permit
-     *          new associations to be setup with the the messages's address
+     *          new associations to be setup with the messages's address
      *
      * @throws  IOException
      *          If some other I/O error occurs
--- a/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpServerChannel.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.sctp/share/classes/com/sun/nio/sctp/SctpServerChannel.java	Tue Dec 16 09:58:02 2014 -0800
@@ -214,7 +214,7 @@
      *         bind the socket to an automatically assigned socket address
      *
      * @param  backlog
-     *         The maximum number number of pending associations
+     *         The maximum number of pending associations
      *
      * @return  This channel
      *
--- a/src/jdk.sctp/unix/native/libsctp/SctpChannelImpl.c	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.sctp/unix/native/libsctp/SctpChannelImpl.c	Tue Dec 16 09:58:02 2014 -0800
@@ -507,7 +507,7 @@
             if (handleNotification(env, fd, resultContainerObj, snp, rv,
                                    (msg->msg_flags & MSG_EOR),
                                    (struct sockaddr*)&sa ) == JNI_TRUE) {
-                /* We have received a notification that is of interest to
+                /* We have received a notification that is of interest
                    to the Java API. The appropriate notification will be
                    set in the result container. */
                 if (allocated == JNI_TRUE) {
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/NTDomainPrincipal.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/NTDomainPrincipal.java	Tue Dec 16 09:58:02 2014 -0800
@@ -117,7 +117,7 @@
      * @param o Object to be compared for equality with this
      *          <code>NTDomainPrincipal</code>.
      *
-     * @return true if the specified Object is equal equal to this
+     * @return true if the specified Object is equal to this
      *          <code>NTDomainPrincipal</code>.
      */
     public boolean equals(Object o) {
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/NTNumericCredential.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/NTNumericCredential.java	Tue Dec 16 09:58:02 2014 -0800
@@ -88,7 +88,7 @@
      * @param o Object to be compared for equality with this
      *          <code>NTNumericCredential</code>.
      *
-     * @return true if the specified Object is equal equal to this
+     * @return true if the specified Object is equal to this
      *          <code>NTNumericCredential</code>.
      */
     public boolean equals(Object o) {
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidDomainPrincipal.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidDomainPrincipal.java	Tue Dec 16 09:58:02 2014 -0800
@@ -91,7 +91,7 @@
      * @param o Object to be compared for equality with this
      *          <code>NTSidDomainPrincipal</code>.
      *
-     * @return true if the specified Object is equal equal to this
+     * @return true if the specified Object is equal to this
      *          <code>NTSidDomainPrincipal</code>.
      */
     public boolean equals(Object o) {
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidGroupPrincipal.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidGroupPrincipal.java	Tue Dec 16 09:58:02 2014 -0800
@@ -86,7 +86,7 @@
      * @param o Object to be compared for equality with this
      *          <code>NTSidGroupPrincipal</code>.
      *
-     * @return true if the specified Object is equal equal to this
+     * @return true if the specified Object is equal to this
      *          <code>NTSidGroupPrincipal</code>.
      */
     public boolean equals(Object o) {
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidPrimaryGroupPrincipal.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidPrimaryGroupPrincipal.java	Tue Dec 16 09:58:02 2014 -0800
@@ -89,7 +89,7 @@
      * @param o Object to be compared for equality with this
      *          <code>NTSidPrimaryGroupPrincipal</code>.
      *
-     * @return true if the specified Object is equal equal to this
+     * @return true if the specified Object is equal to this
      *          <code>NTSidPrimaryGroupPrincipal</code>.
      */
     public boolean equals(Object o) {
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidUserPrincipal.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/NTSidUserPrincipal.java	Tue Dec 16 09:58:02 2014 -0800
@@ -85,7 +85,7 @@
      * @param o Object to be compared for equality with this
      *          <code>NTSidUserPrincipal</code>.
      *
-     * @return true if the specified Object is equal equal to this
+     * @return true if the specified Object is equal to this
      *          <code>NTSidUserPrincipal</code>.
      */
     public boolean equals(Object o) {
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/NTUserPrincipal.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/NTUserPrincipal.java	Tue Dec 16 09:58:02 2014 -0800
@@ -111,7 +111,7 @@
      * @param o Object to be compared for equality with this
      *          <code>NTPrincipal</code>.
      *
-     * @return true if the specified Object is equal equal to this
+     * @return true if the specified Object is equal to this
      *          <code>NTPrincipal</code>.
      */
     public boolean equals(Object o) {
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisNumericGroupPrincipal.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisNumericGroupPrincipal.java	Tue Dec 16 09:58:02 2014 -0800
@@ -184,7 +184,7 @@
      * @param o Object to be compared for equality with this
      *          <code>SolarisNumericGroupPrincipal</code>.
      *
-     * @return true if the specified Object is equal equal to this
+     * @return true if the specified Object is equal to this
      *          <code>SolarisNumericGroupPrincipal</code>.
      */
     public boolean equals(Object o) {
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisNumericUserPrincipal.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisNumericUserPrincipal.java	Tue Dec 16 09:58:02 2014 -0800
@@ -151,7 +151,7 @@
      * @param o Object to be compared for equality with this
      *          <code>SolarisNumericUserPrincipal</code>.
      *
-     * @return true if the specified Object is equal equal to this
+     * @return true if the specified Object is equal to this
      *          <code>SolarisNumericUserPrincipal</code>.
      */
     public boolean equals(Object o) {
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisPrincipal.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/SolarisPrincipal.java	Tue Dec 16 09:58:02 2014 -0800
@@ -115,7 +115,7 @@
      * @param o Object to be compared for equality with this
      *          <code>SolarisPrincipal</code>.
      *
-     * @return true if the specified Object is equal equal to this
+     * @return true if the specified Object is equal to this
      *          <code>SolarisPrincipal</code>.
      */
     public boolean equals(Object o) {
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixNumericGroupPrincipal.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixNumericGroupPrincipal.java	Tue Dec 16 09:58:02 2014 -0800
@@ -187,7 +187,7 @@
      * @param o Object to be compared for equality with this
      *          <code>UnixNumericGroupPrincipal</code>.
      *
-     * @return true if the specified Object is equal equal to this
+     * @return true if the specified Object is equal to this
      *          <code>UnixNumericGroupPrincipal</code>.
      */
     public boolean equals(Object o) {
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixNumericUserPrincipal.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixNumericUserPrincipal.java	Tue Dec 16 09:58:02 2014 -0800
@@ -147,7 +147,7 @@
      * @param o Object to be compared for equality with this
      *          <code>UnixNumericUserPrincipal</code>.
      *
-     * @return true if the specified Object is equal equal to this
+     * @return true if the specified Object is equal to this
      *          <code>UnixNumericUserPrincipal</code>.
      */
     public boolean equals(Object o) {
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixPrincipal.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/UnixPrincipal.java	Tue Dec 16 09:58:02 2014 -0800
@@ -112,7 +112,7 @@
      * @param o Object to be compared for equality with this
      *          <code>UnixPrincipal</code>.
      *
-     * @return true if the specified Object is equal equal to this
+     * @return true if the specified Object is equal to this
      *          <code>UnixPrincipal</code>.
      */
     public boolean equals(Object o) {
--- a/src/jdk.security.auth/share/classes/com/sun/security/auth/X500Principal.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.security.auth/share/classes/com/sun/security/auth/X500Principal.java	Tue Dec 16 09:58:02 2014 -0800
@@ -130,7 +130,7 @@
      * @param o Object to be compared for equality with this
      *          <code>X500Principal</code>.
      *
-     * @return true if the specified Object is equal equal to this
+     * @return true if the specified Object is equal to this
      *          <code>X500Principal</code>.
      */
     public boolean equals(Object o) {
--- a/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipUtils.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipUtils.java	Tue Dec 16 09:58:02 2014 -0800
@@ -103,6 +103,7 @@
     /*
      * Converts DOS time to Java time (number of milliseconds since epoch).
      */
+    @SuppressWarnings("deprecation")
     public static long dosToJavaTime(long dtime) {
         Date d = new Date((int)(((dtime >> 25) & 0x7f) + 80),
                           (int)(((dtime >> 21) & 0x0f) - 1),
@@ -116,6 +117,7 @@
     /*
      * Converts Java time to DOS time.
      */
+    @SuppressWarnings("deprecation")
     public static long javaToDosTime(long time) {
         Date d = new Date(time);
         int year = d.getYear() + 1900;
--- a/src/sample/share/nio/server/ChannelIOSecure.java	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/sample/share/nio/server/ChannelIOSecure.java	Tue Dec 16 09:58:02 2014 -0800
@@ -576,7 +576,7 @@
 
         /*
          * We ignore the return value here, we return the
-         * number of bytes actually consumed from the the file.
+         * number of bytes actually consumed from the file.
          * We'll flush the output buffer before we start shutting down.
          */
         doWrite(fileChannelBB);
--- a/src/sample/solaris/dtrace/hotspot/gc_time_stat.d	Tue Dec 16 09:57:33 2014 -0800
+++ b/src/sample/solaris/dtrace/hotspot/gc_time_stat.d	Tue Dec 16 09:58:02 2014 -0800
@@ -111,8 +111,8 @@
  *  arg4: uintptr_t,    the initial size of the memory pool (in bytes)
  *  arg5: uintptr_t,    the amount of memory in use in the memory pool
  *                          (in bytes)
- *  arg6: uintptr_t,    the the number of committed pages in the memory pool
- *  arg7: uintptr_t,    the the maximum size of the memory pool
+ *  arg6: uintptr_t,    the number of committed pages in the memory pool
+ *  arg7: uintptr_t,    the maximum size of the memory pool
  */
 hotspot$target:::mem-pool-gc-begin
 {
--- a/test/Makefile	Tue Dec 16 09:57:33 2014 -0800
+++ b/test/Makefile	Tue Dec 16 09:58:02 2014 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1995, 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
@@ -258,6 +258,11 @@
 
 # ------------------------------------------------------------------
 
+# When called from JPRT the TESTDIRS variable is set to the jtreg tests to run
+ifdef TESTDIRS
+  TEST_SELECTION = $(TESTDIRS)
+endif
+
 ifdef CONCURRENCY
   EXTRA_JTREG_OPTIONS += -concurrency:$(CONCURRENCY)
 endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/io/InputStream/TransferTo.java	Tue Dec 16 09:58:02 2014 -0800
@@ -0,0 +1,326 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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.
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.FilterInputStream;
+import java.io.FilterOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Arrays;
+import java.util.Random;
+
+import static java.lang.String.format;
+
+/*
+ * @test
+ * @bug 8066867