changeset 10522:1828f73b35cf jdk9-b28

Merge
author lana
date Thu, 28 Aug 2014 14:54:07 -0700
parents 17d1dcffc733 (current diff) 5b5651cec6bd (diff)
children 9f92e7cade3d
files .hgtags make/src/classes/build/tools/addtorestrictedpkgs/AddToRestrictedPkgs.java src/demo/share/jfc/Font2DTest/resources/TextResources.properties src/demo/share/jfc/Font2DTest/resources/TextResources_de.properties src/demo/share/jfc/Font2DTest/resources/TextResources_en.properties src/demo/share/jfc/Font2DTest/resources/TextResources_en_GB.properties src/demo/share/jfc/Font2DTest/resources/TextResources_ja.properties src/demo/share/jfc/Font2DTest/resources/TextResources_ko.properties src/demo/share/jfc/Font2DTest/resources/TextResources_zh_CN.properties src/demo/share/jfc/Font2DTest/resources/resource.data src/java.base/share/conf/security/java.security-aix src/java.base/share/conf/security/java.security-linux src/java.base/share/conf/security/java.security-macosx src/java.base/share/conf/security/java.security-solaris src/java.base/share/conf/security/java.security-windows test/sun/tools/jps/jps-Defaults.sh test/sun/tools/jps/jps-V_2.sh test/sun/tools/jps/jps-V_Output2.awk test/sun/tools/jps/jps-Vm_2.sh test/sun/tools/jps/jps-Vm_Output2.awk test/sun/tools/jps/jps-Vvm.sh test/sun/tools/jps/jps-Vvm_Output1.awk test/sun/tools/jps/jps-Vvml.sh test/sun/tools/jps/jps-Vvml_2.sh test/sun/tools/jps/jps-Vvml_Output1.awk test/sun/tools/jps/jps-Vvml_Output2.awk test/sun/tools/jps/jps-help.sh test/sun/tools/jps/jps-l_1.sh test/sun/tools/jps/jps-l_2.sh test/sun/tools/jps/jps-l_Output1.awk test/sun/tools/jps/jps-l_Output2.awk test/sun/tools/jps/jps-lm.sh test/sun/tools/jps/jps-lm_Output1.awk test/sun/tools/jps/jps-m.sh test/sun/tools/jps/jps-m_2.sh test/sun/tools/jps/jps-m_Output1.awk test/sun/tools/jps/jps-m_Output2.awk test/sun/tools/jps/jps-q.sh test/sun/tools/jps/jps-q_Output1.awk test/sun/tools/jps/jps-v_1.sh test/sun/tools/jps/jps-v_Output1.awk test/sun/tools/jps/jps-vm_1.sh test/sun/tools/jps/jps-vm_Output1.awk test/sun/tools/jps/jps_Output1.awk test/sun/tools/jps/vmflags
diffstat 392 files changed, 14349 insertions(+), 9350 deletions(-) [+]
line wrap: on
line diff
--- a/make/CopyIntoClasses.gmk	Thu Aug 21 14:16:26 2014 -0700
+++ b/make/CopyIntoClasses.gmk	Thu Aug 28 14:54:07 2014 -0700
@@ -164,15 +164,15 @@
 ################################################################################
 
 ifneq ($(OPENJDK_TARGET_OS), macosx)
-  OPENJDK_TARGET_OS_FLAVORMAP_PROPERTIES = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes/sun/awt/datatransfer/flavormap.properties
+  OPENJDK_TARGET_OS_FLAVORMAP_PROPERTIES = $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/classes/sun/datatransfer/resources/flavormap.properties
 else
-  OPENJDK_TARGET_OS_FLAVORMAP_PROPERTIES = $(JDK_TOPDIR)/src/macosx/classes/sun/awt/datatransfer/flavormap.properties
+  OPENJDK_TARGET_OS_FLAVORMAP_PROPERTIES = $(JDK_TOPDIR)/src/java.desktop/macosx/classes/sun/datatransfer/resources/flavormap.properties
 endif
 
-$(JDK_OUTPUTDIR)/classes/sun/awt/datatransfer/flavormap.properties: $(OPENJDK_TARGET_OS_FLAVORMAP_PROPERTIES)
+$(JDK_OUTPUTDIR)/classes/sun/datatransfer/resources/flavormap.properties: $(OPENJDK_TARGET_OS_FLAVORMAP_PROPERTIES)
 	$(install-file)
 
-COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/sun/awt/datatransfer/flavormap.properties
+COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/sun/datatransfer/resources/flavormap.properties
 
 ################################################################################
 
--- a/make/Tools.gmk	Thu Aug 21 14:16:26 2014 -0700
+++ b/make/Tools.gmk	Thu Aug 28 14:54:07 2014 -0700
@@ -101,6 +101,9 @@
 TOOL_BLACKLISTED_CERTS = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
     build.tools.blacklistedcertsconverter.BlacklistedCertsConverter
 
+TOOL_MAKEJAVASECURITY = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
+    build.tools.makejavasecurity.MakeJavaSecurity
+
 
 # TODO: There are references to the jdwpgen.jar in jdk/make/netbeans/jdwpgen/build.xml
 # and nbproject/project.properties in the same dir. Needs to be looked at.
@@ -136,9 +139,6 @@
     -cp "$(JDK_OUTPUTDIR)/btclasses$(PATH_SEP)$(JDK_OUTPUTDIR)" \
     build.tools.module.GenerateModulesXml
 
-TOOL_ADDTORESTRICTEDPKGS = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
-    build.tools.addtorestrictedpkgs.AddToRestrictedPkgs
-
 ##########################################################################################
 
 # Tools needed on solaris because OBJCOPY is broken.
--- a/make/gendata/Gendata-java.base.gmk	Thu Aug 21 14:16:26 2014 -0700
+++ b/make/gendata/Gendata-java.base.gmk	Thu Aug 28 14:54:07 2014 -0700
@@ -62,25 +62,18 @@
 
 ##########################################################################################
 
-PROPS_SRC := $(JDK_TOPDIR)/src/java.base/share/conf/security/java.security-$(OPENJDK_TARGET_OS)
-PROPS_DST := $(JDK_OUTPUTDIR)/lib/security/java.security
-
-# Optionally set this variable to a file to add extra restricted packages.
-ifneq ($(RESTRICTED_PKGS_SRC), )
-
-  $(PROPS_DST): $(PROPS_SRC) $(RESTRICTED_PKGS_SRC)
+GENDATA_JAVA_SECURITY_SRC := $(JDK_TOPDIR)/src/java.base/share/conf/security/java.security
+GENDATA_JAVA_SECURITY := $(JDK_OUTPUTDIR)/lib/security/java.security
+ 
+# RESTRICTED_PKGS_SRC is optionally set in custom extension for this makefile
+ 
+$(GENDATA_JAVA_SECURITY): $(BUILD_TOOLS) $(GENDATA_JAVA_SECURITY_SRC) $(RESTRICTED_PKGS_SRC)
+	$(ECHO) "Generating java.security"
 	$(MKDIR) -p $(@D)
-	$(TOOL_ADDTORESTRICTEDPKGS) $(PROPS_SRC) $@.tmp `$(CAT) $(RESTRICTED_PKGS_SRC) | $(TR) "\n" " "`
-	$(MV) $@.tmp $@
-
-else
-
-  $(PROPS_DST): $(PROPS_SRC)
-	$(call install-file)
-
-endif
-
-GENDATA += $(PROPS_DST)
+	$(TOOL_MAKEJAVASECURITY) $(GENDATA_JAVA_SECURITY_SRC) $@ $(OPENJDK_TARGET_OS) \
+		$(RESTRICTED_PKGS_SRC) || exit 1
+ 
+GENDATA += $(GENDATA_JAVA_SECURITY)
 
 ##########################################################################################
 
--- a/make/gensrc/GensrcLocaleDataMetaInfo.gmk	Thu Aug 21 14:16:26 2014 -0700
+++ b/make/gensrc/GensrcLocaleDataMetaInfo.gmk	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -34,7 +34,8 @@
     -name "TimeZoneNames_*.java" -o -name "TimeZoneNames_*.properties" -o \
     -name "LocaleNames_*.java" -o -name "LocaleNames_*.properties" -o \
     -name "CurrencyNames_*.java" -o -name "CurrencyNames_*.properties" -o \
-    -name "CalendarData_*.java" -o -name "CalendarData_*.properties")
+    -name "CalendarData_*.java" -o -name "CalendarData_*.properties" -o \
+    -name "BreakIteratorInfo_*.java" -o -name "BreakIteratorRules_*.java")
 
 # Then translate the locale files into for example: FormatData_sv
 LOCALE_RESOURCES := $(sort $(subst .properties,,$(subst .java,,$(notdir $(LOCALE_FILES)))))
@@ -86,6 +87,12 @@
 #sun.text.resources.CollationData
 $(eval $(call CaptureLocale,CollationData))
 
+#sun.text.resources.BreakIteratorInfo
+$(eval $(call CaptureLocale,BreakIteratorInfo))
+
+#sun.text.resources.BreakIteratorRules
+$(eval $(call CaptureLocale,BreakIteratorRules))
+
 #sun.util.resources.TimeZoneNames
 $(eval $(call CaptureLocale,TimeZoneNames))
 
--- a/make/lib/Awt2dLibraries.gmk	Thu Aug 21 14:16:26 2014 -0700
+++ b/make/lib/Awt2dLibraries.gmk	Thu Aug 28 14:54:07 2014 -0700
@@ -973,7 +973,6 @@
       #
 
   ifeq ($(OPENJDK_TARGET_OS), macosx)
-    LIBSPLASHSCREEN_CFLAGS += -F/System/Library/Frameworks/JavaVM.framework/Frameworks
     LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX
     LIBSPLASHSCREEN_CFLAGS += -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxapp
 
--- a/make/src/classes/build/tools/addtorestrictedpkgs/AddToRestrictedPkgs.java	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package build.tools.addtorestrictedpkgs;
-
-import java.io.*;
-
-/**
- * Adds additional packages to the package.access and package.definition
- * security properties.
- */
-public class AddToRestrictedPkgs {
-
-    private static final String PKG_ACC = "package.access";
-    private static final String PKG_DEF = "package.definition";
-    private static final int PKG_ACC_INDENT = 15;
-    private static final int PKG_DEF_INDENT = 19;
-
-    public static void main(String[] args) throws Exception {
-
-        if (args.length < 3) {
-            System.err.println("Usage: java AddToRestrictedPkgs " +
-                               "[input java.security file name] " +
-                               "[output java.security file name] " +
-                               "[packages ...]");
-            System.exit(1);
-        }
-
-        try (FileReader fr = new FileReader(args[0]);
-             BufferedReader br = new BufferedReader(fr);
-             FileWriter fw = new FileWriter(args[1]);
-             BufferedWriter bw = new BufferedWriter(fw))
-        {
-            // parse the file line-by-line, looking for pkg access properties
-            String line = br.readLine();
-            while (line != null) {
-                if (line.startsWith(PKG_ACC)) {
-                    writePackages(br, bw, line, PKG_ACC_INDENT, args);
-                } else if (line.startsWith(PKG_DEF)) {
-                    writePackages(br, bw, line, PKG_DEF_INDENT, args);
-                } else {
-                    writeLine(bw, line);
-                }
-                line = br.readLine();
-            }
-            bw.flush();
-        }
-    }
-
-    private static void writePackages(BufferedReader br, BufferedWriter bw,
-                                      String line, int numSpaces,
-                                      String[] args) throws IOException {
-        // parse property until EOL, not including line breaks
-        while (line.endsWith("\\")) {
-            writeLine(bw, line);
-            line = br.readLine();
-        }
-        // append comma and line-break to last package
-        writeLine(bw, line + ",\\");
-        // add new packages, one per line
-        for (int i = 2; i < args.length - 1; i++) {
-            indent(bw, numSpaces);
-            writeLine(bw, args[i] + ",\\");
-        }
-        indent(bw, numSpaces);
-        writeLine(bw, args[args.length - 1]);
-    }
-
-    private static void writeLine(BufferedWriter bw, String line)
-        throws IOException
-    {
-        bw.write(line);
-        bw.newLine();
-    }
-
-    private static void indent(BufferedWriter bw, int numSpaces)
-        throws IOException
-    {
-        for (int i = 0; i < numSpaces; i++) {
-            bw.append(' ');
-        }
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/src/classes/build/tools/makejavasecurity/MakeJavaSecurity.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,168 @@
+/*
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package build.tools.makejavasecurity;
+
+import java.io.*;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.*;
+
+/**
+ * Builds the java.security file, including
+ *
+ * 1. Adds additional packages to the package.access and
+ *    package.definition security properties.
+ * 2. Filter out platform-unrelated parts
+ *
+ * In order to easily maintain platform-related entries, every item
+ * (including the last line) in package.access and package.definition
+ * MUST end with ',\'. A blank line MUST exist after the last line.
+ */
+public class MakeJavaSecurity {
+
+    private static final String PKG_ACC = "package.access";
+    private static final String PKG_DEF = "package.definition";
+    private static final int PKG_ACC_INDENT = 15;
+    private static final int PKG_DEF_INDENT = 19;
+
+    public static void main(String[] args) throws Exception {
+
+        if (args.length < 3) {
+            System.err.println("Usage: java MakeJavaSecurity " +
+                               "[input java.security file name] " +
+                               "[output java.security file name] " +
+                               "[openjdk target os] " +
+                               "[more restricted packages file name?]");
+            System.exit(1);
+        }
+
+        // more restricted packages
+        List<String> extraLines;
+        if (args.length == 4) {
+            extraLines = Files.readAllLines(Paths.get(args[3]));
+        } else {
+            extraLines = Collections.emptyList();
+        }
+
+        List<String> lines = new ArrayList<>();
+
+        // read raw java.security and add more restricted packages
+        try (FileReader fr = new FileReader(args[0]);
+                BufferedReader br = new BufferedReader(fr)) {
+            // looking for pkg access properties
+            String line = br.readLine();
+            while (line != null) {
+                if (line.startsWith(PKG_ACC)) {
+                    addPackages(br, lines, line, PKG_ACC_INDENT, extraLines);
+                } else if (line.startsWith(PKG_DEF)) {
+                    addPackages(br, lines, line, PKG_DEF_INDENT, extraLines);
+                } else {
+                    lines.add(line);
+                }
+                line = br.readLine();
+            }
+        }
+
+        // Filter out platform-unrelated ones. We only support
+        // #ifdef, #ifndef, and #endif.
+        int mode = 0;   // 0: out of block, 1: in match, 2: in non-match
+        Iterator<String> iter = lines.iterator();
+        while (iter.hasNext()) {
+            String line = iter.next();
+            if (line.startsWith("#endif")) {
+                mode = 0;
+                iter.remove();
+            } else if (line.startsWith("#ifdef ")) {
+                mode = line.endsWith(args[2])?1:2;
+                iter.remove();
+            } else if (line.startsWith("#ifndef ")) {
+                mode = line.endsWith(args[2])?2:1;
+                iter.remove();
+            } else {
+                if (mode == 2) iter.remove();
+            }
+        }
+
+        // Update .tbd to .1, .2, etc.
+        Map<String,Integer> count = new HashMap<>();
+        for (int i=0; i<lines.size(); i++) {
+            String line = lines.get(i);
+            int index = line.indexOf(".tbd");
+            if (index >= 0) {
+                String prefix = line.substring(0, index);
+                int n = count.getOrDefault(prefix, 1);
+                count.put(prefix, n+1);
+                lines.set(i, prefix + "." + n + line.substring(index+4));
+            }
+        }
+
+        // Clean up the last line of PKG_ACC and PKG_DEF blocks.
+        // Not really necessary since a blank line follows.
+        boolean inBlock = false;
+        for (int i=0; i<lines.size(); i++) {
+            String line = lines.get(i);
+            if (line.startsWith(PKG_ACC) || line.startsWith(PKG_DEF)) {
+                inBlock = true;
+            }
+            if (inBlock) {
+                if (line.isEmpty()) {
+                    String lastLine = lines.get(i-1);
+                    lines.set(i-1, lastLine.substring(0, lastLine.length()-2));
+                    inBlock = false;
+                }
+            }
+        }
+
+        Files.write(Paths.get(args[1]), lines);
+    }
+
+    private static void addPackages(BufferedReader br, List<String> lines,
+                                    String line, int numSpaces,
+                                    List<String> args) throws IOException {
+        // parse property until EOL, not including line breaks
+        boolean first = true;
+        while (!line.isEmpty()) {
+            if (!line.startsWith("#")) {
+                if (!line.endsWith(",\\") ||
+                        (!first && line.contains("="))) {
+                    throw new IOException("Invalid line: " + line);
+                }
+            }
+            lines.add(line);
+            line = br.readLine();
+            first = false;
+        }
+        // add new packages, one per line
+        for (String arg: args) {
+            if (arg.startsWith("#")) {
+                lines.add(arg);
+            } else {
+                lines.add(String.format("%"+numSpaces+"s", "") + arg + ",\\");
+            }
+        }
+        lines.add(line);
+    }
+}
--- a/src/demo/share/jfc/Font2DTest/resources/TextResources.properties	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-string=This is Java 2D! (Default)
--- a/src/demo/share/jfc/Font2DTest/resources/TextResources_de.properties	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-string=This is Java 2D! (German) \u00f6 \u00df \u00dc
--- a/src/demo/share/jfc/Font2DTest/resources/TextResources_en.properties	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-string=This is Java 2D! (English) A B C
--- a/src/demo/share/jfc/Font2DTest/resources/TextResources_en_GB.properties	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-string=This is Java 2D! (English in Great Britain) \u0075 \u006b Z
--- a/src/demo/share/jfc/Font2DTest/resources/TextResources_ja.properties	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-string=Java 2D\u3067\u3059\u3002(\u30C7\u30D5\u30A9\u30EB\u30C8)
--- a/src/demo/share/jfc/Font2DTest/resources/TextResources_ko.properties	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-string=This is Java 2D! (Korean)
--- a/src/demo/share/jfc/Font2DTest/resources/TextResources_zh_CN.properties	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-string=\u8FD9\u662F Java 2D! (\u9ED8\u8BA4\u503C)
--- a/src/demo/share/jfc/Font2DTest/resources/resource.data	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-en US
-en GB
-ko KO
-ab KO
-de DE
--- a/src/java.base/share/classes/java/lang/Class.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/java/lang/Class.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1322,7 +1322,7 @@
         // (for anonymous classes): 1 or more digits.
 
         // Since getSimpleBinaryName() will strip the binary name of
-        // the immediatly enclosing class, we are now looking at a
+        // the immediately enclosing class, we are now looking at a
         // string that matches the regular expression "\$[0-9]*"
         // followed by a simple name (considering the simple of an
         // anonymous class to be the empty string).
--- a/src/java.base/share/classes/java/lang/ClassLoader.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/java/lang/ClassLoader.java	Thu Aug 28 14:54:07 2014 -0700
@@ -205,7 +205,7 @@
         }
 
         /**
-         * Registers the given class loader type as parallel capabale.
+         * Registers the given class loader type as parallel capable.
          * Returns {@code true} is successfully registered; {@code false} if
          * loader's super class is not registered.
          */
@@ -832,7 +832,7 @@
     {
         int len = b.remaining();
 
-        // Use byte[] if not a direct ByteBufer:
+        // Use byte[] if not a direct ByteBuffer:
         if (!b.isDirect()) {
             if (b.hasArray()) {
                 return defineClass(name, b.array(),
--- a/src/java.base/share/classes/java/lang/StringCoding.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/java/lang/StringCoding.java	Thu Aug 28 14:54:07 2014 -0700
@@ -196,19 +196,19 @@
     static char[] decode(Charset cs, byte[] ba, int off, int len) {
         // (1)We never cache the "external" cs, the only benefit of creating
         // an additional StringDe/Encoder object to wrap it is to share the
-        // de/encode() method. These SD/E objects are short-lifed, the young-gen
-        // gc should be able to take care of them well. But the best approash
+        // de/encode() method. These SD/E objects are short-lived, the young-gen
+        // gc should be able to take care of them well. But the best approach
         // is still not to generate them if not really necessary.
         // (2)The defensive copy of the input byte/char[] has a big performance
         // impact, as well as the outgoing result byte/char[]. Need to do the
         // optimization check of (sm==null && classLoader0==null) for both.
         // (3)getClass().getClassLoader0() is expensive
         // (4)There might be a timing gap in isTrusted setting. getClassLoader0()
-        // is only chcked (and then isTrusted gets set) when (SM==null). It is
+        // is only checked (and then isTrusted gets set) when (SM==null). It is
         // possible that the SM==null for now but then SM is NOT null later
         // when safeTrim() is invoked...the "safe" way to do is to redundant
         // check (... && (isTrusted || SM == null || getClassLoader0())) in trim
-        // but it then can be argued that the SM is null when the opertaion
+        // but it then can be argued that the SM is null when the operation
         // is started...
         CharsetDecoder cd = cs.newDecoder();
         int en = scale(len, cd.maxCharsPerByte());
--- a/src/java.base/share/classes/java/lang/System.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/java/lang/System.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1193,7 +1193,7 @@
         // Setup Java signal handlers for HUP, TERM, and INT (where available).
         Terminator.setup();
 
-        // Initialize any miscellenous operating system settings that need to be
+        // Initialize any miscellaneous operating system settings that need to be
         // set for the class libraries. Currently this is no-op everywhere except
         // for Windows where the process-wide error mode is set before the java.io
         // classes are used.
--- a/src/java.base/share/classes/java/lang/Throwable.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/java/lang/Throwable.java	Thu Aug 28 14:54:07 2014 -0700
@@ -139,7 +139,7 @@
          * {@linkplain #setStackTrace(StackTraceElement[]) Setting the
          * stack trace} to a one-element array containing this sentinel
          * value indicates future attempts to set the stack trace will be
-         * ignored.  The sentinal is equal to the result of calling:<br>
+         * ignored.  The sentinel is equal to the result of calling:<br>
          * {@code new StackTraceElement("", "", null, Integer.MIN_VALUE)}
          */
         public static final StackTraceElement STACK_TRACE_ELEMENT_SENTINEL =
--- a/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java	Thu Aug 28 14:54:07 2014 -0700
@@ -98,7 +98,7 @@
     private final String implMethodClassName;        // Name of type containing implementation "CC"
     private final String implMethodName;             // Name of implementation method "impl"
     private final String implMethodDesc;             // Type descriptor for implementation methods "(I)Ljava/lang/String;"
-    private final Class<?> implMethodReturnClass;    // class for implementaion method return type "Ljava/lang/String;"
+    private final Class<?> implMethodReturnClass;    // class for implementation method return type "Ljava/lang/String;"
     private final MethodType constructorType;        // Generated class constructor type "(CC)void"
     private final ClassWriter cw;                    // ASM class writer
     private final String[] argNames;                 // Generated names for the constructor arguments
--- a/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Thu Aug 28 14:54:07 2014 -0700
@@ -209,7 +209,7 @@
             throw new InternalError("observed CP placeholder twice: " + cpPlaceholder);
         }
         // insert placeholder in CP and remember the patch
-        int index = cw.newConst((Object) cpPlaceholder);  // TODO check if aready in the constant pool
+        int index = cw.newConst((Object) cpPlaceholder);  // TODO check if already in the constant pool
         cpPatches.put(cpPlaceholder, new CpPatch(index, cpPlaceholder, arg));
         return cpPlaceholder;
     }
--- a/src/java.base/share/classes/java/lang/invoke/Invokers.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/Invokers.java	Thu Aug 28 14:54:07 2014 -0700
@@ -37,7 +37,7 @@
  * @author jrose
  */
 class Invokers {
-    // exact type (sans leading taget MH) for the outgoing call
+    // exact type (sans leading target MH) for the outgoing call
     private final MethodType targetType;
 
     // FIXME: Get rid of the invokers that are not useful.
--- a/src/java.base/share/classes/java/lang/invoke/MemberName.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/MemberName.java	Thu Aug 28 14:54:07 2014 -0700
@@ -59,7 +59,7 @@
  * and properly use the named member.
  * <p>
  * When resolved, a member name's internal implementation may include references to JVM metadata.
- * This representation is stateless and only decriptive.
+ * This representation is stateless and only descriptive.
  * It provides no private information and no capability to use the member.
  * <p>
  * By contrast, a {@linkplain java.lang.reflect.Method} contains fuller information
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandle.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandle.java	Thu Aug 28 14:54:07 2014 -0700
@@ -679,7 +679,7 @@
      * This method provides the crucial behavioral difference between
      * {@link #invokeExact invokeExact} and plain, inexact {@link #invoke invoke}.
      * The two methods
-     * perform the same steps when the caller's type descriptor exactly m atches
+     * perform the same steps when the caller's type descriptor exactly matches
      * the callee's, but when the types differ, plain {@link #invoke invoke}
      * also calls {@code asType} (or some internal equivalent) in order
      * to match up the caller's and callee's types.
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java	Thu Aug 28 14:54:07 2014 -0700
@@ -621,7 +621,7 @@
     }
 
     /**
-     * The LambaForm shape for catchException combinator is the following:
+     * The LambdaForm shape for catchException combinator is the following:
      * <blockquote><pre>{@code
      *  guardWithCatch=Lambda(a0:L,a1:L,a2:L)=>{
      *    t3:L=BoundMethodHandle$Species_LLLLL.argL0(a0:L);
@@ -702,7 +702,7 @@
         MethodType type = target.type();
         LambdaForm form = makeGuardWithCatchForm(type.basicType());
 
-        // Prepare auxiliary method handles used during LambdaForm interpreation.
+        // Prepare auxiliary method handles used during LambdaForm interpretation.
         // Box arguments and wrap them into Object[]: ValueConversions.array().
         MethodType varargsType = type.changeReturnType(Object[].class);
         MethodHandle collectArgs = ValueConversions.varargsArray(type.parameterCount())
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java	Thu Aug 28 14:54:07 2014 -0700
@@ -509,7 +509,7 @@
 
     /**
      * Is this method a caller-sensitive method?
-     * I.e., does it call Reflection.getCallerClass or a similer method
+     * I.e., does it call Reflection.getCallerClass or a similar method
      * to ask about the identity of its caller?
      */
     static boolean isCallerSensitive(MemberName mem) {
--- a/src/java.base/share/classes/java/lang/reflect/AccessibleObject.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/java/lang/reflect/AccessibleObject.java	Thu Aug 28 14:54:07 2014 -0700
@@ -78,7 +78,7 @@
      * object is a {@link Constructor} object for the class {@link
      * java.lang.Class}).  In the event of such a SecurityException, the
      * accessibility of objects is set to {@code flag} for array elements
-     * upto (and excluding) the element for which the exception occurred; the
+     * up to (and excluding) the element for which the exception occurred; the
      * accessibility of elements beyond (and including) the element for which
      * the exception occurred is unchanged.
      *
--- a/src/java.base/share/classes/java/lang/reflect/Constructor.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/java/lang/reflect/Constructor.java	Thu Aug 28 14:54:07 2014 -0700
@@ -544,15 +544,33 @@
      */
     @Override
     public AnnotatedType getAnnotatedReceiverType() {
-        if (getDeclaringClass().getEnclosingClass() == null)
-            return super.getAnnotatedReceiverType();
+        Class<?> thisDeclClass = getDeclaringClass();
+        Class<?> enclosingClass = thisDeclClass.getEnclosingClass();
+
+        if (enclosingClass == null) {
+            // A Constructor for a top-level class
+            return null;
+        }
 
+        Class<?> outerDeclaringClass = thisDeclClass.getDeclaringClass();
+        if (outerDeclaringClass == null) {
+            // A constructor for a local or anonymous class
+            return null;
+        }
+
+        // Either static nested or inner class
+        if (Modifier.isStatic(thisDeclClass.getModifiers())) {
+            // static nested
+            return null;
+        }
+
+        // A Constructor for an inner class
         return TypeAnnotationParser.buildAnnotatedType(getTypeAnnotationBytes0(),
                 sun.misc.SharedSecrets.getJavaLangAccess().
-                        getConstantPool(getDeclaringClass()),
+                    getConstantPool(thisDeclClass),
                 this,
-                getDeclaringClass(),
-                getDeclaringClass().getEnclosingClass(),
+                thisDeclClass,
+                enclosingClass,
                 TypeAnnotation.TypeAnnotationTarget.METHOD_RECEIVER);
     }
 }
--- a/src/java.base/share/classes/java/lang/reflect/Executable.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/java/lang/reflect/Executable.java	Thu Aug 28 14:54:07 2014 -0700
@@ -585,21 +585,24 @@
     /**
      * Returns an {@code AnnotatedType} object that represents the use of a
      * type to specify the receiver type of the method/constructor represented
-     * by this Executable object. The receiver type of a method/constructor is
-     * available only if the method/constructor has a <em>receiver
-     * parameter</em> (JLS 8.4.1).
+     * by this {@code Executable} object.
      *
-     * If this {@code Executable} object represents a constructor or instance
-     * method that does not have a receiver parameter, or has a receiver
-     * parameter with no annotations on its type, then the return value is an
-     * {@code AnnotatedType} object representing an element with no
+     * The receiver type of a method/constructor is available only if the
+     * method/constructor has a receiver parameter (JLS 8.4.1). If this {@code
+     * Executable} object <em>represents an instance method or represents a
+     * constructor of an inner member class</em>, and the
+     * method/constructor <em>either</em> has no receiver parameter or has a
+     * receiver parameter with no annotations on its type, then the return
+     * value is an {@code AnnotatedType} object representing an element with no
      * annotations.
      *
-     * If this {@code Executable} object represents a static method, then the
-     * return value is null.
+     * If this {@code Executable} object represents a static method or
+     * represents a constructor of a top level, static member, local, or
+     * anoymous class, then the return value is null.
      *
      * @return an object representing the receiver type of the method or
-     * constructor represented by this {@code Executable}
+     * constructor represented by this {@code Executable} or {@code null} if
+     * this {@code Executable} can not have a receiver parameter
      */
     public AnnotatedType getAnnotatedReceiverType() {
         if (Modifier.isStatic(this.getModifiers()))
--- a/src/java.base/share/classes/java/lang/reflect/Parameter.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/java/lang/reflect/Parameter.java	Thu Aug 28 14:54:07 2014 -0700
@@ -173,7 +173,7 @@
      *         a name.
      */
     public String getName() {
-        // Note: empty strings as paramete names are now outlawed.
+        // Note: empty strings as parameter names are now outlawed.
         // The .equals("") is for compatibility with current JVM
         // behavior.  It may be removed at some point.
         if(name == null || name.equals(""))
--- a/src/java.base/share/classes/java/security/SecureRandom.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/java/security/SecureRandom.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -39,15 +39,16 @@
  *
  * <p>A cryptographically strong random number
  * minimally complies with the statistical random number generator tests
- * specified in <a href="http://csrc.nist.gov/cryptval/140-2.htm">
+ * specified in
+ * <a href="http://csrc.nist.gov/publications/fips/fips140-2/fips1402.pdf">
  * <i>FIPS 140-2, Security Requirements for Cryptographic Modules</i></a>,
  * section 4.9.1.
  * Additionally, SecureRandom must produce non-deterministic output.
  * Therefore any seed material passed to a SecureRandom object must be
  * unpredictable, and all SecureRandom output sequences must be
  * cryptographically strong, as described in
- * <a href="http://www.ietf.org/rfc/rfc1750.txt">
- * <i>RFC 1750: Randomness Recommendations for Security</i></a>.
+ * <a href="http://tools.ietf.org/html/rfc4086">
+ * <i>RFC 4086: Randomness Requirements for Security</i></a>.
  *
  * <p>A caller obtains a SecureRandom instance via the
  * no-argument constructor or one of the {@code getInstance} methods:
--- a/src/java.base/share/classes/java/time/Duration.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/java/time/Duration.java	Thu Aug 28 14:54:07 2014 -0700
@@ -388,19 +388,21 @@
         Matcher matcher = PATTERN.matcher(text);
         if (matcher.matches()) {
             // check for letter T but no time sections
-            if ("T".equals(matcher.group(3)) == false) {
-                boolean negate = "-".equals(matcher.group(1));
-                String dayMatch = matcher.group(2);
-                String hourMatch = matcher.group(4);
-                String minuteMatch = matcher.group(5);
-                String secondMatch = matcher.group(6);
-                String fractionMatch = matcher.group(7);
-                if (dayMatch != null || hourMatch != null || minuteMatch != null || secondMatch != null) {
-                    long daysAsSecs = parseNumber(text, dayMatch, SECONDS_PER_DAY, "days");
-                    long hoursAsSecs = parseNumber(text, hourMatch, SECONDS_PER_HOUR, "hours");
-                    long minsAsSecs = parseNumber(text, minuteMatch, SECONDS_PER_MINUTE, "minutes");
-                    long seconds = parseNumber(text, secondMatch, 1, "seconds");
-                    int nanos = parseFraction(text,  fractionMatch, seconds < 0 ? -1 : 1);
+            if (!charMatch(text, matcher.start(3), matcher.end(3), 'T')) {
+                boolean negate = charMatch(text, matcher.start(1), matcher.end(1), '-');
+
+                int dayStart = matcher.start(2), dayEnd = matcher.end(2);
+                int hourStart = matcher.start(4), hourEnd = matcher.end(4);
+                int minuteStart = matcher.start(5), minuteEnd = matcher.end(5);
+                int secondStart = matcher.start(6), secondEnd = matcher.end(6);
+                int fractionStart = matcher.start(7), fractionEnd = matcher.end(7);
+
+                if (dayStart >= 0 || hourStart >= 0 || minuteStart >= 0 || secondStart >= 0) {
+                    long daysAsSecs = parseNumber(text, dayStart, dayEnd, SECONDS_PER_DAY, "days");
+                    long hoursAsSecs = parseNumber(text, hourStart, hourEnd, SECONDS_PER_HOUR, "hours");
+                    long minsAsSecs = parseNumber(text, minuteStart, minuteEnd, SECONDS_PER_MINUTE, "minutes");
+                    long seconds = parseNumber(text, secondStart, secondEnd, 1, "seconds");
+                    int nanos = parseFraction(text, fractionStart, fractionEnd, seconds < 0 ? -1 : 1);
                     try {
                         return create(negate, daysAsSecs, hoursAsSecs, minsAsSecs, seconds, nanos);
                     } catch (ArithmeticException ex) {
@@ -412,27 +414,37 @@
         throw new DateTimeParseException("Text cannot be parsed to a Duration", text, 0);
     }
 
-    private static long parseNumber(CharSequence text, String parsed, int multiplier, String errorText) {
+    private static boolean charMatch(CharSequence text, int start, int end, char c) {
+        return (start >= 0 && end == start + 1 && text.charAt(start) == c);
+    }
+
+    private static long parseNumber(CharSequence text, int start, int end, int multiplier, String errorText) {
         // regex limits to [-+]?[0-9]+
-        if (parsed == null) {
+        if (start < 0 || end < 0) {
             return 0;
         }
         try {
-            long val = Long.parseLong(parsed);
+            long val = Long.parseLong(text, 10, start, end);
             return Math.multiplyExact(val, multiplier);
         } catch (NumberFormatException | ArithmeticException ex) {
             throw (DateTimeParseException) new DateTimeParseException("Text cannot be parsed to a Duration: " + errorText, text, 0).initCause(ex);
         }
     }
 
-    private static int parseFraction(CharSequence text, String parsed, int negate) {
+    private static int parseFraction(CharSequence text, int start, int end, int negate) {
         // regex limits to [0-9]{0,9}
-        if (parsed == null || parsed.length() == 0) {
+        if (start < 0 || end < 0 || end - start == 0) {
             return 0;
         }
         try {
-            parsed = (parsed + "000000000").substring(0, 9);
-            return Integer.parseInt(parsed) * negate;
+            int fraction = Integer.parseInt(text, 10, start, end);
+
+            // for number strings smaller than 9 digits, interpret as if there
+            // were trailing zeros
+            for (int i = end - start; i < 9; i++) {
+                fraction *= 10;
+            }
+            return fraction * negate;
         } catch (NumberFormatException | ArithmeticException ex) {
             throw (DateTimeParseException) new DateTimeParseException("Text cannot be parsed to a Duration: fraction", text, 0).initCause(ex);
         }
--- a/src/java.base/share/classes/java/time/Period.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/java/time/Period.java	Thu Aug 28 14:54:07 2014 -0700
@@ -329,17 +329,17 @@
         Objects.requireNonNull(text, "text");
         Matcher matcher = PATTERN.matcher(text);
         if (matcher.matches()) {
-            int negate = ("-".equals(matcher.group(1)) ? -1 : 1);
-            String yearMatch = matcher.group(2);
-            String monthMatch = matcher.group(3);
-            String weekMatch = matcher.group(4);
-            String dayMatch = matcher.group(5);
-            if (yearMatch != null || monthMatch != null || dayMatch != null || weekMatch != null) {
+            int negate = (charMatch(text, matcher.start(1), matcher.end(1), '-') ? -1 : 1);
+            int yearStart = matcher.start(2), yearEnd = matcher.end(2);
+            int monthStart = matcher.start(3), monthEnd = matcher.end(3);
+            int weekStart = matcher.start(4), weekEnd = matcher.end(4);
+            int dayStart = matcher.start(5), dayEnd = matcher.end(5);
+            if (yearStart >= 0 || monthStart >= 0 || weekStart >= 0 || dayStart >= 0) {
                 try {
-                    int years = parseNumber(text, yearMatch, negate);
-                    int months = parseNumber(text, monthMatch, negate);
-                    int weeks = parseNumber(text, weekMatch, negate);
-                    int days = parseNumber(text, dayMatch, negate);
+                    int years = parseNumber(text, yearStart, yearEnd, negate);
+                    int months = parseNumber(text, monthStart, monthEnd, negate);
+                    int weeks = parseNumber(text, weekStart, weekEnd, negate);
+                    int days = parseNumber(text, dayStart, dayEnd, negate);
                     days = Math.addExact(days, Math.multiplyExact(weeks, 7));
                     return create(years, months, days);
                 } catch (NumberFormatException ex) {
@@ -350,11 +350,15 @@
         throw new DateTimeParseException("Text cannot be parsed to a Period", text, 0);
     }
 
-    private static int parseNumber(CharSequence text, String str, int negate) {
-        if (str == null) {
+    private static boolean charMatch(CharSequence text, int start, int end, char c) {
+        return (start >= 0 && end == start + 1 && text.charAt(start) == c);
+    }
+
+    private static int parseNumber(CharSequence text, int start, int end, int negate) {
+        if (start < 0 || end < 0) {
             return 0;
         }
-        int val = Integer.parseInt(str);
+        int val = Integer.parseInt(text, 10, start, end);
         try {
             return Math.multiplyExact(val, negate);
         } catch (ArithmeticException ex) {
--- a/src/java.base/share/classes/java/util/JapaneseImperialCalendar.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/java/util/JapaneseImperialCalendar.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, 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
@@ -38,20 +38,20 @@
 import sun.util.calendar.ZoneInfo;
 
 /**
- * <code>JapaneseImperialCalendar</code> implements a Japanese
+ * {@code JapaneseImperialCalendar} implements a Japanese
  * calendar system in which the imperial era-based year numbering is
  * supported from the Meiji era. The following are the eras supported
  * by this calendar system.
- * <pre><tt>
+ * <pre>{@code
  * ERA value   Era name    Since (in Gregorian)
  * ------------------------------------------------------
  *     0       N/A         N/A
- *     1       Meiji       1868-01-01 midnight local time
- *     2       Taisho      1912-07-30 midnight local time
- *     3       Showa       1926-12-25 midnight local time
- *     4       Heisei      1989-01-08 midnight local time
+ *     1       Meiji       1868-01-01T00:00:00 local time
+ *     2       Taisho      1912-07-30T00:00:00 local time
+ *     3       Showa       1926-12-25T00:00:00 local time
+ *     4       Heisei      1989-01-08T00:00:00 local time
  * ------------------------------------------------------
- * </tt></pre>
+ * }</pre>
  *
  * <p><code>ERA</code> value 0 specifies the years before Meiji and
  * the Gregorian year values are used. Unlike {@link
@@ -63,6 +63,31 @@
  * with time differences for applying the era transitions. This
  * calendar implementation assumes local time for all transitions.
  *
+ * <p>A new era can be specified using property
+ * jdk.calendar.japanese.supplemental.era. The new era is added to the
+ * predefined eras. The syntax of the property is as follows.
+ * <p><pre>
+ *   {@code name=<name>,abbr=<abbr>,since=<time['u']>}
+ * </pre>
+ * where
+ * <dl>
+ * <dt>{@code <name>:}<dd>the full name of the new era (non-ASCII characters allowed)
+ * <dt>{@code <abbr>:}<dd>the abbreviation of the new era (non-ASCII characters allowed)
+ * <dt>{@code <time['u']>:}<dd>the start time of the new era represented by
+ * milliseconds from 1970-01-01T00:00:00 local time or UTC if {@code 'u'} is
+ * appended to the milliseconds value. (ASCII digits only)
+ * </dl>
+ *
+ * <p>If the given era is invalid, such as the since value before the
+ * beginning of the last predefined era, the given era will be
+ * ignored.
+ *
+ * <p>The following is an example of the property usage.
+ * <p><pre>
+ *   java -Djdk.calendar.japanese.supplemental.era="name=NewEra,abbr=N,since=253374307200000"
+ * </pre>
+ * The property specifies an era change to NewEra at 9999-02-11T00:00:00 local time.
+ *
  * @author Masayoshi Okutsu
  * @since 1.6
  */
@@ -102,7 +127,6 @@
     public static final int HEISEI = 4;
 
     private static final int EPOCH_OFFSET   = 719163; // Fixed date of January 1, 1970 (Gregorian)
-    private static final int EPOCH_YEAR     = 1970;
 
     // Useful millisecond constants.  Although ONE_DAY and ONE_WEEK can fit
     // into ints, they must be longs in order to prevent arithmetic overflow
@@ -111,7 +135,6 @@
     private static final int  ONE_MINUTE = 60*ONE_SECOND;
     private static final int  ONE_HOUR   = 60*ONE_MINUTE;
     private static final long ONE_DAY    = 24*ONE_HOUR;
-    private static final long ONE_WEEK   = 7*ONE_DAY;
 
     // Reference to the sun.util.calendar.LocalGregorianCalendar instance (singleton).
     private static final LocalGregorianCalendar jcal
@@ -217,6 +240,7 @@
     };
 
     // Proclaim serialization compatibility with JDK 1.6
+    @SuppressWarnings("FieldNameHidesFieldInSuperclass")
     private static final long serialVersionUID = -3364572813905467929L;
 
     static {
@@ -340,6 +364,7 @@
      * <code>false</code> otherwise.
      * @see Calendar#compareTo(Calendar)
      */
+    @Override
     public boolean equals(Object obj) {
         return obj instanceof JapaneseImperialCalendar &&
             super.equals(obj);
@@ -349,6 +374,7 @@
      * Generates the hash code for this
      * <code>JapaneseImperialCalendar</code> object.
      */
+    @Override
     public int hashCode() {
         return super.hashCode() ^ jdate.hashCode();
     }
@@ -381,6 +407,7 @@
      * or if any calendar fields have out-of-range values in
      * non-lenient mode.
      */
+    @Override
     public void add(int field, int amount) {
         // If amount == 0, do nothing even the given field is out of
         // range. This is tested by JCK.
@@ -509,6 +536,7 @@
         }
     }
 
+    @Override
     public void roll(int field, boolean up) {
         roll(field, up ? +1 : -1);
     }
@@ -533,6 +561,7 @@
      * @see #add(int,int)
      * @see #set(int,int)
      */
+    @Override
     public void roll(int field, int amount) {
         // If amount == 0, do nothing even the given field is out of
         // range. This is tested by JCK.
--- a/src/java.base/share/classes/java/util/StringJoiner.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/java/util/StringJoiner.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,9 @@
  */
 package java.util;
 
+import sun.misc.JavaLangAccess;
+import sun.misc.SharedSecrets;
+
 /**
  * {@code StringJoiner} is used to construct a sequence of characters separated
  * by a delimiter and optionally starting with a supplied prefix
@@ -67,22 +70,24 @@
     private final String delimiter;
     private final String suffix;
 
-    /*
-     * StringBuilder value -- at any time, the characters constructed from the
-     * prefix, the added element separated by the delimiter, but without the
-     * suffix, so that we can more easily add elements without having to jigger
-     * the suffix each time.
-     */
-    private StringBuilder value;
+    /** Contains all the string components added so far. */
+    private String[] elts;
+
+    /** The number of string components added so far. */
+    private int size;
 
-    /*
-     * By default, the string consisting of prefix+suffix, returned by
-     * toString(), or properties of value, when no elements have yet been added,
-     * i.e. when it is empty.  This may be overridden by the user to be some
-     * other value including the empty String.
+    /** Total length in chars so far, excluding prefix and suffix. */
+    private int len;
+
+    /**
+     * When overriden by the user to be non-null via {@link setEmptyValue}, the
+     * string returned by toString() when no elements have yet been added.
+     * When null, prefix + suffix is used as the empty value.
      */
     private String emptyValue;
 
+    private static final JavaLangAccess jla = SharedSecrets.getJavaLangAccess();
+
     /**
      * Constructs a {@code StringJoiner} with no characters in it, with no
      * {@code prefix} or {@code suffix}, and a copy of the supplied
@@ -125,7 +130,6 @@
         this.prefix = prefix.toString();
         this.delimiter = delimiter.toString();
         this.suffix = suffix.toString();
-        this.emptyValue = this.prefix + this.suffix;
     }
 
     /**
@@ -148,29 +152,44 @@
         return this;
     }
 
+    private static int getChars(String s, char[] chars, int start) {
+        int len = s.length();
+        s.getChars(0, len, chars, start);
+        return len;
+    }
+
     /**
      * Returns the current value, consisting of the {@code prefix}, the values
      * added so far separated by the {@code delimiter}, and the {@code suffix},
      * unless no elements have been added in which case, the
-     * {@code prefix + suffix} or the {@code emptyValue} characters are returned
+     * {@code prefix + suffix} or the {@code emptyValue} characters are returned.
      *
      * @return the string representation of this {@code StringJoiner}
      */
     @Override
     public String toString() {
-        if (value == null) {
+        final String[] elts = this.elts;
+        if (elts == null && emptyValue != null) {
             return emptyValue;
-        } else {
-            if (suffix.equals("")) {
-                return value.toString();
-            } else {
-                int initialLength = value.length();
-                String result = value.append(suffix).toString();
-                // reset value to pre-append initialLength
-                value.setLength(initialLength);
-                return result;
+        }
+        final int size = this.size;
+        final int addLen = prefix.length() + suffix.length();
+        if (addLen == 0) {
+            compactElts();
+            return size == 0 ? "" : elts[0];
+        }
+        final String delimiter = this.delimiter;
+        final char[] chars = new char[len + addLen];
+        int k = getChars(prefix, chars, 0);
+        if (size > 0) {
+            k += getChars(elts[0], chars, k);
+            for (int i = 1; i < size; i++) {
+                k += getChars(delimiter, chars, k);
+                k += getChars(elts[i], chars, k);
             }
         }
+        k += getChars(suffix, chars, k);
+        return jla.newStringUnsafe(chars);
     }
 
     /**
@@ -182,7 +201,16 @@
      * @return a reference to this {@code StringJoiner}
      */
     public StringJoiner add(CharSequence newElement) {
-        prepareBuilder().append(newElement);
+        final String elt = String.valueOf(newElement);
+        if (elts == null) {
+            elts = new String[8];
+        } else {
+            if (size == elts.length)
+                elts = Arrays.copyOf(elts, 2 * size);
+            len += delimiter.length();
+        }
+        len += elt.length();
+        elts[size++] = elt;
         return this;
     }
 
@@ -207,24 +235,25 @@
      */
     public StringJoiner merge(StringJoiner other) {
         Objects.requireNonNull(other);
-        if (other.value != null) {
-            final int length = other.value.length();
-            // lock the length so that we can seize the data to be appended
-            // before initiate copying to avoid interference, especially when
-            // merge 'this'
-            StringBuilder builder = prepareBuilder();
-            builder.append(other.value, other.prefix.length(), length);
+        if (other.elts == null) {
+            return this;
         }
-        return this;
+        other.compactElts();
+        return add(other.elts[0]);
     }
 
-    private StringBuilder prepareBuilder() {
-        if (value != null) {
-            value.append(delimiter);
-        } else {
-            value = new StringBuilder().append(prefix);
+    private void compactElts() {
+        if (size > 1) {
+            final char[] chars = new char[len];
+            int i = 1, k = getChars(elts[0], chars, 0);
+            do {
+                k += getChars(delimiter, chars, k);
+                k += getChars(elts[i], chars, k);
+                elts[i] = null;
+            } while (++i < size);
+            size = 1;
+            elts[0] = jla.newStringUnsafe(chars);
         }
-        return value;
     }
 
     /**
@@ -238,10 +267,7 @@
      * @return the length of the current value of {@code StringJoiner}
      */
     public int length() {
-        // Remember that we never actually append the suffix unless we return
-        // the full (present) value or some sub-string or length of it, so that
-        // we can add on more if we need to.
-        return (value != null ? value.length() + suffix.length() :
-                emptyValue.length());
+        return (size == 0 && emptyValue != null) ? emptyValue.length() :
+            len + prefix.length() + suffix.length();
     }
 }
--- a/src/java.base/share/classes/javax/security/auth/Subject.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/javax/security/auth/Subject.java	Thu Aug 28 14:54:07 2014 -0700
@@ -182,21 +182,20 @@
      * {@code AuthPermission("modifyPublicCredentials")}.
      * To modify the private credential Set, the caller must have
      * {@code AuthPermission("modifyPrivateCredentials")}.
-     * <p>
      *
      * @param readOnly true if the {@code Subject} is to be read-only,
-     *          and false otherwise. <p>
+     *          and false otherwise.
      *
      * @param principals the {@code Set} of Principals
-     *          to be associated with this {@code Subject}. <p>
+     *          to be associated with this {@code Subject}.
      *
      * @param pubCredentials the {@code Set} of public credentials
-     *          to be associated with this {@code Subject}. <p>
+     *          to be associated with this {@code Subject}.
      *
      * @param privCredentials the {@code Set} of private credentials
      *          to be associated with this {@code Subject}.
      *
-     * @exception NullPointerException if the specified
+     * @throws NullPointerException if the specified
      *          {@code principals}, {@code pubCredentials},
      *          or {@code privCredentials} are {@code null},
      *          or a null value exists within any of these three
@@ -233,10 +232,11 @@
      * Also, once a {@code Subject} is read-only,
      * it can not be reset to being writable again.
      *
-     * <p>
-     *
-     * @exception SecurityException if the caller does not have permission
-     *          to set this {@code Subject} to be read-only.
+     * @throws SecurityException if a security manager is installed and the
+     *         caller does not have an
+     *         {@link AuthPermission#AuthPermission(String)
+     *         AuthPermission("setReadOnly")} permission to set this
+     *         {@code Subject} to be read-only.
      */
     public void setReadOnly() {
         java.lang.SecurityManager sm = System.getSecurityManager();
@@ -250,8 +250,6 @@
     /**
      * Query whether this {@code Subject} is read-only.
      *
-     * <p>
-     *
      * @return true if this {@code Subject} is read-only, false otherwise.
      */
     public boolean isReadOnly() {
@@ -267,8 +265,6 @@
      * In this situation, the most recent {@code Subject} associated
      * with the {@code AccessControlContext} is returned.
      *
-     * <p>
-     *
      * @param  acc the {@code AccessControlContext} from which to retrieve
      *          the {@code Subject}.
      *
@@ -277,10 +273,13 @@
      *          if no {@code Subject} is associated
      *          with the provided {@code AccessControlContext}.
      *
-     * @exception SecurityException if the caller does not have permission
-     *          to get the {@code Subject}. <p>
+     * @throws SecurityException if a security manager is installed and the
+     *          caller does not have an
+     *          {@link AuthPermission#AuthPermission(String)
+     *          AuthPermission("getSubject")} permission to get the
+     *          {@code Subject}.
      *
-     * @exception NullPointerException if the provided
+     * @throws NullPointerException if the provided
      *          {@code AccessControlContext} is {@code null}.
      */
     public static Subject getSubject(final AccessControlContext acc) {
@@ -321,26 +320,27 @@
      * passing it the provided {@code PrivilegedAction},
      * as well as the newly constructed {@code AccessControlContext}.
      *
-     * <p>
-     *
      * @param subject the {@code Subject} that the specified
      *                  {@code action} will run as.  This parameter
-     *                  may be {@code null}. <p>
+     *                  may be {@code null}.
      *
      * @param <T> the type of the value returned by the PrivilegedAction's
      *                  {@code run} method.
      *
      * @param action the code to be run as the specified
-     *                  {@code Subject}. <p>
+     *                  {@code Subject}.
      *
      * @return the value returned by the PrivilegedAction's
      *                  {@code run} method.
      *
-     * @exception NullPointerException if the {@code PrivilegedAction}
-     *                  is {@code null}. <p>
+     * @throws NullPointerException if the {@code PrivilegedAction}
+     *                  is {@code null}.
      *
-     * @exception SecurityException if the caller does not have permission
-     *                  to invoke this method.
+     * @throws SecurityException if a security manager is installed and the
+     *                  caller does not have an
+     *                  {@link AuthPermission#AuthPermission(String)
+     *                  AuthPermission("doAs")} permission to invoke this
+     *                  method.
      */
     public static <T> T doAs(final Subject subject,
                         final java.security.PrivilegedAction<T> action) {
@@ -377,31 +377,32 @@
      * passing it the provided {@code PrivilegedExceptionAction},
      * as well as the newly constructed {@code AccessControlContext}.
      *
-     * <p>
-     *
      * @param subject the {@code Subject} that the specified
      *                  {@code action} will run as.  This parameter
-     *                  may be {@code null}. <p>
+     *                  may be {@code null}.
      *
      * @param <T> the type of the value returned by the
      *                  PrivilegedExceptionAction's {@code run} method.
      *
      * @param action the code to be run as the specified
-     *                  {@code Subject}. <p>
+     *                  {@code Subject}.
      *
      * @return the value returned by the
      *                  PrivilegedExceptionAction's {@code run} method.
      *
-     * @exception PrivilegedActionException if the
+     * @throws PrivilegedActionException if the
      *                  {@code PrivilegedExceptionAction.run}
-     *                  method throws a checked exception. <p>
+     *                  method throws a checked exception.
      *
-     * @exception NullPointerException if the specified
+     * @throws NullPointerException if the specified
      *                  {@code PrivilegedExceptionAction} is
-     *                  {@code null}. <p>
+     *                  {@code null}.
      *
-     * @exception SecurityException if the caller does not have permission
-     *                  to invoke this method.
+     * @throws SecurityException if a security manager is installed and the
+     *                  caller does not have an
+     *                  {@link AuthPermission#AuthPermission(String)
+     *                  AuthPermission("doAs")} permission to invoke this
+     *                  method.
      */
     public static <T> T doAs(final Subject subject,
                         final java.security.PrivilegedExceptionAction<T> action)
@@ -435,29 +436,30 @@
      * this method instantiates a new {@code AccessControlContext}
      * with an empty collection of ProtectionDomains.
      *
-     * <p>
-     *
      * @param subject the {@code Subject} that the specified
      *                  {@code action} will run as.  This parameter
-     *                  may be {@code null}. <p>
+     *                  may be {@code null}.
      *
      * @param <T> the type of the value returned by the PrivilegedAction's
      *                  {@code run} method.
      *
      * @param action the code to be run as the specified
-     *                  {@code Subject}. <p>
+     *                  {@code Subject}.
      *
      * @param acc the {@code AccessControlContext} to be tied to the
-     *                  specified <i>subject</i> and <i>action</i>. <p>
+     *                  specified <i>subject</i> and <i>action</i>.
      *
      * @return the value returned by the PrivilegedAction's
      *                  {@code run} method.
      *
-     * @exception NullPointerException if the {@code PrivilegedAction}
-     *                  is {@code null}. <p>
+     * @throws NullPointerException if the {@code PrivilegedAction}
+     *                  is {@code null}.
      *
-     * @exception SecurityException if the caller does not have permission
-     *                  to invoke this method.
+     * @throws SecurityException if a security manager is installed and the
+     *                  caller does not have a
+     *                  {@link AuthPermission#AuthPermission(String)
+     *                  AuthPermission("doAsPrivileged")} permission to invoke
+     *                  this method.
      */
     public static <T> T doAsPrivileged(final Subject subject,
                         final java.security.PrivilegedAction<T> action,
@@ -495,34 +497,35 @@
      * this method instantiates a new {@code AccessControlContext}
      * with an empty collection of ProtectionDomains.
      *
-     * <p>
-     *
      * @param subject the {@code Subject} that the specified
      *                  {@code action} will run as.  This parameter
-     *                  may be {@code null}. <p>
+     *                  may be {@code null}.
      *
      * @param <T> the type of the value returned by the
      *                  PrivilegedExceptionAction's {@code run} method.
      *
      * @param action the code to be run as the specified
-     *                  {@code Subject}. <p>
+     *                  {@code Subject}.
      *
      * @param acc the {@code AccessControlContext} to be tied to the
-     *                  specified <i>subject</i> and <i>action</i>. <p>
+     *                  specified <i>subject</i> and <i>action</i>.
      *
      * @return the value returned by the
      *                  PrivilegedExceptionAction's {@code run} method.
      *
-     * @exception PrivilegedActionException if the
+     * @throws PrivilegedActionException if the
      *                  {@code PrivilegedExceptionAction.run}
-     *                  method throws a checked exception. <p>
+     *                  method throws a checked exception.
      *
-     * @exception NullPointerException if the specified
+     * @throws NullPointerException if the specified
      *                  {@code PrivilegedExceptionAction} is
-     *                  {@code null}. <p>
+     *                  {@code null}.
      *
-     * @exception SecurityException if the caller does not have permission
-     *                  to invoke this method.
+     * @throws SecurityException if a security manager is installed and the
+     *                  caller does not have a
+     *                  {@link AuthPermission#AuthPermission(String)
+     *                  AuthPermission("doAsPrivileged")} permission to invoke
+     *                  this method.
      */
     public static <T> T doAsPrivileged(final Subject subject,
                         final java.security.PrivilegedExceptionAction<T> action,
@@ -577,9 +580,12 @@
      * to the returned {@code Set} affects the internal
      * {@code Principal} {@code Set} as well.
      *
-     * <p>
+     * <p> If a security manager is installed, the caller must have a
+     * {@link AuthPermission#AuthPermission(String)
+     * AuthPermission("modifyPrincipals")} permission to modify
+     * the returned set, or a {@code SecurityException} will be thrown.
      *
-     * @return  The {@code Set} of Principals associated with this
+     * @return  the {@code Set} of Principals associated with this
      *          {@code Subject}.
      */
     public Set<Principal> getPrincipals() {
@@ -600,8 +606,6 @@
      * Modifications to the returned {@code Set}
      * will not affect the internal {@code Principal} {@code Set}.
      *
-     * <p>
-     *
      * @param <T> the type of the class modeled by {@code c}
      *
      * @param c the returned {@code Set} of Principals will all be
@@ -610,8 +614,8 @@
      * @return a {@code Set} of Principals that are instances of the
      *          specified {@code Class}.
      *
-     * @exception NullPointerException if the specified {@code Class}
-     *                  is {@code null}.
+     * @throws NullPointerException if the specified {@code Class}
+     *          is {@code null}.
      */
     public <T extends Principal> Set<T> getPrincipals(Class<T> c) {
 
@@ -632,9 +636,12 @@
      * to the returned {@code Set} affects the internal public
      * Credential {@code Set} as well.
      *
-     * <p>
+     * <p> If a security manager is installed, the caller must have a
+     * {@link AuthPermission#AuthPermission(String)
+     * AuthPermission("modifyPublicCredentials")} permission to modify
+     * the returned set, or a {@code SecurityException} will be thrown.
      *
-     * @return  A {@code Set} of public credentials held by this
+     * @return  a {@code Set} of public credentials held by this
      *          {@code Subject}.
      */
     public Set<Object> getPublicCredentials() {
@@ -653,20 +660,18 @@
      * to the returned {@code Set} affects the internal private
      * Credential {@code Set} as well.
      *
-     * <p> A caller requires permissions to access the Credentials
-     * in the returned {@code Set}, or to modify the
-     * {@code Set} itself.  A {@code SecurityException}
-     * is thrown if the caller does not have the proper permissions.
+     * <p> If a security manager is installed, the caller must have a
+     * {@link AuthPermission#AuthPermission(String)
+     * AuthPermission("modifyPrivateCredentials")} permission to modify
+     * the returned set, or a {@code SecurityException} will be thrown.
      *
      * <p> While iterating through the {@code Set},
-     * a {@code SecurityException} is thrown
-     * if the caller does not have permission to access a
-     * particular Credential.  The {@code Iterator}
-     * is nevertheless advanced to next element in the {@code Set}.
+     * a {@code SecurityException} is thrown if a security manager is installed
+     * and the caller does not have a {@link PrivateCredentialPermission}
+     * to access a particular Credential.  The {@code Iterator}
+     * is nevertheless advanced to the next element in the {@code Set}.
      *
-     * <p>
-     *
-     * @return  A {@code Set} of private credentials held by this
+     * @return  a {@code Set} of private credentials held by this
      *          {@code Subject}.
      */
     public Set<Object> getPrivateCredentials() {
@@ -695,8 +700,6 @@
      * Modifications to the returned {@code Set}
      * will not affect the internal public Credential {@code Set}.
      *
-     * <p>
-     *
      * @param <T> the type of the class modeled by {@code c}
      *
      * @param c the returned {@code Set} of public credentials will all be
@@ -705,7 +708,7 @@
      * @return a {@code Set} of public credentials that are instances
      *          of the  specified {@code Class}.
      *
-     * @exception NullPointerException if the specified {@code Class}
+     * @throws NullPointerException if the specified {@code Class}
      *          is {@code null}.
      */
     public <T> Set<T> getPublicCredentials(Class<T> c) {
@@ -723,9 +726,9 @@
      * {@code Subject} that are instances or subclasses of the specified
      * {@code Class}.
      *
-     * <p> The caller must have permission to access all of the
-     * requested Credentials, or a {@code SecurityException}
-     * will be thrown.
+     * <p> If a security manager is installed, the caller must have a
+     * {@link PrivateCredentialPermission} to access all of the requested
+     * Credentials, or a {@code SecurityException} will be thrown.
      *
      * <p> The returned {@code Set} is not backed by this Subject's
      * internal private Credential {@code Set}.  A new
@@ -733,8 +736,6 @@
      * Modifications to the returned {@code Set}
      * will not affect the internal private Credential {@code Set}.
      *
-     * <p>
-     *
      * @param <T> the type of the class modeled by {@code c}
      *
      * @param c the returned {@code Set} of private credentials will all be
@@ -743,7 +744,7 @@
      * @return a {@code Set} of private credentials that are instances
      *          of the  specified {@code Class}.
      *
-     * @exception NullPointerException if the specified {@code Class}
+     * @throws NullPointerException if the specified {@code Class}
      *          is {@code null}.
      */
     public <T> Set<T> getPrivateCredentials(Class<T> c) {
@@ -772,19 +773,18 @@
      * equal if their {@code Principal} and {@code Credential}
      * Sets are equal.
      *
-     * <p>
-     *
      * @param o Object to be compared for equality with this
      *          {@code Subject}.
      *
      * @return true if the specified Object is equal to this
      *          {@code Subject}.
      *
-     * @exception SecurityException if the caller does not have permission
-     *          to access the private credentials for this {@code Subject},
-     *          or if the caller does not have permission to access the
-     *          private credentials for the provided {@code Subject}.
+     * @throws SecurityException if a security manager is installed and the
+     *         caller does not have a {@link PrivateCredentialPermission}
+     *         permission to access the private credentials for this
+     *         {@code Subject} or the provided {@code Subject}.
      */
+    @Override
     public boolean equals(Object o) {
 
         if (o == null) {
@@ -834,10 +834,9 @@
     /**
      * Return the String representation of this {@code Subject}.
      *
-     * <p>
-     *
      * @return the String representation of this {@code Subject}.
      */
+    @Override
     public String toString() {
         return toString(true);
     }
@@ -895,13 +894,13 @@
     /**
      * Returns a hashcode for this {@code Subject}.
      *
-     * <p>
-     *
      * @return a hashcode for this {@code Subject}.
      *
-     * @exception SecurityException if the caller does not have permission
-     *          to access this Subject's private credentials.
+     * @throws SecurityException if a security manager is installed and the
+     *         caller does not have a {@link PrivateCredentialPermission}
+     *         permission to access this Subject's private credentials.
      */
+    @Override
     public int hashCode() {
 
         /**
@@ -996,7 +995,7 @@
      *
      * @param coll A {@code Collection} to be tested for null references
      *
-     * @exception NullPointerException if the specified collection is either
+     * @throws NullPointerException if the specified collection is either
      *            {@code null} or contains a {@code null} element
      */
     private static void collectionNullClean(Collection<?> coll) {
@@ -1546,7 +1545,7 @@
         }
     }
 
-    static class AuthPermissionHolder {
+    static final class AuthPermissionHolder {
         static final AuthPermission DO_AS_PERMISSION =
             new AuthPermission("doAs");
 
--- a/src/java.base/share/classes/sun/util/calendar/Era.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/sun/util/calendar/Era.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2005, 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
@@ -41,20 +41,15 @@
  * <code>CalendarDate</code>.
  *
  * <p>The following era names are defined in this release.
- * <!-- TODO: use HTML table -->
- * <pre><tt>
+ * <pre>{@code
  *   Calendar system         Era name         Since (in Gregorian)
  *   -----------------------------------------------------------------------
- *   Japanese calendar       Meiji            1868-01-01 midnight local time
- *                           Taisho           1912-07-30 midnight local time
- *                           Showa            1926-12-26 midnight local time
- *                           Heisei           1989-01-08 midnight local time
- *   Julian calendar         BeforeCommonEra  -292275055-05-16T16:47:04.192Z
- *                           CommonEra        0000-12-30 midnight local time
- *   Taiwanese calendar      MinGuo           1911-01-01 midnight local time
- *   Thai Buddhist calendar  BuddhistEra      -543-01-01 midnight local time
+ *   Japanese calendar       Meiji            1868-01-01T00:00:00 local time
+ *                           Taisho           1912-07-30T00:00:00 local time
+ *                           Showa            1926-12-25T00:00:00 local time
+ *                           Heisei           1989-01-08T00:00:00 local time
  *   -----------------------------------------------------------------------
- * </tt></pre>
+ * }</pre>
  *
  * @author Masayoshi Okutsu
  * @since 1.5
--- a/src/java.base/share/classes/sun/util/calendar/LocalGregorianCalendar.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/sun/util/calendar/LocalGregorianCalendar.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, 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
@@ -25,11 +25,7 @@
 
 package sun.util.calendar;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-import java.util.StringTokenizer;
+import java.security.AccessController;
 import java.util.TimeZone;
 
 /**
@@ -39,6 +35,28 @@
  */
 
 public class LocalGregorianCalendar extends BaseCalendar {
+    private static final Era[] JAPANESE_ERAS = {
+        new Era("Meiji",  "M", -3218832000000L, true),
+        new Era("Taisho", "T", -1812153600000L, true),
+        new Era("Showa",  "S", -1357603200000L, true),
+        new Era("Heisei", "H",   600220800000L, true),
+    };
+
+    private static boolean isValidEra(Era newEra, Era[] eras) {
+        Era last = eras[eras.length - 1];
+        if (last.getSinceDate().getYear() >= newEra.getSinceDate().getYear()) {
+            return false;
+        }
+        // The new era name should be unique. Its abbr may not.
+        String newName = newEra.getName();
+        for (Era era : eras) {
+            if (era.getName().equals(newName)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
     private String name;
     private Era[] eras;
 
@@ -118,58 +136,70 @@
     }
 
     static LocalGregorianCalendar getLocalGregorianCalendar(String name) {
-        Properties calendarProps;
-        try {
-            calendarProps = CalendarSystem.getCalendarProperties();
-        } catch (IOException | IllegalArgumentException e) {
-            throw new InternalError(e);
-        }
-        // Parse calendar.*.eras
-        String props = calendarProps.getProperty("calendar." + name + ".eras");
-        if (props == null) {
+        // Only the Japanese calendar is supported.
+        if (!"japanese".equals(name)) {
             return null;
         }
-        List<Era> eras = new ArrayList<>();
-        StringTokenizer eraTokens = new StringTokenizer(props, ";");
-        while (eraTokens.hasMoreTokens()) {
-            String items = eraTokens.nextToken().trim();
-            StringTokenizer itemTokens = new StringTokenizer(items, ",");
-            String eraName = null;
-            boolean localTime = true;
-            long since = 0;
-            String abbr = null;
+
+        // Append an era to the predefined eras if it's given by the property.
+        String prop = AccessController.doPrivileged(
+                new sun.security.action.GetPropertyAction("jdk.calendar.japanese.supplemental.era"));
+        if (prop != null) {
+            Era era = parseEraEntry(prop);
+            if (era != null) {
+                if (isValidEra(era, JAPANESE_ERAS)) {
+                    int length = JAPANESE_ERAS.length;
+                    Era[] eras = new Era[length + 1];
+                    System.arraycopy(JAPANESE_ERAS, 0, eras, 0, length);
+                    eras[length] = era;
+                    return new LocalGregorianCalendar(name, eras);
+                }
+            }
+        }
+        return new LocalGregorianCalendar(name, JAPANESE_ERAS);
+    }
 
-            while (itemTokens.hasMoreTokens()) {
-                String item = itemTokens.nextToken();
-                int index = item.indexOf('=');
-                // it must be in the key=value form.
-                if (index == -1) {
+    private static Era parseEraEntry(String entry) {
+        String[] keyValuePairs = entry.split(",");
+        String eraName = null;
+        boolean localTime = true;
+        long since = 0;
+        String abbr = null;
+
+        for (String item : keyValuePairs) {
+            String[] keyvalue = item.split("=");
+            if (keyvalue.length != 2) {
+                return null;
+            }
+            String key = keyvalue[0].trim();
+            String value = keyvalue[1].trim();
+            switch (key) {
+            case "name":
+                eraName = value;
+                break;
+            case "since":
+                if (value.endsWith("u")) {
+                    localTime = false;
+                    value = value.substring(0, value.length() - 1);
+                }
+                try {
+                    since = Long.parseLong(value);
+                } catch (NumberFormatException e) {
                     return null;
                 }
-                String key = item.substring(0, index);
-                String value = item.substring(index + 1);
-                if ("name".equals(key)) {
-                    eraName = value;
-                } else if ("since".equals(key)) {
-                    if (value.endsWith("u")) {
-                        localTime = false;
-                        since = Long.parseLong(value.substring(0, value.length() - 1));
-                    } else {
-                        since = Long.parseLong(value);
-                    }
-                } else if ("abbr".equals(key)) {
-                    abbr = value;
-                } else {
-                    throw new RuntimeException("Unknown key word: " + key);
-                }
+                break;
+            case "abbr":
+                abbr = value;
+                break;
+            default:
+                return null;
             }
-            Era era = new Era(eraName, abbr, since, localTime);
-            eras.add(era);
         }
-        Era[] eraArray = new Era[eras.size()];
-        eras.toArray(eraArray);
-
-        return new LocalGregorianCalendar(name, eraArray);
+        if (eraName == null || eraName.isEmpty()
+                || abbr == null || abbr.isEmpty()) {
+            return null;
+        }
+        return new Era(eraName, abbr, since, localTime);
     }
 
     private LocalGregorianCalendar(String name, Era[] eras) {
@@ -262,9 +292,8 @@
     }
 
     private boolean validateEra(Era era) {
-        // Validate the era
-        for (int i = 0; i < eras.length; i++) {
-            if (era == eras[i]) {
+        for (Era era1 : eras) {
+            if (era == era1) {
                 return true;
             }
         }
@@ -333,6 +362,7 @@
         }
         if (i >= 0) {
             ldate.setLocalEra(era);
+            @SuppressWarnings("null")
             int y = ldate.getNormalizedYear() - era.getSinceDate().getYear() + 1;
             ldate.setLocalYear(y);
         } else {
--- a/src/java.base/share/classes/sun/util/cldr/CLDRLocaleProviderAdapter.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/sun/util/cldr/CLDRLocaleProviderAdapter.java	Thu Aug 28 14:54:07 2014 -0700
@@ -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
@@ -30,6 +30,7 @@
 import java.security.PrivilegedAction;
 import java.text.spi.BreakIteratorProvider;
 import java.text.spi.CollatorProvider;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.Locale;
 import java.util.ResourceBundle;
@@ -102,6 +103,9 @@
     @Override
     protected Set<String> createLanguageTagSet(String category) {
         ResourceBundle rb = ResourceBundle.getBundle("sun.util.cldr.CLDRLocaleDataMetaInfo", Locale.ROOT);
+        if (rb.containsKey(category)) {
+            return Collections.emptySet();
+        }
         String supportedLocaleString = rb.getString(category);
         Set<String> tagset = new HashSet<>();
         StringTokenizer tokens = new StringTokenizer(supportedLocaleString);
--- a/src/java.base/share/classes/sun/util/locale/provider/JRELocaleProviderAdapter.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/sun/util/locale/provider/JRELocaleProviderAdapter.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,7 @@
 import java.text.spi.DateFormatSymbolsProvider;
 import java.text.spi.DecimalFormatSymbolsProvider;
 import java.text.spi.NumberFormatProvider;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.Locale;
 import java.util.Set;
@@ -356,6 +357,9 @@
 
     protected Set<String> createLanguageTagSet(String category) {
         String supportedLocaleString = LocaleDataMetaInfo.getSupportedLocaleString(category);
+        if (supportedLocaleString == null) {
+            return Collections.emptySet();
+        }
         Set<String> tagset = new HashSet<>();
         StringTokenizer tokens = new StringTokenizer(supportedLocaleString);
         while (tokens.hasMoreTokens()) {
--- a/src/java.base/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, 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
@@ -57,6 +57,12 @@
         resourceNameToLocales.put("CollationData",
                                   " #CollationData_ENLocales# | #CollationData_NonENLocales# ");
 
+        resourceNameToLocales.put("BreakIteratorInfo",
+                                  " #BreakIteratorInfo_ENLocales# | #BreakIteratorInfo_NonENLocales# ");
+
+        resourceNameToLocales.put("BreakIteratorRules",
+                                  " #BreakIteratorRules_ENLocales# | #BreakIteratorRules_NonENLocales# ");
+
         resourceNameToLocales.put("TimeZoneNames",
                                   " #TimeZoneNames_ENLocales# | #TimeZoneNames_NonENLocales# ");
 
--- a/src/java.base/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -295,7 +295,7 @@
      * A utility method for implementing the default LocaleServiceProvider.isSupportedLocale
      * for the JRE, CLDR, and FALLBACK adapters.
      */
-    static boolean isSupportedLocale(Locale locale, LocaleProviderAdapter.Type type, Set<String> langtags) {
+    public static boolean isSupportedLocale(Locale locale, LocaleProviderAdapter.Type type, Set<String> langtags) {
         assert type == Type.JRE || type == Type.CLDR || type == Type.FALLBACK;
         if (Locale.ROOT.equals(locale)) {
             return true;
--- a/src/java.base/share/classes/sun/util/resources/LocaleData.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/classes/sun/util/resources/LocaleData.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -48,8 +48,11 @@
 import java.util.Locale;
 import java.util.MissingResourceException;
 import java.util.ResourceBundle;
+import java.util.Set;
+import sun.util.locale.provider.JRELocaleProviderAdapter;
 import sun.util.locale.provider.LocaleDataMetaInfo;
 import sun.util.locale.provider.LocaleProviderAdapter;
+import static sun.util.locale.provider.LocaleProviderAdapter.Type.CLDR;
 import static sun.util.locale.provider.LocaleProviderAdapter.Type.JRE;
 
 /**
@@ -204,35 +207,23 @@
         @Override
          public List<Locale> getCandidateLocales(String baseName, Locale locale) {
             List<Locale> candidates = super.getCandidateLocales(baseName, locale);
-            /* Get the locale string list from LocaleDataMetaInfo class. */
-            String localeString = LocaleDataMetaInfo.getSupportedLocaleString(baseName);
-
-            if (localeString != null && localeString.length() != 0) {
-                for (Iterator<Locale> l = candidates.iterator(); l.hasNext();) {
-                    Locale loc = l.next();
-                    String lstr;
-                    if (loc.getScript().length() > 0) {
-                        lstr = loc.toLanguageTag().replace('-', '_');
-                    } else {
-                        lstr = loc.toString();
-                        int idx = lstr.indexOf("_#");
-                        if (idx >= 0) {
-                            lstr = lstr.substring(0, idx);
-                        }
-                    }
-                    /* Every locale string in the locale string list returned from
-                     the above getSupportedLocaleString is enclosed
-                     within two white spaces so that we could check some locale
-                     such as "en".
-                     */
-                    if (lstr.length() != 0 && localeString.indexOf(" " + lstr + " ") == -1) {
-                        l.remove();
+            // Weed out Locales which are known to have no resource bundles
+            int lastDot = baseName.lastIndexOf('.');
+            String category = (lastDot >= 0) ? baseName.substring(lastDot + 1) : baseName;
+            LocaleProviderAdapter.Type type = baseName.contains(DOTCLDR) ? CLDR : JRE;
+            LocaleProviderAdapter adapter = LocaleProviderAdapter.forType(type);
+            Set<String> langtags = ((JRELocaleProviderAdapter)adapter).getLanguageTagSet(category);
+            if (!langtags.isEmpty()) {
+                for (Iterator<Locale> itr = candidates.iterator(); itr.hasNext();) {
+                    if (!LocaleProviderAdapter.isSupportedLocale(itr.next(), type, langtags)) {
+                        itr.remove();
                     }
                 }
             }
+
             // Force fallback to Locale.ENGLISH for CLDR time zone names support
             if (locale.getLanguage() != "en"
-                    && baseName.contains(CLDR) && baseName.endsWith("TimeZoneNames")) {
+                    && type == CLDR && category.equals("TimeZoneNames")) {
                 candidates.add(candidates.size() - 1, Locale.ENGLISH);
             }
             return candidates;
@@ -254,7 +245,7 @@
             return null;
         }
 
-        private static final String CLDR      = ".cldr";
+        private static final String DOTCLDR      = ".cldr";
 
         /**
          * Changes baseName to its per-language package name and
@@ -275,8 +266,8 @@
                     assert JRE.getUtilResourcesPackage().length()
                         == JRE.getTextResourcesPackage().length();
                     int index = JRE.getUtilResourcesPackage().length();
-                    if (baseName.indexOf(CLDR, index) > 0) {
-                        index += CLDR.length();
+                    if (baseName.indexOf(DOTCLDR, index) > 0) {
+                        index += DOTCLDR.length();
                     }
                     newBaseName = baseName.substring(0, index + 1) + lang
                                       + baseName.substring(index);
--- a/src/java.base/share/conf/calendars.properties	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/share/conf/calendars.properties	Thu Aug 28 14:54:07 2014 -0700
@@ -1,4 +1,4 @@
-# Copyright (c) 2005, 2013, 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
@@ -23,37 +23,6 @@
 #
 
 #
-# Japanese imperial calendar
-#
-#   Meiji  since 1868-01-01 00:00:00 local time (Gregorian)
-#   Taisho since 1912-07-30 00:00:00 local time (Gregorian)
-#   Showa  since 1926-12-25 00:00:00 local time (Gregorian)
-#   Heisei since 1989-01-08 00:00:00 local time (Gregorian)
-calendar.japanese.type: LocalGregorianCalendar
-calendar.japanese.eras: \
-	name=Meiji,abbr=M,since=-3218832000000;  \
-	name=Taisho,abbr=T,since=-1812153600000; \
-	name=Showa,abbr=S,since=-1357603200000;  \
-	name=Heisei,abbr=H,since=600220800000
-
-#
-# Taiwanese calendar
-#   Minguo since 1911-01-01 00:00:00 local time (Gregorian)
-calendar.taiwanese.type: LocalGregorianCalendar
-calendar.taiwanese.eras: \
-	name=MinGuo,since=-1830384000000
-
-#
-# Thai Buddhist calendar
-#   Buddhist Era since -542-01-01 00:00:00 local time (Gregorian)
-calendar.thai-buddhist.type: LocalGregorianCalendar
-calendar.thai-buddhist.eras: \
-	name=BuddhistEra,abbr=B.E.,since=-79302585600000
-calendar.thai-buddhist.year-boundary: \
-	day1=4-1,since=-79302585600000; \
-	day1=1-1,since=-915148800000
-
-#
 # Hijrah calendars
 #
 calendar.hijrah.Hijrah-umalqura: hijrah-config-umalqura.properties
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/conf/security/java.security	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,517 @@
+#
+# This is the "master security properties file".
+#
+# An alternate java.security properties file may be specified
+# from the command line via the system property
+#
+#    -Djava.security.properties=<URL>
+#
+# This properties file appends to the master security properties file.
+# If both properties files specify values for the same key, the value
+# from the command-line properties file is selected, as it is the last
+# one loaded.
+#
+# Also, if you specify
+#
+#    -Djava.security.properties==<URL> (2 equals),
+#
+# then that properties file completely overrides the master security
+# properties file.
+#
+# To disable the ability to specify an additional properties file from
+# the command line, set the key security.overridePropertiesFile
+# to false in the master security properties file. It is set to true
+# by default.
+
+# In this file, various security properties are set for use by
+# java.security classes. This is where users can statically register
+# Cryptography Package Providers ("providers" for short). The term
+# "provider" refers to a package or set of packages that supply a
+# concrete implementation of a subset of the cryptography aspects of
+# the Java Security API. A provider may, for example, implement one or
+# more digital signature algorithms or message digest algorithms.
+#
+# Each provider must implement a subclass of the Provider class.
+# To register a provider in this master security properties file,
+# specify the Provider subclass name and priority in the format
+#
+#    security.provider.<n>=<className>
+#
+# This declares a provider, and specifies its preference
+# order n. The preference order is the order in which providers are
+# searched for requested algorithms (when no specific provider is
+# requested). The order is 1-based; 1 is the most preferred, followed
+# by 2, and so on.
+#
+# <className> must specify the subclass of the Provider class whose
+# constructor sets the values of various properties that are required
+# for the Java Security API to look up the algorithms or other
+# facilities implemented by the provider.
+#
+# There must be at least one provider specification in java.security.
+# There is a default provider that comes standard with the JDK. It
+# is called the "SUN" provider, and its Provider subclass
+# named Sun appears in the sun.security.provider package. Thus, the
+# "SUN" provider is registered via the following:
+#
+#    security.provider.1=sun.security.provider.Sun
+#
+# (The number 1 is used for the default provider.)
+#
+# Note: Providers can be dynamically registered instead by calls to
+# either the addProvider or insertProviderAt method in the Security
+# class.
+
+#
+# List of providers and their preference orders (see above):
+#
+#ifdef solaris
+security.provider.tbd=com.oracle.security.ucrypto.UcryptoProvider ${java.home}/lib/security/ucrypto-solaris.cfg
+security.provider.tbd=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/sunpkcs11-solaris.cfg
+#endif
+security.provider.tbd=sun.security.provider.Sun
+security.provider.tbd=sun.security.rsa.SunRsaSign
+security.provider.tbd=sun.security.ec.SunEC
+security.provider.tbd=com.sun.net.ssl.internal.ssl.Provider
+security.provider.tbd=com.sun.crypto.provider.SunJCE
+security.provider.tbd=sun.security.jgss.SunProvider
+security.provider.tbd=com.sun.security.sasl.Provider
+security.provider.tbd=org.jcp.xml.dsig.internal.dom.XMLDSigRI
+security.provider.tbd=sun.security.smartcardio.SunPCSC
+#ifdef windows
+security.provider.tbd=sun.security.mscapi.SunMSCAPI
+#endif
+#ifdef macosx
+security.provider.tbd=apple.security.AppleProvider
+#endif
+
+#
+# Sun Provider SecureRandom seed source.
+#
+# Select the primary source of seed data for the "SHA1PRNG" and
+# "NativePRNG" SecureRandom implementations in the "Sun" provider.
+# (Other SecureRandom implementations might also use this property.)
+#
+# On Unix-like systems (for example, Solaris/Linux/MacOS), the
+# "NativePRNG" and "SHA1PRNG" implementations obtains seed data from
+# special device files such as file:/dev/random.
+#
+# On Windows systems, specifying the URLs "file:/dev/random" or
+# "file:/dev/urandom" will enable the native Microsoft CryptoAPI seeding
+# mechanism for SHA1PRNG.
+#
+# By default, an attempt is made to use the entropy gathering device
+# specified by the "securerandom.source" Security property.  If an
+# exception occurs while accessing the specified URL:
+#
+#     SHA1PRNG:
+#         the traditional system/thread activity algorithm will be used.
+#
+#     NativePRNG:
+#         a default value of /dev/random will be used.  If neither
+#         are available, the implementation will be disabled.
+#         "file" is the only currently supported protocol type.
+#
+# The entropy gathering device can also be specified with the System
+# property "java.security.egd". For example:
+#
+#   % java -Djava.security.egd=file:/dev/random MainClass
+#
+# Specifying this System property will override the
+# "securerandom.source" Security property.
+#
+# In addition, if "file:/dev/random" or "file:/dev/urandom" is
+# specified, the "NativePRNG" implementation will be more preferred than
+# SHA1PRNG in the Sun provider.
+#
+securerandom.source=file:/dev/random
+
+#
+# A list of known strong SecureRandom implementations.
+#
+# To help guide applications in selecting a suitable strong
+# java.security.SecureRandom implementation, Java distributions should
+# indicate a list of known strong implementations using the property.
+#
+# This is a comma-separated list of algorithm and/or algorithm:provider
+# entries.
+#
+#ifdef windows
+securerandom.strongAlgorithms=Windows-PRNG:SunMSCAPI,SHA1PRNG:SUN
+#endif
+#ifndef windows
+securerandom.strongAlgorithms=NativePRNGBlocking:SUN
+#endif
+
+#
+# Class to instantiate as the javax.security.auth.login.Configuration
+# provider.
+#
+login.configuration.provider=sun.security.provider.ConfigFile
+
+#
+# Default login configuration file
+#
+#login.config.url.1=file:${user.home}/.java.login.config
+
+#
+# Class to instantiate as the system Policy. This is the name of the class
+# that will be used as the Policy object.
+#
+policy.provider=sun.security.provider.PolicyFile
+
+# The default is to have a single system-wide policy file,
+# and a policy file in the user's home directory.
+policy.url.1=file:${java.home}/lib/security/java.policy
+policy.url.2=file:${user.home}/.java.policy
+
+# whether or not we expand properties in the policy file
+# if this is set to false, properties (${...}) will not be expanded in policy
+# files.
+policy.expandProperties=true
+
+# whether or not we allow an extra policy to be passed on the command line
+# with -Djava.security.policy=somefile. Comment out this line to disable
+# this feature.
+policy.allowSystemProperty=true
+
+# whether or not we look into the IdentityScope for trusted Identities
+# when encountering a 1.1 signed JAR file. If the identity is found
+# and is trusted, we grant it AllPermission.
+policy.ignoreIdentityScope=false
+
+#
+# Default keystore type.
+#
+keystore.type=jks
+
+#
+# List of comma-separated packages that start with or equal this string
+# will cause a security exception to be thrown when
+# passed to checkPackageAccess unless the
+# corresponding RuntimePermission ("accessClassInPackage."+package) has
+# been granted.
+package.access=sun.,\
+               com.sun.xml.internal.,\
+               com.sun.imageio.,\
+               com.sun.istack.internal.,\
+               com.sun.jmx.,\
+               com.sun.media.sound.,\
+               com.sun.naming.internal.,\
+               com.sun.proxy.,\
+               com.sun.corba.se.,\
+               com.sun.org.apache.bcel.internal.,\
+               com.sun.org.apache.regexp.internal.,\
+               com.sun.org.apache.xerces.internal.,\
+               com.sun.org.apache.xpath.internal.,\
+               com.sun.org.apache.xalan.internal.extensions.,\
+               com.sun.org.apache.xalan.internal.lib.,\
+               com.sun.org.apache.xalan.internal.res.,\
+               com.sun.org.apache.xalan.internal.templates.,\
+               com.sun.org.apache.xalan.internal.utils.,\
+               com.sun.org.apache.xalan.internal.xslt.,\
+               com.sun.org.apache.xalan.internal.xsltc.cmdline.,\
+               com.sun.org.apache.xalan.internal.xsltc.compiler.,\
+               com.sun.org.apache.xalan.internal.xsltc.trax.,\
+               com.sun.org.apache.xalan.internal.xsltc.util.,\
+               com.sun.org.apache.xml.internal.res.,\
+               com.sun.org.apache.xml.internal.security.,\
+               com.sun.org.apache.xml.internal.serializer.utils.,\
+               com.sun.org.apache.xml.internal.utils.,\
+               com.sun.org.glassfish.,\
+               com.oracle.xmlns.internal.,\
+               com.oracle.webservices.internal.,\
+               org.jcp.xml.dsig.internal.,\
+               jdk.internal.,\
+               jdk.nashorn.internal.,\
+               jdk.nashorn.tools.,\
+               com.sun.activation.registries.,\
+#ifdef macosx
+               apple.,\
+#endif
+
+#
+# List of comma-separated packages that start with or equal this string
+# will cause a security exception to be thrown when
+# passed to checkPackageDefinition unless the
+# corresponding RuntimePermission ("defineClassInPackage."+package) has
+# been granted.
+#
+# by default, none of the class loaders supplied with the JDK call
+# checkPackageDefinition.
+#
+package.definition=sun.,\
+                   com.sun.xml.internal.,\
+                   com.sun.imageio.,\
+                   com.sun.istack.internal.,\
+                   com.sun.jmx.,\
+                   com.sun.media.sound.,\
+                   com.sun.naming.internal.,\
+                   com.sun.proxy.,\
+                   com.sun.corba.se.,\
+                   com.sun.org.apache.bcel.internal.,\
+                   com.sun.org.apache.regexp.internal.,\
+                   com.sun.org.apache.xerces.internal.,\
+                   com.sun.org.apache.xpath.internal.,\
+                   com.sun.org.apache.xalan.internal.extensions.,\
+                   com.sun.org.apache.xalan.internal.lib.,\
+                   com.sun.org.apache.xalan.internal.res.,\
+                   com.sun.org.apache.xalan.internal.templates.,\
+                   com.sun.org.apache.xalan.internal.utils.,\
+                   com.sun.org.apache.xalan.internal.xslt.,\
+                   com.sun.org.apache.xalan.internal.xsltc.cmdline.,\
+                   com.sun.org.apache.xalan.internal.xsltc.compiler.,\
+                   com.sun.org.apache.xalan.internal.xsltc.trax.,\
+                   com.sun.org.apache.xalan.internal.xsltc.util.,\
+                   com.sun.org.apache.xml.internal.res.,\
+                   com.sun.org.apache.xml.internal.security.,\
+                   com.sun.org.apache.xml.internal.serializer.utils.,\
+                   com.sun.org.apache.xml.internal.utils.,\
+                   com.sun.org.glassfish.,\
+                   com.oracle.xmlns.internal.,\
+                   com.oracle.webservices.internal.,\
+                   org.jcp.xml.dsig.internal.,\
+                   jdk.internal.,\
+                   jdk.nashorn.internal.,\
+                   jdk.nashorn.tools.,\
+                   com.sun.activation.registries.,\
+#ifdef macosx
+                   apple.,\
+#endif
+
+#
+# Determines whether this properties file can be appended to
+# or overridden on the command line via -Djava.security.properties
+#
+security.overridePropertiesFile=true
+
+#
+# Determines the default key and trust manager factory algorithms for
+# the javax.net.ssl package.
+#
+ssl.KeyManagerFactory.algorithm=SunX509
+ssl.TrustManagerFactory.algorithm=PKIX
+
+#
+# The Java-level namelookup cache policy for successful lookups:
+#
+# any negative value: caching forever
+# any positive value: the number of seconds to cache an address for
+# zero: do not cache
+#
+# default value is forever (FOREVER). For security reasons, this
+# caching is made forever when a security manager is set. When a security
+# manager is not set, the default behavior in this implementation
+# is to cache for 30 seconds.
+#
+# NOTE: setting this to anything other than the default value can have
+#       serious security implications. Do not set it unless
+#       you are sure you are not exposed to DNS spoofing attack.
+#
+#networkaddress.cache.ttl=-1
+
+# The Java-level namelookup cache policy for failed lookups:
+#
+# any negative value: cache forever
+# any positive value: the number of seconds to cache negative lookup results
+# zero: do not cache
+#
+# In some Microsoft Windows networking environments that employ
+# the WINS name service in addition to DNS, name service lookups
+# that fail may take a noticeably long time to return (approx. 5 seconds).
+# For this reason the default caching policy is to maintain these
+# results for 10 seconds.
+#
+#
+networkaddress.cache.negative.ttl=10
+
+#
+# Properties to configure OCSP for certificate revocation checking
+#
+
+# Enable OCSP
+#
+# By default, OCSP is not used for certificate revocation checking.
+# This property enables the use of OCSP when set to the value "true".
+#
+# NOTE: SocketPermission is required to connect to an OCSP responder.
+#
+# Example,
+#   ocsp.enable=true
+
+#
+# Location of the OCSP responder
+#
+# By default, the location of the OCSP responder is determined implicitly
+# from the certificate being validated. This property explicitly specifies
+# the location of the OCSP responder. The property is used when the
+# Authority Information Access extension (defined in RFC 3280) is absent
+# from the certificate or when it requires overriding.
+#
+# Example,
+#   ocsp.responderURL=http://ocsp.example.net:80
+
+#
+# Subject name of the OCSP responder's certificate
+#
+# By default, the certificate of the OCSP responder is that of the issuer
+# of the certificate being validated. This property identifies the certificate
+# of the OCSP responder when the default does not apply. Its value is a string
+# distinguished name (defined in RFC 2253) which identifies a certificate in
+# the set of certificates supplied during cert path validation. In cases where
+# the subject name alone is not sufficient to uniquely identify the certificate
+# then both the "ocsp.responderCertIssuerName" and
+# "ocsp.responderCertSerialNumber" properties must be used instead. When this
+# property is set then those two properties are ignored.
+#
+# Example,
+#   ocsp.responderCertSubjectName="CN=OCSP Responder, O=XYZ Corp"
+
+#
+# Issuer name of the OCSP responder's certificate
+#
+# By default, the certificate of the OCSP responder is that of the issuer
+# of the certificate being validated. This property identifies the certificate
+# of the OCSP responder when the default does not apply. Its value is a string
+# distinguished name (defined in RFC 2253) which identifies a certificate in
+# the set of certificates supplied during cert path validation. When this
+# property is set then the "ocsp.responderCertSerialNumber" property must also
+# be set. When the "ocsp.responderCertSubjectName" property is set then this
+# property is ignored.
+#
+# Example,
+#   ocsp.responderCertIssuerName="CN=Enterprise CA, O=XYZ Corp"
+
+#
+# Serial number of the OCSP responder's certificate
+#
+# By default, the certificate of the OCSP responder is that of the issuer
+# of the certificate being validated. This property identifies the certificate
+# of the OCSP responder when the default does not apply. Its value is a string
+# of hexadecimal digits (colon or space separators may be present) which
+# identifies a certificate in the set of certificates supplied during cert path
+# validation. When this property is set then the "ocsp.responderCertIssuerName"
+# property must also be set. When the "ocsp.responderCertSubjectName" property
+# is set then this property is ignored.
+#
+# Example,
+#   ocsp.responderCertSerialNumber=2A:FF:00
+
+#
+# Policy for failed Kerberos KDC lookups:
+#
+# When a KDC is unavailable (network error, service failure, etc), it is
+# put inside a blacklist and accessed less often for future requests. The
+# value (case-insensitive) for this policy can be:
+#
+# tryLast
+#    KDCs in the blacklist are always tried after those not on the list.
+#
+# tryLess[:max_retries,timeout]
+#    KDCs in the blacklist are still tried by their order in the configuration,
+#    but with smaller max_retries and timeout values. max_retries and timeout
+#    are optional numerical parameters (default 1 and 5000, which means once
+#    and 5 seconds). Please notes that if any of the values defined here is
+#    more than what is defined in krb5.conf, it will be ignored.
+#
+# Whenever a KDC is detected as available, it is removed from the blacklist.
+# The blacklist is reset when krb5.conf is reloaded. You can add
+# refreshKrb5Config=true to a JAAS configuration file so that krb5.conf is
+# reloaded whenever a JAAS authentication is attempted.
+#
+# Example,
+#   krb5.kdc.bad.policy = tryLast
+#   krb5.kdc.bad.policy = tryLess:2,2000
+krb5.kdc.bad.policy = tryLast
+
+# Algorithm restrictions for certification path (CertPath) processing
+#
+# In some environments, certain algorithms or key lengths may be undesirable
+# for certification path building and validation.  For example, "MD2" is
+# generally no longer considered to be a secure hash algorithm.  This section
+# describes the mechanism for disabling algorithms based on algorithm name
+# and/or key length.  This includes algorithms used in certificates, as well
+# as revocation information such as CRLs and signed OCSP Responses.
+#
+# The syntax of the disabled algorithm string is described as this Java
+# BNF-style:
+#   DisabledAlgorithms:
+#       " DisabledAlgorithm { , DisabledAlgorithm } "
+#
+#   DisabledAlgorithm:
+#       AlgorithmName [Constraint]
+#
+#   AlgorithmName:
+#       (see below)
+#
+#   Constraint:
+#       KeySizeConstraint
+#
+#   KeySizeConstraint:
+#       keySize Operator DecimalInteger
+#
+#   Operator:
+#       <= | < | == | != | >= | >
+#
+#   DecimalInteger:
+#       DecimalDigits
+#
+#   DecimalDigits:
+#       DecimalDigit {DecimalDigit}
+#
+#   DecimalDigit: one of
+#       1 2 3 4 5 6 7 8 9 0
+#
+# The "AlgorithmName" is the standard algorithm name of the disabled
+# algorithm. See "Java Cryptography Architecture Standard Algorithm Name
+# Documentation" for information about Standard Algorithm Names.  Matching
+# is performed using a case-insensitive sub-element matching rule.  (For
+# example, in "SHA1withECDSA" the sub-elements are "SHA1" for hashing and
+# "ECDSA" for signatures.)  If the assertion "AlgorithmName" is a
+# sub-element of the certificate algorithm name, the algorithm will be
+# rejected during certification path building and validation.  For example,
+# the assertion algorithm name "DSA" will disable all certificate algorithms
+# that rely on DSA, such as NONEwithDSA, SHA1withDSA.  However, the assertion
+# will not disable algorithms related to "ECDSA".
+#
+# A "Constraint" provides further guidance for the algorithm being specified.
+# The "KeySizeConstraint" requires a key of a valid size range if the
+# "AlgorithmName" is of a key algorithm.  The "DecimalInteger" indicates the
+# key size specified in number of bits.  For example, "RSA keySize <= 1024"
+# indicates that any RSA key with key size less than or equal to 1024 bits
+# should be disabled, and "RSA keySize < 1024, RSA keySize > 2048" indicates
+# that any RSA key with key size less than 1024 or greater than 2048 should
+# be disabled. Note that the "KeySizeConstraint" only makes sense to key
+# algorithms.
+#
+# Note: This property is currently used by Oracle's PKIX implementation. It
+# is not guaranteed to be examined and used by other implementations.
+#
+# Example:
+#   jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
+#
+#
+jdk.certpath.disabledAlgorithms=MD2, MD5, RSA keySize < 1024
+
+# Algorithm restrictions for Secure Socket Layer/Transport Layer Security
+# (SSL/TLS) processing
+#
+# In some environments, certain algorithms or key lengths may be undesirable
+# when using SSL/TLS.  This section describes the mechanism for disabling
+# algorithms during SSL/TLS security parameters negotiation, including cipher
+# suites selection, peer authentication and key exchange mechanisms.
+#
+# For PKI-based peer authentication and key exchange mechanisms, this list
+# of disabled algorithms will also be checked during certification path
+# building and validation, including algorithms used in certificates, as
+# well as revocation information such as CRLs and signed OCSP Responses.
+# This is in addition to the jdk.certpath.disabledAlgorithms property above.
+#
+# See the specification of "jdk.certpath.disabledAlgorithms" for the
+# syntax of the disabled algorithm string.
+#
+# Note: This property is currently used by Oracle's JSSE implementation.
+# It is not guaranteed to be examined and used by other implementations.
+#
+# Example:
+#   jdk.tls.disabledAlgorithms=MD5, SHA1, DSA, RSA keySize < 2048
--- a/src/java.base/share/conf/security/java.security-aix	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,496 +0,0 @@
-#
-# This is the "master security properties file".
-#
-# An alternate java.security properties file may be specified
-# from the command line via the system property
-#
-#    -Djava.security.properties=<URL>
-#
-# This properties file appends to the master security properties file.
-# If both properties files specify values for the same key, the value
-# from the command-line properties file is selected, as it is the last
-# one loaded.
-#
-# Also, if you specify
-#
-#    -Djava.security.properties==<URL> (2 equals),
-#
-# then that properties file completely overrides the master security
-# properties file.
-#
-# To disable the ability to specify an additional properties file from
-# the command line, set the key security.overridePropertiesFile
-# to false in the master security properties file. It is set to true
-# by default.
-
-# In this file, various security properties are set for use by
-# java.security classes. This is where users can statically register
-# Cryptography Package Providers ("providers" for short). The term
-# "provider" refers to a package or set of packages that supply a
-# concrete implementation of a subset of the cryptography aspects of
-# the Java Security API. A provider may, for example, implement one or
-# more digital signature algorithms or message digest algorithms.
-#
-# Each provider must implement a subclass of the Provider class.
-# To register a provider in this master security properties file,
-# specify the Provider subclass name and priority in the format
-#
-#    security.provider.<n>=<className>
-#
-# This declares a provider, and specifies its preference
-# order n. The preference order is the order in which providers are
-# searched for requested algorithms (when no specific provider is
-# requested). The order is 1-based; 1 is the most preferred, followed
-# by 2, and so on.
-#
-# <className> must specify the subclass of the Provider class whose
-# constructor sets the values of various properties that are required
-# for the Java Security API to look up the algorithms or other
-# facilities implemented by the provider.
-#
-# There must be at least one provider specification in java.security.
-# There is a default provider that comes standard with the JDK. It
-# is called the "SUN" provider, and its Provider subclass
-# named Sun appears in the sun.security.provider package. Thus, the
-# "SUN" provider is registered via the following:
-#
-#    security.provider.1=sun.security.provider.Sun
-#
-# (The number 1 is used for the default provider.)
-#
-# Note: Providers can be dynamically registered instead by calls to
-# either the addProvider or insertProviderAt method in the Security
-# class.
-
-#
-# List of providers and their preference orders (see above):
-#
-security.provider.1=sun.security.provider.Sun
-security.provider.2=sun.security.rsa.SunRsaSign
-security.provider.3=sun.security.ec.SunEC
-security.provider.4=com.sun.net.ssl.internal.ssl.Provider
-security.provider.5=com.sun.crypto.provider.SunJCE
-security.provider.6=sun.security.jgss.SunProvider
-security.provider.7=com.sun.security.sasl.Provider
-security.provider.8=org.jcp.xml.dsig.internal.dom.XMLDSigRI
-security.provider.9=sun.security.smartcardio.SunPCSC
-
-#
-# Sun Provider SecureRandom seed source.
-#
-# Select the primary source of seed data for the "SHA1PRNG" and
-# "NativePRNG" SecureRandom implementations in the "Sun" provider.
-# (Other SecureRandom implementations might also use this property.)
-#
-# On Unix-like systems (for example, Solaris/Linux/MacOS), the
-# "NativePRNG" and "SHA1PRNG" implementations obtains seed data from
-# special device files such as file:/dev/random.
-#
-# On Windows systems, specifying the URLs "file:/dev/random" or
-# "file:/dev/urandom" will enable the native Microsoft CryptoAPI seeding
-# mechanism for SHA1PRNG.
-#
-# By default, an attempt is made to use the entropy gathering device
-# specified by the "securerandom.source" Security property.  If an
-# exception occurs while accessing the specified URL:
-#
-#     SHA1PRNG:
-#         the traditional system/thread activity algorithm will be used.
-#
-#     NativePRNG:
-#         a default value of /dev/random will be used.  If neither
-#         are available, the implementation will be disabled.
-#         "file" is the only currently supported protocol type.
-#
-# The entropy gathering device can also be specified with the System
-# property "java.security.egd". For example:
-#
-#   % java -Djava.security.egd=file:/dev/random MainClass
-#
-# Specifying this System property will override the
-# "securerandom.source" Security property.
-#
-# In addition, if "file:/dev/random" or "file:/dev/urandom" is
-# specified, the "NativePRNG" implementation will be more preferred than
-# SHA1PRNG in the Sun provider.
-#
-securerandom.source=file:/dev/random
-
-#
-# A list of known strong SecureRandom implementations.
-#
-# To help guide applications in selecting a suitable strong
-# java.security.SecureRandom implementation, Java distributions should
-# indicate a list of known strong implementations using the property.
-#
-# This is a comma-separated list of algorithm and/or algorithm:provider
-# entries.
-#
-securerandom.strongAlgorithms=NativePRNGBlocking:SUN
-
-#
-# Class to instantiate as the javax.security.auth.login.Configuration
-# provider.
-#
-login.configuration.provider=sun.security.provider.ConfigFile
-
-#
-# Default login configuration file
-#
-#login.config.url.1=file:${user.home}/.java.login.config
-
-#
-# Class to instantiate as the system Policy. This is the name of the class
-# that will be used as the Policy object.
-#
-policy.provider=sun.security.provider.PolicyFile
-
-# The default is to have a single system-wide policy file,
-# and a policy file in the user's home directory.
-policy.url.1=file:${java.home}/lib/security/java.policy
-policy.url.2=file:${user.home}/.java.policy
-
-# whether or not we expand properties in the policy file
-# if this is set to false, properties (${...}) will not be expanded in policy
-# files.
-policy.expandProperties=true
-
-# whether or not we allow an extra policy to be passed on the command line
-# with -Djava.security.policy=somefile. Comment out this line to disable
-# this feature.
-policy.allowSystemProperty=true
-
-# whether or not we look into the IdentityScope for trusted Identities
-# when encountering a 1.1 signed JAR file. If the identity is found
-# and is trusted, we grant it AllPermission.
-policy.ignoreIdentityScope=false
-
-#
-# Default keystore type.
-#
-keystore.type=jks
-
-#
-# List of comma-separated packages that start with or equal this string
-# will cause a security exception to be thrown when
-# passed to checkPackageAccess unless the
-# corresponding RuntimePermission ("accessClassInPackage."+package) has
-# been granted.
-package.access=sun.,\
-               com.sun.xml.internal.,\
-               com.sun.imageio.,\
-               com.sun.istack.internal.,\
-               com.sun.jmx.,\
-               com.sun.media.sound.,\
-               com.sun.naming.internal.,\
-               com.sun.proxy.,\
-               com.sun.corba.se.,\
-               com.sun.org.apache.bcel.internal.,\
-               com.sun.org.apache.regexp.internal.,\
-               com.sun.org.apache.xerces.internal.,\
-               com.sun.org.apache.xpath.internal.,\
-               com.sun.org.apache.xalan.internal.extensions.,\
-               com.sun.org.apache.xalan.internal.lib.,\
-               com.sun.org.apache.xalan.internal.res.,\
-               com.sun.org.apache.xalan.internal.templates.,\
-               com.sun.org.apache.xalan.internal.utils.,\
-               com.sun.org.apache.xalan.internal.xslt.,\
-               com.sun.org.apache.xalan.internal.xsltc.cmdline.,\
-               com.sun.org.apache.xalan.internal.xsltc.compiler.,\
-               com.sun.org.apache.xalan.internal.xsltc.trax.,\
-               com.sun.org.apache.xalan.internal.xsltc.util.,\
-               com.sun.org.apache.xml.internal.res.,\
-               com.sun.org.apache.xml.internal.security.,\
-               com.sun.org.apache.xml.internal.serializer.utils.,\
-               com.sun.org.apache.xml.internal.utils.,\
-               com.sun.org.glassfish.,\
-               com.oracle.xmlns.internal.,\
-               com.oracle.webservices.internal.,\
-               org.jcp.xml.dsig.internal.,\
-               jdk.internal.,\
-               jdk.nashorn.internal.,\
-               jdk.nashorn.tools.
-
-
-#
-# List of comma-separated packages that start with or equal this string
-# will cause a security exception to be thrown when
-# passed to checkPackageDefinition unless the
-# corresponding RuntimePermission ("defineClassInPackage."+package) has
-# been granted.
-#
-# by default, none of the class loaders supplied with the JDK call
-# checkPackageDefinition.
-#
-package.definition=sun.,\
-                   com.sun.xml.internal.,\
-                   com.sun.imageio.,\
-                   com.sun.istack.internal.,\
-                   com.sun.jmx.,\
-                   com.sun.media.sound.,\
-                   com.sun.naming.internal.,\
-                   com.sun.proxy.,\
-                   com.sun.corba.se.,\
-                   com.sun.org.apache.bcel.internal.,\
-                   com.sun.org.apache.regexp.internal.,\
-                   com.sun.org.apache.xerces.internal.,\
-                   com.sun.org.apache.xpath.internal.,\
-                   com.sun.org.apache.xalan.internal.extensions.,\
-                   com.sun.org.apache.xalan.internal.lib.,\
-                   com.sun.org.apache.xalan.internal.res.,\
-                   com.sun.org.apache.xalan.internal.templates.,\
-                   com.sun.org.apache.xalan.internal.utils.,\
-                   com.sun.org.apache.xalan.internal.xslt.,\
-                   com.sun.org.apache.xalan.internal.xsltc.cmdline.,\
-                   com.sun.org.apache.xalan.internal.xsltc.compiler.,\
-                   com.sun.org.apache.xalan.internal.xsltc.trax.,\
-                   com.sun.org.apache.xalan.internal.xsltc.util.,\
-                   com.sun.org.apache.xml.internal.res.,\
-                   com.sun.org.apache.xml.internal.security.,\
-                   com.sun.org.apache.xml.internal.serializer.utils.,\
-                   com.sun.org.apache.xml.internal.utils.,\
-                   com.sun.org.glassfish.,\
-                   com.oracle.xmlns.internal.,\
-                   com.oracle.webservices.internal.,\
-                   org.jcp.xml.dsig.internal.,\
-                   jdk.internal.,\
-                   jdk.nashorn.internal.,\
-                   jdk.nashorn.tools.
-
-
-#
-# Determines whether this properties file can be appended to
-# or overridden on the command line via -Djava.security.properties
-#
-security.overridePropertiesFile=true
-
-#
-# Determines the default key and trust manager factory algorithms for
-# the javax.net.ssl package.
-#
-ssl.KeyManagerFactory.algorithm=SunX509
-ssl.TrustManagerFactory.algorithm=PKIX
-
-#
-# The Java-level namelookup cache policy for successful lookups:
-#
-# any negative value: caching forever
-# any positive value: the number of seconds to cache an address for
-# zero: do not cache
-#
-# default value is forever (FOREVER). For security reasons, this
-# caching is made forever when a security manager is set. When a security
-# manager is not set, the default behavior in this implementation
-# is to cache for 30 seconds.
-#
-# NOTE: setting this to anything other than the default value can have
-#       serious security implications. Do not set it unless
-#       you are sure you are not exposed to DNS spoofing attack.
-#
-#networkaddress.cache.ttl=-1
-
-# The Java-level namelookup cache policy for failed lookups:
-#
-# any negative value: cache forever
-# any positive value: the number of seconds to cache negative lookup results
-# zero: do not cache
-#
-# In some Microsoft Windows networking environments that employ
-# the WINS name service in addition to DNS, name service lookups
-# that fail may take a noticeably long time to return (approx. 5 seconds).
-# For this reason the default caching policy is to maintain these
-# results for 10 seconds.
-#
-#
-networkaddress.cache.negative.ttl=10
-
-#
-# Properties to configure OCSP for certificate revocation checking
-#
-
-# Enable OCSP
-#
-# By default, OCSP is not used for certificate revocation checking.
-# This property enables the use of OCSP when set to the value "true".
-#
-# NOTE: SocketPermission is required to connect to an OCSP responder.
-#
-# Example,
-#   ocsp.enable=true
-
-#
-# Location of the OCSP responder
-#
-# By default, the location of the OCSP responder is determined implicitly
-# from the certificate being validated. This property explicitly specifies
-# the location of the OCSP responder. The property is used when the
-# Authority Information Access extension (defined in RFC 3280) is absent
-# from the certificate or when it requires overriding.
-#
-# Example,
-#   ocsp.responderURL=http://ocsp.example.net:80
-
-#
-# Subject name of the OCSP responder's certificate
-#
-# By default, the certificate of the OCSP responder is that of the issuer
-# of the certificate being validated. This property identifies the certificate
-# of the OCSP responder when the default does not apply. Its value is a string
-# distinguished name (defined in RFC 2253) which identifies a certificate in
-# the set of certificates supplied during cert path validation. In cases where
-# the subject name alone is not sufficient to uniquely identify the certificate
-# then both the "ocsp.responderCertIssuerName" and
-# "ocsp.responderCertSerialNumber" properties must be used instead. When this
-# property is set then those two properties are ignored.
-#
-# Example,
-#   ocsp.responderCertSubjectName="CN=OCSP Responder, O=XYZ Corp"
-
-#
-# Issuer name of the OCSP responder's certificate
-#
-# By default, the certificate of the OCSP responder is that of the issuer
-# of the certificate being validated. This property identifies the certificate
-# of the OCSP responder when the default does not apply. Its value is a string
-# distinguished name (defined in RFC 2253) which identifies a certificate in
-# the set of certificates supplied during cert path validation. When this
-# property is set then the "ocsp.responderCertSerialNumber" property must also
-# be set. When the "ocsp.responderCertSubjectName" property is set then this
-# property is ignored.
-#
-# Example,
-#   ocsp.responderCertIssuerName="CN=Enterprise CA, O=XYZ Corp"
-
-#
-# Serial number of the OCSP responder's certificate
-#
-# By default, the certificate of the OCSP responder is that of the issuer
-# of the certificate being validated. This property identifies the certificate
-# of the OCSP responder when the default does not apply. Its value is a string
-# of hexadecimal digits (colon or space separators may be present) which
-# identifies a certificate in the set of certificates supplied during cert path
-# validation. When this property is set then the "ocsp.responderCertIssuerName"
-# property must also be set. When the "ocsp.responderCertSubjectName" property
-# is set then this property is ignored.
-#
-# Example,
-#   ocsp.responderCertSerialNumber=2A:FF:00
-
-#
-# Policy for failed Kerberos KDC lookups:
-#
-# When a KDC is unavailable (network error, service failure, etc), it is
-# put inside a blacklist and accessed less often for future requests. The
-# value (case-insensitive) for this policy can be:
-#
-# tryLast
-#    KDCs in the blacklist are always tried after those not on the list.
-#
-# tryLess[:max_retries,timeout]
-#    KDCs in the blacklist are still tried by their order in the configuration,
-#    but with smaller max_retries and timeout values. max_retries and timeout
-#    are optional numerical parameters (default 1 and 5000, which means once
-#    and 5 seconds). Please notes that if any of the values defined here is
-#    more than what is defined in krb5.conf, it will be ignored.
-#
-# Whenever a KDC is detected as available, it is removed from the blacklist.
-# The blacklist is reset when krb5.conf is reloaded. You can add
-# refreshKrb5Config=true to a JAAS configuration file so that krb5.conf is
-# reloaded whenever a JAAS authentication is attempted.
-#
-# Example,
-#   krb5.kdc.bad.policy = tryLast
-#   krb5.kdc.bad.policy = tryLess:2,2000
-krb5.kdc.bad.policy = tryLast
-
-# Algorithm restrictions for certification path (CertPath) processing
-#
-# In some environments, certain algorithms or key lengths may be undesirable
-# for certification path building and validation.  For example, "MD2" is
-# generally no longer considered to be a secure hash algorithm.  This section
-# describes the mechanism for disabling algorithms based on algorithm name
-# and/or key length.  This includes algorithms used in certificates, as well
-# as revocation information such as CRLs and signed OCSP Responses.
-#
-# The syntax of the disabled algorithm string is described as this Java
-# BNF-style:
-#   DisabledAlgorithms:
-#       " DisabledAlgorithm { , DisabledAlgorithm } "
-#
-#   DisabledAlgorithm:
-#       AlgorithmName [Constraint]
-#
-#   AlgorithmName:
-#       (see below)
-#
-#   Constraint:
-#       KeySizeConstraint
-#
-#   KeySizeConstraint:
-#       keySize Operator DecimalInteger
-#
-#   Operator:
-#       <= | < | == | != | >= | >
-#
-#   DecimalInteger:
-#       DecimalDigits
-#
-#   DecimalDigits:
-#       DecimalDigit {DecimalDigit}
-#
-#   DecimalDigit: one of
-#       1 2 3 4 5 6 7 8 9 0
-#
-# The "AlgorithmName" is the standard algorithm name of the disabled
-# algorithm. See "Java Cryptography Architecture Standard Algorithm Name
-# Documentation" for information about Standard Algorithm Names.  Matching
-# is performed using a case-insensitive sub-element matching rule.  (For
-# example, in "SHA1withECDSA" the sub-elements are "SHA1" for hashing and
-# "ECDSA" for signatures.)  If the assertion "AlgorithmName" is a
-# sub-element of the certificate algorithm name, the algorithm will be
-# rejected during certification path building and validation.  For example,
-# the assertion algorithm name "DSA" will disable all certificate algorithms
-# that rely on DSA, such as NONEwithDSA, SHA1withDSA.  However, the assertion
-# will not disable algorithms related to "ECDSA".
-#
-# A "Constraint" provides further guidance for the algorithm being specified.
-# The "KeySizeConstraint" requires a key of a valid size range if the
-# "AlgorithmName" is of a key algorithm.  The "DecimalInteger" indicates the
-# key size specified in number of bits.  For example, "RSA keySize <= 1024"
-# indicates that any RSA key with key size less than or equal to 1024 bits
-# should be disabled, and "RSA keySize < 1024, RSA keySize > 2048" indicates
-# that any RSA key with key size less than 1024 or greater than 2048 should
-# be disabled. Note that the "KeySizeConstraint" only makes sense to key
-# algorithms.
-#
-# Note: This property is currently used by Oracle's PKIX implementation. It
-# is not guaranteed to be examined and used by other implementations.
-#
-# Example:
-#   jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
-#
-#
-jdk.certpath.disabledAlgorithms=MD2, MD5, RSA keySize < 1024
-
-# Algorithm restrictions for Secure Socket Layer/Transport Layer Security
-# (SSL/TLS) processing
-#
-# In some environments, certain algorithms or key lengths may be undesirable
-# when using SSL/TLS.  This section describes the mechanism for disabling
-# algorithms during SSL/TLS security parameters negotiation, including cipher
-# suites selection, peer authentication and key exchange mechanisms.
-#
-# For PKI-based peer authentication and key exchange mechanisms, this list
-# of disabled algorithms will also be checked during certification path
-# building and validation, including algorithms used in certificates, as
-# well as revocation information such as CRLs and signed OCSP Responses.
-# This is in addition to the jdk.certpath.disabledAlgorithms property above.
-#
-# See the specification of "jdk.certpath.disabledAlgorithms" for the
-# syntax of the disabled algorithm string.
-#
-# Note: This property is currently used by Oracle's JSSE implementation.
-# It is not guaranteed to be examined and used by other implementations.
-#
-# Example:
-#   jdk.tls.disabledAlgorithms=MD5, SHA1, DSA, RSA keySize < 2048
--- a/src/java.base/share/conf/security/java.security-linux	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,496 +0,0 @@
-#
-# This is the "master security properties file".
-#
-# An alternate java.security properties file may be specified
-# from the command line via the system property
-#
-#    -Djava.security.properties=<URL>
-#
-# This properties file appends to the master security properties file.
-# If both properties files specify values for the same key, the value
-# from the command-line properties file is selected, as it is the last
-# one loaded.
-#
-# Also, if you specify
-#
-#    -Djava.security.properties==<URL> (2 equals),
-#
-# then that properties file completely overrides the master security
-# properties file.
-#
-# To disable the ability to specify an additional properties file from
-# the command line, set the key security.overridePropertiesFile
-# to false in the master security properties file. It is set to true
-# by default.
-
-# In this file, various security properties are set for use by
-# java.security classes. This is where users can statically register
-# Cryptography Package Providers ("providers" for short). The term
-# "provider" refers to a package or set of packages that supply a
-# concrete implementation of a subset of the cryptography aspects of
-# the Java Security API. A provider may, for example, implement one or
-# more digital signature algorithms or message digest algorithms.
-#
-# Each provider must implement a subclass of the Provider class.
-# To register a provider in this master security properties file,
-# specify the Provider subclass name and priority in the format
-#
-#    security.provider.<n>=<className>
-#
-# This declares a provider, and specifies its preference
-# order n. The preference order is the order in which providers are
-# searched for requested algorithms (when no specific provider is
-# requested). The order is 1-based; 1 is the most preferred, followed
-# by 2, and so on.
-#
-# <className> must specify the subclass of the Provider class whose
-# constructor sets the values of various properties that are required
-# for the Java Security API to look up the algorithms or other
-# facilities implemented by the provider.
-#
-# There must be at least one provider specification in java.security.
-# There is a default provider that comes standard with the JDK. It
-# is called the "SUN" provider, and its Provider subclass
-# named Sun appears in the sun.security.provider package. Thus, the
-# "SUN" provider is registered via the following:
-#
-#    security.provider.1=sun.security.provider.Sun
-#
-# (The number 1 is used for the default provider.)
-#
-# Note: Providers can be dynamically registered instead by calls to
-# either the addProvider or insertProviderAt method in the Security
-# class.
-
-#
-# List of providers and their preference orders (see above):
-#
-security.provider.1=sun.security.provider.Sun
-security.provider.2=sun.security.rsa.SunRsaSign
-security.provider.3=sun.security.ec.SunEC
-security.provider.4=com.sun.net.ssl.internal.ssl.Provider
-security.provider.5=com.sun.crypto.provider.SunJCE
-security.provider.6=sun.security.jgss.SunProvider
-security.provider.7=com.sun.security.sasl.Provider
-security.provider.8=org.jcp.xml.dsig.internal.dom.XMLDSigRI
-security.provider.9=sun.security.smartcardio.SunPCSC
-
-#
-# Sun Provider SecureRandom seed source.
-#
-# Select the primary source of seed data for the "SHA1PRNG" and
-# "NativePRNG" SecureRandom implementations in the "Sun" provider.
-# (Other SecureRandom implementations might also use this property.)
-#
-# On Unix-like systems (for example, Solaris/Linux/MacOS), the
-# "NativePRNG" and "SHA1PRNG" implementations obtains seed data from
-# special device files such as file:/dev/random.
-#
-# On Windows systems, specifying the URLs "file:/dev/random" or
-# "file:/dev/urandom" will enable the native Microsoft CryptoAPI seeding
-# mechanism for SHA1PRNG.
-#
-# By default, an attempt is made to use the entropy gathering device
-# specified by the "securerandom.source" Security property.  If an
-# exception occurs while accessing the specified URL:
-#
-#     SHA1PRNG:
-#         the traditional system/thread activity algorithm will be used.
-#
-#     NativePRNG:
-#         a default value of /dev/random will be used.  If neither
-#         are available, the implementation will be disabled.
-#         "file" is the only currently supported protocol type.
-#
-# The entropy gathering device can also be specified with the System
-# property "java.security.egd". For example:
-#
-#   % java -Djava.security.egd=file:/dev/random MainClass
-#
-# Specifying this System property will override the
-# "securerandom.source" Security property.
-#
-# In addition, if "file:/dev/random" or "file:/dev/urandom" is
-# specified, the "NativePRNG" implementation will be more preferred than
-# SHA1PRNG in the Sun provider.
-#
-securerandom.source=file:/dev/random
-
-#
-# A list of known strong SecureRandom implementations.
-#
-# To help guide applications in selecting a suitable strong
-# java.security.SecureRandom implementation, Java distributions should
-# indicate a list of known strong implementations using the property.
-#
-# This is a comma-separated list of algorithm and/or algorithm:provider
-# entries.
-#
-securerandom.strongAlgorithms=NativePRNGBlocking:SUN
-
-#
-# Class to instantiate as the javax.security.auth.login.Configuration
-# provider.
-#
-login.configuration.provider=sun.security.provider.ConfigFile
-
-#
-# Default login configuration file
-#
-#login.config.url.1=file:${user.home}/.java.login.config
-
-#
-# Class to instantiate as the system Policy. This is the name of the class
-# that will be used as the Policy object.
-#
-policy.provider=sun.security.provider.PolicyFile
-
-# The default is to have a single system-wide policy file,
-# and a policy file in the user's home directory.
-policy.url.1=file:${java.home}/lib/security/java.policy
-policy.url.2=file:${user.home}/.java.policy
-
-# whether or not we expand properties in the policy file
-# if this is set to false, properties (${...}) will not be expanded in policy
-# files.
-policy.expandProperties=true
-
-# whether or not we allow an extra policy to be passed on the command line
-# with -Djava.security.policy=somefile. Comment out this line to disable
-# this feature.
-policy.allowSystemProperty=true
-
-# whether or not we look into the IdentityScope for trusted Identities
-# when encountering a 1.1 signed JAR file. If the identity is found
-# and is trusted, we grant it AllPermission.
-policy.ignoreIdentityScope=false
-
-#
-# Default keystore type.
-#
-keystore.type=jks
-
-#
-# List of comma-separated packages that start with or equal this string
-# will cause a security exception to be thrown when
-# passed to checkPackageAccess unless the
-# corresponding RuntimePermission ("accessClassInPackage."+package) has
-# been granted.
-package.access=sun.,\
-               com.sun.xml.internal.,\
-               com.sun.imageio.,\
-               com.sun.istack.internal.,\
-               com.sun.jmx.,\
-               com.sun.media.sound.,\
-               com.sun.naming.internal.,\
-               com.sun.proxy.,\
-               com.sun.corba.se.,\
-               com.sun.org.apache.bcel.internal.,\
-               com.sun.org.apache.regexp.internal.,\
-               com.sun.org.apache.xerces.internal.,\
-               com.sun.org.apache.xpath.internal.,\
-               com.sun.org.apache.xalan.internal.extensions.,\
-               com.sun.org.apache.xalan.internal.lib.,\
-               com.sun.org.apache.xalan.internal.res.,\
-               com.sun.org.apache.xalan.internal.templates.,\
-               com.sun.org.apache.xalan.internal.utils.,\
-               com.sun.org.apache.xalan.internal.xslt.,\
-               com.sun.org.apache.xalan.internal.xsltc.cmdline.,\
-               com.sun.org.apache.xalan.internal.xsltc.compiler.,\
-               com.sun.org.apache.xalan.internal.xsltc.trax.,\
-               com.sun.org.apache.xalan.internal.xsltc.util.,\
-               com.sun.org.apache.xml.internal.res.,\
-               com.sun.org.apache.xml.internal.security.,\
-               com.sun.org.apache.xml.internal.serializer.utils.,\
-               com.sun.org.apache.xml.internal.utils.,\
-               com.sun.org.glassfish.,\
-               com.oracle.xmlns.internal.,\
-               com.oracle.webservices.internal.,\
-               org.jcp.xml.dsig.internal.,\
-               jdk.internal.,\
-               jdk.nashorn.internal.,\
-               jdk.nashorn.tools.,\
-               com.sun.activation.registries.
-
-#
-# List of comma-separated packages that start with or equal this string
-# will cause a security exception to be thrown when
-# passed to checkPackageDefinition unless the
-# corresponding RuntimePermission ("defineClassInPackage."+package) has
-# been granted.
-#
-# by default, none of the class loaders supplied with the JDK call
-# checkPackageDefinition.
-#
-package.definition=sun.,\
-                   com.sun.xml.internal.,\
-                   com.sun.imageio.,\
-                   com.sun.istack.internal.,\
-                   com.sun.jmx.,\
-                   com.sun.media.sound.,\
-                   com.sun.naming.internal.,\
-                   com.sun.proxy.,\
-                   com.sun.corba.se.,\
-                   com.sun.org.apache.bcel.internal.,\
-                   com.sun.org.apache.regexp.internal.,\
-                   com.sun.org.apache.xerces.internal.,\
-                   com.sun.org.apache.xpath.internal.,\
-                   com.sun.org.apache.xalan.internal.extensions.,\
-                   com.sun.org.apache.xalan.internal.lib.,\
-                   com.sun.org.apache.xalan.internal.res.,\
-                   com.sun.org.apache.xalan.internal.templates.,\
-                   com.sun.org.apache.xalan.internal.utils.,\
-                   com.sun.org.apache.xalan.internal.xslt.,\
-                   com.sun.org.apache.xalan.internal.xsltc.cmdline.,\
-                   com.sun.org.apache.xalan.internal.xsltc.compiler.,\
-                   com.sun.org.apache.xalan.internal.xsltc.trax.,\
-                   com.sun.org.apache.xalan.internal.xsltc.util.,\
-                   com.sun.org.apache.xml.internal.res.,\
-                   com.sun.org.apache.xml.internal.security.,\
-                   com.sun.org.apache.xml.internal.serializer.utils.,\
-                   com.sun.org.apache.xml.internal.utils.,\
-                   com.sun.org.glassfish.,\
-                   com.oracle.xmlns.internal.,\
-                   com.oracle.webservices.internal.,\
-                   org.jcp.xml.dsig.internal.,\
-                   jdk.internal.,\
-                   jdk.nashorn.internal.,\
-                   jdk.nashorn.tools.,\
-                   com.sun.activation.registries.
-
-#
-# Determines whether this properties file can be appended to
-# or overridden on the command line via -Djava.security.properties
-#
-security.overridePropertiesFile=true
-
-#
-# Determines the default key and trust manager factory algorithms for
-# the javax.net.ssl package.
-#
-ssl.KeyManagerFactory.algorithm=SunX509
-ssl.TrustManagerFactory.algorithm=PKIX
-
-#
-# The Java-level namelookup cache policy for successful lookups:
-#
-# any negative value: caching forever
-# any positive value: the number of seconds to cache an address for
-# zero: do not cache
-#
-# default value is forever (FOREVER). For security reasons, this
-# caching is made forever when a security manager is set. When a security
-# manager is not set, the default behavior in this implementation
-# is to cache for 30 seconds.
-#
-# NOTE: setting this to anything other than the default value can have
-#       serious security implications. Do not set it unless
-#       you are sure you are not exposed to DNS spoofing attack.
-#
-#networkaddress.cache.ttl=-1
-
-# The Java-level namelookup cache policy for failed lookups:
-#
-# any negative value: cache forever
-# any positive value: the number of seconds to cache negative lookup results
-# zero: do not cache
-#
-# In some Microsoft Windows networking environments that employ
-# the WINS name service in addition to DNS, name service lookups
-# that fail may take a noticeably long time to return (approx. 5 seconds).
-# For this reason the default caching policy is to maintain these
-# results for 10 seconds.
-#
-#
-networkaddress.cache.negative.ttl=10
-
-#
-# Properties to configure OCSP for certificate revocation checking
-#
-
-# Enable OCSP
-#
-# By default, OCSP is not used for certificate revocation checking.
-# This property enables the use of OCSP when set to the value "true".
-#
-# NOTE: SocketPermission is required to connect to an OCSP responder.
-#
-# Example,
-#   ocsp.enable=true
-
-#
-# Location of the OCSP responder
-#
-# By default, the location of the OCSP responder is determined implicitly
-# from the certificate being validated. This property explicitly specifies
-# the location of the OCSP responder. The property is used when the
-# Authority Information Access extension (defined in RFC 3280) is absent
-# from the certificate or when it requires overriding.
-#
-# Example,
-#   ocsp.responderURL=http://ocsp.example.net:80
-
-#
-# Subject name of the OCSP responder's certificate
-#
-# By default, the certificate of the OCSP responder is that of the issuer
-# of the certificate being validated. This property identifies the certificate
-# of the OCSP responder when the default does not apply. Its value is a string
-# distinguished name (defined in RFC 2253) which identifies a certificate in
-# the set of certificates supplied during cert path validation. In cases where
-# the subject name alone is not sufficient to uniquely identify the certificate
-# then both the "ocsp.responderCertIssuerName" and
-# "ocsp.responderCertSerialNumber" properties must be used instead. When this
-# property is set then those two properties are ignored.
-#
-# Example,
-#   ocsp.responderCertSubjectName="CN=OCSP Responder, O=XYZ Corp"
-
-#
-# Issuer name of the OCSP responder's certificate
-#
-# By default, the certificate of the OCSP responder is that of the issuer
-# of the certificate being validated. This property identifies the certificate
-# of the OCSP responder when the default does not apply. Its value is a string
-# distinguished name (defined in RFC 2253) which identifies a certificate in
-# the set of certificates supplied during cert path validation. When this
-# property is set then the "ocsp.responderCertSerialNumber" property must also
-# be set. When the "ocsp.responderCertSubjectName" property is set then this
-# property is ignored.
-#
-# Example,
-#   ocsp.responderCertIssuerName="CN=Enterprise CA, O=XYZ Corp"
-
-#
-# Serial number of the OCSP responder's certificate
-#
-# By default, the certificate of the OCSP responder is that of the issuer
-# of the certificate being validated. This property identifies the certificate
-# of the OCSP responder when the default does not apply. Its value is a string
-# of hexadecimal digits (colon or space separators may be present) which
-# identifies a certificate in the set of certificates supplied during cert path
-# validation. When this property is set then the "ocsp.responderCertIssuerName"
-# property must also be set. When the "ocsp.responderCertSubjectName" property
-# is set then this property is ignored.
-#
-# Example,
-#   ocsp.responderCertSerialNumber=2A:FF:00
-
-#
-# Policy for failed Kerberos KDC lookups:
-#
-# When a KDC is unavailable (network error, service failure, etc), it is
-# put inside a blacklist and accessed less often for future requests. The
-# value (case-insensitive) for this policy can be:
-#
-# tryLast
-#    KDCs in the blacklist are always tried after those not on the list.
-#
-# tryLess[:max_retries,timeout]
-#    KDCs in the blacklist are still tried by their order in the configuration,
-#    but with smaller max_retries and timeout values. max_retries and timeout
-#    are optional numerical parameters (default 1 and 5000, which means once
-#    and 5 seconds). Please notes that if any of the values defined here is
-#    more than what is defined in krb5.conf, it will be ignored.
-#
-# Whenever a KDC is detected as available, it is removed from the blacklist.
-# The blacklist is reset when krb5.conf is reloaded. You can add
-# refreshKrb5Config=true to a JAAS configuration file so that krb5.conf is
-# reloaded whenever a JAAS authentication is attempted.
-#
-# Example,
-#   krb5.kdc.bad.policy = tryLast
-#   krb5.kdc.bad.policy = tryLess:2,2000
-krb5.kdc.bad.policy = tryLast
-
-# Algorithm restrictions for certification path (CertPath) processing
-#
-# In some environments, certain algorithms or key lengths may be undesirable
-# for certification path building and validation.  For example, "MD2" is
-# generally no longer considered to be a secure hash algorithm.  This section
-# describes the mechanism for disabling algorithms based on algorithm name
-# and/or key length.  This includes algorithms used in certificates, as well
-# as revocation information such as CRLs and signed OCSP Responses.
-#
-# The syntax of the disabled algorithm string is described as this Java
-# BNF-style:
-#   DisabledAlgorithms:
-#       " DisabledAlgorithm { , DisabledAlgorithm } "
-#
-#   DisabledAlgorithm:
-#       AlgorithmName [Constraint]
-#
-#   AlgorithmName:
-#       (see below)
-#
-#   Constraint:
-#       KeySizeConstraint
-#
-#   KeySizeConstraint:
-#       keySize Operator DecimalInteger
-#
-#   Operator:
-#       <= | < | == | != | >= | >
-#
-#   DecimalInteger:
-#       DecimalDigits
-#
-#   DecimalDigits:
-#       DecimalDigit {DecimalDigit}
-#
-#   DecimalDigit: one of
-#       1 2 3 4 5 6 7 8 9 0
-#
-# The "AlgorithmName" is the standard algorithm name of the disabled
-# algorithm. See "Java Cryptography Architecture Standard Algorithm Name
-# Documentation" for information about Standard Algorithm Names.  Matching
-# is performed using a case-insensitive sub-element matching rule.  (For
-# example, in "SHA1withECDSA" the sub-elements are "SHA1" for hashing and
-# "ECDSA" for signatures.)  If the assertion "AlgorithmName" is a
-# sub-element of the certificate algorithm name, the algorithm will be
-# rejected during certification path building and validation.  For example,
-# the assertion algorithm name "DSA" will disable all certificate algorithms
-# that rely on DSA, such as NONEwithDSA, SHA1withDSA.  However, the assertion
-# will not disable algorithms related to "ECDSA".
-#
-# A "Constraint" provides further guidance for the algorithm being specified.
-# The "KeySizeConstraint" requires a key of a valid size range if the
-# "AlgorithmName" is of a key algorithm.  The "DecimalInteger" indicates the
-# key size specified in number of bits.  For example, "RSA keySize <= 1024"
-# indicates that any RSA key with key size less than or equal to 1024 bits
-# should be disabled, and "RSA keySize < 1024, RSA keySize > 2048" indicates
-# that any RSA key with key size less than 1024 or greater than 2048 should
-# be disabled. Note that the "KeySizeConstraint" only makes sense to key
-# algorithms.
-#
-# Note: This property is currently used by Oracle's PKIX implementation. It
-# is not guaranteed to be examined and used by other implementations.
-#
-# Example:
-#   jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
-#
-#
-jdk.certpath.disabledAlgorithms=MD2, MD5, RSA keySize < 1024
-
-# Algorithm restrictions for Secure Socket Layer/Transport Layer Security
-# (SSL/TLS) processing
-#
-# In some environments, certain algorithms or key lengths may be undesirable
-# when using SSL/TLS.  This section describes the mechanism for disabling
-# algorithms during SSL/TLS security parameters negotiation, including cipher
-# suites selection, peer authentication and key exchange mechanisms.
-#
-# For PKI-based peer authentication and key exchange mechanisms, this list
-# of disabled algorithms will also be checked during certification path
-# building and validation, including algorithms used in certificates, as
-# well as revocation information such as CRLs and signed OCSP Responses.
-# This is in addition to the jdk.certpath.disabledAlgorithms property above.
-#
-# See the specification of "jdk.certpath.disabledAlgorithms" for the
-# syntax of the disabled algorithm string.
-#
-# Note: This property is currently used by Oracle's JSSE implementation.
-# It is not guaranteed to be examined and used by other implementations.
-#
-# Example:
-#   jdk.tls.disabledAlgorithms=MD5, SHA1, DSA, RSA keySize < 2048
--- a/src/java.base/share/conf/security/java.security-macosx	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,499 +0,0 @@
-#
-# This is the "master security properties file".
-#
-# An alternate java.security properties file may be specified
-# from the command line via the system property
-#
-#    -Djava.security.properties=<URL>
-#
-# This properties file appends to the master security properties file.
-# If both properties files specify values for the same key, the value
-# from the command-line properties file is selected, as it is the last
-# one loaded.
-#
-# Also, if you specify
-#
-#    -Djava.security.properties==<URL> (2 equals),
-#
-# then that properties file completely overrides the master security
-# properties file.
-#
-# To disable the ability to specify an additional properties file from
-# the command line, set the key security.overridePropertiesFile
-# to false in the master security properties file. It is set to true
-# by default.
-
-# In this file, various security properties are set for use by
-# java.security classes. This is where users can statically register
-# Cryptography Package Providers ("providers" for short). The term
-# "provider" refers to a package or set of packages that supply a
-# concrete implementation of a subset of the cryptography aspects of
-# the Java Security API. A provider may, for example, implement one or
-# more digital signature algorithms or message digest algorithms.
-#
-# Each provider must implement a subclass of the Provider class.
-# To register a provider in this master security properties file,
-# specify the Provider subclass name and priority in the format
-#
-#    security.provider.<n>=<className>
-#
-# This declares a provider, and specifies its preference
-# order n. The preference order is the order in which providers are
-# searched for requested algorithms (when no specific provider is
-# requested). The order is 1-based; 1 is the most preferred, followed
-# by 2, and so on.
-#
-# <className> must specify the subclass of the Provider class whose
-# constructor sets the values of various properties that are required
-# for the Java Security API to look up the algorithms or other
-# facilities implemented by the provider.
-#
-# There must be at least one provider specification in java.security.
-# There is a default provider that comes standard with the JDK. It
-# is called the "SUN" provider, and its Provider subclass
-# named Sun appears in the sun.security.provider package. Thus, the
-# "SUN" provider is registered via the following:
-#
-#    security.provider.1=sun.security.provider.Sun
-#
-# (The number 1 is used for the default provider.)
-#
-# Note: Providers can be dynamically registered instead by calls to
-# either the addProvider or insertProviderAt method in the Security
-# class.
-
-#
-# List of providers and their preference orders (see above):
-#
-security.provider.1=sun.security.provider.Sun
-security.provider.2=sun.security.rsa.SunRsaSign
-security.provider.3=sun.security.ec.SunEC
-security.provider.4=com.sun.net.ssl.internal.ssl.Provider
-security.provider.5=com.sun.crypto.provider.SunJCE
-security.provider.6=sun.security.jgss.SunProvider
-security.provider.7=com.sun.security.sasl.Provider
-security.provider.8=org.jcp.xml.dsig.internal.dom.XMLDSigRI
-security.provider.9=sun.security.smartcardio.SunPCSC
-security.provider.10=apple.security.AppleProvider
-
-#
-# Sun Provider SecureRandom seed source.
-#
-# Select the primary source of seed data for the "SHA1PRNG" and
-# "NativePRNG" SecureRandom implementations in the "Sun" provider.
-# (Other SecureRandom implementations might also use this property.)
-#
-# On Unix-like systems (for example, Solaris/Linux/MacOS), the
-# "NativePRNG" and "SHA1PRNG" implementations obtains seed data from
-# special device files such as file:/dev/random.
-#
-# On Windows systems, specifying the URLs "file:/dev/random" or
-# "file:/dev/urandom" will enable the native Microsoft CryptoAPI seeding
-# mechanism for SHA1PRNG.
-#
-# By default, an attempt is made to use the entropy gathering device
-# specified by the "securerandom.source" Security property.  If an
-# exception occurs while accessing the specified URL:
-#
-#     SHA1PRNG:
-#         the traditional system/thread activity algorithm will be used.
-#
-#     NativePRNG:
-#         a default value of /dev/random will be used.  If neither
-#         are available, the implementation will be disabled.
-#         "file" is the only currently supported protocol type.
-#
-# The entropy gathering device can also be specified with the System
-# property "java.security.egd". For example:
-#
-#   % java -Djava.security.egd=file:/dev/random MainClass
-#
-# Specifying this System property will override the
-# "securerandom.source" Security property.
-#
-# In addition, if "file:/dev/random" or "file:/dev/urandom" is
-# specified, the "NativePRNG" implementation will be more preferred than
-# SHA1PRNG in the Sun provider.
-#
-securerandom.source=file:/dev/random
-
-#
-# A list of known strong SecureRandom implementations.
-#
-# To help guide applications in selecting a suitable strong
-# java.security.SecureRandom implementation, Java distributions should
-# indicate a list of known strong implementations using the property.
-#
-# This is a comma-separated list of algorithm and/or algorithm:provider
-# entries.
-#
-securerandom.strongAlgorithms=NativePRNGBlocking:SUN
-
-#
-# Class to instantiate as the javax.security.auth.login.Configuration
-# provider.
-#
-login.configuration.provider=sun.security.provider.ConfigFile
-
-#
-# Default login configuration file
-#
-#login.config.url.1=file:${user.home}/.java.login.config
-
-#
-# Class to instantiate as the system Policy. This is the name of the class
-# that will be used as the Policy object.
-#
-policy.provider=sun.security.provider.PolicyFile
-
-# The default is to have a single system-wide policy file,
-# and a policy file in the user's home directory.
-policy.url.1=file:${java.home}/lib/security/java.policy
-policy.url.2=file:${user.home}/.java.policy
-
-# whether or not we expand properties in the policy file
-# if this is set to false, properties (${...}) will not be expanded in policy
-# files.
-policy.expandProperties=true
-
-# whether or not we allow an extra policy to be passed on the command line
-# with -Djava.security.policy=somefile. Comment out this line to disable
-# this feature.
-policy.allowSystemProperty=true
-
-# whether or not we look into the IdentityScope for trusted Identities
-# when encountering a 1.1 signed JAR file. If the identity is found
-# and is trusted, we grant it AllPermission.
-policy.ignoreIdentityScope=false
-
-#
-# Default keystore type.
-#
-keystore.type=jks
-
-#
-# List of comma-separated packages that start with or equal this string
-# will cause a security exception to be thrown when
-# passed to checkPackageAccess unless the
-# corresponding RuntimePermission ("accessClassInPackage."+package) has
-# been granted.
-package.access=sun.,\
-               com.sun.xml.internal.,\
-               com.sun.imageio.,\
-               com.sun.istack.internal.,\
-               com.sun.jmx.,\
-               com.sun.media.sound.,\
-               com.sun.naming.internal.,\
-               com.sun.proxy.,\
-               com.sun.corba.se.,\
-               com.sun.org.apache.bcel.internal.,\
-               com.sun.org.apache.regexp.internal.,\
-               com.sun.org.apache.xerces.internal.,\
-               com.sun.org.apache.xpath.internal.,\
-               com.sun.org.apache.xalan.internal.extensions.,\
-               com.sun.org.apache.xalan.internal.lib.,\
-               com.sun.org.apache.xalan.internal.res.,\
-               com.sun.org.apache.xalan.internal.templates.,\
-               com.sun.org.apache.xalan.internal.utils.,\
-               com.sun.org.apache.xalan.internal.xslt.,\
-               com.sun.org.apache.xalan.internal.xsltc.cmdline.,\
-               com.sun.org.apache.xalan.internal.xsltc.compiler.,\
-               com.sun.org.apache.xalan.internal.xsltc.trax.,\
-               com.sun.org.apache.xalan.internal.xsltc.util.,\
-               com.sun.org.apache.xml.internal.res.,\
-               com.sun.org.apache.xml.internal.security.,\
-               com.sun.org.apache.xml.internal.serializer.utils.,\
-               com.sun.org.apache.xml.internal.utils.,\
-               com.sun.org.glassfish.,\
-               com.oracle.xmlns.internal.,\
-               com.oracle.webservices.internal.,\
-               org.jcp.xml.dsig.internal.,\
-               jdk.internal.,\
-               jdk.nashorn.internal.,\
-               jdk.nashorn.tools.,\
-               com.sun.activation.registries.,\
-               apple.
-
-#
-# List of comma-separated packages that start with or equal this string
-# will cause a security exception to be thrown when
-# passed to checkPackageDefinition unless the
-# corresponding RuntimePermission ("defineClassInPackage."+package) has
-# been granted.
-#
-# by default, none of the class loaders supplied with the JDK call
-# checkPackageDefinition.
-#
-package.definition=sun.,\
-                   com.sun.xml.internal.,\
-                   com.sun.imageio.,\
-                   com.sun.istack.internal.,\
-                   com.sun.jmx.,\
-                   com.sun.media.sound.,\
-                   com.sun.naming.internal.,\
-                   com.sun.proxy.,\
-                   com.sun.corba.se.,\
-                   com.sun.org.apache.bcel.internal.,\
-                   com.sun.org.apache.regexp.internal.,\
-                   com.sun.org.apache.xerces.internal.,\
-                   com.sun.org.apache.xpath.internal.,\
-                   com.sun.org.apache.xalan.internal.extensions.,\
-                   com.sun.org.apache.xalan.internal.lib.,\
-                   com.sun.org.apache.xalan.internal.res.,\
-                   com.sun.org.apache.xalan.internal.templates.,\
-                   com.sun.org.apache.xalan.internal.utils.,\
-                   com.sun.org.apache.xalan.internal.xslt.,\
-                   com.sun.org.apache.xalan.internal.xsltc.cmdline.,\
-                   com.sun.org.apache.xalan.internal.xsltc.compiler.,\
-                   com.sun.org.apache.xalan.internal.xsltc.trax.,\
-                   com.sun.org.apache.xalan.internal.xsltc.util.,\
-                   com.sun.org.apache.xml.internal.res.,\
-                   com.sun.org.apache.xml.internal.security.,\
-                   com.sun.org.apache.xml.internal.serializer.utils.,\
-                   com.sun.org.apache.xml.internal.utils.,\
-                   com.sun.org.glassfish.,\
-                   com.oracle.xmlns.internal.,\
-                   com.oracle.webservices.internal.,\
-                   org.jcp.xml.dsig.internal.,\
-                   jdk.internal.,\
-                   jdk.nashorn.internal.,\
-                   jdk.nashorn.tools.,\
-                   com.sun.activation.registries.,\
-                   apple.
-
-#
-# Determines whether this properties file can be appended to
-# or overridden on the command line via -Djava.security.properties
-#
-security.overridePropertiesFile=true
-
-#
-# Determines the default key and trust manager factory algorithms for
-# the javax.net.ssl package.
-#
-ssl.KeyManagerFactory.algorithm=SunX509
-ssl.TrustManagerFactory.algorithm=PKIX
-
-#
-# The Java-level namelookup cache policy for successful lookups:
-#
-# any negative value: caching forever
-# any positive value: the number of seconds to cache an address for
-# zero: do not cache
-#
-# default value is forever (FOREVER). For security reasons, this
-# caching is made forever when a security manager is set. When a security
-# manager is not set, the default behavior in this implementation
-# is to cache for 30 seconds.
-#
-# NOTE: setting this to anything other than the default value can have
-#       serious security implications. Do not set it unless
-#       you are sure you are not exposed to DNS spoofing attack.
-#
-#networkaddress.cache.ttl=-1
-
-# The Java-level namelookup cache policy for failed lookups:
-#
-# any negative value: cache forever
-# any positive value: the number of seconds to cache negative lookup results
-# zero: do not cache
-#
-# In some Microsoft Windows networking environments that employ
-# the WINS name service in addition to DNS, name service lookups
-# that fail may take a noticeably long time to return (approx. 5 seconds).
-# For this reason the default caching policy is to maintain these
-# results for 10 seconds.
-#
-#
-networkaddress.cache.negative.ttl=10
-
-#
-# Properties to configure OCSP for certificate revocation checking
-#
-
-# Enable OCSP
-#
-# By default, OCSP is not used for certificate revocation checking.
-# This property enables the use of OCSP when set to the value "true".
-#
-# NOTE: SocketPermission is required to connect to an OCSP responder.
-#
-# Example,
-#   ocsp.enable=true
-
-#
-# Location of the OCSP responder
-#
-# By default, the location of the OCSP responder is determined implicitly
-# from the certificate being validated. This property explicitly specifies
-# the location of the OCSP responder. The property is used when the
-# Authority Information Access extension (defined in RFC 3280) is absent
-# from the certificate or when it requires overriding.
-#
-# Example,
-#   ocsp.responderURL=http://ocsp.example.net:80
-
-#
-# Subject name of the OCSP responder's certificate
-#
-# By default, the certificate of the OCSP responder is that of the issuer
-# of the certificate being validated. This property identifies the certificate
-# of the OCSP responder when the default does not apply. Its value is a string
-# distinguished name (defined in RFC 2253) which identifies a certificate in
-# the set of certificates supplied during cert path validation. In cases where
-# the subject name alone is not sufficient to uniquely identify the certificate
-# then both the "ocsp.responderCertIssuerName" and
-# "ocsp.responderCertSerialNumber" properties must be used instead. When this
-# property is set then those two properties are ignored.
-#
-# Example,
-#   ocsp.responderCertSubjectName="CN=OCSP Responder, O=XYZ Corp"
-
-#
-# Issuer name of the OCSP responder's certificate
-#
-# By default, the certificate of the OCSP responder is that of the issuer
-# of the certificate being validated. This property identifies the certificate
-# of the OCSP responder when the default does not apply. Its value is a string
-# distinguished name (defined in RFC 2253) which identifies a certificate in
-# the set of certificates supplied during cert path validation. When this
-# property is set then the "ocsp.responderCertSerialNumber" property must also
-# be set. When the "ocsp.responderCertSubjectName" property is set then this
-# property is ignored.
-#
-# Example,
-#   ocsp.responderCertIssuerName="CN=Enterprise CA, O=XYZ Corp"
-
-#
-# Serial number of the OCSP responder's certificate
-#
-# By default, the certificate of the OCSP responder is that of the issuer
-# of the certificate being validated. This property identifies the certificate
-# of the OCSP responder when the default does not apply. Its value is a string
-# of hexadecimal digits (colon or space separators may be present) which
-# identifies a certificate in the set of certificates supplied during cert path
-# validation. When this property is set then the "ocsp.responderCertIssuerName"
-# property must also be set. When the "ocsp.responderCertSubjectName" property
-# is set then this property is ignored.
-#
-# Example,
-#   ocsp.responderCertSerialNumber=2A:FF:00
-
-#
-# Policy for failed Kerberos KDC lookups:
-#
-# When a KDC is unavailable (network error, service failure, etc), it is
-# put inside a blacklist and accessed less often for future requests. The
-# value (case-insensitive) for this policy can be:
-#
-# tryLast
-#    KDCs in the blacklist are always tried after those not on the list.
-#
-# tryLess[:max_retries,timeout]
-#    KDCs in the blacklist are still tried by their order in the configuration,
-#    but with smaller max_retries and timeout values. max_retries and timeout
-#    are optional numerical parameters (default 1 and 5000, which means once
-#    and 5 seconds). Please notes that if any of the values defined here is
-#    more than what is defined in krb5.conf, it will be ignored.
-#
-# Whenever a KDC is detected as available, it is removed from the blacklist.
-# The blacklist is reset when krb5.conf is reloaded. You can add
-# refreshKrb5Config=true to a JAAS configuration file so that krb5.conf is
-# reloaded whenever a JAAS authentication is attempted.
-#
-# Example,
-#   krb5.kdc.bad.policy = tryLast
-#   krb5.kdc.bad.policy = tryLess:2,2000
-krb5.kdc.bad.policy = tryLast
-
-# Algorithm restrictions for certification path (CertPath) processing
-#
-# In some environments, certain algorithms or key lengths may be undesirable
-# for certification path building and validation.  For example, "MD2" is
-# generally no longer considered to be a secure hash algorithm.  This section
-# describes the mechanism for disabling algorithms based on algorithm name
-# and/or key length.  This includes algorithms used in certificates, as well
-# as revocation information such as CRLs and signed OCSP Responses.
-#
-# The syntax of the disabled algorithm string is described as this Java
-# BNF-style:
-#   DisabledAlgorithms:
-#       " DisabledAlgorithm { , DisabledAlgorithm } "
-#
-#   DisabledAlgorithm:
-#       AlgorithmName [Constraint]
-#
-#   AlgorithmName:
-#       (see below)
-#
-#   Constraint:
-#       KeySizeConstraint
-#
-#   KeySizeConstraint:
-#       keySize Operator DecimalInteger
-#
-#   Operator:
-#       <= | < | == | != | >= | >
-#
-#   DecimalInteger:
-#       DecimalDigits
-#
-#   DecimalDigits:
-#       DecimalDigit {DecimalDigit}
-#
-#   DecimalDigit: one of
-#       1 2 3 4 5 6 7 8 9 0
-#
-# The "AlgorithmName" is the standard algorithm name of the disabled
-# algorithm. See "Java Cryptography Architecture Standard Algorithm Name
-# Documentation" for information about Standard Algorithm Names.  Matching
-# is performed using a case-insensitive sub-element matching rule.  (For
-# example, in "SHA1withECDSA" the sub-elements are "SHA1" for hashing and
-# "ECDSA" for signatures.)  If the assertion "AlgorithmName" is a
-# sub-element of the certificate algorithm name, the algorithm will be
-# rejected during certification path building and validation.  For example,
-# the assertion algorithm name "DSA" will disable all certificate algorithms
-# that rely on DSA, such as NONEwithDSA, SHA1withDSA.  However, the assertion
-# will not disable algorithms related to "ECDSA".
-#
-# A "Constraint" provides further guidance for the algorithm being specified.
-# The "KeySizeConstraint" requires a key of a valid size range if the
-# "AlgorithmName" is of a key algorithm.  The "DecimalInteger" indicates the
-# key size specified in number of bits.  For example, "RSA keySize <= 1024"
-# indicates that any RSA key with key size less than or equal to 1024 bits
-# should be disabled, and "RSA keySize < 1024, RSA keySize > 2048" indicates
-# that any RSA key with key size less than 1024 or greater than 2048 should
-# be disabled. Note that the "KeySizeConstraint" only makes sense to key
-# algorithms.
-#
-# Note: This property is currently used by Oracle's PKIX implementation. It
-# is not guaranteed to be examined and used by other implementations.
-#
-# Example:
-#   jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
-#
-#
-jdk.certpath.disabledAlgorithms=MD2, MD5, RSA keySize < 1024
-
-# Algorithm restrictions for Secure Socket Layer/Transport Layer Security
-# (SSL/TLS) processing
-#
-# In some environments, certain algorithms or key lengths may be undesirable
-# when using SSL/TLS.  This section describes the mechanism for disabling
-# algorithms during SSL/TLS security parameters negotiation, including cipher
-# suites selection, peer authentication and key exchange mechanisms.
-#
-# For PKI-based peer authentication and key exchange mechanisms, this list
-# of disabled algorithms will also be checked during certification path
-# building and validation, including algorithms used in certificates, as
-# well as revocation information such as CRLs and signed OCSP Responses.
-# This is in addition to the jdk.certpath.disabledAlgorithms property above.
-#
-# See the specification of "jdk.certpath.disabledAlgorithms" for the
-# syntax of the disabled algorithm string.
-#
-# Note: This property is currently used by Oracle's JSSE implementation.
-# It is not guaranteed to be examined and used by other implementations.
-#
-# Example:
-#   jdk.tls.disabledAlgorithms=MD5, SHA1, DSA, RSA keySize < 2048
--- a/src/java.base/share/conf/security/java.security-solaris	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,498 +0,0 @@
-#
-# This is the "master security properties file".
-#
-# An alternate java.security properties file may be specified
-# from the command line via the system property
-#
-#    -Djava.security.properties=<URL>
-#
-# This properties file appends to the master security properties file.
-# If both properties files specify values for the same key, the value
-# from the command-line properties file is selected, as it is the last
-# one loaded.
-#
-# Also, if you specify
-#
-#    -Djava.security.properties==<URL> (2 equals),
-#
-# then that properties file completely overrides the master security
-# properties file.
-#
-# To disable the ability to specify an additional properties file from
-# the command line, set the key security.overridePropertiesFile
-# to false in the master security properties file. It is set to true
-# by default.
-
-# In this file, various security properties are set for use by
-# java.security classes. This is where users can statically register
-# Cryptography Package Providers ("providers" for short). The term
-# "provider" refers to a package or set of packages that supply a
-# concrete implementation of a subset of the cryptography aspects of
-# the Java Security API. A provider may, for example, implement one or
-# more digital signature algorithms or message digest algorithms.
-#
-# Each provider must implement a subclass of the Provider class.
-# To register a provider in this master security properties file,
-# specify the Provider subclass name and priority in the format
-#
-#    security.provider.<n>=<className>
-#
-# This declares a provider, and specifies its preference
-# order n. The preference order is the order in which providers are
-# searched for requested algorithms (when no specific provider is
-# requested). The order is 1-based; 1 is the most preferred, followed
-# by 2, and so on.
-#
-# <className> must specify the subclass of the Provider class whose
-# constructor sets the values of various properties that are required
-# for the Java Security API to look up the algorithms or other
-# facilities implemented by the provider.
-#
-# There must be at least one provider specification in java.security.
-# There is a default provider that comes standard with the JDK. It
-# is called the "SUN" provider, and its Provider subclass
-# named Sun appears in the sun.security.provider package. Thus, the
-# "SUN" provider is registered via the following:
-#
-#    security.provider.1=sun.security.provider.Sun
-#
-# (The number 1 is used for the default provider.)
-#
-# Note: Providers can be dynamically registered instead by calls to
-# either the addProvider or insertProviderAt method in the Security
-# class.
-
-#
-# List of providers and their preference orders (see above):
-#
-security.provider.1=com.oracle.security.ucrypto.UcryptoProvider ${java.home}/lib/security/ucrypto-solaris.cfg
-security.provider.2=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/sunpkcs11-solaris.cfg
-security.provider.3=sun.security.provider.Sun
-security.provider.4=sun.security.rsa.SunRsaSign
-security.provider.5=sun.security.ec.SunEC
-security.provider.6=com.sun.net.ssl.internal.ssl.Provider
-security.provider.7=com.sun.crypto.provider.SunJCE
-security.provider.8=sun.security.jgss.SunProvider
-security.provider.9=com.sun.security.sasl.Provider
-security.provider.10=org.jcp.xml.dsig.internal.dom.XMLDSigRI
-security.provider.11=sun.security.smartcardio.SunPCSC
-
-#
-# Sun Provider SecureRandom seed source.
-#
-# Select the primary source of seed data for the "SHA1PRNG" and
-# "NativePRNG" SecureRandom implementations in the "Sun" provider.
-# (Other SecureRandom implementations might also use this property.)
-#
-# On Unix-like systems (for example, Solaris/Linux/MacOS), the
-# "NativePRNG" and "SHA1PRNG" implementations obtains seed data from
-# special device files such as file:/dev/random.
-#
-# On Windows systems, specifying the URLs "file:/dev/random" or
-# "file:/dev/urandom" will enable the native Microsoft CryptoAPI seeding
-# mechanism for SHA1PRNG.
-#
-# By default, an attempt is made to use the entropy gathering device
-# specified by the "securerandom.source" Security property.  If an
-# exception occurs while accessing the specified URL:
-#
-#     SHA1PRNG:
-#         the traditional system/thread activity algorithm will be used.
-#
-#     NativePRNG:
-#         a default value of /dev/random will be used.  If neither
-#         are available, the implementation will be disabled.
-#         "file" is the only currently supported protocol type.
-#
-# The entropy gathering device can also be specified with the System
-# property "java.security.egd". For example:
-#
-#   % java -Djava.security.egd=file:/dev/random MainClass
-#
-# Specifying this System property will override the
-# "securerandom.source" Security property.
-#
-# In addition, if "file:/dev/random" or "file:/dev/urandom" is
-# specified, the "NativePRNG" implementation will be more preferred than
-# SHA1PRNG in the Sun provider.
-#
-securerandom.source=file:/dev/random
-
-#
-# A list of known strong SecureRandom implementations.
-#
-# To help guide applications in selecting a suitable strong
-# java.security.SecureRandom implementation, Java distributions should
-# indicate a list of known strong implementations using the property.
-#
-# This is a comma-separated list of algorithm and/or algorithm:provider
-# entries.
-#
-securerandom.strongAlgorithms=NativePRNGBlocking:SUN
-
-#
-# Class to instantiate as the javax.security.auth.login.Configuration
-# provider.
-#
-login.configuration.provider=sun.security.provider.ConfigFile
-
-#
-# Default login configuration file
-#
-#login.config.url.1=file:${user.home}/.java.login.config
-
-#
-# Class to instantiate as the system Policy. This is the name of the class
-# that will be used as the Policy object.
-#
-policy.provider=sun.security.provider.PolicyFile
-
-# The default is to have a single system-wide policy file,
-# and a policy file in the user's home directory.
-policy.url.1=file:${java.home}/lib/security/java.policy
-policy.url.2=file:${user.home}/.java.policy
-
-# whether or not we expand properties in the policy file
-# if this is set to false, properties (${...}) will not be expanded in policy
-# files.
-policy.expandProperties=true
-
-# whether or not we allow an extra policy to be passed on the command line
-# with -Djava.security.policy=somefile. Comment out this line to disable
-# this feature.
-policy.allowSystemProperty=true
-
-# whether or not we look into the IdentityScope for trusted Identities
-# when encountering a 1.1 signed JAR file. If the identity is found
-# and is trusted, we grant it AllPermission.
-policy.ignoreIdentityScope=false
-
-#
-# Default keystore type.
-#
-keystore.type=jks
-
-#
-# List of comma-separated packages that start with or equal this string
-# will cause a security exception to be thrown when
-# passed to checkPackageAccess unless the
-# corresponding RuntimePermission ("accessClassInPackage."+package) has
-# been granted.
-package.access=sun.,\
-               com.sun.xml.internal.,\
-               com.sun.imageio.,\
-               com.sun.istack.internal.,\
-               com.sun.jmx.,\
-               com.sun.media.sound.,\
-               com.sun.naming.internal.,\
-               com.sun.proxy.,\
-               com.sun.corba.se.,\
-               com.sun.org.apache.bcel.internal.,\
-               com.sun.org.apache.regexp.internal.,\
-               com.sun.org.apache.xerces.internal.,\
-               com.sun.org.apache.xpath.internal.,\
-               com.sun.org.apache.xalan.internal.extensions.,\
-               com.sun.org.apache.xalan.internal.lib.,\
-               com.sun.org.apache.xalan.internal.res.,\
-               com.sun.org.apache.xalan.internal.templates.,\
-               com.sun.org.apache.xalan.internal.utils.,\
-               com.sun.org.apache.xalan.internal.xslt.,\
-               com.sun.org.apache.xalan.internal.xsltc.cmdline.,\
-               com.sun.org.apache.xalan.internal.xsltc.compiler.,\
-               com.sun.org.apache.xalan.internal.xsltc.trax.,\
-               com.sun.org.apache.xalan.internal.xsltc.util.,\
-               com.sun.org.apache.xml.internal.res.,\
-               com.sun.org.apache.xml.internal.security.,\
-               com.sun.org.apache.xml.internal.serializer.utils.,\
-               com.sun.org.apache.xml.internal.utils.,\
-               com.sun.org.glassfish.,\
-               com.oracle.xmlns.internal.,\
-               com.oracle.webservices.internal.,\
-               org.jcp.xml.dsig.internal.,\
-               jdk.internal.,\
-               jdk.nashorn.internal.,\
-               jdk.nashorn.tools.,\
-               com.sun.activation.registries.
-
-#
-# List of comma-separated packages that start with or equal this string
-# will cause a security exception to be thrown when
-# passed to checkPackageDefinition unless the
-# corresponding RuntimePermission ("defineClassInPackage."+package) has
-# been granted.
-#
-# by default, none of the class loaders supplied with the JDK call
-# checkPackageDefinition.
-#
-package.definition=sun.,\
-                   com.sun.xml.internal.,\
-                   com.sun.imageio.,\
-                   com.sun.istack.internal.,\
-                   com.sun.jmx.,\
-                   com.sun.media.sound.,\
-                   com.sun.naming.internal.,\
-                   com.sun.proxy.,\
-                   com.sun.corba.se.,\
-                   com.sun.org.apache.bcel.internal.,\
-                   com.sun.org.apache.regexp.internal.,\
-                   com.sun.org.apache.xerces.internal.,\
-                   com.sun.org.apache.xpath.internal.,\
-                   com.sun.org.apache.xalan.internal.extensions.,\
-                   com.sun.org.apache.xalan.internal.lib.,\
-                   com.sun.org.apache.xalan.internal.res.,\
-                   com.sun.org.apache.xalan.internal.templates.,\
-                   com.sun.org.apache.xalan.internal.utils.,\
-                   com.sun.org.apache.xalan.internal.xslt.,\
-                   com.sun.org.apache.xalan.internal.xsltc.cmdline.,\
-                   com.sun.org.apache.xalan.internal.xsltc.compiler.,\
-                   com.sun.org.apache.xalan.internal.xsltc.trax.,\
-                   com.sun.org.apache.xalan.internal.xsltc.util.,\
-                   com.sun.org.apache.xml.internal.res.,\
-                   com.sun.org.apache.xml.internal.security.,\
-                   com.sun.org.apache.xml.internal.serializer.utils.,\
-                   com.sun.org.apache.xml.internal.utils.,\
-                   com.sun.org.glassfish.,\
-                   com.oracle.xmlns.internal.,\
-                   com.oracle.webservices.internal.,\
-                   org.jcp.xml.dsig.internal.,\
-                   jdk.internal.,\
-                   jdk.nashorn.internal.,\
-                   jdk.nashorn.tools.,\
-                   com.sun.activation.registries.
-
-#
-# Determines whether this properties file can be appended to
-# or overridden on the command line via -Djava.security.properties
-#
-security.overridePropertiesFile=true
-
-#
-# Determines the default key and trust manager factory algorithms for
-# the javax.net.ssl package.
-#
-ssl.KeyManagerFactory.algorithm=SunX509
-ssl.TrustManagerFactory.algorithm=PKIX
-
-#
-# The Java-level namelookup cache policy for successful lookups:
-#
-# any negative value: caching forever
-# any positive value: the number of seconds to cache an address for
-# zero: do not cache
-#
-# default value is forever (FOREVER). For security reasons, this
-# caching is made forever when a security manager is set. When a security
-# manager is not set, the default behavior in this implementation
-# is to cache for 30 seconds.
-#
-# NOTE: setting this to anything other than the default value can have
-#       serious security implications. Do not set it unless
-#       you are sure you are not exposed to DNS spoofing attack.
-#
-#networkaddress.cache.ttl=-1
-
-# The Java-level namelookup cache policy for failed lookups:
-#
-# any negative value: cache forever
-# any positive value: the number of seconds to cache negative lookup results
-# zero: do not cache
-#
-# In some Microsoft Windows networking environments that employ
-# the WINS name service in addition to DNS, name service lookups
-# that fail may take a noticeably long time to return (approx. 5 seconds).
-# For this reason the default caching policy is to maintain these
-# results for 10 seconds.
-#
-#
-networkaddress.cache.negative.ttl=10
-
-#
-# Properties to configure OCSP for certificate revocation checking
-#
-
-# Enable OCSP
-#
-# By default, OCSP is not used for certificate revocation checking.
-# This property enables the use of OCSP when set to the value "true".
-#
-# NOTE: SocketPermission is required to connect to an OCSP responder.
-#
-# Example,
-#   ocsp.enable=true
-
-#
-# Location of the OCSP responder
-#
-# By default, the location of the OCSP responder is determined implicitly
-# from the certificate being validated. This property explicitly specifies
-# the location of the OCSP responder. The property is used when the
-# Authority Information Access extension (defined in RFC 3280) is absent
-# from the certificate or when it requires overriding.
-#
-# Example,
-#   ocsp.responderURL=http://ocsp.example.net:80
-
-#
-# Subject name of the OCSP responder's certificate
-#
-# By default, the certificate of the OCSP responder is that of the issuer
-# of the certificate being validated. This property identifies the certificate
-# of the OCSP responder when the default does not apply. Its value is a string
-# distinguished name (defined in RFC 2253) which identifies a certificate in
-# the set of certificates supplied during cert path validation. In cases where
-# the subject name alone is not sufficient to uniquely identify the certificate
-# then both the "ocsp.responderCertIssuerName" and
-# "ocsp.responderCertSerialNumber" properties must be used instead. When this
-# property is set then those two properties are ignored.
-#
-# Example,
-#   ocsp.responderCertSubjectName="CN=OCSP Responder, O=XYZ Corp"
-
-#
-# Issuer name of the OCSP responder's certificate
-#
-# By default, the certificate of the OCSP responder is that of the issuer
-# of the certificate being validated. This property identifies the certificate
-# of the OCSP responder when the default does not apply. Its value is a string
-# distinguished name (defined in RFC 2253) which identifies a certificate in
-# the set of certificates supplied during cert path validation. When this
-# property is set then the "ocsp.responderCertSerialNumber" property must also
-# be set. When the "ocsp.responderCertSubjectName" property is set then this
-# property is ignored.
-#
-# Example,
-#   ocsp.responderCertIssuerName="CN=Enterprise CA, O=XYZ Corp"
-
-#
-# Serial number of the OCSP responder's certificate
-#
-# By default, the certificate of the OCSP responder is that of the issuer
-# of the certificate being validated. This property identifies the certificate
-# of the OCSP responder when the default does not apply. Its value is a string
-# of hexadecimal digits (colon or space separators may be present) which
-# identifies a certificate in the set of certificates supplied during cert path
-# validation. When this property is set then the "ocsp.responderCertIssuerName"
-# property must also be set. When the "ocsp.responderCertSubjectName" property
-# is set then this property is ignored.
-#
-# Example,
-#   ocsp.responderCertSerialNumber=2A:FF:00
-
-#
-# Policy for failed Kerberos KDC lookups:
-#
-# When a KDC is unavailable (network error, service failure, etc), it is
-# put inside a blacklist and accessed less often for future requests. The
-# value (case-insensitive) for this policy can be:
-#
-# tryLast
-#    KDCs in the blacklist are always tried after those not on the list.
-#
-# tryLess[:max_retries,timeout]
-#    KDCs in the blacklist are still tried by their order in the configuration,
-#    but with smaller max_retries and timeout values. max_retries and timeout
-#    are optional numerical parameters (default 1 and 5000, which means once
-#    and 5 seconds). Please notes that if any of the values defined here is
-#    more than what is defined in krb5.conf, it will be ignored.
-#
-# Whenever a KDC is detected as available, it is removed from the blacklist.
-# The blacklist is reset when krb5.conf is reloaded. You can add
-# refreshKrb5Config=true to a JAAS configuration file so that krb5.conf is
-# reloaded whenever a JAAS authentication is attempted.
-#
-# Example,
-#   krb5.kdc.bad.policy = tryLast
-#   krb5.kdc.bad.policy = tryLess:2,2000
-krb5.kdc.bad.policy = tryLast
-
-# Algorithm restrictions for certification path (CertPath) processing
-#
-# In some environments, certain algorithms or key lengths may be undesirable
-# for certification path building and validation.  For example, "MD2" is
-# generally no longer considered to be a secure hash algorithm.  This section
-# describes the mechanism for disabling algorithms based on algorithm name
-# and/or key length.  This includes algorithms used in certificates, as well
-# as revocation information such as CRLs and signed OCSP Responses.
-#
-# The syntax of the disabled algorithm string is described as this Java
-# BNF-style:
-#   DisabledAlgorithms:
-#       " DisabledAlgorithm { , DisabledAlgorithm } "
-#
-#   DisabledAlgorithm:
-#       AlgorithmName [Constraint]
-#
-#   AlgorithmName:
-#       (see below)
-#
-#   Constraint:
-#       KeySizeConstraint
-#
-#   KeySizeConstraint:
-#       keySize Operator DecimalInteger
-#
-#   Operator:
-#       <= | < | == | != | >= | >
-#
-#   DecimalInteger:
-#       DecimalDigits
-#
-#   DecimalDigits:
-#       DecimalDigit {DecimalDigit}
-#
-#   DecimalDigit: one of
-#       1 2 3 4 5 6 7 8 9 0
-#
-# The "AlgorithmName" is the standard algorithm name of the disabled
-# algorithm. See "Java Cryptography Architecture Standard Algorithm Name
-# Documentation" for information about Standard Algorithm Names.  Matching
-# is performed using a case-insensitive sub-element matching rule.  (For
-# example, in "SHA1withECDSA" the sub-elements are "SHA1" for hashing and
-# "ECDSA" for signatures.)  If the assertion "AlgorithmName" is a
-# sub-element of the certificate algorithm name, the algorithm will be
-# rejected during certification path building and validation.  For example,
-# the assertion algorithm name "DSA" will disable all certificate algorithms
-# that rely on DSA, such as NONEwithDSA, SHA1withDSA.  However, the assertion
-# will not disable algorithms related to "ECDSA".
-#
-# A "Constraint" provides further guidance for the algorithm being specified.
-# The "KeySizeConstraint" requires a key of a valid size range if the
-# "AlgorithmName" is of a key algorithm.  The "DecimalInteger" indicates the
-# key size specified in number of bits.  For example, "RSA keySize <= 1024"
-# indicates that any RSA key with key size less than or equal to 1024 bits
-# should be disabled, and "RSA keySize < 1024, RSA keySize > 2048" indicates
-# that any RSA key with key size less than 1024 or greater than 2048 should
-# be disabled. Note that the "KeySizeConstraint" only makes sense to key
-# algorithms.
-#
-# Note: This property is currently used by Oracle's PKIX implementation. It
-# is not guaranteed to be examined and used by other implementations.
-#
-# Example:
-#   jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
-#
-#
-jdk.certpath.disabledAlgorithms=MD2, MD5, RSA keySize < 1024
-
-# Algorithm restrictions for Secure Socket Layer/Transport Layer Security
-# (SSL/TLS) processing
-#
-# In some environments, certain algorithms or key lengths may be undesirable
-# when using SSL/TLS.  This section describes the mechanism for disabling
-# algorithms during SSL/TLS security parameters negotiation, including cipher
-# suites selection, peer authentication and key exchange mechanisms.
-#
-# For PKI-based peer authentication and key exchange mechanisms, this list
-# of disabled algorithms will also be checked during certification path
-# building and validation, including algorithms used in certificates, as
-# well as revocation information such as CRLs and signed OCSP Responses.
-# This is in addition to the jdk.certpath.disabledAlgorithms property above.
-#
-# See the specification of "jdk.certpath.disabledAlgorithms" for the
-# syntax of the disabled algorithm string.
-#
-# Note: This property is currently used by Oracle's JSSE implementation.
-# It is not guaranteed to be examined and used by other implementations.
-#
-# Example:
-#   jdk.tls.disabledAlgorithms=MD5, SHA1, DSA, RSA keySize < 2048
--- a/src/java.base/share/conf/security/java.security-windows	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,499 +0,0 @@
-#
-# This is the "master security properties file".
-#
-# An alternate java.security properties file may be specified
-# from the command line via the system property
-#
-#    -Djava.security.properties=<URL>
-#
-# This properties file appends to the master security properties file.
-# If both properties files specify values for the same key, the value
-# from the command-line properties file is selected, as it is the last
-# one loaded.
-#
-# Also, if you specify
-#
-#    -Djava.security.properties==<URL> (2 equals),
-#
-# then that properties file completely overrides the master security
-# properties file.
-#
-# To disable the ability to specify an additional properties file from
-# the command line, set the key security.overridePropertiesFile
-# to false in the master security properties file. It is set to true
-# by default.
-
-# In this file, various security properties are set for use by
-# java.security classes. This is where users can statically register
-# Cryptography Package Providers ("providers" for short). The term
-# "provider" refers to a package or set of packages that supply a
-# concrete implementation of a subset of the cryptography aspects of
-# the Java Security API. A provider may, for example, implement one or
-# more digital signature algorithms or message digest algorithms.
-#
-# Each provider must implement a subclass of the Provider class.
-# To register a provider in this master security properties file,
-# specify the Provider subclass name and priority in the format
-#
-#    security.provider.<n>=<className>
-#
-# This declares a provider, and specifies its preference
-# order n. The preference order is the order in which providers are
-# searched for requested algorithms (when no specific provider is
-# requested). The order is 1-based; 1 is the most preferred, followed
-# by 2, and so on.
-#
-# <className> must specify the subclass of the Provider class whose
-# constructor sets the values of various properties that are required
-# for the Java Security API to look up the algorithms or other
-# facilities implemented by the provider.
-#
-# There must be at least one provider specification in java.security.
-# There is a default provider that comes standard with the JDK. It
-# is called the "SUN" provider, and its Provider subclass
-# named Sun appears in the sun.security.provider package. Thus, the
-# "SUN" provider is registered via the following:
-#
-#    security.provider.1=sun.security.provider.Sun
-#
-# (The number 1 is used for the default provider.)
-#
-# Note: Providers can be dynamically registered instead by calls to
-# either the addProvider or insertProviderAt method in the Security
-# class.
-
-#
-# List of providers and their preference orders (see above):
-#
-security.provider.1=sun.security.provider.Sun
-security.provider.2=sun.security.rsa.SunRsaSign
-security.provider.3=sun.security.ec.SunEC
-security.provider.4=com.sun.net.ssl.internal.ssl.Provider
-security.provider.5=com.sun.crypto.provider.SunJCE
-security.provider.6=sun.security.jgss.SunProvider
-security.provider.7=com.sun.security.sasl.Provider
-security.provider.8=org.jcp.xml.dsig.internal.dom.XMLDSigRI
-security.provider.9=sun.security.smartcardio.SunPCSC
-security.provider.10=sun.security.mscapi.SunMSCAPI
-
-#
-# Sun Provider SecureRandom seed source.
-#
-# Select the primary source of seed data for the "SHA1PRNG" and
-# "NativePRNG" SecureRandom implementations in the "Sun" provider.
-# (Other SecureRandom implementations might also use this property.)
-#
-# On Unix-like systems (for example, Solaris/Linux/MacOS), the
-# "NativePRNG" and "SHA1PRNG" implementations obtains seed data from
-# special device files such as file:/dev/random.
-#
-# On Windows systems, specifying the URLs "file:/dev/random" or
-# "file:/dev/urandom" will enable the native Microsoft CryptoAPI seeding
-# mechanism for SHA1PRNG.
-#
-# By default, an attempt is made to use the entropy gathering device
-# specified by the "securerandom.source" Security property.  If an
-# exception occurs while accessing the specified URL:
-#
-#     SHA1PRNG:
-#         the traditional system/thread activity algorithm will be used.
-#
-#     NativePRNG:
-#         a default value of /dev/random will be used.  If neither
-#         are available, the implementation will be disabled.
-#         "file" is the only currently supported protocol type.
-#
-# The entropy gathering device can also be specified with the System
-# property "java.security.egd". For example:
-#
-#   % java -Djava.security.egd=file:/dev/random MainClass
-#
-# Specifying this System property will override the
-# "securerandom.source" Security property.
-#
-# In addition, if "file:/dev/random" or "file:/dev/urandom" is
-# specified, the "NativePRNG" implementation will be more preferred than
-# SHA1PRNG in the Sun provider.
-#
-securerandom.source=file:/dev/random
-
-#
-# A list of known strong SecureRandom implementations.
-#
-# To help guide applications in selecting a suitable strong
-# java.security.SecureRandom implementation, Java distributions should
-# indicate a list of known strong implementations using the property.
-#
-# This is a comma-separated list of algorithm and/or algorithm:provider
-# entries.
-#
-securerandom.strongAlgorithms=Windows-PRNG:SunMSCAPI,SHA1PRNG:SUN
-
-#
-# Class to instantiate as the javax.security.auth.login.Configuration
-# provider.
-#
-login.configuration.provider=sun.security.provider.ConfigFile
-
-#
-# Default login configuration file
-#
-#login.config.url.1=file:${user.home}/.java.login.config
-
-#
-# Class to instantiate as the system Policy. This is the name of the class
-# that will be used as the Policy object.
-#
-policy.provider=sun.security.provider.PolicyFile
-
-# The default is to have a single system-wide policy file,
-# and a policy file in the user's home directory.
-policy.url.1=file:${java.home}/lib/security/java.policy
-policy.url.2=file:${user.home}/.java.policy
-
-# whether or not we expand properties in the policy file
-# if this is set to false, properties (${...}) will not be expanded in policy
-# files.
-policy.expandProperties=true
-
-# whether or not we allow an extra policy to be passed on the command line
-# with -Djava.security.policy=somefile. Comment out this line to disable
-# this feature.
-policy.allowSystemProperty=true
-
-# whether or not we look into the IdentityScope for trusted Identities
-# when encountering a 1.1 signed JAR file. If the identity is found
-# and is trusted, we grant it AllPermission.
-policy.ignoreIdentityScope=false
-
-#
-# Default keystore type.
-#
-keystore.type=jks
-
-#
-# List of comma-separated packages that start with or equal this string
-# will cause a security exception to be thrown when
-# passed to checkPackageAccess unless the
-# corresponding RuntimePermission ("accessClassInPackage."+package) has
-# been granted.
-package.access=sun.,\
-               com.sun.xml.internal.,\
-               com.sun.imageio.,\
-               com.sun.istack.internal.,\
-               com.sun.jmx.,\
-               com.sun.media.sound.,\
-               com.sun.naming.internal.,\
-               com.sun.proxy.,\
-               com.sun.corba.se.,\
-               com.sun.org.apache.bcel.internal.,\
-               com.sun.org.apache.regexp.internal.,\
-               com.sun.org.apache.xerces.internal.,\
-               com.sun.org.apache.xpath.internal.,\
-               com.sun.org.apache.xalan.internal.extensions.,\
-               com.sun.org.apache.xalan.internal.lib.,\
-               com.sun.org.apache.xalan.internal.res.,\
-               com.sun.org.apache.xalan.internal.templates.,\
-               com.sun.org.apache.xalan.internal.utils.,\
-               com.sun.org.apache.xalan.internal.xslt.,\
-               com.sun.org.apache.xalan.internal.xsltc.cmdline.,\
-               com.sun.org.apache.xalan.internal.xsltc.compiler.,\
-               com.sun.org.apache.xalan.internal.xsltc.trax.,\
-               com.sun.org.apache.xalan.internal.xsltc.util.,\
-               com.sun.org.apache.xml.internal.res.,\
-               com.sun.org.apache.xml.internal.security.,\
-               com.sun.org.apache.xml.internal.serializer.utils.,\
-               com.sun.org.apache.xml.internal.utils.,\
-               com.sun.org.glassfish.,\
-               com.oracle.xmlns.internal.,\
-               com.oracle.webservices.internal.,\
-               org.jcp.xml.dsig.internal.,\
-               jdk.internal.,\
-               jdk.nashorn.internal.,\
-               jdk.nashorn.tools.,\
-               com.sun.activation.registries.,\
-               com.sun.java.accessibility.
-
-#
-# List of comma-separated packages that start with or equal this string
-# will cause a security exception to be thrown when
-# passed to checkPackageDefinition unless the
-# corresponding RuntimePermission ("defineClassInPackage."+package) has
-# been granted.
-#
-# by default, none of the class loaders supplied with the JDK call
-# checkPackageDefinition.
-#
-package.definition=sun.,\
-                   com.sun.xml.internal.,\
-                   com.sun.imageio.,\
-                   com.sun.istack.internal.,\
-                   com.sun.jmx.,\
-                   com.sun.media.sound.,\
-                   com.sun.naming.internal.,\
-                   com.sun.proxy.,\
-                   com.sun.corba.se.,\
-                   com.sun.org.apache.bcel.internal.,\
-                   com.sun.org.apache.regexp.internal.,\
-                   com.sun.org.apache.xerces.internal.,\
-                   com.sun.org.apache.xpath.internal.,\
-                   com.sun.org.apache.xalan.internal.extensions.,\
-                   com.sun.org.apache.xalan.internal.lib.,\
-                   com.sun.org.apache.xalan.internal.res.,\
-                   com.sun.org.apache.xalan.internal.templates.,\
-                   com.sun.org.apache.xalan.internal.utils.,\
-                   com.sun.org.apache.xalan.internal.xslt.,\
-                   com.sun.org.apache.xalan.internal.xsltc.cmdline.,\
-                   com.sun.org.apache.xalan.internal.xsltc.compiler.,\
-                   com.sun.org.apache.xalan.internal.xsltc.trax.,\
-                   com.sun.org.apache.xalan.internal.xsltc.util.,\
-                   com.sun.org.apache.xml.internal.res.,\
-                   com.sun.org.apache.xml.internal.security.,\
-                   com.sun.org.apache.xml.internal.serializer.utils.,\
-                   com.sun.org.apache.xml.internal.utils.,\
-                   com.sun.org.glassfish.,\
-                   com.oracle.xmlns.internal.,\
-                   com.oracle.webservices.internal.,\
-                   org.jcp.xml.dsig.internal.,\
-                   jdk.internal.,\
-                   jdk.nashorn.internal.,\
-                   jdk.nashorn.tools.,\
-                   com.sun.activation.registries.,\
-                   com.sun.java.accessibility.
-
-#
-# Determines whether this properties file can be appended to
-# or overridden on the command line via -Djava.security.properties
-#
-security.overridePropertiesFile=true
-
-#
-# Determines the default key and trust manager factory algorithms for
-# the javax.net.ssl package.
-#
-ssl.KeyManagerFactory.algorithm=SunX509
-ssl.TrustManagerFactory.algorithm=PKIX
-
-#
-# The Java-level namelookup cache policy for successful lookups:
-#
-# any negative value: caching forever
-# any positive value: the number of seconds to cache an address for
-# zero: do not cache
-#
-# default value is forever (FOREVER). For security reasons, this
-# caching is made forever when a security manager is set. When a security
-# manager is not set, the default behavior in this implementation
-# is to cache for 30 seconds.
-#
-# NOTE: setting this to anything other than the default value can have
-#       serious security implications. Do not set it unless
-#       you are sure you are not exposed to DNS spoofing attack.
-#
-#networkaddress.cache.ttl=-1
-
-# The Java-level namelookup cache policy for failed lookups:
-#
-# any negative value: cache forever
-# any positive value: the number of seconds to cache negative lookup results
-# zero: do not cache
-#
-# In some Microsoft Windows networking environments that employ
-# the WINS name service in addition to DNS, name service lookups
-# that fail may take a noticeably long time to return (approx. 5 seconds).
-# For this reason the default caching policy is to maintain these
-# results for 10 seconds.
-#
-#
-networkaddress.cache.negative.ttl=10
-
-#
-# Properties to configure OCSP for certificate revocation checking
-#
-
-# Enable OCSP
-#
-# By default, OCSP is not used for certificate revocation checking.
-# This property enables the use of OCSP when set to the value "true".
-#
-# NOTE: SocketPermission is required to connect to an OCSP responder.
-#
-# Example,
-#   ocsp.enable=true
-
-#
-# Location of the OCSP responder
-#
-# By default, the location of the OCSP responder is determined implicitly
-# from the certificate being validated. This property explicitly specifies
-# the location of the OCSP responder. The property is used when the
-# Authority Information Access extension (defined in RFC 3280) is absent
-# from the certificate or when it requires overriding.
-#
-# Example,
-#   ocsp.responderURL=http://ocsp.example.net:80
-
-#
-# Subject name of the OCSP responder's certificate
-#
-# By default, the certificate of the OCSP responder is that of the issuer
-# of the certificate being validated. This property identifies the certificate
-# of the OCSP responder when the default does not apply. Its value is a string
-# distinguished name (defined in RFC 2253) which identifies a certificate in
-# the set of certificates supplied during cert path validation. In cases where
-# the subject name alone is not sufficient to uniquely identify the certificate
-# then both the "ocsp.responderCertIssuerName" and
-# "ocsp.responderCertSerialNumber" properties must be used instead. When this
-# property is set then those two properties are ignored.
-#
-# Example,
-#   ocsp.responderCertSubjectName="CN=OCSP Responder, O=XYZ Corp"
-
-#
-# Issuer name of the OCSP responder's certificate
-#
-# By default, the certificate of the OCSP responder is that of the issuer
-# of the certificate being validated. This property identifies the certificate
-# of the OCSP responder when the default does not apply. Its value is a string
-# distinguished name (defined in RFC 2253) which identifies a certificate in
-# the set of certificates supplied during cert path validation. When this
-# property is set then the "ocsp.responderCertSerialNumber" property must also
-# be set. When the "ocsp.responderCertSubjectName" property is set then this
-# property is ignored.
-#
-# Example,
-#   ocsp.responderCertIssuerName="CN=Enterprise CA, O=XYZ Corp"
-
-#
-# Serial number of the OCSP responder's certificate
-#
-# By default, the certificate of the OCSP responder is that of the issuer
-# of the certificate being validated. This property identifies the certificate
-# of the OCSP responder when the default does not apply. Its value is a string
-# of hexadecimal digits (colon or space separators may be present) which
-# identifies a certificate in the set of certificates supplied during cert path
-# validation. When this property is set then the "ocsp.responderCertIssuerName"
-# property must also be set. When the "ocsp.responderCertSubjectName" property
-# is set then this property is ignored.
-#
-# Example,
-#   ocsp.responderCertSerialNumber=2A:FF:00
-
-#
-# Policy for failed Kerberos KDC lookups:
-#
-# When a KDC is unavailable (network error, service failure, etc), it is
-# put inside a blacklist and accessed less often for future requests. The
-# value (case-insensitive) for this policy can be:
-#
-# tryLast
-#    KDCs in the blacklist are always tried after those not on the list.
-#
-# tryLess[:max_retries,timeout]
-#    KDCs in the blacklist are still tried by their order in the configuration,
-#    but with smaller max_retries and timeout values. max_retries and timeout
-#    are optional numerical parameters (default 1 and 5000, which means once
-#    and 5 seconds). Please notes that if any of the values defined here is
-#    more than what is defined in krb5.conf, it will be ignored.
-#
-# Whenever a KDC is detected as available, it is removed from the blacklist.
-# The blacklist is reset when krb5.conf is reloaded. You can add
-# refreshKrb5Config=true to a JAAS configuration file so that krb5.conf is
-# reloaded whenever a JAAS authentication is attempted.
-#
-# Example,
-#   krb5.kdc.bad.policy = tryLast
-#   krb5.kdc.bad.policy = tryLess:2,2000
-krb5.kdc.bad.policy = tryLast
-
-# Algorithm restrictions for certification path (CertPath) processing
-#
-# In some environments, certain algorithms or key lengths may be undesirable
-# for certification path building and validation.  For example, "MD2" is
-# generally no longer considered to be a secure hash algorithm.  This section
-# describes the mechanism for disabling algorithms based on algorithm name
-# and/or key length.  This includes algorithms used in certificates, as well
-# as revocation information such as CRLs and signed OCSP Responses.
-#
-# The syntax of the disabled algorithm string is described as this Java
-# BNF-style:
-#   DisabledAlgorithms:
-#       " DisabledAlgorithm { , DisabledAlgorithm } "
-#
-#   DisabledAlgorithm:
-#       AlgorithmName [Constraint]
-#
-#   AlgorithmName:
-#       (see below)
-#
-#   Constraint:
-#       KeySizeConstraint
-#
-#   KeySizeConstraint:
-#       keySize Operator DecimalInteger
-#
-#   Operator:
-#       <= | < | == | != | >= | >
-#
-#   DecimalInteger:
-#       DecimalDigits
-#
-#   DecimalDigits:
-#       DecimalDigit {DecimalDigit}
-#
-#   DecimalDigit: one of
-#       1 2 3 4 5 6 7 8 9 0
-#
-# The "AlgorithmName" is the standard algorithm name of the disabled
-# algorithm. See "Java Cryptography Architecture Standard Algorithm Name
-# Documentation" for information about Standard Algorithm Names.  Matching
-# is performed using a case-insensitive sub-element matching rule.  (For
-# example, in "SHA1withECDSA" the sub-elements are "SHA1" for hashing and
-# "ECDSA" for signatures.)  If the assertion "AlgorithmName" is a
-# sub-element of the certificate algorithm name, the algorithm will be
-# rejected during certification path building and validation.  For example,
-# the assertion algorithm name "DSA" will disable all certificate algorithms
-# that rely on DSA, such as NONEwithDSA, SHA1withDSA.  However, the assertion
-# will not disable algorithms related to "ECDSA".
-#
-# A "Constraint" provides further guidance for the algorithm being specified.
-# The "KeySizeConstraint" requires a key of a valid size range if the
-# "AlgorithmName" is of a key algorithm.  The "DecimalInteger" indicates the
-# key size specified in number of bits.  For example, "RSA keySize <= 1024"
-# indicates that any RSA key with key size less than or equal to 1024 bits
-# should be disabled, and "RSA keySize < 1024, RSA keySize > 2048" indicates
-# that any RSA key with key size less than 1024 or greater than 2048 should
-# be disabled. Note that the "KeySizeConstraint" only makes sense to key
-# algorithms.
-#
-# Note: This property is currently used by Oracle's PKIX implementation. It
-# is not guaranteed to be examined and used by other implementations.
-#
-# Example:
-#   jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
-#
-#
-jdk.certpath.disabledAlgorithms=MD2, MD5, RSA keySize < 1024
-
-# Algorithm restrictions for Secure Socket Layer/Transport Layer Security
-# (SSL/TLS) processing
-#
-# In some environments, certain algorithms or key lengths may be undesirable
-# when using SSL/TLS.  This section describes the mechanism for disabling
-# algorithms during SSL/TLS security parameters negotiation, including cipher
-# suites selection, peer authentication and key exchange mechanisms.
-#
-# For PKI-based peer authentication and key exchange mechanisms, this list
-# of disabled algorithms will also be checked during certification path
-# building and validation, including algorithms used in certificates, as
-# well as revocation information such as CRLs and signed OCSP Responses.
-# This is in addition to the jdk.certpath.disabledAlgorithms property above.
-#
-# See the specification of "jdk.certpath.disabledAlgorithms" for the
-# syntax of the disabled algorithm string.
-#
-# Note: This property is currently used by Oracle's JSSE implementation.
-# It is not guaranteed to be examined and used by other implementations.
-#
-# Example:
-#   jdk.tls.disabledAlgorithms=MD5, SHA1, DSA, RSA keySize < 2048
--- a/src/java.base/unix/native/libjava/UNIXProcess_md.c	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.base/unix/native/libjava/UNIXProcess_md.c	Thu Aug 28 14:54:07 2014 -0700
@@ -599,9 +599,9 @@
      */
     assert(prog != NULL && argBlock != NULL);
     if ((phelperpath = getBytes(env, helperpath))   == NULL) goto Catch;
-    if ((pprog     = getBytes(env, prog))       == NULL) goto Catch;
-    if ((pargBlock = getBytes(env, argBlock))   == NULL) goto Catch;
-    if ((c->argv = NEW(const char *, argc + 3)) == NULL) goto Catch;
+    if ((pprog       = getBytes(env, prog))         == NULL) goto Catch;
+    if ((pargBlock   = getBytes(env, argBlock))     == NULL) goto Catch;
+    if ((c->argv     = NEW(const char *, argc + 3)) == NULL) goto Catch;
     c->argv[0] = pprog;
     c->argc = argc + 2;
     initVectorFromBlock(c->argv+1, pargBlock, argc);
@@ -690,10 +690,11 @@
     closeSafely(childenv[0]);
     closeSafely(childenv[1]);
 
-    releaseBytes(env, prog,     pprog);
-    releaseBytes(env, argBlock, pargBlock);
-    releaseBytes(env, envBlock, penvBlock);
-    releaseBytes(env, dir,      c->pdir);
+    releaseBytes(env, helperpath, phelperpath);
+    releaseBytes(env, prog,       pprog);
+    releaseBytes(env, argBlock,   pargBlock);
+    releaseBytes(env, envBlock,   penvBlock);
+    releaseBytes(env, dir,        c->pdir);
 
     free(c->argv);
     free(c->envv);
--- a/src/java.desktop/macosx/classes/apple/laf/JRSUIControl.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/macosx/classes/apple/laf/JRSUIControl.java	Thu Aug 28 14:54:07 2014 -0700
@@ -114,7 +114,7 @@
         changes.putAll(other.changes);
     }
 
-    protected synchronized final void finalize() throws Throwable {
+    protected synchronized void finalize() throws Throwable {
         if (cfDictionaryPtr == 0) return;
         disposeCFDictionary(cfDictionaryPtr);
         cfDictionaryPtr = 0;
--- a/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameUI.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameUI.java	Thu Aug 28 14:54:07 2014 -0700
@@ -938,7 +938,11 @@
             final Point pt = new Point();
             final Component c = getComponentToForwardTo(e, pt);
             if (c == null) return;
-            c.dispatchEvent(new MouseWheelEvent(c, e.getID(), e.getWhen(), e.getModifiers(), pt.x, pt.y, e.getClickCount(), e.isPopupTrigger(), e.getScrollType(), e.getScrollAmount(), e.getWheelRotation()));
+            c.dispatchEvent(new MouseWheelEvent(c, e.getID(), e.getWhen(),
+                    e.getModifiers(), pt.x, pt.y, e.getXOnScreen(), e.getYOnScreen(),
+                    e.getClickCount(), e.isPopupTrigger(), e.getScrollType(),
+                    e.getScrollAmount(), e.getWheelRotation(),
+                    e.getPreciseWheelRotation()));
         }
 
         public void componentResized(final ComponentEvent e) {
--- a/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/macosx/classes/com/apple/laf/AquaTabbedPaneCopyFromBasicUI.java	Thu Aug 28 14:54:07 2014 -0700
@@ -3307,7 +3307,7 @@
                 pane.repaint();
             } else if (name == "indexForTitle") {
                 calculatedBaseline = false;
-                updateHtmlViews((Integer) e.getNewValue());
+                updateHtmlViews((Integer) e.getNewValue(), false);
             } else if (name == "tabLayoutPolicy") {
                 AquaTabbedPaneCopyFromBasicUI.this.uninstallUI(pane);
                 AquaTabbedPaneCopyFromBasicUI.this.installUI(pane);
@@ -3345,7 +3345,7 @@
                 calculatedBaseline = false;
             } else if (name == "indexForNullComponent") {
                 isRunsDirty = true;
-                updateHtmlViews((Integer) e.getNewValue());
+                updateHtmlViews((Integer) e.getNewValue(), true);
             } else if (name == "font") {
                 calculatedBaseline = false;
             }
@@ -3464,10 +3464,10 @@
                 return;
             }
             isRunsDirty = true;
-            updateHtmlViews(tp.indexOfComponent(child));
+            updateHtmlViews(tp.indexOfComponent(child), true);
         }
 
-        private void updateHtmlViews(int index) {
+        private void updateHtmlViews(int index, boolean inserted) {
             final String title = tabPane.getTitleAt(index);
             final boolean isHTML = BasicHTML.isHTMLString(title);
             if (isHTML) {
@@ -3475,16 +3475,24 @@
                     htmlViews = createHTMLVector();
                 } else { // Vector already exists
                     final View v = BasicHTML.createHTMLView(tabPane, title);
-                    htmlViews.insertElementAt(v, index);
+                    setHtmlView(v, inserted, index);
                 }
             } else { // Not HTML
                 if (htmlViews != null) { // Add placeholder
-                    htmlViews.insertElementAt(null, index);
+                    setHtmlView(null, inserted, index);
                 } // else nada!
             }
             updateMnemonics();
         }
 
+        private void setHtmlView(View v, boolean inserted, int index) {
+            if (inserted || index >= htmlViews.size()) {
+                htmlViews.insertElementAt(v, index);
+            } else {
+                htmlViews.setElementAt(v, index);
+            }
+        }
+
         public void componentRemoved(final ContainerEvent e) {
             final JTabbedPane tp = (JTabbedPane)e.getContainer();
             final Component child = e.getChild();
--- a/src/java.desktop/macosx/classes/sun/font/CFontManager.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/macosx/classes/sun/font/CFontManager.java	Thu Aug 28 14:54:07 2014 -0700
@@ -43,7 +43,7 @@
 import sun.awt.util.ThreadGroupUtils;
 import sun.lwawt.macosx.*;
 
-public class CFontManager extends SunFontManager {
+public final class CFontManager extends SunFontManager {
     private FontConfigManager fcManager = null;
     private static Hashtable<String, Font2D> genericFonts = new Hashtable<String, Font2D>();
 
@@ -61,20 +61,14 @@
         return new CFontConfiguration(this, preferLocaleFonts, preferPropFonts);
     }
 
-    private static String[] defaultPlatformFont = null;
-
     /*
      * Returns an array of two strings. The first element is the
      * name of the font. The second element is the file name.
      */
     @Override
-    public synchronized String[] getDefaultPlatformFont() {
-        if (defaultPlatformFont == null) {
-            defaultPlatformFont = new String[2];
-            defaultPlatformFont[0] = "Lucida Grande";
-            defaultPlatformFont[1] = "/System/Library/Fonts/LucidaGrande.ttc";
-        }
-        return defaultPlatformFont;
+    protected String[] getDefaultPlatformFont() {
+        return new String[]{"Lucida Grande",
+                            "/System/Library/Fonts/LucidaGrande.ttc"};
     }
 
     // This is a way to register any kind of Font2D, not just files and composites.
--- a/src/java.desktop/macosx/classes/sun/lwawt/LWComponentPeer.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/macosx/classes/sun/lwawt/LWComponentPeer.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1233,11 +1233,13 @@
                     delegate, me.getID(), me.getWhen(),
                     me.getModifiers(),
                     me.getX(), me.getY(),
+                    me.getXOnScreen(), me.getYOnScreen(),
                     me.getClickCount(),
                     me.isPopupTrigger(),
                     me.getScrollType(),
                     me.getScrollAmount(),
-                    me.getWheelRotation());
+                    me.getWheelRotation(),
+                    me.getPreciseWheelRotation());
         } else if (e instanceof MouseEvent) {
             MouseEvent me = (MouseEvent) e;
 
--- a/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java	Thu Aug 28 14:54:07 2014 -0700
@@ -105,6 +105,8 @@
 
     private final SecurityWarningWindow warningWindow;
 
+    private volatile boolean targetFocusable;
+
     /**
      * Current modal blocker or null.
      *
@@ -240,13 +242,12 @@
         if (!visible && warningWindow != null) {
             warningWindow.setVisible(false, false);
         }
-
+        updateFocusableWindowState();
         super.setVisibleImpl(visible);
         // TODO: update graphicsConfig, see 4868278
         platformWindow.setVisible(visible);
         if (isSimpleWindow()) {
             KeyboardFocusManagerPeer kfmPeer = LWKeyboardFocusManagerPeer.getInstance();
-
             if (visible) {
                 if (!getTarget().isAutoRequestFocus()) {
                     return;
@@ -397,6 +398,7 @@
 
     @Override
     public void updateFocusableWindowState() {
+        targetFocusable = getTarget().isFocusableWindow();
         platformWindow.updateFocusableWindowState();
     }
 
@@ -1220,13 +1222,13 @@
     }
 
     private boolean isFocusableWindow() {
-        boolean focusable = getTarget().isFocusableWindow();
+        boolean focusable  = targetFocusable;
         if (isSimpleWindow()) {
             LWWindowPeer ownerPeer = getOwnerFrameDialog(this);
             if (ownerPeer == null) {
                 return false;
             }
-            return focusable && ownerPeer.getTarget().isFocusableWindow();
+            return focusable && ownerPeer.targetFocusable;
         }
         return focusable;
     }
--- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java	Thu Aug 28 14:54:07 2014 -0700
@@ -38,7 +38,8 @@
 
     private CPlatformResponder responder;
     private static final Object classLock = new Object();
-    private static volatile CEmbeddedFrame focusedWindow;
+    private static volatile CEmbeddedFrame globalFocusedWindow;
+    private CEmbeddedFrame browserWindowFocusedApplet;
     private boolean parentWindowActive = true;
 
     public CEmbeddedFrame() {
@@ -111,10 +112,10 @@
         synchronized (classLock) {
             // In some cases an applet may not receive the focus lost event
             // from the parent window (see 8012330)
-            focusedWindow = (focused) ? this
-                    : ((focusedWindow == this) ? null : focusedWindow);
+            globalFocusedWindow = (focused) ? this
+                    : ((globalFocusedWindow == this) ? null : globalFocusedWindow);
         }
-        if (focusedWindow == this) {
+        if (globalFocusedWindow == this) {
             // see bug 8010925
             // we can't put this to handleWindowFocusEvent because
             // it won't be invoced if focuse is moved to a html element
@@ -145,9 +146,23 @@
     // non-focused applet. This method can be called from different threads.
     public void handleWindowFocusEvent(boolean parentWindowActive) {
         this.parentWindowActive = parentWindowActive;
+        // If several applets are running in different browser's windows, it is necessary to
+        // detect the switching between the parent windows and update globalFocusedWindow accordingly.
+        synchronized (classLock) {
+            if (!parentWindowActive) {
+                this.browserWindowFocusedApplet = globalFocusedWindow;
+            }
+            if (parentWindowActive && globalFocusedWindow != this && isParentWindowChanged()) {
+                // It looks like we have switched to another browser window, let's restore focus to
+                // the previously focused applet in this window. If no applets were focused in the
+                // window, we will set focus to the first applet in the window.
+                globalFocusedWindow = (this.browserWindowFocusedApplet != null) ? this.browserWindowFocusedApplet
+                        : this;
+            }
+        }
         // ignore focus "lost" native request as it may mistakenly
         // deactivate active window (see 8001161)
-        if (focusedWindow == this && parentWindowActive) {
+        if (globalFocusedWindow == this && parentWindowActive) {
             responder.handleWindowFocusEvent(parentWindowActive, null);
         }
     }
@@ -155,4 +170,10 @@
     public boolean isParentWindowActive() {
         return parentWindowActive;
     }
+
+    private boolean isParentWindowChanged() {
+        // If globalFocusedWindow is located at inactive parent window or null, we have swithed to
+        // another window.
+        return globalFocusedWindow != null ? !globalFocusedWindow.isParentWindowActive() : true;
+    }
 }
--- a/src/java.desktop/macosx/classes/sun/lwawt/macosx/NSPrintInfo.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/macosx/classes/sun/lwawt/macosx/NSPrintInfo.java	Thu Aug 28 14:54:07 2014 -0700
@@ -54,11 +54,11 @@
         return "" + fNSPrintInfo;
     }
 
-    public final Class<? extends Attribute> getCategory() {
+    public Class<? extends Attribute> getCategory() {
         return NSPrintInfo.class;
     }
 
-    public final String getName() {
+    public String getName() {
         return "nsPrintInfo";
     }
 }
--- a/src/java.desktop/macosx/native/libawt_lwawt/sun/awt/JavaComponentAccessibility.m	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/macosx/native/libawt_lwawt/sun/awt/JavaComponentAccessibility.m	Thu Aug 28 14:54:07 2014 -0700
@@ -1108,7 +1108,10 @@
     JNIEnv *env = [ThreadUtilities getJNIEnv];
     id value = nil;
 
+    NSWindow* hostWindow = [[self->fView window] retain];
     jobject focused = JNFCallStaticObjectMethod(env, jm_getFocusOwner, fComponent); // AWT_THREADING Safe (AWTRunLoop)
+    [hostWindow release];
+    
     if (focused != NULL) {
         if (JNFIsInstanceOf(env, focused, &sjc_Accessible)) {
             value = [JavaComponentAccessibility createWithAccessible:focused withEnv:env withView:fView];
--- a/src/java.desktop/share/classes/com/sun/media/sound/FFT.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/com/sun/media/sound/FFT.java	Thu Aug 28 14:54:07 2014 -0700
@@ -68,7 +68,7 @@
         calc(fftFrameSize, data, sign, w);
     }
 
-    private final static double[] computeTwiddleFactors(int fftFrameSize,
+    private static double[] computeTwiddleFactors(int fftFrameSize,
             int sign) {
 
         int imax = (int) (Math.log(fftFrameSize) / Math.log(2.));
@@ -122,7 +122,7 @@
         return warray;
     }
 
-    private final static void calc(int fftFrameSize, double[] data, int sign,
+    private static void calc(int fftFrameSize, double[] data, int sign,
             double[] w) {
 
         final int fftFrameSize2 = fftFrameSize << 1;
@@ -139,7 +139,7 @@
 
     }
 
-    private final static void calcF2E(int fftFrameSize, double[] data, int i,
+    private static void calcF2E(int fftFrameSize, double[] data, int i,
             int nstep, double[] w) {
         int jmax = nstep;
         for (int n = 0; n < jmax; n += 2) {
@@ -163,7 +163,7 @@
 
     // Perform Factor-4 Decomposition with 3 * complex operators and 8 +/-
     // complex operators
-    private final static void calcF4F(int fftFrameSize, double[] data, int i,
+    private static void calcF4F(int fftFrameSize, double[] data, int i,
             int nstep, double[] w) {
         final int fftFrameSize2 = fftFrameSize << 1; // 2*fftFrameSize;
         // Factor-4 Decomposition
@@ -331,7 +331,7 @@
 
     // Perform Factor-4 Decomposition with 3 * complex operators and 8 +/-
     // complex operators
-    private final static void calcF4I(int fftFrameSize, double[] data, int i,
+    private static void calcF4I(int fftFrameSize, double[] data, int i,
             int nstep, double[] w) {
         final int fftFrameSize2 = fftFrameSize << 1; // 2*fftFrameSize;
         // Factor-4 Decomposition
@@ -499,7 +499,7 @@
 
     // Perform Factor-4 Decomposition with 3 * complex operators and 8 +/-
     // complex operators
-    private final static void calcF4FE(int fftFrameSize, double[] data, int i,
+    private static void calcF4FE(int fftFrameSize, double[] data, int i,
             int nstep, double[] w) {
         final int fftFrameSize2 = fftFrameSize << 1; // 2*fftFrameSize;
         // Factor-4 Decomposition
@@ -593,7 +593,7 @@
 
     // Perform Factor-4 Decomposition with 3 * complex operators and 8 +/-
     // complex operators
-    private final static void calcF4IE(int fftFrameSize, double[] data, int i,
+    private static void calcF4IE(int fftFrameSize, double[] data, int i,
             int nstep, double[] w) {
         final int fftFrameSize2 = fftFrameSize << 1; // 2*fftFrameSize;
         // Factor-4 Decomposition
@@ -685,7 +685,7 @@
 
     }
 
-    private final void bitreversal(double[] data) {
+    private void bitreversal(double[] data) {
         if (fftFrameSize < 4)
             return;
 
--- a/src/java.desktop/share/classes/com/sun/media/sound/JDK13Services.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/com/sun/media/sound/JDK13Services.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -25,6 +25,8 @@
 
 package com.sun.media.sound;
 
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -176,11 +178,11 @@
                 && !Sequencer.class.equals(typeClass)) {
             return null;
         }
-        String value;
-        String propertyName = typeClass.getName();
-        value = JSSecurityManager.getProperty(propertyName);
+        String name = typeClass.getName();
+        String value = AccessController.doPrivileged(
+                (PrivilegedAction<String>) () -> System.getProperty(name));
         if (value == null) {
-            value = getProperties().getProperty(propertyName);
+            value = getProperties().getProperty(name);
         }
         if ("".equals(value)) {
             value = null;
--- a/src/java.desktop/share/classes/com/sun/media/sound/JSSecurityManager.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/com/sun/media/sound/JSSecurityManager.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -73,33 +73,6 @@
         }
     }
 
-    static String getProperty(final String propertyName) {
-        String propertyValue;
-        if (hasSecurityManager()) {
-            if(Printer.debug) Printer.debug("using JDK 1.2 security to get property");
-            try{
-                PrivilegedAction<String> action = new PrivilegedAction<String>() {
-                        public String run() {
-                            try {
-                                return System.getProperty(propertyName);
-                            } catch (Throwable t) {
-                                return null;
-                            }
-                        }
-                    };
-                propertyValue = AccessController.doPrivileged(action);
-            } catch( Exception e ) {
-                if(Printer.debug) Printer.debug("not using JDK 1.2 security to get properties");
-                propertyValue = System.getProperty(propertyName);
-            }
-        } else {
-            if(Printer.debug) Printer.debug("not using JDK 1.2 security to get properties");
-            propertyValue = System.getProperty(propertyName);
-        }
-        return propertyValue;
-    }
-
-
     /** Load properties from a file.
         This method tries to load properties from the filename give into
         the passed properties object.
--- a/src/java.desktop/share/classes/com/sun/media/sound/Platform.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/com/sun/media/sound/Platform.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -74,17 +74,6 @@
     // intel is little-endian.  sparc is big-endian.
     private static boolean bigEndian;
 
-    // this is the value of the "java.home" system property.  i am looking it up here
-    // for use when trying to load the soundbank, just so
-    // that all the privileged code is localized in this file....
-    private static String javahome;
-
-    // this is the value of the "java.class.path" system property
-    private static String classpath;
-
-
-
-
     static {
         if(Printer.trace)Printer.trace(">> Platform.java: static");
 
@@ -129,26 +118,6 @@
         return signed8;
     }
 
-
-    /**
-     * Obtain javahome.
-     * $$kk: 04.16.99: this is *bad*!!
-     */
-    static String getJavahome() {
-
-        return javahome;
-    }
-
-    /**
-     * Obtain classpath.
-     * $$jb: 04.21.99: this is *bad* too!!
-     */
-    static String getClasspath() {
-
-        return classpath;
-    }
-
-
     // PRIVATE METHODS
 
     /**
@@ -157,21 +126,13 @@
     private static void loadLibraries() {
         if(Printer.trace)Printer.trace(">>Platform.loadLibraries");
 
-        try {
-            // load the main library
-            AccessController.doPrivileged(new PrivilegedAction<Void>() {
-                @Override
-                public Void run() {
-                    System.loadLibrary(libNameMain);
-                    return null;
-                }
-            });
-            // just for the heck of it...
-            loadedLibs |= LIB_MAIN;
-        } catch (SecurityException e) {
-            if(Printer.err)Printer.err("Security exception loading main native library.  JavaSound requires access to these resources.");
-            throw(e);
-        }
+        // load the main library
+        AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
+            System.loadLibrary(libNameMain);
+            return null;
+        });
+        // just for the heck of it...
+        loadedLibs |= LIB_MAIN;
 
         // now try to load extra libs. They are defined at compile time in the Makefile
         // with the define EXTRA_SOUND_JNI_LIBS
@@ -181,12 +142,9 @@
         while (st.hasMoreTokens()) {
             final String lib = st.nextToken();
             try {
-                AccessController.doPrivileged(new PrivilegedAction<Void>() {
-                    @Override
-                    public Void run() {
-                        System.loadLibrary(lib);
-                        return null;
-                    }
+                AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
+                    System.loadLibrary(lib);
+                    return null;
                 });
 
                 if (lib.equals(libNameALSA)) {
@@ -239,7 +197,5 @@
         // $$fb 2002-03-06: implement check for endianness in native. Facilitates porting !
         bigEndian = nIsBigEndian();
         signed8 = nIsSigned8(); // Solaris on Sparc: signed, all others unsigned
-        javahome = JSSecurityManager.getProperty("java.home");
-        classpath = JSSecurityManager.getProperty("java.class.path");
     }
 }
--- a/src/java.desktop/share/classes/com/sun/media/sound/RIFFReader.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/com/sun/media/sound/RIFFReader.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -39,21 +39,20 @@
     private long filepointer = 0;
     private final String fourcc;
     private String riff_type = null;
-    private long ckSize = 0;
+    private long ckSize = Integer.MAX_VALUE;
     private InputStream stream;
-    private long avail;
+    private long avail = Integer.MAX_VALUE;
     private RIFFReader lastiterator = null;
 
     public RIFFReader(InputStream stream) throws IOException {
 
-        if (stream instanceof RIFFReader)
-            root = ((RIFFReader)stream).root;
-        else
+        if (stream instanceof RIFFReader) {
+            root = ((RIFFReader) stream).root;
+        } else {
             root = this;
+        }
 
         this.stream = stream;
-        avail = Integer.MAX_VALUE;
-        ckSize = Integer.MAX_VALUE;
 
         // Check for RIFF null paddings,
         int b;
@@ -76,10 +75,12 @@
         readFully(fourcc, 1, 3);
         this.fourcc = new String(fourcc, "ascii");
         ckSize = readUnsignedInt();
-
-        avail = this.ckSize;
+        avail = ckSize;
 
         if (getFormat().equals("RIFF") || getFormat().equals("LIST")) {
+            if (avail > Integer.MAX_VALUE) {
+                throw new RIFFInvalidDataException("Chunk size too big");
+            }
             byte[] format = new byte[4];
             readFully(format);
             this.riff_type = new String(format, "ascii");
@@ -118,19 +119,23 @@
     }
 
     public int read() throws IOException {
-        if (avail == 0)
+        if (avail == 0) {
             return -1;
+        }
         int b = stream.read();
-        if (b == -1)
+        if (b == -1) {
+            avail = 0;
             return -1;
+        }
         avail--;
         filepointer++;
         return b;
     }
 
     public int read(byte[] b, int offset, int len) throws IOException {
-        if (avail == 0)
+        if (avail == 0) {
             return -1;
+        }
         if (len > avail) {
             int rlen = stream.read(b, offset, (int)avail);
             if (rlen != -1)
@@ -139,19 +144,21 @@
             return rlen;
         } else {
             int ret = stream.read(b, offset, len);
-            if (ret == -1)
+            if (ret == -1) {
+                avail = 0;
                 return -1;
+            }
             avail -= ret;
             filepointer += ret;
             return ret;
         }
     }
 
-    public final void readFully(byte b[]) throws IOException {
+    public void readFully(byte b[]) throws IOException {
         readFully(b, 0, b.length);
     }
 
-    public final void readFully(byte b[], int off, int len) throws IOException {
+    public void readFully(byte b[], int off, int len) throws IOException {
         if (len < 0)
             throw new IndexOutOfBoundsException();
         while (len > 0) {
@@ -165,7 +172,7 @@
         }
     }
 
-    public final long skipBytes(long n) throws IOException {
+    public long skipBytes(long n) throws IOException {
         if (n < 0)
             return 0;
         long skipped = 0;
@@ -191,8 +198,10 @@
             return len;
         } else {
             long ret = stream.skip(n);
-            if (ret == -1)
+            if (ret == -1) {
+                avail = 0;
                 return -1;
+            }
             avail -= ret;
             filepointer += ret;
             return ret;
@@ -210,8 +219,13 @@
     }
 
     // Read ASCII chars from stream
-    public String readString(int len) throws IOException {
-        byte[] buff = new byte[len];
+    public String readString(final int len) throws IOException {
+        final byte[] buff;
+        try {
+            buff = new byte[len];
+        } catch (final OutOfMemoryError oom) {
+            throw new IOException("Length too big", oom);
+        }
         readFully(buff);
         for (int i = 0; i < buff.length; i++) {
             if (buff[i] == 0) {
--- a/src/java.desktop/share/classes/com/sun/media/sound/SF2Soundbank.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/com/sun/media/sound/SF2Soundbank.java	Thu Aug 28 14:54:07 2014 -0700
@@ -276,6 +276,9 @@
                     count--;
                 }
 
+                if (presets_bagNdx.isEmpty()) {
+                    throw new RIFFInvalidDataException();
+                }
                 int offset = presets_bagNdx.get(0);
                 // Offset should be 0 (but just case)
                 for (int i = 0; i < offset; i++) {
@@ -360,6 +363,9 @@
                     count--;
                 }
 
+                if (instruments_bagNdx.isEmpty()) {
+                    throw new RIFFInvalidDataException();
+                }
                 int offset = instruments_bagNdx.get(0);
                 // Offset should be 0 (but just case)
                 for (int i = 0; i < offset; i++) {
@@ -401,6 +407,9 @@
                     modulator.amount = chunk.readShort();
                     modulator.amountSourceOperator = chunk.readUnsignedShort();
                     modulator.transportOperator = chunk.readUnsignedShort();
+                    if (i < 0 || i >= instruments_splits_gen.size()) {
+                        throw new RIFFInvalidDataException();
+                    }
                     SF2LayerRegion split = instruments_splits_gen.get(i);
                     if (split != null)
                         split.modulators.add(modulator);
@@ -424,7 +433,8 @@
                     sample.name = chunk.readString(20);
                     long start = chunk.readUnsignedInt();
                     long end = chunk.readUnsignedInt();
-                    sample.data = sampleData.subbuffer(start * 2, end * 2, true);
+                    if (sampleData != null)
+                        sample.data = sampleData.subbuffer(start * 2, end * 2, true);
                     if (sampleData24 != null)
                         sample.data24 = sampleData24.subbuffer(start, end, true);
                     /*
@@ -462,6 +472,9 @@
                     int sampleid = split.generators.get(
                             SF2LayerRegion.GENERATOR_SAMPLEID);
                     split.generators.remove(SF2LayerRegion.GENERATOR_SAMPLEID);
+                    if (sampleid < 0 || sampleid >= samples.size()) {
+                        throw new RIFFInvalidDataException();
+                    }
                     split.sample = samples.get(sampleid);
                 } else {
                     globalsplit = split;
@@ -488,6 +501,9 @@
                     int instrumentid = split.generators.get(
                             SF2InstrumentRegion.GENERATOR_INSTRUMENT);
                     split.generators.remove(SF2LayerRegion.GENERATOR_INSTRUMENT);
+                    if (instrumentid < 0 || instrumentid >= layers.size()) {
+                        throw new RIFFInvalidDataException();
+                    }
                     split.layer = layers.get(instrumentid);
                 } else {
                     globalsplit = split;
--- a/src/java.desktop/share/classes/com/sun/media/sound/SoftMidiAudioFileReader.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/com/sun/media/sound/SoftMidiAudioFileReader.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -22,6 +22,7 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
+
 package com.sun.media.sound;
 
 import java.io.File;
@@ -39,14 +40,14 @@
 import javax.sound.midi.Sequence;
 import javax.sound.midi.Track;
 import javax.sound.sampled.AudioFileFormat;
+import javax.sound.sampled.AudioFileFormat.Type;
 import javax.sound.sampled.AudioFormat;
 import javax.sound.sampled.AudioInputStream;
 import javax.sound.sampled.UnsupportedAudioFileException;
-import javax.sound.sampled.AudioFileFormat.Type;
 import javax.sound.sampled.spi.AudioFileReader;
 
 /**
- * MIDI File Audio Renderer/Reader
+ * MIDI File Audio Renderer/Reader.
  *
  * @author Karl Helgason
  */
@@ -109,6 +110,9 @@
                 if (divtype == Sequence.PPQ) {
                     if (((MetaMessage) msg).getType() == 0x51) {
                         byte[] data = ((MetaMessage) msg).getData();
+                        if (data.length < 3) {
+                            throw new UnsupportedAudioFileException();
+                        }
                         mpq = ((data[0] & 0xff) << 16)
                                 | ((data[1] & 0xff) << 8) | (data[2] & 0xff);
                     }
--- a/src/java.desktop/share/classes/com/sun/media/sound/SoftSynthesizer.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/com/sun/media/sound/SoftSynthesizer.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -28,6 +28,7 @@
 import java.io.BufferedInputStream;
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -732,31 +733,28 @@
                  * Save generated soundbank to disk for faster future use.
                  */
                 OutputStream out = AccessController
-                        .doPrivileged(new PrivilegedAction<OutputStream>() {
-                            public OutputStream run() {
-                                try {
-                                    File userhome = new File(System
-                                            .getProperty("user.home"),
-                                            ".gervill");
-                                    if (!userhome.exists())
-                                        userhome.mkdirs();
-                                    File emg_soundbank_file = new File(
-                                            userhome, "soundbank-emg.sf2");
-                                    if (emg_soundbank_file.exists())
-                                        return null;
-                                    return new FileOutputStream(
-                                            emg_soundbank_file);
-                                } catch (IOException e) {
-                                } catch (SecurityException e) {
+                        .doPrivileged((PrivilegedAction<OutputStream>) () -> {
+                            try {
+                                File userhome = new File(System
+                                        .getProperty("user.home"), ".gervill");
+                                if (!userhome.exists()) {
+                                    userhome.mkdirs();
                                 }
-                                return null;
+                                File emg_soundbank_file = new File(
+                                        userhome, "soundbank-emg.sf2");
+                                if (emg_soundbank_file.exists()) {
+                                    return null;
+                                }
+                                return new FileOutputStream(emg_soundbank_file);
+                            } catch (final FileNotFoundException ignored) {
                             }
+                            return null;
                         });
                 if (out != null) {
                     try {
                         ((SF2Soundbank) defaultSoundBank).save(out);
                         out.close();
-                    } catch (IOException e) {
+                    } catch (final IOException ignored) {
                     }
                 }
             }
@@ -846,26 +844,24 @@
 
     private Properties getStoredProperties() {
         return AccessController
-                .doPrivileged(new PrivilegedAction<Properties>() {
-                    public Properties run() {
-                        Properties p = new Properties();
-                        String notePath = "/com/sun/media/sound/softsynthesizer";
-                        try {
-                            Preferences prefroot = Preferences.userRoot();
-                            if (prefroot.nodeExists(notePath)) {
-                                Preferences prefs = prefroot.node(notePath);
-                                String[] prefs_keys = prefs.keys();
-                                for (String prefs_key : prefs_keys) {
-                                    String val = prefs.get(prefs_key, null);
-                                    if (val != null)
-                                        p.setProperty(prefs_key, val);
+                .doPrivileged((PrivilegedAction<Properties>) () -> {
+                    Properties p = new Properties();
+                    String notePath = "/com/sun/media/sound/softsynthesizer";
+                    try {
+                        Preferences prefroot = Preferences.userRoot();
+                        if (prefroot.nodeExists(notePath)) {
+                            Preferences prefs = prefroot.node(notePath);
+                            String[] prefs_keys = prefs.keys();
+                            for (String prefs_key : prefs_keys) {
+                                String val = prefs.get(prefs_key, null);
+                                if (val != null) {
+                                    p.setProperty(prefs_key, val);
                                 }
                             }
-                        } catch (BackingStoreException e) {
-                        } catch (SecurityException e) {
                         }
-                        return p;
+                    } catch (final BackingStoreException ignored) {
                     }
+                    return p;
                 });
     }
 
@@ -1044,7 +1040,6 @@
             return;
         }
         synchronized (control_mutex) {
-            Throwable causeException = null;
             try {
                 if (line != null) {
                     // can throw IllegalArgumentException
@@ -1117,24 +1112,17 @@
                     weakstream.sourceDataLine = sourceDataLine;
                 }
 
-            } catch (LineUnavailableException e) {
-                causeException = e;
-            } catch (IllegalArgumentException e) {
-                causeException = e;
-            } catch (SecurityException e) {
-                causeException = e;
-            }
-
-            if (causeException != null) {
-                if (isOpen())
+            } catch (final LineUnavailableException | SecurityException
+                    | IllegalArgumentException e) {
+                if (isOpen()) {
                     close();
+                }
                 // am: need MidiUnavailableException(Throwable) ctor!
                 MidiUnavailableException ex = new MidiUnavailableException(
                         "Can not open line");
-                ex.initCause(causeException);
+                ex.initCause(e);
                 throw ex;
             }
-
         }
     }
 
--- a/src/java.desktop/share/classes/com/sun/media/sound/StandardMidiFileReader.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/com/sun/media/sound/StandardMidiFileReader.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -25,27 +25,25 @@
 
 package com.sun.media.sound;
 
+import java.io.BufferedInputStream;
 import java.io.DataInputStream;
+import java.io.EOFException;
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.IOException;
 import java.io.InputStream;
-import java.io.IOException;
-import java.io.EOFException;
-import java.io.BufferedInputStream;
 import java.net.URL;
 
-import javax.sound.midi.MidiFileFormat;
 import javax.sound.midi.InvalidMidiDataException;
 import javax.sound.midi.MetaMessage;
 import javax.sound.midi.MidiEvent;
+import javax.sound.midi.MidiFileFormat;
 import javax.sound.midi.MidiMessage;
 import javax.sound.midi.Sequence;
 import javax.sound.midi.SysexMessage;
 import javax.sound.midi.Track;
 import javax.sound.midi.spi.MidiFileReader;
 
-
-
 /**
  * MIDI file reader.
  *
@@ -53,19 +51,23 @@
  * @author Jan Borgersen
  * @author Florian Bomers
  */
-
 public final class StandardMidiFileReader extends MidiFileReader {
 
     private static final int MThd_MAGIC = 0x4d546864;  // 'MThd'
 
     private static final int bisBufferSize = 1024; // buffer size in buffered input streams
 
-    public MidiFileFormat getMidiFileFormat(InputStream stream) throws InvalidMidiDataException, IOException {
+    public MidiFileFormat getMidiFileFormat(InputStream stream)
+            throws InvalidMidiDataException, IOException {
         return getMidiFileFormatFromStream(stream, MidiFileFormat.UNKNOWN_LENGTH, null);
     }
 
-    // $$fb 2002-04-17: part of fix for 4635286: MidiSystem.getMidiFileFormat() returns format having invalid length
-    private MidiFileFormat getMidiFileFormatFromStream(InputStream stream, int fileLength, SMFParser smfParser) throws InvalidMidiDataException, IOException {
+    // $$fb 2002-04-17: part of fix for 4635286: MidiSystem.getMidiFileFormat()
+    // returns format having invalid length
+    private MidiFileFormat getMidiFileFormatFromStream(InputStream stream,
+                                                       int fileLength,
+                                                       SMFParser smfParser)
+            throws InvalidMidiDataException, IOException{
         int maxReadLength = 16;
         int duration = MidiFileFormat.UNKNOWN_LENGTH;
         DataInputStream dis;
@@ -230,7 +232,7 @@
 //=============================================================================================================
 
 /**
- * State variables during parsing of a MIDI file
+ * State variables during parsing of a MIDI file.
  */
 final class SMFParser {
     private static final int MTrk_MAGIC = 0x4d54726b;  // 'MTrk'
@@ -297,7 +299,11 @@
             }
         }
         // now read track in a byte array
-        trackData = new byte[trackLength];
+        try {
+            trackData = new byte[trackLength];
+        } catch (final OutOfMemoryError oom) {
+            throw new IOException("Track length too big", oom);
+        }
         try {
             // $$fb 2003-08-20: fix for 4910986: MIDI file parser breaks up on http connection
             stream.readFully(trackData);
@@ -386,8 +392,13 @@
                         // meta
                         int metaType = readUnsigned();
                         int metaLength = (int) readVarInt();
+                        final byte[] metaData;
+                        try {
+                            metaData = new byte[metaLength];
+                        } catch (final OutOfMemoryError oom) {
+                            throw new IOException("Meta length too big", oom);
+                        }
 
-                        byte[] metaData = new byte[metaLength];
                         read(metaData);
 
                         MetaMessage metaMessage = new MetaMessage();
@@ -413,5 +424,4 @@
             throw new EOFException("invalid MIDI file");
         }
     }
-
 }
--- a/src/java.desktop/share/classes/java/awt/datatransfer/Clipboard.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/java/awt/datatransfer/Clipboard.java	Thu Aug 28 14:54:07 2014 -0700
@@ -25,7 +25,7 @@
 
 package java.awt.datatransfer;
 
-import java.awt.EventQueue;
+import sun.datatransfer.DataFlavorUtil;
 
 import java.util.Objects;
 import java.util.Set;
@@ -130,7 +130,8 @@
         this.contents = contents;
 
         if (oldOwner != null && oldOwner != owner) {
-            EventQueue.invokeLater(() -> oldOwner.lostOwnership(Clipboard.this, oldContents));
+            DataFlavorUtil.getDesktopService().invokeOnEventThread(() ->
+                    oldOwner.lostOwnership(Clipboard.this, oldContents));
         }
         fireFlavorsChanged();
     }
@@ -324,7 +325,7 @@
             return;
         }
         flavorListeners.forEach(listener ->
-                EventQueue.invokeLater(() ->
+                DataFlavorUtil.getDesktopService().invokeOnEventThread(() ->
                         listener.flavorsChanged(new FlavorEvent(Clipboard.this))));
     }
 
--- a/src/java.desktop/share/classes/java/awt/datatransfer/DataFlavor.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/java/awt/datatransfer/DataFlavor.java	Thu Aug 28 14:54:07 2014 -0700
@@ -25,7 +25,7 @@
 
 package java.awt.datatransfer;
 
-import sun.awt.datatransfer.DataTransferer;
+import sun.datatransfer.DataFlavorUtil;
 import sun.reflect.misc.ReflectUtil;
 
 import java.io.ByteArrayInputStream;
@@ -44,7 +44,6 @@
 import java.nio.CharBuffer;
 import java.util.Arrays;
 import java.util.Collections;
-import java.util.Comparator;
 import java.util.Objects;
 
 import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION;
@@ -582,12 +581,12 @@
         } else {
            params += representationClass.getName();
         }
-        if (DataTransferer.isFlavorCharsetTextType(this) &&
+        if (DataFlavorUtil.isFlavorCharsetTextType(this) &&
             (isRepresentationClassInputStream() ||
              isRepresentationClassByteBuffer() ||
              byte[].class.equals(representationClass)))
         {
-            params += ";charset=" + DataTransferer.getTextCharset(this);
+            params += ";charset=" + DataFlavorUtil.getTextCharset(this);
         }
         return params;
     }
@@ -609,13 +608,8 @@
      * @since 1.3
      */
     public static final DataFlavor getTextPlainUnicodeFlavor() {
-        String encoding = null;
-        DataTransferer transferer = DataTransferer.getInstance();
-        if (transferer != null) {
-            encoding = transferer.getDefaultUnicodeEncoding();
-        }
         return new DataFlavor(
-            "text/plain;charset="+encoding
+            "text/plain;charset=" + DataFlavorUtil.getDesktopService().getDefaultUnicodeEncoding()
             +";class=java.io.InputStream", "Plain Text");
     }
 
@@ -741,12 +735,8 @@
             return null;
         }
 
-        if (textFlavorComparator == null) {
-            textFlavorComparator = new TextFlavorComparator();
-        }
-
         DataFlavor bestFlavor = Collections.max(Arrays.asList(availableFlavors),
-                                                textFlavorComparator);
+                                                DataFlavorUtil.getTextFlavorComparator());
 
         if (!bestFlavor.isFlavorTextType()) {
             return null;
@@ -755,46 +745,6 @@
         return bestFlavor;
     }
 
-    private static Comparator<DataFlavor> textFlavorComparator;
-
-    static class TextFlavorComparator
-            extends DataTransferer.DataFlavorComparator {
-
-        /**
-         * Compares two <code>DataFlavor</code> objects. Returns a negative
-         * integer, zero, or a positive integer as the first
-         * <code>DataFlavor</code> is worse than, equal to, or better than the
-         * second.
-         * <p>
-         * <code>DataFlavor</code>s are ordered according to the rules outlined
-         * for <code>selectBestTextFlavor</code>.
-         *
-         * @param flavor1 the first <code>DataFlavor</code> to be compared
-         * @param flavor2 the second <code>DataFlavor</code> to be compared
-         * @return a negative integer, zero, or a positive integer as the first
-         *         argument is worse, equal to, or better than the second
-         * @throws ClassCastException if either of the arguments is not an
-         *         instance of <code>DataFlavor</code>
-         * @throws NullPointerException if either of the arguments is
-         *         <code>null</code>
-         *
-         * @see #selectBestTextFlavor
-         */
-        public int compare(DataFlavor flavor1, DataFlavor flavor2) {
-            if (flavor1.isFlavorTextType()) {
-                if (flavor2.isFlavorTextType()) {
-                    return super.compare(flavor1, flavor2);
-                } else {
-                    return 1;
-                }
-            } else if (flavor2.isFlavorTextType()) {
-                return -1;
-            } else {
-                return 0;
-            }
-        }
-    }
-
     /**
      * Gets a Reader for a text flavor, decoded, if necessary, for the expected
      * charset (encoding). The supported representation classes are
@@ -1015,13 +965,13 @@
             }
 
             if ("text".equals(getPrimaryType())) {
-                if (DataTransferer.doesSubtypeSupportCharset(this)
+                if (DataFlavorUtil.doesSubtypeSupportCharset(this)
                         && representationClass != null
                         && !isStandardTextRepresentationClass()) {
                     String thisCharset =
-                            DataTransferer.canonicalName(this.getParameter("charset"));
+                            DataFlavorUtil.canonicalName(this.getParameter("charset"));
                     String thatCharset =
-                            DataTransferer.canonicalName(that.getParameter("charset"));
+                            DataFlavorUtil.canonicalName(that.getParameter("charset"));
                     if (!Objects.equals(thisCharset, thatCharset)) {
                         return false;
                     }
@@ -1088,10 +1038,10 @@
             // subTypes is '*', regardless of the other subType.
 
             if ("text".equals(primaryType)) {
-                if (DataTransferer.doesSubtypeSupportCharset(this)
+                if (DataFlavorUtil.doesSubtypeSupportCharset(this)
                         && representationClass != null
                         && !isStandardTextRepresentationClass()) {
-                    String charset = DataTransferer.canonicalName(getParameter("charset"));
+                    String charset = DataFlavorUtil.canonicalName(getParameter("charset"));
                     if (charset != null) {
                         total += charset.hashCode();
                     }
@@ -1280,9 +1230,8 @@
     * Returns true if the representation class is <code>Remote</code>.
     * @return true if the representation class is <code>Remote</code>
     */
-
     public boolean isRepresentationClassRemote() {
-        return DataTransferer.isRemote(representationClass);
+        return DataFlavorUtil.RMI.isRemote(representationClass);
     }
 
    /**
@@ -1356,8 +1305,8 @@
      * @since 1.4
      */
     public boolean isFlavorTextType() {
-        return (DataTransferer.isFlavorCharsetTextType(this) ||
-                DataTransferer.isFlavorNoncharsetTextType(this));
+        return (DataFlavorUtil.isFlavorCharsetTextType(this) ||
+                DataFlavorUtil.isFlavorNoncharsetTextType(this));
     }
 
    /**
--- a/src/java.desktop/share/classes/java/awt/datatransfer/SystemFlavorMap.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/java/awt/datatransfer/SystemFlavorMap.java	Thu Aug 28 14:54:07 2014 -0700
@@ -25,22 +25,15 @@
 
 package java.awt.datatransfer;
 
-import java.awt.Toolkit;
-
-import java.io.BufferedInputStream;
-import java.io.InputStream;
-import java.lang.ref.SoftReference;
+import sun.datatransfer.DataFlavorUtil;
+import sun.datatransfer.DesktopDatatransferService;
 
 import java.io.BufferedReader;
-import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.io.IOException;
-
-import java.net.URL;
-import java.net.MalformedURLException;
-
+import java.lang.ref.SoftReference;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -48,12 +41,8 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
-import java.util.Properties;
 import java.util.Set;
 
-import sun.awt.AppContext;
-import sun.awt.datatransfer.DataTransferer;
-
 /**
  * The SystemFlavorMap is a configurable map between "natives" (Strings), which
  * correspond to platform-specific data formats, and "flavors" (DataFlavors),
@@ -74,13 +63,6 @@
     private static final Object FLAVOR_MAP_KEY = new Object();
 
     /**
-     * Copied from java.util.Properties.
-     */
-    private static final String keyValueSeparators = "=: \t\r\n\f";
-    private static final String strictKeyValueSeparators = "=:";
-    private static final String whiteSpaceChars = " \t\r\n\f";
-
-    /**
      * The list of valid, decoded text flavor representation classes, in order
      * from best to worst.
      */
@@ -198,16 +180,11 @@
 
     /**
      * Returns the default FlavorMap for this thread's ClassLoader.
+     *
      * @return the default FlavorMap for this thread's ClassLoader
      */
     public static FlavorMap getDefaultFlavorMap() {
-        AppContext context = AppContext.getAppContext();
-        FlavorMap fm = (FlavorMap) context.get(FLAVOR_MAP_KEY);
-        if (fm == null) {
-            fm = new SystemFlavorMap();
-            context.put(FLAVOR_MAP_KEY, fm);
-        }
-        return fm;
+        return DataFlavorUtil.getDesktopService().getFlavorMap(SystemFlavorMap::new);
     }
 
     private SystemFlavorMap() {
@@ -223,7 +200,7 @@
         }
         isMapInitialized = true;
 
-        InputStream is = SystemFlavorMap.class.getResourceAsStream("/sun/awt/datatransfer/flavormap.properties");
+        InputStream is = SystemFlavorMap.class.getResourceAsStream("/sun/datatransfer/resources/flavormap.properties");
         if (is == null) {
             throw new InternalError("Default flavor mapping not found");
         }
@@ -238,22 +215,25 @@
                     line = line.substring(0, line.length() - 1) + reader.readLine().trim();
                 }
                 int delimiterPosition = line.indexOf('=');
-                String key = line.substring(0, delimiterPosition).replace("\\ ", " ");
+                String key = line.substring(0, delimiterPosition).replaceAll("\\ ", " ");
                 String[] values = line.substring(delimiterPosition + 1, line.length()).split(",");
                 for (String value : values) {
                     try {
+                        value = loadConvert(value);
                         MimeType mime = new MimeType(value);
                         if ("text".equals(mime.getPrimaryType())) {
                             String charset = mime.getParameter("charset");
-                            if (DataTransferer.doesSubtypeSupportCharset(mime.getSubType(), charset))
+                            if (DataFlavorUtil.doesSubtypeSupportCharset(mime.getSubType(), charset))
                             {
                                 // We need to store the charset and eoln
                                 // parameters, if any, so that the
                                 // DataTransferer will have this information
                                 // for conversion into the native format.
-                                DataTransferer transferer = DataTransferer.getInstance();
-                                if (transferer != null) {
-                                    transferer.registerTextFlavorProperties(key, charset,
+                                DesktopDatatransferService desktopService =
+                                        DataFlavorUtil.getDesktopService();
+                                if (desktopService.isDesktopPresent()) {
+                                    desktopService.registerTextFlavorProperties(
+                                            key, charset,
                                             mime.getParameter("eoln"),
                                             mime.getParameter("terminators"));
                                 }
@@ -305,6 +285,63 @@
         }
     }
 
+    // Copied from java.util.Properties
+    private static String loadConvert(String theString) {
+        char aChar;
+        int len = theString.length();
+        StringBuilder outBuffer = new StringBuilder(len);
+
+        for (int x = 0; x < len; ) {
+            aChar = theString.charAt(x++);
+            if (aChar == '\\') {
+                aChar = theString.charAt(x++);
+                if (aChar == 'u') {
+                    // Read the xxxx
+                    int value = 0;
+                    for (int i = 0; i < 4; i++) {
+                        aChar = theString.charAt(x++);
+                        switch (aChar) {
+                            case '0': case '1': case '2': case '3': case '4':
+                            case '5': case '6': case '7': case '8': case '9': {
+                                value = (value << 4) + aChar - '0';
+                                break;
+                            }
+                            case 'a': case 'b': case 'c':
+                            case 'd': case 'e': case 'f': {
+                                value = (value << 4) + 10 + aChar - 'a';
+                                break;
+                            }
+                            case 'A': case 'B': case 'C':
+                            case 'D': case 'E': case 'F': {
+                                value = (value << 4) + 10 + aChar - 'A';
+                                break;
+                            }
+                            default: {
+                                throw new IllegalArgumentException(
+                                        "Malformed \\uxxxx encoding.");
+                            }
+                        }
+                    }
+                    outBuffer.append((char)value);
+                } else {
+                    if (aChar == 't') {
+                        aChar = '\t';
+                    } else if (aChar == 'r') {
+                        aChar = '\r';
+                    } else if (aChar == 'n') {
+                        aChar = '\n';
+                    } else if (aChar == 'f') {
+                        aChar = '\f';
+                    }
+                    outBuffer.append(aChar);
+                }
+            } else {
+                outBuffer.append(aChar);
+            }
+        }
+        return outBuffer.toString();
+    }
+
     /**
      * Stores the listed object under the specified hash key in map. Unlike a
      * standard map, the listed object will not replace any object already at
@@ -332,10 +369,10 @@
         LinkedHashSet<DataFlavor> flavors = getNativeToFlavor().get(nat);
 
         if (nat != null && !disabledMappingGenerationKeys.contains(nat)) {
-            DataTransferer transferer = DataTransferer.getInstance();
-            if (transferer != null) {
+            DesktopDatatransferService desktopService = DataFlavorUtil.getDesktopService();
+            if (desktopService.isDesktopPresent()) {
                 LinkedHashSet<DataFlavor> platformFlavors =
-                        transferer.getPlatformMappingsForNative(nat);
+                        desktopService.getPlatformMappingsForNative(nat);
                 if (!platformFlavors.isEmpty()) {
                     if (flavors != null) {
                         // Prepending the platform-specific mappings ensures
@@ -395,10 +432,10 @@
         LinkedHashSet<String> natives = getFlavorToNative().get(flav);
 
         if (flav != null && !disabledMappingGenerationKeys.contains(flav)) {
-            DataTransferer transferer = DataTransferer.getInstance();
-            if (transferer != null) {
+            DesktopDatatransferService desktopService = DataFlavorUtil.getDesktopService();
+            if (desktopService.isDesktopPresent()) {
                 LinkedHashSet<String> platformNatives =
-                    transferer.getPlatformMappingsForFlavor(flav);
+                        desktopService.getPlatformMappingsForFlavor(flav);
                 if (!platformNatives.isEmpty()) {
                     if (natives != null) {
                         // Prepend the platform-specific mappings to ensure
@@ -474,7 +511,7 @@
             // In this case we shouldn't synthesize a native for this flavor,
             // since its mappings were explicitly specified.
             retval = flavorToNativeLookup(flav, false);
-        } else if (DataTransferer.isFlavorCharsetTextType(flav)) {
+        } else if (DataFlavorUtil.isFlavorCharsetTextType(flav)) {
             retval = new LinkedHashSet<>(0);
 
             // For text/* flavors, flavor-to-native mappings specified in
@@ -502,7 +539,7 @@
                 // addUnencodedNativeForFlavor(), so they have lower priority.
                 retval.addAll(flavorToNativeLookup(flav, false));
             }
-        } else if (DataTransferer.isFlavorNoncharsetTextType(flav)) {
+        } else if (DataFlavorUtil.isFlavorNoncharsetTextType(flav)) {
             retval = getTextTypeToNative().get(flav.mimeType.getBaseType());
 
             if (retval == null || retval.isEmpty()) {
@@ -602,7 +639,7 @@
             // on load from flavormap.properties.
         }
 
-        if (DataTransferer.doesSubtypeSupportCharset(subType, null)) {
+        if (DataFlavorUtil.doesSubtypeSupportCharset(subType, null)) {
             if (TEXT_PLAIN_BASE_TYPE.equals(baseType))
             {
                 returnValue.add(DataFlavor.stringFlavor);
@@ -624,7 +661,7 @@
                 }
             }
 
-            for (String charset : DataTransferer.standardEncodings()) {
+            for (String charset : DataFlavorUtil.standardEncodings()) {
 
                 for (String encodedTextClass : ENCODED_TEXT_CLASSES) {
                     final String mimeType =
--- a/src/java.desktop/share/classes/java/awt/font/TextLayout.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/java/awt/font/TextLayout.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1811,7 +1811,7 @@
      * should be logical or visual counterparts.  They are not
      * checked for validity.
      */
-    private final TextHitInfo getStrongHit(TextHitInfo hit1, TextHitInfo hit2) {
+    private TextHitInfo getStrongHit(TextHitInfo hit1, TextHitInfo hit2) {
 
         // right now we're using the following rule for strong hits:
         // A hit on a character with a lower level
--- a/src/java.desktop/share/classes/java/beans/PropertyChangeSupport.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/java/beans/PropertyChangeSupport.java	Thu Aug 28 14:54:07 2014 -0700
@@ -544,7 +544,7 @@
         /**
          * {@inheritDoc}
          */
-        public final PropertyChangeListener extract(PropertyChangeListener listener) {
+        public PropertyChangeListener extract(PropertyChangeListener listener) {
             while (listener instanceof PropertyChangeListenerProxy) {
                 listener = ((PropertyChangeListenerProxy) listener).getListener();
             }
--- a/src/java.desktop/share/classes/java/beans/VetoableChangeSupport.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/java/beans/VetoableChangeSupport.java	Thu Aug 28 14:54:07 2014 -0700
@@ -533,7 +533,7 @@
         /**
          * {@inheritDoc}
          */
-        public final VetoableChangeListener extract(VetoableChangeListener listener) {
+        public VetoableChangeListener extract(VetoableChangeListener listener) {
             while (listener instanceof VetoableChangeListenerProxy) {
                 listener = ((VetoableChangeListenerProxy) listener).getListener();
             }
--- a/src/java.desktop/share/classes/javax/sound/midi/ControllerEventListener.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/ControllerEventListener.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -27,38 +27,35 @@
 
 import java.util.EventListener;
 
-
 /**
- * The <code>ControllerEventListener</code> interface should be implemented
- * by classes whose instances need to be notified when a <code>Sequencer</code>
- * has processed a requested type of MIDI control-change event.
- * To register a <code>ControllerEventListener</code> object to receive such
- * notifications, invoke the
+ * The {@code ControllerEventListener} interface should be implemented by
+ * classes whose instances need to be notified when a {@link Sequencer} has
+ * processed a requested type of MIDI control-change event. To register a
+ * {@code ControllerEventListener} object to receive such notifications, invoke
+ * the
  * {@link Sequencer#addControllerEventListener(ControllerEventListener, int[])
- * addControllerEventListener} method of <code>Sequencer</code>,
- * specifying the types of MIDI controllers about which you are interested in
- * getting control-change notifications.
- *
- * @see MidiChannel#controlChange(int, int)
+ * addControllerEventListener} method of {@code Sequencer}, specifying the types
+ * of MIDI controllers about which you are interested in getting control-change
+ * notifications.
  *
  * @author Kara Kytle
+ * @see MidiChannel#controlChange(int, int)
  */
 public interface ControllerEventListener extends EventListener {
 
     /**
-     * Invoked when a <code>Sequencer</code> has encountered and processed
-     * a control-change event of interest to this listener.  The event passed
-     * in is a <code>ShortMessage</code> whose first data byte indicates
-     * the controller number and whose second data byte is the value to which
-     * the controller was set.
+     * Invoked when a {@link Sequencer} has encountered and processed a
+     * control-change event of interest to this listener. The event passed in is
+     * a {@code ShortMessage} whose first data byte indicates the controller
+     * number and whose second data byte is the value to which the controller
+     * was set.
      *
-     * @param event the control-change event that the sequencer encountered in
-     * the sequence it is processing
-     *
+     * @param  event the control-change event that the sequencer encountered in
+     *         the sequence it is processing
      * @see Sequencer#addControllerEventListener(ControllerEventListener, int[])
      * @see MidiChannel#controlChange(int, int)
      * @see ShortMessage#getData1
      * @see ShortMessage#getData2
      */
-    public void controlChange(ShortMessage event);
+    void controlChange(ShortMessage event);
 }
--- a/src/java.desktop/share/classes/javax/sound/midi/Instrument.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/Instrument.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -25,49 +25,41 @@
 
 package javax.sound.midi;
 
-import java.net.URL;
-
-
-
 /**
- * An instrument is a sound-synthesis algorithm with certain parameter
- * settings, usually designed to emulate a specific real-world
- * musical instrument or to achieve a specific sort of sound effect.
- * Instruments are typically stored in collections called soundbanks.
- * Before the instrument can be used to play notes, it must first be loaded
- * onto a synthesizer, and then it must be selected for use on
- * one or more channels, via a program-change command.  MIDI notes
- * that are subsequently received on those channels will be played using
+ * An instrument is a sound-synthesis algorithm with certain parameter settings,
+ * usually designed to emulate a specific real-world musical instrument or to
+ * achieve a specific sort of sound effect. Instruments are typically stored in
+ * collections called soundbanks. Before the instrument can be used to play
+ * notes, it must first be loaded onto a synthesizer, and then it must be
+ * selected for use on one or more channels, via a program-change command. MIDI
+ * notes that are subsequently received on those channels will be played using
  * the sound of the selected instrument.
  *
+ * @author Kara Kytle
  * @see Soundbank
  * @see Soundbank#getInstruments
  * @see Patch
  * @see Synthesizer#loadInstrument(Instrument)
  * @see MidiChannel#programChange(int, int)
- * @author Kara Kytle
  */
-
 public abstract class Instrument extends SoundbankResource {
 
-
     /**
-     * Instrument patch
+     * Instrument patch.
      */
     private final Patch patch;
 
-
     /**
-     * Constructs a new MIDI instrument from the specified <code>Patch</code>.
-     * When a subsequent request is made to load the
-     * instrument, the sound bank will search its contents for this instrument's <code>Patch</code>,
-     * and the instrument will be loaded into the synthesizer at the
-     * bank and program location indicated by the <code>Patch</code> object.
-     * @param soundbank sound bank containing the instrument
-     * @param patch the patch of this instrument
-     * @param name the name of this instrument
-     * @param dataClass the class used to represent the sample's data.
+     * Constructs a new MIDI instrument from the specified {@code Patch}. When a
+     * subsequent request is made to load the instrument, the sound bank will
+     * search its contents for this instrument's {@code Patch}, and the
+     * instrument will be loaded into the synthesizer at the bank and program
+     * location indicated by the {@code Patch} object.
      *
+     * @param  soundbank sound bank containing the instrument
+     * @param  patch the patch of this instrument
+     * @param  name the name of this instrument
+     * @param  dataClass the class used to represent the sample's data
      * @see Synthesizer#loadInstrument(Instrument)
      */
     protected Instrument(Soundbank soundbank, Patch patch, String name, Class<?> dataClass) {
@@ -76,10 +68,10 @@
         this.patch = patch;
     }
 
-
     /**
-     * Obtains the <code>Patch</code> object that indicates the bank and program
+     * Obtains the {@code Patch} object that indicates the bank and program
      * numbers where this instrument is to be stored in the synthesizer.
+     *
      * @return this instrument's patch
      */
     public Patch getPatch() {
--- a/src/java.desktop/share/classes/javax/sound/midi/InvalidMidiDataException.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/InvalidMidiDataException.java	Thu Aug 28 14:54:07 2014 -0700
@@ -25,25 +25,25 @@
 
 package javax.sound.midi;
 
-
 /**
- * An <code>InvalidMidiDataException</code> indicates that inappropriate MIDI
- * data was encountered. This often means that the data is invalid in and of
- * itself, from the perspective of the MIDI specification.  An example would
- * be an undefined status byte.  However, the exception might simply
- * mean that the data was invalid in the context it was used, or that
- * the object to which the data was given was unable to parse or use it.
- * For example, a file reader might not be able to parse a Type 2 MIDI file, even
- * though that format is defined in the MIDI specification.
+ * An {@code InvalidMidiDataException} indicates that inappropriate MIDI data
+ * was encountered. This often means that the data is invalid in and of itself,
+ * from the perspective of the MIDI specification. An example would be an
+ * undefined status byte. However, the exception might simply mean that the data
+ * was invalid in the context it was used, or that the object to which the data
+ * was given was unable to parse or use it. For example, a file reader might not
+ * be able to parse a Type 2 MIDI file, even though that format is defined in
+ * the MIDI specification.
  *
  * @author Kara Kytle
  */
 public class InvalidMidiDataException extends Exception {
+
     private static final long serialVersionUID = 2780771756789932067L;
 
     /**
-     * Constructs an <code>InvalidMidiDataException</code> with
-     * <code>null</code> for its error detail message.
+     * Constructs an {@code InvalidMidiDataException} with {@code null} for its
+     * error detail message.
      */
     public InvalidMidiDataException() {
 
@@ -51,10 +51,10 @@
     }
 
     /**
-     *  Constructs an <code>InvalidMidiDataException</code> with the
-     * specified detail message.
+     * Constructs an {@code InvalidMidiDataException} with the specified detail
+     * message.
      *
-     * @param message the string to display as an error detail message
+     * @param  message the string to display as an error detail message
      */
     public InvalidMidiDataException(String message) {
 
--- a/src/java.desktop/share/classes/javax/sound/midi/MetaEventListener.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/MetaEventListener.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -27,24 +27,23 @@
 
 import java.util.EventListener;
 
-
 /**
- * The <code>MetaEventListener</code> interface should be implemented
- * by classes whose instances need to be notified when a <code>{@link Sequencer}</code>
- * has processed a <code>{@link MetaMessage}</code>.
- * To register a <code>MetaEventListener</code> object to receive such
- * notifications, pass it as the argument to the
- * <code>{@link Sequencer#addMetaEventListener(MetaEventListener) addMetaEventListener}</code>
- * method of <code>Sequencer</code>.
+ * The {@code MetaEventListener} interface should be implemented by classes
+ * whose instances need to be notified when a {@link Sequencer} has processed a
+ * {@link MetaMessage}. To register a {@code MetaEventListener} object to
+ * receive such notifications, pass it as the argument to the
+ * {@link Sequencer#addMetaEventListener(MetaEventListener)
+ * addMetaEventListener} method of {@code Sequencer}.
  *
  * @author Kara Kytle
  */
 public interface MetaEventListener extends EventListener {
 
     /**
-     * Invoked when a <code>{@link Sequencer}</code> has encountered and processed
-     * a <code>MetaMessage</code> in the <code>{@link Sequence}</code> it is processing.
-     * @param meta the meta-message that the sequencer encountered
+     * Invoked when a {@link Sequencer} has encountered and processed a
+     * {@code MetaMessage} in the {@code Sequence} it is processing.
+     *
+     * @param  meta the meta-message that the sequencer encountered
      */
-    public void meta(MetaMessage meta);
+    void meta(MetaMessage meta);
 }
--- a/src/java.desktop/share/classes/javax/sound/midi/MetaMessage.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/MetaMessage.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -25,65 +25,54 @@
 
 package javax.sound.midi;
 
-
 /**
- * A <code>MetaMessage</code> is a <code>{@link MidiMessage}</code> that is not meaningful to synthesizers, but
- * that can be stored in a MIDI file and interpreted by a sequencer program.
- * (See the discussion in the <code>MidiMessage</code>
- * class description.)  The Standard MIDI Files specification defines
- * various types of meta-events, such as sequence number, lyric, cue point,
- * and set tempo.  There are also meta-events
- * for such information as lyrics, copyrights, tempo indications, time and key
- * signatures, markers, etc.  For more information, see the Standard MIDI Files 1.0
- * specification, which is part of the Complete MIDI 1.0 Detailed Specification
- * published by the MIDI Manufacturer's Association
+ * A {@code MetaMessage} is a {@link MidiMessage} that is not meaningful to
+ * synthesizers, but that can be stored in a MIDI file and interpreted by a
+ * sequencer program. (See the discussion in the {@code MidiMessage} class
+ * description.) The Standard MIDI Files specification defines various types of
+ * meta-events, such as sequence number, lyric, cue point, and set tempo. There
+ * are also meta-events for such information as lyrics, copyrights, tempo
+ * indications, time and key signatures, markers, etc. For more information, see
+ * the Standard MIDI Files 1.0 specification, which is part of the Complete MIDI
+ * 1.0 Detailed Specification published by the MIDI Manufacturer's Association
  * (<a href = http://www.midi.org>http://www.midi.org</a>).
- *
  * <p>
- * When data is being transported using MIDI wire protocol,
- * a <code>{@link ShortMessage}</code> with the status value <code>0xFF</code> represents
- * a system reset message.  In MIDI files, this same status value denotes a <code>MetaMessage</code>.
- * The types of meta-message are distinguished from each other by the first byte
- * that follows the status byte <code>0xFF</code>.  The subsequent bytes are data
- * bytes.  As with system exclusive messages, there are an arbitrary number of
- * data bytes, depending on the type of <code>MetaMessage</code>.
- *
- * @see MetaEventListener
+ * When data is being transported using MIDI wire protocol, a
+ * {@link ShortMessage} with the status value {@code 0xFF} represents a system
+ * reset message. In MIDI files, this same status value denotes a
+ * {@code MetaMessage}. The types of meta-message are distinguished from each
+ * other by the first byte that follows the status byte {@code 0xFF}. The
+ * subsequent bytes are data bytes. As with system exclusive messages, there are
+ * an arbitrary number of data bytes, depending on the type of
+ * {@code MetaMessage}.
  *
  * @author David Rivas
  * @author Kara Kytle
+ * @see MetaEventListener
  */
-
 public class MetaMessage extends MidiMessage {
 
-
-    // Status byte defines
-
     /**
-     * Status byte for <code>MetaMessage</code> (0xFF, or 255), which is used
-     * in MIDI files.  It has the same value as SYSTEM_RESET, which
-     * is used in the real-time "MIDI wire" protocol.
+     * Status byte for {@code MetaMessage} (0xFF, or 255), which is used in MIDI
+     * files. It has the same value as SYSTEM_RESET, which is used in the
+     * real-time "MIDI wire" protocol.
+     *
      * @see MidiMessage#getStatus
      */
     public static final int META                                                = 0xFF; // 255
 
-    // Instance variables
-
     /**
-     * The length of the actual message in the data array.
-     * This is used to determine how many bytes of the data array
-     * is the message, and how many are the status byte, the
-     * type byte, and the variable-length-int describing the
-     * length of the message.
+     * The length of the actual message in the data array. This is used to
+     * determine how many bytes of the data array is the message, and how many
+     * are the status byte, the type byte, and the variable-length-int
+     * describing the length of the message.
      */
     private int dataLength = 0;
 
-
     /**
-     * Constructs a new <code>MetaMessage</code>. The contents of
-     * the message are not set here; use
-     * {@link #setMessage(int, byte[], int) setMessage}
-     * to set them subsequently.
+     * Constructs a new {@code MetaMessage}. The contents of the message are not
+     * set here; use {@link #setMessage(int, byte[], int) setMessage} to set
+     * them subsequently.
      */
     public MetaMessage() {
         // Default meta message data: just the META status byte value
@@ -91,17 +80,17 @@
     }
 
     /**
-     * Constructs a new {@code MetaMessage} and sets the message parameters.
-     * The contents of the message can be changed by using
-     * the {@code setMessage} method.
+     * Constructs a new {@code MetaMessage} and sets the message parameters. The
+     * contents of the message can be changed by using the {@code setMessage}
+     * method.
      *
-     * @param type   meta-message type (must be less than 128)
-     * @param data   the data bytes in the MIDI message
-     * @param length an amount of bytes in the {@code data} byte array;
-     *     it should be non-negative and less than or equal to
-     *     {@code data.length}
-     * @throws InvalidMidiDataException if the parameter values do not specify
-     *     a valid MIDI meta message
+     * @param  type meta-message type (must be less than 128)
+     * @param  data the data bytes in the MIDI message
+     * @param  length an amount of bytes in the {@code data} byte array; it
+     *         should be non-negative and less than or equal to
+     *         {@code data.length}
+     * @throws InvalidMidiDataException if the parameter values do not specify a
+     *         valid MIDI meta message
      * @see #setMessage(int, byte[], int)
      * @see #getType()
      * @see #getData()
@@ -113,12 +102,11 @@
         setMessage(type, data, length); // can throw InvalidMidiDataException
     }
 
-
     /**
-     * Constructs a new <code>MetaMessage</code>.
-     * @param data an array of bytes containing the complete message.
-     * The message data may be changed using the <code>setMessage</code>
-     * method.
+     * Constructs a new {@code MetaMessage}.
+     *
+     * @param  data an array of bytes containing the complete message. The
+     *         message data may be changed using the {@code setMessage} method.
      * @see #setMessage
      */
     protected MetaMessage(byte[] data) {
@@ -133,24 +121,24 @@
         }
     }
 
-
     /**
-     * Sets the message parameters for a <code>MetaMessage</code>.
-     * Since only one status byte value, <code>0xFF</code>, is allowed for meta-messages,
-     * it does not need to be specified here.  Calls to <code>{@link MidiMessage#getStatus getStatus}</code> return
-     * <code>0xFF</code> for all meta-messages.
+     * Sets the message parameters for a {@code MetaMessage}. Since only one
+     * status byte value, {@code 0xFF}, is allowed for meta-messages, it does
+     * not need to be specified here. Calls to
+     * {@link MidiMessage#getStatus getStatus} return {@code 0xFF} for all
+     * meta-messages.
      * <p>
-     * The <code>type</code> argument should be a valid value for the byte that
-     * follows the status byte in the <code>MetaMessage</code>.  The <code>data</code> argument
-     * should contain all the subsequent bytes of the <code>MetaMessage</code>.  In other words,
-     * the byte that specifies the type of <code>MetaMessage</code> is not considered a data byte.
+     * The {@code type} argument should be a valid value for the byte that
+     * follows the status byte in the {@code MetaMessage}. The {@code data}
+     * argument should contain all the subsequent bytes of the
+     * {@code MetaMessage}. In other words, the byte that specifies the type of
+     * {@code MetaMessage} is not considered a data byte.
      *
-     * @param type              meta-message type (must be less than 128)
-     * @param data              the data bytes in the MIDI message
-     * @param length    the number of bytes in the <code>data</code>
-     * byte array
-     * @throws                  InvalidMidiDataException  if the
-     * parameter values do not specify a valid MIDI meta message
+     * @param  type meta-message type (must be less than 128)
+     * @param  data the data bytes in the MIDI message
+     * @param  length the number of bytes in the {@code data} byte array
+     * @throws InvalidMidiDataException if the parameter values do not specify a
+     *         valid MIDI meta message
      */
     public void setMessage(int type, byte[] data, int length) throws InvalidMidiDataException {
 
@@ -172,10 +160,10 @@
         }
     }
 
-
     /**
-     * Obtains the type of the <code>MetaMessage</code>.
-     * @return an integer representing the <code>MetaMessage</code> type
+     * Obtains the type of the {@code MetaMessage}.
+     *
+     * @return an integer representing the {@code MetaMessage} type
      */
     public int getType() {
         if (length>=2) {
@@ -184,16 +172,15 @@
         return 0;
     }
 
-
-
     /**
-     * Obtains a copy of the data for the meta message.  The returned
-     * array of bytes does not include the status byte or the message
-     * length data.  The length of the data for the meta message is
-     * the length of the array.  Note that the length of the entire
-     * message includes the status byte and the meta message type
-     * byte, and therefore may be longer than the returned array.
-     * @return array containing the meta message data.
+     * Obtains a copy of the data for the meta message. The returned array of
+     * bytes does not include the status byte or the message length data. The
+     * length of the data for the meta message is the length of the array. Note
+     * that the length of the entire message includes the status byte and the
+     * meta message type byte, and therefore may be longer than the returned
+     * array.
+     *
+     * @return array containing the meta message data
      * @see MidiMessage#getLength
      */
     public byte[] getData() {
@@ -202,10 +189,10 @@
         return returnedArray;
     }
 
-
     /**
-     * Creates a new object of the same class and with the same contents
-     * as this object.
+     * Creates a new object of the same class and with the same contents as this
+     * object.
+     *
      * @return a clone of this instance
      */
     public Object clone() {
@@ -240,5 +227,4 @@
         }
         data[off] = (byte) (value & mask);
     }
-
 }
--- a/src/java.desktop/share/classes/javax/sound/midi/MidiChannel.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/MidiChannel.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2004, 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
@@ -25,513 +25,450 @@
 
 package javax.sound.midi;
 
-
 /**
- * A <code>MidiChannel</code> object represents a single MIDI channel.
- * Generally, each <code>MidiChannel</code> method processes a like-named MIDI
- * "channel voice" or "channel mode" message as defined by the MIDI specification. However,
- * <code>MidiChannel</code> adds some "get" methods  that retrieve the value
- * most recently set by one of the standard MIDI channel messages.  Similarly,
- * methods for per-channel solo and mute have been added.
+ * A {@code MidiChannel} object represents a single MIDI channel. Generally,
+ * each {@code MidiChannel} method processes a like-named MIDI "channel voice"
+ * or "channel mode" message as defined by the MIDI specification. However,
+ * {@code MidiChannel} adds some "get" methods that retrieve the value most
+ * recently set by one of the standard MIDI channel messages. Similarly, methods
+ * for per-channel solo and mute have been added.
  * <p>
- * A <code>{@link Synthesizer}</code> object has a collection
- * of <code>MidiChannels</code>, usually one for each of the 16 channels
- * prescribed by the MIDI 1.0 specification.  The <code>Synthesizer</code>
- * generates sound when its <code>MidiChannels</code> receive
- * <code>noteOn</code> messages.
+ * A {@link Synthesizer} object has a collection of {@code MidiChannels},
+ * usually one for each of the 16 channels prescribed by the MIDI 1.0
+ * specification. The {@code Synthesizer} generates sound when its
+ * {@code MidiChannels} receive {@code noteOn} messages.
  * <p>
  * See the MIDI 1.0 Specification for more information about the prescribed
- * behavior of the MIDI channel messages, which are not exhaustively
- * documented here.  The specification is titled <code>MIDI Reference:
- * The Complete MIDI 1.0 Detailed Specification</code>, and is published by
- * the MIDI Manufacturer's Association (<a href = http://www.midi.org>
- * http://www.midi.org</a>).
+ * behavior of the MIDI channel messages, which are not exhaustively documented
+ * here. The specification is titled
+ * {@code MIDI Reference: The Complete MIDI 1.0 Detailed Specification}, and is
+ * published by the MIDI Manufacturer's Association
+ * (<a href = http://www.midi.org>http://www.midi.org</a>).
  * <p>
  * MIDI was originally a protocol for reporting the gestures of a keyboard
- * musician.  This genesis is visible in the <code>MidiChannel</code> API, which
+ * musician. This genesis is visible in the {@code MidiChannel} API, which
  * preserves such MIDI concepts as key number, key velocity, and key pressure.
  * It should be understood that the MIDI data does not necessarily originate
  * with a keyboard player (the source could be a different kind of musician, or
- * software).  Some devices might generate constant values for velocity
- * and pressure, regardless of how the note was performed.
- * Also, the MIDI specification often leaves it up to the
- * synthesizer to use the data in the way the implementor sees fit.  For
- * example, velocity data need not always be mapped to volume and/or brightness.
- *
- * @see Synthesizer#getChannels
+ * software). Some devices might generate constant values for velocity and
+ * pressure, regardless of how the note was performed. Also, the MIDI
+ * specification often leaves it up to the synthesizer to use the data in the
+ * way the implementor sees fit. For example, velocity data need not always be
+ * mapped to volume and/or brightness.
  *
  * @author David Rivas
  * @author Kara Kytle
+ * @see Synthesizer#getChannels
  */
-
 public interface MidiChannel {
 
     /**
-     * Starts the specified note sounding.  The key-down velocity
-     * usually controls the note's volume and/or brightness.
-     * If <code>velocity</code> is zero, this method instead acts like
-     * {@link #noteOff(int)}, terminating the note.
+     * Starts the specified note sounding. The key-down velocity usually
+     * controls the note's volume and/or brightness. If {@code velocity} is
+     * zero, this method instead acts like {@link #noteOff(int)}, terminating
+     * the note.
      *
-     * @param noteNumber the MIDI note number, from 0 to 127 (60 = Middle C)
-     * @param velocity the speed with which the key was depressed
-     *
+     * @param  noteNumber the MIDI note number, from 0 to 127 (60 = Middle C)
+     * @param  velocity the speed with which the key was depressed
      * @see #noteOff(int, int)
      */
-    public void noteOn(int noteNumber, int velocity);
+    void noteOn(int noteNumber, int velocity);
 
     /**
-     * Turns the specified note off.  The key-up velocity, if not ignored, can
-     * be used to affect how quickly the note decays.
-     * In any case, the note might not die away instantaneously; its decay
-     * rate is determined by the internals of the <code>Instrument</code>.
-     * If the Hold Pedal (a controller; see
-     * {@link #controlChange(int, int) controlChange})
-     * is down, the effect of this method is deferred until the pedal is
-     * released.
+     * Turns the specified note off. The key-up velocity, if not ignored, can be
+     * used to affect how quickly the note decays. In any case, the note might
+     * not die away instantaneously; its decay rate is determined by the
+     * internals of the {@code Instrument}. If the Hold Pedal (a controller; see
+     * {@link #controlChange(int, int) controlChange}) is down, the effect of
+     * this method is deferred until the pedal is released.
      *
-     *
-     * @param noteNumber the MIDI note number, from 0 to 127 (60 = Middle C)
-     * @param velocity the speed with which the key was released
-     *
+     * @param  noteNumber the MIDI note number, from 0 to 127 (60 = Middle C)
+     * @param  velocity the speed with which the key was released
      * @see #noteOff(int)
      * @see #noteOn
      * @see #allNotesOff
      * @see #allSoundOff
      */
-    public void noteOff(int noteNumber, int velocity);
+    void noteOff(int noteNumber, int velocity);
 
     /**
      * Turns the specified note off.
      *
-     * @param noteNumber the MIDI note number, from 0 to 127 (60 = Middle C)
-     *
+     * @param  noteNumber the MIDI note number, from 0 to 127 (60 = Middle C)
      * @see #noteOff(int, int)
      */
-    public void noteOff(int noteNumber);
+    void noteOff(int noteNumber);
 
     /**
-     * Reacts to a change in the specified note's key pressure.
-     * Polyphonic key pressure
-     * allows a keyboard player to press multiple keys simultaneously, each
-     * with a different amount of pressure.  The pressure, if not ignored,
-     * is typically used to vary such features as the volume, brightness,
-     * or vibrato of the note.
+     * Reacts to a change in the specified note's key pressure. Polyphonic key
+     * pressure allows a keyboard player to press multiple keys simultaneously,
+     * each with a different amount of pressure. The pressure, if not ignored,
+     * is typically used to vary such features as the volume, brightness, or
+     * vibrato of the note.
+     * <p>
+     * It is possible that the underlying synthesizer does not support this MIDI
+     * message. In order to verify that {@code setPolyPressure} was successful,
+     * use {@code getPolyPressure}.
      *
-     * It is possible that the underlying synthesizer
-     * does not support this MIDI message. In order
-     * to verify that <code>setPolyPressure</code>
-     * was successful, use <code>getPolyPressure</code>.
-     *
-     * @param noteNumber the MIDI note number, from 0 to 127 (60 = Middle C)
-     * @param pressure value for the specified key, from 0 to 127 (127 =
-     * maximum pressure)
-     *
+     * @param  noteNumber the MIDI note number, from 0 to 127 (60 = Middle C)
+     * @param  pressure value for the specified key, from 0 to 127
+     *         (127 = maximum pressure)
      * @see #getPolyPressure(int)
      */
-    public void setPolyPressure(int noteNumber, int pressure);
+    void setPolyPressure(int noteNumber, int pressure);
 
     /**
      * Obtains the pressure with which the specified key is being depressed.
-     *
-     * @param noteNumber the MIDI note number, from 0 to 127 (60 = Middle C)
+     * <p>
+     * If the device does not support setting poly pressure, this method always
+     * returns 0. Calling {@code setPolyPressure} will have no effect then.
      *
-     * If the device does not support setting poly pressure,
-     * this method always returns 0. Calling
-     * <code>setPolyPressure</code> will have no effect then.
-     *
+     * @param  noteNumber the MIDI note number, from 0 to 127 (60 = Middle C)
      * @return the amount of pressure for that note, from 0 to 127
-     * (127 = maximum pressure)
-     *
+     *         (127 = maximum pressure)
      * @see #setPolyPressure(int, int)
      */
-    public int getPolyPressure(int noteNumber);
+    int getPolyPressure(int noteNumber);
 
     /**
-     * Reacts to a change in the keyboard pressure.  Channel
-     * pressure indicates how hard the keyboard player is depressing
-     * the entire keyboard.  This can be the maximum or
-     * average of the per-key pressure-sensor values, as set by
-     * <code>setPolyPressure</code>.  More commonly, it is a measurement of
-     * a single sensor on a device that doesn't implement polyphonic key
-     * pressure.  Pressure can be used to control various aspects of the sound,
-     * as described under {@link #setPolyPressure(int, int) setPolyPressure}.
+     * Reacts to a change in the keyboard pressure. Channel pressure indicates
+     * how hard the keyboard player is depressing the entire keyboard. This can
+     * be the maximum or average of the per-key pressure-sensor values, as set
+     * by {@code setPolyPressure}. More commonly, it is a measurement of a
+     * single sensor on a device that doesn't implement polyphonic key pressure.
+     * Pressure can be used to control various aspects of the sound, as
+     * described under {@link #setPolyPressure(int, int) setPolyPressure}.
+     * <p>
+     * It is possible that the underlying synthesizer does not support this MIDI
+     * message. In order to verify that {@code setChannelPressure} was
+     * successful, use {@code getChannelPressure}.
      *
-     * It is possible that the underlying synthesizer
-     * does not support this MIDI message. In order
-     * to verify that <code>setChannelPressure</code>
-     * was successful, use <code>getChannelPressure</code>.
-     *
-     * @param pressure the pressure with which the keyboard is being depressed,
-     * from 0 to 127 (127 = maximum pressure)
+     * @param  pressure the pressure with which the keyboard is being depressed,
+     *         from 0 to 127 (127 = maximum pressure)
      * @see #setPolyPressure(int, int)
      * @see #getChannelPressure
      */
-    public void setChannelPressure(int pressure);
+    void setChannelPressure(int pressure);
 
     /**
      * Obtains the channel's keyboard pressure.
-     * If the device does not support setting channel pressure,
-     * this method always returns 0. Calling
-     * <code>setChannelPressure</code> will have no effect then.
+     * <p>
+     * If the device does not support setting channel pressure, this method
+     * always returns 0. Calling {@code setChannelPressure} will have no effect
+     * then.
      *
-     * @return the amount of pressure for that note,
-     *         from 0 to 127 (127 = maximum pressure)
-     *
+     * @return the amount of pressure for that note, from 0 to 127
+     *         (127 = maximum pressure)
      * @see #setChannelPressure(int)
      */
-    public int getChannelPressure();
+    int getChannelPressure();
 
     /**
-     * Reacts to a change in the specified controller's value.  A controller
-     * is some control other than a keyboard key, such as a
-     * switch, slider, pedal, wheel, or breath-pressure sensor.
-     * The MIDI 1.0 Specification provides standard numbers for typical
-     * controllers on MIDI devices, and describes the intended effect
-     * for some of the controllers.
-     * The way in which an
-     * <code>Instrument</code> reacts to a controller change may be
-     * specific to the <code>Instrument</code>.
+     * Reacts to a change in the specified controller's value. A controller is
+     * some control other than a keyboard key, such as a switch, slider, pedal,
+     * wheel, or breath-pressure sensor. The MIDI 1.0 Specification provides
+     * standard numbers for typical controllers on MIDI devices, and describes
+     * the intended effect for some of the controllers. The way in which an
+     * {@code Instrument} reacts to a controller change may be specific to the
+     * {@code Instrument}.
      * <p>
-     * The MIDI 1.0 Specification defines both 7-bit controllers
-     * and 14-bit controllers.  Continuous controllers, such
-     * as wheels and sliders, typically have 14 bits (two MIDI bytes),
-     * while discrete controllers, such as switches, typically have 7 bits
-     * (one MIDI byte).  Refer to the specification to see the
-     * expected resolution for each type of control.
+     * The MIDI 1.0 Specification defines both 7-bit controllers and 14-bit
+     * controllers. Continuous controllers, such as wheels and sliders,
+     * typically have 14 bits (two MIDI bytes), while discrete controllers, such
+     * as switches, typically have 7 bits (one MIDI byte). Refer to the
+     * specification to see the expected resolution for each type of control.
      * <p>
-     * Controllers 64 through 95 (0x40 - 0x5F) allow 7-bit precision.
-     * The value of a 7-bit controller is set completely by the
-     * <code>value</code> argument.  An additional set of controllers
-     * provide 14-bit precision by using two controller numbers, one
-     * for the most significant 7 bits and another for the least significant
-     * 7 bits.  Controller numbers 0 through 31 (0x00 - 0x1F) control the
-     * most significant 7 bits of 14-bit controllers; controller numbers
-     * 32 through 63 (0x20 - 0x3F) control the least significant 7 bits of
-     * these controllers.  For example, controller number 7 (0x07) controls
-     * the upper 7 bits of the channel volume controller, and controller
-     * number 39 (0x27) controls the lower 7 bits.
-     * The value of a 14-bit controller is determined
-     * by the interaction of the two halves.  When the most significant 7 bits
-     * of a controller are set (using controller numbers 0 through 31), the
-     * lower 7 bits are automatically set to 0.  The corresponding controller
-     * number for the lower 7 bits may then be used to further modulate the
-     * controller value.
+     * Controllers 64 through 95 (0x40 - 0x5F) allow 7-bit precision. The value
+     * of a 7-bit controller is set completely by the {@code value} argument. An
+     * additional set of controllers provide 14-bit precision by using two
+     * controller numbers, one for the most significant 7 bits and another for
+     * the least significant 7 bits. Controller numbers 0 through 31
+     * (0x00 - 0x1F) control the most significant 7 bits of 14-bit controllers;
+     * controller numbers 32 through 63 (0x20 - 0x3F) control the least
+     * significant 7 bits of these controllers. For example, controller number 7
+     * (0x07) controls the upper 7 bits of the channel volume controller, and
+     * controller number 39 (0x27) controls the lower 7 bits. The value of a
+     * 14-bit controller is determined by the interaction of the two halves.
+     * When the most significant 7 bits of a controller are set (using
+     * controller numbers 0 through 31), the lower 7 bits are automatically set
+     * to 0. The corresponding controller number for the lower 7 bits may then
+     * be used to further modulate the controller value.
+     * <p>
+     * It is possible that the underlying synthesizer does not support a
+     * specific controller message. In order to verify that a call to
+     * {@code controlChange} was successful, use {@code getController}.
      *
-     * It is possible that the underlying synthesizer
-     * does not support a specific controller message. In order
-     * to verify that a call to <code>controlChange</code>
-     * was successful, use <code>getController</code>.
-     *
-     * @param controller the controller number (0 to 127; see the MIDI
-     * 1.0 Specification for the interpretation)
-     * @param value the value to which the specified controller is changed (0 to 127)
-     *
+     * @param  controller the controller number (0 to 127; see the MIDI 1.0
+     *         Specification for the interpretation)
+     * @param  value the value to which the specified controller is changed
+     *         (0 to 127)
      * @see #getController(int)
      */
-    public void controlChange(int controller, int value);
+    void controlChange(int controller, int value);
 
     /**
-     * Obtains the current value of the specified controller.  The return
-     * value is represented with 7 bits. For 14-bit controllers, the MSB and
-     * LSB controller value needs to be obtained separately. For example,
-     * the 14-bit value of the volume controller can be calculated by
-     * multiplying the value of controller 7 (0x07, channel volume MSB)
-     * with 128 and adding the
-     * value of controller 39 (0x27, channel volume LSB).
+     * Obtains the current value of the specified controller. The return value
+     * is represented with 7 bits. For 14-bit controllers, the MSB and LSB
+     * controller value needs to be obtained separately. For example, the 14-bit
+     * value of the volume controller can be calculated by multiplying the value
+     * of controller 7 (0x07, channel volume MSB) with 128 and adding the value
+     * of controller 39 (0x27, channel volume LSB).
+     * <p>
+     * If the device does not support setting a specific controller, this method
+     * returns 0 for that controller. Calling {@code controlChange} will have no
+     * effect then.
      *
-     * If the device does not support setting a specific controller,
-     * this method returns 0 for that controller.
-     * Calling <code>controlChange</code> will have no effect then.
-     *
-     * @param controller the number of the controller whose value is desired.
-     * The allowed range is 0-127; see the MIDI
-     * 1.0 Specification for the interpretation.
-     *
+     * @param  controller the number of the controller whose value is desired.
+     *         The allowed range is 0-127; see the MIDI 1.0 Specification for
+     *         the interpretation.
      * @return the current value of the specified controller (0 to 127)
-     *
      * @see #controlChange(int, int)
      */
-    public int getController(int controller);
+    int getController(int controller);
 
     /**
-     * Changes a program (patch).  This selects a specific
-     * instrument from the currently selected bank of instruments.
+     * Changes a program (patch). This selects a specific instrument from the
+     * currently selected bank of instruments.
      * <p>
-     * The MIDI specification does not
-     * dictate whether notes that are already sounding should switch
-     * to the new instrument (timbre) or continue with their original timbre
-     * until terminated by a note-off.
+     * The MIDI specification does not dictate whether notes that are already
+     * sounding should switch to the new instrument (timbre) or continue with
+     * their original timbre until terminated by a note-off.
      * <p>
-     * The program number is zero-based (expressed from 0 to 127).
-     * Note that MIDI hardware displays and literature about MIDI
-     * typically use the range 1 to 128 instead.
+     * The program number is zero-based (expressed from 0 to 127). Note that
+     * MIDI hardware displays and literature about MIDI typically use the range
+     * 1 to 128 instead.
+     * <p>
+     * It is possible that the underlying synthesizer does not support a
+     * specific program. In order to verify that a call to {@code programChange}
+     * was successful, use {@code getProgram}.
      *
-     * It is possible that the underlying synthesizer
-     * does not support a specific program. In order
-     * to verify that a call to <code>programChange</code>
-     * was successful, use <code>getProgram</code>.
-     *
-     * @param program the program number to switch to (0 to 127)
-     *
+     * @param  program the program number to switch to (0 to 127)
      * @see #programChange(int, int)
      * @see #getProgram()
      */
-    public void programChange(int program);
+    void programChange(int program);
 
     /**
      * Changes the program using bank and program (patch) numbers.
-     *
-     * It is possible that the underlying synthesizer
-     * does not support a specific bank, or program. In order
-     * to verify that a call to <code>programChange</code>
-     * was successful, use <code>getProgram</code> and
-     * <code>getController</code>.
-     * Since banks are changed by way of control changes,
-     * you can verify the current bank with the following
-     * statement:
+     * <p>
+     * It is possible that the underlying synthesizer does not support a
+     * specific bank, or program. In order to verify that a call to
+     * {@code programChange} was successful, use {@code getProgram} and
+     * {@code getController}. Since banks are changed by way of control changes,
+     * you can verify the current bank with the following statement:
      * <pre>
-     *   int bank = (getController(0) * 128)
-     *              + getController(32);
+     *   int bank = (getController(0) * 128) + getController(32);
      * </pre>
      *
-     * @param bank the bank number to switch to (0 to 16383)
-     * @param program the program (patch) to use in the specified bank (0 to 127)
+     * @param  bank the bank number to switch to (0 to 16383)
+     * @param  program the program (patch) to use in the specified bank
+     *         (0 to 127)
      * @see #programChange(int)
      * @see #getProgram()
      */
-    public void programChange(int bank, int program);
+    void programChange(int bank, int program);
 
     /**
      * Obtains the current program number for this channel.
+     *
      * @return the program number of the currently selected patch
      * @see Patch#getProgram
      * @see Synthesizer#loadInstrument
      * @see #programChange(int)
      */
-    public int getProgram();
+    int getProgram();
 
     /**
-     * Changes the pitch offset for all notes on this channel.
-     * This affects all currently sounding notes as well as subsequent ones.
-     * (For pitch bend to cease, the value needs to be reset to the
-     * center position.)
-     * <p> The MIDI specification
-     * stipulates that pitch bend be a 14-bit value, where zero
-     * is maximum downward bend, 16383 is maximum upward bend, and
-     * 8192 is the center (no pitch bend).  The actual
-     * amount of pitch change is not specified; it can be changed by
-     * a pitch-bend sensitivity setting.  However, the General MIDI
-     * specification says that the default range should be two semitones
-     * up and down from center.
+     * Changes the pitch offset for all notes on this channel. This affects all
+     * currently sounding notes as well as subsequent ones. (For pitch bend to
+     * cease, the value needs to be reset to the center position.)
+     * <p>
+     * The MIDI specification stipulates that pitch bend be a 14-bit value,
+     * where zero is maximum downward bend, 16383 is maximum upward bend, and
+     * 8192 is the center (no pitch bend). The actual amount of pitch change is
+     * not specified; it can be changed by a pitch-bend sensitivity setting.
+     * However, the General MIDI specification says that the default range
+     * should be two semitones up and down from center.
+     * <p>
+     * It is possible that the underlying synthesizer does not support this MIDI
+     * message. In order to verify that {@code setPitchBend} was successful, use
+     * {@code getPitchBend}.
      *
-     * It is possible that the underlying synthesizer
-     * does not support this MIDI message. In order
-     * to verify that <code>setPitchBend</code>
-     * was successful, use <code>getPitchBend</code>.
-     *
-     * @param bend the amount of pitch change, as a nonnegative 14-bit value
-     * (8192 = no bend)
-     *
+     * @param  bend the amount of pitch change, as a nonnegative 14-bit value
+     *         (8192 = no bend)
      * @see #getPitchBend
      */
-    public void setPitchBend(int bend);
+    void setPitchBend(int bend);
 
     /**
-     * Obtains the upward or downward pitch offset for this channel.
-     * If the device does not support setting pitch bend,
-     * this method always returns 8192. Calling
-     * <code>setPitchBend</code> will have no effect then.
+     * Obtains the upward or downward pitch offset for this channel. If the
+     * device does not support setting pitch bend, this method always returns
+     * 8192. Calling {@code setPitchBend} will have no effect then.
      *
      * @return bend amount, as a nonnegative 14-bit value (8192 = no bend)
-     *
      * @see #setPitchBend(int)
      */
-    public int getPitchBend();
+    int getPitchBend();
 
     /**
      * Resets all the implemented controllers to their default values.
      *
      * @see #controlChange(int, int)
      */
-    public void resetAllControllers();
+    void resetAllControllers();
 
     /**
-     * Turns off all notes that are currently sounding on this channel.
-     * The notes might not die away instantaneously; their decay
-     * rate is determined by the internals of the <code>Instrument</code>.
-     * If the Hold Pedal controller (see
-     * {@link #controlChange(int, int) controlChange})
-     * is down, the effect of this method is deferred until the pedal is
-     * released.
+     * Turns off all notes that are currently sounding on this channel. The
+     * notes might not die away instantaneously; their decay rate is determined
+     * by the internals of the {@code Instrument}. If the Hold Pedal controller
+     * (see {@link #controlChange(int, int) controlChange}) is down, the effect
+     * of this method is deferred until the pedal is released.
      *
      * @see #allSoundOff
      * @see #noteOff(int)
      */
-    public void allNotesOff();
+    void allNotesOff();
 
     /**
      * Immediately turns off all sounding notes on this channel, ignoring the
      * state of the Hold Pedal and the internal decay rate of the current
-     * <code>Instrument</code>.
+     * {@code Instrument}.
      *
      * @see #allNotesOff
      */
-    public void allSoundOff();
+    void allSoundOff();
 
     /**
-     * Turns local control on or off.  The default is for local control
-     * to be on.  The "on" setting means that if a device is capable
-     * of both synthesizing sound and transmitting MIDI messages,
-     * it will synthesize sound in response to the note-on and
-     * note-off messages that it itself transmits.  It will also respond
-     * to messages received from other transmitting devices.
-     * The "off" setting means that the synthesizer will ignore its
-     * own transmitted MIDI messages, but not those received from other devices.
+     * Turns local control on or off. The default is for local control to be on.
+     * The "on" setting means that if a device is capable of both synthesizing
+     * sound and transmitting MIDI messages, it will synthesize sound in
+     * response to the note-on and note-off messages that it itself transmits.
+     * It will also respond to messages received from other transmitting
+     * devices. The "off" setting means that the synthesizer will ignore its own
+     * transmitted MIDI messages, but not those received from other devices.
+     * <p>
+     * It is possible that the underlying synthesizer does not support local
+     * control. In order to verify that a call to {@code localControl} was
+     * successful, check the return value.
      *
-     * It is possible that the underlying synthesizer
-     * does not support local control. In order
-     * to verify that a call to <code>localControl</code>
-     * was successful, check the return value.
-     *
-     * @param on <code>true</code> to turn local control on, <code>false</code>
-     *  to turn local control off
-     * @return the new local-control value, or false
-     *         if local control is not supported
-     *
+     * @param  on {@code true} to turn local control on, {@code false} to turn
+     *         local control off
+     * @return the new local-control value, or false if local control is not
+     *         supported
      */
-    public boolean localControl(boolean on);
+    boolean localControl(boolean on);
 
     /**
-     * Turns mono mode on or off.  In mono mode, the channel synthesizes
-     * only one note at a time.  In poly mode (identical to mono mode off),
-     * the channel can synthesize multiple notes simultaneously.
-     * The default is mono off (poly mode on).
+     * Turns mono mode on or off. In mono mode, the channel synthesizes only one
+     * note at a time. In poly mode (identical to mono mode off), the channel
+     * can synthesize multiple notes simultaneously. The default is mono off
+     * (poly mode on).
      * <p>
-     * "Mono" is short for the word "monophonic," which in this context
-     * is opposed to the word "polyphonic" and refers to a single synthesizer
-     * voice per MIDI channel.  It
-     * has nothing to do with how many audio channels there might be
-     * (as in "monophonic" versus "stereophonic" recordings).
+     * "Mono" is short for the word "monophonic," which in this context is
+     * opposed to the word "polyphonic" and refers to a single synthesizer voice
+     * per MIDI channel. It has nothing to do with how many audio channels there
+     * might be (as in "monophonic" versus "stereophonic" recordings).
+     * <p>
+     * It is possible that the underlying synthesizer does not support mono
+     * mode. In order to verify that a call to {@code setMono} was successful,
+     * use {@code getMono}.
      *
-     * It is possible that the underlying synthesizer
-     * does not support mono mode. In order
-     * to verify that a call to <code>setMono</code>
-     * was successful, use <code>getMono</code>.
-     *
-     * @param on <code>true</code> to turn mono mode on, <code>false</code> to
-     * turn it off (which means turning poly mode on).
-     *
+     * @param  on {@code true} to turn mono mode on, {@code false} to turn it
+     *         off (which means turning poly mode on)
      * @see #getMono
      * @see VoiceStatus
      */
-    public void setMono(boolean on);
+    void setMono(boolean on);
 
     /**
-     * Obtains the current mono/poly mode.
-     * Synthesizers that do not allow changing mono/poly mode
-     * will always return the same value, regardless
-     * of calls to <code>setMono</code>.
-     * @return <code>true</code> if mono mode is on, otherwise
-     * <code>false</code> (meaning poly mode is on).
+     * Obtains the current mono/poly mode. Synthesizers that do not allow
+     * changing mono/poly mode will always return the same value, regardless of
+     * calls to {@code setMono}.
      *
+     * @return {@code true} if mono mode is on, otherwise {@code false} (meaning
+     *         poly mode is on)
      * @see #setMono(boolean)
      */
-    public boolean getMono();
+    boolean getMono();
 
     /**
-     * Turns omni mode on or off.  In omni mode, the channel responds
-     * to messages sent on all channels.  When omni is off, the channel
-     * responds only to messages sent on its channel number.
-     * The default is omni off.
+     * Turns omni mode on or off. In omni mode, the channel responds to messages
+     * sent on all channels. When omni is off, the channel responds only to
+     * messages sent on its channel number. The default is omni off.
+     * <p>
+     * It is possible that the underlying synthesizer does not support omni
+     * mode. In order to verify that {@code setOmni} was successful, use
+     * {@code getOmni}.
      *
-     * It is possible that the underlying synthesizer
-     * does not support omni mode. In order
-     * to verify that <code>setOmni</code>
-     * was successful, use <code>getOmni</code>.
-     *
-     * @param on <code>true</code> to turn omni mode on, <code>false</code> to
-     * turn it off.
-     *
+     * @param  on {@code true} to turn omni mode on, {@code false} to turn it
+     *         off
      * @see #getOmni
      * @see VoiceStatus
      */
-    public void setOmni(boolean on);
+    void setOmni(boolean on);
 
     /**
-     * Obtains the current omni mode.
-     * Synthesizers that do not allow changing the omni mode
-     * will always return the same value, regardless
-     * of calls to <code>setOmni</code>.
-     * @return <code>true</code> if omni mode is on, otherwise
-     * <code>false</code> (meaning omni mode is off).
+     * Obtains the current omni mode. Synthesizers that do not allow changing
+     * the omni mode will always return the same value, regardless of calls to
+     * {@code setOmni}.
      *
+     * @return {@code true} if omni mode is on, otherwise {@code false} (meaning
+     *         omni mode is off)
      * @see #setOmni(boolean)
      */
-    public boolean getOmni();
+    boolean getOmni();
 
     /**
-     * Sets the mute state for this channel. A value of
-     * <code>true</code> means the channel is to be muted, <code>false</code>
-     * means the channel can sound (if other channels are not soloed).
+     * Sets the mute state for this channel. A value of {@code true} means the
+     * channel is to be muted, {@code false} means the channel can sound (if
+     * other channels are not soloed).
      * <p>
-     * Unlike {@link #allSoundOff()}, this method
-     * applies to only a specific channel, not to all channels.  Further, it
-     * silences not only currently sounding notes, but also subsequently
-     * received notes.
+     * Unlike {@link #allSoundOff()}, this method applies to only a specific
+     * channel, not to all channels. Further, it silences not only currently
+     * sounding notes, but also subsequently received notes.
+     * <p>
+     * It is possible that the underlying synthesizer does not support muting
+     * channels. In order to verify that a call to {@code setMute} was
+     * successful, use {@code getMute}.
      *
-     * It is possible that the underlying synthesizer
-     * does not support muting channels. In order
-     * to verify that a call to <code>setMute</code>
-     * was successful, use <code>getMute</code>.
-     *
-     * @param mute the new mute state
-     *
+     * @param  mute the new mute state
      * @see #getMute
      * @see #setSolo(boolean)
      */
-    public void setMute(boolean mute);
+    void setMute(boolean mute);
 
     /**
-     * Obtains the current mute state for this channel.
-     * If the underlying synthesizer does not support
-     * muting this channel, this method always returns
-     * <code>false</code>.
+     * Obtains the current mute state for this channel. If the underlying
+     * synthesizer does not support muting this channel, this method always
+     * returns {@code false}.
      *
-     * @return <code>true</code> the channel is muted,
-     *         or <code>false</code> if not
-     *
+     * @return {@code true} the channel is muted, or {@code false} if not
      * @see #setMute(boolean)
      */
-    public boolean getMute();
+    boolean getMute();
 
     /**
-     * Sets the solo state for this channel.
-     * If <code>solo</code> is <code>true</code> only this channel
-     * and other soloed channels will sound. If <code>solo</code>
-     * is <code>false</code> then only other soloed channels will
-     * sound, unless no channels are soloed, in which case all
-     * unmuted channels will sound.
+     * Sets the solo state for this channel. If {@code solo} is {@code true}
+     * only this channel and other soloed channels will sound. If {@code solo}
+     * is {@code false} then only other soloed channels will sound, unless no
+     * channels are soloed, in which case all unmuted channels will sound.
+     * <p>
+     * It is possible that the underlying synthesizer does not support solo
+     * channels. In order to verify that a call to {@code setSolo} was
+     * successful, use {@code getSolo}.
      *
-     * It is possible that the underlying synthesizer
-     * does not support solo channels. In order
-     * to verify that a call to <code>setSolo</code>
-     * was successful, use <code>getSolo</code>.
-     *
-     * @param soloState new solo state for the channel
+     * @param  soloState new solo state for the channel
      * @see #getSolo()
      */
-    public void setSolo(boolean soloState);
+    void setSolo(boolean soloState);
 
     /**
-     * Obtains the current solo state for this channel.
-     * If the underlying synthesizer does not support
-     * solo on this channel, this method always returns
-     * <code>false</code>.
+     * Obtains the current solo state for this channel. If the underlying
+     * synthesizer does not support solo on this channel, this method always
+     * returns {@code false}.
      *
-     * @return <code>true</code> the channel is solo,
-     *         or <code>false</code> if not
-     *
+     * @return {@code true} the channel is solo, or {@code false} if not
      * @see #setSolo(boolean)
      */
-    public boolean getSolo();
+    boolean getSolo();
 }
--- a/src/java.desktop/share/classes/javax/sound/midi/MidiDevice.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/MidiDevice.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -27,64 +27,52 @@
 
 import java.util.List;
 
- /**
- * <code>MidiDevice</code> is the base interface for all MIDI devices.
- * Common devices include synthesizers, sequencers, MIDI input ports, and MIDI
- * output ports.
- *
- * <p>A <code>MidiDevice</code> can be a transmitter or a receiver of
- * MIDI events, or both. Therefore, it can provide {@link Transmitter}
- * or {@link Receiver} instances (or both). Typically, MIDI IN ports
- * provide transmitters, MIDI OUT ports and synthesizers provide
- * receivers. A Sequencer typically provides transmitters for playback
- * and receivers for recording.
- *
- * <p>A <code>MidiDevice</code> can be opened and closed explicitly as
- * well as implicitly. Explicit opening is accomplished by calling
- * {@link #open}, explicit closing is done by calling {@link
- * #close} on the <code>MidiDevice</code> instance.
- * If an application opens a <code>MidiDevice</code>
- * explicitly, it has to close it explicitly to free system resources
- * and enable the application to exit cleanly. Implicit opening is
- * done by calling {@link javax.sound.midi.MidiSystem#getReceiver
- * MidiSystem.getReceiver} and {@link
- * javax.sound.midi.MidiSystem#getTransmitter
- * MidiSystem.getTransmitter}. The <code>MidiDevice</code> used by
- * <code>MidiSystem.getReceiver</code> and
- * <code>MidiSystem.getTransmitter</code> is implementation-dependant
- * unless the properties <code>javax.sound.midi.Receiver</code>
- * and <code>javax.sound.midi.Transmitter</code> are used (see the
- * description of properties to select default providers in
- * {@link javax.sound.midi.MidiSystem}). A <code>MidiDevice</code>
- * that was opened implicitly, is closed implicitly by closing the
- * <code>Receiver</code> or <code>Transmitter</code> that resulted in
- * opening it. If more than one implicitly opening
- * <code>Receiver</code> or <code>Transmitter</code> were obtained by
- * the application, the device is closed after the last
- * <code>Receiver</code> or <code>Transmitter</code> has been
- * closed. On the other hand, calling <code>getReceiver</code> or
- * <code>getTransmitter</code> on the device instance directly does
- * not open the device implicitly. Closing these
- * <code>Transmitter</code>s and <code>Receiver</code>s does not close
- * the device implicitly. To use a device with <code>Receiver</code>s
- * or <code>Transmitter</code>s obtained this way, the device has to
- * be opened and closed explicitly.
- *
- * <p>If implicit and explicit opening and closing are mixed on the
- * same <code>MidiDevice</code> instance, the following rules apply:
+/**
+ * {@code MidiDevice} is the base interface for all MIDI devices. Common devices
+ * include synthesizers, sequencers, MIDI input ports, and MIDI output ports.
+ * <p>
+ * A {@code MidiDevice} can be a transmitter or a receiver of MIDI events, or
+ * both. Therefore, it can provide {@link Transmitter} or {@link Receiver}
+ * instances (or both). Typically, MIDI IN ports provide transmitters, MIDI OUT
+ * ports and synthesizers provide receivers. A Sequencer typically provides
+ * transmitters for playback and receivers for recording.
+ * <p>
+ * A {@code MidiDevice} can be opened and closed explicitly as well as
+ * implicitly. Explicit opening is accomplished by calling {@link #open},
+ * explicit closing is done by calling {@link #close} on the {@code MidiDevice}
+ * instance. If an application opens a {@code MidiDevice} explicitly, it has to
+ * close it explicitly to free system resources and enable the application to
+ * exit cleanly. Implicit opening is done by calling
+ * {@link MidiSystem#getReceiver} and {@link MidiSystem#getTransmitter}. The
+ * {@code MidiDevice} used by {@code MidiSystem.getReceiver} and
+ * {@code MidiSystem.getTransmitter} is implementation-dependant unless the
+ * properties {@code javax.sound.midi.Receiver} and
+ * {@code javax.sound.midi.Transmitter} are used (see the description of
+ * properties to select default providers in {@link MidiSystem}). A
+ * {@code MidiDevice} that was opened implicitly, is closed implicitly by
+ * closing the {@code Receiver} or {@code Transmitter} that resulted in opening
+ * it. If more than one implicitly opening {@code Receiver} or
+ * {@code Transmitter} were obtained by the application, the device is closed
+ * after the last {@code Receiver} or {@code Transmitter} has been closed. On
+ * the other hand, calling {@code getReceiver} or {@code getTransmitter} on the
+ * device instance directly does not open the device implicitly. Closing these
+ * {@code Transmitter}s and {@code Receiver}s does not close the device
+ * implicitly. To use a device with {@code Receiver}s or {@code Transmitter}s
+ * obtained this way, the device has to be opened and closed explicitly.
+ * <p>
+ * If implicit and explicit opening and closing are mixed on the same
+ * {@code MidiDevice} instance, the following rules apply:
  *
  * <ul>
- * <li>After an explicit open (either before or after implicit
- * opens), the device will not be closed by implicit closing. The only
- * way to close an explicitly opened device is an explicit close.</li>
- *
- * <li>An explicit close always closes the device, even if it also has
- * been opened implicitly. A subsequent implicit close has no further
- * effect.</li>
+ * <li>After an explicit open (either before or after implicit opens), the
+ * device will not be closed by implicit closing. The only way to close an
+ * explicitly opened device is an explicit close.</li>
+ * <li>An explicit close always closes the device, even if it also has been
+ * opened implicitly. A subsequent implicit close has no further effect.</li>
  * </ul>
  *
- * To detect if a MidiDevice represents a hardware MIDI port, the
- * following programming technique can be used:
+ * To detect if a MidiDevice represents a hardware MIDI port, the following
+ * programming technique can be used:
  *
  * <pre>{@code
  * MidiDevice device = ...;
@@ -95,193 +83,171 @@
  * }</pre>
  *
  * <p>
- * A <code>MidiDevice</code> includes a <code>{@link MidiDevice.Info}</code> object
- * to provide manufacturer information and so on.
+ * A {@code MidiDevice} includes a {@link Info} object to provide manufacturer
+ * information and so on.
  *
+ * @author Kara Kytle
+ * @author Florian Bomers
  * @see Synthesizer
  * @see Sequencer
  * @see Receiver
  * @see Transmitter
- *
- * @author Kara Kytle
- * @author Florian Bomers
  */
-
 public interface MidiDevice extends AutoCloseable {
 
-
     /**
      * Obtains information about the device, including its Java class and
-     * <code>Strings</code> containing its name, vendor, and description.
+     * {@code Strings} containing its name, vendor, and description.
      *
      * @return device info
      */
-    public Info getDeviceInfo();
-
+    Info getDeviceInfo();
 
     /**
-     * Opens the device, indicating that it should now acquire any
-     * system resources it requires and become operational.
-     *
-     * <p>An application opening a device explicitly with this call
-     * has to close the device by calling {@link #close}. This is
-     * necessary to release system resources and allow applications to
-     * exit cleanly.
-     *
+     * Opens the device, indicating that it should now acquire any system
+     * resources it requires and become operational.
+     * <p>
+     * An application opening a device explicitly with this call has to close
+     * the device by calling {@link #close}. This is necessary to release system
+     * resources and allow applications to exit cleanly.
      * <p>
-     * Note that some devices, once closed, cannot be reopened.  Attempts
-     * to reopen such a device will always result in a MidiUnavailableException.
+     * Note that some devices, once closed, cannot be reopened. Attempts to
+     * reopen such a device will always result in a MidiUnavailableException.
      *
-     * @throws MidiUnavailableException thrown if the device cannot be
-     * opened due to resource restrictions.
-     * @throws SecurityException thrown if the device cannot be
-     * opened due to security restrictions.
-     *
+     * @throws MidiUnavailableException thrown if the device cannot be opened
+     *         due to resource restrictions
+     * @throws SecurityException thrown if the device cannot be opened due to
+     *         security restrictions
      * @see #close
      * @see #isOpen
      */
-    public void open() throws MidiUnavailableException;
-
+    void open() throws MidiUnavailableException;
 
     /**
-     * Closes the device, indicating that the device should now release
-     * any system resources it is using.
-     *
-     * <p>All <code>Receiver</code> and <code>Transmitter</code> instances
-     * open from this device are closed. This includes instances retrieved
-     * via <code>MidiSystem</code>.
+     * Closes the device, indicating that the device should now release any
+     * system resources it is using.
+     * <p>
+     * All {@code Receiver} and {@code Transmitter} instances open from this
+     * device are closed. This includes instances retrieved via
+     * {@code MidiSystem}.
      *
      * @see #open
      * @see #isOpen
      */
-    public void close();
-
+    void close();
 
     /**
      * Reports whether the device is open.
      *
-     * @return <code>true</code> if the device is open, otherwise
-     * <code>false</code>
+     * @return {@code true} if the device is open, otherwise {@code false}
      * @see #open
      * @see #close
      */
-    public boolean isOpen();
-
+    boolean isOpen();
 
     /**
-     * Obtains the current time-stamp of the device, in microseconds.
-     * If a device supports time-stamps, it should start counting at
-     * 0 when the device is opened and continue incrementing its
-     * time-stamp in microseconds until the device is closed.
-     * If it does not support time-stamps, it should always return
-     * -1.
-     * @return the current time-stamp of the device in microseconds,
-     * or -1 if time-stamping is not supported by the device.
+     * Obtains the current time-stamp of the device, in microseconds. If a
+     * device supports time-stamps, it should start counting at 0 when the
+     * device is opened and continue incrementing its time-stamp in microseconds
+     * until the device is closed. If it does not support time-stamps, it should
+     * always return -1.
+     *
+     * @return the current time-stamp of the device in microseconds, or -1 if
+     *         time-stamping is not supported by the device
      */
-    public long getMicrosecondPosition();
-
+    long getMicrosecondPosition();
 
     /**
-     * Obtains the maximum number of MIDI IN connections available on this
-     * MIDI device for receiving MIDI data.
-     * @return maximum number of MIDI IN connections,
-     * or -1 if an unlimited number of connections is available.
+     * Obtains the maximum number of MIDI IN connections available on this MIDI
+     * device for receiving MIDI data.
+     *
+     * @return maximum number of MIDI IN connections, or -1 if an unlimited
+     *         number of connections is available
      */
-    public int getMaxReceivers();
-
+    int getMaxReceivers();
 
     /**
-     * Obtains the maximum number of MIDI OUT connections available on this
-     * MIDI device for transmitting MIDI data.
-     * @return maximum number of MIDI OUT connections,
-     * or -1 if an unlimited number of connections is available.
+     * Obtains the maximum number of MIDI OUT connections available on this MIDI
+     * device for transmitting MIDI data.
+     *
+     * @return maximum number of MIDI OUT connections, or -1 if an unlimited
+     *         number of connections is available
      */
-    public int getMaxTransmitters();
-
+    int getMaxTransmitters();
 
     /**
-     * Obtains a MIDI IN receiver through which the MIDI device may receive
-     * MIDI data.  The returned receiver must be closed when the application
-     * has finished using it.
-     *
-     * <p>Usually the returned receiver implements
-     * the {@code MidiDeviceReceiver} interface.
+     * Obtains a MIDI IN receiver through which the MIDI device may receive MIDI
+     * data. The returned receiver must be closed when the application has
+     * finished using it.
+     * <p>
+     * Usually the returned receiver implements the {@code MidiDeviceReceiver}
+     * interface.
+     * <p>
+     * Obtaining a {@code Receiver} with this method does not open the device.
+     * To be able to use the device, it has to be opened explicitly by calling
+     * {@link #open}. Also, closing the {@code Receiver} does not close the
+     * device. It has to be closed explicitly by calling {@link #close}.
      *
-     * <p>Obtaining a <code>Receiver</code> with this method does not
-     * open the device. To be able to use the device, it has to be
-     * opened explicitly by calling {@link #open}. Also, closing the
-     * <code>Receiver</code> does not close the device. It has to be
-     * closed explicitly by calling {@link #close}.
-     *
-     * @return a receiver for the device.
+     * @return a receiver for the device
      * @throws MidiUnavailableException thrown if a receiver is not available
-     * due to resource restrictions
+     *         due to resource restrictions
      * @see Receiver#close()
      */
-    public Receiver getReceiver() throws MidiUnavailableException;
-
+    Receiver getReceiver() throws MidiUnavailableException;
 
     /**
-     * Returns all currently active, non-closed receivers
-     * connected with this MidiDevice.
-     * A receiver can be removed
-     * from the device by closing it.
-     *
-     * <p>Usually the returned receivers implement
-     * the {@code MidiDeviceReceiver} interface.
+     * Returns all currently active, non-closed receivers connected with this
+     * MidiDevice. A receiver can be removed from the device by closing it.
+     * <p>
+     * Usually the returned receivers implement the {@code MidiDeviceReceiver}
+     * interface.
      *
      * @return an unmodifiable list of the open receivers
      * @since 1.5
      */
     List<Receiver> getReceivers();
 
-
     /**
      * Obtains a MIDI OUT connection from which the MIDI device will transmit
-     * MIDI data  The returned transmitter must be closed when the application
+     * MIDI data. The returned transmitter must be closed when the application
      * has finished using it.
-     *
-     * <p>Usually the returned transmitter implements
-     * the {@code MidiDeviceTransmitter} interface.
+     * <p>
+     * Usually the returned transmitter implements the
+     * {@code MidiDeviceTransmitter} interface.
+     * <p>
+     * Obtaining a {@code Transmitter} with this method does not open the
+     * device. To be able to use the device, it has to be opened explicitly by
+     * calling {@link #open}. Also, closing the {@code Transmitter} does not
+     * close the device. It has to be closed explicitly by calling
+     * {@link #close}.
      *
-     * <p>Obtaining a <code>Transmitter</code> with this method does not
-     * open the device. To be able to use the device, it has to be
-     * opened explicitly by calling {@link #open}. Also, closing the
-     * <code>Transmitter</code> does not close the device. It has to be
-     * closed explicitly by calling {@link #close}.
-     *
-     * @return a MIDI OUT transmitter for the device.
+     * @return a MIDI OUT transmitter for the device
      * @throws MidiUnavailableException thrown if a transmitter is not available
-     * due to resource restrictions
+     *         due to resource restrictions
      * @see Transmitter#close()
      */
-    public Transmitter getTransmitter() throws MidiUnavailableException;
-
+    Transmitter getTransmitter() throws MidiUnavailableException;
 
     /**
-     * Returns all currently active, non-closed transmitters
-     * connected with this MidiDevice.
-     * A transmitter can be removed
-     * from the device by closing it.
-     *
-     * <p>Usually the returned transmitters implement
-     * the {@code MidiDeviceTransmitter} interface.
+     * Returns all currently active, non-closed transmitters connected with this
+     * MidiDevice. A transmitter can be removed from the device by closing it.
+     * <p>
+     * Usually the returned transmitters implement the
+     * {@code MidiDeviceTransmitter} interface.
      *
      * @return an unmodifiable list of the open transmitters
      * @since 1.5
      */
     List<Transmitter> getTransmitters();
 
-
-
     /**
-     * A <code>MidiDevice.Info</code> object contains assorted
-     * data about a <code>{@link MidiDevice}</code>, including its
-     * name, the company who created it, and descriptive text.
+     * A {@code MidiDevice.Info} object contains assorted data about a
+     * {@link MidiDevice}, including its name, the company who created it, and
+     * descriptive text.
      *
      * @see MidiDevice#getDeviceInfo
      */
-    public static class Info {
+    class Info {
 
         /**
          * The device's name.
@@ -303,16 +269,16 @@
          */
         private String version;
 
-
         /**
          * Constructs a device info object.
          *
-         * @param name the name of the device
-         * @param vendor the name of the company who provides the device
-         * @param description a description of the device
-         * @param version version information for the device
+         * @param  name the name of the device
+         * @param  vendor the name of the company who provides the device
+         * @param  description a description of the device
+         * @param  version version information for the device
          */
-        protected Info(String name, String vendor, String description, String version) {
+        protected Info(String name, String vendor, String description,
+                       String version) {
 
             this.name = name;
             this.vendor = vendor;
@@ -320,20 +286,18 @@
             this.version = version;
         }
 
-
         /**
-         * Reports whether two objects are equal.
-         * Returns <code>true</code> if the objects are identical.
-         * @param obj the reference object with which to compare this
-         * object
-         * @return <code>true</code> if this object is the same as the
-         * <code>obj</code> argument; <code>false</code> otherwise
+         * Reports whether two objects are equal. Returns {@code true} if the
+         * objects are identical.
+         *
+         * @param  obj the reference object with which to compare this object
+         * @return {@code true} if this object is the same as the {@code obj}
+         *         argument; {@code false} otherwise
          */
         public final boolean equals(Object obj) {
             return super.equals(obj);
         }
 
-
         /**
          * Finalizes the hashcode method.
          */
@@ -341,7 +305,6 @@
             return super.hashCode();
         }
 
-
         /**
          * Obtains the name of the device.
          *
@@ -351,43 +314,40 @@
             return name;
         }
 
-
         /**
          * Obtains the name of the company who supplies the device.
+         *
          * @return device the vendor's name
          */
         public final String getVendor() {
             return vendor;
         }
 
-
         /**
          * Obtains the description of the device.
+         *
          * @return a description of the device
          */
         public final String getDescription() {
             return description;
         }
 
-
         /**
          * Obtains the version of the device.
+         *
          * @return textual version information for the device.
          */
         public final String getVersion() {
             return version;
         }
 
-
         /**
          * Provides a string representation of the device information.
-
+         *
          * @return a description of the info object
          */
         public final String toString() {
             return name;
         }
     } // class Info
-
-
 }
--- a/src/java.desktop/share/classes/javax/sound/midi/MidiDeviceReceiver.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/MidiDeviceReceiver.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -26,16 +26,18 @@
 package javax.sound.midi;
 
 /**
- * <p>{@code MidiDeviceReceiver} is a {@code Receiver} which represents
- * a MIDI input connector of a {@code MidiDevice}
- * (see {@link MidiDevice#getReceiver()}).
+ * {@code MidiDeviceReceiver} is a {@code Receiver} which represents a MIDI
+ * input connector of a {@code MidiDevice} (see
+ * {@link MidiDevice#getReceiver()}).
  *
  * @since 1.7
  */
 public interface MidiDeviceReceiver extends Receiver {
+
     /**
      * Obtains a MidiDevice object which is an owner of this Receiver.
+     *
      * @return a MidiDevice object which is an owner of this Receiver
      */
-    public MidiDevice getMidiDevice();
+    MidiDevice getMidiDevice();
 }
--- a/src/java.desktop/share/classes/javax/sound/midi/MidiDeviceTransmitter.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/MidiDeviceTransmitter.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -25,11 +25,10 @@
 
 package javax.sound.midi;
 
-
 /**
- * <p>{@code MidiDeviceTransmitter} is a {@code Transmitter} which represents
- * a MIDI input connector of a {@code MidiDevice}
- * (see {@link MidiDevice#getTransmitter()}).
+ * {@code MidiDeviceTransmitter} is a {@code Transmitter} which represents a
+ * MIDI input connector of a {@code MidiDevice} (see
+ * {@link MidiDevice#getTransmitter()}).
  *
  * @since 1.7
  */
@@ -37,7 +36,8 @@
 
     /**
      * Obtains a MidiDevice object which is an owner of this Transmitter.
+     *
      * @return a MidiDevice object which is an owner of this Transmitter
      */
-    public MidiDevice getMidiDevice();
+    MidiDevice getMidiDevice();
 }
--- a/src/java.desktop/share/classes/javax/sound/midi/MidiEvent.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/MidiEvent.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -26,41 +26,35 @@
 package javax.sound.midi;
 
 /**
- * MIDI events contain a MIDI message and a corresponding time-stamp
- * expressed in ticks, and can represent the MIDI event information
- * stored in a MIDI file or a <code>{@link Sequence}</code> object.  The
- * duration of a tick is specified by the timing information contained
- * in the MIDI file or <code>Sequence</code> object.
+ * MIDI events contain a MIDI message and a corresponding time-stamp expressed
+ * in ticks, and can represent the MIDI event information stored in a MIDI file
+ * or a {@link Sequence} object. The duration of a tick is specified by the
+ * timing information contained in the MIDI file or {@code Sequence} object.
  * <p>
- * In Java Sound, <code>MidiEvent</code> objects are typically contained in a
- * <code>{@link Track}</code>, and <code>Tracks</code> are likewise
- * contained in a <code>Sequence</code>.
- *
+ * In Java Sound, {@code MidiEvent} objects are typically contained in a
+ * {@link Track}, and {@code Tracks} are likewise contained in a
+ * {@code Sequence}.
  *
  * @author David Rivas
  * @author Kara Kytle
  */
 public class MidiEvent {
 
-
-    // Instance variables
-
     /**
      * The MIDI message for this event.
      */
     private final MidiMessage message;
 
-
     /**
      * The tick value for this event.
      */
     private long tick;
 
-
     /**
-     * Constructs a new <code>MidiEvent</code>.
-     * @param message the MIDI message contained in the event
-     * @param tick the time-stamp for the event, in MIDI ticks
+     * Constructs a new {@code MidiEvent}.
+     *
+     * @param  message the MIDI message contained in the event
+     * @param  tick the time-stamp for the event, in MIDI ticks
      */
     public MidiEvent(MidiMessage message, long tick) {
 
@@ -70,24 +64,25 @@
 
     /**
      * Obtains the MIDI message contained in the event.
+     *
      * @return the MIDI message
      */
     public MidiMessage getMessage() {
         return message;
     }
 
-
     /**
-     * Sets the time-stamp for the event, in MIDI ticks
-     * @param tick the new time-stamp, in MIDI ticks
+     * Sets the time-stamp for the event, in MIDI ticks.
+     *
+     * @param  tick the new time-stamp, in MIDI ticks
      */
     public void setTick(long tick) {
         this.tick = tick;
     }
 
-
     /**
-     * Obtains the time-stamp for the event, in MIDI ticks
+     * Obtains the time-stamp for the event, in MIDI ticks.
+     *
      * @return the time-stamp for the event, in MIDI ticks
      */
     public long getTick() {
--- a/src/java.desktop/share/classes/javax/sound/midi/MidiFileFormat.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/MidiFileFormat.java	Thu Aug 28 14:54:07 2014 -0700
@@ -25,29 +25,23 @@
 
 package javax.sound.midi;
 
-import java.io.InputStream;
-import java.io.IOException;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
-
 /**
- * A <code>MidiFileFormat</code> object encapsulates a MIDI file's
- * type, as well as its length and timing information.
- *
- * <p>A <code>MidiFileFormat</code> object can
- * include a set of properties. A property is a pair of key and value:
- * the key is of type <code>String</code>, the associated property
- * value is an arbitrary object.
- * Properties specify additional informational
- * meta data (like a author, or copyright).
- * Properties are optional information, and file reader and file
- * writer implementations are not required to provide or
- * recognize properties.
- *
- * <p>The following table lists some common properties that should
- * be used in implementations:
+ * A {@code MidiFileFormat} object encapsulates a MIDI file's type, as well as
+ * its length and timing information.
+ * <p>
+ * A {@code MidiFileFormat} object can include a set of properties. A property
+ * is a pair of key and value: the key is of type {@code String}, the associated
+ * property value is an arbitrary object. Properties specify additional
+ * informational meta data (like a author, or copyright). Properties are
+ * optional information, and file reader and file writer implementations are not
+ * required to provide or recognize properties.
+ * <p>
+ * The following table lists some common properties that should be used in
+ * implementations:
  *
  * <table border=1>
     <caption>MIDI File Format Properties</caption>
@@ -83,24 +77,21 @@
  *  </tr>
  * </table>
  *
- * @see MidiSystem#getMidiFileFormat(java.io.File)
- * @see Sequencer#setSequence(java.io.InputStream stream)
- *
  * @author Kara Kytle
  * @author Florian Bomers
+ * @see MidiSystem#getMidiFileFormat(java.io.File)
+ * @see Sequencer#setSequence(java.io.InputStream stream)
  */
-
 public class MidiFileFormat {
 
-
     /**
      * Represents unknown length.
+     *
      * @see #getByteLength
      * @see #getMicrosecondLength
      */
     public static final int UNKNOWN_LENGTH = -1;
 
-
     /**
      * The type of MIDI file.
      */
@@ -132,19 +123,22 @@
      */
     protected long microsecondLength;
 
-
-    /** The set of properties */
+    /**
+     * The set of properties.
+     */
     private HashMap<String, Object> properties;
 
-
     /**
-     * Constructs a <code>MidiFileFormat</code>.
+     * Constructs a {@code MidiFileFormat}.
      *
-     * @param type the MIDI file type (0, 1, or 2)
-     * @param divisionType the timing division type (PPQ or one of the SMPTE types)
-     * @param resolution the timing resolution
-     * @param bytes the length of the MIDI file in bytes, or UNKNOWN_LENGTH if not known
-     * @param microseconds the duration of the file in microseconds, or UNKNOWN_LENGTH if not known
+     * @param  type the MIDI file type (0, 1, or 2)
+     * @param  divisionType the timing division type (PPQ or one of the SMPTE
+     *         types)
+     * @param  resolution the timing resolution
+     * @param  bytes the length of the MIDI file in bytes, or UNKNOWN_LENGTH if
+     *         not known
+     * @param  microseconds the duration of the file in microseconds, or
+     *         UNKNOWN_LENGTH if not known
      * @see #UNKNOWN_LENGTH
      * @see Sequence#PPQ
      * @see Sequence#SMPTE_24
@@ -162,21 +156,18 @@
         this.properties = null;
     }
 
-
     /**
-     * Construct a <code>MidiFileFormat</code> with a set of properties.
+     * Construct a {@code MidiFileFormat} with a set of properties.
      *
-     * @param type         the MIDI file type (0, 1, or 2)
-     * @param divisionType the timing division type
-     *      (PPQ or one of the SMPTE types)
-     * @param resolution   the timing resolution
-     * @param bytes the length of the MIDI file in bytes,
-     *      or UNKNOWN_LENGTH if not known
-     * @param microseconds the duration of the file in microseconds,
-     *      or UNKNOWN_LENGTH if not known
-     * @param properties  a <code>Map&lt;String,Object&gt;</code> object
-     *        with properties
-     *
+     * @param  type the MIDI file type (0, 1, or 2)
+     * @param  divisionType the timing division type (PPQ or one of the SMPTE
+     *         types)
+     * @param  resolution the timing resolution
+     * @param  bytes the length of the MIDI file in bytes, or UNKNOWN_LENGTH if
+     *         not known
+     * @param  microseconds the duration of the file in microseconds, or
+     *         UNKNOWN_LENGTH if not known
+     * @param  properties a {@code Map<String,Object>} object with properties
      * @see #UNKNOWN_LENGTH
      * @see Sequence#PPQ
      * @see Sequence#SMPTE_24
@@ -192,10 +183,9 @@
         this.properties = new HashMap<String, Object>(properties);
     }
 
-
-
     /**
      * Obtains the MIDI file type.
+     *
      * @return the file's type (0, 1, or 2)
      */
     public int getType() {
@@ -206,7 +196,6 @@
      * Obtains the timing division type for the MIDI file.
      *
      * @return the division type (PPQ or one of the SMPTE types)
-     *
      * @see Sequence#Sequence(float, int)
      * @see Sequence#PPQ
      * @see Sequence#SMPTE_24
@@ -219,11 +208,10 @@
         return divisionType;
     }
 
-
     /**
-     * Obtains the timing resolution for the MIDI file.
-     * If the division type is PPQ, the resolution is specified in ticks per beat.
-     * For SMTPE timing, the resolution is specified in ticks per frame.
+     * Obtains the timing resolution for the MIDI file. If the division type is
+     * PPQ, the resolution is specified in ticks per beat. For SMTPE timing, the
+     * resolution is specified in ticks per frame.
      *
      * @return the number of ticks per beat (PPQ) or per frame (SMPTE)
      * @see #getDivisionType
@@ -233,9 +221,9 @@
         return resolution;
     }
 
-
     /**
      * Obtains the length of the MIDI file, expressed in 8-bit bytes.
+     *
      * @return the number of bytes in the file, or UNKNOWN_LENGTH if not known
      * @see #UNKNOWN_LENGTH
      */
@@ -245,7 +233,9 @@
 
     /**
      * Obtains the length of the MIDI file, expressed in microseconds.
-     * @return the file's duration in microseconds, or UNKNOWN_LENGTH if not known
+     *
+     * @return the file's duration in microseconds, or UNKNOWN_LENGTH if not
+     *         known
      * @see Sequence#getMicrosecondLength()
      * @see #getByteLength
      * @see #UNKNOWN_LENGTH
@@ -255,14 +245,11 @@
     }
 
     /**
-     * Obtain an unmodifiable map of properties.
-     * The concept of properties is further explained in
-     * the {@link MidiFileFormat class description}.
+     * Obtain an unmodifiable map of properties. The concept of properties is
+     * further explained in the {@link MidiFileFormat class description}.
      *
-     * @return a <code>Map&lt;String,Object&gt;</code> object containing
-     *         all properties. If no properties are recognized, an empty map is
-     *         returned.
-     *
+     * @return a {@code Map<String,Object>} object containing all properties. If
+     *         no properties are recognized, an empty map is returned.
      * @see #getProperty(String)
      * @since 1.5
      */
@@ -277,20 +264,16 @@
         return Collections.unmodifiableMap(ret);
     }
 
-
     /**
-     * Obtain the property value specified by the key.
-     * The concept of properties is further explained in
-     * the {@link MidiFileFormat class description}.
+     * Obtain the property value specified by the key. The concept of properties
+     * is further explained in the {@link MidiFileFormat class description}.
+     * <p>
+     * If the specified property is not defined for a particular file format,
+     * this method returns {@code null}.
      *
-     * <p>If the specified property is not defined for a
-     * particular file format, this method returns
-     * <code>null</code>.
-     *
-     * @param key the key of the desired property
-     * @return the value of the property with the specified key,
-     *         or <code>null</code> if the property does not exist.
-     *
+     * @param  key the key of the desired property
+     * @return the value of the property with the specified key, or {@code null}
+     *         if the property does not exist
      * @see #properties()
      * @since 1.5
      */
@@ -300,6 +283,4 @@
         }
         return properties.get(key);
     }
-
-
 }
--- a/src/java.desktop/share/classes/javax/sound/midi/MidiMessage.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/MidiMessage.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,83 +26,76 @@
 package javax.sound.midi;
 
 /**
- * <code>MidiMessage</code> is the base class for MIDI messages.  They include
- * not only the standard MIDI messages that a synthesizer can respond to, but also
- * "meta-events" that can be used by sequencer programs.  There are meta-events
+ * {@code MidiMessage} is the base class for MIDI messages. They include not
+ * only the standard MIDI messages that a synthesizer can respond to, but also
+ * "meta-events" that can be used by sequencer programs. There are meta-events
  * for such information as lyrics, copyrights, tempo indications, time and key
- * signatures, markers, etc.  For more information, see the Standard MIDI Files 1.0
- * specification, which is part of the Complete MIDI 1.0 Detailed Specification
- * published by the MIDI Manufacturer's Association
+ * signatures, markers, etc. For more information, see the Standard MIDI Files
+ * 1.0 specification, which is part of the Complete MIDI 1.0 Detailed
+ * Specification published by the MIDI Manufacturer's Association
  * (<a href = http://www.midi.org>http://www.midi.org</a>).
  * <p>
- * The base <code>MidiMessage</code> class provides access to three types of
+ * The base {@code MidiMessage} class provides access to three types of
  * information about a MIDI message:
  * <ul>
  * <li>The messages's status byte</li>
- * <li>The total length of the message in bytes (the status byte plus any data bytes)</li>
+ * <li>The total length of the message in bytes (the status byte plus any data
+ * bytes)</li>
  * <li>A byte array containing the complete message</li>
  * </ul>
  *
- * <code>MidiMessage</code> includes methods to get, but not set, these values.
+ * {@code MidiMessage} includes methods to get, but not set, these values.
  * Setting them is a subclass responsibility.
  * <p>
- * <a name="integersVsBytes"></a>
- * The MIDI standard expresses MIDI data in bytes.  However, because
- * Java<sup>TM</sup> uses signed bytes, the Java Sound API uses integers
- * instead of bytes when expressing MIDI data.  For example, the
- * {@link #getStatus()} method of
- * <code>MidiMessage</code> 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 converted to integers using this conversion:
+ * <a name="integersVsBytes"></a> The MIDI standard expresses MIDI data in
+ * bytes. However, because Java<sup>TM</sup> uses signed bytes, the Java Sound
+ * 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
+ * converted to integers using this conversion:
+ *
  * <center>{@code int i = (int)(byte & 0xFF)}</center>
  * <p>
- * If you simply need to pass a known MIDI byte value as a method parameter,
- * it can be expressed directly as an integer, using (for example) decimal or
- * hexadecimal notation.  For instance, to pass the "active sensing" status byte
+ * If you simply need to pass a known MIDI byte value as a method parameter, it
+ * can be expressed directly as an integer, using (for example) decimal or
+ * hexadecimal notation. For instance, to pass the "active sensing" status byte
  * as the first argument to ShortMessage's
- * {@link ShortMessage#setMessage(int) setMessage(int)}
- * method, you can express it as 254 or 0xFE.
+ * {@link ShortMessage#setMessage(int) setMessage(int)} method, you can express
+ * it as 254 or 0xFE.
  *
+ * @author David Rivas
+ * @author Kara Kytle
  * @see Track
  * @see Sequence
  * @see Receiver
- *
- * @author David Rivas
- * @author Kara Kytle
  */
-
 public abstract class MidiMessage implements Cloneable {
 
-    // Instance variables
-
     /**
-     * The MIDI message data.  The first byte is the status
-     * byte for the message; subsequent bytes up to the length
-     * of the message are data bytes for this message.
+     * The MIDI message data. The first byte is the status byte for the message;
+     * subsequent bytes up to the length of the message are data bytes for this
+     * message.
+     *
      * @see #getLength
      */
     protected byte[] data;
 
-
     /**
-     * The number of bytes in the MIDI message, including the
-     * status byte and any data bytes.
+     * The number of bytes in the MIDI message, including the status byte and
+     * any data bytes.
+     *
      * @see #getLength
      */
     protected int length = 0;
 
-
     /**
-     * Constructs a new <code>MidiMessage</code>.  This protected
-     * constructor is called by concrete subclasses, which should
-     * ensure that the data array specifies a complete, valid MIDI
-     * message.
+     * Constructs a new {@code MidiMessage}. This protected constructor is
+     * called by concrete subclasses, which should ensure that the data array
+     * specifies a complete, valid MIDI message.
      *
-     * @param data an array of bytes containing the complete message.
-     * The message data may be changed using the <code>setMessage</code>
-     * method.
-     *
+     * @param  data an array of bytes containing the complete message. The
+     *         message data may be changed using the {@code setMessage} method.
      * @see #setMessage
      */
     protected MidiMessage(byte[] data) {
@@ -112,20 +105,21 @@
         }
     }
 
-
     /**
-     * Sets the data for the MIDI message.   This protected
-     * method is called by concrete subclasses, which should
-     * ensure that the data array specifies a complete, valid MIDI
-     * message.
+     * Sets the data for the MIDI message. This protected method is called by
+     * concrete subclasses, which should ensure that the data array specifies a
+     * complete, valid MIDI message.
      *
-     * @param data the data bytes in the MIDI message
-     * @param length the number of bytes in the data byte array
-     * @throws InvalidMidiDataException if the parameter values do not specify a valid MIDI meta message
+     * @param  data the data bytes in the MIDI message
+     * @param  length the number of bytes in the data byte array
+     * @throws InvalidMidiDataException if the parameter values do not specify a
+     *         valid MIDI meta message
      */
-    protected void setMessage(byte[] data, int length) throws InvalidMidiDataException {
+    protected void setMessage(byte[] data, int length)
+            throws InvalidMidiDataException {
         if (length < 0 || (length > 0 && length > data.length)) {
-            throw new IndexOutOfBoundsException("length out of bounds: "+length);
+            throw new IndexOutOfBoundsException(
+                    "length out of bounds: " + length);
         }
         this.length = length;
 
@@ -135,16 +129,14 @@
         System.arraycopy(data, 0, this.data, 0, length);
     }
 
-
     /**
-     * Obtains the MIDI message data.  The first byte of the returned byte
-     * array is the status byte of the message.  Any subsequent bytes up to
-     * the length of the message are data bytes.  The byte array may have a
-     * length which is greater than that of the actual message; the total
-     * length of the message in bytes is reported by the <code>{@link #getLength}</code>
-     * method.
+     * Obtains the MIDI message data. The first byte of the returned byte array
+     * is the status byte of the message. Any subsequent bytes up to the length
+     * of the message are data bytes. The byte array may have a length which is
+     * greater than that of the actual message; the total length of the message
+     * in bytes is reported by the {@link #getLength} method.
      *
-     * @return the byte array containing the complete <code>MidiMessage</code> data
+     * @return the byte array containing the complete {@code MidiMessage} data
      */
     public byte[] getMessage() {
         byte[] returnedArray = new byte[length];
@@ -152,12 +144,11 @@
         return returnedArray;
     }
 
-
     /**
-     * Obtains the status byte for the MIDI message.  The status "byte" is
+     * Obtains the status byte for the MIDI message. The status "byte" is
      * represented as an integer; see the
-     * <a href="#integersVsBytes">discussion</a> in the
-     * <code>MidiMessage</code> class description.
+     * <a href="#integersVsBytes">discussion</a> in the {@code MidiMessage}
+     * class description.
      *
      * @return the integer representation of this event's status byte
      */
@@ -168,13 +159,11 @@
         return 0;
     }
 
-
     /**
-     * Obtains the total length of the MIDI message in bytes.  A
-     * MIDI message consists of one status byte and zero or more
-     * data bytes.  The return value ranges from 1 for system real-time messages,
-     * to 2 or 3 for channel messages, to any value for meta and system
-     * exclusive messages.
+     * Obtains the total length of the MIDI message in bytes. A MIDI message
+     * consists of one status byte and zero or more data bytes. The return value
+     * ranges from 1 for system real-time messages, to 2 or 3 for channel
+     * messages, to any value for meta and system exclusive messages.
      *
      * @return the length of the message in bytes
      */
@@ -182,11 +171,11 @@
         return length;
     }
 
-
     /**
-     * Creates a new object of the same class and with the same contents
-     * as this object.
-     * @return a clone of this instance.
+     * Creates a new object of the same class and with the same contents as this
+     * object.
+     *
+     * @return a clone of this instance
      */
     public abstract Object clone();
 }
--- a/src/java.desktop/share/classes/javax/sound/midi/MidiSystem.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/MidiSystem.java	Thu Aug 28 14:54:07 2014 -0700
@@ -25,59 +25,52 @@
 
 package javax.sound.midi;
 
-import java.io.FileInputStream;
 import java.io.File;
+import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.io.IOException;
-
+import java.net.URL;
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Properties;
 import java.util.Set;
 
-import java.net.URL;
-
+import javax.sound.midi.spi.MidiDeviceProvider;
+import javax.sound.midi.spi.MidiFileReader;
 import javax.sound.midi.spi.MidiFileWriter;
-import javax.sound.midi.spi.MidiFileReader;
 import javax.sound.midi.spi.SoundbankReader;
-import javax.sound.midi.spi.MidiDeviceProvider;
 
+import com.sun.media.sound.AutoConnectSequencer;
 import com.sun.media.sound.JDK13Services;
-import com.sun.media.sound.ReferenceCountingDevice;
-import com.sun.media.sound.AutoConnectSequencer;
 import com.sun.media.sound.MidiDeviceReceiverEnvelope;
 import com.sun.media.sound.MidiDeviceTransmitterEnvelope;
-
+import com.sun.media.sound.ReferenceCountingDevice;
 
 /**
- * The <code>MidiSystem</code> class provides access to the installed MIDI
- * system resources, including devices such as synthesizers, sequencers, and
- * MIDI input and output ports.  A typical simple MIDI application might
- * begin by invoking one or more <code>MidiSystem</code> methods to learn
- * what devices are installed and to obtain the ones needed in that
- * application.
+ * The {@code MidiSystem} class provides access to the installed MIDI system
+ * resources, including devices such as synthesizers, sequencers, and MIDI input
+ * and output ports. A typical simple MIDI application might begin by invoking
+ * one or more {@code MidiSystem} methods to learn what devices are installed
+ * and to obtain the ones needed in that application.
  * <p>
- * The class also has methods for reading files, streams, and  URLs that
- * contain standard MIDI file data or soundbanks.  You can query the
- * <code>MidiSystem</code> for the format of a specified MIDI file.
+ * The class also has methods for reading files, streams, and  URLs that contain
+ * standard MIDI file data or soundbanks. You can query the {@code MidiSystem}
+ * for the format of a specified MIDI file.
  * <p>
- * You cannot instantiate a <code>MidiSystem</code>; all the methods are
- * static.
- *
- * <p>Properties can be used to specify default MIDI devices.
- * Both system properties and a properties file are considered.
- * The <code>sound.properties</code> properties file is read from
- * an implementation-specific location (typically it is the <code>lib</code>
- * directory in the Java installation directory).
- * If a property exists both as a system property and in the
- * properties file, the system property takes precedence. If none is
- * specified, a suitable default is chosen among the available devices.
- * The syntax of the properties file is specified in
- * {@link java.util.Properties#load(InputStream) Properties.load}. The
- * following table lists the available property keys and which methods
- * consider them:
+ * You cannot instantiate a {@code MidiSystem}; all the methods are static.
+ * <p>
+ * Properties can be used to specify default MIDI devices. Both system
+ * properties and a properties file are considered. The "sound.properties"
+ * properties file is read from an implementation-specific location (typically
+ * it is the {@code lib} directory in the Java installation directory). If a
+ * property exists both as a system property and in the properties file, the
+ * system property takes precedence. If none is specified, a suitable default is
+ * chosen among the available devices. The syntax of the properties file is
+ * specified in {@link Properties#load(InputStream) Properties.load}. The
+ * following table lists the available property keys and which methods consider
+ * them:
  *
  * <table border=0>
  *  <caption>MIDI System Property Keys</caption>
@@ -87,80 +80,64 @@
  *   <th>Affected Method</th>
  *  </tr>
  *  <tr>
- *   <td><code>javax.sound.midi.Receiver</code></td>
+ *   <td>{@code javax.sound.midi.Receiver}</td>
  *   <td>{@link Receiver}</td>
  *   <td>{@link #getReceiver}</td>
  *  </tr>
  *  <tr>
- *   <td><code>javax.sound.midi.Sequencer</code></td>
+ *   <td>{@code javax.sound.midi.Sequencer}</td>
  *   <td>{@link Sequencer}</td>
  *   <td>{@link #getSequencer}</td>
  *  </tr>
  *  <tr>
- *   <td><code>javax.sound.midi.Synthesizer</code></td>
+ *   <td>{@code javax.sound.midi.Synthesizer}</td>
  *   <td>{@link Synthesizer}</td>
  *   <td>{@link #getSynthesizer}</td>
  *  </tr>
  *  <tr>
- *   <td><code>javax.sound.midi.Transmitter</code></td>
+ *   <td>{@code javax.sound.midi.Transmitter}</td>
  *   <td>{@link Transmitter}</td>
  *   <td>{@link #getTransmitter}</td>
  *  </tr>
  * </table>
  *
- * The property value consists of the provider class name
- * and the device name, separated by the hash mark (&quot;#&quot;).
- * The provider class name is the fully-qualified
- * name of a concrete {@link javax.sound.midi.spi.MidiDeviceProvider
- * MIDI device provider} class. The device name is matched against
- * the <code>String</code> returned by the <code>getName</code>
- * method of <code>MidiDevice.Info</code>.
- * Either the class name, or the device name may be omitted.
- * If only the class name is specified, the trailing hash mark
- * is optional.
- *
- * <p>If the provider class is specified, and it can be
- * successfully retrieved from the installed providers,
- * the list of
- * <code>MidiDevice.Info</code> objects is retrieved
- * from the provider. Otherwise, or when these devices
- * do not provide a subsequent match, the list is retrieved
- * from {@link #getMidiDeviceInfo} to contain
- * all available <code>MidiDevice.Info</code> objects.
- *
- * <p>If a device name is specified, the resulting list of
- * <code>MidiDevice.Info</code> objects is searched:
- * the first one with a matching name, and whose
- * <code>MidiDevice</code> implements the
- * respective interface, will be returned.
- * If no matching <code>MidiDevice.Info</code> object
- * is found, or the device name is not specified,
- * the first suitable device from the resulting
- * list will be returned. For Sequencer and Synthesizer,
- * a device is suitable if it implements the respective
- * interface; whereas for Receiver and Transmitter, a device is
- * suitable if it
- * implements neither Sequencer nor Synthesizer and provides
- * at least one Receiver or Transmitter, respectively.
- *
- * For example, the property <code>javax.sound.midi.Receiver</code>
- * with a value
- * <code>&quot;com.sun.media.sound.MidiProvider#SunMIDI1&quot;</code>
- * will have the following consequences when
- * <code>getReceiver</code> is called:
- * if the class <code>com.sun.media.sound.MidiProvider</code> exists
- * in the list of installed MIDI device providers,
- * the first <code>Receiver</code> device with name
- * <code>&quot;SunMIDI1&quot;</code> will be returned. If it cannot
- * be found, the first <code>Receiver</code> from that provider
- * will be returned, regardless of name.
- * If there is none, the first <code>Receiver</code> with name
- * <code>&quot;SunMIDI1&quot;</code> in the list of all devices
- * (as returned by <code>getMidiDeviceInfo</code>) will be returned,
- * or, if not found, the first <code>Receiver</code> that can
- * be found in the list of all devices is returned.
- * If that fails, too, a <code>MidiUnavailableException</code>
- * is thrown.
+ * The property value consists of the provider class name and the device name,
+ * separated by the hash mark (&quot;#&quot;). The provider class name is the
+ * fully-qualified name of a concrete
+ * {@link MidiDeviceProvider MIDI device provider} class. The device name is
+ * matched against the {@code String} returned by the {@code getName} method of
+ * {@code MidiDevice.Info}. Either the class name, or the device name may be
+ * omitted. If only the class name is specified, the trailing hash mark is
+ * optional.
+ * <p>
+ * If the provider class is specified, and it can be successfully retrieved from
+ * the installed providers, the list of {@code MidiDevice.Info} objects is
+ * retrieved from the provider. Otherwise, or when these devices do not provide
+ * a subsequent match, the list is retrieved from {@link #getMidiDeviceInfo} to
+ * contain all available {@code MidiDevice.Info} objects.
+ * <p>
+ * If a device name is specified, the resulting list of {@code MidiDevice.Info}
+ * objects is searched: the first one with a matching name, and whose
+ * {@code MidiDevice} implements the respective interface, will be returned. If
+ * no matching {@code MidiDevice.Info} object is found, or the device name is
+ * not specified, the first suitable device from the resulting list will be
+ * returned. For Sequencer and Synthesizer, a device is suitable if it
+ * implements the respective interface; whereas for Receiver and Transmitter, a
+ * device is suitable if it implements neither Sequencer nor Synthesizer and
+ * provides at least one Receiver or Transmitter, respectively.
+ * <p>
+ * For example, the property {@code javax.sound.midi.Receiver} with a value
+ * {@code "com.sun.media.sound.MidiProvider#SunMIDI1"} will have the following
+ * consequences when {@code getReceiver} is called: if the class
+ * {@code com.sun.media.sound.MidiProvider} exists in the list of installed MIDI
+ * device providers, the first {@code Receiver} device with name
+ * {@code "SunMIDI1"} will be returned. If it cannot be found, the first
+ * {@code Receiver} from that provider will be returned, regardless of name. If
+ * there is none, the first {@code Receiver} with name {@code "SunMIDI1"} in the
+ * list of all devices (as returned by {@code getMidiDeviceInfo}) will be
+ * returned, or, if not found, the first {@code Receiver} that can be found in
+ * the list of all devices is returned. If that fails, too, a
+ * {@code MidiUnavailableException} is thrown.
  *
  * @author Kara Kytle
  * @author Florian Bomers
@@ -174,17 +151,15 @@
     private MidiSystem() {
     }
 
-
     /**
-     * Obtains an array of information objects representing
-     * the set of all MIDI devices available on the system.
-     * A returned information object can then be used to obtain the
-     * corresponding device object, by invoking
+     * Obtains an array of information objects representing the set of all MIDI
+     * devices available on the system. A returned information object can then
+     * be used to obtain the corresponding device object, by invoking
      * {@link #getMidiDevice(MidiDevice.Info) getMidiDevice}.
      *
-     * @return an array of <code>MidiDevice.Info</code> objects, one
-     * for each installed MIDI device.  If no such devices are installed,
-     * an array of length 0 is returned.
+     * @return an array of {@code MidiDevice.Info} objects, one for each
+     *         installed MIDI device. If no such devices are installed, an array
+     *         of length 0 is returned.
      */
     public static MidiDevice.Info[] getMidiDeviceInfo() {
         List<MidiDevice.Info> allInfos = new ArrayList<>();
@@ -201,16 +176,15 @@
         return infosArray;
     }
 
-
     /**
      * Obtains the requested MIDI device.
      *
-     * @param info a device information object representing the desired device.
+     * @param  info a device information object representing the desired device
      * @return the requested device
      * @throws MidiUnavailableException if the requested device is not available
-     * due to resource restrictions
-     * @throws IllegalArgumentException if the info object does not represent
-     * a MIDI device installed on the system
+     *         due to resource restrictions
+     * @throws IllegalArgumentException if the info object does not represent a
+     *         MIDI device installed on the system
      * @see #getMidiDeviceInfo
      */
     public static MidiDevice getMidiDevice(MidiDevice.Info info) throws MidiUnavailableException {
@@ -226,44 +200,38 @@
         throw new IllegalArgumentException("Requested device not installed: " + info);
     }
 
-
     /**
-     * Obtains a MIDI receiver from an external MIDI port
-     * or other default device.
-     * The returned receiver always implements
-     * the {@code MidiDeviceReceiver} interface.
-     *
-     * <p>If the system property
-     * <code>javax.sound.midi.Receiver</code>
-     * is defined or it is defined in the file &quot;sound.properties&quot;,
-     * it is used to identify the device that provides the default receiver.
-     * For details, refer to the {@link MidiSystem class description}.
-     *
-     * If a suitable MIDI port is not available, the Receiver is
-     * retrieved from an installed synthesizer.
-     *
-     * <p>If a native receiver provided by the default device does not implement
-     * the {@code MidiDeviceReceiver} interface, it will be wrapped in a
-     * wrapper class that implements the {@code MidiDeviceReceiver} interface.
-     * The corresponding {@code Receiver} method calls will be forwarded
-     * to the native receiver.
-     *
-     * <p>If this method returns successfully, the {@link
-     * javax.sound.midi.MidiDevice MidiDevice} the
-     * <code>Receiver</code> belongs to is opened implicitly, if it is
-     * not already open. It is possible to close an implicitly opened
-     * device by calling {@link javax.sound.midi.Receiver#close close}
-     * on the returned <code>Receiver</code>. All open <code>Receiver</code>
-     * instances have to be closed in order to release system resources
-     * hold by the <code>MidiDevice</code>. For a
-     * detailed description of open/close behaviour see the class
-     * description of {@link javax.sound.midi.MidiDevice MidiDevice}.
-     *
+     * Obtains a MIDI receiver from an external MIDI port or other default
+     * device. The returned receiver always implements the
+     * {@code MidiDeviceReceiver} interface.
+     * <p>
+     * If the system property {@code javax.sound.midi.Receiver} is defined or it
+     * is defined in the file "sound.properties", it is used to identify the
+     * device that provides the default receiver. For details, refer to the
+     * {@link MidiSystem class description}.
+     * <p>
+     * If a suitable MIDI port is not available, the Receiver is retrieved from
+     * an installed synthesizer.
+     * <p>
+     * If a native receiver provided by the default device does not implement
+     * the {@code MidiDeviceReceiver} interface, it will be wrapped in a wrapper
+     * class that implements the {@code MidiDeviceReceiver} interface. The
+     * corresponding {@code Receiver} method calls will be forwarded to the
+     * native receiver.
+     * <p>
+     * If this method returns successfully, the {@link MidiDevice MidiDevice}
+     * the {@code Receiver} belongs to is opened implicitly, if it is not
+     * already open. It is possible to close an implicitly opened device by
+     * calling {@link Receiver#close close} on the returned {@code Receiver}.
+     * All open {@code Receiver} instances have to be closed in order to release
+     * system resources hold by the {@code MidiDevice}. For a detailed
+     * description of open/close behaviour see the class description of
+     * {@link MidiDevice MidiDevice}.
      *
      * @return the default MIDI receiver
-     * @throws MidiUnavailableException if the default receiver is not
-     *         available due to resource restrictions,
-     *         or no device providing receivers is installed in the system
+     * @throws MidiUnavailableException if the default receiver is not available
+     *         due to resource restrictions, or no device providing receivers is
+     *         installed in the system
      */
     public static Receiver getReceiver() throws MidiUnavailableException {
         // may throw MidiUnavailableException
@@ -280,41 +248,35 @@
         return receiver;
     }
 
-
     /**
-     * Obtains a MIDI transmitter from an external MIDI port
-     * or other default source.
-     * The returned transmitter always implements
-     * the {@code MidiDeviceTransmitter} interface.
-     *
-     * <p>If the system property
-     * <code>javax.sound.midi.Transmitter</code>
-     * is defined or it is defined in the file &quot;sound.properties&quot;,
-     * it is used to identify the device that provides the default transmitter.
-     * For details, refer to the {@link MidiSystem class description}.
-     *
-     * <p>If a native transmitter provided by the default device does not implement
+     * Obtains a MIDI transmitter from an external MIDI port or other default
+     * source. The returned transmitter always implements the
+     * {@code MidiDeviceTransmitter} interface.
+     * <p>
+     * If the system property {@code javax.sound.midi.Transmitter} is defined or
+     * it is defined in the file "sound.properties", it is used to identify the
+     * device that provides the default transmitter. For details, refer to the
+     * {@link MidiSystem class description}.
+     * <p>
+     * If a native transmitter provided by the default device does not implement
      * the {@code MidiDeviceTransmitter} interface, it will be wrapped in a
-     * wrapper class that implements the {@code MidiDeviceTransmitter} interface.
-     * The corresponding {@code Transmitter} method calls will be forwarded
-     * to the native transmitter.
-     *
-     * <p>If this method returns successfully, the {@link
-     * javax.sound.midi.MidiDevice MidiDevice} the
-     * <code>Transmitter</code> belongs to is opened implicitly, if it
-     * is not already open. It is possible to close an implicitly
-     * opened device by calling {@link
-     * javax.sound.midi.Transmitter#close close} on the returned
-     * <code>Transmitter</code>. All open <code>Transmitter</code>
-     * instances have to be closed in order to release system resources
-     * hold by the <code>MidiDevice</code>. For a detailed description
-     * of open/close behaviour see the class description of {@link
-     * javax.sound.midi.MidiDevice MidiDevice}.
+     * wrapper class that implements the {@code MidiDeviceTransmitter}
+     * interface. The corresponding {@code Transmitter} method calls will be
+     * forwarded to the native transmitter.
+     * <p>
+     * If this method returns successfully, the {@link MidiDevice MidiDevice}
+     * the {@code Transmitter} belongs to is opened implicitly, if it is not
+     * already open. It is possible to close an implicitly opened device by
+     * calling {@link Transmitter#close close} on the returned
+     * {@code Transmitter}. All open {@code Transmitter} instances have to be
+     * closed in order to release system resources hold by the
+     * {@code MidiDevice}. For a detailed description of open/close behaviour
+     * see the class description of {@link MidiDevice MidiDevice}.
      *
      * @return the default MIDI transmitter
      * @throws MidiUnavailableException if the default transmitter is not
-     *         available due to resource restrictions,
-     *         or no device providing transmitters is installed in the system
+     *         available due to resource restrictions, or no device providing
+     *         transmitters is installed in the system
      */
     public static Transmitter getTransmitter() throws MidiUnavailableException {
         // may throw MidiUnavailableException
@@ -331,59 +293,48 @@
         return transmitter;
     }
 
-
     /**
      * Obtains the default synthesizer.
-     *
-     * <p>If the system property
-     * <code>javax.sound.midi.Synthesizer</code>
-     * is defined or it is defined in the file &quot;sound.properties&quot;,
-     * it is used to identify the default synthesizer.
-     * For details, refer to the {@link MidiSystem class description}.
+     * <p>
+     * If the system property {@code javax.sound.midi.Synthesizer} is defined or
+     * it is defined in the file "sound.properties", it is used to identify the
+     * default synthesizer. For details, refer to the
+     * {@link MidiSystem class description}.
      *
      * @return the default synthesizer
-     * @throws MidiUnavailableException if the synthesizer is not
-     *         available due to resource restrictions,
-     *         or no synthesizer is installed in the system
+     * @throws MidiUnavailableException if the synthesizer is not available due
+     *         to resource restrictions, or no synthesizer is installed in the
+     *         system
      */
     public static Synthesizer getSynthesizer() throws MidiUnavailableException {
         // may throw MidiUnavailableException
         return (Synthesizer) getDefaultDeviceWrapper(Synthesizer.class);
     }
 
-
     /**
-     * Obtains the default <code>Sequencer</code>, connected to
-     * a default device.
-     * The returned <code>Sequencer</code> instance is
-     * connected to the default <code>Synthesizer</code>,
-     * as returned by {@link #getSynthesizer}.
-     * If there is no <code>Synthesizer</code>
-     * available, or the default <code>Synthesizer</code>
-     * cannot be opened, the <code>sequencer</code> is connected
-     * to the default <code>Receiver</code>, as returned
-     * by {@link #getReceiver}.
-     * The connection is made by retrieving a <code>Transmitter</code>
-     * instance from the <code>Sequencer</code> and setting its
-     * <code>Receiver</code>.
-     * Closing and re-opening the sequencer will restore the
-     * connection to the default device.
-     *
-     * <p>This method is equivalent to calling
-     * <code>getSequencer(true)</code>.
-     *
-     * <p>If the system property
-     * <code>javax.sound.midi.Sequencer</code>
-     * is defined or it is defined in the file &quot;sound.properties&quot;,
-     * it is used to identify the default sequencer.
-     * For details, refer to the {@link MidiSystem class description}.
+     * Obtains the default {@code Sequencer}, connected to a default device. The
+     * returned {@code Sequencer} instance is connected to the default
+     * {@code Synthesizer}, as returned by {@link #getSynthesizer}. If there is
+     * no {@code Synthesizer} available, or the default {@code Synthesizer}
+     * cannot be opened, the {@code sequencer} is connected to the default
+     * {@code Receiver}, as returned by {@link #getReceiver}. The connection is
+     * made by retrieving a {@code Transmitter} instance from the
+     * {@code Sequencer} and setting its {@code Receiver}. Closing and
+     * re-opening the sequencer will restore the connection to the default
+     * device.
+     * <p>
+     * This method is equivalent to calling {@code getSequencer(true)}.
+     * <p>
+     * If the system property {@code javax.sound.midi.Sequencer} is defined or
+     * it is defined in the file "sound.properties", it is used to identify the
+     * default sequencer. For details, refer to the
+     * {@link MidiSystem class description}.
      *
      * @return the default sequencer, connected to a default Receiver
-     * @throws MidiUnavailableException if the sequencer is not
-     *         available due to resource restrictions,
-     *         or there is no <code>Receiver</code> available by any
-     *         installed <code>MidiDevice</code>,
-     *         or no sequencer is installed in the system.
+     * @throws MidiUnavailableException if the sequencer is not available due to
+     *         resource restrictions, or there is no {@code Receiver} available
+     *         by any installed {@code MidiDevice}, or no sequencer is installed
+     *         in the system
      * @see #getSequencer(boolean)
      * @see #getSynthesizer
      * @see #getReceiver
@@ -392,49 +343,37 @@
         return getSequencer(true);
     }
 
-
-
     /**
-     * Obtains the default <code>Sequencer</code>, optionally
-     * connected to a default device.
-     *
-     * <p>If <code>connected</code> is true, the returned
-     * <code>Sequencer</code> instance is
-     * connected to the default <code>Synthesizer</code>,
-     * as returned by {@link #getSynthesizer}.
-     * If there is no <code>Synthesizer</code>
-     * available, or the default <code>Synthesizer</code>
-     * cannot be opened, the <code>sequencer</code> is connected
-     * to the default <code>Receiver</code>, as returned
-     * by {@link #getReceiver}.
-     * The connection is made by retrieving a <code>Transmitter</code>
-     * instance from the <code>Sequencer</code> and setting its
-     * <code>Receiver</code>.
-     * Closing and re-opening the sequencer will restore the
+     * Obtains the default {@code Sequencer}, optionally connected to a default
+     * device.
+     * <p>
+     * If {@code connected} is true, the returned {@code Sequencer} instance is
+     * connected to the default {@code Synthesizer}, as returned by
+     * {@link #getSynthesizer}. If there is no {@code Synthesizer} available, or
+     * the default {@code Synthesizer} cannot be opened, the {@code sequencer}
+     * is connected to the default {@code Receiver}, as returned by
+     * {@link #getReceiver}. The connection is made by retrieving a
+     * {@code Transmitter} instance from the {@code Sequencer} and setting its
+     * {@code Receiver}. Closing and re-opening the sequencer will restore the
      * connection to the default device.
+     * <p>
+     * If {@code connected} is false, the returned {@code Sequencer} instance is
+     * not connected, it has no open {@code Transmitters}. In order to play the
+     * sequencer on a MIDI device, or a {@code Synthesizer}, it is necessary to
+     * get a {@code Transmitter} and set its {@code Receiver}.
+     * <p>
+     * If the system property {@code javax.sound.midi.Sequencer} is defined or
+     * it is defined in the file "sound.properties", it is used to identify the
+     * default sequencer. For details, refer to the
+     * {@link MidiSystem class description}.
      *
-     * <p>If <code>connected</code> is false, the returned
-     * <code>Sequencer</code> instance is not connected, it
-     * has no open <code>Transmitters</code>. In order to
-     * play the sequencer on a MIDI device, or a <code>Synthesizer</code>,
-     * it is necessary to get a <code>Transmitter</code> and set its
-     * <code>Receiver</code>.
-     *
-     * <p>If the system property
-     * <code>javax.sound.midi.Sequencer</code>
-     * is defined or it is defined in the file "sound.properties",
-     * it is used to identify the default sequencer.
-     * For details, refer to the {@link MidiSystem class description}.
-     *
-     * @param connected whether or not the returned {@code Sequencer}
-     * is connected to the default {@code Synthesizer}
+     * @param  connected whether or not the returned {@code Sequencer} is
+     *         connected to the default {@code Synthesizer}
      * @return the default sequencer
-     * @throws MidiUnavailableException if the sequencer is not
-     *         available due to resource restrictions,
-     *         or no sequencer is installed in the system,
-     *         or if <code>connected</code> is true, and there is
-     *         no <code>Receiver</code> available by any installed
-     *         <code>MidiDevice</code>
+     * @throws MidiUnavailableException if the sequencer is not available due to
+     *         resource restrictions, or no sequencer is installed in the
+     *         system, or if {@code connected} is true, and there is no
+     *         {@code Receiver} available by any installed {@code MidiDevice}
      * @see #getSynthesizer
      * @see #getReceiver
      * @since 1.5
@@ -501,23 +440,20 @@
         return seq;
     }
 
-
-
-
     /**
-     * Constructs a MIDI sound bank by reading it from the specified stream.
-     * The stream must point to
-     * a valid MIDI soundbank file.  In general, MIDI soundbank providers may
-     * need to read some data from the stream before determining whether they
-     * support it.  These parsers must
-     * be able to mark the stream, read enough data to determine whether they
-     * support the stream, and, if not, reset the stream's read pointer to
-     * its original position.  If the input stream does not support this,
-     * this method may fail with an IOException.
-     * @param stream the source of the sound bank data.
+     * Constructs a MIDI sound bank by reading it from the specified stream. The
+     * stream must point to a valid MIDI soundbank file. In general, MIDI
+     * soundbank providers may need to read some data from the stream before
+     * determining whether they support it. These parsers must be able to mark
+     * the stream, read enough data to determine whether they support the
+     * stream, and, if not, reset the stream's read pointer to its original
+     * position. If the input stream does not support this, this method may fail
+     * with an {@code IOException}.
+     *
+     * @param  stream the source of the sound bank data
      * @return the sound bank
-     * @throws InvalidMidiDataException if the stream does not point to
-     * valid MIDI soundbank data recognized by the system
+     * @throws InvalidMidiDataException if the stream does not point to valid
+     *         MIDI soundbank data recognized by the system
      * @throws IOException if an I/O error occurred when loading the soundbank
      * @see InputStream#markSupported
      * @see InputStream#mark
@@ -542,15 +478,14 @@
 
     }
 
-
     /**
-     * Constructs a <code>Soundbank</code> by reading it from the specified URL.
-     * The URL must point to a valid MIDI soundbank file.
+     * Constructs a {@code Soundbank} by reading it from the specified URL. The
+     * URL must point to a valid MIDI soundbank file.
      *
-     * @param url the source of the sound bank data
+     * @param  url the source of the sound bank data
      * @return the sound bank
      * @throws InvalidMidiDataException if the URL does not point to valid MIDI
-     * soundbank data recognized by the system
+     *         soundbank data recognized by the system
      * @throws IOException if an I/O error occurred when loading the soundbank
      */
     public static Soundbank getSoundbank(URL url)
@@ -573,16 +508,14 @@
 
     }
 
-
     /**
-     * Constructs a <code>Soundbank</code> by reading it from the specified
-     * <code>File</code>.
-     * The <code>File</code> must point to a valid MIDI soundbank file.
+     * Constructs a {@code Soundbank} by reading it from the specified
+     * {@code File}. The {@code File} must point to a valid MIDI soundbank file.
      *
-     * @param file the source of the sound bank data
+     * @param  file the source of the sound bank data
      * @return the sound bank
-     * @throws InvalidMidiDataException if the <code>File</code> does not
-     * point to valid MIDI soundbank data recognized by the system
+     * @throws InvalidMidiDataException if the {@code File} does not point to
+     *         valid MIDI soundbank data recognized by the system
      * @throws IOException if an I/O error occurred when loading the soundbank
      */
     public static Soundbank getSoundbank(File file)
@@ -604,35 +537,33 @@
         throw new InvalidMidiDataException("cannot get soundbank from stream");
     }
 
-
-
     /**
      * Obtains the MIDI file format of the data in the specified input stream.
      * The stream must point to valid MIDI file data for a file type recognized
      * by the system.
      * <p>
      * This method and/or the code it invokes may need to read some data from
-     * the stream to determine whether its data format is supported.  The
-     * implementation may therefore
-     * need to mark the stream, read enough data to determine whether it is in
-     * a supported format, and reset the stream's read pointer to its original
-     * position.  If the input stream does not permit this set of operations,
-     * this method may fail with an <code>IOException</code>.
+     * the stream to determine whether its data format is supported. The
+     * implementation may therefore need to mark the stream, read enough data to
+     * determine whether it is in a supported format, and reset the stream's
+     * read pointer to its original position. If the input stream does not
+     * permit this set of operations, this method may fail with an
+     * {@code IOException}.
      * <p>
      * This operation can only succeed for files of a type which can be parsed
-     * by an installed file reader.  It may fail with an InvalidMidiDataException
-     * even for valid files if no compatible file reader is installed.  It
-     * will also fail with an InvalidMidiDataException if a compatible file reader
-     * is installed, but encounters errors while determining the file format.
+     * by an installed file reader. It may fail with an
+     * {@code InvalidMidiDataException} even for valid files if no compatible
+     * file reader is installed. It will also fail with an
+     * {@code InvalidMidiDataException} if a compatible file reader is
+     * installed, but encounters errors while determining the file format.
      *
-     * @param stream the input stream from which file format information
-     * should be extracted
-     * @return an <code>MidiFileFormat</code> object describing the MIDI file
-     * format
+     * @param  stream the input stream from which file format information should
+     *         be extracted
+     * @return an {@code MidiFileFormat} object describing the MIDI file format
      * @throws InvalidMidiDataException if the stream does not point to valid
-     * MIDI file data recognized by the system
+     *         MIDI file data recognized by the system
      * @throws IOException if an I/O exception occurs while accessing the
-     * stream
+     *         stream
      * @see #getMidiFileFormat(URL)
      * @see #getMidiFileFormat(File)
      * @see InputStream#markSupported
@@ -661,26 +592,24 @@
         }
     }
 
-
     /**
-     * Obtains the MIDI file format of the data in the specified URL.  The URL
-     * must point to valid MIDI file data for a file type recognized
-     * by the system.
+     * Obtains the MIDI file format of the data in the specified URL. The URL
+     * must point to valid MIDI file data for a file type recognized by the
+     * system.
      * <p>
      * This operation can only succeed for files of a type which can be parsed
-     * by an installed file reader.  It may fail with an InvalidMidiDataException
-     * even for valid files if no compatible file reader is installed.  It
-     * will also fail with an InvalidMidiDataException if a compatible file reader
-     * is installed, but encounters errors while determining the file format.
+     * by an installed file reader. It may fail with an
+     * {@code InvalidMidiDataException} even for valid files if no compatible
+     * file reader is installed. It will also fail with an
+     * {@code InvalidMidiDataException} if a compatible file reader is
+     * installed, but encounters errors while determining the file format.
      *
-     * @param url the URL from which file format information should be
-     * extracted
-     * @return a <code>MidiFileFormat</code> object describing the MIDI file
-     * format
+     * @param  url the URL from which file format information should be
+     *         extracted
+     * @return a {@code MidiFileFormat} object describing the MIDI file format
      * @throws InvalidMidiDataException if the URL does not point to valid MIDI
-     * file data recognized by the system
+     *         file data recognized by the system
      * @throws IOException if an I/O exception occurs while accessing the URL
-     *
      * @see #getMidiFileFormat(InputStream)
      * @see #getMidiFileFormat(File)
      */
@@ -707,26 +636,24 @@
         }
     }
 
-
     /**
-     * Obtains the MIDI file format of the specified <code>File</code>.  The
-     * <code>File</code> must point to valid MIDI file data for a file type
+     * Obtains the MIDI file format of the specified {@code File}. The
+     * {@code File} must point to valid MIDI file data for a file type
      * recognized by the system.
      * <p>
      * This operation can only succeed for files of a type which can be parsed
-     * by an installed file reader.  It may fail with an InvalidMidiDataException
-     * even for valid files if no compatible file reader is installed.  It
-     * will also fail with an InvalidMidiDataException if a compatible file reader
-     * is installed, but encounters errors while determining the file format.
+     * by an installed file reader. It may fail with an
+     * {@code InvalidMidiDataException} even for valid files if no compatible
+     * file reader is installed. It will also fail with an
+     * {@code InvalidMidiDataException} if a compatible file reader is
+     * installed, but encounters errors while determining the file format.
      *
-     * @param file the <code>File</code> from which file format information
-     * should be extracted
-     * @return a <code>MidiFileFormat</code> object describing the MIDI file
-     * format
-     * @throws InvalidMidiDataException if the <code>File</code> does not point
-     *  to valid MIDI file data recognized by the system
+     * @param  file the {@code File} from which file format information should
+     *         be extracted
+     * @return a {@code MidiFileFormat} object describing the MIDI file format
+     * @throws InvalidMidiDataException if the {@code File} does not point to
+     *         valid MIDI file data recognized by the system
      * @throws IOException if an I/O exception occurs while accessing the file
-     *
      * @see #getMidiFileFormat(InputStream)
      * @see #getMidiFileFormat(URL)
      */
@@ -753,35 +680,33 @@
         }
     }
 
-
     /**
-     * Obtains a MIDI sequence from the specified input stream.  The stream must
-     * point to valid MIDI file data for a file type recognized
-     * by the system.
+     * Obtains a MIDI sequence from the specified input stream. The stream must
+     * point to valid MIDI file data for a file type recognized by the system.
      * <p>
-     * This method and/or the code it invokes may need to read some data
-     * from the stream to determine whether
-     * its data format is supported.  The implementation may therefore
-     * need to mark the stream, read enough data to determine whether it is in
-     * a supported format, and reset the stream's read pointer to its original
-     * position.  If the input stream does not permit this set of operations,
-     * this method may fail with an <code>IOException</code>.
+     * This method and/or the code it invokes may need to read some data from
+     * the stream to determine whether its data format is supported. The
+     * implementation may therefore need to mark the stream, read enough data to
+     * determine whether it is in a supported format, and reset the stream's
+     * read pointer to its original position. If the input stream does not
+     * permit this set of operations, this method may fail with an
+     * {@code IOException}.
      * <p>
      * This operation can only succeed for files of a type which can be parsed
-     * by an installed file reader.  It may fail with an InvalidMidiDataException
-     * even for valid files if no compatible file reader is installed.  It
-     * will also fail with an InvalidMidiDataException if a compatible file reader
-     * is installed, but encounters errors while constructing the <code>Sequence</code>
+     * by an installed file reader. It may fail with an
+     * {@code InvalidMidiDataException} even for valid files if no compatible
+     * file reader is installed. It will also fail with an
+     * {@code InvalidMidiDataException} if a compatible file reader is
+     * installed, but encounters errors while constructing the {@code Sequence}
      * object from the file data.
      *
-     * @param stream the input stream from which the <code>Sequence</code>
-     * should be constructed
-     * @return a <code>Sequence</code> object based on the MIDI file data
-     * contained in the input stream
-     * @throws InvalidMidiDataException if the stream does not point to
-     * valid MIDI file data recognized by the system
-     * @throws IOException if an I/O exception occurs while accessing the
-     * stream
+     * @param  stream the input stream from which the {@code Sequence} should be
+     *         constructed
+     * @return a {@code Sequence} object based on the MIDI file data contained
+     *         in the input stream
+     * @throws InvalidMidiDataException if the stream does not point to valid
+     *         MIDI file data recognized by the system
+     * @throws IOException if an I/O exception occurs while accessing the stream
      * @see InputStream#markSupported
      * @see InputStream#mark
      */
@@ -808,25 +733,23 @@
         }
     }
 
-
     /**
-     * Obtains a MIDI sequence from the specified URL.  The URL must
-     * point to valid MIDI file data for a file type recognized
-     * by the system.
+     * Obtains a MIDI sequence from the specified URL. The URL must point to
+     * valid MIDI file data for a file type recognized by the system.
      * <p>
      * This operation can only succeed for files of a type which can be parsed
-     * by an installed file reader.  It may fail with an InvalidMidiDataException
-     * even for valid files if no compatible file reader is installed.  It
-     * will also fail with an InvalidMidiDataException if a compatible file reader
-     * is installed, but encounters errors while constructing the <code>Sequence</code>
+     * by an installed file reader. It may fail with an
+     * {@code InvalidMidiDataException} even for valid files if no compatible
+     * file reader is installed. It will also fail with an
+     * {@code InvalidMidiDataException} if a compatible file reader is
+     * installed, but encounters errors while constructing the {@code Sequence}
      * object from the file data.
      *
-     * @param url the URL from which the <code>Sequence</code> should be
-     * constructed
-     * @return a <code>Sequence</code> object based on the MIDI file data
-     * pointed to by the URL
+     * @param  url the URL from which the {@code Sequence} should be constructed
+     * @return a {@code Sequence} object based on the MIDI file data pointed to
+     *         by the URL
      * @throws InvalidMidiDataException if the URL does not point to valid MIDI
-     * file data recognized by the system
+     *         file data recognized by the system
      * @throws IOException if an I/O exception occurs while accessing the URL
      */
     public static Sequence getSequence(URL url)
@@ -852,25 +775,25 @@
         }
     }
 
-
     /**
-     * Obtains a MIDI sequence from the specified <code>File</code>.
-     * The <code>File</code> must point to valid MIDI file data
-     * for a file type recognized by the system.
+     * Obtains a MIDI sequence from the specified {@code File}. The {@code File}
+     * must point to valid MIDI file data for a file type recognized by the
+     * system.
      * <p>
      * This operation can only succeed for files of a type which can be parsed
-     * by an installed file reader.  It may fail with an InvalidMidiDataException
-     * even for valid files if no compatible file reader is installed.  It
-     * will also fail with an InvalidMidiDataException if a compatible file reader
-     * is installed, but encounters errors while constructing the <code>Sequence</code>
+     * by an installed file reader. It may fail with an
+     * {@code InvalidMidiDataException} even for valid files if no compatible
+     * file reader is installed. It will also fail with an
+     * {@code InvalidMidiDataException} if a compatible file reader is
+     * installed, but encounters errors while constructing the {@code Sequence}
      * object from the file data.
      *
-     * @param file the <code>File</code> from which the <code>Sequence</code>
-     * should be constructed
-     * @return a <code>Sequence</code> object based on the MIDI file data
-     * pointed to by the File
+     * @param  file the {@code File} from which the {@code Sequence} should be
+     *         constructed
+     * @return a {@code Sequence} object based on the MIDI file data pointed to
+     *         by the File
      * @throws InvalidMidiDataException if the File does not point to valid MIDI
-     * file data recognized by the system
+     *         file data recognized by the system
      * @throws IOException if an I/O exception occurs
      */
     public static Sequence getSequence(File file)
@@ -896,12 +819,12 @@
         }
     }
 
-
     /**
      * Obtains the set of MIDI file types for which file writing support is
      * provided by the system.
-     * @return array of unique file types.  If no file types are supported,
-     * an array of length 0 is returned.
+     *
+     * @return array of unique file types. If no file types are supported, an
+     *         array of length 0 is returned.
      */
     public static int[] getMidiFileTypes() {
 
@@ -927,13 +850,13 @@
         return resultTypes;
     }
 
-
     /**
      * Indicates whether file writing support for the specified MIDI file type
      * is provided by the system.
-     * @param fileType the file type for which write capabilities are queried
-     * @return <code>true</code> if the file type is supported,
-     * otherwise <code>false</code>
+     *
+     * @param  fileType the file type for which write capabilities are queried
+     * @return {@code true} if the file type is supported, otherwise
+     *         {@code false}
      */
     public static boolean isFileTypeSupported(int fileType) {
 
@@ -948,14 +871,13 @@
         return false;
     }
 
-
     /**
      * Obtains the set of MIDI file types that the system can write from the
      * sequence specified.
-     * @param sequence the sequence for which MIDI file type support
-     * is queried
-     * @return the set of unique supported file types.  If no file types are supported,
-     * returns an array of length 0.
+     *
+     * @param  sequence the sequence for which MIDI file type support is queried
+     * @return the set of unique supported file types. If no file types are
+     *         supported, returns an array of length 0.
      */
     public static int[] getMidiFileTypes(Sequence sequence) {
 
@@ -981,15 +903,14 @@
         return resultTypes;
     }
 
-
     /**
      * Indicates whether a MIDI file of the file type specified can be written
      * from the sequence indicated.
-     * @param fileType the file type for which write capabilities
-     * are queried
-     * @param sequence the sequence for which file writing support is queried
-     * @return <code>true</code> if the file type is supported for this
-     * sequence, otherwise <code>false</code>
+     *
+     * @param  fileType the file type for which write capabilities are queried
+     * @param  sequence the sequence for which file writing support is queried
+     * @return {@code true} if the file type is supported for this sequence,
+     *         otherwise {@code false}
      */
     public static boolean isFileTypeSupported(int fileType, Sequence sequence) {
 
@@ -1004,19 +925,20 @@
         return false;
     }
 
-
     /**
      * Writes a stream of bytes representing a file of the MIDI file type
      * indicated to the output stream provided.
-     * @param in sequence containing MIDI data to be written to the file
-     * @param fileType the file type of the file to be written to the output stream
-     * @param out stream to which the file data should be written
+     *
+     * @param  in sequence containing MIDI data to be written to the file
+     * @param  fileType the file type of the file to be written to the output
+     *         stream
+     * @param  out stream to which the file data should be written
      * @return the number of bytes written to the output stream
      * @throws IOException if an I/O exception occurs
      * @throws IllegalArgumentException if the file format is not supported by
-     * the system
+     *         the system
      * @see #isFileTypeSupported(int, Sequence)
-     * @see     #getMidiFileTypes(Sequence)
+     * @see #getMidiFileTypes(Sequence)
      */
     public static int write(Sequence in, int fileType, OutputStream out) throws IOException {
 
@@ -1038,19 +960,19 @@
         return bytesWritten;
     }
 
-
     /**
      * Writes a stream of bytes representing a file of the MIDI file type
      * indicated to the external file provided.
-     * @param in sequence containing MIDI data to be written to the file
-     * @param type the file type of the file to be written to the output stream
-     * @param out external file to which the file data should be written
+     *
+     * @param  in sequence containing MIDI data to be written to the file
+     * @param  type the file type of the file to be written to the output stream
+     * @param  out external file to which the file data should be written
      * @return the number of bytes written to the file
      * @throws IOException if an I/O exception occurs
-     * @throws IllegalArgumentException if the file type is not supported by
-     * the system
+     * @throws IllegalArgumentException if the file type is not supported by the
+     *         system
      * @see #isFileTypeSupported(int, Sequence)
-     * @see     #getMidiFileTypes(Sequence)
+     * @see #getMidiFileTypes(Sequence)
      */
     public static int write(Sequence in, int type, File out) throws IOException {
 
@@ -1072,8 +994,6 @@
         return bytesWritten;
     }
 
-
-
     // HELPER METHODS
     @SuppressWarnings("unchecked")
     private static List<MidiDeviceProvider> getMidiDeviceProviders() {
@@ -1095,19 +1015,16 @@
         return (List<MidiFileReader>) getProviders(MidiFileReader.class);
     }
 
-
-    /** Attempts to locate and return a default MidiDevice of the specified
-     * type.
-     *
+    /**
+     * Attempts to locate and return a default MidiDevice of the specified type.
      * This method wraps {@link #getDefaultDevice}. It catches the
-     * <code>IllegalArgumentException</code> thrown by
-     * <code>getDefaultDevice</code> and instead throws a
-     * <code>MidiUnavailableException</code>, with the catched
+     * {@code IllegalArgumentException} thrown by {@code getDefaultDevice} and
+     * instead throws a {@code MidiUnavailableException}, with the catched
      * exception chained.
      *
-     * @param deviceClass The requested device type, one of Synthesizer.class,
-     * Sequencer.class, Receiver.class or Transmitter.class.
-     * @throws  MidiUnavalableException on failure.
+     * @param  deviceClass The requested device type, one of Synthesizer.class,
+     *         Sequencer.class, Receiver.class or Transmitter.class
+     * @throws MidiUnavailableException on failure
      */
     private static MidiDevice getDefaultDeviceWrapper(Class<?> deviceClass)
         throws MidiUnavailableException{
@@ -1120,13 +1037,12 @@
         }
     }
 
-
-    /** Attempts to locate and return a default MidiDevice of the specified
-     * type.
+    /**
+     * Attempts to locate and return a default MidiDevice of the specified type.
      *
-     * @param deviceClass The requested device type, one of Synthesizer.class,
-     * Sequencer.class, Receiver.class or Transmitter.class.
-     * @throws  IllegalArgumentException on failure.
+     * @param  deviceClass The requested device type, one of Synthesizer.class,
+     *         Sequencer.class, Receiver.class or Transmitter.class
+     * @throws IllegalArgumentException on failure
      */
     private static MidiDevice getDefaultDevice(Class<?> deviceClass) {
         List<MidiDeviceProvider> providers = getMidiDeviceProviders();
@@ -1169,16 +1085,15 @@
         throw new IllegalArgumentException("Requested device not installed");
     }
 
-
-
-    /** Return a MidiDeviceProcider of a given class from the list of
-        MidiDeviceProviders.
-
-        @param providerClassName The class name of the provider to be returned.
-        @param provider The list of MidiDeviceProviders that is searched.
-        @return A MidiDeviceProvider of the requested class, or null if none
-        is found.
-    */
+    /**
+     * Return a MidiDeviceProvider of a given class from the list of
+     * MidiDeviceProviders.
+     *
+     * @param  providerClassName The class name of the provider to be returned
+     * @param  providers The list of MidiDeviceProviders that is searched
+     * @return A MidiDeviceProvider of the requested class, or null if none is
+     *         found
+     */
     private static MidiDeviceProvider getNamedProvider(String providerClassName,
                                                        List<MidiDeviceProvider> providers) {
         for(int i = 0; i < providers.size(); i++) {
@@ -1190,15 +1105,15 @@
         return null;
     }
 
-
-    /** Return a MidiDevice with a given name from a given MidiDeviceProvider.
-        @param deviceName The name of the MidiDevice to be returned.
-        @param provider The MidiDeviceProvider to check for MidiDevices.
-        @param deviceClass The requested device type, one of Synthesizer.class,
-        Sequencer.class, Receiver.class or Transmitter.class.
-
-        @return A MidiDevice matching the requirements, or null if none is found.
-    */
+    /**
+     * Return a MidiDevice with a given name from a given MidiDeviceProvider.
+     *
+     * @param  deviceName The name of the MidiDevice to be returned
+     * @param  provider The MidiDeviceProvider to check for MidiDevices
+     * @param  deviceClass The requested device type, one of Synthesizer.class,
+     *         Sequencer.class, Receiver.class or Transmitter.class
+     * @return A MidiDevice matching the requirements, or null if none is found
+     */
     private static MidiDevice getNamedDevice(String deviceName,
                                              MidiDeviceProvider provider,
                                              Class<?> deviceClass) {
@@ -1222,14 +1137,14 @@
         return null;
     }
 
-
-    /** Return a MidiDevice with a given name from a given MidiDeviceProvider.
-      @param deviceName The name of the MidiDevice to be returned.
-      @param provider The MidiDeviceProvider to check for MidiDevices.
-      @param deviceClass The requested device type, one of Synthesizer.class,
-      Sequencer.class, Receiver.class or Transmitter.class.
-
-      @return A MidiDevice matching the requirements, or null if none is found.
+    /**
+     * Return a MidiDevice with a given name from a given MidiDeviceProvider.
+     *
+     * @param  deviceName The name of the MidiDevice to be returned
+     * @param  provider The MidiDeviceProvider to check for MidiDevices
+     * @param  deviceClass The requested device type, one of Synthesizer.class,
+     *         Sequencer.class, Receiver.class or Transmitter.class
+     * @return A MidiDevice matching the requirements, or null if none is found
      */
     private static MidiDevice getNamedDevice(String deviceName,
                                              MidiDeviceProvider provider,
@@ -1249,16 +1164,16 @@
         return null;
     }
 
-
-    /** Return a MidiDevice with a given name from a list of
-        MidiDeviceProviders.
-        @param deviceName The name of the MidiDevice to be returned.
-        @param providers The List of MidiDeviceProviders to check for
-        MidiDevices.
-        @param deviceClass The requested device type, one of Synthesizer.class,
-        Sequencer.class, Receiver.class or Transmitter.class.
-        @return A Mixer matching the requirements, or null if none is found.
-    */
+    /**
+     * Return a MidiDevice with a given name from a list of MidiDeviceProviders.
+     *
+     * @param  deviceName The name of the MidiDevice to be returned
+     * @param  providers The List of MidiDeviceProviders to check for
+     *         MidiDevices
+     * @param  deviceClass The requested device type, one of Synthesizer.class,
+     *         Sequencer.class, Receiver.class or Transmitter.class
+     * @return A Mixer matching the requirements, or null if none is found
+     */
     private static MidiDevice getNamedDevice(String deviceName,
                                              List<MidiDeviceProvider> providers,
                                              Class<?> deviceClass) {
@@ -1282,15 +1197,15 @@
         return null;
     }
 
-
-    /** Return a MidiDevice with a given name from a list of
-        MidiDeviceProviders.
-        @param deviceName The name of the MidiDevice to be returned.
-        @param providers The List of MidiDeviceProviders to check for
-        MidiDevices.
-        @param deviceClass The requested device type, one of Synthesizer.class,
-        Sequencer.class, Receiver.class or Transmitter.class.
-        @return A Mixer matching the requirements, or null if none is found.
+    /**
+     * Return a MidiDevice with a given name from a list of MidiDeviceProviders.
+     *
+     * @param  deviceName The name of the MidiDevice to be returned
+     * @param  providers The List of MidiDeviceProviders to check for
+     *         MidiDevices
+     * @param  deviceClass The requested device type, one of Synthesizer.class,
+     *         Sequencer.class, Receiver.class or Transmitter.class
+     * @return A Mixer matching the requirements, or null if none is found
      */
     private static MidiDevice getNamedDevice(String deviceName,
                                              List<MidiDeviceProvider> providers,
@@ -1310,14 +1225,15 @@
         return null;
     }
 
-
-    /** From a given MidiDeviceProvider, return the first appropriate device.
-        @param provider The MidiDeviceProvider to check for MidiDevices.
-        @param deviceClass The requested device type, one of Synthesizer.class,
-        Sequencer.class, Receiver.class or Transmitter.class.
-        @return A MidiDevice is considered appropriate, or null if no
-        appropriate device is found.
-    */
+    /**
+     * From a given MidiDeviceProvider, return the first appropriate device.
+     *
+     * @param  provider The MidiDeviceProvider to check for MidiDevices
+     * @param  deviceClass The requested device type, one of Synthesizer.class,
+     *         Sequencer.class, Receiver.class or Transmitter.class
+     * @return A MidiDevice is considered appropriate, or null if no appropriate
+     *         device is found
+     */
     private static MidiDevice getFirstDevice(MidiDeviceProvider provider,
                                              Class<?> deviceClass) {
         MidiDevice device;
@@ -1340,13 +1256,14 @@
         return null;
     }
 
-
-    /** From a given MidiDeviceProvider, return the first appropriate device.
-        @param provider The MidiDeviceProvider to check for MidiDevices.
-        @param deviceClass The requested device type, one of Synthesizer.class,
-        Sequencer.class, Receiver.class or Transmitter.class.
-        @return A MidiDevice is considered appropriate, or null if no
-        appropriate device is found.
+    /**
+     * From a given MidiDeviceProvider, return the first appropriate device.
+     *
+     * @param  provider The MidiDeviceProvider to check for MidiDevices
+     * @param  deviceClass The requested device type, one of Synthesizer.class,
+     *         Sequencer.class, Receiver.class or Transmitter.class
+     * @return A MidiDevice is considered appropriate, or null if no appropriate
+     *         device is found
      */
     private static MidiDevice getFirstDevice(MidiDeviceProvider provider,
                                              Class<?> deviceClass,
@@ -1363,15 +1280,16 @@
         return null;
     }
 
-
-    /** From a List of MidiDeviceProviders, return the first appropriate
-        MidiDevice.
-        @param providers The List of MidiDeviceProviders to search.
-        @param deviceClass The requested device type, one of Synthesizer.class,
-        Sequencer.class, Receiver.class or Transmitter.class.
-        @return A MidiDevice that is considered appropriate, or null
-        if none is found.
-    */
+    /**
+     * From a List of MidiDeviceProviders, return the first appropriate
+     * MidiDevice.
+     *
+     * @param  providers The List of MidiDeviceProviders to search
+     * @param  deviceClass The requested device type, one of Synthesizer.class,
+     *         Sequencer.class, Receiver.class or Transmitter.class
+     * @return A MidiDevice that is considered appropriate, or null if none is
+     *         found
+     */
     private static MidiDevice getFirstDevice(List<MidiDeviceProvider> providers,
                                              Class<?> deviceClass) {
         MidiDevice device;
@@ -1394,14 +1312,15 @@
         return null;
     }
 
-
-    /** From a List of MidiDeviceProviders, return the first appropriate
-        MidiDevice.
-        @param providers The List of MidiDeviceProviders to search.
-        @param deviceClass The requested device type, one of Synthesizer.class,
-        Sequencer.class, Receiver.class or Transmitter.class.
-        @return A MidiDevice that is considered appropriate, or null
-        if none is found.
+    /**
+     * From a List of MidiDeviceProviders, return the first appropriate
+     * MidiDevice.
+     *
+     * @param  providers The List of MidiDeviceProviders to search
+     * @param  deviceClass The requested device type, one of Synthesizer.class,
+     *         Sequencer.class, Receiver.class or Transmitter.class
+     * @return A MidiDevice that is considered appropriate, or null if none is
+     *         found
      */
     private static MidiDevice getFirstDevice(List<MidiDeviceProvider> providers,
                                              Class<?> deviceClass,
@@ -1419,28 +1338,29 @@
         return null;
     }
 
-
-    /** Checks if a MidiDevice is appropriate.
-        If deviceClass is Synthesizer or Sequencer, a device implementing
-        the respective interface is considered appropriate. If deviceClass
-        is Receiver or Transmitter, a device is considered appropriate if
-        it implements neither Synthesizer nor Transmitter, and if it can
-        provide at least one Receiver or Transmitter, respectively.
-
-        @param device the MidiDevice to test
-        @param allowSynthesizer if true, Synthesizers are considered
-        appropriate. Otherwise only pure MidiDevices are considered
-        appropriate (unless allowSequencer is true). This flag only has an
-        effect for deviceClass Receiver and Transmitter. For other device
-        classes (Sequencer and Synthesizer), this flag has no effect.
-        @param allowSequencer if true, Sequencers are considered
-        appropriate. Otherwise only pure MidiDevices are considered
-        appropriate (unless allowSynthesizer is true). This flag only has an
-        effect for deviceClass Receiver and Transmitter. For other device
-        classes (Sequencer and Synthesizer), this flag has no effect.
-        @return true if the device is considered appropriate according to the
-        rules given above, false otherwise.
-    */
+    /**
+     * Checks if a MidiDevice is appropriate. If deviceClass is Synthesizer or
+     * Sequencer, a device implementing the respective interface is considered
+     * appropriate. If deviceClass is Receiver or Transmitter, a device is
+     * considered appropriate if it implements neither Synthesizer nor
+     * Transmitter, and if it can provide at least one Receiver or Transmitter,
+     * respectively.
+     *
+     * @param  device the MidiDevice to test
+     * @param  allowSynthesizer if true, Synthesizers are considered
+     *         appropriate. Otherwise only pure MidiDevices are considered
+     *         appropriate (unless allowSequencer is true). This flag only has
+     *         an effect for deviceClass Receiver and Transmitter. For other
+     *         device classes (Sequencer and Synthesizer), this flag has no
+     *         effect.
+     * @param  allowSequencer if true, Sequencers are considered appropriate.
+     *         Otherwise only pure MidiDevices are considered appropriate
+     *         (unless allowSynthesizer is true). This flag only has an effect
+     *         for deviceClass Receiver and Transmitter. For other device
+     *         classes (Sequencer and Synthesizer), this flag has no effect.
+     * @return true if the device is considered appropriate according to the
+     *         rules given above, false otherwise
+     */
     private static boolean isAppropriateDevice(MidiDevice device,
                                                Class<?> deviceClass,
                                                boolean allowSynthesizer,
@@ -1473,12 +1393,12 @@
         return false;
     }
 
-
     /**
-     * Obtains the set of services currently installed on the system
-     * using the SPI mechanism in 1.3.
-     * @return a List of instances of providers for the requested service.
-     * If no providers are available, a List of length 0 will be returned.
+     * Obtains the set of services currently installed on the system using the
+     * SPI mechanism in 1.3.
+     *
+     * @return a List of instances of providers for the requested service. If no
+     *         providers are available, a List of length 0 will be returned.
      */
      private static List<?> getProviders(Class<?> providerClass) {
          return JDK13Services.getProviders(providerClass);
--- a/src/java.desktop/share/classes/javax/sound/midi/MidiUnavailableException.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/MidiUnavailableException.java	Thu Aug 28 14:54:07 2014 -0700
@@ -25,39 +25,37 @@
 
 package javax.sound.midi;
 
-
 /**
- * A <code>MidiUnavailableException</code> is thrown when a requested MIDI
- * component cannot be opened or created because it is unavailable.  This often
- * occurs when a device is in use by another application.  More generally, it
- * can occur when there is a finite number of a certain kind of resource that can
- * be used for some purpose, and all of them are already in use (perhaps all by
- * this application).  For an example of the latter case, see the
+ * A {@code MidiUnavailableException} is thrown when a requested MIDI component
+ * cannot be opened or created because it is unavailable. This often occurs when
+ * a device is in use by another application. More generally, it can occur when
+ * there is a finite number of a certain kind of resource that can be used for
+ * some purpose, and all of them are already in use (perhaps all by this
+ * application). For an example of the latter case, see the
  * {@link Transmitter#setReceiver(Receiver) setReceiver} method of
- * <code>Transmitter</code>.
+ * {@code Transmitter}.
  *
  * @author Kara Kytle
  */
 public class MidiUnavailableException extends Exception {
+
     private static final long serialVersionUID = 6093809578628944323L;
 
     /**
-     * Constructs a <code>MidiUnavailableException</code> that has
-     * <code>null</code> as its error detail message.
+     * Constructs a {@code MidiUnavailableException} that has {@code null} as
+     * its error detail message.
      */
     public MidiUnavailableException() {
-
         super();
     }
 
     /**
-     *  Constructs a <code>MidiUnavailableException</code> with the
-     * specified detail message.
+     * Constructs a {@code MidiUnavailableException} with the specified detail
+     * message.
      *
-     * @param message the string to display as an error detail message
+     * @param  message the string to display as an error detail message
      */
-    public MidiUnavailableException(String message) {
-
+    public MidiUnavailableException(final String message) {
         super(message);
     }
 }
--- a/src/java.desktop/share/classes/javax/sound/midi/Patch.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/Patch.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -25,88 +25,77 @@
 
 package javax.sound.midi;
 
-
 /**
- * A <code>Patch</code> object represents a location, on a MIDI
- * synthesizer, into which a single instrument is stored (loaded).
- * Every <code>Instrument</code> object has its own <code>Patch</code>
- * object that specifies the memory location
- * into which that instrument should be loaded. The
- * location is specified abstractly by a bank index and a program number (not by
- * any scheme that directly refers to a specific address or offset in RAM).
- * This is a hierarchical indexing scheme: MIDI provides for up to 16384 banks,
- * each of which contains up to 128 program locations.  For example, a
- * minimal sort of synthesizer might have only one bank of instruments, and
- * only 32 instruments (programs) in that bank.
+ * A {@code Patch} object represents a location, on a MIDI synthesizer, into
+ * which a single instrument is stored (loaded). Every {@code Instrument} object
+ * has its own {@code Patch} object that specifies the memory location into
+ * which that instrument should be loaded. The location is specified abstractly
+ * by a bank index and a program number (not by any scheme that directly refers
+ * to a specific address or offset in RAM). This is a hierarchical indexing
+ * scheme: MIDI provides for up to 16384 banks, each of which contains up to 128
+ * program locations. For example, a minimal sort of synthesizer might have only
+ * one bank of instruments, and only 32 instruments (programs) in that bank.
  * <p>
- * To select what instrument should play the notes on a particular MIDI
- * channel, two kinds of MIDI message are used that specify a patch location:
- * a bank-select command, and a program-change channel command.  The Java Sound
+ * To select what instrument should play the notes on a particular MIDI channel,
+ * two kinds of MIDI message are used that specify a patch location: a
+ * bank-select command, and a program-change channel command. The Java Sound
  * equivalent is the
- * {@link MidiChannel#programChange(int, int) programChange(int, int)}
- * method of <code>MidiChannel</code>.
+ * {@link MidiChannel#programChange(int, int) programChange(int, int)} method of
+ * {@code MidiChannel}.
  *
+ * @author Kara Kytle
  * @see Instrument
  * @see Instrument#getPatch()
  * @see MidiChannel#programChange(int, int)
  * @see Synthesizer#loadInstruments(Soundbank, Patch[])
  * @see Soundbank
  * @see Sequence#getPatchList()
- *
- * @author Kara Kytle
  */
-
 public class Patch {
 
-
     /**
-     * Bank index
+     * Bank index.
      */
     private final int bank;
 
-
     /**
-     * Program change number
+     * Program change number.
      */
     private final int program;
 
-
     /**
      * Constructs a new patch object from the specified bank and program
      * numbers.
-     * @param bank the bank index (in the range from 0 to 16383)
-     * @param program the program index (in the range from 0 to 127)
+     *
+     * @param  bank the bank index (in the range from 0 to 16383)
+     * @param  program the program index (in the range from 0 to 127)
      */
     public Patch(int bank, int program) {
-
         this.bank = bank;
         this.program = program;
     }
 
-
     /**
-     * Returns the number of the bank that contains the instrument
-     * whose location this <code>Patch</code> specifies.
+     * Returns the number of the bank that contains the instrument whose
+     * location this {@code Patch} specifies.
+     *
      * @return the bank number, whose range is from 0 to 16383
      * @see MidiChannel#programChange(int, int)
      */
     public int getBank() {
-
         return bank;
     }
 
-
     /**
-     * Returns the index, within
-     * a bank, of the instrument whose location this <code>Patch</code> specifies.
+     * Returns the index, within a bank, of the instrument whose location this
+     * {@code Patch} specifies.
+     *
      * @return the instrument's program number, whose range is from 0 to 127
-     *
      * @see MidiChannel#getProgram
      * @see MidiChannel#programChange(int)
      * @see MidiChannel#programChange(int, int)
      */
     public int getProgram() {
-
         return program;
     }
 }
--- a/src/java.desktop/share/classes/javax/sound/midi/Receiver.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/Receiver.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -25,50 +25,46 @@
 
 package javax.sound.midi;
 
-
 /**
- * A <code>Receiver</code> receives <code>{@link MidiEvent}</code> objects and
- * typically does something useful in response, such as interpreting them to
- * generate sound or raw MIDI output.  Common MIDI receivers include
- * synthesizers and MIDI Out ports.
+ * A {@code Receiver} receives {@link MidiEvent} objects and typically does
+ * something useful in response, such as interpreting them to generate sound or
+ * raw MIDI output. Common MIDI receivers include synthesizers and MIDI Out
+ * ports.
  *
+ * @author Kara Kytle
  * @see MidiDevice
  * @see Synthesizer
  * @see Transmitter
- *
- * @author Kara Kytle
  */
 public interface Receiver extends AutoCloseable {
 
+    //$$fb 2002-04-12: fix for 4662090: Contradiction in Receiver specification
 
-    //$$fb 2002-04-12: fix for 4662090: Contradiction in Receiver specification
     /**
-     * Sends a MIDI message and time-stamp to this receiver.
-     * If time-stamping is not supported by this receiver, the time-stamp
-     * value should be -1.
-     * @param message the MIDI message to send
-     * @param timeStamp the time-stamp for the message, in microseconds.
+     * Sends a MIDI message and time-stamp to this receiver. If time-stamping is
+     * not supported by this receiver, the time-stamp value should be -1.
+     *
+     * @param  message the MIDI message to send
+     * @param  timeStamp the time-stamp for the message, in microseconds
      * @throws IllegalStateException if the receiver is closed
      */
-    public void send(MidiMessage message, long timeStamp);
+    void send(MidiMessage message, long timeStamp);
 
     /**
-     * Indicates that the application has finished using the receiver, and
-     * that limited resources it requires may be released or made available.
-     *
-     * <p>If the creation of this <code>Receiver</code> resulted in
-     * implicitly opening the underlying device, the device is
-     * implicitly closed by this method. This is true unless the device is
-     * kept open by other <code>Receiver</code> or <code>Transmitter</code>
-     * instances that opened the device implicitly, and unless the device
-     * has been opened explicitly. If the device this
-     * <code>Receiver</code> is retrieved from is closed explicitly by
-     * calling {@link MidiDevice#close MidiDevice.close}, the
-     * <code>Receiver</code> is closed, too.  For a detailed
-     * description of open/close behaviour see the class description
-     * of {@link javax.sound.midi.MidiDevice MidiDevice}.
+     * Indicates that the application has finished using the receiver, and that
+     * limited resources it requires may be released or made available.
+     * <p>
+     * If the creation of this {@code Receiver} resulted in implicitly opening
+     * the underlying device, the device is implicitly closed by this method.
+     * This is true unless the device is kept open by other {@code Receiver} or
+     * {@code Transmitter} instances that opened the device implicitly, and
+     * unless the device has been opened explicitly. If the device this
+     * {@code Receiver} is retrieved from is closed explicitly by calling
+     * {@link MidiDevice#close MidiDevice.close}, the {@code Receiver} is
+     * closed, too. For a detailed description of open/close behaviour see the
+     * class description of {@link MidiDevice MidiDevice}.
      *
      * @see javax.sound.midi.MidiSystem#getReceiver
      */
-    public void close();
+    void close();
 }
--- a/src/java.desktop/share/classes/javax/sound/midi/Sequence.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/Sequence.java	Thu Aug 28 14:54:07 2014 -0700
@@ -26,72 +26,77 @@
 package javax.sound.midi;
 
 import java.util.Vector;
-import com.sun.media.sound.MidiUtils;
-
 
 /**
- * A <code>Sequence</code> is a data structure containing musical
- * information (often an entire song or composition) that can be played
- * back by a <code>{@link Sequencer}</code> object. Specifically, the
- * <code>Sequence</code> contains timing
- * information and one or more tracks.  Each <code>{@link Track track}</code> consists of a
- * series of MIDI events (such as note-ons, note-offs, program changes, and meta-events).
- * The sequence's timing information specifies the type of unit that is used
- * to time-stamp the events in the sequence.
+ * A {@code Sequence} is a data structure containing musical information (often
+ * an entire song or composition) that can be played back by a {@link Sequencer}
+ * object. Specifically, the {@code Sequence} contains timing information and
+ * one or more tracks. Each {@link Track track} consists of a series of MIDI
+ * events (such as note-ons, note-offs, program changes, and meta-events). The
+ * sequence's timing information specifies the type of unit that is used to
+ * time-stamp the events in the sequence.
  * <p>
- * A <code>Sequence</code> can be created from a MIDI file by reading the file
- * into an input stream and invoking one of the <code>getSequence</code> methods of
- * {@link MidiSystem}.  A sequence can also be built from scratch by adding new
- * <code>Tracks</code> to an empty <code>Sequence</code>, and adding
- * <code>{@link MidiEvent}</code> objects to these <code>Tracks</code>.
+ * A {@code Sequence} can be created from a MIDI file by reading the file into
+ * an input stream and invoking one of the {@code getSequence} methods of
+ * {@link MidiSystem}. A sequence can also be built from scratch by adding new
+ * {@code Tracks} to an empty {@code Sequence}, and adding {@link MidiEvent}
+ * objects to these {@code Tracks}.
  *
+ * @author Kara Kytle
  * @see Sequencer#setSequence(java.io.InputStream stream)
  * @see Sequencer#setSequence(Sequence sequence)
  * @see Track#add(MidiEvent)
  * @see MidiFileFormat
- *
- * @author Kara Kytle
  */
 public class Sequence {
 
-
     // Timing types
 
     /**
-     * The tempo-based timing type, for which the resolution is expressed in pulses (ticks) per quarter note.
+     * The tempo-based timing type, for which the resolution is expressed in
+     * pulses (ticks) per quarter note.
+     *
      * @see #Sequence(float, int)
      */
     public static final float PPQ                                                       = 0.0f;
 
     /**
-     * The SMPTE-based timing type with 24 frames per second (resolution is expressed in ticks per frame).
+     * The SMPTE-based timing type with 24 frames per second (resolution is
+     * expressed in ticks per frame).
+     *
      * @see #Sequence(float, int)
      */
     public static final float SMPTE_24                                          = 24.0f;
 
     /**
-     * The SMPTE-based timing type with 25 frames per second (resolution is expressed in ticks per frame).
+     * The SMPTE-based timing type with 25 frames per second (resolution is
+     * expressed in ticks per frame).
+     *
      * @see #Sequence(float, int)
      */
     public static final float SMPTE_25                                          = 25.0f;
 
     /**
-     * The SMPTE-based timing type with 29.97 frames per second (resolution is expressed in ticks per frame).
+     * The SMPTE-based timing type with 29.97 frames per second (resolution is
+     * expressed in ticks per frame).
+     *
      * @see #Sequence(float, int)
      */
     public static final float SMPTE_30DROP                                      = 29.97f;
 
     /**
-     * The SMPTE-based timing type with 30 frames per second (resolution is expressed in ticks per frame).
+     * The SMPTE-based timing type with 30 frames per second (resolution is
+     * expressed in ticks per frame).
+     *
      * @see #Sequence(float, int)
      */
     public static final float SMPTE_30                                          = 30.0f;
 
-
     // Variables
 
     /**
      * The timing division type of the sequence.
+     *
      * @see #PPQ
      * @see #SMPTE_24
      * @see #SMPTE_25
@@ -103,33 +108,33 @@
 
     /**
      * The timing resolution of the sequence.
+     *
      * @see #getResolution
      */
     protected int resolution;
 
     /**
      * The MIDI tracks in this sequence.
+     *
      * @see #getTracks
      */
     protected Vector<Track> tracks = new Vector<Track>();
 
-
     /**
-     * Constructs a new MIDI sequence with the specified timing division
-     * type and timing resolution.  The division type must be one of the
-     * recognized MIDI timing types.  For tempo-based timing,
-     * <code>divisionType</code> is PPQ (pulses per quarter note) and
-     * the resolution is specified in ticks per beat.  For SMTPE timing,
-     * <code>divisionType</code> specifies the number of frames per
-     * second and the resolution is specified in ticks per frame.
-     * The sequence will contain no initial tracks.  Tracks may be
-     * added to or removed from the sequence using <code>{@link #createTrack}</code>
-     * and <code>{@link #deleteTrack}</code>.
+     * Constructs a new MIDI sequence with the specified timing division type
+     * and timing resolution. The division type must be one of the recognized
+     * MIDI timing types. For tempo-based timing, {@code divisionType} is PPQ
+     * (pulses per quarter note) and the resolution is specified in ticks per
+     * beat. For SMTPE timing, {@code divisionType} specifies the number of
+     * frames per second and the resolution is specified in ticks per frame. The
+     * sequence will contain no initial tracks. Tracks may be added to or
+     * removed from the sequence using {@link #createTrack} and
+     * {@link #deleteTrack}.
      *
-     * @param divisionType the timing division type (PPQ or one of the SMPTE types)
-     * @param resolution the timing resolution
-     * @throws InvalidMidiDataException if <code>divisionType</code> is not valid
-     *
+     * @param  divisionType the timing division type (PPQ or one of the SMPTE
+     *         types)
+     * @param  resolution the timing resolution
+     * @throws InvalidMidiDataException if {@code divisionType} is not valid
      * @see #PPQ
      * @see #SMPTE_24
      * @see #SMPTE_25
@@ -156,27 +161,25 @@
         this.resolution = resolution;
     }
 
-
     /**
-     * Constructs a new MIDI sequence with the specified timing division
-     * type, timing resolution, and number of tracks.  The division type must be one of the
-     * recognized MIDI timing types.  For tempo-based timing,
-     * <code>divisionType</code> is PPQ (pulses per quarter note) and
-     * the resolution is specified in ticks per beat.  For SMTPE timing,
-     * <code>divisionType</code> specifies the number of frames per
-     * second and the resolution is specified in ticks per frame.
-     * The sequence will be initialized with the number of tracks specified by
-     * <code>numTracks</code>. These tracks are initially empty (i.e.
-     * they contain only the meta-event End of Track).
-     * The tracks may be retrieved for editing using the <code>{@link #getTracks}</code>
-     * method.  Additional tracks may be added, or existing tracks removed,
-     * using <code>{@link #createTrack}</code> and <code>{@link #deleteTrack}</code>.
+     * Constructs a new MIDI sequence with the specified timing division type,
+     * timing resolution, and number of tracks. The division type must be one of
+     * the recognized MIDI timing types. For tempo-based timing,
+     * {@code divisionType} is PPQ (pulses per quarter note) and the resolution
+     * is specified in ticks per beat. For SMTPE timing, {@code divisionType}
+     * specifies the number of frames per second and the resolution is specified
+     * in ticks per frame. The sequence will be initialized with the number of
+     * tracks specified by {@code numTracks}. These tracks are initially empty
+     * (i.e. they contain only the meta-event End of Track). The tracks may be
+     * retrieved for editing using the {@link #getTracks} method. Additional
+     * tracks may be added, or existing tracks removed, using
+     * {@link #createTrack} and {@link #deleteTrack}.
      *
-     * @param divisionType the timing division type (PPQ or one of the SMPTE types)
-     * @param resolution the timing resolution
-     * @param numTracks the initial number of tracks in the sequence.
-     * @throws InvalidMidiDataException if <code>divisionType</code> is not valid
-     *
+     * @param  divisionType the timing division type (PPQ or one of the SMPTE
+     *         types)
+     * @param  resolution the timing resolution
+     * @param  numTracks the initial number of tracks in the sequence
+     * @throws InvalidMidiDataException if {@code divisionType} is not valid
      * @see #PPQ
      * @see #SMPTE_24
      * @see #SMPTE_25
@@ -206,11 +209,10 @@
         }
     }
 
-
     /**
      * Obtains the timing division type for this sequence.
+     *
      * @return the division type (PPQ or one of the SMPTE types)
-     *
      * @see #PPQ
      * @see #SMPTE_24
      * @see #SMPTE_25
@@ -223,11 +225,10 @@
         return divisionType;
     }
 
-
     /**
-     * Obtains the timing resolution for this sequence.
-     * If the sequence's division type is PPQ, the resolution is specified in ticks per beat.
-     * For SMTPE timing, the resolution is specified in ticks per frame.
+     * Obtains the timing resolution for this sequence. If the sequence's
+     * division type is PPQ, the resolution is specified in ticks per beat. For
+     * SMTPE timing, the resolution is specified in ticks per frame.
      *
      * @return the number of ticks per beat (PPQ) or per frame (SMPTE)
      * @see #getDivisionType
@@ -238,13 +239,13 @@
         return resolution;
     }
 
-
     /**
-     * Creates a new, initially empty track as part of this sequence.
-     * The track initially contains the meta-event End of Track.
-     * The newly created track is returned.  All tracks in the sequence
-     * may be retrieved using <code>{@link #getTracks}</code>.  Tracks may be
-     * removed from the sequence using <code>{@link #deleteTrack}</code>.
+     * Creates a new, initially empty track as part of this sequence. The track
+     * initially contains the meta-event End of Track. The newly created track
+     * is returned. All tracks in the sequence may be retrieved using
+     * {@link #getTracks}. Tracks may be removed from the sequence using
+     * {@link #deleteTrack}.
+     *
      * @return the newly created track
      */
     public Track createTrack() {
@@ -255,13 +256,12 @@
         return track;
     }
 
-
     /**
      * Removes the specified track from the sequence.
-     * @param track the track to remove
-     * @return <code>true</code> if the track existed in the track and was removed,
-     * otherwise <code>false</code>.
      *
+     * @param  track the track to remove
+     * @return {@code true} if the track existed in the track and was removed,
+     *         otherwise {@code false}
      * @see #createTrack
      * @see #getTracks
      */
@@ -273,12 +273,11 @@
         }
     }
 
-
     /**
-     * Obtains an array containing all the tracks in this sequence.
-     * If the sequence contains no tracks, an array of length 0 is returned.
+     * Obtains an array containing all the tracks in this sequence. If the
+     * sequence contains no tracks, an array of length 0 is returned.
+     *
      * @return the array of tracks
-     *
      * @see #createTrack
      * @see #deleteTrack
      */
@@ -287,22 +286,20 @@
         return tracks.toArray(new Track[tracks.size()]);
     }
 
-
     /**
      * Obtains the duration of this sequence, expressed in microseconds.
-     * @return this sequence's duration in microseconds.
+     *
+     * @return this sequence's duration in microseconds
      */
     public long getMicrosecondLength() {
 
         return com.sun.media.sound.MidiUtils.tick2microsecond(this, getTickLength(), null);
     }
 
-
     /**
      * Obtains the duration of this sequence, expressed in MIDI ticks.
      *
      * @return this sequence's length in ticks
-     *
      * @see #getMicrosecondLength
      */
     public long getTickLength() {
@@ -321,15 +318,12 @@
         }
     }
 
-
     /**
-     * Obtains a list of patches referenced in this sequence.
-     * This patch list may be used to load the required
-     * <code>{@link Instrument}</code> objects
-     * into a <code>{@link Synthesizer}</code>.
+     * Obtains a list of patches referenced in this sequence. This patch list
+     * may be used to load the required {@link Instrument} objects into a
+     * {@link Synthesizer}.
      *
-     * @return an array of <code>{@link Patch}</code> objects used in this sequence
-     *
+     * @return an array of {@link Patch} objects used in this sequence
      * @see Synthesizer#loadInstruments(Soundbank, Patch[])
      */
     public Patch[] getPatchList() {
--- a/src/java.desktop/share/classes/javax/sound/midi/Sequencer.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/Sequencer.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -25,19 +25,18 @@
 
 package javax.sound.midi;
 
+import java.io.IOException;
 import java.io.InputStream;
-import java.io.IOException;
-
 
 /**
  * A hardware or software device that plays back a MIDI
- * <code>{@link Sequence sequence}</code> is known as a <em>sequencer</em>.
- * A MIDI sequence contains lists of time-stamped MIDI data, such as
- * might be read from a standard MIDI file.  Most
- * sequencers also provide functions for creating and editing sequences.
+ * {@link Sequence sequence} is known as a <em>sequencer</em>. A MIDI sequence
+ * contains lists of time-stamped MIDI data, such as might be read from a
+ * standard MIDI file. Most sequencers also provide functions for creating and
+ * editing sequences.
  * <p>
- * The <code>Sequencer</code> interface includes methods for the following
- * basic MIDI sequencer operations:
+ * The {@code Sequencer} interface includes methods for the following basic MIDI
+ * sequencer operations:
  * <ul>
  * <li>obtaining a sequence from MIDI file data</li>
  * <li>starting and stopping playback</li>
@@ -48,729 +47,635 @@
  * <li>controlling the timing of another device</li>
  * </ul>
  * In addition, the following operations are supported, either directly, or
- * indirectly through objects that the <code>Sequencer</code> has access to:
+ * indirectly through objects that the {@code Sequencer} has access to:
  * <ul>
  * <li>editing the data by adding or deleting individual MIDI events or entire
  * tracks</li>
  * <li>muting or soloing individual tracks in the sequence</li>
- * <li>notifying listener objects about any meta-events or
- * control-change events encountered while playing back the sequence.</li>
+ * <li>notifying listener objects about any meta-events or control-change events
+ * encountered while playing back the sequence.</li>
  * </ul>
  *
- * @see Sequencer.SyncMode
+ * @author Kara Kytle
+ * @author Florian Bomers
+ * @see SyncMode
  * @see #addMetaEventListener
  * @see ControllerEventListener
  * @see Receiver
  * @see Transmitter
  * @see MidiDevice
- *
- * @author Kara Kytle
- * @author Florian Bomers
  */
 public interface Sequencer extends MidiDevice {
 
-
     /**
-     * A value indicating that looping should continue
-     * indefinitely rather than complete after a specific
-     * number of loops.
+     * A value indicating that looping should continue indefinitely rather than
+     * complete after a specific number of loops.
      *
      * @see #setLoopCount
      * @since 1.5
      */
-    public static final int LOOP_CONTINUOUSLY = -1;
-
-
-
-    /**
-     * Sets the current sequence on which the sequencer operates.
-     *
-     * <p>This method can be called even if the
-     * <code>Sequencer</code> is closed.
-     *
-     * @param sequence the sequence to be loaded.
-     * @throws InvalidMidiDataException if the sequence contains invalid
-     * MIDI data, or is not supported.
-     */
-    public void setSequence(Sequence sequence) throws InvalidMidiDataException;
-
+    int LOOP_CONTINUOUSLY = -1;
 
     /**
      * Sets the current sequence on which the sequencer operates.
-     * The stream must point to MIDI file data.
-     *
-     * <p>This method can be called even if the
-     * <code>Sequencer</code> is closed.
+     * <p>
+     * This method can be called even if the {@code Sequencer} is closed.
      *
-     * @param stream stream containing MIDI file data.
-     * @throws IOException if an I/O exception occurs during reading of the stream.
-     * @throws InvalidMidiDataException if invalid data is encountered
-     * in the stream, or the stream is not supported.
+     * @param  sequence the sequence to be loaded
+     * @throws InvalidMidiDataException if the sequence contains invalid MIDI
+     *         data, or is not supported
      */
-    public void setSequence(InputStream stream) throws IOException, InvalidMidiDataException;
+    void setSequence(Sequence sequence) throws InvalidMidiDataException;
 
+    /**
+     * Sets the current sequence on which the sequencer operates. The stream
+     * must point to MIDI file data.
+     * <p>
+     * This method can be called even if the {@code Sequencer} is closed.
+     *
+     * @param  stream stream containing MIDI file data
+     * @throws IOException if an I/O exception occurs during reading of the
+     *         stream
+     * @throws InvalidMidiDataException if invalid data is encountered in the
+     *         stream, or the stream is not supported
+     */
+    void setSequence(InputStream stream)
+            throws IOException, InvalidMidiDataException;
 
     /**
      * Obtains the sequence on which the Sequencer is currently operating.
-     *
-     * <p>This method can be called even if the
-     * <code>Sequencer</code> is closed.
+     * <p>
+     * This method can be called even if the {@code Sequencer} is closed.
      *
-     * @return the current sequence, or <code>null</code> if no sequence is currently set.
+     * @return the current sequence, or {@code null} if no sequence is currently
+     *         set
      */
-    public Sequence getSequence();
-
+    Sequence getSequence();
 
     /**
-     * Starts playback of the MIDI data in the currently
-     * loaded sequence.
-     * Playback will begin from the current position.
-     * If the playback position reaches the loop end point,
-     * and the loop count is greater than 0, playback will
-     * resume at the loop start point for the number of
-     * repetitions set with <code>setLoopCount</code>.
-     * After that, or if the loop count is 0, playback will
-     * continue to play to the end of the sequence.
+     * Starts playback of the MIDI data in the currently loaded sequence.
+     * Playback will begin from the current position. If the playback position
+     * reaches the loop end point, and the loop count is greater than 0,
+     * playback will resume at the loop start point for the number of
+     * repetitions set with {@code setLoopCount}. After that, or if the loop
+     * count is 0, playback will continue to play to the end of the sequence.
+     * <p>
+     * The implementation ensures that the synthesizer is brought to a
+     * consistent state when jumping to the loop start point by sending
+     * appropriate controllers, pitch bend, and program change events.
      *
-     * <p>The implementation ensures that the synthesizer
-     * is brought to a consistent state when jumping
-     * to the loop start point by sending appropriate
-     * controllers, pitch bend, and program change events.
-     *
-     * @throws IllegalStateException if the <code>Sequencer</code> is
-     * closed.
-     *
+     * @throws IllegalStateException if the {@code Sequencer} is closed
      * @see #setLoopStartPoint
      * @see #setLoopEndPoint
      * @see #setLoopCount
      * @see #stop
      */
-    public void start();
-
+    void start();
 
     /**
-     * Stops recording, if active, and playback of the currently loaded sequence,
-     * if any.
+     * Stops recording, if active, and playback of the currently loaded
+     * sequence, if any.
      *
-     * @throws IllegalStateException if the <code>Sequencer</code> is
-     * closed.
-     *
+     * @throws IllegalStateException if the {@code Sequencer} is closed
      * @see #start
      * @see #isRunning
      */
-    public void stop();
-
-
-    /**
-     * Indicates whether the Sequencer is currently running.  The default is <code>false</code>.
-     * The Sequencer starts running when either <code>{@link #start}</code> or <code>{@link #startRecording}</code>
-     * is called.  <code>isRunning</code> then returns <code>true</code> until playback of the
-     * sequence completes or <code>{@link #stop}</code> is called.
-     * @return <code>true</code> if the Sequencer is running, otherwise <code>false</code>
-     */
-    public boolean isRunning();
-
+    void stop();
 
     /**
-     * Starts recording and playback of MIDI data.  Data is recorded to all enabled tracks,
-     * on the channel(s) for which they were enabled.  Recording begins at the current position
-     * of the sequencer.   Any events already in the track are overwritten for the duration
-     * of the recording session.  Events from the currently loaded sequence,
-     * if any, are delivered to the sequencer's transmitter(s) along with messages
-     * received during recording.
+     * Indicates whether the Sequencer is currently running. The default is
+     * {@code false}. The Sequencer starts running when either{@link #start} or
+     * {@link #startRecording} is called. {@code isRunning} then returns
+     * {@code true} until playback of the sequence completes or {@link #stop} is
+     * called.
+     *
+     * @return {@code true} if the Sequencer is running, otherwise {@code false}
+     */
+    boolean isRunning();
+
+    /**
+     * Starts recording and playback of MIDI data. Data is recorded to all
+     * enabled tracks, on the channel(s) for which they were enabled. Recording
+     * begins at the current position of the sequencer. Any events already in
+     * the track are overwritten for the duration of the recording session.
+     * Events from the currently loaded sequence, if any, are delivered to the
+     * sequencer's transmitter(s) along with messages received during recording.
      * <p>
-     * Note that tracks are not by default enabled for recording.  In order to record MIDI data,
-     * at least one track must be specifically enabled for recording.
+     * Note that tracks are not by default enabled for recording. In order to
+     * record MIDI data, at least one track must be specifically enabled for
+     * recording.
      *
-     * @throws IllegalStateException if the <code>Sequencer</code> is
-     * closed.
-     *
-     * @see #startRecording
+     * @throws IllegalStateException if the {@code Sequencer} is closed
      * @see #recordEnable
      * @see #recordDisable
      */
-    public void startRecording();
-
+    void startRecording();
 
     /**
-     * Stops recording, if active.  Playback of the current sequence continues.
+     * Stops recording, if active. Playback of the current sequence continues.
      *
-     * @throws IllegalStateException if the <code>Sequencer</code> is
-     * closed.
-     *
+     * @throws IllegalStateException if the {@code Sequencer} is closed
      * @see #startRecording
      * @see #isRecording
      */
-    public void stopRecording();
-
+    void stopRecording();
 
     /**
-     * Indicates whether the Sequencer is currently recording.  The default is <code>false</code>.
-     * The Sequencer begins recording when <code>{@link #startRecording}</code> is called,
-     * and then returns <code>true</code> until <code>{@link #stop}</code> or <code>{@link #stopRecording}</code>
-     * is called.
-     * @return <code>true</code> if the Sequencer is recording, otherwise <code>false</code>
+     * Indicates whether the Sequencer is currently recording. The default is
+     * {@code false}. The Sequencer begins recording when
+     * {@link #startRecording} is called, and then returns {@code true} until
+     * {@link #stop} or {@link #stopRecording} is called.
+     *
+     * @return {@code true} if the Sequencer is recording, otherwise
+     *         {@code false}
      */
-    public boolean isRecording();
-
+    boolean isRecording();
 
     /**
-     * Prepares the specified track for recording events received on a particular channel.
-     * Once enabled, a track will receive events when recording is active.
-     * @param track the track to which events will be recorded
-     * @param channel the channel on which events will be received.  If -1 is specified
-     * for the channel value, the track will receive data from all channels.
-     * @throws IllegalArgumentException thrown if the track is not part of the current
-     * sequence.
+     * Prepares the specified track for recording events received on a
+     * particular channel. Once enabled, a track will receive events when
+     * recording is active.
+     *
+     * @param  track the track to which events will be recorded
+     * @param  channel the channel on which events will be received. If -1 is
+     *         specified for the channel value, the track will receive data from
+     *         all channels.
+     * @throws IllegalArgumentException thrown if the track is not part of the
+     *         current sequence
      */
-    public void recordEnable(Track track, int channel);
-
+    void recordEnable(Track track, int channel);
 
     /**
-     * Disables recording to the specified track.  Events will no longer be recorded
-     * into this track.
-     * @param track the track to disable for recording, or <code>null</code> to disable
-     * recording for all tracks.
+     * Disables recording to the specified track. Events will no longer be
+     * recorded into this track.
+     *
+     * @param  track the track to disable for recording, or {@code null} to
+     *         disable recording for all tracks
      */
-    public void recordDisable(Track track);
-
+    void recordDisable(Track track);
 
     /**
-     * Obtains the current tempo, expressed in beats per minute.  The
-     * actual tempo of playback is the product of the returned value
-     * and the tempo factor.
+     * Obtains the current tempo, expressed in beats per minute. The actual
+     * tempo of playback is the product of the returned value and the tempo
+     * factor.
      *
      * @return the current tempo in beats per minute
-     *
      * @see #getTempoFactor
      * @see #setTempoInBPM(float)
      * @see #getTempoInMPQ
      */
-    public float getTempoInBPM();
-
+    float getTempoInBPM();
 
     /**
-     * Sets the tempo in beats per minute.   The actual tempo of playback
-     * is the product of the specified value and the tempo factor.
+     * Sets the tempo in beats per minute. The actual tempo of playback is the
+     * product of the specified value and the tempo factor.
      *
-     * @param bpm desired new tempo in beats per minute
+     * @param  bpm desired new tempo in beats per minute
      * @see #getTempoFactor
      * @see #setTempoInMPQ(float)
      * @see #getTempoInBPM
      */
-    public void setTempoInBPM(float bpm);
-
+    void setTempoInBPM(float bpm);
 
     /**
-     * Obtains the current tempo, expressed in microseconds per quarter
-     * note.  The actual tempo of playback is the product of the returned
-     * value and the tempo factor.
+     * Obtains the current tempo, expressed in microseconds per quarter note.
+     * The actual tempo of playback is the product of the returned value and the
+     * tempo factor.
      *
      * @return the current tempo in microseconds per quarter note
      * @see #getTempoFactor
      * @see #setTempoInMPQ(float)
      * @see #getTempoInBPM
      */
-    public float getTempoInMPQ();
-
+    float getTempoInMPQ();
 
     /**
-     * Sets the tempo in microseconds per quarter note.  The actual tempo
-     * of playback is the product of the specified value and the tempo
-     * factor.
+     * Sets the tempo in microseconds per quarter note. The actual tempo of
+     * playback is the product of the specified value and the tempo factor.
      *
-     * @param mpq desired new tempo in microseconds per quarter note.
+     * @param  mpq desired new tempo in microseconds per quarter note
      * @see #getTempoFactor
      * @see #setTempoInBPM(float)
      * @see #getTempoInMPQ
      */
-    public void setTempoInMPQ(float mpq);
-
+    void setTempoInMPQ(float mpq);
 
     /**
-     * Scales the sequencer's actual playback tempo by the factor provided.
-     * The default is 1.0.  A value of 1.0 represents the natural rate (the
-     * tempo specified in the sequence), 2.0 means twice as fast, etc.
-     * The tempo factor does not affect the values returned by
-     * <code>{@link #getTempoInMPQ}</code> and <code>{@link #getTempoInBPM}</code>.
-     * Those values indicate the tempo prior to scaling.
+     * Scales the sequencer's actual playback tempo by the factor provided. The
+     * default is 1.0. A value of 1.0 represents the natural rate (the tempo
+     * specified in the sequence), 2.0 means twice as fast, etc. The tempo
+     * factor does not affect the values returned by {@link #getTempoInMPQ} and
+     * {@link #getTempoInBPM}. Those values indicate the tempo prior to scaling.
      * <p>
      * Note that the tempo factor cannot be adjusted when external
-     * synchronization is used.  In that situation,
-     * <code>setTempoFactor</code> always sets the tempo factor to 1.0.
+     * synchronization is used. In that situation, {@code setTempoFactor} always
+     * sets the tempo factor to 1.0.
      *
-     * @param factor the requested tempo scalar
+     * @param  factor the requested tempo scalar
      * @see #getTempoFactor
      */
-    public void setTempoFactor(float factor);
-
+    void setTempoFactor(float factor);
 
     /**
-     * Returns the current tempo factor for the sequencer.  The default is
-     * 1.0.
+     * Returns the current tempo factor for the sequencer. The default is 1.0.
      *
-     * @return tempo factor.
+     * @return tempo factor
      * @see #setTempoFactor(float)
      */
-    public float getTempoFactor();
-
+    float getTempoFactor();
 
     /**
-     * Obtains the length of the current sequence, expressed in MIDI ticks,
-     * or 0 if no sequence is set.
+     * Obtains the length of the current sequence, expressed in MIDI ticks, or 0
+     * if no sequence is set.
+     *
      * @return length of the sequence in ticks
      */
-    public long getTickLength();
-
+    long getTickLength();
 
     /**
-     * Obtains the current position in the sequence, expressed in MIDI
-     * ticks.  (The duration of a tick in seconds is determined both by
-     * the tempo and by the timing resolution stored in the
-     * <code>{@link Sequence}</code>.)
+     * Obtains the current position in the sequence, expressed in MIDI ticks.
+     * (The duration of a tick in seconds is determined both by the tempo and by
+     * the timing resolution stored in the {@link Sequence}.)
      *
      * @return current tick
      * @see #setTickPosition
      */
-    public long getTickPosition();
-
+    long getTickPosition();
 
     /**
-     * Sets the current sequencer position in MIDI ticks
-     * @param tick the desired tick position
+     * Sets the current sequencer position in MIDI ticks.
+     *
+     * @param  tick the desired tick position
      * @see #getTickPosition
      */
-    public void setTickPosition(long tick);
-
+    void setTickPosition(long tick);
 
     /**
-     * Obtains the length of the current sequence, expressed in microseconds,
-     * or 0 if no sequence is set.
-     * @return length of the sequence in microseconds.
+     * Obtains the length of the current sequence, expressed in microseconds, or
+     * 0 if no sequence is set.
+     *
+     * @return length of the sequence in microseconds
      */
-    public long getMicrosecondLength();
-
+    long getMicrosecondLength();
 
     /**
-     * Obtains the current position in the sequence, expressed in
-     * microseconds.
+     * Obtains the current position in the sequence, expressed in microseconds.
+     *
      * @return the current position in microseconds
      * @see #setMicrosecondPosition
      */
-    public long getMicrosecondPosition();
-
+    long getMicrosecondPosition();
 
     /**
-     * Sets the current position in the sequence, expressed in microseconds
-     * @param microseconds desired position in microseconds
+     * Sets the current position in the sequence, expressed in microseconds.
+     *
+     * @param  microseconds desired position in microseconds
      * @see #getMicrosecondPosition
      */
-    public void setMicrosecondPosition(long microseconds);
-
+    void setMicrosecondPosition(long microseconds);
 
     /**
-     * Sets the source of timing information used by this sequencer.
-     * The sequencer synchronizes to the master, which is the internal clock,
-     * MIDI clock, or MIDI time code, depending on the value of
-     * <code>sync</code>.  The <code>sync</code> argument must be one
-     * of the supported modes, as returned by
-     * <code>{@link #getMasterSyncModes}</code>.
+     * Sets the source of timing information used by this sequencer. The
+     * sequencer synchronizes to the master, which is the internal clock, MIDI
+     * clock, or MIDI time code, depending on the value of {@code sync}. The
+     * {@code sync} argument must be one of the supported modes, as returned by
+     * {@link #getMasterSyncModes}.
      *
-     * @param sync the desired master synchronization mode
-     *
+     * @param  sync the desired master synchronization mode
      * @see SyncMode#INTERNAL_CLOCK
      * @see SyncMode#MIDI_SYNC
      * @see SyncMode#MIDI_TIME_CODE
      * @see #getMasterSyncMode
      */
-    public void setMasterSyncMode(SyncMode sync);
-
+    void setMasterSyncMode(SyncMode sync);
 
     /**
      * Obtains the current master synchronization mode for this sequencer.
      *
      * @return the current master synchronization mode
-     *
-     * @see #setMasterSyncMode(Sequencer.SyncMode)
+     * @see #setMasterSyncMode(SyncMode)
      * @see #getMasterSyncModes
      */
-    public SyncMode getMasterSyncMode();
-
+    SyncMode getMasterSyncMode();
 
     /**
      * Obtains the set of master synchronization modes supported by this
      * sequencer.
      *
      * @return the available master synchronization modes
-     *
      * @see SyncMode#INTERNAL_CLOCK
      * @see SyncMode#MIDI_SYNC
      * @see SyncMode#MIDI_TIME_CODE
      * @see #getMasterSyncMode
-     * @see #setMasterSyncMode(Sequencer.SyncMode)
+     * @see #setMasterSyncMode(SyncMode)
      */
-    public SyncMode[] getMasterSyncModes();
-
+    SyncMode[] getMasterSyncModes();
 
     /**
-     * Sets the slave synchronization mode for the sequencer.
-     * This indicates the type of timing information sent by the sequencer
-     * to its receiver.  The <code>sync</code> argument must be one
-     * of the supported modes, as returned by
-     * <code>{@link #getSlaveSyncModes}</code>.
+     * Sets the slave synchronization mode for the sequencer. This indicates the
+     * type of timing information sent by the sequencer to its receiver. The
+     * {@code sync} argument must be one of the supported modes, as returned by
+     * {@link #getSlaveSyncModes}.
      *
-     * @param sync the desired slave synchronization mode
-     *
+     * @param  sync the desired slave synchronization mode
      * @see SyncMode#MIDI_SYNC
      * @see SyncMode#MIDI_TIME_CODE
      * @see SyncMode#NO_SYNC
      * @see #getSlaveSyncModes
      */
-    public void setSlaveSyncMode(SyncMode sync);
-
+    void setSlaveSyncMode(SyncMode sync);
 
     /**
      * Obtains the current slave synchronization mode for this sequencer.
      *
      * @return the current slave synchronization mode
-     *
-     * @see #setSlaveSyncMode(Sequencer.SyncMode)
+     * @see #setSlaveSyncMode(SyncMode)
      * @see #getSlaveSyncModes
      */
-    public SyncMode getSlaveSyncMode();
-
+    SyncMode getSlaveSyncMode();
 
     /**
-     * Obtains the set of slave synchronization modes supported by the sequencer.
+     * Obtains the set of slave synchronization modes supported by the
+     * sequencer.
      *
      * @return the available slave synchronization modes
-     *
      * @see SyncMode#MIDI_SYNC
      * @see SyncMode#MIDI_TIME_CODE
      * @see SyncMode#NO_SYNC
      */
-    public SyncMode[] getSlaveSyncModes();
-
+    SyncMode[] getSlaveSyncModes();
 
     /**
-     * Sets the mute state for a track.  This method may fail for a number
-     * of reasons.  For example, the track number specified may not be valid
-     * for the current sequence, or the sequencer may not support this functionality.
-     * An application which needs to verify whether this operation succeeded should
-     * follow this call with a call to <code>{@link #getTrackMute}</code>.
+     * Sets the mute state for a track. This method may fail for a number of
+     * reasons. For example, the track number specified may not be valid for the
+     * current sequence, or the sequencer may not support this functionality. An
+     * application which needs to verify whether this operation succeeded should
+     * follow this call with a call to {@link #getTrackMute}.
      *
-     * @param track the track number.  Tracks in the current sequence are numbered
-     * from 0 to the number of tracks in the sequence minus 1.
-     * @param mute the new mute state for the track.  <code>true</code> implies the
-     * track should be muted, <code>false</code> implies the track should be unmuted.
+     * @param  track the track number. Tracks in the current sequence are
+     *         numbered from 0 to the number of tracks in the sequence minus 1.
+     * @param  mute the new mute state for the track. {@code true} implies the
+     *         track should be muted, {@code false} implies the track should be
+     *         unmuted.
      * @see #getSequence
      */
-    public void setTrackMute(int track, boolean mute);
-
+    void setTrackMute(int track, boolean mute);
 
     /**
-     * Obtains the current mute state for a track.  The default mute
-     * state for all tracks which have not been muted is false.  In any
-     * case where the specified track has not been muted, this method should
-     * return false.  This applies if the sequencer does not support muting
-     * of tracks, and if the specified track index is not valid.
+     * Obtains the current mute state for a track. The default mute state for
+     * all tracks which have not been muted is false. In any case where the
+     * specified track has not been muted, this method should return false. This
+     * applies if the sequencer does not support muting of tracks, and if the
+     * specified track index is not valid.
      *
-     * @param track the track number.  Tracks in the current sequence are numbered
-     * from 0 to the number of tracks in the sequence minus 1.
-     * @return <code>true</code> if muted, <code>false</code> if not.
+     * @param  track the track number. Tracks in the current sequence are
+     *         numbered from 0 to the number of tracks in the sequence minus 1.
+     * @return {@code true} if muted, {@code false} if not
      */
-    public boolean getTrackMute(int track);
+    boolean getTrackMute(int track);
 
     /**
-     * Sets the solo state for a track.  If <code>solo</code> is <code>true</code>
-     * only this track and other solo'd tracks will sound. If <code>solo</code>
-     * is <code>false</code> then only other solo'd tracks will sound, unless no
-     * tracks are solo'd in which case all un-muted tracks will sound.
+     * Sets the solo state for a track. If {@code solo} is {@code true} only
+     * this track and other solo'd tracks will sound. If {@code solo} is
+     * {@code false} then only other solo'd tracks will sound, unless no tracks
+     * are solo'd in which case all un-muted tracks will sound.
      * <p>
-     * This method may fail for a number
-     * of reasons.  For example, the track number specified may not be valid
-     * for the current sequence, or the sequencer may not support this functionality.
-     * An application which needs to verify whether this operation succeeded should
-     * follow this call with a call to <code>{@link #getTrackSolo}</code>.
+     * This method may fail for a number of reasons. For example, the track
+     * number specified may not be valid for the current sequence, or the
+     * sequencer may not support this functionality. An application which needs
+     * to verify whether this operation succeeded should follow this call with a
+     * call to {@link #getTrackSolo}.
      *
-     * @param track the track number.  Tracks in the current sequence are numbered
-     * from 0 to the number of tracks in the sequence minus 1.
-     * @param solo the new solo state for the track.  <code>true</code> implies the
-     * track should be solo'd, <code>false</code> implies the track should not be solo'd.
+     * @param  track the track number. Tracks in the current sequence are
+     *         numbered from 0 to the number of tracks in the sequence minus 1.
+     * @param  solo the new solo state for the track. {@code true} implies the
+     *         track should be solo'd, {@code false} implies the track should
+     *         not be solo'd.
      * @see #getSequence
      */
-    public void setTrackSolo(int track, boolean solo);
-
+    void setTrackSolo(int track, boolean solo);
 
     /**
-     * Obtains the current solo state for a track.  The default mute
-     * state for all tracks which have not been solo'd is false.  In any
-     * case where the specified track has not been solo'd, this method should
-     * return false.  This applies if the sequencer does not support soloing
-     * of tracks, and if the specified track index is not valid.
+     * Obtains the current solo state for a track. The default mute state for
+     * all tracks which have not been solo'd is false. In any case where the
+     * specified track has not been solo'd, this method should return false.
+     * This applies if the sequencer does not support soloing of tracks, and if
+     * the specified track index is not valid.
      *
-     * @param track the track number.  Tracks in the current sequence are numbered
-     * from 0 to the number of tracks in the sequence minus 1.
-     * @return <code>true</code> if solo'd, <code>false</code> if not.
+     * @param  track the track number. Tracks in the current sequence are
+     *         numbered from 0 to the number of tracks in the sequence minus 1.
+     * @return {@code true} if solo'd, {@code false} if not
      */
-    public boolean getTrackSolo(int track);
-
+    boolean getTrackSolo(int track);
 
     /**
-     * Registers a meta-event listener to receive
-     * notification whenever a meta-event is encountered in the sequence
-     * and processed by the sequencer. This method can fail if, for
-     * instance,this class of sequencer does not support meta-event
-     * notification.
+     * Registers a meta-event listener to receive notification whenever a
+     * meta-event is encountered in the sequence and processed by the sequencer.
+     * This method can fail if, for instance,this class of sequencer does not
+     * support meta-event notification.
      *
-     * @param listener listener to add
-     * @return <code>true</code> if the listener was successfully added,
-     * otherwise <code>false</code>
-     *
+     * @param  listener listener to add
+     * @return {@code true} if the listener was successfully added, otherwise
+     *         {@code false}
      * @see #removeMetaEventListener
      * @see MetaEventListener
      * @see MetaMessage
      */
-    public boolean addMetaEventListener(MetaEventListener listener);
-
+    boolean addMetaEventListener(MetaEventListener listener);
 
     /**
-     * Removes the specified meta-event listener from this sequencer's
-     * list of registered listeners, if in fact the listener is registered.
+     * Removes the specified meta-event listener from this sequencer's list of
+     * registered listeners, if in fact the listener is registered.
      *
-     * @param listener the meta-event listener to remove
+     * @param  listener the meta-event listener to remove
      * @see #addMetaEventListener
      */
-    public void removeMetaEventListener(MetaEventListener listener);
-
+    void removeMetaEventListener(MetaEventListener listener);
 
     /**
-     * Registers a controller event listener to receive notification
-     * whenever the sequencer processes a control-change event of the
-     * requested type or types.  The types are specified by the
-     * <code>controllers</code> argument, which should contain an array of
-     * MIDI controller numbers.  (Each number should be between 0 and 127,
-     * inclusive.  See the MIDI 1.0 Specification for the numbers that
-     * correspond to various types of controllers.)
+     * Registers a controller event listener to receive notification whenever
+     * the sequencer processes a control-change event of the requested type or
+     * types. The types are specified by the {@code controllers} argument, which
+     * should contain an array of MIDI controller numbers. (Each number should
+     * be between 0 and 127, inclusive. See the MIDI 1.0 Specification for the
+     * numbers that correspond to various types of controllers.)
      * <p>
-     * The returned array contains the MIDI controller
-     * numbers for which the listener will now receive events.
-     * Some sequencers might not support controller event notification, in
-     * which case the array has a length of 0.  Other sequencers might
-     * support notification for some controllers but not all.
-     * This method may be invoked repeatedly.
-     * Each time, the returned array indicates all the controllers
-     * that the listener will be notified about, not only the controllers
-     * requested in that particular invocation.
+     * The returned array contains the MIDI controller numbers for which the
+     * listener will now receive events. Some sequencers might not support
+     * controller event notification, in which case the array has a length of 0.
+     * Other sequencers might support notification for some controllers but not
+     * all. This method may be invoked repeatedly. Each time, the returned array
+     * indicates all the controllers that the listener will be notified about,
+     * not only the controllers requested in that particular invocation.
      *
-     * @param listener the controller event listener to add to the list of
-     * registered listeners
-     * @param controllers the MIDI controller numbers for which change
-     * notification is requested
-     * @return the numbers of all the MIDI controllers whose changes will
-     * now be reported to the specified listener
-     *
+     * @param  listener the controller event listener to add to the list of
+     *         registered listeners
+     * @param  controllers the MIDI controller numbers for which change
+     *         notification is requested
+     * @return the numbers of all the MIDI controllers whose changes will now be
+     *         reported to the specified listener
      * @see #removeControllerEventListener
      * @see ControllerEventListener
      */
-    public int[] addControllerEventListener(ControllerEventListener listener, int[] controllers);
-
+    int[] addControllerEventListener(ControllerEventListener listener,
+                                     int[] controllers);
 
     /**
-     * Removes a controller event listener's interest in one or more
-     * types of controller event. The <code>controllers</code> argument
-     * is an array of MIDI numbers corresponding to the  controllers for
-     * which the listener should no longer receive change notifications.
-     * To completely remove this listener from the list of registered
-     * listeners, pass in <code>null</code> for <code>controllers</code>.
-     * The returned array contains the MIDI controller
-     * numbers for which the listener will now receive events.  The
-     * array has a length of 0 if the listener will not receive
-     * change notifications for any controllers.
+     * Removes a controller event listener's interest in one or more types of
+     * controller event. The {@code controllers} argument is an array of MIDI
+     * numbers corresponding to the controllers for which the listener should no
+     * longer receive change notifications. To completely remove this listener
+     * from the list of registered listeners, pass in {@code null} for
+     * {@code controllers}. The returned array contains the MIDI controller
+     * numbers for which the listener will now receive events. The array has a
+     * length of 0 if the listener will not receive change notifications for any
+     * controllers.
      *
-     * @param listener old listener
-     * @param controllers the MIDI controller numbers for which change
-     * notification should be cancelled, or <code>null</code> to cancel
-     * for all controllers
-     * @return the numbers of all the MIDI controllers whose changes will
-     * now be reported to the specified listener
-     *
+     * @param  listener old listener
+     * @param  controllers the MIDI controller numbers for which change
+     *         notification should be cancelled, or {@code null} to cancel for
+     *         all controllers
+     * @return the numbers of all the MIDI controllers whose changes will now be
+     *         reported to the specified listener
      * @see #addControllerEventListener
      */
-    public int[] removeControllerEventListener(ControllerEventListener listener, int[] controllers);
-
+    int[] removeControllerEventListener(ControllerEventListener listener,
+                                        int[] controllers);
 
     /**
-     * Sets the first MIDI tick that will be
-     * played in the loop. If the loop count is
-     * greater than 0, playback will jump to this
-     * point when reaching the loop end point.
-     *
-     * <p>A value of 0 for the starting point means the
-     * beginning of the loaded sequence. The starting
-     * point must be lower than or equal to the ending
-     * point, and it must fall within the size of the
-     * loaded sequence.
+     * Sets the first MIDI tick that will be played in the loop. If the loop
+     * count is greater than 0, playback will jump to this point when reaching
+     * the loop end point.
+     * <p>
+     * A value of 0 for the starting point means the beginning of the loaded
+     * sequence. The starting point must be lower than or equal to the ending
+     * point, and it must fall within the size of the loaded sequence.
+     * <p>
+     * A sequencer's loop start point defaults to start of the sequence.
      *
-     * <p>A sequencer's loop start point defaults to
-     * start of the sequence.
-     *
-     * @param tick the loop's starting position,
-     *        in MIDI ticks (zero-based)
-     * @throws IllegalArgumentException if the requested
-     *         loop start point cannot be set, usually because
-     *         it falls outside the sequence's
-     *         duration or because the start point is
-     *         after the end point
-     *
+     * @param  tick the loop's starting position, in MIDI ticks (zero-based)
+     * @throws IllegalArgumentException if the requested loop start point cannot
+     *         be set, usually because it falls outside the sequence's duration
+     *         or because the start point is after the end point
      * @see #setLoopEndPoint
      * @see #setLoopCount
      * @see #getLoopStartPoint
      * @see #start
      * @since 1.5
      */
-    public void setLoopStartPoint(long tick);
-
+    void setLoopStartPoint(long tick);
 
     /**
-     * Obtains the start position of the loop,
-     * in MIDI ticks.
+     * Obtains the start position of the loop, in MIDI ticks.
      *
-     * @return the start position of the loop,
-               in MIDI ticks (zero-based)
+     * @return the start position of the loop, in MIDI ticks (zero-based)
      * @see #setLoopStartPoint
      * @since 1.5
      */
-    public long getLoopStartPoint();
-
+    long getLoopStartPoint();
 
     /**
-     * Sets the last MIDI tick that will be played in
-     * the loop. If the loop count is 0, the loop end
-     * point has no effect and playback continues to
+     * Sets the last MIDI tick that will be played in the loop. If the loop
+     * count is 0, the loop end point has no effect and playback continues to
      * play when reaching the loop end point.
-     *
-     * <p>A value of -1 for the ending point
-     * indicates the last tick of the sequence.
-     * Otherwise, the ending point must be greater
-     * than or equal to the starting point, and it must
-     * fall within the size of the loaded sequence.
+     * <p>
+     * A value of -1 for the ending point indicates the last tick of the
+     * sequence. Otherwise, the ending point must be greater than or equal to
+     * the starting point, and it must fall within the size of the loaded
+     * sequence.
+     * <p>
+     * A sequencer's loop end point defaults to -1, meaning the end of the
+     * sequence.
      *
-     * <p>A sequencer's loop end point defaults to -1,
-     * meaning the end of the sequence.
-     *
-     * @param tick the loop's ending position,
-     *        in MIDI ticks (zero-based), or
-     *        -1 to indicate the final tick
-     * @throws IllegalArgumentException if the requested
-     *         loop point cannot be set, usually because
-     *         it falls outside the sequence's
-     *         duration or because the ending point is
-     *         before the starting point
-     *
+     * @param  tick the loop's ending position, in MIDI ticks (zero-based), or
+     *         -1 to indicate the final tick
+     * @throws IllegalArgumentException if the requested loop point cannot be
+     *         set, usually because it falls outside the sequence's duration or
+     *         because the ending point is before the starting point
      * @see #setLoopStartPoint
      * @see #setLoopCount
      * @see #getLoopEndPoint
      * @see #start
      * @since 1.5
      */
-    public void setLoopEndPoint(long tick);
-
+    void setLoopEndPoint(long tick);
 
     /**
-     * Obtains the end position of the loop,
-     * in MIDI ticks.
+     * Obtains the end position of the loop, in MIDI ticks.
      *
-     * @return the end position of the loop, in MIDI
-     *         ticks (zero-based), or -1 to indicate
-     *         the end of the sequence
+     * @return the end position of the loop, in MIDI ticks (zero-based), or -1
+     *         to indicate the end of the sequence
      * @see #setLoopEndPoint
      * @since 1.5
      */
-    public long getLoopEndPoint();
-
+    long getLoopEndPoint();
 
     /**
-     * Sets the number of repetitions of the loop for
-     * playback.
-     * When the playback position reaches the loop end point,
-     * it will loop back to the loop start point
-     * <code>count</code> times, after which playback will
-     * continue to play to the end of the sequence.
+     * Sets the number of repetitions of the loop for playback. When the
+     * playback position reaches the loop end point, it will loop back to the
+     * loop start point {@code count} times, after which playback will continue
+     * to play to the end of the sequence.
      * <p>
-     * If the current position when this method is invoked
-     * is greater than the loop end point, playback
-     * continues to the end of the sequence without looping,
-     * unless the loop end point is changed subsequently.
+     * If the current position when this method is invoked is greater than the
+     * loop end point, playback continues to the end of the sequence without
+     * looping, unless the loop end point is changed subsequently.
      * <p>
-     * A <code>count</code> value of 0 disables looping:
-     * playback will continue at the loop end point, and it
-     * will not loop back to the loop start point.
+     * A {@code count} value of 0 disables looping: playback will continue at
+     * the loop end point, and it will not loop back to the loop start point.
      * This is a sequencer's default.
-     *
-     * <p>If playback is stopped during looping, the
-     * current loop status is cleared; subsequent start
-     * requests are not affected by an interrupted loop
-     * operation.
+     * <p>
+     * If playback is stopped during looping, the current loop status is
+     * cleared; subsequent start requests are not affected by an interrupted
+     * loop operation.
      *
-     * @param count the number of times playback should
-     *        loop back from the loop's end position
-     *        to the loop's start position, or
-     *        <code>{@link #LOOP_CONTINUOUSLY}</code>
-     *        to indicate that looping should
-     *        continue until interrupted
-     *
-     * @throws IllegalArgumentException if <code>count</code> is
-     * negative and not equal to {@link #LOOP_CONTINUOUSLY}
-     *
+     * @param  count the number of times playback should loop back from the
+     *         loop's end position to the loop's start position, or
+     *         {@link #LOOP_CONTINUOUSLY} to indicate that looping should
+     *         continue until interrupted
+     * @throws IllegalArgumentException if {@code count} is negative and not
+     *         equal to {@link #LOOP_CONTINUOUSLY}
      * @see #setLoopStartPoint
      * @see #setLoopEndPoint
      * @see #getLoopCount
      * @see #start
      * @since 1.5
      */
-    public void setLoopCount(int count);
-
+    void setLoopCount(int count);
 
     /**
-     * Obtains the number of repetitions for
-     * playback.
+     * Obtains the number of repetitions for playback.
      *
-     * @return the number of loops after which
-     *         playback plays to the end of the
+     * @return the number of loops after which playback plays to the end of the
      *         sequence
      * @see #setLoopCount
      * @see #start
      * @since 1.5
      */
-    public int getLoopCount();
+    int getLoopCount();
 
     /**
-     * A <code>SyncMode</code> object represents one of the ways in which
-     * a MIDI sequencer's notion of time can be synchronized with a master
-     * or slave device.
-     * If the sequencer is being synchronized to a master, the
-     * sequencer revises its current time in response to messages from
-     * the master.  If the sequencer has a slave, the sequencer
-     * similarly sends messages to control the slave's timing.
+     * A {@code SyncMode} object represents one of the ways in which a MIDI
+     * sequencer's notion of time can be synchronized with a master or slave
+     * device. If the sequencer is being synchronized to a master, the sequencer
+     * revises its current time in response to messages from the master. If the
+     * sequencer has a slave, the sequencer similarly sends messages to control
+     * the slave's timing.
      * <p>
-     * There are three predefined modes that specify possible masters
-     * for a sequencer: <code>INTERNAL_CLOCK</code>,
-     * <code>MIDI_SYNC</code>, and <code>MIDI_TIME_CODE</code>.  The
-     * latter two work if the sequencer receives MIDI messages from
-     * another device.  In these two modes, the sequencer's time gets reset
-     * based on system real-time timing clock messages or MIDI time code
-     * (MTC) messages, respectively.  These two modes can also be used
-     * as slave modes, in which case the sequencer sends the corresponding
-     * types of MIDI messages to its receiver (whether or not the sequencer
-     * is also receiving them from a master).  A fourth mode,
-     * <code>NO_SYNC</code>, is used to indicate that the sequencer should
-     * not control its receiver's timing.
+     * There are three predefined modes that specify possible masters for a
+     * sequencer: {@code INTERNAL_CLOCK}, {@code MIDI_SYNC}, and
+     * {@code MIDI_TIME_CODE}. The latter two work if the sequencer receives
+     * MIDI messages from another device. In these two modes, the sequencer's
+     * time gets reset based on system real-time timing clock messages or MIDI
+     * time code (MTC) messages, respectively. These two modes can also be used
+     * as slave modes, in which case the sequencer sends the corresponding types
+     * of MIDI messages to its receiver (whether or not the sequencer is also
+     * receiving them from a master). A fourth mode, {@code NO_SYNC}, is used to
+     * indicate that the sequencer should not control its receiver's timing.
      *
-     * @see Sequencer#setMasterSyncMode(Sequencer.SyncMode)
-     * @see Sequencer#setSlaveSyncMode(Sequencer.SyncMode)
+     * @see Sequencer#setMasterSyncMode(SyncMode)
+     * @see Sequencer#setSlaveSyncMode(SyncMode)
      */
-    public static class SyncMode {
+    class SyncMode {
 
         /**
          * Synchronization mode name.
@@ -779,27 +684,27 @@
 
         /**
          * Constructs a synchronization mode.
-         * @param name name of the synchronization mode
+         *
+         * @param  name name of the synchronization mode
          */
         protected SyncMode(String name) {
 
             this.name = name;
         }
 
-
         /**
-         * Determines whether two objects are equal.
-         * Returns <code>true</code> if the objects are identical
-         * @param obj the reference object with which to compare
-         * @return <code>true</code> if this object is the same as the
-         * <code>obj</code> argument, <code>false</code> otherwise
+         * Determines whether two objects are equal. Returns {@code true} if the
+         * objects are identical.
+         *
+         * @param  obj the reference object with which to compare
+         * @return {@code true} if this object is the same as the {@code obj}
+         *         argument, {@code false} otherwise
          */
         public final boolean equals(Object obj) {
 
             return super.equals(obj);
         }
 
-
         /**
          * Finalizes the hashcode method.
          */
@@ -808,10 +713,10 @@
             return super.hashCode();
         }
 
-
         /**
          * Provides this synchronization mode's name as the string
          * representation of the mode.
+         *
          * @return the name of this synchronization mode
          */
         public final String toString() {
@@ -819,50 +724,41 @@
             return name;
         }
 
-
         /**
-         * A master synchronization mode that makes the sequencer get
-         * its timing information from its internal clock.  This is not
-         * a legal slave sync mode.
+         * A master synchronization mode that makes the sequencer get its timing
+         * information from its internal clock. This is not a legal slave sync
+         * mode.
          */
         public static final SyncMode INTERNAL_CLOCK             = new SyncMode("Internal Clock");
 
-
         /**
-         * A master or slave synchronization mode that specifies the
-         * use of MIDI clock
-         * messages.  If this mode is used as the master sync mode,
-         * the sequencer gets its timing information from system real-time
-         * MIDI clock messages.  This mode only applies as the master sync
-         * mode for sequencers that are also MIDI receivers.  If this is the
-         * slave sync mode, the sequencer sends system real-time MIDI clock
-         * messages to its receiver.  MIDI clock messages are sent at a rate
-         * of 24 per quarter note.
+         * A master or slave synchronization mode that specifies the use of MIDI
+         * clock messages. If this mode is used as the master sync mode, the
+         * sequencer gets its timing information from system real-time MIDI
+         * clock messages. This mode only applies as the master sync mode for
+         * sequencers that are also MIDI receivers. If this is the slave sync
+         * mode, the sequencer sends system real-time MIDI clock messages to its
+         * receiver. MIDI clock messages are sent at a rate of 24 per quarter
+         * note.
          */
         public static final SyncMode MIDI_SYNC                  = new SyncMode("MIDI Sync");
 
-
         /**
-         * A master or slave synchronization mode that specifies the
-         * use of MIDI Time Code.
-         * If this mode is used as the master sync mode,
-         * the sequencer gets its timing information from MIDI Time Code
-         * messages.  This mode only applies as the master sync
-         * mode to sequencers that are also MIDI receivers.  If this
-         * mode is used as the
-         * slave sync mode, the sequencer sends MIDI Time Code
-         * messages to its receiver.  (See the MIDI 1.0 Detailed
-         * Specification for a description of MIDI Time Code.)
+         * A master or slave synchronization mode that specifies the use of MIDI
+         * Time Code. If this mode is used as the master sync mode, the
+         * sequencer gets its timing information from MIDI Time Code messages.
+         * This mode only applies as the master sync mode to sequencers that are
+         * also MIDI receivers. If this mode is used as the slave sync mode, the
+         * sequencer sends MIDI Time Code messages to its receiver. (See the
+         * MIDI 1.0 Detailed Specification for a description of MIDI Time Code.)
          */
         public static final SyncMode MIDI_TIME_CODE             = new SyncMode("MIDI Time Code");
 
-
         /**
          * A slave synchronization mode indicating that no timing information
-         * should be sent to the receiver.  This is not a legal master sync
-         * mode.
+         * should be sent to the receiver. This is not a legal master sync mode.
          */
         public static final SyncMode NO_SYNC                            = new SyncMode("No Timing");
 
-    } // class SyncMode
+    }
 }
--- a/src/java.desktop/share/classes/javax/sound/midi/ShortMessage.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/ShortMessage.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,156 +26,158 @@
 package javax.sound.midi;
 
 /**
- * A <code>ShortMessage</code> contains a MIDI message that has at most
- * two data bytes following its status byte.  The types of MIDI message
- * that satisfy this criterion are channel voice, channel mode, system common,
- * and system real-time--in other words, everything except system exclusive
- * and meta-events.  The <code>ShortMessage</code> class provides methods
- * for getting and setting the contents of the MIDI message.
+ * A {@code ShortMessage} contains a MIDI message that has at most two data
+ * bytes following its status byte. The types of MIDI message that satisfy this
+ * criterion are channel voice, channel mode, system common, and system
+ * real-time--in other words, everything except system exclusive and
+ * meta-events. The {@code ShortMessage} class provides methods for getting and
+ * setting the contents of the MIDI message.
  * <p>
- * A number of <code>ShortMessage</code> methods have integer parameters by which
- * you specify a MIDI status or data byte.  If you know the numeric value, you
- * can express it directly.  For system common and system real-time messages,
- * you can often use the corresponding fields of <code>ShortMessage</code>, such as
- * {@link #SYSTEM_RESET SYSTEM_RESET}.  For channel messages,
- * the upper four bits of the status byte are specified by a command value and
- * the lower four bits are specified by a MIDI channel number. To
- * convert incoming MIDI data bytes that are in the form of Java's signed bytes,
- * you can use the <A HREF="MidiMessage.html#integersVsBytes">conversion code</A>
- * given in the <code>{@link MidiMessage}</code> class description.
- *
- * @see SysexMessage
- * @see MetaMessage
+ * A number of {@code ShortMessage} methods have integer parameters by which you
+ * specify a MIDI status or data byte. If you know the numeric value, you can
+ * express it directly. For system common and system real-time messages, you can
+ * often use the corresponding fields of {@code ShortMessage}, such as
+ * {@link #SYSTEM_RESET SYSTEM_RESET}. For channel messages, the upper four bits
+ * of the status byte are specified by a command value and the lower four bits
+ * are specified by a MIDI channel number. To convert incoming MIDI data bytes
+ * that are in the form of Java's signed bytes, you can use the
+ * <a href="MidiMessage.html#integersVsBytes">conversion code</a> given in the
+ * {@link MidiMessage} class description.
  *
  * @author David Rivas
  * @author Kara Kytle
  * @author Florian Bomers
+ * @see SysexMessage
+ * @see MetaMessage
  */
-
 public class ShortMessage extends MidiMessage {
 
-
     // Status byte defines
 
-
     // System common messages
 
     /**
      * Status byte for MIDI Time Code Quarter Frame message (0xF1, or 241).
+     *
      * @see MidiMessage#getStatus
      */
     public static final int MIDI_TIME_CODE                              = 0xF1; // 241
 
     /**
      * Status byte for Song Position Pointer message (0xF2, or 242).
+     *
      * @see MidiMessage#getStatus
      */
     public static final int SONG_POSITION_POINTER               = 0xF2; // 242
 
     /**
      * Status byte for MIDI Song Select message (0xF3, or 243).
+     *
      * @see MidiMessage#getStatus
      */
     public static final int SONG_SELECT                                 = 0xF3; // 243
 
     /**
      * Status byte for Tune Request message (0xF6, or 246).
+     *
      * @see MidiMessage#getStatus
      */
     public static final int TUNE_REQUEST                                = 0xF6; // 246
 
     /**
      * Status byte for End of System Exclusive message (0xF7, or 247).
+     *
      * @see MidiMessage#getStatus
      */
     public static final int END_OF_EXCLUSIVE                    = 0xF7; // 247
 
-
     // System real-time messages
 
     /**
      * Status byte for Timing Clock message (0xF8, or 248).
+     *
      * @see MidiMessage#getStatus
      */
     public static final int TIMING_CLOCK                                = 0xF8; // 248
 
     /**
      * Status byte for Start message (0xFA, or 250).
+     *
      * @see MidiMessage#getStatus
      */
     public static final int START                                               = 0xFA; // 250
 
     /**
      * Status byte for Continue message (0xFB, or 251).
+     *
      * @see MidiMessage#getStatus
      */
     public static final int CONTINUE                                    = 0xFB; // 251
 
     /**
      * Status byte for Stop message (0xFC, or 252).
+     *
      * @see MidiMessage#getStatus
      */
     public static final int STOP                                                = 0xFC; //252
 
     /**
      * Status byte for Active Sensing message (0xFE, or 254).
+     *
      * @see MidiMessage#getStatus
      */
     public static final int ACTIVE_SENSING                              = 0xFE; // 254
 
     /**
      * Status byte for System Reset message (0xFF, or 255).
+     *
      * @see MidiMessage#getStatus
      */
     public static final int SYSTEM_RESET                                = 0xFF; // 255
 
-
     // Channel voice message upper nibble defines
 
     /**
-     * Command value for Note Off message (0x80, or 128)
+     * Command value for Note Off message (0x80, or 128).
      */
     public static final int NOTE_OFF                                    = 0x80;  // 128
 
     /**
-     * Command value for Note On message (0x90, or 144)
+     * Command value for Note On message (0x90, or 144).
      */
     public static final int NOTE_ON                                             = 0x90;  // 144
 
     /**
-     * Command value for Polyphonic Key Pressure (Aftertouch) message (0xA0, or 160)
+     * Command value for Polyphonic Key Pressure (Aftertouch) message (0xA0, or
+     * 160).
      */
     public static final int POLY_PRESSURE                               = 0xA0;  // 160
 
     /**
-     * Command value for Control Change message (0xB0, or 176)
+     * Command value for Control Change message (0xB0, or 176).
      */
     public static final int CONTROL_CHANGE                              = 0xB0;  // 176
 
     /**
-     * Command value for Program Change message (0xC0, or 192)
+     * Command value for Program Change message (0xC0, or 192).
      */
     public static final int PROGRAM_CHANGE                              = 0xC0;  // 192
 
     /**
-     * Command value for Channel Pressure (Aftertouch) message (0xD0, or 208)
+     * Command value for Channel Pressure (Aftertouch) message (0xD0, or 208).
      */
     public static final int CHANNEL_PRESSURE                    = 0xD0;  // 208
 
     /**
-     * Command value for Pitch Bend message (0xE0, or 224)
+     * Command value for Pitch Bend message (0xE0, or 224).
      */
     public static final int PITCH_BEND                                  = 0xE0;  // 224
 
-
-    // Instance variables
-
     /**
-     * Constructs a new <code>ShortMessage</code>.  The
-     * contents of the new message are guaranteed to specify
-     * a valid MIDI message.  Subsequently, you may set the
-     * contents of the message using one of the <code>setMessage</code>
-     * methods.
+     * Constructs a new {@code ShortMessage}. The contents of the new message
+     * are guaranteed to specify a valid MIDI message. Subsequently, you may set
+     * the contents of the message using one of the {@code setMessage} methods.
+     *
      * @see #setMessage
      */
     public ShortMessage() {
@@ -188,14 +190,13 @@
     }
 
     /**
-     * Constructs a new {@code ShortMessage} which represents a MIDI
-     * message that takes no data bytes.
-     * The contents of the message can be changed by using one of
-     * the {@code setMessage} methods.
+     * Constructs a new {@code ShortMessage} which represents a MIDI message
+     * that takes no data bytes. The contents of the message can be changed by
+     * using one of the {@code setMessage} methods.
      *
-     * @param status the MIDI status byte
-     * @throws InvalidMidiDataException if {@code status} does not specify
-     *     a valid MIDI status byte for a message that requires no data bytes
+     * @param  status the MIDI status byte
+     * @throws InvalidMidiDataException if {@code status} does not specify a
+     *         valid MIDI status byte for a message that requires no data bytes
      * @see #setMessage(int)
      * @see #setMessage(int, int, int)
      * @see #setMessage(int, int, int, int)
@@ -210,16 +211,15 @@
     /**
      * Constructs a new {@code ShortMessage} which represents a MIDI message
      * that takes up to two data bytes. If the message only takes one data byte,
-     * the second data byte is ignored. If the message does not take
-     * any data bytes, both data bytes are ignored.
-     * The contents of the message can be changed by using one of
-     * the {@code setMessage} methods.
+     * the second data byte is ignored. If the message does not take any data
+     * bytes, both data bytes are ignored. The contents of the message can be
+     * changed by using one of the {@code setMessage} methods.
      *
-     * @param status   the MIDI status byte
-     * @param data1    the first data byte
-     * @param data2    the second data byte
+     * @param  status the MIDI status byte
+     * @param  data1 the first data byte
+     * @param  data2 the second data byte
      * @throws InvalidMidiDataException if the status byte or all data bytes
-     *     belonging to the message do not specify a valid MIDI message
+     *         belonging to the message do not specify a valid MIDI message
      * @see #setMessage(int)
      * @see #setMessage(int, int, int)
      * @see #setMessage(int, int, int, int)
@@ -235,20 +235,19 @@
     }
 
     /**
-     * Constructs a new {@code ShortMessage} which represents a channel
-     * MIDI message that takes up to two data bytes. If the message only takes
-     * one data byte, the second data byte is ignored. If the message does not
-     * take any data bytes, both data bytes are ignored.
-     * The contents of the message can be changed by using one of
-     * the {@code setMessage} methods.
+     * Constructs a new {@code ShortMessage} which represents a channel MIDI
+     * message that takes up to two data bytes. If the message only takes one
+     * data byte, the second data byte is ignored. If the message does not take
+     * any data bytes, both data bytes are ignored. The contents of the message
+     * can be changed by using one of the {@code setMessage} methods.
      *
-     * @param command  the MIDI command represented by this message
-     * @param channel  the channel associated with the message
-     * @param data1    the first data byte
-     * @param data2    the second data byte
-     * @throws InvalidMidiDataException if the command value, channel value
-     *     or all data bytes belonging to the message do not specify
-     *     a valid MIDI message
+     * @param  command the MIDI command represented by this message
+     * @param  channel the channel associated with the message
+     * @param  data1 the first data byte
+     * @param  data2 the second data byte
+     * @throws InvalidMidiDataException if the command value, channel value or
+     *         all data bytes belonging to the message do not specify a valid
+     *         MIDI message
      * @see #setMessage(int)
      * @see #setMessage(int, int, int)
      * @see #setMessage(int, int, int, int)
@@ -264,12 +263,11 @@
         setMessage(command, channel, data1, data2);
     }
 
-
     /**
-     * Constructs a new <code>ShortMessage</code>.
-     * @param data an array of bytes containing the complete message.
-     * The message data may be changed using the <code>setMessage</code>
-     * method.
+     * Constructs a new {@code ShortMessage}.
+     *
+     * @param  data an array of bytes containing the complete message. The
+     *         message data may be changed using the {@code setMessage} method.
      * @see #setMessage
      */
     // $$fb this should throw an Exception in case of an illegal message!
@@ -279,12 +277,12 @@
         super(data);
     }
 
-
     /**
      * Sets the parameters for a MIDI message that takes no data bytes.
-     * @param status    the MIDI status byte
-     * @throws  InvalidMidiDataException if <code>status</code> does not
-     * specify a valid MIDI status byte for a message that requires no data bytes.
+     *
+     * @param  status the MIDI status byte
+     * @throws InvalidMidiDataException if {@code status} does not specify a
+     *         valid MIDI status byte for a message that requires no data bytes
      * @see #setMessage(int, int, int)
      * @see #setMessage(int, int, int, int)
      */
@@ -297,19 +295,17 @@
         setMessage(status, 0, 0);
     }
 
-
     /**
-     * Sets the  parameters for a MIDI message that takes one or two data
-     * bytes.  If the message takes only one data byte, the second data
-     * byte is ignored; if the message does not take any data bytes, both
-     * data bytes are ignored.
+     * Sets the parameters for a MIDI message that takes one or two data bytes.
+     * If the message takes only one data byte, the second data byte is ignored;
+     * if the message does not take any data bytes, both data bytes are ignored.
      *
-     * @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 bytes belonging to the message, do
-     * not specify a valid MIDI message.
+     * @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
+     *         bytes belonging to the message, do not specify a valid MIDI
+     *         message
      * @see #setMessage(int, int, int, int)
      * @see #setMessage(int)
      */
@@ -345,22 +341,18 @@
         }
     }
 
-
     /**
-     * Sets the short message parameters for a  channel message
-     * which takes up to two data bytes.  If the message only
-     * takes one data byte, the second data byte is ignored; if
-     * the message does not take any data bytes, both data bytes
-     * are ignored.
+     * Sets the short message parameters for a channel message which takes up to
+     * two data bytes. If the message only takes one data byte, the second data
+     * byte is ignored; if the message does not take any data bytes, both data
+     * bytes are ignored.
      *
-     * @param command   the MIDI command represented by this message
-     * @param channel   the channel associated with the message
-     * @param data1             the first data byte
-     * @param data2             the second data byte
-     * @throws          InvalidMidiDataException if the
-     * status byte or all data bytes belonging to the message, do
-     * not specify a valid MIDI message
-     *
+     * @param  command the MIDI command represented by this message
+     * @param  channel the channel associated with the message
+     * @param  data1 the first data byte
+     * @param  data2 the second data byte
+     * @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)
      * @see #setMessage(int)
      * @see #getCommand
@@ -379,12 +371,12 @@
         setMessage((command & 0xF0) | (channel & 0x0F), data1, data2);
     }
 
-
     /**
-     * Obtains the MIDI channel associated with this event.  This method
-     * assumes that the event is a MIDI channel message; if not, the return
-     * value will not be meaningful.
-     * @return MIDI channel associated with the message.
+     * Obtains the MIDI channel associated with this event. This method assumes
+     * that the event is a MIDI channel message; if not, the return value will
+     * not be meaningful.
+     *
+     * @return MIDI channel associated with the message
      * @see #setMessage(int, int, int, int)
      */
     public int getChannel() {
@@ -392,11 +384,11 @@
         return (getStatus() & 0x0F);
     }
 
-
     /**
-     * Obtains the MIDI command associated with this event.  This method
-     * assumes that the event is a MIDI channel message; if not, the return
-     * value will not be meaningful.
+     * Obtains the MIDI command associated with this event. This method assumes
+     * that the event is a MIDI channel message; if not, the return value will
+     * not be meaningful.
+     *
      * @return the MIDI command associated with this event
      * @see #setMessage(int, int, int, int)
      */
@@ -405,10 +397,10 @@
         return (getStatus() & 0xF0);
     }
 
-
     /**
      * Obtains the first data byte in the message.
-     * @return the value of the <code>data1</code> field
+     *
+     * @return the value of the {@code data1} field
      * @see #setMessage(int, int, int)
      */
     public int getData1() {
@@ -418,10 +410,10 @@
         return 0;
     }
 
-
     /**
      * Obtains the second data byte in the message.
-     * @return the value of the <code>data2</code> field
+     *
+     * @return the value of the {@code data2} field
      * @see #setMessage(int, int, int)
      */
     public int getData2() {
@@ -431,11 +423,11 @@
         return 0;
     }
 
-
     /**
-     * Creates a new object of the same class and with the same contents
-     * as this object.
-     * @return a clone of this instance.
+     * Creates a new object of the same class and with the same contents as this
+     * object.
+     *
+     * @return a clone of this instance
      */
     public Object clone() {
         byte[] newData = new byte[length];
@@ -445,15 +437,15 @@
         return msg;
     }
 
-
     /**
-     * Retrieves the number of data bytes associated with a particular
-     * status byte value.
-     * @param status status byte value, which must represent a short MIDI message
+     * Retrieves the number of data bytes associated with a particular status
+     * byte value.
+     *
+     * @param  status status byte value, which must represent a short MIDI
+     *         message
      * @return data length in bytes (0, 1, or 2)
-     * @throws InvalidMidiDataException if the
-     * <code>status</code> argument does not represent the status byte for any
-     * short message
+     * @throws InvalidMidiDataException if the {@code status} argument does not
+     *         represent the status byte for any short message
      */
     protected final int getDataLength(int status) throws InvalidMidiDataException {
         // system common and system real-time messages
--- a/src/java.desktop/share/classes/javax/sound/midi/Soundbank.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/Soundbank.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,109 +25,101 @@
 
 package javax.sound.midi;
 
-import java.net.URL;
-
-
 /**
- * A <code>Soundbank</code> contains a set of <code>Instruments</code>
- * that can be loaded into a <code>Synthesizer</code>.
- * Note that a Java Sound <code>Soundbank</code> is different from a MIDI bank.
- * MIDI permits up to 16383 banks, each containing up to 128 instruments
- * (also sometimes called programs, patches, or timbres).
- * However, a <code>Soundbank</code> can contain 16383 times 128 instruments,
- * because the instruments within a <code>Soundbank</code> are indexed by both
- * a MIDI program number and a MIDI bank number (via a <code>Patch</code>
- * object). Thus, a <code>Soundbank</code> can be thought of as a collection
- * of MIDI banks.
+ * A {@code Soundbank} contains a set of {@code Instruments} that can be loaded
+ * into a {@code Synthesizer}. Note that a Java Sound {@code Soundbank} is
+ * different from a MIDI bank. MIDI permits up to 16383 banks, each containing
+ * up to 128 instruments (also sometimes called programs, patches, or timbres).
+ * However, a {@code Soundbank} can contain 16383 times 128 instruments, because
+ * the instruments within a {@code Soundbank} are indexed by both a MIDI program
+ * number and a MIDI bank number (via a {@code Patch} object). Thus, a
+ * {@code Soundbank} can be thought of as a collection of MIDI banks.
+ * <p>
+ * {@code Soundbank} includes methods that return {@code String} objects
+ * containing the sound bank's name, manufacturer, version number, and
+ * description. The precise content and format of these strings is left to the
+ * implementor.
  * <p>
- * <code>Soundbank</code> includes methods that return <code>String</code>
- * objects containing the sound bank's name, manufacturer, version number, and
- * description.  The precise content and format of these strings is left
- * to the implementor.
- * <p>
- * Different synthesizers use a variety of synthesis techniques.  A common
- * one is wavetable synthesis, in which a segment of recorded sound is
- * played back, often with looping and pitch change.  The Downloadable Sound
- * (DLS) format uses segments of recorded sound, as does the Headspace Engine.
- * <code>Soundbanks</code> and <code>Instruments</code> that are based on
- * wavetable synthesis (or other uses of stored sound recordings) should
- * typically implement the <code>getResources()</code>
- * method to provide access to these recorded segments.  This is optional,
- * however; the method can return an zero-length array if the synthesis technique
- * doesn't use sampled sound (FM synthesis and physical modeling are examples
- * of such techniques), or if it does but the implementor chooses not to make the
- * samples accessible.
+ * Different synthesizers use a variety of synthesis techniques. A common one is
+ * wavetable synthesis, in which a segment of recorded sound is played back,
+ * often with looping and pitch change. The Downloadable Sound (DLS) format uses
+ * segments of recorded sound, as does the Headspace Engine. {@code Soundbanks}
+ * and {@code Instruments} that are based on wavetable synthesis (or other uses
+ * of stored sound recordings) should typically implement the
+ * {@code getResources()} method to provide access to these recorded segments.
+ * This is optional, however; the method can return an zero-length array if the
+ * synthesis technique doesn't use sampled sound (FM synthesis and physical
+ * modeling are examples of such techniques), or if it does but the implementor
+ * chooses not to make the samples accessible.
  *
+ * @author David Rivas
+ * @author Kara Kytle
  * @see Synthesizer#getDefaultSoundbank
  * @see Synthesizer#isSoundbankSupported
  * @see Synthesizer#loadInstruments(Soundbank, Patch[])
  * @see Patch
  * @see Instrument
  * @see SoundbankResource
- *
- * @author David Rivas
- * @author Kara Kytle
  */
-
 public interface Soundbank {
 
-
     /**
      * Obtains the name of the sound bank.
-     * @return a <code>String</code> naming the sound bank
+     *
+     * @return a {@code String} naming the sound bank
      */
-    public String getName();
+    String getName();
 
     /**
      * Obtains the version string for the sound bank.
-     * @return a <code>String</code> that indicates the sound bank's version
+     *
+     * @return a {@code String} that indicates the sound bank's version
      */
-    public String getVersion();
+    String getVersion();
 
     /**
-     * Obtains a <code>string</code> naming the company that provides the
-     * sound bank
+     * Obtains a {@code string} naming the company that provides the sound bank.
+     *
      * @return the vendor string
      */
-    public String getVendor();
+    String getVendor();
 
     /**
      * Obtains a textual description of the sound bank, suitable for display.
-     * @return a <code>String</code> that describes the sound bank
+     *
+     * @return a {@code String} that describes the sound bank
      */
-    public String getDescription();
-
+    String getDescription();
 
     /**
      * Extracts a list of non-Instrument resources contained in the sound bank.
-     * @return an array of resources, excluding instruments.  If the sound bank contains
-     * no resources (other than instruments), returns an array of length 0.
+     *
+     * @return an array of resources, excluding instruments. If the sound bank
+     *         contains no resources (other than instruments), returns an array
+     *         of length 0.
      */
-    public SoundbankResource[] getResources();
-
+    SoundbankResource[] getResources();
 
     /**
      * Obtains a list of instruments contained in this sound bank.
-     * @return an array of the <code>Instruments</code> in this
-     * <code>SoundBank</code>
-     * If the sound bank contains no instruments, returns an array of length 0.
      *
+     * @return an array of the {@code Instruments} in this {@code SoundBank}. If
+     *         the sound bank contains no instruments, returns an array of
+     *         length 0.
      * @see Synthesizer#getLoadedInstruments
      * @see #getInstrument(Patch)
      */
-    public Instrument[] getInstruments();
+    Instrument[] getInstruments();
 
     /**
-     * Obtains an <code>Instrument</code> from the given <code>Patch</code>.
-     * @param patch a <code>Patch</code> object specifying the bank index
-     * and program change number
-     * @return the requested instrument, or <code>null</code> if the
-     * sound bank doesn't contain that instrument
+     * Obtains an {@code Instrument} from the given {@code Patch}.
      *
+     * @param  patch a {@code Patch} object specifying the bank index and
+     *         program change number
+     * @return the requested instrument, or {@code null} if the sound bank
+     *         doesn't contain that instrument
      * @see #getInstruments
      * @see Synthesizer#loadInstruments(Soundbank, Patch[])
      */
-    public Instrument getInstrument(Patch patch);
-
-
+    Instrument getInstrument(Patch patch);
 }
--- a/src/java.desktop/share/classes/javax/sound/midi/SoundbankResource.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/SoundbankResource.java	Thu Aug 28 14:54:07 2014 -0700
@@ -25,81 +25,72 @@
 
 package javax.sound.midi;
 
+import javax.sound.sampled.AudioInputStream;
+
 /**
- * A <code>SoundbankResource</code> represents any audio resource stored
- * in a <code>{@link Soundbank}</code>.  Common soundbank resources include:
+ * A {@code SoundbankResource} represents any audio resource stored in a
+ * {@link Soundbank}. Common soundbank resources include:
  * <ul>
- * <li>Instruments.  An instrument may be specified in a variety of
- * ways.  However, all soundbanks have some mechanism for defining
- * instruments.  In doing so, they may reference other resources
- * stored in the soundbank.  Each instrument has a <code>Patch</code>
- * which specifies the MIDI program and bank by which it may be
- * referenced in MIDI messages.  Instrument information may be
- * stored in <code>{@link Instrument}</code> objects.
- * <li>Audio samples.  A sample typically is a sampled audio waveform
- * which contains a short sound recording whose duration is a fraction of
- * a second, or at most a few seconds.  These audio samples may be
- * used by a <code>{@link Synthesizer}</code> to synthesize sound in response to MIDI
- * commands, or extracted for use by an application.
- * (The terminology reflects musicians' use of the word "sample" to refer
- * collectively to a series of contiguous audio samples or frames, rather than
- * to a single, instantaneous sample.)
- * The data class for an audio sample will be an object
- * that encapsulates the audio sample data itself and information
- * about how to interpret it (the format of the audio data), such
- * as an <code>{@link javax.sound.sampled.AudioInputStream}</code>.     </li>
- * <li>Embedded sequences.  A sound bank may contain built-in
- * song data stored in a data object such as a <code>{@link Sequence}</code>.
+ * <li>Instruments. An instrument may be specified in a variety of ways.
+ * However, all soundbanks have some mechanism for defining instruments. In
+ * doing so, they may reference other resources stored in the soundbank. Each
+ * instrument has a {@code Patch} which specifies the MIDI program and bank by
+ * which it may be referenced in MIDI messages. Instrument information may be
+ * stored in {@link Instrument} objects.</li>
+ * <li>Audio samples. A sample typically is a sampled audio waveform which
+ * contains a short sound recording whose duration is a fraction of a second, or
+ * at most a few seconds. These audio samples may be used by a
+ * {@link Synthesizer} to synthesize sound in response to MIDI commands, or
+ * extracted for use by an application. (The terminology reflects musicians' use
+ * of the word "sample" to refer collectively to a series of contiguous audio
+ * samples or frames, rather than to a single, instantaneous sample.) The data
+ * class for an audio sample will be an object that encapsulates the audio
+ * sample data itself and information about how to interpret it (the format of
+ * the audio data), such as an {@link AudioInputStream}.</li>
+ * <li>Embedded sequences. A sound bank may contain built-in song data stored in
+ * a data object such as a {@link Sequence}.</li>
  * </ul>
- * <p>
- * Synthesizers that use wavetable synthesis or related
- * techniques play back the audio in a sample when
- * synthesizing notes, often when emulating the real-world instrument that
- * was originally recorded.  However, there is not necessarily a one-to-one
- * correspondence between the <code>Instruments</code> and samples
- * in a <code>Soundbank</code>.  A single <code>Instrument</code> can use
- * multiple SoundbankResources (typically for notes of dissimilar pitch or
- * brightness).  Also, more than one <code>Instrument</code> can use the same
- * sample.
+ * Synthesizers that use wavetable synthesis or related techniques play back the
+ * audio in a sample when synthesizing notes, often when emulating the
+ * real-world instrument that was originally recorded. However, there is not
+ * necessarily a one-to-one correspondence between the {@code Instruments} and
+ * samples in a {@code Soundbank}. A single {@code Instrument} can use multiple
+ * SoundbankResources (typically for notes of dissimilar pitch or brightness).
+ * Also, more than one {@code Instrument} can use the same sample.
  *
  * @author Kara Kytle
  */
-
 public abstract class SoundbankResource {
 
-
     /**
-     * The sound bank that contains the <code>SoundbankResources</code>
+     * The sound bank that contains the {@code SoundbankResources}.
      */
     private final Soundbank soundBank;
 
-
     /**
-     * The name of the <code>SoundbankResource</code>
+     * The name of the {@code SoundbankResource}.
      */
     private final String name;
 
-
     /**
      * The class used to represent the sample's data.
      */
     private final Class<?> dataClass;
 
-
     /**
      * The wavetable index.
      */
     //private final int index;
 
-
     /**
-     * Constructs a new <code>SoundbankResource</code> from the given sound bank
-     * and wavetable index.  (Setting the <code>SoundbankResource's</code> name,
-     * sampled audio data, and instruments is a subclass responsibility.)
-     * @param soundBank the sound bank containing this <code>SoundbankResource</code>
-     * @param name the name of the sample
-     * @param dataClass the class used to represent the sample's data
+     * Constructs a new {@code SoundbankResource} from the given sound bank and
+     * wavetable index. (Setting the {@code SoundbankResource's} name, sampled
+     * audio data, and instruments is a subclass responsibility.)
      *
+     * @param  soundBank the sound bank containing this
+     *         {@code SoundbankResource}
+     * @param  name the name of the sample
+     * @param  dataClass the class used to represent the sample's data
      * @see #getSoundbank
      * @see #getName
      * @see #getDataClass
@@ -112,65 +103,65 @@
         this.dataClass = dataClass;
     }
 
-
     /**
-     * Obtains the sound bank that contains this <code>SoundbankResource</code>.
-     * @return the sound bank in which this <code>SoundbankResource</code> is stored
+     * Obtains the sound bank that contains this {@code SoundbankResource}.
+     *
+     * @return the sound bank in which this {@code SoundbankResource} is stored
      */
     public Soundbank getSoundbank() {
         return soundBank;
     }
 
-
     /**
-     * Obtains the name of the resource.  This should generally be a string
+     * Obtains the name of the resource. This should generally be a string
      * descriptive of the resource.
+     *
      * @return the instrument's name
      */
     public String getName() {
         return name;
     }
 
-
     /**
-     * Obtains the class used by this sample to represent its data.
-     * The object returned by <code>getData</code> will be of this
-     * class.  If this <code>SoundbankResource</code> object does not support
-     * direct access to its data, returns <code>null</code>.
-     * @return the class used to represent the sample's data, or
-     * null if the data is not accessible
+     * Obtains the class used by this sample to represent its data. The object
+     * returned by {@code getData} will be of this class. If this
+     * {@code SoundbankResource} object does not support direct access to its
+     * data, returns {@code null}.
+     *
+     * @return the class used to represent the sample's data, or null if the
+     *         data is not accessible
      */
     public Class<?> getDataClass() {
         return dataClass;
     }
 
-
     /**
-     * Obtains the sampled audio that is stored in this <code>SoundbankResource</code>.
-     * The type of object returned depends on the implementation of the
-     * concrete class, and may be queried using <code>getDataClass</code>.
+     * Obtains the sampled audio that is stored in this
+     * {@code SoundbankResource}. The type of object returned depends on the
+     * implementation of the concrete class, and may be queried using
+     * {@code getDataClass}.
+     *
      * @return an object containing the sampled audio data
      * @see #getDataClass
      */
     public abstract Object getData();
 
-
     /**
-     * Obtains the index of this <code>SoundbankResource</code> into the
-     * <code>Soundbank's</code> set of <code>SoundbankResources</code>.
+     * Obtains the index of this {@code SoundbankResource} into the
+     * {@code Soundbank's} set of {@code SoundbankResources}.
+     *
      * @return the wavetable index
      */
     //public int getIndex() {
     //  return index;
     //}
 
-
     /**
      * Obtains a list of the instruments in the sound bank that use the
-     * <code>SoundbankResource</code> for sound synthesis.
-     * @return an array of <code>Instruments</code> that reference this
-     * <code>SoundbankResource</code>
+     * {@code SoundbankResource} for sound synthesis.
      *
+     * @return an array of {@code Instruments} that reference this
+     *         {@code SoundbankResource}
      * @see Instrument#getSamples
      */
     //public abstract Instrument[] getInstruments();
--- a/src/java.desktop/share/classes/javax/sound/midi/Synthesizer.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/Synthesizer.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -25,46 +25,43 @@
 
 package javax.sound.midi;
 
-import javax.sound.sampled.Control;
-
-
 /**
- * A <code>Synthesizer</code> generates sound.  This usually happens when one of
- * the <code>Synthesizer</code>'s {@link MidiChannel} objects receives a
- * {@link MidiChannel#noteOn(int, int) noteOn} message, either
- * directly or via the <code>Synthesizer</code> object.
- * Many <code>Synthesizer</code>s support <code>Receivers</code>, through which
- * MIDI events can be delivered to the <code>Synthesizer</code>.
- * In such cases, the <code>Synthesizer</code> typically responds by sending
- * a corresponding message to the appropriate <code>MidiChannel</code>, or by
- * processing the event itself if the event isn't one of the MIDI channel
- * messages.
+ * A {@code Synthesizer} generates sound. This usually happens when one of the
+ * {@code Synthesizer}'s {@link MidiChannel} objects receives a
+ * {@link MidiChannel#noteOn(int, int) noteOn} message, either directly or via
+ * the {@code Synthesizer} object. Many {@code Synthesizer}s support
+ * {@code Receivers}, through which MIDI events can be delivered to the
+ * {@code Synthesizer}. In such cases, the {@code Synthesizer} typically
+ * responds by sending a corresponding message to the appropriate
+ * {@code MidiChannel}, or by processing the event itself if the event isn't one
+ * of the MIDI channel messages.
  * <p>
- * The <code>Synthesizer</code> interface includes methods for loading and
- * unloading instruments from soundbanks.  An instrument is a specification for synthesizing a
- * certain type of sound, whether that sound emulates a traditional instrument or is
- * some kind of sound effect or other imaginary sound. A soundbank is a collection of instruments, organized
- * by bank and program number (via the instrument's <code>Patch</code> object).
- * Different <code>Synthesizer</code> classes might implement different sound-synthesis
- * techniques, meaning that some instruments and not others might be compatible with a
- * given synthesizer.
- * Also, synthesizers may have a limited amount of memory for instruments, meaning
- * that not every soundbank and instrument can be used by every synthesizer, even if
- * the synthesis technique is compatible.
- * To see whether the instruments from
- * a certain soundbank can be played by a given synthesizer, invoke the
- * {@link #isSoundbankSupported(Soundbank) isSoundbankSupported} method of
- * <code>Synthesizer</code>.
+ * The {@code Synthesizer} interface includes methods for loading and unloading
+ * instruments from soundbanks. An instrument is a specification for
+ * synthesizing a certain type of sound, whether that sound emulates a
+ * traditional instrument or is some kind of sound effect or other imaginary
+ * sound. A soundbank is a collection of instruments, organized by bank and
+ * program number (via the instrument's {@code Patch} object). Different
+ * {@code Synthesizer} classes might implement different sound-synthesis
+ * techniques, meaning that some instruments and not others might be compatible
+ * with a given synthesizer. Also, synthesizers may have a limited amount of
+ * memory for instruments, meaning that not every soundbank and instrument can
+ * be used by every synthesizer, even if the synthesis technique is compatible.
+ * To see whether the instruments from a certain soundbank can be played by a
+ * given synthesizer, invoke the
+ * {@link #isSoundbankSupported(Soundbank) isSoundbankSupported}
+ * method of {@code Synthesizer}.
  * <p>
  * "Loading" an instrument means that that instrument becomes available for
- * synthesizing notes.  The instrument is loaded into the bank and
- * program location specified by its <code>Patch</code> object.  Loading does
- * not necessarily mean that subsequently played notes will immediately have
- * the sound of this newly loaded instrument.  For the instrument to play notes,
- * one of the synthesizer's <code>MidiChannel</code> objects must receive (or have received)
- * a program-change message that causes that particular instrument's
- * bank and program number to be selected.
+ * synthesizing notes. The instrument is loaded into the bank and program
+ * location specified by its {@code Patch} object. Loading does not necessarily
+ * mean that subsequently played notes will immediately have the sound of this
+ * newly loaded instrument. For the instrument to play notes, one of the
+ * synthesizer's {@code MidiChannel} objects must receive (or have received) a
+ * program-change message that causes that particular instrument's bank and
+ * program number to be selected.
  *
+ * @author Kara Kytle
  * @see MidiSystem#getSynthesizer
  * @see Soundbank
  * @see Instrument
@@ -72,107 +69,103 @@
  * @see Receiver
  * @see Transmitter
  * @see MidiDevice
- *
- * @author Kara Kytle
  */
 public interface Synthesizer extends MidiDevice {
 
-
     // SYNTHESIZER METHODS
 
-
     /**
-     * Obtains the maximum number of notes that this synthesizer can sound simultaneously.
+     * Obtains the maximum number of notes that this synthesizer can sound
+     * simultaneously.
+     *
      * @return the maximum number of simultaneous notes
      * @see #getVoiceStatus
      */
-    public int getMaxPolyphony();
-
+    int getMaxPolyphony();
 
     /**
      * Obtains the processing latency incurred by this synthesizer, expressed in
-     * microseconds.  This latency measures the worst-case delay between the
-     * time a MIDI message is delivered to the synthesizer and the time that the
+     * microseconds. This latency measures the worst-case delay between the time
+     * a MIDI message is delivered to the synthesizer and the time that the
      * synthesizer actually produces the corresponding result.
      * <p>
-     * Although the latency is expressed in microseconds, a synthesizer's actual measured
-     * delay may vary over a wider range than this resolution suggests.  For example,
-     * a synthesizer might have a worst-case delay of a few milliseconds or more.
+     * Although the latency is expressed in microseconds, a synthesizer's actual
+     * measured delay may vary over a wider range than this resolution suggests.
+     * For example, a synthesizer might have a worst-case delay of a few
+     * milliseconds or more.
      *
      * @return the worst-case delay, in microseconds
      */
-    public long getLatency();
-
+    long getLatency();
 
     /**
-     * Obtains the set of MIDI channels controlled by this synthesizer.  Each
-     * non-null element in the returned array is a <code>MidiChannel</code> that
+     * Obtains the set of MIDI channels controlled by this synthesizer. Each
+     * non-null element in the returned array is a {@code MidiChannel} that
      * receives the MIDI messages sent on that channel number.
      * <p>
-     * The MIDI 1.0 specification provides for 16 channels, so this
-     * method returns an array of at least 16 elements.  However, if this synthesizer
+     * The MIDI 1.0 specification provides for 16 channels, so this method
+     * returns an array of at least 16 elements. However, if this synthesizer
      * doesn't make use of all 16 channels, some of the elements of the array
-     * might be <code>null</code>, so you should check each element
-     * before using it.
-     * @return an array of the <code>MidiChannel</code> objects managed by this
-     * <code>Synthesizer</code>.  Some of the array elements may be <code>null</code>.
+     * might be {@code null}, so you should check each element before using it.
+     *
+     * @return an array of the {@code MidiChannel} objects managed by this
+     *         {@code Synthesizer}. Some of the array elements may be
+     *         {@code null}.
      */
-    public MidiChannel[] getChannels();
-
+    MidiChannel[] getChannels();
 
     /**
-     * Obtains the current status of the voices produced by this synthesizer.
-     * If this class of <code>Synthesizer</code> does not provide voice
-     * information, the returned array will always be of length 0.  Otherwise,
-     * its length is always equal to the total number of voices, as returned by
-     * <code>getMaxPolyphony()</code>.  (See the <code>VoiceStatus</code> class
-     * description for an explanation of synthesizer voices.)
+     * Obtains the current status of the voices produced by this synthesizer. If
+     * this class of {@code Synthesizer} does not provide voice information, the
+     * returned array will always be of length 0. Otherwise, its length is
+     * always equal to the total number of voices, as returned by
+     * {@code getMaxPolyphony()}. (See the {@code VoiceStatus} class description
+     * for an explanation of synthesizer voices.)
      *
-     * @return an array of <code>VoiceStatus</code> objects that supply
-     * information about the corresponding synthesizer voices
+     * @return an array of {@code VoiceStatus} objects that supply information
+     *         about the corresponding synthesizer voices
      * @see #getMaxPolyphony
      * @see VoiceStatus
      */
-    public VoiceStatus[] getVoiceStatus();
-
+    VoiceStatus[] getVoiceStatus();
 
     /**
      * Informs the caller whether this synthesizer is capable of loading
-     * instruments from the specified soundbank.
-     * If the soundbank is unsupported, any attempts to load instruments from
-     * it will result in an <code>IllegalArgumentException</code>.
-     * @param soundbank soundbank for which support is queried
-     * @return <code>true</code> if the soundbank is supported, otherwise <code>false</code>
+     * instruments from the specified soundbank. If the soundbank is
+     * unsupported, any attempts to load instruments from it will result in an
+     * {@code IllegalArgumentException}.
+     *
+     * @param  soundbank soundbank for which support is queried
+     * @return {@code true} if the soundbank is supported, otherwise
+     *         {@code false}
      * @see #loadInstruments
      * @see #loadAllInstruments
      * @see #unloadInstruments
      * @see #unloadAllInstruments
      * @see #getDefaultSoundbank
      */
-    public boolean isSoundbankSupported(Soundbank soundbank);
-
+    boolean isSoundbankSupported(Soundbank soundbank);
 
     /**
-     * Makes a particular instrument available for synthesis.  This instrument
-     * is loaded into the patch location specified by its <code>Patch</code>
-     * object, so that if a program-change message is
-     * received (or has been received) that causes that patch to be selected,
-     * subsequent notes will be played using the sound of
-     * <code>instrument</code>.  If the specified instrument is already loaded,
-     * this method does nothing and returns <code>true</code>.
+     * Makes a particular instrument available for synthesis. This instrument is
+     * loaded into the patch location specified by its {@code Patch} object, so
+     * that if a program-change message is received (or has been received) that
+     * causes that patch to be selected, subsequent notes will be played using
+     * the sound of {@code instrument}. If the specified instrument is already
+     * loaded, this method does nothing and returns {@code true}.
      * <p>
-     * The instrument must be part of a soundbank
-     * that this <code>Synthesizer</code> supports.  (To make sure, you can use
-     * the <code>getSoundbank</code> method of <code>Instrument</code> and the
-     * <code>isSoundbankSupported</code> method of <code>Synthesizer</code>.)
-     * @param instrument instrument to load
-     * @return <code>true</code> if the instrument is successfully loaded (or
-     * already had been), <code>false</code> if the instrument could not be
-     * loaded (for example, if the synthesizer has insufficient
-     * memory to load it)
-     * @throws IllegalArgumentException if this
-     * <code>Synthesizer</code> doesn't support the specified instrument's
-     * soundbank
+     * The instrument must be part of a soundbank that this {@code Synthesizer}
+     * supports. (To make sure, you can use the {@code getSoundbank} method of
+     * {@code Instrument} and the {@code isSoundbankSupported} method of
+     * {@code Synthesizer}.)
+     *
+     * @param  instrument instrument to load
+     * @return {@code true} if the instrument is successfully loaded (or already
+     *         had been), {@code false} if the instrument could not be loaded
+     *         (for example, if the synthesizer has insufficient memory to load
+     *         it)
+     * @throws IllegalArgumentException if this {@code Synthesizer} doesn't
+     *         support the specified instrument's soundbank
      * @see #unloadInstrument
      * @see #loadInstruments
      * @see #loadAllInstruments
@@ -180,138 +173,139 @@
      * @see SoundbankResource#getSoundbank
      * @see MidiChannel#programChange(int, int)
      */
-    public boolean loadInstrument(Instrument instrument);
-
+    boolean loadInstrument(Instrument instrument);
 
     /**
      * Unloads a particular instrument.
-     * @param instrument instrument to unload
-     * @throws IllegalArgumentException if this
-     * <code>Synthesizer</code> doesn't support the specified instrument's
-     * soundbank
+     *
+     * @param  instrument instrument to unload
+     * @throws IllegalArgumentException if this {@code Synthesizer} doesn't
+     *         support the specified instrument's soundbank
      * @see #loadInstrument
      * @see #unloadInstruments
      * @see #unloadAllInstruments
      * @see #getLoadedInstruments
      * @see #remapInstrument
      */
-    public void unloadInstrument(Instrument instrument);
-
+    void unloadInstrument(Instrument instrument);
 
     /**
-     * Remaps an instrument. Instrument <code>to</code> takes the
-     * place of instrument <code>from</code>.<br>
-     * For example, if <code>from</code> was located at bank number 2,
-     * program number 11, remapping causes that bank and program location
-     * to be occupied instead by <code>to</code>.<br>
-     * If the function succeeds,  instrument <code>from</code> is unloaded.
-     * <p>To cancel the remapping reload instrument <code>from</code> by
-     * invoking one of {@link #loadInstrument}, {@link #loadInstruments}
-     * or {@link #loadAllInstruments}.
+     * Remaps an instrument. Instrument {@code to} takes the place of instrument
+     * {@code from}.
+     * <br>
+     * For example, if {@code from} was located at bank number 2, program number
+     * 11, remapping causes that bank and program location to be occupied
+     * instead by {@code to}.
+     * <br>
+     * If the function succeeds, instrument {@code from} is unloaded.
+     * <p>
+     * To cancel the remapping reload instrument {@code from} by invoking one of
+     * {@link #loadInstrument}, {@link #loadInstruments} or
+     * {@link #loadAllInstruments}.
      *
-     * @param from the <code>Instrument</code> object to be replaced
-     * @param to the <code>Instrument</code> object to be used in place
-     * of the old instrument, it should be loaded into the synthesizer
-     * @return <code>true</code> if the instrument successfully remapped,
-     * <code>false</code> if feature is not implemented by synthesizer
-     * @throws IllegalArgumentException if instrument
-     * <code>from</code> or instrument <code>to</code> aren't supported by
-     * synthesizer or if instrument <code>to</code> is not loaded
-     * @throws NullPointerException if <code>from</code> or
-     * <code>to</code> parameters have null value
+     * @param  from the {@code Instrument} object to be replaced
+     * @param  to the {@code Instrument} object to be used in place of the old
+     *         instrument, it should be loaded into the synthesizer
+     * @return {@code true} if the instrument successfully remapped,
+     *         {@code false} if feature is not implemented by synthesizer
+     * @throws IllegalArgumentException if instrument {@code from} or instrument
+     *         {@code to} aren't supported by synthesizer or if instrument
+     *         {@code to} is not loaded
+     * @throws NullPointerException if {@code from} or {@code to} parameters
+     *         have null value
      * @see #loadInstrument
      * @see #loadInstruments
      * @see #loadAllInstruments
      */
-    public boolean remapInstrument(Instrument from, Instrument to);
-
+    boolean remapInstrument(Instrument from, Instrument to);
 
     /**
-     * Obtains the default soundbank for the synthesizer, if one exists.
-     * (Some synthesizers provide a default or built-in soundbank.)
-     * If a synthesizer doesn't have a default soundbank, instruments must
-     * be loaded explicitly from an external soundbank.
-     * @return default soundbank, or <code>null</code> if one does not exist.
+     * Obtains the default soundbank for the synthesizer, if one exists. (Some
+     * synthesizers provide a default or built-in soundbank.) If a synthesizer
+     * doesn't have a default soundbank, instruments must be loaded explicitly
+     * from an external soundbank.
+     *
+     * @return default soundbank, or {@code null} if one does not exist
      * @see #isSoundbankSupported
      */
-    public Soundbank getDefaultSoundbank();
-
+    Soundbank getDefaultSoundbank();
 
     /**
-     * Obtains a list of instruments that come with the synthesizer.  These
-     * instruments might be built into the synthesizer, or they might be
-     * part of a default soundbank provided with the synthesizer, etc.
+     * Obtains a list of instruments that come with the synthesizer. These
+     * instruments might be built into the synthesizer, or they might be part of
+     * a default soundbank provided with the synthesizer, etc.
      * <p>
-     * Note that you don't use this method  to find out which instruments are
+     * Note that you don't use this method to find out which instruments are
      * currently loaded onto the synthesizer; for that purpose, you use
-     * <code>getLoadedInstruments()</code>.
-     * Nor does the method indicate all the instruments that can be loaded onto
-     * the synthesizer; it only indicates the subset that come with the synthesizer.
-     * To learn whether another instrument can be loaded, you can invoke
-     * <code>isSoundbankSupported()</code>, and if the instrument's
-     * <code>Soundbank</code> is supported, you can try loading the instrument.
+     * {@code getLoadedInstruments()}. Nor does the method indicate all the
+     * instruments that can be loaded onto the synthesizer; it only indicates
+     * the subset that come with the synthesizer. To learn whether another
+     * instrument can be loaded, you can invoke {@code isSoundbankSupported()},
+     * and if the instrument's {@code Soundbank} is supported, you can try
+     * loading the instrument.
      *
-     * @return list of available instruments. If the synthesizer
-     * has no instruments coming with it, an array of length 0 is returned.
+     * @return list of available instruments. If the synthesizer has no
+     *         instruments coming with it, an array of length 0 is returned.
      * @see #getLoadedInstruments
      * @see #isSoundbankSupported(Soundbank)
      * @see #loadInstrument
      */
-    public Instrument[] getAvailableInstruments();
-
+    Instrument[] getAvailableInstruments();
 
     /**
      * Obtains a list of the instruments that are currently loaded onto this
-     * <code>Synthesizer</code>.
+     * {@code Synthesizer}.
+     *
      * @return a list of currently loaded instruments
      * @see #loadInstrument
      * @see #getAvailableInstruments
      * @see Soundbank#getInstruments
      */
-    public Instrument[] getLoadedInstruments();
-
+    Instrument[] getLoadedInstruments();
 
     /**
-     * Loads onto the <code>Synthesizer</code> all instruments contained
-     * in the specified <code>Soundbank</code>.
-     * @param soundbank the <code>Soundbank</code> whose are instruments are
-     * to be loaded
-     * @return <code>true</code> if the instruments are all successfully loaded (or
-     * already had been), <code>false</code> if any instrument could not be
-     * loaded (for example, if the <code>Synthesizer</code> had insufficient memory)
+     * Loads onto the {@code Synthesizer} all instruments contained in the
+     * specified {@code Soundbank}.
+     *
+     * @param  soundbank the {@code Soundbank} whose are instruments are to be
+     *         loaded
+     * @return {@code true} if the instruments are all successfully loaded (or
+     *         already had been), {@code false} if any instrument could not be
+     *         loaded (for example, if the {@code Synthesizer} had insufficient
+     *         memory)
      * @throws IllegalArgumentException if the requested soundbank is
-     * incompatible with this synthesizer.
+     *         incompatible with this synthesizer
      * @see #isSoundbankSupported
      * @see #loadInstrument
      * @see #loadInstruments
      */
-    public boolean loadAllInstruments(Soundbank soundbank);
-
-
+    boolean loadAllInstruments(Soundbank soundbank);
 
     /**
-     * Unloads all instruments contained in the specified <code>Soundbank</code>.
-     * @param soundbank soundbank containing instruments to unload
-     * @throws IllegalArgumentException thrown if the soundbank is not supported.
+     * Unloads all instruments contained in the specified {@code Soundbank}.
+     *
+     * @param  soundbank soundbank containing instruments to unload
+     * @throws IllegalArgumentException thrown if the soundbank is not supported
      * @see #isSoundbankSupported
      * @see #unloadInstrument
      * @see #unloadInstruments
      */
-    public void unloadAllInstruments(Soundbank soundbank);
-
+    void unloadAllInstruments(Soundbank soundbank);
 
     /**
      * Loads the instruments referenced by the specified patches, from the
-     * specified <code>Soundbank</code>.  Each of the <code>Patch</code> objects
-     * indicates a bank and program number; the <code>Instrument</code> that
-     * has the matching <code>Patch</code> is loaded into that bank and program
-     * location.
-     * @param soundbank the <code>Soundbank</code> containing the instruments to load
-     * @param patchList list of patches for which instruments should be loaded
-     * @return <code>true</code> if the instruments are all successfully loaded (or
-     * already had been), <code>false</code> if any instrument could not be
-     * loaded (for example, if the <code>Synthesizer</code> had insufficient memory)
-     * @throws IllegalArgumentException thrown if the soundbank is not supported.
+     * specified {@code Soundbank}. Each of the {@code Patch} objects indicates
+     * a bank and program number; the {@code Instrument} that has the matching
+     * {@code Patch} is loaded into that bank and program location.
+     *
+     * @param  soundbank the {@code Soundbank} containing the instruments to
+     *         load
+     * @param  patchList list of patches for which instruments should be loaded
+     * @return {@code true} if the instruments are all successfully loaded (or
+     *         already had been), {@code false} if any instrument could not be
+     *         loaded (for example, if the {@code Synthesizer} had insufficient
+     *         memory)
+     * @throws IllegalArgumentException thrown if the soundbank is not supported
      * @see #isSoundbankSupported
      * @see Instrument#getPatch
      * @see #loadAllInstruments
@@ -319,76 +313,76 @@
      * @see Soundbank#getInstrument(Patch)
      * @see Sequence#getPatchList()
      */
-    public boolean loadInstruments(Soundbank soundbank, Patch[] patchList);
+    boolean loadInstruments(Soundbank soundbank, Patch[] patchList);
 
     /**
-     * Unloads the instruments referenced by the specified patches, from the MIDI sound bank specified.
-     * @param soundbank soundbank containing instruments to unload
-     * @param patchList list of patches for which instruments should be unloaded
-     * @throws IllegalArgumentException thrown if the soundbank is not supported.
+     * Unloads the instruments referenced by the specified patches, from the
+     * MIDI sound bank specified.
      *
+     * @param  soundbank soundbank containing instruments to unload
+     * @param  patchList list of patches for which instruments should be
+     *         unloaded
+     * @throws IllegalArgumentException thrown if the soundbank is not supported
      * @see #unloadInstrument
      * @see #unloadAllInstruments
      * @see #isSoundbankSupported
      * @see Instrument#getPatch
      * @see #loadInstruments
      */
-    public void unloadInstruments(Soundbank soundbank, Patch[] patchList);
-
+    void unloadInstruments(Soundbank soundbank, Patch[] patchList);
 
     // RECEIVER METHODS
 
     /**
      * Obtains the name of the receiver.
+     *
      * @return receiver name
      */
-    //  public abstract String getName();
-
+    //  abstract String getName();
 
     /**
      * Opens the receiver.
+     *
      * @throws MidiUnavailableException if the receiver is cannot be opened,
-     * usually because the MIDI device is in use by another application.
-     * @throws SecurityException if the receiver cannot be opened due to security
-     * restrictions.
+     *         usually because the MIDI device is in use by another application.
+     * @throws SecurityException if the receiver cannot be opened due to
+     *         security restrictions
      */
-    //  public abstract void open() throws MidiUnavailableException, SecurityException;
-
+    //  abstract void open() throws MidiUnavailableException, SecurityException;
 
     /**
      * Closes the receiver.
      */
-    //  public abstract void close();
-
+    //  abstract void close();
 
     /**
      * Sends a MIDI event to the receiver.
-     * @param event event to send.
-     * @throws IllegalStateException if the receiver is not open.
+     *
+     * @param  event event to send
+     * @throws IllegalStateException if the receiver is not open
      */
-    //  public void send(MidiEvent event) throws IllegalStateException {
+    //  void send(MidiEvent event) throws IllegalStateException {
     //
     //  }
 
-
     /**
-     * Obtains the set of controls supported by the
-     * element.  If no controls are supported, returns an
-     * array of length 0.
+     * Obtains the set of controls supported by the element. If no controls are
+     * supported, returns an array of length 0.
+     *
      * @return set of controls
      */
     // $$kk: 03.04.99: josh bloch recommends getting rid of this:
     // what can you really do with a set of untyped controls??
-    // $$kk: 03.05.99: i am putting this back in.  for one thing,
+    // $$kk: 03.05.99: i am putting this back in. for one thing,
     // you can check the length and know whether you should keep
     // looking....
-    // public Control[] getControls();
+    // Control[] getControls();
 
     /**
      * Obtains the specified control.
-     * @param controlClass class of the requested control
-     * @return requested control object, or null if the
-     * control is not supported.
+     *
+     * @param  controlClass class of the requested control
+     * @return requested control object, or null if the control is not supported
      */
-    // public Control getControl(Class controlClass);
+    // Control getControl(Class controlClass);
 }
--- a/src/java.desktop/share/classes/javax/sound/midi/SysexMessage.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/SysexMessage.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,47 +26,47 @@
 package javax.sound.midi;
 
 /**
- * A <code>SysexMessage</code> object represents a MIDI system exclusive message.
+ * A {@code SysexMessage} object represents a MIDI system exclusive message.
  * <p>
- * When a system exclusive message is read from a MIDI file, it always has
- * a defined length.  Data from a system exclusive message from a MIDI file
- * should be stored in the data array of a <code>SysexMessage</code> as
- * follows: the system exclusive message status byte (0xF0 or 0xF7), all
- * message data bytes, and finally the end-of-exclusive flag (0xF7).
- * The length reported by the <code>SysexMessage</code> object is therefore
- * the length of the system exclusive data plus two: one byte for the status
- * byte and one for the end-of-exclusive flag.
+ * When a system exclusive message is read from a MIDI file, it always has a
+ * defined length. Data from a system exclusive message from a MIDI file should
+ * be stored in the data array of a {@code SysexMessage} as follows: the system
+ * exclusive message status byte (0xF0 or 0xF7), all message data bytes, and
+ * finally the end-of-exclusive flag (0xF7). The length reported by the
+ * {@code SysexMessage} object is therefore the length of the system exclusive
+ * data plus two: one byte for the status byte and one for the end-of-exclusive
+ * flag.
  * <p>
- * As dictated by the Standard MIDI Files specification, two status byte values are legal
- * for a <code>SysexMessage</code> read from a MIDI file:
+ * As dictated by the Standard MIDI Files specification, two status byte values
+ * are legal for a {@code SysexMessage} read from a MIDI file:
  * <ul>
  * <li>0xF0: System Exclusive message (same as in MIDI wire protocol)</li>
  * <li>0xF7: Special System Exclusive message</li>
  * </ul>
- * <p>
- * When Java Sound is used to handle system exclusive data that is being received
- * using MIDI wire protocol, it should place the data in one or more
- * <code>SysexMessages</code>.  In this case, the length of the system exclusive data
+ * When Java Sound is used to handle system exclusive data that is being
+ * received using MIDI wire protocol, it should place the data in one or more
+ * {@code SysexMessages}. In this case, the length of the system exclusive data
  * is not known in advance; the end of the system exclusive data is marked by an
  * end-of-exclusive flag (0xF7) in the MIDI wire byte stream.
  * <ul>
  * <li>0xF0: System Exclusive message (same as in MIDI wire protocol)</li>
  * <li>0xF7: End of Exclusive (EOX)</li>
  * </ul>
- * The first <code>SysexMessage</code> object containing data for a particular system
- * exclusive message should have the status value 0xF0.  If this message contains all
- * the system exclusive data
- * for the message, it should end with the status byte 0xF7 (EOX).
- * Otherwise, additional system exclusive data should be sent in one or more
- * <code>SysexMessages</code> with a status value of 0xF7.  The <code>SysexMessage</code>
- * containing the last of the data for the system exclusive message should end with the
- * value 0xF7 (EOX) to mark the end of the system exclusive message.
+ * The first {@code SysexMessage} object containing data for a particular system
+ * exclusive message should have the status value 0xF0. If this message contains
+ * all the system exclusive data for the message, it should end with the status
+ * byte 0xF7 (EOX). Otherwise, additional system exclusive data should be sent
+ * in one or more {@code SysexMessages} with a status value of 0xF7. The
+ * {@code SysexMessage} containing the last of the data for the system exclusive
+ * message should end with the value 0xF7 (EOX) to mark the end of the system
+ * exclusive message.
  * <p>
- * If system exclusive data from <code>SysexMessages</code> objects is being transmitted
- * using MIDI wire protocol, only the initial 0xF0 status byte, the system exclusive
- * data itself, and the final 0xF7 (EOX) byte should be propagated; any 0xF7 status
- * bytes used to indicate that a <code>SysexMessage</code> contains continuing system
- * exclusive data should not be propagated via MIDI wire protocol.
+ * If system exclusive data from {@code SysexMessages} objects is being
+ * transmitted using MIDI wire protocol, only the initial 0xF0 status byte, the
+ * system exclusive data itself, and the final 0xF7 (EOX) byte should be
+ * propagated; any 0xF7 status bytes used to indicate that a
+ * {@code SysexMessage} contains continuing system exclusive data should not be
+ * propagated via MIDI wire protocol.
  *
  * @author David Rivas
  * @author Kara Kytle
@@ -74,43 +74,36 @@
  */
 public class SysexMessage extends MidiMessage {
 
-
     // Status byte defines
 
-
     /**
      * Status byte for System Exclusive message (0xF0, or 240).
+     *
      * @see MidiMessage#getStatus
      */
     public static final int SYSTEM_EXCLUSIVE                    = 0xF0; // 240
 
-
     /**
-     * Status byte for Special System Exclusive message (0xF7, or 247), which is used
-     * in MIDI files.  It has the same value as END_OF_EXCLUSIVE, which
-     * is used in the real-time "MIDI wire" protocol.
+     * Status byte for Special System Exclusive message (0xF7, or 247), which is
+     * used in MIDI files. It has the same value as END_OF_EXCLUSIVE, which is
+     * used in the real-time "MIDI wire" protocol.
+     *
      * @see MidiMessage#getStatus
      */
     public static final int SPECIAL_SYSTEM_EXCLUSIVE    = 0xF7; // 247
 
-
-    // Instance variables
-
-
-    /*
-     * The data bytes for this system exclusive message.  These are
-     * initialized to <code>null</code> and are set explicitly
-     * by {@link #setMessage(int, byte[], int, long) setMessage}.
+    /**
+     * The data bytes for this system exclusive message. These are initialized
+     * to {@code null} and are set explicitly by
+     * {@link #setMessage(int, byte[], int, long) setMessage}.
      */
     //protected byte[] data = null;
 
-
     /**
-     * Constructs a new <code>SysexMessage</code>. The
-     * contents of the new message are guaranteed to specify
-     * a valid MIDI message.  Subsequently, you may set the
-     * contents of the message using one of the <code>setMessage</code>
-     * methods.
+     * Constructs a new {@code SysexMessage}. The contents of the new message
+     * are guaranteed to specify a valid MIDI message. Subsequently, you may set
+     * the contents of the message using one of the {@code setMessage} methods.
+     *
      * @see #setMessage
      */
     public SysexMessage() {
@@ -121,18 +114,17 @@
     }
 
     /**
-     * Constructs a new {@code SysexMessage} and sets the data for
-     * the message. The first byte of the data array must be a valid system
-     * exclusive status byte (0xF0 or 0xF7).
-     * The contents of the message can be changed by using one of
-     * the {@code setMessage} methods.
+     * Constructs a new {@code SysexMessage} and sets the data for the message.
+     * The first byte of the data array must be a valid system exclusive status
+     * byte (0xF0 or 0xF7). The contents of the message can be changed by using
+     * one of the {@code setMessage} methods.
      *
-     * @param data the system exclusive message data including the status byte
-     * @param length the length of the valid message data in the array,
-     *     including the status byte; it should be non-negative and less than
-     *     or equal to {@code data.length}
-     * @throws InvalidMidiDataException if the parameter values
-     *     do not specify a valid MIDI meta message.
+     * @param  data the system exclusive message data including the status byte
+     * @param  length the length of the valid message data in the array,
+     *         including the status byte; it should be non-negative and less
+     *         than or equal to {@code data.length}
+     * @throws InvalidMidiDataException if the parameter values do not specify a
+     *         valid MIDI meta message.
      * @see #setMessage(byte[], int)
      * @see #setMessage(int, byte[], int)
      * @see #getData()
@@ -146,17 +138,17 @@
 
     /**
      * Constructs a new {@code SysexMessage} and sets the data for the message.
-     * The contents of the message can be changed by using one of
-     * the {@code setMessage} methods.
+     * The contents of the message can be changed by using one of the
+     * {@code setMessage} methods.
      *
-     * @param status the status byte for the message; it must be a valid system
-     *     exclusive status byte (0xF0 or 0xF7)
-     * @param data the system exclusive message data (without the status byte)
-     * @param length the length of the valid message data in the array;
-     *     it should be non-negative and less than or equal to
-     *     {@code data.length}
-     * @throws InvalidMidiDataException if the parameter values
-     *     do not specify a valid MIDI meta message.
+     * @param  status the status byte for the message; it must be a valid system
+     *         exclusive status byte (0xF0 or 0xF7)
+     * @param  data the system exclusive message data (without the status byte)
+     * @param  length the length of the valid message data in the array; it
+     *         should be non-negative and less than or equal to
+     *         {@code data.length}
+     * @throws InvalidMidiDataException if the parameter values do not specify a
+     *         valid MIDI meta message
      * @see #setMessage(byte[], int)
      * @see #setMessage(int, byte[], int)
      * @see #getData()
@@ -168,26 +160,24 @@
         setMessage(status, data, length);
     }
 
-
     /**
-     * Constructs a new <code>SysexMessage</code>.
-     * @param data an array of bytes containing the complete message.
-     * The message data may be changed using the <code>setMessage</code>
-     * method.
+     * Constructs a new {@code SysexMessage}.
+     *
+     * @param  data an array of bytes containing the complete message. The
+     *         message data may be changed using the {@code setMessage} method.
      * @see #setMessage
      */
     protected SysexMessage(byte[] data) {
         super(data);
     }
 
-
     /**
-     * Sets the data for the system exclusive message.   The
-     * first byte of the data array must be a valid system
-     * exclusive status byte (0xF0 or 0xF7).
-     * @param data the system exclusive message data
-     * @param length the length of the valid message data in
-     * the array, including the status byte.
+     * Sets the data for the system exclusive message. The first byte of the
+     * data array must be a valid system exclusive status byte (0xF0 or 0xF7).
+     *
+     * @param  data the system exclusive message data
+     * @param  length the length of the valid message data in the array,
+     *         including the status byte
      */
     public void setMessage(byte[] data, int length) throws InvalidMidiDataException {
         int status = (data[0] & 0xFF);
@@ -197,14 +187,14 @@
         super.setMessage(data, length);
     }
 
-
     /**
      * Sets the data for the system exclusive message.
-     * @param status the status byte for the message (0xF0 or 0xF7)
-     * @param data the system exclusive message data
-     * @param length the length of the valid message data in
-     * the array
-     * @throws InvalidMidiDataException if the status byte is invalid for a sysex message
+     *
+     * @param  status the status byte for the message (0xF0 or 0xF7)
+     * @param  data the system exclusive message data
+     * @param  length the length of the valid message data in the array
+     * @throws InvalidMidiDataException if the status byte is invalid for a
+     *         sysex message
      */
     public void setMessage(int status, byte[] data, int length) throws InvalidMidiDataException {
         if ( (status != 0xF0) && (status != 0xF7) ) {
@@ -225,11 +215,11 @@
         }
     }
 
-
     /**
-     * Obtains a copy of the data for the system exclusive message.
-     * The returned array of bytes does not include the status byte.
-     * @return array containing the system exclusive message data.
+     * Obtains a copy of the data for the system exclusive message. The returned
+     * array of bytes does not include the status byte.
+     *
+     * @return array containing the system exclusive message data
      */
     public byte[] getData() {
         byte[] returnedArray = new byte[length - 1];
@@ -237,10 +227,10 @@
         return returnedArray;
     }
 
-
     /**
-     * Creates a new object of the same class and with the same contents
-     * as this object.
+     * Creates a new object of the same class and with the same contents as this
+     * object.
+     *
      * @return a clone of this instance
      */
     public Object clone() {
--- a/src/java.desktop/share/classes/javax/sound/midi/Track.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/Track.java	Thu Aug 28 14:54:07 2014 -0700
@@ -25,41 +25,40 @@
 
 package javax.sound.midi;
 
-import java.util.Vector;
 import java.util.ArrayList;
 import java.util.HashSet;
+
 import com.sun.media.sound.MidiUtils;
 
 /**
- * A MIDI track is an independent stream of MIDI events (time-stamped MIDI
- * data) that can be stored along with other tracks in a standard MIDI file.
- * The MIDI specification allows only 16 channels of MIDI data, but tracks
- * are a way to get around this limitation.  A MIDI file can contain any number
- * of tracks, each containing its own stream of up to 16 channels of MIDI data.
+ * A MIDI track is an independent stream of MIDI events (time-stamped MIDI data)
+ * that can be stored along with other tracks in a standard MIDI file. The MIDI
+ * specification allows only 16 channels of MIDI data, but tracks are a way to
+ * get around this limitation. A MIDI file can contain any number of tracks,
+ * each containing its own stream of up to 16 channels of MIDI data.
  * <p>
- * A <code>Track</code> occupies a middle level in the hierarchy of data played
- * by a <code>{@link Sequencer}</code>: sequencers play sequences, which contain tracks,
- * which contain MIDI events.  A sequencer may provide controls that mute
- * or solo individual tracks.
+ * A {@code Track} occupies a middle level in the hierarchy of data played by a
+ * {@link Sequencer}: sequencers play sequences, which contain tracks, which
+ * contain MIDI events. A sequencer may provide controls that mute or solo
+ * individual tracks.
  * <p>
  * The timing information and resolution for a track is controlled by and stored
- * in the sequence containing the track. A given <code>Track</code>
- * is considered to belong to the particular <code>{@link Sequence}</code> that
- * maintains its timing. For this reason, a new (empty) track is created by calling the
- * <code>{@link Sequence#createTrack}</code> method, rather than by directly invoking a
- * <code>Track</code> constructor.
+ * in the sequence containing the track. A given {@code Track} is considered to
+ * belong to the particular {@link Sequence} that maintains its timing. For this
+ * reason, a new (empty) track is created by calling the
+ * {@link Sequence#createTrack} method, rather than by directly invoking a
+ * {@code Track} constructor.
  * <p>
- * The <code>Track</code> class provides methods to edit the track by adding
- * or removing <code>MidiEvent</code> objects from it.  These operations keep
- * the event list in the correct time order.  Methods are also
- * included to obtain the track's size, in terms of either the number of events
- * it contains or its duration in ticks.
- *
- * @see Sequencer#setTrackMute
- * @see Sequencer#setTrackSolo
+ * The {@code Track} class provides methods to edit the track by adding or
+ * removing {@code MidiEvent} objects from it. These operations keep the event
+ * list in the correct time order. Methods are also included to obtain the
+ * track's size, in terms of either the number of events it contains or its
+ * duration in ticks.
  *
  * @author Kara Kytle
  * @author Florian Bomers
+ * @see Sequencer#setTrackMute
+ * @see Sequencer#setTrackSolo
  */
 public class Track {
 
@@ -73,10 +72,9 @@
 
     private MidiEvent eotEvent;
 
-
     /**
-     * Package-private constructor.  Constructs a new, empty Track object,
-     * which initially contains one event, the meta-event End of Track.
+     * Package-private constructor. Constructs a new, empty Track object, which
+     * initially contains one event, the meta-event End of Track.
      */
     Track() {
         // start with the end of track event
@@ -87,14 +85,14 @@
     }
 
     /**
-     * Adds a new event to the track.  However, if the event is already
-     * contained in the track, it is not added again.  The list of events
-     * is kept in time order, meaning that this event inserted at the
-     * appropriate place in the list, not necessarily at the end.
+     * Adds a new event to the track. However, if the event is already contained
+     * in the track, it is not added again. The list of events is kept in time
+     * order, meaning that this event inserted at the appropriate place in the
+     * list, not necessarily at the end.
      *
-     * @param event the event to add
-     * @return <code>true</code> if the event did not already exist in the
-     * track and was added, otherwise <code>false</code>
+     * @param  event the event to add
+     * @return {@code true} if the event did not already exist in the track and
+     *         was added, otherwise {@code false}
      */
     public boolean add(MidiEvent event) {
         if (event == null) {
@@ -176,12 +174,12 @@
         return false;
     }
 
-
     /**
      * Removes the specified event from the track.
-     * @param event the event to remove
-     * @return <code>true</code> if the event existed in the track and was removed,
-     * otherwise <code>false</code>
+     *
+     * @param  event the event to remove
+     * @return {@code true} if the event existed in the track and was removed,
+     *         otherwise {@code false}
      */
     public boolean remove(MidiEvent event) {
 
@@ -207,15 +205,14 @@
         return false;
     }
 
-
     /**
      * Obtains the event at the specified index.
-     * @param index the location of the desired event in the event vector
-     * @throws ArrayIndexOutOfBoundsException  if the
-     * specified index is negative or not less than the current size of
-     * this track.
+     *
+     * @param  index the location of the desired event in the event vector
+     * @return the event at the specified index
+     * @throws ArrayIndexOutOfBoundsException if the specified index is negative
+     *         or not less than the current size of this track
      * @see #size
-     * @return the event at the specified index
      */
     public MidiEvent get(int index) throws ArrayIndexOutOfBoundsException {
         try {
@@ -227,9 +224,9 @@
         }
     }
 
-
     /**
      * Obtains the number of events in this track.
+     *
      * @return the size of the track's event vector
      */
     public int size() {
@@ -238,12 +235,12 @@
         }
     }
 
-
     /**
-     * Obtains the length of the track, expressed in MIDI ticks.  (The
-     * duration of a tick in seconds is determined by the timing resolution
-     * of the <code>Sequence</code> containing this track, and also by
-     * the tempo of the music as set by the sequencer.)
+     * Obtains the length of the track, expressed in MIDI ticks. (The duration
+     * of a tick in seconds is determined by the timing resolution of the
+     * {@code Sequence} containing this track, and also by the tempo of the
+     * music as set by the sequencer.)
+     *
      * @return the duration, in ticks
      * @see Sequence#Sequence(float, int)
      * @see Sequencer#setTempoInBPM(float)
@@ -271,5 +268,4 @@
             throw new InvalidMidiDataException("cannot modify end of track message");
         }
     }
-
 }
--- a/src/java.desktop/share/classes/javax/sound/midi/Transmitter.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/Transmitter.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -25,52 +25,49 @@
 
 package javax.sound.midi;
 
-
 /**
- * A <code>Transmitter</code> sends <code>{@link MidiEvent}</code> objects to one or more
- * <code>{@link Receiver Receivers}</code>. Common MIDI transmitters include sequencers
- * and MIDI input ports.
- *
- * @see Receiver
+ * A {@code Transmitter} sends {@link MidiEvent} objects to one or more
+ * {@link Receiver Receivers}. Common MIDI transmitters include sequencers and
+ * MIDI input ports.
  *
  * @author Kara Kytle
+ * @see Receiver
  */
 public interface Transmitter extends AutoCloseable {
 
-
     /**
      * Sets the receiver to which this transmitter will deliver MIDI messages.
      * If a receiver is currently set, it is replaced with this one.
-     * @param receiver the desired receiver.
+     *
+     * @param  receiver the desired receiver
      */
-    public void setReceiver(Receiver receiver);
-
+    void setReceiver(Receiver receiver);
 
     /**
-     * Obtains the current receiver to which this transmitter will deliver MIDI messages.
-     * @return the current receiver.  If no receiver is currently set,
-     * returns <code>null</code>
+     * Obtains the current receiver to which this transmitter will deliver MIDI
+     * messages.
+     *
+     * @return the current receiver. If no receiver is currently set, returns
+     *         {@code null}.
      */
-    public Receiver getReceiver();
-
+    Receiver getReceiver();
 
     /**
      * Indicates that the application has finished using the transmitter, and
      * that limited resources it requires may be released or made available.
-     *
-     * <p>If the creation of this <code>Transmitter</code> resulted in
-     * implicitly opening the underlying device, the device is
-     * implicitly closed by this method. This is true unless the device is
-     * kept open by other <code>Receiver</code> or <code>Transmitter</code>
-     * instances that opened the device implicitly, and unless the device
-     * has been opened explicitly. If the device this
-     * <code>Transmitter</code> is retrieved from is closed explicitly
-     * by calling {@link MidiDevice#close MidiDevice.close}, the
-     * <code>Transmitter</code> is closed, too.  For a detailed
-     * description of open/close behaviour see the class description
-     * of {@link javax.sound.midi.MidiDevice MidiDevice}.
+     * <p>
+     * If the creation of this {@code Transmitter} resulted in implicitly
+     * opening the underlying device, the device is implicitly closed by this
+     * method. This is true unless the device is kept open by other
+     * {@code Receiver} or {@code Transmitter} instances that opened the device
+     * implicitly, and unless the device has been opened explicitly. If the
+     * device this {@code Transmitter} is retrieved from is closed explicitly by
+     * calling {@link MidiDevice#close MidiDevice.close}, the
+     * {@code Transmitter} is closed, too. For a detailed description of
+     * open/close behaviour see the class description of
+     * {@link MidiDevice MidiDevice}.
      *
      * @see javax.sound.midi.MidiSystem#getTransmitter
      */
-    public void close();
+    void close();
 }
--- a/src/java.desktop/share/classes/javax/sound/midi/VoiceStatus.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/VoiceStatus.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2002, 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
@@ -25,93 +25,83 @@
 
 package javax.sound.midi;
 
-
 /**
- * A <code>VoiceStatus</code> object contains information about the current
- * status of one of the voices produced by a {@link Synthesizer}.
+ * A {@code VoiceStatus} object contains information about the current status of
+ * one of the voices produced by a {@link Synthesizer}.
  * <p>
  * MIDI synthesizers are generally capable of producing some maximum number of
- * simultaneous notes, also referred to as voices.  A voice is a stream
- * of successive single notes, and the process of assigning incoming MIDI notes to
- * specific voices is known as voice allocation.
- * However, the voice-allocation algorithm and the contents of each voice are
- * normally internal to a MIDI synthesizer and hidden from outside view.  One can, of
- * course, learn from MIDI messages which notes the synthesizer is playing, and
- * one might be able deduce something about the assignment of notes to voices.
- * But MIDI itself does not provide a means to report which notes a
- * synthesizer has assigned to which voice, nor even to report how many voices
- * the synthesizer is capable of synthesizing.
+ * simultaneous notes, also referred to as voices. A voice is a stream of
+ * successive single notes, and the process of assigning incoming MIDI notes to
+ * specific voices is known as voice allocation. However, the voice-allocation
+ * algorithm and the contents of each voice are normally internal to a MIDI
+ * synthesizer and hidden from outside view. One can, of course, learn from MIDI
+ * messages which notes the synthesizer is playing, and one might be able deduce
+ * something about the assignment of notes to voices. But MIDI itself does not
+ * provide a means to report which notes a synthesizer has assigned to which
+ * voice, nor even to report how many voices the synthesizer is capable of
+ * synthesizing.
  * <p>
- * In Java Sound, however, a
- * <code>Synthesizer</code> class can expose the contents of its voices through its
- * {@link Synthesizer#getVoiceStatus() getVoiceStatus()} method.
- * This behavior is recommended but optional;
- * synthesizers that don't expose their voice allocation simply return a
- * zero-length array. A <code>Synthesizer</code> that does report its voice status
- * should maintain this information at
- * all times for all of its voices, whether they are currently sounding or
- * not.  In other words, a given type of <code>Synthesizer</code> always has a fixed
- * number of voices, equal to the maximum number of simultaneous notes it is
- * capable of sounding.
+ * In Java Sound, however, a {@code Synthesizer} class can expose the contents
+ * of its voices through its
+ * {@link Synthesizer#getVoiceStatus() getVoiceStatus()} method. This behavior
+ * is recommended but optional; synthesizers that don't expose their voice
+ * allocation simply return a zero-length array. A {@code Synthesizer} that does
+ * report its voice status should maintain this information at all times for all
+ * of its voices, whether they are currently sounding or not. In other words, a
+ * given type of {@code Synthesizer} always has a fixed number of voices, equal
+ * to the maximum number of simultaneous notes it is capable of sounding.
  * <p>
- * <A NAME="description_of_active"></A>
- * If the voice is not currently processing a MIDI note, it
- * is considered inactive.  A voice is inactive when it has
- * been given no note-on commands, or when every note-on command received has
- * been terminated by a corresponding note-off (or by an "all notes off"
- * message).  For example, this happens when a synthesizer capable of playing 16
- * simultaneous notes is told to play a four-note chord; only
- * four voices are active in this case (assuming no earlier notes are still playing).
- * Usually, a voice whose status is reported as active is producing audible sound, but this
- * is not always true; it depends on the details of the instrument (that
- * is, the synthesis algorithm) and how long the note has been going on.
- * For example, a voice may be synthesizing the sound of a single hand-clap.  Because
- * this sound dies away so quickly, it may become inaudible before a note-off
- * message is received.  In such a situation, the voice is still considered active
- * even though no sound is currently being produced.
+ * <a NAME="description_of_active"></a> If the voice is not currently processing
+ * a MIDI note, it is considered inactive. A voice is inactive when it has been
+ * given no note-on commands, or when every note-on command received has been
+ * terminated by a corresponding note-off (or by an "all notes off" message).
+ * For example, this happens when a synthesizer capable of playing 16
+ * simultaneous notes is told to play a four-note chord; only four voices are
+ * active in this case (assuming no earlier notes are still playing). Usually, a
+ * voice whose status is reported as active is producing audible sound, but this
+ * is not always true; it depends on the details of the instrument (that is, the
+ * synthesis algorithm) and how long the note has been going on. For example, a
+ * voice may be synthesizing the sound of a single hand-clap. Because this sound
+ * dies away so quickly, it may become inaudible before a note-off message is
+ * received. In such a situation, the voice is still considered active even
+ * though no sound is currently being produced.
  * <p>
- * Besides its active or inactive status, the <code>VoiceStatus</code> class
- * provides fields that reveal the voice's current MIDI channel, bank and
- * program number, MIDI note number, and MIDI volume.  All of these can
- * change during the course of a voice.  While the voice is inactive, each
- * of these fields has an unspecified value, so you should check the active
- * field first.
- *
- * @see Synthesizer#getMaxPolyphony
- * @see Synthesizer#getVoiceStatus
+ * Besides its active or inactive status, the {@code VoiceStatus} class provides
+ * fields that reveal the voice's current MIDI channel, bank and program number,
+ * MIDI note number, and MIDI volume. All of these can change during the course
+ * of a voice. While the voice is inactive, each of these fields has an
+ * unspecified value, so you should check the active field first.
  *
  * @author David Rivas
  * @author Kara Kytle
+ * @see Synthesizer#getMaxPolyphony
+ * @see Synthesizer#getVoiceStatus
  */
-
 public class VoiceStatus {
 
-
     /**
-     * Indicates whether the voice is currently processing a MIDI note.
-     * See the explanation of
-     * <A HREF="#description_of_active">active and inactive voices</A>.
+     * Indicates whether the voice is currently processing a MIDI note. See the
+     * explanation of
+     * <a HREF="#description_of_active">active and inactive voices</a>.
      */
     public boolean active = false;
 
-
     /**
-     * The MIDI channel on which this voice is playing.  The value is a
-     * zero-based channel number if the voice is active, or
-     * unspecified if the voice is inactive.
+     * The MIDI channel on which this voice is playing. The value is a
+     * zero-based channel number if the voice is active, or unspecified if the
+     * voice is inactive.
      *
      * @see MidiChannel
      * @see #active
      */
     public int channel = 0;
 
-
     /**
      * The bank number of the instrument that this voice is currently using.
      * This is a number dictated by the MIDI bank-select message; it does not
-     * refer to a <code>SoundBank</code> object.
-     * The value ranges from 0 to 16383 if the voice is active, and is
-     * unspecified if the voice is inactive.
+     * refer to a {@code SoundBank} object. The value ranges from 0 to 16383 if
+     * the voice is active, and is unspecified if the voice is inactive.
+     *
      * @see Patch
      * @see Soundbank
      * @see #active
@@ -119,11 +109,10 @@
      */
     public int bank = 0;
 
-
     /**
      * The program number of the instrument that this voice is currently using.
-     * The value ranges from 0 to 127 if the voice is active, and is
-     * unspecified if the voice is inactive.
+     * The value ranges from 0 to 127 if the voice is active, and is unspecified
+     * if the voice is inactive.
      *
      * @see MidiChannel#getProgram
      * @see Patch
@@ -131,28 +120,24 @@
      */
     public int program = 0;
 
-
     /**
-     * The MIDI note that this voice is playing.  The range for an active voice
-     * is from 0 to 127 in semitones, with 60 referring to Middle C.
-     * The value is unspecified if the voice is inactive.
+     * The MIDI note that this voice is playing. The range for an active voice
+     * is from 0 to 127 in semitones, with 60 referring to Middle C. The value
+     * is unspecified if the voice is inactive.
      *
      * @see MidiChannel#noteOn
      * @see #active
      */
     public int note = 0;
 
-
     /**
-     * The current MIDI volume level for the voice.
-     * The value ranges from 0 to 127 if the voice is active, and is
-     * unspecified if the voice is inactive.
+     * The current MIDI volume level for the voice. The value ranges from 0 to
+     * 127 if the voice is active, and is unspecified if the voice is inactive.
      * <p>
-     * Note that this value does not necessarily reflect
-     * the instantaneous level of the sound produced by this
-     * voice; that level is the result of  many contributing
-     * factors, including the current instrument and the
-     * shape of the amplitude envelope it produces.
+     * Note that this value does not necessarily reflect the instantaneous level
+     * of the sound produced by this voice; that level is the result of many
+     * contributing factors, including the current instrument and the shape of
+     * the amplitude envelope it produces.
      *
      * @see #active
      */
--- a/src/java.desktop/share/classes/javax/sound/midi/spi/MidiFileReader.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/spi/MidiFileReader.java	Thu Aug 28 14:54:07 2014 -0700
@@ -26,13 +26,13 @@
 package javax.sound.midi.spi;
 
 import java.io.File;
+import java.io.IOException;
 import java.io.InputStream;
-import java.io.IOException;
 import java.net.URL;
 
+import javax.sound.midi.InvalidMidiDataException;
 import javax.sound.midi.MidiFileFormat;
 import javax.sound.midi.Sequence;
-import javax.sound.midi.InvalidMidiDataException;
 
 /**
  * A {@code MidiFileReader} supplies MIDI file-reading services. Classes
@@ -106,7 +106,7 @@
      * @param  stream the input stream from which the {@code Sequence} should
      *         be constructed
      * @return a {@code Sequence} object based on the MIDI file data contained
-     *         in the input stream.
+     *         in the input stream
      * @throws InvalidMidiDataException if the stream does not point to valid
      *         MIDI file data recognized by the system
      * @throws IOException if an I/O exception occurs
--- a/src/java.desktop/share/classes/javax/sound/midi/spi/SoundbankReader.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/midi/spi/SoundbankReader.java	Thu Aug 28 14:54:07 2014 -0700
@@ -32,12 +32,12 @@
 
 import javax.sound.midi.InvalidMidiDataException;
 import javax.sound.midi.Soundbank;
+import javax.sound.midi.Synthesizer;
 
 /**
  * A {@code SoundbankReader} supplies soundbank file-reading services. Concrete
  * subclasses of {@code SoundbankReader} parse a given soundbank file, producing
- * a {@link javax.sound.midi.Soundbank} object that can be loaded into a
- * {@link javax.sound.midi.Synthesizer}.
+ * a {@link Soundbank} object that can be loaded into a {@link Synthesizer}.
  *
  * @since 1.3
  * @author Kara Kytle
@@ -47,7 +47,7 @@
     /**
      * Obtains a soundbank object from the URL provided.
      *
-     * @param  url URL representing the soundbank.
+     * @param  url URL representing the soundbank
      * @return soundbank object
      * @throws InvalidMidiDataException if the URL does not point to valid MIDI
      *         soundbank data recognized by this soundbank reader
--- a/src/java.desktop/share/classes/javax/sound/sampled/AudioSystem.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/sampled/AudioSystem.java	Thu Aug 28 14:54:07 2014 -0700
@@ -26,19 +26,19 @@
 package javax.sound.sampled;
 
 import java.io.File;
+import java.io.IOException;
 import java.io.InputStream;
-import java.io.IOException;
 import java.io.OutputStream;
 import java.net.URL;
-
+import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Properties;
 import java.util.Set;
 import java.util.Vector;
-import java.util.ArrayList;
 
+import javax.sound.sampled.spi.AudioFileReader;
 import javax.sound.sampled.spi.AudioFileWriter;
-import javax.sound.sampled.spi.AudioFileReader;
 import javax.sound.sampled.spi.FormatConversionProvider;
 import javax.sound.sampled.spi.MixerProvider;
 
@@ -60,14 +60,14 @@
  * <p>
  * Properties can be used to specify the default mixer for specific line types.
  * Both system properties and a properties file are considered. The
- * {@code sound.properties} properties file is read from an
- * implementation-specific location (typically it is the {@code lib} directory
- * in the Java installation directory). If a property exists both as a system
- * property and in the properties file, the system property takes precedence.
- * If none is specified, a suitable default is chosen among the available
- * devices. The syntax of the properties file is specified in
- * {@link java.util.Properties#load(InputStream) Properties.load}. The following
- * table lists the available property keys and which methods consider them:
+ * "sound.properties" properties file is read from an implementation-specific
+ * location (typically it is the {@code lib} directory in the Java installation
+ * directory). If a property exists both as a system property and in the
+ * properties file, the system property takes precedence. If none is specified,
+ * a suitable default is chosen among the available devices. The syntax of the
+ * properties file is specified in
+ * {@link Properties#load(InputStream) Properties.load}. The following table
+ * lists the available property keys and which methods consider them:
  *
  * <table border=0>
  *  <caption>Audio System Property Keys</caption>
@@ -100,12 +100,11 @@
  *
  * The property value consists of the provider class name and the mixer name,
  * separated by the hash mark (&quot;#&quot;). The provider class name is the
- * fully-qualified name of a concrete
- * {@link javax.sound.sampled.spi.MixerProvider mixer provider} class. The mixer
- * name is matched against the {@code String} returned by the {@code getName}
- * method of {@code Mixer.Info}. Either the class name, or the mixer name may be
- * omitted. If only the class name is specified, the trailing hash mark is
- * optional.
+ * fully-qualified name of a concrete {@link MixerProvider mixer provider}
+ * class. The mixer name is matched against the {@code String} returned by the
+ * {@code getName} method of {@code Mixer.Info}. Either the class name, or the
+ * mixer name may be omitted. If only the class name is specified, the trailing
+ * hash mark is optional.
  * <p>
  * If the provider class is specified, and it can be successfully retrieved from
  * the installed providers, the list of {@code Mixer.Info} objects is retrieved
@@ -1324,10 +1323,9 @@
      * Obtains the set of format converters (codecs, transcoders, etc.) that are
      * currently installed on the system.
      *
-     * @return an array of {@link javax.sound.sampled.spi.FormatConversionProvider
-     *         FormatConversionProvider} objects representing the available
-     *         format converters. If no format converters readers are available
-     *         on the system, an array of length 0 is returned.
+     * @return an array of {@link FormatConversionProvider} objects representing
+     *         the available format converters. If no format converters readers
+     *         are available on the system, an array of length 0 is returned.
      */
     @SuppressWarnings("unchecked")
     private static List<FormatConversionProvider> getFormatConversionProviders() {
@@ -1338,10 +1336,9 @@
      * Obtains the set of audio file readers that are currently installed on the
      * system.
      *
-     * @return a List of {@link javax.sound.sampled.spi.AudioFileReader
-     *         AudioFileReader} objects representing the installed audio file
-     *         readers. If no audio file readers are available on the system, an
-     *         empty List is returned.
+     * @return a List of {@link AudioFileReader} objects representing the
+     *         installed audio file readers. If no audio file readers are
+     *         available on the system, an empty List is returned.
      */
     @SuppressWarnings("unchecked")
     private static List<AudioFileReader> getAudioFileReaders() {
@@ -1352,10 +1349,9 @@
      * Obtains the set of audio file writers that are currently installed on the
      * system.
      *
-     * @return a List of {@link javax.sound.sampled.spi.AudioFileWriter
-     *         AudioFileWriter} objects representing the available audio file
-     *         writers. If no audio file writers are available on the system, an
-     *         empty List is returned.
+     * @return a List of {@link AudioFileWriter} objects representing the
+     *         available audio file writers. If no audio file writers are
+     *         available on the system, an empty List is returned.
      */
     @SuppressWarnings("unchecked")
     private static List<AudioFileWriter> getAudioFileWriters() {
--- a/src/java.desktop/share/classes/javax/sound/sampled/DataLine.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/sampled/DataLine.java	Thu Aug 28 14:54:07 2014 -0700
@@ -355,11 +355,11 @@
          * {@code true} for all formats returned by {@code getFormats()}.
          * <p>
          * Some fields in the AudioFormat instances can be set to
-         * {@link javax.sound.sampled.AudioSystem#NOT_SPECIFIED NOT_SPECIFIED}
-         * if that field does not apply to the format, or if the format supports
-         * a wide range of values for that field. For example, a multi-channel
-         * device supporting up to 64 channels, could set the channel field in
-         * the {@code AudioFormat} instances returned by this method to
+         * {@link AudioSystem#NOT_SPECIFIED NOT_SPECIFIED} if that field does
+         * not apply to the format, or if the format supports a wide range of
+         * values for that field. For example, a multi-channel device supporting
+         * up to 64 channels, could set the channel field in the
+         * {@code AudioFormat} instances returned by this method to
          * {@code NOT_SPECIFIED}.
          *
          * @return a set of supported audio formats
--- a/src/java.desktop/share/classes/javax/sound/sampled/spi/AudioFileReader.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/sampled/spi/AudioFileReader.java	Thu Aug 28 14:54:07 2014 -0700
@@ -26,8 +26,8 @@
 package javax.sound.sampled.spi;
 
 import java.io.File;
+import java.io.IOException;
 import java.io.InputStream;
-import java.io.IOException;
 import java.net.URL;
 
 import javax.sound.sampled.AudioFileFormat;
--- a/src/java.desktop/share/classes/javax/sound/sampled/spi/AudioFileWriter.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/sound/sampled/spi/AudioFileWriter.java	Thu Aug 28 14:54:07 2014 -0700
@@ -30,6 +30,7 @@
 import java.io.OutputStream;
 
 import javax.sound.sampled.AudioInputStream;
+import javax.sound.sampled.AudioSystem;
 
 import static javax.sound.sampled.AudioFileFormat.Type;
 
@@ -110,8 +111,7 @@
      * the length be written into the file header, and cannot be written from
      * start to finish unless the length is known in advance. An attempt to
      * write such a file type will fail with an IOException if the length in the
-     * audio file format is {@link javax.sound.sampled.AudioSystem#NOT_SPECIFIED
-     * AudioSystem.NOT_SPECIFIED}.
+     * audio file format is {@link AudioSystem#NOT_SPECIFIED}.
      *
      * @param  stream the audio input stream containing audio data to be written
      *         to the output stream
--- a/src/java.desktop/share/classes/javax/swing/CellEditor.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/CellEditor.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2005, 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
@@ -47,7 +47,7 @@
  * new component implement the interface.  Or the developer can
  * choose a wrapper based approach and provide a companion object which
  * implements the <code>CellEditor</code> interface (See
- * <code>JCellEditor</code> for example).  The wrapper approach
+ * <code>DefaultCellEditor</code> for example).  The wrapper approach
  * is particularly useful if the user want to use a 3rd party ISV
  * editor with <code>JTable</code>, but the ISV didn't implement the
  * <code>CellEditor</code> interface.  The user can simply create an object
--- a/src/java.desktop/share/classes/javax/swing/ImageIcon.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/ImageIcon.java	Thu Aug 28 14:54:07 2014 -0700
@@ -490,12 +490,33 @@
     private void readObject(ObjectInputStream s)
         throws ClassNotFoundException, IOException
     {
-        s.defaultReadObject();
+        ObjectInputStream.GetField f = s.readFields();
+
+        imageObserver = (ImageObserver) f.get("imageObserver", null);
+        description = (String) f.get("description", null);
+        width = f.get("width", -1);
+        height = f.get("height", -1);
+        accessibleContext = (AccessibleImageIcon) f.get("accessibleContext", null);
 
         int w = s.readInt();
         int h = s.readInt();
         int[] pixels = (int[])(s.readObject());
 
+        if (pixels == null && (w != -1 || h != -1)) {
+            throw new IllegalStateException("Inconsistent width and height"
+                    + " for null image [" + w + ", " + h + "]");
+        }
+
+        if (pixels != null && (w < 0 || h < 0)) {
+            throw new IllegalStateException("Inconsistent width and height"
+                    + " for image [" + w + ", " + h + "]");
+        }
+
+        if (w != getIconWidth() || h != getIconHeight()) {
+            throw new IllegalStateException("Inconsistent width and height"
+                    + " for image [" + w + ", " + h + "]");
+        }
+
         if (pixels != null) {
             Toolkit tk = Toolkit.getDefaultToolkit();
             ColorModel cm = ColorModel.getRGBdefault();
--- a/src/java.desktop/share/classes/javax/swing/JComponent.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/JComponent.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1888,7 +1888,7 @@
      *   description: The preferred vertical alignment of the component.
      */
     public void setAlignmentY(float alignmentY) {
-        this.alignmentY = alignmentY > 1.0f ? 1.0f : alignmentY < 0.0f ? 0.0f : alignmentY;
+        this.alignmentY = validateAlignment(alignmentY);
         isAlignmentYSet = true;
     }
 
@@ -1917,10 +1917,14 @@
      *   description: The preferred horizontal alignment of the component.
      */
     public void setAlignmentX(float alignmentX) {
-        this.alignmentX = alignmentX > 1.0f ? 1.0f : alignmentX < 0.0f ? 0.0f : alignmentX;
+        this.alignmentX = validateAlignment(alignmentX);
         isAlignmentXSet = true;
     }
 
+    private float validateAlignment(float alignment) {
+        return alignment > 1.0f ? 1.0f : alignment < 0.0f ? 0.0f : alignment;
+    }
+
     /**
      * Sets the input verifier for this component.
      *
@@ -5514,7 +5518,24 @@
     private void readObject(ObjectInputStream s)
         throws IOException, ClassNotFoundException
     {
-        s.defaultReadObject();
+        ObjectInputStream.GetField f = s.readFields();
+
+        isAlignmentXSet = f.get("isAlignmentXSet", false);
+        alignmentX = validateAlignment(f.get("alignmentX", 0f));
+        isAlignmentYSet = f.get("isAlignmentYSet", false);
+        alignmentY = validateAlignment(f.get("alignmentY", 0f));
+        listenerList = (EventListenerList) f.get("listenerList", null);
+        vetoableChangeSupport = (VetoableChangeSupport) f.get("vetoableChangeSupport", null);
+        autoscrolls = f.get("autoscrolls", false);
+        border = (Border) f.get("border", null);
+        flags = f.get("flags", 0);
+        inputVerifier = (InputVerifier) f.get("inputVerifier", null);
+        verifyInputWhenFocusTarget = f.get("verifyInputWhenFocusTarget", false);
+        popupMenu = (JPopupMenu) f.get("popupMenu", null);
+        focusInputMap = (InputMap) f.get("focusInputMap", null);
+        ancestorInputMap = (InputMap) f.get("ancestorInputMap", null);
+        windowInputMap = (ComponentInputMap) f.get("windowInputMap", null);
+        actionMap = (ActionMap) f.get("actionMap", null);
 
         /* If there's no ReadObjectCallback for this stream yet, that is, if
          * this is the first call to JComponent.readObject() for this
--- a/src/java.desktop/share/classes/javax/swing/JFileChooser.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/JFileChooser.java	Thu Aug 28 14:54:07 2014 -0700
@@ -50,6 +50,8 @@
 import java.awt.event.*;
 import java.beans.PropertyChangeListener;
 import java.beans.PropertyChangeEvent;
+import java.io.InvalidObjectException;
+import java.io.ObjectInputStream;
 import java.lang.ref.WeakReference;
 
 /**
@@ -460,10 +462,14 @@
      *        bound: false
      */
     public void setDragEnabled(boolean b) {
+        checkDragEnabled(b);
+        dragEnabled = b;
+    }
+
+    private static void checkDragEnabled(boolean b) {
         if (b && GraphicsEnvironment.isHeadless()) {
             throw new HeadlessException();
         }
-        dragEnabled = b;
     }
 
     /**
@@ -949,9 +955,7 @@
         if(this.dialogType == dialogType) {
             return;
         }
-        if(!(dialogType == OPEN_DIALOG || dialogType == SAVE_DIALOG || dialogType == CUSTOM_DIALOG)) {
-            throw new IllegalArgumentException("Incorrect Dialog Type: " + dialogType);
-        }
+        checkDialogType(dialogType);
         int oldValue = this.dialogType;
         this.dialogType = dialogType;
         if(dialogType == OPEN_DIALOG || dialogType == SAVE_DIALOG) {
@@ -960,6 +964,14 @@
         firePropertyChange(DIALOG_TYPE_CHANGED_PROPERTY, oldValue, dialogType);
     }
 
+    private static void checkDialogType(int dialogType) {
+        if (!(dialogType == OPEN_DIALOG || dialogType == SAVE_DIALOG
+                || dialogType == CUSTOM_DIALOG)) {
+            throw new IllegalArgumentException(
+                    "Incorrect Dialog Type: " + dialogType);
+        }
+    }
+
     /**
      * Sets the string that goes in the <code>JFileChooser</code> window's
      * title bar.
@@ -1349,12 +1361,17 @@
             return;
         }
 
-        if ((mode == FILES_ONLY) || (mode == DIRECTORIES_ONLY) || (mode == FILES_AND_DIRECTORIES)) {
+        checkFileSelectionMode(mode);
            int oldValue = fileSelectionMode;
            fileSelectionMode = mode;
            firePropertyChange(FILE_SELECTION_MODE_CHANGED_PROPERTY, oldValue, fileSelectionMode);
-        } else {
-           throw new IllegalArgumentException("Incorrect Mode for file selection: " + mode);
+    }
+
+    private static void checkFileSelectionMode(int mode) {
+        if ((mode != FILES_ONLY) && (mode != DIRECTORIES_ONLY)
+                && (mode != FILES_AND_DIRECTORIES)) {
+            throw new IllegalArgumentException(
+                    "Incorrect Mode for file selection: " + mode);
         }
     }
 
@@ -1901,7 +1918,43 @@
      */
     private void readObject(java.io.ObjectInputStream in)
             throws IOException, ClassNotFoundException {
-        in.defaultReadObject();
+        ObjectInputStream.GetField f = in.readFields();
+
+        dialogTitle = (String) f.get("dialogTitle", null);
+        approveButtonText = (String) f.get("approveButtonText", null);
+        approveButtonToolTipText =
+                (String) f.get("approveButtonToolTipText", null);
+        approveButtonMnemonic = f.get("approveButtonMnemonic", 0);
+        @SuppressWarnings("unchecked")
+        Vector<FileFilter> newFilters = (Vector<FileFilter>) f.get("filters", null);
+        if (newFilters == null) {
+            throw new InvalidObjectException("Null filters");
+        }
+        filters = newFilters;
+        dialog = (JDialog) f.get("dialog", null);
+        int newDialogType = f.get("dialogType", OPEN_DIALOG);
+        checkDialogType(newDialogType);
+        dialogType = newDialogType;
+        returnValue = f.get("returnValue", 0);
+        accessory = (JComponent) f.get("accessory", null);
+        fileView = (FileView) f.get("fileView", null);
+        controlsShown = f.get("controlsShown", false);
+        useFileHiding = f.get("useFileHiding", false);
+        int newFileSelectionMode = f.get("fileSelectionMode", FILES_ONLY);
+        checkFileSelectionMode(newFileSelectionMode);
+        fileSelectionMode = newFileSelectionMode;
+        multiSelectionEnabled = f.get("multiSelectionEnabled", false);
+        useAcceptAllFileFilter = f.get("useAcceptAllFileFilter", false);
+        boolean newDragEnabled = f.get("dragEnabled", false);
+        checkDragEnabled(newDragEnabled);
+        dragEnabled = newDragEnabled;
+        fileFilter = (FileFilter) f.get("fileFilter", null);
+        fileSystemView = (FileSystemView) f.get("fileSystemView", null);
+        currentDirectory = (File) f.get("currentDirectory", null);
+        selectedFile = (File) f.get("selectedFile", null);
+        selectedFiles = (File[]) f.get("selectedFiles", null);
+        accessibleContext = (AccessibleContext) f.get("accessibleContext", null);
+
         installShowFilesListener();
     }
 
--- a/src/java.desktop/share/classes/javax/swing/JFrame.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/JFrame.java	Thu Aug 28 14:54:07 2014 -0700
@@ -24,14 +24,22 @@
  */
 package javax.swing;
 
-import java.awt.*;
-import java.awt.event.*;
-import java.beans.PropertyChangeListener;
-import java.util.Locale;
-import java.util.Vector;
-import java.io.Serializable;
+import java.awt.AWTEvent;
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Frame;
+import java.awt.Graphics;
+import java.awt.GraphicsConfiguration;
+import java.awt.HeadlessException;
+import java.awt.Image;
+import java.awt.LayoutManager;
+import java.awt.event.WindowEvent;
 
-import javax.accessibility.*;
+import javax.accessibility.Accessible;
+import javax.accessibility.AccessibleContext;
+import javax.accessibility.AccessibleState;
+import javax.accessibility.AccessibleStateSet;
 
 
 /**
@@ -297,33 +305,28 @@
      * @see    #setDefaultCloseOperation
      * @see    java.awt.Window#processWindowEvent
      */
-    protected void processWindowEvent(WindowEvent e) {
+    protected void processWindowEvent(final WindowEvent e) {
         super.processWindowEvent(e);
 
         if (e.getID() == WindowEvent.WINDOW_CLOSING) {
-            switch(defaultCloseOperation) {
-              case HIDE_ON_CLOSE:
-                 setVisible(false);
-                 break;
-              case DISPOSE_ON_CLOSE:
-                 dispose();
-                 break;
-              case DO_NOTHING_ON_CLOSE:
-                 default:
-                 break;
-              case EXIT_ON_CLOSE:
-                  // This needs to match the checkExit call in
-                  // setDefaultCloseOperation
-                System.exit(0);
-                break;
+            switch (defaultCloseOperation) {
+                case HIDE_ON_CLOSE:
+                    setVisible(false);
+                    break;
+                case DISPOSE_ON_CLOSE:
+                    dispose();
+                    break;
+                case EXIT_ON_CLOSE:
+                    // This needs to match the checkExit call in
+                    // setDefaultCloseOperation
+                    System.exit(0);
+                    break;
+                case DO_NOTHING_ON_CLOSE:
+                default:
             }
         }
     }
 
-//    public void setMenuBar(MenuBar menu) {
-//        throw new IllegalComponentStateException("Please use setJMenuBar() with JFrame.");
-//    }
-
     /**
      * Sets the operation that will happen by default when
      * the user initiates a "close" on this frame.
--- a/src/java.desktop/share/classes/javax/swing/JLayer.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/JLayer.java	Thu Aug 28 14:54:07 2014 -0700
@@ -158,8 +158,9 @@
     private LayerUI<? super V> layerUI;
     private JPanel glassPane;
     private long eventMask;
-    private transient boolean isPainting;
-    private transient boolean isPaintingImmediately;
+    private transient boolean isPaintCalling;
+    private transient boolean isPaintImmediatelyCalling;
+    private transient boolean isImageUpdateCalling;
 
     private static final LayerEventController eventController =
             new LayerEventController();
@@ -405,12 +406,12 @@
      * @param h  the height of the region to be painted
      */
     public void paintImmediately(int x, int y, int w, int h) {
-        if (!isPaintingImmediately && getUI() != null) {
-            isPaintingImmediately = true;
+        if (!isPaintImmediatelyCalling && getUI() != null) {
+            isPaintImmediatelyCalling = true;
             try {
                 getUI().paintImmediately(x, y, w, h, this);
             } finally {
-                isPaintingImmediately = false;
+                isPaintImmediatelyCalling = false;
             }
         } else {
             super.paintImmediately(x, y, w, h);
@@ -418,17 +419,44 @@
     }
 
     /**
+     * Delegates its functionality to the
+     * {@link javax.swing.plaf.LayerUI#imageUpdate(java.awt.Image, int, int, int, int, int, JLayer)} method,
+     * if the {@code LayerUI} is set.
+     *
+     * @param     img   the image being observed
+     * @param     infoflags   see {@code imageUpdate} for more information
+     * @param     x   the <i>x</i> coordinate
+     * @param     y   the <i>y</i> coordinate
+     * @param     w   the width
+     * @param     h   the height
+     * @return    {@code false} if the infoflags indicate that the
+     *            image is completely loaded; {@code true} otherwise.
+     */
+    public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h) {
+        if (!isImageUpdateCalling && getUI() != null) {
+            isImageUpdateCalling = true;
+            try {
+                return getUI().imageUpdate(img, infoflags, x, y, w, h, this);
+            } finally {
+                isImageUpdateCalling = false;
+            }
+        } else {
+            return super.imageUpdate(img, infoflags, x, y, w, h);
+        }
+    }
+
+    /**
      * Delegates all painting to the {@link javax.swing.plaf.LayerUI} object.
      *
      * @param g the {@code Graphics} to render to
      */
     public void paint(Graphics g) {
-        if (!isPainting) {
-            isPainting = true;
+        if (!isPaintCalling) {
+            isPaintCalling = true;
             try {
                 super.paintComponent(g);
             } finally {
-                isPainting = false;
+                isPaintCalling = false;
             }
         } else {
             super.paint(g);
@@ -646,15 +674,21 @@
         return 1;
     }
 
+    @SuppressWarnings("unchecked")
     private void readObject(ObjectInputStream s)
             throws IOException, ClassNotFoundException {
-        s.defaultReadObject();
-        if (layerUI != null) {
-            setUI(layerUI);
-        }
+        ObjectInputStream.GetField f = s.readFields();
+
+        view = (V) f.get("view", null);
+        glassPane = (JPanel) f.get("glassPane", null);
+        eventMask = f.get("eventMask", 0l);
         if (eventMask != 0) {
             eventController.updateAWTEventListener(0, eventMask);
         }
+        LayerUI<V> newLayerUI = (LayerUI<V>) f.get("layerUI", null);
+        if (newLayerUI != null) {
+            setUI(newLayerUI);
+        }
     }
 
     /**
--- a/src/java.desktop/share/classes/javax/swing/JOptionPane.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/JOptionPane.java	Thu Aug 28 14:54:07 2014 -0700
@@ -43,13 +43,10 @@
 import java.awt.event.ComponentAdapter;
 import java.awt.event.ComponentEvent;
 import java.io.IOException;
+import java.io.InvalidObjectException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
-import java.lang.reflect.Method;
-import java.lang.reflect.InvocationTargetException;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
 import java.util.Vector;
 import javax.swing.plaf.OptionPaneUI;
 import javax.swing.event.InternalFrameEvent;
@@ -2055,15 +2052,22 @@
      * description: The option pane's message type.
      */
     public void setMessageType(int newType) {
+        checkMessageType(newType);
+        int           oldType = messageType;
+        messageType = newType;
+        firePropertyChange(MESSAGE_TYPE_PROPERTY, oldType, messageType);
+    }
+
+    private static void checkMessageType(int newType){
         if(newType != ERROR_MESSAGE && newType != INFORMATION_MESSAGE &&
            newType != WARNING_MESSAGE && newType != QUESTION_MESSAGE &&
            newType != PLAIN_MESSAGE)
-            throw new RuntimeException("JOptionPane: type must be one of JOptionPane.ERROR_MESSAGE, JOptionPane.INFORMATION_MESSAGE, JOptionPane.WARNING_MESSAGE, JOptionPane.QUESTION_MESSAGE or JOptionPane.PLAIN_MESSAGE");
-
-        int           oldType = messageType;
-
-        messageType = newType;
-        firePropertyChange(MESSAGE_TYPE_PROPERTY, oldType, messageType);
+            throw new RuntimeException("JOptionPane: type must be one of"
+                    + " JOptionPane.ERROR_MESSAGE,"
+                    + " JOptionPane.INFORMATION_MESSAGE,"
+                    + " JOptionPane.WARNING_MESSAGE,"
+                    + " JOptionPane.QUESTION_MESSAGE"
+                    + " or JOptionPane.PLAIN_MESSAGE");
     }
 
     /**
@@ -2097,16 +2101,23 @@
      * description: The option pane's option type.
       */
     public void setOptionType(int newType) {
-        if(newType != DEFAULT_OPTION && newType != YES_NO_OPTION &&
-           newType != YES_NO_CANCEL_OPTION && newType != OK_CANCEL_OPTION)
-            throw new RuntimeException("JOptionPane: option type must be one of JOptionPane.DEFAULT_OPTION, JOptionPane.YES_NO_OPTION, JOptionPane.YES_NO_CANCEL_OPTION or JOptionPane.OK_CANCEL_OPTION");
-
+        checkOptionType(newType);
         int            oldType = optionType;
-
         optionType = newType;
         firePropertyChange(OPTION_TYPE_PROPERTY, oldType, optionType);
     }
 
+    private static void checkOptionType(int newType) {
+        if (newType != DEFAULT_OPTION && newType != YES_NO_OPTION
+                && newType != YES_NO_CANCEL_OPTION
+                && newType != OK_CANCEL_OPTION) {
+            throw new RuntimeException("JOptionPane: option type must be one of"
+                    + " JOptionPane.DEFAULT_OPTION, JOptionPane.YES_NO_OPTION,"
+                    + " JOptionPane.YES_NO_CANCEL_OPTION"
+                    + " or JOptionPane.OK_CANCEL_OPTION");
+        }
+    }
+
     /**
      * Returns the type of options that are displayed.
      *
@@ -2385,7 +2396,15 @@
 
     private void readObject(ObjectInputStream s)
         throws IOException, ClassNotFoundException {
-        s.defaultReadObject();
+        ObjectInputStream.GetField f = s.readFields();
+
+        int newMessageType = f.get("messageType", 0);
+        checkMessageType(newMessageType);
+        messageType = newMessageType;
+        int newOptionType = f.get("optionType", 0);
+        checkOptionType(newOptionType);
+        optionType = newOptionType;
+        wantsInput = f.get("wantsInput", false);
 
         Vector<?>       values = (Vector)s.readObject();
         int             indexCounter = 0;
--- a/src/java.desktop/share/classes/javax/swing/JPopupMenu.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/JPopupMenu.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1345,7 +1345,20 @@
     // implements javax.swing.MenuElement
     private void readObject(ObjectInputStream s)
         throws IOException, ClassNotFoundException {
-        s.defaultReadObject();
+        ObjectInputStream.GetField f = s.readFields();
+
+        int newDesiredLocationX = f.get("desiredLocationX", 0);
+        int newDesiredLocationY = f.get("desiredLocationY", 0);
+        Point p = adjustPopupLocationToFitScreen(
+                newDesiredLocationX, newDesiredLocationY);
+        desiredLocationX = p.x;
+        desiredLocationY = p.y;
+
+        label = (String) f.get("label", null);
+        paintBorder = f.get("paintBorder", false);
+        margin = (Insets) f.get("margin", null);
+        lightWeightPopup = f.get("lightWeightPopup", false);
+        selectionModel = (SingleSelectionModel) f.get("selectionModel", null);
 
         Vector<?>          values = (Vector)s.readObject();
         int             indexCounter = 0;
--- a/src/java.desktop/share/classes/javax/swing/JTabbedPane.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/JTabbedPane.java	Thu Aug 28 14:54:07 2014 -0700
@@ -495,10 +495,7 @@
      *
      */
     public void setTabPlacement(int tabPlacement) {
-        if (tabPlacement != TOP && tabPlacement != LEFT &&
-            tabPlacement != BOTTOM && tabPlacement != RIGHT) {
-            throw new IllegalArgumentException("illegal tab placement: must be TOP, BOTTOM, LEFT, or RIGHT");
-        }
+        checkTabPlacement(tabPlacement);
         if (this.tabPlacement != tabPlacement) {
             int oldValue = this.tabPlacement;
             this.tabPlacement = tabPlacement;
@@ -508,6 +505,14 @@
         }
     }
 
+    private static void checkTabPlacement(int tabPlacement) {
+        if (tabPlacement != TOP && tabPlacement != LEFT &&
+            tabPlacement != BOTTOM && tabPlacement != RIGHT) {
+            throw new IllegalArgumentException("illegal tab placement:"
+                    + " must be TOP, BOTTOM, LEFT, or RIGHT");
+        }
+    }
+
     /**
      * Returns the policy used by the tabbedpane to layout the tabs when all the
      * tabs will not fit within a single run.
@@ -551,9 +556,7 @@
      *
      */
     public void setTabLayoutPolicy(int tabLayoutPolicy) {
-        if (tabLayoutPolicy != WRAP_TAB_LAYOUT && tabLayoutPolicy != SCROLL_TAB_LAYOUT) {
-            throw new IllegalArgumentException("illegal tab layout policy: must be WRAP_TAB_LAYOUT or SCROLL_TAB_LAYOUT");
-        }
+        checkTabLayoutPolicy(tabLayoutPolicy);
         if (this.tabLayoutPolicy != tabLayoutPolicy) {
             int oldValue = this.tabLayoutPolicy;
             this.tabLayoutPolicy = tabLayoutPolicy;
@@ -563,6 +566,14 @@
         }
     }
 
+    private static void checkTabLayoutPolicy(int tabLayoutPolicy) {
+        if (tabLayoutPolicy != WRAP_TAB_LAYOUT
+                && tabLayoutPolicy != SCROLL_TAB_LAYOUT) {
+            throw new IllegalArgumentException("illegal tab layout policy:"
+                    + " must be WRAP_TAB_LAYOUT or SCROLL_TAB_LAYOUT");
+        }
+    }
+
     /**
      * Returns the currently selected index for this tabbedpane.
      * Returns -1 if there is no currently selected tab.
@@ -1816,7 +1827,19 @@
     private void readObject(ObjectInputStream s)
         throws IOException, ClassNotFoundException
     {
-        s.defaultReadObject();
+        ObjectInputStream.GetField f = s.readFields();
+
+        int newTabPlacement = f.get("tabPlacement", TOP);
+        checkTabPlacement(newTabPlacement);
+        tabPlacement = newTabPlacement;
+        int newTabLayoutPolicy = f.get("tabLayoutPolicy", 0);
+        checkTabLayoutPolicy(newTabLayoutPolicy);
+        tabLayoutPolicy = newTabLayoutPolicy;
+        model = (SingleSelectionModel) f.get("model", null);
+        haveRegistered = f.get("haveRegistered", false);
+        changeListener = (ChangeListener) f.get("changeListener", null);
+        visComp = (Component) f.get("visComp", null);
+
         if ((ui != null) && (getUIClassID().equals(uiClassID))) {
             ui.installUI(this);
         }
--- a/src/java.desktop/share/classes/javax/swing/JTable.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/JTable.java	Thu Aug 28 14:54:07 2014 -0700
@@ -37,6 +37,7 @@
 import java.io.ObjectOutputStream;
 import java.io.ObjectInputStream;
 import java.io.IOException;
+import java.io.InvalidObjectException;
 
 import javax.accessibility.*;
 
@@ -1203,11 +1204,7 @@
      *              AUTO_RESIZE_ALL_COLUMNS        JTable.AUTO_RESIZE_ALL_COLUMNS
      */
     public void setAutoResizeMode(int mode) {
-        if ((mode == AUTO_RESIZE_OFF) ||
-            (mode == AUTO_RESIZE_NEXT_COLUMN) ||
-            (mode == AUTO_RESIZE_SUBSEQUENT_COLUMNS) ||
-            (mode == AUTO_RESIZE_LAST_COLUMN) ||
-            (mode == AUTO_RESIZE_ALL_COLUMNS)) {
+        if (isValidAutoResizeMode(mode)) {
             int old = autoResizeMode;
             autoResizeMode = mode;
             resizeAndRepaint();
@@ -1218,6 +1215,14 @@
         }
     }
 
+    private static boolean isValidAutoResizeMode(int mode) {
+        return (mode == AUTO_RESIZE_OFF)
+                || (mode == AUTO_RESIZE_NEXT_COLUMN)
+                || (mode == AUTO_RESIZE_SUBSEQUENT_COLUMNS)
+                || (mode == AUTO_RESIZE_LAST_COLUMN)
+                || (mode == AUTO_RESIZE_ALL_COLUMNS);
+    }
+
     /**
      * Returns the auto resize mode of the table.  The default mode
      * is AUTO_RESIZE_SUBSEQUENT_COLUMNS.
@@ -1439,10 +1444,14 @@
      *        bound: false
      */
     public void setDragEnabled(boolean b) {
+        checkDragEnabled(b);
+        dragEnabled = b;
+    }
+
+    private void checkDragEnabled(boolean b) {
         if (b && GraphicsEnvironment.isHeadless()) {
             throw new HeadlessException();
         }
-        dragEnabled = b;
     }
 
     /**
@@ -1489,6 +1498,11 @@
      * @since 1.6
      */
     public final void setDropMode(DropMode dropMode) {
+        checkDropMode(dropMode);
+        this.dropMode = dropMode;
+    }
+
+    private static void checkDropMode(DropMode dropMode) {
         if (dropMode != null) {
             switch (dropMode) {
                 case USE_SELECTION:
@@ -1499,14 +1513,12 @@
                 case ON_OR_INSERT:
                 case ON_OR_INSERT_ROWS:
                 case ON_OR_INSERT_COLS:
-                    this.dropMode = dropMode;
                     return;
             }
         }
-
-        throw new IllegalArgumentException(dropMode + ": Unsupported drop mode for table");
-    }
-
+        throw new IllegalArgumentException(dropMode
+                + ": Unsupported drop mode for table");
+    }
     /**
      * Returns the drop mode for this component.
      *
@@ -5865,7 +5877,75 @@
     private void readObject(ObjectInputStream s)
         throws IOException, ClassNotFoundException
     {
-        s.defaultReadObject();
+        ObjectInputStream.GetField f = s.readFields();
+
+        TableModel newDataModel = (TableModel) f.get("dataModel", null);
+        if (newDataModel == null) {
+            throw new InvalidObjectException("Null dataModel");
+        }
+        dataModel = newDataModel;
+
+        TableColumnModel newColumnModel = (TableColumnModel) f.get("columnModel", null);
+        if (newColumnModel == null) {
+            throw new InvalidObjectException("Null columnModel");
+        }
+        columnModel = newColumnModel;
+
+        ListSelectionModel newSelectionModel = (ListSelectionModel) f.get("selectionModel", null);
+        if (newSelectionModel == null) {
+            throw new InvalidObjectException("Null selectionModel");
+        }
+        selectionModel = newSelectionModel;
+
+        tableHeader = (JTableHeader) f.get("tableHeader", null);
+        int newRowHeight = f.get("rowHeight", 0);
+        if (newRowHeight <= 0) {
+            throw new InvalidObjectException("Row height less than 1");
+        }
+        rowHeight = newRowHeight;
+
+        rowMargin = f.get("rowMargin", 0);
+        Color newGridColor = (Color) f.get("gridColor", null);
+        if (newGridColor == null) {
+            throw new InvalidObjectException("Null gridColor");
+        }
+        gridColor = newGridColor;
+
+        showHorizontalLines = f.get("showHorizontalLines", false);
+        showVerticalLines = f.get("showVerticalLines", false);
+        int newAutoResizeMode = f.get("autoResizeMode", 0);
+        if (!isValidAutoResizeMode(newAutoResizeMode)) {
+            throw new InvalidObjectException("autoResizeMode is not valid");
+        }
+        autoResizeMode = newAutoResizeMode;
+        autoCreateColumnsFromModel = f.get("autoCreateColumnsFromModel", false);
+        preferredViewportSize = (Dimension) f.get("preferredViewportSize", null);
+        rowSelectionAllowed = f.get("rowSelectionAllowed", false);
+        cellSelectionEnabled = f.get("cellSelectionEnabled", false);
+        selectionForeground = (Color) f.get("selectionForeground", null);
+        selectionBackground = (Color) f.get("selectionBackground", null);
+        rowModel = (SizeSequence) f.get("rowModel", null);
+
+        boolean newDragEnabled = f.get("dragEnabled", false);
+        checkDragEnabled(newDragEnabled);
+        dragEnabled = newDragEnabled;
+
+        surrendersFocusOnKeystroke = f.get("surrendersFocusOnKeystroke", false);
+        editorRemover = (PropertyChangeListener) f.get("editorRemover", null);
+        columnSelectionAdjusting = f.get("columnSelectionAdjusting", false);
+        rowSelectionAdjusting = f.get("rowSelectionAdjusting", false);
+        printError = (Throwable) f.get("printError", null);
+        isRowHeightSet = f.get("isRowHeightSet", false);
+        updateSelectionOnSort = f.get("updateSelectionOnSort", false);
+        ignoreSortChange = f.get("ignoreSortChange", false);
+        sorterChanged = f.get("sorterChanged", false);
+        autoCreateRowSorter = f.get("autoCreateRowSorter", false);
+        fillsViewportHeight = f.get("fillsViewportHeight", false);
+        DropMode newDropMode = (DropMode) f.get("dropMode",
+                DropMode.USE_SELECTION);
+        checkDropMode(newDropMode);
+        dropMode = newDropMode;
+
         if ((ui != null) && (getUIClassID().equals(uiClassID))) {
             ui.installUI(this);
         }
--- a/src/java.desktop/share/classes/javax/swing/JTree.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/JTree.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1216,10 +1216,14 @@
      *        bound: false
      */
     public void setDragEnabled(boolean b) {
+        checkDragEnabled(b);
+        dragEnabled = b;
+    }
+
+    private static void checkDragEnabled(boolean b) {
         if (b && GraphicsEnvironment.isHeadless()) {
             throw new HeadlessException();
         }
-        dragEnabled = b;
     }
 
     /**
@@ -1262,18 +1266,23 @@
      * @since 1.6
      */
     public final void setDropMode(DropMode dropMode) {
+        checkDropMode(dropMode);
+        this.dropMode = dropMode;
+    }
+
+    private static void checkDropMode(DropMode dropMode) {
         if (dropMode != null) {
             switch (dropMode) {
                 case USE_SELECTION:
                 case ON:
                 case INSERT:
                 case ON_OR_INSERT:
-                    this.dropMode = dropMode;
                     return;
             }
         }
 
-        throw new IllegalArgumentException(dropMode + ": Unsupported drop mode for tree");
+        throw new IllegalArgumentException(dropMode +
+                ": Unsupported drop mode for tree");
     }
 
     /**
@@ -3089,7 +3098,34 @@
 
     private void readObject(ObjectInputStream s)
         throws IOException, ClassNotFoundException {
-        s.defaultReadObject();
+        ObjectInputStream.GetField f = s.readFields();
+
+        rootVisible = f.get("rootVisible", false);
+        rowHeight = f.get("rowHeight", 0);
+        rowHeightSet = f.get("rowHeightSet", false);
+        showsRootHandles = f.get("showsRootHandles", false);
+        showsRootHandlesSet = f.get("showsRootHandlesSet", false);
+        editable = f.get("editable", false);
+        largeModel = f.get("largeModel", false);
+        visibleRowCount = f.get("visibleRowCount", 0);
+        invokesStopCellEditing = f.get("invokesStopCellEditing", false);
+        scrollsOnExpand = f.get("scrollsOnExpand", false);
+        scrollsOnExpandSet = f.get("scrollsOnExpandSet", false);
+        toggleClickCount = f.get("toggleClickCount", 0);
+        leadPath = (TreePath) f.get("leadPath", null);
+        anchorPath = (TreePath) f.get("anchorPath", null);
+        expandsSelectedPaths = f.get("expandsSelectedPaths", false);
+        settingUI = f.get("settingUI", false);
+        boolean newDragEnabled = f.get("dragEnabled", false);
+        checkDragEnabled(newDragEnabled);
+        dragEnabled = newDragEnabled;
+        DropMode newDropMode = (DropMode) f.get("dropMode",
+                DropMode.USE_SELECTION);
+        checkDropMode(newDropMode);
+        dropMode = newDropMode;
+
+        expandRow = f.get("expandRow", -1);
+        dropTimer = (TreeTimer) f.get("dropTimer", null);
 
         // Create an instance of expanded state.
 
--- a/src/java.desktop/share/classes/javax/swing/LegacyGlueFocusTraversalPolicy.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/LegacyGlueFocusTraversalPolicy.java	Thu Aug 28 14:54:07 2014 -0700
@@ -194,7 +194,23 @@
     private void readObject(ObjectInputStream in)
         throws IOException, ClassNotFoundException
     {
-        in.defaultReadObject();
+        ObjectInputStream.GetField f = in.readFields();
+
+        @SuppressWarnings("unchecked")
+        HashMap<Component, Component>  newForwardMap =
+                (HashMap<Component, Component> ) f.get("forwardMap", null);
+        if (newForwardMap == null) {
+            throw new InvalidObjectException("Null forwardMap");
+        }
+        forwardMap = newForwardMap;
+        @SuppressWarnings("unchecked")
+        HashMap<Component, Component> newBackwardMap =
+                (HashMap<Component, Component>) f.get("backwardMap", null);
+        if (newBackwardMap == null) {
+            throw new InvalidObjectException("Null backwardMap");
+        }
+        backwardMap = newBackwardMap;
+
         delegatePolicy = (FocusTraversalPolicy)in.readObject();
         delegateManager = (DefaultFocusManager)in.readObject();
     }
--- a/src/java.desktop/share/classes/javax/swing/SwingUtilities.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/SwingUtilities.java	Thu Aug 28 14:54:07 2014 -0700
@@ -374,7 +374,8 @@
                                            sourceWheelEvent.isPopupTrigger(),
                                            sourceWheelEvent.getScrollType(),
                                            sourceWheelEvent.getScrollAmount(),
-                                           sourceWheelEvent.getWheelRotation());
+                                           sourceWheelEvent.getWheelRotation(),
+                                           sourceWheelEvent.getPreciseWheelRotation());
         }
         else if (sourceEvent instanceof MenuDragMouseEvent) {
             MenuDragMouseEvent sourceMenuDragEvent = (MenuDragMouseEvent)sourceEvent;
--- a/src/java.desktop/share/classes/javax/swing/Timer.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/Timer.java	Thu Aug 28 14:54:07 2014 -0700
@@ -401,14 +401,15 @@
      * @see #setInitialDelay
      */
     public void setDelay(int delay) {
-        if (delay < 0) {
-            throw new IllegalArgumentException("Invalid delay: " + delay);
-        }
-        else {
+        checkDelay(delay, "Invalid delay: ");
             this.delay = delay;
         }
+
+    private static void checkDelay(int delay, String message) {
+        if (delay < 0) {
+            throw new IllegalArgumentException(message + delay);
     }
-
+    }
 
     /**
      * Returns the delay, in milliseconds,
@@ -435,14 +436,9 @@
      * @see #setDelay
      */
     public void setInitialDelay(int initialDelay) {
-        if (initialDelay < 0) {
-            throw new IllegalArgumentException("Invalid initial delay: " +
-                                               initialDelay);
-        }
-        else {
+        checkDelay(initialDelay, "Invalid initial delay: ");
             this.initialDelay = initialDelay;
         }
-    }
 
 
     /**
@@ -638,7 +634,26 @@
         throws ClassNotFoundException, IOException
     {
         this.acc = AccessController.getContext();
-        in.defaultReadObject();
+        ObjectInputStream.GetField f = in.readFields();
+
+        EventListenerList newListenerList = (EventListenerList)
+                f.get("listenerList", null);
+        if (newListenerList == null) {
+            throw new InvalidObjectException("Null listenerList");
+        }
+        listenerList = newListenerList;
+
+        int newInitialDelay = f.get("initialDelay", 0);
+        checkDelay(newInitialDelay, "Invalid initial delay: ");
+        initialDelay = newInitialDelay;
+
+        int newDelay = f.get("delay", 0);
+        checkDelay(newDelay, "Invalid delay: ");
+        delay = newDelay;
+
+        repeats = f.get("repeats", false);
+        coalesce = f.get("coalesce", false);
+        actionCommand = (String) f.get("actionCommand", null);
     }
 
     /*
--- a/src/java.desktop/share/classes/javax/swing/event/SwingPropertyChangeSupport.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/event/SwingPropertyChangeSupport.java	Thu Aug 28 14:54:07 2014 -0700
@@ -107,7 +107,7 @@
      * @see #SwingPropertyChangeSupport(Object sourceBean, boolean notifyOnEDT)
      * @since 1.6
      */
-    public final boolean isNotifyOnEDT() {
+    public boolean isNotifyOnEDT() {
         return notifyOnEDT;
     }
 
--- a/src/java.desktop/share/classes/javax/swing/plaf/ComboBoxUI.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/plaf/ComboBoxUI.java	Thu Aug 28 14:54:07 2014 -0700
@@ -37,16 +37,25 @@
 
     /**
      * Set the visibility of the popup
+     *
+     * @param c a {@code JComboBox}
+     * @param v a {@code boolean} determining the visibilty of the popup
      */
     public abstract void setPopupVisible( JComboBox<?> c, boolean v );
 
     /**
      * Determine the visibility of the popup
+     *
+     * @param c a {@code JComboBox}
+     * @return true if popup of the {@code JComboBox} is visible
      */
     public abstract boolean isPopupVisible( JComboBox<?> c );
 
     /**
      * Determine whether or not the combo box itself is traversable
+     *
+     * @param c a {@code JComboBox}
+     * @return true if the given {@code JComboBox} is traversable
      */
     public abstract boolean isFocusTraversable( JComboBox<?> c );
 }
--- a/src/java.desktop/share/classes/javax/swing/plaf/ComponentUI.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/plaf/ComponentUI.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, 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
@@ -173,7 +173,8 @@
      *          this argument is often ignored,
      *          but might be used if the UI object is stateless
      *          and shared by multiple components
-     *
+     * @return a {@code Dimension} object containing given component's preferred
+     *         size appropriate for the look and feel
      * @see javax.swing.JComponent#getPreferredSize
      * @see java.awt.LayoutManager#preferredLayoutSize
      */
@@ -240,7 +241,8 @@
      *          and shared by multiple components
      * @param x the <i>x</i> coordinate of the point
      * @param y the <i>y</i> coordinate of the point
-     *
+     * @return {@code true} if the specified {@code x,y} location is contained
+     *         within the look and feel's defined shape for the given component
      * @see javax.swing.JComponent#contains
      * @see java.awt.Component#contains
      */
@@ -258,6 +260,9 @@
      * stateful, then it should return a new instance per component.
      * The default implementation of this method throws an error, as it
      * should never be invoked.
+     *
+     * @param c a {@code JComponent} for which to create a UI delegate
+     * @return a {@code ComponentUI} object for {@code c}
      */
     public static ComponentUI createUI(JComponent c) {
         throw new Error("ComponentUI.createUI not implemented.");
@@ -332,8 +337,9 @@
      * <code>Component.AccessibleAWTComponent.getAccessibleChildrenCount()</code> instead
      * of this method.
      *
+     * @param c {@code JComponent} for which to get count of accessible children
+     * @return the number of accessible children in the object
      * @see #getAccessibleChild
-     * @return the number of accessible children in the object
      */
     public int getAccessibleChildrenCount(JComponent c) {
         return SwingUtilities.getAccessibleChildrenCount(c);
@@ -351,9 +357,10 @@
      * <code>Component.AccessibleAWTComponent.getAccessibleChild()</code> instead of
      * this method.
      *
-     * @see #getAccessibleChildrenCount
+     * @param c a {@code JComponent} for which to get a child object
      * @param i zero-based index of child
      * @return the <code>i</code>th <code>Accessible</code> child of the object
+     * @see #getAccessibleChildrenCount
      */
     public Accessible getAccessibleChild(JComponent c, int i) {
         return SwingUtilities.getAccessibleChild(c, i);
--- a/src/java.desktop/share/classes/javax/swing/plaf/FileChooserUI.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/plaf/FileChooserUI.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, 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
@@ -52,6 +52,8 @@
      * <code>JFileChooser</code> will use this button as default button
      * for dialog windows.
      *
+     * @param fc the {@code JFileChooser} whose default button is requested
+     * @return the default JButton for current look and feel
      * @since 1.7
      */
     public JButton getDefaultButton(JFileChooser fc) {
--- a/src/java.desktop/share/classes/javax/swing/plaf/LayerUI.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/plaf/LayerUI.java	Thu Aug 28 14:54:07 2014 -0700
@@ -716,10 +716,22 @@
      * @param y  the y value of the region to be painted
      * @param width  the width of the region to be painted
      * @param height  the height of the region to be painted
-     *
+     * @param l  a {@code JLayer} component
      * @see JComponent#paintImmediately(int, int, int, int)
      */
     public void paintImmediately(int x, int y, int width, int height, JLayer<? extends V> l) {
         l.paintImmediately(x, y, width, height);
     }
+
+    /**
+     * Delegates its functionality to the default implementation of the {@code JLayer.imageUpdate} method
+     * which is inherited from {@code JLayer}'s base classes.
+     * <p>
+     * This method is to be overridden instead of {@code JLayer.imageUpdate}.
+     * <p>
+     * <b>Note:</b> This method is usually called <b>not</b> on the Event Dispatching Thread.
+     */
+    public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h, JLayer<? extends V> l) {
+        return l.imageUpdate(img, infoflags, x, y, w, h);
+    }
 }
--- a/src/java.desktop/share/classes/javax/swing/plaf/OptionPaneUI.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/plaf/OptionPaneUI.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1998, 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
@@ -38,12 +38,18 @@
     /**
      * Requests the component representing the default value to have
      * focus.
+     *
+     * @param op a {@code JOptionPane}
      */
     public abstract void selectInitialValue(JOptionPane op);
 
     /**
      * Returns true if the user has supplied instances of Component for
      * either the options or message.
+     *
+     * @param op a {@code JOptionPane}
+     * @return {@code true} if the given {@code JOptionPane} contains user
+     *         created {@code Component}s
      */
     public abstract boolean containsCustomComponents(JOptionPane op);
 }
--- a/src/java.desktop/share/classes/javax/swing/plaf/PopupMenuUI.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/plaf/PopupMenuUI.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2000, 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
@@ -39,6 +39,11 @@
 
 public abstract class PopupMenuUI extends ComponentUI {
     /**
+     * Returns whether or not the given {@code MouseEvent} is the popup menu
+     * trigger event for the platform
+     *
+     * @param e a {@code MouseEvent}
+     * @return true if the {@code MouseEvent e} is the popup menu trigger
      * @since 1.3
      */
     public boolean isPopupTrigger(MouseEvent e) {
--- a/src/java.desktop/share/classes/javax/swing/plaf/SplitPaneUI.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/plaf/SplitPaneUI.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1998, 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
@@ -38,32 +38,49 @@
     /**
      * Messaged to relayout the JSplitPane based on the preferred size
      * of the children components.
+     *
+     * @param jc a {@code JSplitPane}
      */
     public abstract void resetToPreferredSizes(JSplitPane jc);
 
     /**
      * Sets the location of the divider to location.
+     *
+     * @param jc a {@code JSplitPane}
+     * @param location an integer specifying the location of the divider
      */
     public abstract void setDividerLocation(JSplitPane jc, int location);
 
     /**
      * Returns the location of the divider.
+     *
+     * @param jc a {@code JSplitPane}
+     * @return an integer specifying the location of the divider
      */
     public abstract int getDividerLocation(JSplitPane jc);
 
     /**
      * Returns the minimum possible location of the divider.
+     *
+     * @param jc a {@code JSplitPane}
+     * @return and integer specifying the minimum location of the divider
      */
     public abstract int getMinimumDividerLocation(JSplitPane jc);
 
     /**
      * Returns the maximum possible location of the divider.
+     *
+     * @param jc a {@code JSplitPane}
+     * @return an integer specifying the maximum location of the divider
      */
     public abstract int getMaximumDividerLocation(JSplitPane jc);
 
     /**
      * Messaged after the JSplitPane the receiver is providing the look
      * and feel for paints its children.
+     *
+     * @param jc a {@code JSplitPane}
+     * @param g the {@code Graphics} context
      */
     public abstract void finishedPaintingChildren(JSplitPane jc, Graphics g);
 }
--- a/src/java.desktop/share/classes/javax/swing/plaf/TextUI.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/plaf/TextUI.java	Thu Aug 28 14:54:07 2014 -0700
@@ -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
@@ -42,8 +42,9 @@
      * Converts the given location in the model to a place in
      * the view coordinate system.
      *
+     * @param t the text component for which this UI is installed
      * @param pos  the local location in the model to translate &gt;= 0
-     * @return the coordinates as a rectangle
+     * @return the coordinates as a {@code Rectangle}
      * @exception BadLocationException  if the given position does not
      *   represent a valid location in the associated document
      */
@@ -53,8 +54,10 @@
      * Converts the given location in the model to a place in
      * the view coordinate system.
      *
+     * @param t the text component for which this UI is installed
      * @param pos  the local location in the model to translate &gt;= 0
-     * @return the coordinates as a rectangle
+     * @param bias the bias for the position
+     * @return the coordinates as a {@code Rectangle}
      * @exception BadLocationException  if the given position does not
      *   represent a valid location in the associated document
      */
@@ -64,6 +67,7 @@
      * Converts the given place in the view coordinate system
      * to the nearest representative location in the model.
      *
+     * @param t the text component for which this UI is installed
      * @param pt  the location in the view to translate.  This
      *   should be in the same coordinate system as the mouse
      *   events.
@@ -75,6 +79,7 @@
      * Provides a mapping from the view coordinate space to the logical
      * coordinate space of the model.
      *
+     * @param t the text component for which this UI is installed
      * @param pt the location in the view to translate.
      *           This should be in the same coordinate system
      *           as the mouse events.
@@ -117,6 +122,7 @@
      * Causes the portion of the view responsible for the
      * given part of the model to be repainted.
      *
+     * @param t the text component for which this UI is installed
      * @param p0 the beginning of the range &gt;= 0
      * @param p1 the end of the range &gt;= p0
      */
@@ -126,8 +132,13 @@
      * Causes the portion of the view responsible for the
      * given part of the model to be repainted.
      *
+     * @param t the text component for which this UI is installed
      * @param p0 the beginning of the range &gt;= 0
      * @param p1 the end of the range &gt;= p0
+     * @param firstBias the bias of the first character position, toward the
+     *        previous character or the next character
+     * @param secondBias the bias of the second character position, toward the
+     *        previous character or the next character
      */
     public abstract void damageRange(JTextComponent t, int p0, int p1,
                                      Position.Bias firstBias,
@@ -139,6 +150,7 @@
      * things like the commands available, stream readers and
      * writers, etc.
      *
+     * @param t the text component for which this UI is installed
      * @return the editor kit binding
      */
     public abstract EditorKit getEditorKit(JTextComponent t);
@@ -149,13 +161,18 @@
      * can be traversed to determine how the model is being
      * represented spatially.
      *
-     * @return the view
+     * @param t the text component for which this UI is installed
+     * @return a {@code View} with the allocation of the associated
+     *         text component
      */
     public abstract View getRootView(JTextComponent t);
 
     /**
      * Returns the string to be used as the tooltip at the passed in location.
      *
+     * @param t  the text component for which this UI is installed
+     * @param pt a {@code Point} specifying location for which to get a tooltip
+     * @return a {@code String} containing the tooltip
      * @see javax.swing.text.JTextComponent#getToolTipText
      * @since 1.4
      */
--- a/src/java.desktop/share/classes/javax/swing/plaf/TreeUI.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/plaf/TreeUI.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1998, 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
@@ -38,68 +38,109 @@
 public abstract class TreeUI extends ComponentUI
 {
     /**
-      * Returns the Rectangle enclosing the label portion that the
-      * last item in path will be drawn into.  Will return null if
-      * any component in path is currently valid.
-      */
+     * Returns the Rectangle enclosing the label portion that the
+     * last item in path will be drawn into.  Will return null if
+     * any component in path is currently valid.
+     *
+     * @param tree the {@code JTree} for {@code path}
+     * @param path the {@code TreePath} identifying the node
+     * @return the {@code Rectangle} enclosing the label portion that the
+     *         last item in path will be drawn into, {@code null} if any
+     *         component in path is currently valid.
+     */
     public abstract Rectangle getPathBounds(JTree tree, TreePath path);
 
     /**
-      * Returns the path for passed in row.  If row is not visible
-      * null is returned.
-      */
+     * Returns the path for passed in row.  If row is not visible
+     * null is returned.
+     *
+     * @param tree a {@code JTree} object
+     * @param row an integer specifying a row
+     * @return the {@code path} for {@code row} or {@code null} if {@code row}
+     *         is not visible
+     */
     public abstract TreePath getPathForRow(JTree tree, int row);
 
     /**
-      * Returns the row that the last item identified in path is visible
-      * at.  Will return -1 if any of the elements in path are not
-      * currently visible.
-      */
+     * Returns the row that the last item identified in path is visible
+     * at.  Will return -1 if any of the elements in path are not
+     * currently visible.
+     *
+     * @param tree the {@code JTree} for {@code path}
+     * @param path the {@code TreePath} object to look in
+     * @return an integer specifying the row at which the last item
+     *         identified is visible, -1 if any of the elements in
+     *         {@code path} are not currently visible
+     */
     public abstract int getRowForPath(JTree tree, TreePath path);
 
     /**
-      * Returns the number of rows that are being displayed.
-      */
+     * Returns the number of rows that are being displayed.
+     *
+     * @param tree the {@code JTree} for which to count rows
+     * @return an integer specifying the number of row being displayed
+     */
     public abstract int getRowCount(JTree tree);
 
     /**
-      * Returns the path to the node that is closest to x,y.  If
-      * there is nothing currently visible this will return null, otherwise
-      * it'll always return a valid path.  If you need to test if the
-      * returned object is exactly at x, y you should get the bounds for
-      * the returned path and test x, y against that.
-      */
+     * Returns the path to the node that is closest to x,y.  If
+     * there is nothing currently visible this will return null, otherwise
+     * it'll always return a valid path.  If you need to test if the
+     * returned object is exactly at x, y you should get the bounds for
+     * the returned path and test x, y against that.
+     *
+     * @param tree a {@code JTree} object
+     * @param x an integer giving the number of pixels horizontally from the
+     *        left edge of the display area
+     * @param y an integer giving the number of pixels vertically from the top
+     *        of the display area, minus any top margin
+     * @return the {@code TreePath} node closest to {@code x,y} or {@code null}
+     *         if there is nothing currently visible
+     */
     public abstract TreePath getClosestPathForLocation(JTree tree, int x,
                                                        int y);
 
     /**
-      * Returns true if the tree is being edited.  The item that is being
-      * edited can be returned by getEditingPath().
-      */
+     * Returns true if the tree is being edited.  The item that is being
+     * edited can be returned by getEditingPath().
+     *
+     * @param tree a {@code JTree} object
+     * @return true if {@code tree} is being edited
+     */
     public abstract boolean isEditing(JTree tree);
 
     /**
-      * Stops the current editing session.  This has no effect if the
-      * tree isn't being edited.  Returns true if the editor allows the
-      * editing session to stop.
-      */
+     * Stops the current editing session.  This has no effect if the
+     * tree isn't being edited.  Returns true if the editor allows the
+     * editing session to stop.
+     *
+     * @param tree a {@code JTree} object
+     * @return true if the editor allows the editing session to stop
+     */
     public abstract boolean stopEditing(JTree tree);
 
     /**
-      * Cancels the current editing session. This has no effect if the
-      * tree isn't being edited.  Returns true if the editor allows the
-      * editing session to stop.
-      */
+     * Cancels the current editing session. This has no effect if the
+     * tree isn't being edited.
+     *
+     * @param tree a {@code JTree} object
+     */
     public abstract void cancelEditing(JTree tree);
 
     /**
-      * Selects the last item in path and tries to edit it.  Editing will
-      * fail if the CellEditor won't allow it for the selected item.
-      */
+     * Selects the last item in path and tries to edit it.  Editing will
+     * fail if the CellEditor won't allow it for the selected item.
+     *
+     * @param tree the {@code JTree} being edited
+     * @param path the {@code TreePath} to be edited
+     */
     public abstract void startEditingAtPath(JTree tree, TreePath path);
 
     /**
      * Returns the path to the element that is being edited.
+     *
+     * @param tree the {@code JTree} for which to return a path
+     * @return a {@code TreePath} containing the path to {@code tree}
      */
     public abstract TreePath getEditingPath(JTree tree);
 }
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java	Thu Aug 28 14:54:07 2014 -0700
@@ -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
@@ -351,10 +351,15 @@
 
 
     /**
-      * Installs necessary mouse handlers on <code>newPane</code>
-      * and adds it to the frame.
-      * Reverse process for the <code>currentPane</code>.
-      */
+     * Installs necessary mouse handlers on <code>newPane</code>
+     * and adds it to the frame.
+     * Reverse process for the <code>currentPane</code>.
+     *
+     * @param currentPane this {@code Jcomponent} is the current pane being
+     * viewed that has mouse handlers installed
+     * @param newPane this {@code Jcomponent} is the pane which will be added
+     * and have mouse handlers installed
+     */
     protected void replacePane(JComponent currentPane, JComponent newPane) {
         if(currentPane != null) {
             deinstallMouseHandlers(currentPane);
@@ -517,11 +522,12 @@
   }
 
 /// DesktopManager methods
-    /** Returns the proper DesktopManager. Calls getDesktopPane() to
-      * find the JDesktop component and returns the desktopManager from
-      * it. If this fails, it will return a default DesktopManager that
-      * should work in arbitrary parents.
-      */
+    /**
+     * Returns the proper DesktopManager. Calls getDesktopPane() to
+     * find the JDesktop component and returns the desktopManager from
+     * it. If this fails, it will return a default DesktopManager that
+     * should work in arbitrary parents.
+     */
     protected DesktopManager getDesktopManager() {
         if(frame.getDesktopPane() != null
            && frame.getDesktopPane().getDesktopManager() != null)
@@ -539,6 +545,8 @@
      * This method is called when the user wants to close the frame.
      * The <code>playCloseSound</code> Action is fired.
      * This action is delegated to the desktopManager.
+     *
+     * @param f the {@code JInternalFrame} being viewed
      */
     protected void closeFrame(JInternalFrame f) {
         // Internal Frame Auditory Cue Activation
@@ -551,6 +559,8 @@
      * This method is called when the user wants to maximize the frame.
      * The <code>playMaximizeSound</code> Action is fired.
      * This action is delegated to the desktopManager.
+     *
+     * @param f the {@code JInternalFrame} being viewed
      */
     protected void maximizeFrame(JInternalFrame f) {
         // Internal Frame Auditory Cue Activation
@@ -563,6 +573,8 @@
      * This method is called when the user wants to minimize the frame.
      * The <code>playRestoreDownSound</code> Action is fired.
      * This action is delegated to the desktopManager.
+     *
+     * @param f the {@code JInternalFrame} being viewed
      */
     protected void minimizeFrame(JInternalFrame f) {
         // Internal Frame Auditory Cue Activation
@@ -579,6 +591,8 @@
      * This method is called when the user wants to iconify the frame.
      * The <code>playMinimizeSound</code> Action is fired.
      * This action is delegated to the desktopManager.
+     *
+     * @param f the {@code JInternalFrame} being viewed
      */
     protected void iconifyFrame(JInternalFrame f) {
         // Internal Frame Auditory Cue Activation
@@ -591,6 +605,8 @@
      * This method is called when the user wants to deiconify the frame.
      * The <code>playRestoreUpSound</code> Action is fired.
      * This action is delegated to the desktopManager.
+     *
+     * @param f the {@code JInternalFrame} being viewed
      */
     protected void deiconifyFrame(JInternalFrame f) {
         // Internal Frame Auditory Cue Activation
@@ -603,15 +619,21 @@
         getDesktopManager().deiconifyFrame(f);
     }
 
-    /** This method is called when the frame becomes selected.
+    /**
+      * This method is called when the frame becomes selected.
       * This action is delegated to the desktopManager.
+      *
+      * @param f the {@code JInternalFrame} being viewed
       */
     protected void activateFrame(JInternalFrame f) {
         getDesktopManager().activateFrame(f);
     }
-    /** This method is called when the frame is no longer selected.
-      * This action is delegated to the desktopManager.
-      */
+    /**
+     * This method is called when the frame is no longer selected.
+     * This action is delegated to the desktopManager.
+     *
+     * @param f the {@code JInternalFrame} being viewed
+     */
     protected void deactivateFrame(JInternalFrame f) {
         getDesktopManager().deactivateFrame(f);
     }
@@ -769,7 +791,7 @@
                       resizeDir = SOUTH;
                     }
                 } else {
-                  /* the mouse press happened inside the frame, not in the
+                    /* the mouse press happened inside the frame, not in the
                      border */
                   discardRelease = true;
                   return;
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicScrollBarUI.java	Thu Aug 28 14:54:07 2014 -0700
@@ -93,8 +93,10 @@
 
     private final static int scrollSpeedThrottle = 60; // delay in milli seconds
 
-    /** True indicates a middle click will absolutely position the
-     * scrollbar. */
+    /**
+     * True indicates a middle click will absolutely position the
+     * scrollbar.
+     */
     private boolean supportsAbsolutePositioning;
 
     /**
@@ -877,6 +879,10 @@
      * Set the bounds of the thumb and force a repaint that includes
      * the old thumbBounds and the new one.
      *
+     * @param x set the x location of the thumb
+     * @param y set the y location of the thumb
+     * @param width set the width of the thumb
+     * @param height set the height of the thumb
      * @see #getThumbBounds
      */
     protected void setThumbBounds(int x, int y, int width, int height)
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSliderUI.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSliderUI.java	Thu Aug 28 14:54:07 2014 -0700
@@ -656,10 +656,15 @@
     }
 
     /**
-     * Gets the height of the tick area for horizontal sliders and the width of the
-     * tick area for vertical sliders.  BasicSliderUI uses the returned value to
-     * determine the tick area rectangle.  If you want to give your ticks some room,
-     * make this larger than you need and paint your ticks away from the sides in paintTicks().
+     * Gets the height of the tick area for horizontal sliders and the width of
+     * the tick area for vertical sliders. BasicSliderUI uses the returned value
+     * to determine the tick area rectangle. If you want to give your ticks some
+     * room, make this larger than you need and paint your ticks away from the
+     * sides in paintTicks().
+     *
+     * @return an integer representing the height of the tick area for
+     * horizontal sliders, and the width of the tick area for the vertical
+     * sliders
      */
     protected int getTickLength() {
         return 8;
@@ -867,7 +872,7 @@
      * Returns the smallest value that has an entry in the label table.
      *
      * @return smallest value that has an entry in the label table, or
-     *         null.
+     * null.
      * @since 1.6
      */
     protected Integer getLowestValue() {
@@ -894,7 +899,11 @@
 
 
     /**
-     * Returns the label that corresponds to the highest slider value in the label table.
+     * Returns the label that corresponds to the highest slider value in the
+     * label table.
+     *
+     * @return the label that corresponds to the highest slider value in the
+     * label table
      * @see JSlider#setLabelTable
      */
     protected Component getLowestValueLabel() {
@@ -906,7 +915,11 @@
     }
 
     /**
-     * Returns the label that corresponds to the lowest slider value in the label table.
+     * Returns the label that corresponds to the lowest slider value in the
+     * label table.
+     *
+     * @return the label that corresponds to the lowest slider value in the
+     * label table
      * @see JSlider#setLabelTable
      */
     protected Component getHighestValueLabel() {
@@ -1166,8 +1179,14 @@
     }
 
     /**
-     * Called for every label in the label table.  Used to draw the labels for horizontal sliders.
-     * The graphics have been translated to labelRect.y already.
+     * Called for every label in the label table. Used to draw the labels for
+     * horizontal sliders. The graphics have been translated to labelRect.y
+     * already.
+     *
+     * @param g the graphics context in which to paint
+     * @param value the value of the slider
+     * @param label the component label in the label table that needs to be
+     * painted
      * @see JSlider#setLabelTable
      */
     protected void paintHorizontalLabel( Graphics g, int value, Component label ) {
@@ -1179,8 +1198,14 @@
     }
 
     /**
-     * Called for every label in the label table.  Used to draw the labels for vertical sliders.
-     * The graphics have been translated to labelRect.x already.
+     * Called for every label in the label table. Used to draw the labels for
+     * vertical sliders. The graphics have been translated to labelRect.x
+     * already.
+     *
+     * @param g the graphics context in which to paint
+     * @param value the value of the slider
+     * @param label the component label in the label table that needs to be
+     * painted
      * @see JSlider#setLabelTable
      */
     protected void paintVerticalLabel( Graphics g, int value, Component label ) {
@@ -1342,9 +1367,12 @@
     }
 
     /**
-     * This function is called when a mousePressed was detected in the track, not
-     * in the thumb.  The default behavior is to scroll by block.  You can
-     *  override this method to stop it from scrolling or to add additional behavior.
+     * This function is called when a mousePressed was detected in the track,
+     * not in the thumb. The default behavior is to scroll by block. You can
+     * override this method to stop it from scrolling or to add additional
+     * behavior.
+     *
+     * @param dir the direction and number of blocks to scroll
      */
     protected void scrollDueToClickInTrack( int dir ) {
         scrollByBlock( dir );
@@ -1387,6 +1415,7 @@
      * @param value the slider value to get the location for
      * @param trackY y-origin of the track
      * @param trackHeight the height of the track
+     * @return the y location for the specified value of the slider
      * @since 1.6
      */
     protected int yPositionForValue(int value, int trackY, int trackHeight) {
@@ -1417,6 +1446,9 @@
      * track at the 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.
+     *
+     * @param yPos the location of the slider along the y axis
+     * @return the value at the y position
      */
     public int valueForYPosition( int yPos ) {
         int value;
@@ -1449,6 +1481,9 @@
      * track at the left or the right, this method sets the value to either the
      * minimum or maximum value of the slider, depending on if the slider is
      * inverted or not.
+     *
+     * @param xPos the location of the slider along the x axis
+     * @return the value of the x position
      */
     public int valueForXPosition( int xPos ) {
         int value;
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1174,6 +1174,16 @@
       * this function draws the border around each tab
       * note that this function does now draw the background of the tab.
       * that is done elsewhere
+      *
+      * @param g             the graphics context in which to paint
+      * @param tabPlacement  the placement (left, right, bottom, top) of the tab
+      * @param tabIndex      the index of the tab with respect to other tabs
+      * @param x             the x coordinate of tab
+      * @param y             the y coordinate of tab
+      * @param w             the width of the tab
+      * @param h             the height of the tab
+      * @param isSelected    a {@code boolean} which determines whether or not
+      * the tab is selected
       */
     protected void paintTabBorder(Graphics g, int tabPlacement,
                                   int tabIndex,
@@ -3530,12 +3540,7 @@
             else if (name =="indexForTitle") {
                 calculatedBaseline = false;
                 Integer index = (Integer) e.getNewValue();
-                // remove the current index
-                // to let updateHtmlViews() insert the correct one
-                if (htmlViews != null) {
-                    htmlViews.removeElementAt(index);
-                }
-                updateHtmlViews(index);
+                updateHtmlViews(index, false);
             } else if (name == "tabLayoutPolicy") {
                 BasicTabbedPaneUI.this.uninstallUI(pane);
                 BasicTabbedPaneUI.this.installUI(pane);
@@ -3574,13 +3579,13 @@
                 calculatedBaseline = false;
             } else if (name == "indexForNullComponent") {
                 isRunsDirty = true;
-                updateHtmlViews((Integer)e.getNewValue());
+                updateHtmlViews((Integer)e.getNewValue(), true);
             } else if (name == "font") {
                 calculatedBaseline = false;
             }
         }
 
-        private void updateHtmlViews(int index) {
+        private void updateHtmlViews(int index, boolean inserted) {
             String title = tabPane.getTitleAt(index);
             boolean isHTML = BasicHTML.isHTMLString(title);
             if (isHTML) {
@@ -3588,16 +3593,24 @@
                     htmlViews = createHTMLVector();
                 } else {                  // Vector already exists
                     View v = BasicHTML.createHTMLView(tabPane, title);
-                    htmlViews.insertElementAt(v, index);
+                    setHtmlView(v, inserted, index);
                 }
             } else {                             // Not HTML
                 if (htmlViews!=null) {           // Add placeholder
-                    htmlViews.insertElementAt(null, index);
+                    setHtmlView(null, inserted, index);
                 }                                // else nada!
             }
             updateMnemonics();
         }
 
+        private void setHtmlView(View v, boolean inserted, int index) {
+            if (inserted || index >= htmlViews.size()) {
+                htmlViews.insertElementAt(v, index);
+            } else {
+                htmlViews.setElementAt(v, index);
+            }
+        }
+
         //
         // ChangeListener
         //
@@ -3716,7 +3729,7 @@
                 return;
             }
             isRunsDirty = true;
-            updateHtmlViews(tp.indexOfComponent(child));
+            updateHtmlViews(tp.indexOfComponent(child), true);
         }
         public void componentRemoved(ContainerEvent e) {
             JTabbedPane tp = (JTabbedPane)e.getContainer();
--- a/src/java.desktop/share/classes/javax/swing/text/AbstractDocument.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/text/AbstractDocument.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1426,11 +1426,18 @@
 
     // --- serialization ---------------------------------------------
 
+    @SuppressWarnings("unchecked")
     private void readObject(ObjectInputStream s)
       throws ClassNotFoundException, IOException
     {
-        s.defaultReadObject();
+        ObjectInputStream.GetField f = s.readFields();
+
+        documentProperties =
+            (Dictionary<Object, Object>) f.get("documentProperties", null);
         listenerList = new EventListenerList();
+        data = (Content) f.get("data", null);
+        context = (AttributeContext) f.get("context", null);
+        documentFilter = (DocumentFilter) f.get("documentFilter", null);
 
         // Restore bidi structure
         //REMIND(bcb) This creates an initial bidi element to account for
--- a/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/text/DefaultCaret.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1516,7 +1516,30 @@
     private void readObject(ObjectInputStream s)
       throws ClassNotFoundException, IOException
     {
-        s.defaultReadObject();
+        ObjectInputStream.GetField f = s.readFields();
+
+        EventListenerList newListenerList = (EventListenerList) f.get("listenerList", null);
+        if (newListenerList == null) {
+            throw new InvalidObjectException("Null listenerList");
+        }
+        listenerList = newListenerList;
+        component = (JTextComponent) f.get("component", null);
+        updatePolicy = f.get("updatePolicy", 0);
+        visible = f.get("visible", false);
+        active = f.get("active", false);
+        dot = f.get("dot", 0);
+        mark = f.get("mark", 0);
+        selectionTag = f.get("selectionTag", null);
+        selectionVisible = f.get("selectionVisible", false);
+        flasher = (Timer) f.get("flasher", null);
+        magicCaretPosition = (Point) f.get("magicCaretPosition", null);
+        dotLTR = f.get("dotLTR", false);
+        markLTR = f.get("markLTR", false);
+        ownsSelection = f.get("ownsSelection", false);
+        forceCaretPositionChange = f.get("forceCaretPositionChange", false);
+        caretWidth = f.get("caretWidth", 0);
+        aspectRatio = f.get("aspectRatio", 0.0f);
+
         handler = new Handler();
         if (!s.readBoolean()) {
             dotBias = Position.Bias.Forward;
--- a/src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1082,8 +1082,9 @@
 
     private void readObject(ObjectInputStream s)
             throws ClassNotFoundException, IOException {
-        listeningStyles = new Vector<Style>();
-        s.defaultReadObject();
+        listeningStyles = new Vector<>();
+        ObjectInputStream.GetField f = s.readFields();
+        buffer = (ElementBuffer) f.get("buffer", null);
         // Reinstall style listeners.
         if (styleContextChangeListener == null &&
             listenerList.getListenerCount(DocumentListener.class) > 0) {
--- a/src/java.desktop/share/classes/javax/swing/text/GapContent.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/text/GapContent.java	Thu Aug 28 14:54:07 2014 -0700
@@ -280,7 +280,7 @@
          * is held by the mark, so it is adjusted according
          * to it's relationship to the gap.
          */
-        public final int getOffset() {
+        public int getOffset() {
             int g0 = getGapStart();
             int g1 = getGapEnd();
             int offs = (index < g0) ? index : index - (g1 - g0);
@@ -302,7 +302,7 @@
             this.mark = mark;
         }
 
-        public final int getOffset() {
+        public int getOffset() {
             return mark.getOffset();
         }
 
--- a/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/text/JTextComponent.java	Thu Aug 28 14:54:07 2014 -0700
@@ -683,10 +683,14 @@
      *        bound: false
      */
     public void setDragEnabled(boolean b) {
+        checkDragEnabled(b);
+        dragEnabled = b;
+    }
+
+    private static void checkDragEnabled(boolean b) {
         if (b && GraphicsEnvironment.isHeadless()) {
             throw new HeadlessException();
         }
-        dragEnabled = b;
     }
 
     /**
@@ -727,11 +731,15 @@
      * @since 1.6
      */
     public final void setDropMode(DropMode dropMode) {
+        checkDropMode(dropMode);
+        this.dropMode = dropMode;
+    }
+
+    private static void checkDropMode(DropMode dropMode) {
         if (dropMode != null) {
             switch (dropMode) {
                 case USE_SELECTION:
                 case INSERT:
-                    this.dropMode = dropMode;
                     return;
             }
         }
@@ -3747,7 +3755,34 @@
     private void readObject(ObjectInputStream s)
         throws IOException, ClassNotFoundException
     {
-        s.defaultReadObject();
+        ObjectInputStream.GetField f = s.readFields();
+
+        model = (Document) f.get("model", null);
+        navigationFilter = (NavigationFilter) f.get("navigationFilter", null);
+        caretColor = (Color) f.get("caretColor", null);
+        selectionColor = (Color) f.get("selectionColor", null);
+        selectedTextColor = (Color) f.get("selectedTextColor", null);
+        disabledTextColor = (Color) f.get("disabledTextColor", null);
+        editable = f.get("editable", false);
+        margin = (Insets) f.get("margin", null);
+        focusAccelerator = f.get("focusAccelerator", '\0');
+        boolean newDragEnabled = f.get("dragEnabled", false);
+        checkDragEnabled(newDragEnabled);
+        dragEnabled = newDragEnabled;
+        DropMode newDropMode = (DropMode) f.get("dropMode",
+                DropMode.USE_SELECTION);
+        checkDropMode(newDropMode);
+        dropMode = newDropMode;
+        composedTextAttribute = (SimpleAttributeSet) f.get("composedTextAttribute", null);
+        composedTextContent = (String) f.get("composedTextContent", null);
+        composedTextStart = (Position) f.get("composedTextStart", null);
+        composedTextEnd = (Position) f.get("composedTextEnd", null);
+        latestCommittedTextStart = (Position) f.get("latestCommittedTextStart", null);
+        latestCommittedTextEnd = (Position) f.get("latestCommittedTextEnd", null);
+        composedTextCaret = (ComposedTextCaret) f.get("composedTextCaret", null);
+        checkedInputOverride = f.get("checkedInputOverride", false);
+        needToSendKeyTypedEvent = f.get("needToSendKeyTypedEvent", false);
+
         caretEvent = new MutableCaretEvent(this);
         addMouseListener(caretEvent);
         addFocusListener(caretEvent);
--- a/src/java.desktop/share/classes/javax/swing/text/MaskFormatter.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/text/MaskFormatter.java	Thu Aug 28 14:54:07 2014 -0700
@@ -649,7 +649,15 @@
      */
     private void readObject(ObjectInputStream s)
         throws IOException, ClassNotFoundException {
-        s.defaultReadObject();
+        ObjectInputStream.GetField f = s.readFields();
+
+        validCharacters = (String) f.get("validCharacters", null);
+        invalidCharacters = (String) f.get("invalidCharacters", null);
+        placeholderString = (String) f.get("placeholderString", null);
+        placeholder = f.get("placeholder", '\0');
+        containsLiteralChars = f.get("containsLiteralChars", false);
+        mask = (String) f.get("mask", null);
+
         try {
             updateInternalMask();
         } catch (ParseException pe) {
--- a/src/java.desktop/share/classes/javax/swing/text/StyleContext.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/text/StyleContext.java	Thu Aug 28 14:54:07 2014 -0700
@@ -714,11 +714,19 @@
       throws ClassNotFoundException, IOException
     {
         fontSearch = new FontKey(null, 0, 0);
-        fontTable = new Hashtable<FontKey, Font>();
+        fontTable = new Hashtable<>();
         search = new SimpleAttributeSet();
         attributesPool = Collections.
-                synchronizedMap(new WeakHashMap<SmallAttributeSet, WeakReference<SmallAttributeSet>>());
-        s.defaultReadObject();
+                synchronizedMap(new WeakHashMap<SmallAttributeSet,
+                        WeakReference<SmallAttributeSet>>());
+
+        ObjectInputStream.GetField f = s.readFields();
+        Style newStyles = (Style) f.get("styles", null);
+        if (newStyles == null) {
+            throw new InvalidObjectException("Null styles");
+        }
+        styles = newStyles;
+        unusedSets = f.get("unusedSets", 0);
     }
 
     // --- variables ---------------------------------------------------
@@ -734,7 +742,7 @@
 
     private Style styles;
     private transient FontKey fontSearch = new FontKey(null, 0, 0);
-    private transient Hashtable<FontKey, Font> fontTable = new Hashtable<FontKey, Font>();
+    private transient Hashtable<FontKey, Font> fontTable = new Hashtable<>();
 
     private transient Map<SmallAttributeSet, WeakReference<SmallAttributeSet>> attributesPool = Collections.
             synchronizedMap(new WeakHashMap<SmallAttributeSet, WeakReference<SmallAttributeSet>>());
--- a/src/java.desktop/share/classes/javax/swing/text/html/CSS.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/text/html/CSS.java	Thu Aug 28 14:54:07 2014 -0700
@@ -3555,10 +3555,13 @@
     private void readObject(ObjectInputStream s)
       throws ClassNotFoundException, IOException
     {
-        s.defaultReadObject();
+        ObjectInputStream.GetField f = s.readFields();
+        int newBaseFontSize = f.get("baseFontSize", 0);
+        setBaseFontSize(newBaseFontSize);
+
         // Reconstruct the hashtable.
         int numValues = s.readInt();
-        valueConvertor = new Hashtable<Object, Object>(Math.max(1, numValues));
+        valueConvertor = new Hashtable<>(Math.max(1, numValues));
         while (numValues-- > 0) {
             Object key = s.readObject();
             Object value = s.readObject();
--- a/src/java.desktop/share/classes/javax/swing/tree/DefaultMutableTreeNode.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/tree/DefaultMutableTreeNode.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1297,10 +1297,19 @@
 
     private void readObject(ObjectInputStream s)
         throws IOException, ClassNotFoundException {
-        Object[]      tValues;
 
-        s.defaultReadObject();
+        ObjectInputStream.GetField f = s.readFields();
+        parent = (MutableTreeNode) f.get("parent", null);
+        @SuppressWarnings("unchecked")
+        Vector<TreeNode> newChildren = (Vector<TreeNode>) f.get("children", null);
+        boolean newAllowsChildren = f.get("allowsChildren", false);
+        if (!newAllowsChildren && newChildren != null && newChildren.size() > 0) {
+            throw new IllegalStateException("node does not allow children");
+        }
+        children = newChildren;
+        allowsChildren = newAllowsChildren;
 
+        Object[]      tValues;
         tValues = (Object[])s.readObject();
 
         if(tValues.length > 0 && tValues[0].equals("userObject"))
--- a/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeCellEditor.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeCellEditor.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,10 +31,7 @@
 import javax.swing.plaf.FontUIResource;
 import java.awt.*;
 import java.awt.event.*;
-import java.beans.*;
-import java.io.*;
 import java.util.EventObject;
-import java.util.Vector;
 
 /**
  * A <code>TreeCellEditor</code>. You need to supply an
@@ -60,7 +57,6 @@
  *
  * @author Scott Violet
  */
-@SuppressWarnings("serial") // Same-version serialization only
 public class DefaultTreeCellEditor implements ActionListener, TreeCellEditor,
             TreeSelectionListener {
     /** Editor handling the editing. */
@@ -532,6 +528,7 @@
      */
     protected TreeCellEditor createTreeCellEditor() {
         Border              aBorder = UIManager.getBorder("Tree.editorBorder");
+        @SuppressWarnings("serial") // Safe: outer class is non-serializable
         DefaultCellEditor   editor = new DefaultCellEditor
             (new DefaultTextField(aBorder)) {
             public boolean shouldSelectCell(EventObject event) {
@@ -556,35 +553,6 @@
         editingComponent = null;
     }
 
-    // Serialization support.
-    private void writeObject(ObjectOutputStream s) throws IOException {
-        Vector<Object> values = new Vector<Object>();
-
-        s.defaultWriteObject();
-        // Save the realEditor, if its Serializable.
-        if(realEditor != null && realEditor instanceof Serializable) {
-            values.addElement("realEditor");
-            values.addElement(realEditor);
-        }
-        s.writeObject(values);
-    }
-
-    private void readObject(ObjectInputStream s)
-        throws IOException, ClassNotFoundException {
-        s.defaultReadObject();
-
-        Vector<?>       values = (Vector)s.readObject();
-        int             indexCounter = 0;
-        int             maxCounter = values.size();
-
-        if(indexCounter < maxCounter && values.elementAt(indexCounter).
-           equals("realEditor")) {
-            realEditor = (TreeCellEditor)values.elementAt(++indexCounter);
-            indexCounter++;
-        }
-    }
-
-
     /**
      * <code>TextField</code> used when no editor is supplied.
      * This textfield locks into the border it is constructed with.
@@ -592,6 +560,7 @@
      * renderer is not <code>null</code> and no font
      * has been specified the preferred height is that of the renderer.
      */
+    @SuppressWarnings("serial") // Safe: outer class is non-serializable
     public class DefaultTextField extends JTextField {
         /** Border to use. */
         protected Border         border;
@@ -673,6 +642,7 @@
     /**
      * Container responsible for placing the <code>editingComponent</code>.
      */
+    @SuppressWarnings("serial") // Safe: outer class is non-serializable
     public class EditorContainer extends Container {
         /**
          * Constructs an <code>EditorContainer</code> object.
--- a/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeModel.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeModel.java	Thu Aug 28 14:54:07 2014 -0700
@@ -691,7 +691,13 @@
 
     private void readObject(ObjectInputStream s)
         throws IOException, ClassNotFoundException {
-        s.defaultReadObject();
+        ObjectInputStream.GetField f = s.readFields();
+        EventListenerList newListenerList = (EventListenerList) f.get("listenerList", null);
+        if (newListenerList == null) {
+            throw new InvalidObjectException("Null listenerList");
+        }
+        listenerList = newListenerList;
+        asksAllowsChildren = f.get("asksAllowsChildren", false);
 
         Vector<?>       values = (Vector)s.readObject();
         int             indexCounter = 0;
@@ -699,7 +705,11 @@
 
         if(indexCounter < maxCounter && values.elementAt(indexCounter).
            equals("root")) {
-            root = (TreeNode)values.elementAt(++indexCounter);
+            TreeNode newRoot  = (TreeNode)values.elementAt(++indexCounter);
+            if (newRoot == null) {
+                throw new InvalidObjectException("Null root");
+            }
+            root = newRoot;
             indexCounter++;
         }
     }
--- a/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/javax/swing/tree/DefaultTreeSelectionModel.java	Thu Aug 28 14:54:07 2014 -0700
@@ -151,17 +151,20 @@
     public void setSelectionMode(int mode) {
         int            oldMode = selectionMode;
 
-        selectionMode = mode;
-        if(selectionMode != TreeSelectionModel.SINGLE_TREE_SELECTION &&
-           selectionMode != TreeSelectionModel.CONTIGUOUS_TREE_SELECTION &&
-           selectionMode != TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION)
-            selectionMode = TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION;
+        selectionMode = validateSelectionMode(mode);
         if(oldMode != selectionMode && changeSupport != null)
             changeSupport.firePropertyChange(SELECTION_MODE_PROPERTY,
                                              Integer.valueOf(oldMode),
                                              Integer.valueOf(selectionMode));
     }
 
+    private static int validateSelectionMode(int mode) {
+        return (mode != TreeSelectionModel.SINGLE_TREE_SELECTION
+                && mode != TreeSelectionModel.CONTIGUOUS_TREE_SELECTION
+                && mode != TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION)
+                ? TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION : mode;
+    }
+
     /**
      * Returns the selection mode, one of <code>SINGLE_TREE_SELECTION</code>,
      * <code>DISCONTIGUOUS_TREE_SELECTION</code> or
@@ -1219,14 +1222,40 @@
 
     private void readObject(ObjectInputStream s)
         throws IOException, ClassNotFoundException {
-        Object[]      tValues;
+        ObjectInputStream.GetField f = s.readFields();
 
-        s.defaultReadObject();
+        changeSupport = (SwingPropertyChangeSupport) f.get("changeSupport", null);
+        selection = (TreePath[]) f.get("selection", null);
+        EventListenerList newListenerList = (EventListenerList) f.get("listenerList", null);
+        if (newListenerList == null) {
+            throw new InvalidObjectException("Null listenerList");
+        }
+        listenerList = newListenerList;
+        listSelectionModel = (DefaultListSelectionModel) f.get("listSelectionModel", null);
+        selectionMode = validateSelectionMode(f.get("selectionMode", 0));
+        leadPath = (TreePath) f.get("leadPath", null);
+        leadIndex = f.get("leadIndex", 0);
+        leadRow = f.get("leadRow", 0);
+        @SuppressWarnings("unchecked")
+        Hashtable<TreePath, Boolean> newUniquePaths =
+                (Hashtable<TreePath, Boolean>) f.get("uniquePaths", null);
+        uniquePaths = newUniquePaths;
+        @SuppressWarnings("unchecked")
+        Hashtable<TreePath, Boolean> newLastPaths =
+                (Hashtable<TreePath, Boolean>) f.get("lastPaths", null);
+        lastPaths = newLastPaths;
+        tempPaths = (TreePath[]) f.get("tempPaths", null);
 
+        Object[]      tValues;
         tValues = (Object[])s.readObject();
 
-        if(tValues.length > 0 && tValues[0].equals("rowMapper"))
-            rowMapper = (RowMapper)tValues[1];
+        if (tValues.length > 0 && tValues[0].equals("rowMapper")) {
+            RowMapper newRowMapper = (RowMapper) tValues[1];
+            if (newRowMapper == null) {
+                throw new InvalidObjectException("Null newRowMapper");
+            }
+            rowMapper = newRowMapper;
+        }
     }
 }
 
--- a/src/java.desktop/share/classes/sun/awt/AWTAutoShutdown.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/awt/AWTAutoShutdown.java	Thu Aug 28 14:54:07 2014 -0700
@@ -354,7 +354,7 @@
         }
     }
 
-    final void registerPeer(final Object target, final Object peer) {
+    void registerPeer(final Object target, final Object peer) {
         synchronized (activationLock) {
             synchronized (mainLock) {
                 peerMap.put(target, peer);
@@ -363,7 +363,7 @@
         }
     }
 
-    final void unregisterPeer(final Object target, final Object peer) {
+    void unregisterPeer(final Object target, final Object peer) {
         synchronized (activationLock) {
             synchronized (mainLock) {
                 if (peerMap.get(target) == peer) {
@@ -374,7 +374,7 @@
         }
     }
 
-    final Object getPeer(final Object target) {
+    Object getPeer(final Object target) {
         synchronized (activationLock) {
             synchronized (mainLock) {
                 return peerMap.get(target);
@@ -382,7 +382,7 @@
         }
     }
 
-    final void dumpPeers(final PlatformLogger aLog) {
+    void dumpPeers(final PlatformLogger aLog) {
         if (aLog.isLoggable(PlatformLogger.Level.FINE)) {
             synchronized (activationLock) {
                 synchronized (mainLock) {
--- a/src/java.desktop/share/classes/sun/awt/AppContext.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/awt/AppContext.java	Thu Aug 28 14:54:07 2014 -0700
@@ -259,7 +259,7 @@
     private static final ThreadLocal<AppContext> threadAppContext =
             new ThreadLocal<AppContext>();
 
-    private final static void initMainAppContext() {
+    private static void initMainAppContext() {
         // On the main Thread, we get the ThreadGroup, make a corresponding
         // AppContext, and instantiate the Java EventQueue.  This way, legacy
         // code is unaffected by the move to multiple AppContext ability.
@@ -291,7 +291,7 @@
      * @see     java.lang.ThreadGroup
      * @since   1.2
      */
-    public final static AppContext getAppContext() {
+    public static AppContext getAppContext() {
         // we are standalone app, return the main app context
         if (numAppContexts.get() == 1 && mainAppContext != null) {
             return mainAppContext;
@@ -375,11 +375,11 @@
      * @return  true if the specified AppContext is the main AppContext.
      * @since   1.8
      */
-    public final static boolean isMainContext(AppContext ctx) {
+    public static boolean isMainContext(AppContext ctx) {
         return (ctx != null && ctx == mainAppContext);
     }
 
-    private final static AppContext getExecutionAppContext() {
+    private static AppContext getExecutionAppContext() {
         SecurityManager securityManager = System.getSecurityManager();
         if ((securityManager != null) &&
             (securityManager instanceof AWTSecurityManager))
--- a/src/java.desktop/share/classes/sun/awt/ComponentFactory.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/awt/ComponentFactory.java	Thu Aug 28 14:54:07 2014 -0700
@@ -25,6 +25,8 @@
 
 package sun.awt;
 
+import sun.awt.datatransfer.DataTransferer;
+
 import java.awt.*;
 import java.awt.dnd.*;
 import java.awt.dnd.peer.DragSourceContextPeer;
@@ -93,4 +95,6 @@
     RobotPeer createRobot(Robot target, GraphicsDevice screen)
         throws AWTException, HeadlessException;
 
+    DataTransferer getDataTransferer();
+
 }
--- a/src/java.desktop/share/classes/sun/awt/HeadlessToolkit.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/awt/HeadlessToolkit.java	Thu Aug 28 14:54:07 2014 -0700
@@ -25,6 +25,8 @@
 
 package sun.awt;
 
+import sun.awt.datatransfer.DataTransferer;
+
 import java.awt.*;
 import java.awt.dnd.*;
 import java.awt.dnd.peer.DragSourceContextPeer;
@@ -402,6 +404,11 @@
         return null;
     }
 
+    @Override
+    public DataTransferer getDataTransferer() {
+        return null;
+    }
+
     @SuppressWarnings("deprecation")
     public FontMetrics getFontMetrics(Font font) {
         return tk.getFontMetrics(font);
--- a/src/java.desktop/share/classes/sun/awt/SunToolkit.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/awt/SunToolkit.java	Thu Aug 28 14:54:07 2014 -0700
@@ -203,8 +203,6 @@
 
     public abstract boolean isTraySupported();
 
-    public abstract DataTransferer getDataTransferer();
-
     @SuppressWarnings("deprecation")
     public abstract FontPeer getFontPeer(String name, int style);
 
@@ -386,7 +384,7 @@
      * null or the target can't be found, a null with be returned.
      */
     public static AppContext targetToAppContext(Object target) {
-        if (target == null || GraphicsEnvironment.isHeadless()) {
+        if (target == null) {
             return null;
         }
         AppContext context = getAppContext(target);
@@ -460,12 +458,10 @@
      * via targetToAppContext() above.
      */
     public static void insertTargetMapping(Object target, AppContext appContext) {
-        if (!GraphicsEnvironment.isHeadless()) {
-            if (!setAppContext(target, appContext)) {
-                // Target is not a Component/MenuComponent, use the private Map
-                // instead.
-                appContextMap.put(target, appContext);
-            }
+        if (!setAppContext(target, appContext)) {
+            // Target is not a Component/MenuComponent, use the private Map
+            // instead.
+            appContextMap.put(target, appContext);
         }
     }
 
--- a/src/java.desktop/share/classes/sun/awt/datatransfer/DataTransferer.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/awt/datatransfer/DataTransferer.java	Thu Aug 28 14:54:07 2014 -0700
@@ -61,8 +61,6 @@
 import java.nio.charset.UnsupportedCharsetException;
 
 import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 
 import java.security.AccessController;
@@ -73,9 +71,10 @@
 
 import java.util.*;
 
-import sun.util.logging.PlatformLogger;
+import sun.datatransfer.DataFlavorUtil;
 
 import sun.awt.AppContext;
+import sun.awt.ComponentFactory;
 import sun.awt.SunToolkit;
 
 import java.awt.image.BufferedImage;
@@ -135,35 +134,6 @@
     public static final DataFlavor javaTextEncodingFlavor;
 
     /**
-     * Lazy initialization of Standard Encodings.
-     */
-    private static class StandardEncodingsHolder {
-        private static final SortedSet<String> standardEncodings = load();
-
-        private static SortedSet<String> load() {
-            final Comparator<String> comparator =
-                    new CharsetComparator(IndexedComparator.SELECT_WORST);
-            final SortedSet<String> tempSet = new TreeSet<>(comparator);
-            tempSet.add("US-ASCII");
-            tempSet.add("ISO-8859-1");
-            tempSet.add("UTF-8");
-            tempSet.add("UTF-16BE");
-            tempSet.add("UTF-16LE");
-            tempSet.add("UTF-16");
-            tempSet.add(Charset.defaultCharset().name());
-            return Collections.unmodifiableSortedSet(tempSet);
-        }
-    }
-
-    /**
-     * Tracks whether a particular text/* MIME type supports the charset
-     * parameter. The Map is initialized with all of the standard MIME types
-     * listed in the DataFlavor.selectBestTextFlavor method comment. Additional
-     * entries may be added during the life of the JRE for text/<other> types.
-     */
-    private static final Map<String, Boolean> textMIMESubtypeCharsetSupport;
-
-    /**
      * A collection of all natives listed in flavormap.properties with
      * a primary MIME type of "text".
      */
@@ -193,8 +163,6 @@
      */
     private static final String DATA_CONVERTER_KEY = "DATA_CONVERTER_KEY";
 
-    private static final PlatformLogger dtLog = PlatformLogger.getLogger("sun.awt.datatransfer.DataTransfer");
-
     static {
         DataFlavor tJavaTextEncodingFlavor = null;
         try {
@@ -202,24 +170,6 @@
         } catch (ClassNotFoundException cannotHappen) {
         }
         javaTextEncodingFlavor = tJavaTextEncodingFlavor;
-
-        Map<String, Boolean> tempMap = new HashMap<>(17);
-        tempMap.put("sgml", Boolean.TRUE);
-        tempMap.put("xml", Boolean.TRUE);
-        tempMap.put("html", Boolean.TRUE);
-        tempMap.put("enriched", Boolean.TRUE);
-        tempMap.put("richtext", Boolean.TRUE);
-        tempMap.put("uri-list", Boolean.TRUE);
-        tempMap.put("directory", Boolean.TRUE);
-        tempMap.put("css", Boolean.TRUE);
-        tempMap.put("calendar", Boolean.TRUE);
-        tempMap.put("plain", Boolean.TRUE);
-        tempMap.put("rtf", Boolean.FALSE);
-        tempMap.put("tab-separated-values", Boolean.FALSE);
-        tempMap.put("t140", Boolean.FALSE);
-        tempMap.put("rfc822-headers", Boolean.FALSE);
-        tempMap.put("parityfec", Boolean.FALSE);
-        textMIMESubtypeCharsetSupport = Collections.synchronizedMap(tempMap);
     }
 
     /**
@@ -228,172 +178,7 @@
      * instead, null will be returned.
      */
     public static synchronized DataTransferer getInstance() {
-        return ((SunToolkit) Toolkit.getDefaultToolkit()).getDataTransferer();
-    }
-
-    /**
-     * Converts an arbitrary text encoding to its canonical name.
-     */
-    public static String canonicalName(String encoding) {
-        if (encoding == null) {
-            return null;
-        }
-        try {
-            return Charset.forName(encoding).name();
-        } catch (IllegalCharsetNameException icne) {
-            return encoding;
-        } catch (UnsupportedCharsetException uce) {
-            return encoding;
-        }
-    }
-
-    /**
-     * If the specified flavor is a text flavor which supports the "charset"
-     * parameter, then this method returns that parameter, or the default
-     * charset if no such parameter was specified at construction. For non-
-     * text DataFlavors, and for non-charset text flavors, this method returns
-     * null.
-     */
-    public static String getTextCharset(DataFlavor flavor) {
-        if (!isFlavorCharsetTextType(flavor)) {
-            return null;
-        }
-
-        String encoding = flavor.getParameter("charset");
-
-        return (encoding != null) ? encoding : Charset.defaultCharset().name();
-    }
-
-    /**
-     * Tests only whether the flavor's MIME type supports the charset
-     * parameter. Must only be called for flavors with a primary type of
-     * "text".
-     */
-    public static boolean doesSubtypeSupportCharset(DataFlavor flavor) {
-        if (dtLog.isLoggable(PlatformLogger.Level.FINE)) {
-            if (!"text".equals(flavor.getPrimaryType())) {
-                dtLog.fine("Assertion (\"text\".equals(flavor.getPrimaryType())) failed");
-            }
-        }
-
-        String subType = flavor.getSubType();
-        if (subType == null) {
-            return false;
-        }
-
-        Boolean support = textMIMESubtypeCharsetSupport.get(subType);
-
-        if (support != null) {
-            return support;
-        }
-
-        boolean ret_val = (flavor.getParameter("charset") != null);
-        textMIMESubtypeCharsetSupport.put(subType, ret_val);
-        return ret_val;
-    }
-    public static boolean doesSubtypeSupportCharset(String subType,
-                                                    String charset)
-    {
-        Boolean support = textMIMESubtypeCharsetSupport.get(subType);
-
-        if (support != null) {
-            return support;
-        }
-
-        boolean ret_val = (charset != null);
-        textMIMESubtypeCharsetSupport.put(subType, ret_val);
-        return ret_val;
-    }
-
-    /**
-     * Returns whether this flavor is a text type which supports the
-     * 'charset' parameter.
-     */
-    public static boolean isFlavorCharsetTextType(DataFlavor flavor) {
-        // Although stringFlavor doesn't actually support the charset
-        // parameter (because its primary MIME type is not "text"), it should
-        // be treated as though it does. stringFlavor is semantically
-        // equivalent to "text/plain" data.
-        if (DataFlavor.stringFlavor.equals(flavor)) {
-            return true;
-        }
-
-        if (!"text".equals(flavor.getPrimaryType()) ||
-            !doesSubtypeSupportCharset(flavor))
-        {
-            return false;
-        }
-
-        Class<?> rep_class = flavor.getRepresentationClass();
-
-        if (flavor.isRepresentationClassReader() ||
-            String.class.equals(rep_class) ||
-            flavor.isRepresentationClassCharBuffer() ||
-            char[].class.equals(rep_class))
-        {
-            return true;
-        }
-
-        if (!(flavor.isRepresentationClassInputStream() ||
-              flavor.isRepresentationClassByteBuffer() ||
-              byte[].class.equals(rep_class))) {
-            return false;
-        }
-
-        String charset = flavor.getParameter("charset");
-
-        return (charset != null)
-            ? DataTransferer.isEncodingSupported(charset)
-            : true; // null equals default encoding which is always supported
-    }
-
-    /**
-     * Returns whether this flavor is a text type which does not support the
-     * 'charset' parameter.
-     */
-    public static boolean isFlavorNoncharsetTextType(DataFlavor flavor) {
-        if (!"text".equals(flavor.getPrimaryType()) ||
-            doesSubtypeSupportCharset(flavor))
-        {
-            return false;
-        }
-
-        return (flavor.isRepresentationClassInputStream() ||
-                flavor.isRepresentationClassByteBuffer() ||
-                byte[].class.equals(flavor.getRepresentationClass()));
-    }
-
-    /**
-     * Determines whether this JRE can both encode and decode text in the
-     * specified encoding.
-     */
-    private static boolean isEncodingSupported(String encoding) {
-        if (encoding == null) {
-            return false;
-        }
-        try {
-            return Charset.isSupported(encoding);
-        } catch (IllegalCharsetNameException icne) {
-            return false;
-        }
-    }
-
-    /**
-     * Returns {@code true} if the given type is a java.rmi.Remote.
-     */
-    public static boolean isRemote(Class<?> type) {
-        return RMI.isRemote(type);
-    }
-
-    /**
-     * Returns an Iterator which traverses a SortedSet of Strings which are
-     * a total order of the standard character sets supported by the JRE. The
-     * ordering follows the same principles as DataFlavor.selectBestTextFlavor.
-     * So as to avoid loading all available character converters, optional,
-     * non-standard, character sets are not included.
-     */
-    public static Set <String> standardEncodings() {
-        return StandardEncodingsHolder.standardEncodings;
+        return ((ComponentFactory) Toolkit.getDefaultToolkit()).getDataTransferer();
     }
 
     /**
@@ -600,8 +385,7 @@
         indexMap.putAll(textPlainIndexMap);
 
         // Sort the map keys according to the formats preference order.
-        Comparator<Long> comparator =
-                new IndexOrderComparator(indexMap, IndexedComparator.SELECT_WORST);
+        Comparator<Long> comparator = DataFlavorUtil.getIndexOrderComparator(indexMap).reversed();
         SortedMap<Long, DataFlavor> sortedMap = new TreeMap<>(comparator);
         sortedMap.putAll(formatMap);
 
@@ -972,7 +756,7 @@
         // target format. Append terminating NUL bytes.
         if (stringSelectionHack ||
             (String.class.equals(flavor.getRepresentationClass()) &&
-             isFlavorCharsetTextType(flavor) && isTextFormat(format))) {
+             DataFlavorUtil.isFlavorCharsetTextType(flavor) && isTextFormat(format))) {
 
             String str = removeSuspectedData(flavor, contents, (String)obj);
 
@@ -983,7 +767,7 @@
         // Source data is a Reader. Convert to a String and recur. In the
         // future, we may want to rewrite this so that we encode on demand.
         } else if (flavor.isRepresentationClassReader()) {
-            if (!(isFlavorCharsetTextType(flavor) && isTextFormat(format))) {
+            if (!(DataFlavorUtil.isFlavorCharsetTextType(flavor) && isTextFormat(format))) {
                 throw new IOException
                     ("cannot transfer non-text data as Reader");
             }
@@ -1002,7 +786,7 @@
 
         // Source data is a CharBuffer. Convert to a String and recur.
         } else if (flavor.isRepresentationClassCharBuffer()) {
-            if (!(isFlavorCharsetTextType(flavor) && isTextFormat(format))) {
+            if (!(DataFlavorUtil.isFlavorCharsetTextType(flavor) && isTextFormat(format))) {
                 throw new IOException
                     ("cannot transfer non-text data as CharBuffer");
             }
@@ -1018,7 +802,7 @@
 
         // Source data is a char array. Convert to a String and recur.
         } else if (char[].class.equals(flavor.getRepresentationClass())) {
-            if (!(isFlavorCharsetTextType(flavor) && isTextFormat(format))) {
+            if (!(DataFlavorUtil.isFlavorCharsetTextType(flavor) && isTextFormat(format))) {
                 throw new IOException
                     ("cannot transfer non-text data as char array");
             }
@@ -1036,8 +820,8 @@
             byte[] bytes = new byte[size];
             buffer.get(bytes, 0, size);
 
-            if (isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
-                String sourceEncoding = DataTransferer.getTextCharset(flavor);
+            if (DataFlavorUtil.isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
+                String sourceEncoding = DataFlavorUtil.getTextCharset(flavor);
                 return translateTransferableString(
                     new String(bytes, sourceEncoding),
                     format);
@@ -1051,8 +835,8 @@
         } else if (byte[].class.equals(flavor.getRepresentationClass())) {
             byte[] bytes = (byte[])obj;
 
-            if (isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
-                String sourceEncoding = DataTransferer.getTextCharset(flavor);
+            if (DataFlavorUtil.isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
+                String sourceEncoding = DataFlavorUtil.getTextCharset(flavor);
                 return translateTransferableString(
                     new String(bytes, sourceEncoding),
                     format);
@@ -1155,9 +939,9 @@
                     } while (!eof);
                 }
 
-                if (isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
+                if (DataFlavorUtil.isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
                     byte[] bytes = bos.toByteArray();
-                    String sourceEncoding = DataTransferer.getTextCharset(flavor);
+                    String sourceEncoding = DataFlavorUtil.getTextCharset(flavor);
                     return translateTransferableString(
                                new String(bytes, sourceEncoding),
                                format);
@@ -1166,14 +950,11 @@
             }
 
 
-
         // Source data is an RMI object
         } else if (flavor.isRepresentationClassRemote()) {
+            theByteArray = convertObjectToBytes(DataFlavorUtil.RMI.newMarshalledObject(obj));
 
-            Object mo = RMI.newMarshalledObject(obj);
-            theByteArray = convertObjectToBytes(mo);
-
-            // Source data is Serializable
+        // Source data is Serializable
         } else if (flavor.isRepresentationClassSerializable()) {
 
             theByteArray = convertObjectToBytes(obj);
@@ -1387,7 +1168,7 @@
             // Target data is a String. Strip terminating NUL bytes. Decode bytes
             // into characters. Search-and-replace EOLN.
         } else if (String.class.equals(flavor.getRepresentationClass()) &&
-                       isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
+                   DataFlavorUtil.isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
 
             theObject = translateBytesToString(bytes, format, localeTransferable);
 
@@ -1401,9 +1182,8 @@
             }
             // Target data is a CharBuffer. Recur to obtain String and wrap.
         } else if (flavor.isRepresentationClassCharBuffer()) {
-            if (!(isFlavorCharsetTextType(flavor) && isTextFormat(format))) {
-                throw new IOException
-                          ("cannot transfer non-text data as CharBuffer");
+            if (!(DataFlavorUtil.isFlavorCharsetTextType(flavor) && isTextFormat(format))) {
+                throw new IOException("cannot transfer non-text data as CharBuffer");
             }
 
             CharBuffer buffer = CharBuffer.wrap(
@@ -1414,7 +1194,7 @@
             // Target data is a char array. Recur to obtain String and convert to
             // char array.
         } else if (char[].class.equals(flavor.getRepresentationClass())) {
-            if (!(isFlavorCharsetTextType(flavor) && isTextFormat(format))) {
+            if (!(DataFlavorUtil.isFlavorCharsetTextType(flavor) && isTextFormat(format))) {
                 throw new IOException
                           ("cannot transfer non-text data as char array");
             }
@@ -1427,10 +1207,10 @@
             // terminators and search-and-replace EOLN, then reencode according to
             // the requested flavor.
         } else if (flavor.isRepresentationClassByteBuffer()) {
-            if (isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
+            if (DataFlavorUtil.isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
                 bytes = translateBytesToString(
                     bytes, format, localeTransferable).getBytes(
-                        DataTransferer.getTextCharset(flavor)
+                        DataFlavorUtil.getTextCharset(flavor)
                     );
             }
 
@@ -1442,10 +1222,10 @@
             // terminators and search-and-replace EOLN, then reencode according to
             // the requested flavor.
         } else if (byte[].class.equals(flavor.getRepresentationClass())) {
-            if (isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
+            if (DataFlavorUtil.isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
                 theObject = translateBytesToString(
                     bytes, format, localeTransferable
-                ).getBytes(DataTransferer.getTextCharset(flavor));
+                ).getBytes(DataFlavorUtil.getTextCharset(flavor));
             } else {
                 theObject = bytes;
             }
@@ -1462,9 +1242,9 @@
 
         } else if (flavor.isRepresentationClassRemote()) {
             try (ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
-                 ObjectInputStream ois = new ObjectInputStream(bais))
-            {
-                theObject = RMI.getMarshalledObject(ois.readObject());
+                 ObjectInputStream ois = new ObjectInputStream(bais)) {
+
+                theObject = DataFlavorUtil.RMI.getMarshalledObject(ois.readObject());
             } catch (Exception e) {
                 throw new IOException(e.getMessage());
             }
@@ -1529,7 +1309,7 @@
         // Target data is a String. Strip terminating NUL bytes. Decode bytes
         // into characters. Search-and-replace EOLN.
         } else if (String.class.equals(flavor.getRepresentationClass()) &&
-                   isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
+                   DataFlavorUtil.isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
 
             return translateBytesToString(inputStreamToByteArray(str),
                 format, localeTransferable);
@@ -1554,7 +1334,7 @@
             // as "Unicode" (utf-16be). Then use an InputStreamReader to decode
             // back to chars on demand.
         } else if (flavor.isRepresentationClassReader()) {
-            if (!(isFlavorCharsetTextType(flavor) && isTextFormat(format))) {
+            if (!(DataFlavorUtil.isFlavorCharsetTextType(flavor) && isTextFormat(format))) {
                 throw new IOException
                           ("cannot transfer non-text data as Reader");
             }
@@ -1563,27 +1343,24 @@
                     str, DataFlavor.plainTextFlavor,
                     format, localeTransferable);
 
-            String unicode = DataTransferer.getTextCharset(DataFlavor.plainTextFlavor);
+            String unicode = DataFlavorUtil.getTextCharset(DataFlavor.plainTextFlavor);
 
             Reader reader = new InputStreamReader(is, unicode);
 
             theObject = constructFlavoredObject(reader, flavor, Reader.class);
             // Target data is a byte array
         } else if (byte[].class.equals(flavor.getRepresentationClass())) {
-            if(isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
+            if (DataFlavorUtil.isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
                 theObject = translateBytesToString(inputStreamToByteArray(str), format, localeTransferable)
-                        .getBytes(DataTransferer.getTextCharset(flavor));
+                        .getBytes(DataFlavorUtil.getTextCharset(flavor));
             } else {
                 theObject = inputStreamToByteArray(str);
             }
             // Target data is an RMI object
         } else if (flavor.isRepresentationClassRemote()) {
-
-            try (ObjectInputStream ois =
-                     new ObjectInputStream(str))
-            {
-                theObject = RMI.getMarshalledObject(ois.readObject());
-            }catch (Exception e) {
+            try (ObjectInputStream ois = new ObjectInputStream(str)) {
+                theObject = DataFlavorUtil.RMI.getMarshalledObject(ois.readObject());
+            } catch (Exception e) {
                 throw new IOException(e.getMessage());
             }
 
@@ -1621,9 +1398,9 @@
         (InputStream str, DataFlavor flavor, long format,
          Transferable localeTransferable) throws IOException
     {
-        if (isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
+        if (DataFlavorUtil.isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
             str = new ReencodingInputStream
-                (str, format, DataTransferer.getTextCharset(flavor),
+                (str, format, DataFlavorUtil.getTextCharset(flavor),
                  localeTransferable);
         }
 
@@ -1865,8 +1642,7 @@
         byte[] bytes, String mimeType) throws IOException
     {
 
-        Iterator<ImageReader> readerIterator =
-            ImageIO.getImageReadersByMIMEType(mimeType);
+        Iterator<ImageReader> readerIterator = ImageIO.getImageReadersByMIMEType(mimeType);
 
         if (!readerIterator.hasNext()) {
             throw new IOException("No registered service provider can decode " +
@@ -1919,8 +1695,7 @@
       throws IOException {
         IOException originalIOE = null;
 
-        Iterator<ImageWriter> writerIterator =
-            ImageIO.getImageWritersByMIMEType(mimeType);
+        Iterator<ImageWriter> writerIterator = ImageIO.getImageWritersByMIMEType(mimeType);
 
         if (!writerIterator.hasNext()) {
             throw new IOException("No registered service provider can encode " +
@@ -1979,8 +1754,7 @@
                                               String mimeType)
         throws IOException {
 
-        Iterator<ImageWriter> writerIterator =
-            ImageIO.getImageWritersByMIMEType(mimeType);
+        Iterator<ImageWriter> writerIterator = ImageIO.getImageWritersByMIMEType(mimeType);
 
         ImageTypeSpecifier typeSpecifier =
             new ImageTypeSpecifier(renderedImage);
@@ -2163,8 +1937,7 @@
         }
     }
 
-    public abstract ToolkitThreadBlockedHandler
-        getToolkitThreadBlockedHandler();
+    public abstract ToolkitThreadBlockedHandler getToolkitThreadBlockedHandler();
 
     /**
      * Helper function to reduce a Map with Long keys to a long array.
@@ -2189,8 +1962,7 @@
     public static DataFlavor[] setToSortedDataFlavorArray(Set<DataFlavor> flavorsSet) {
         DataFlavor[] flavors = new DataFlavor[flavorsSet.size()];
         flavorsSet.toArray(flavors);
-        final Comparator<DataFlavor> comparator =
-                new DataFlavorComparator(IndexedComparator.SELECT_WORST);
+        final Comparator<DataFlavor> comparator = DataFlavorUtil.getDataFlavorComparator().reversed();
         Arrays.sort(flavors, comparator);
         return flavors;
     }
@@ -2230,519 +2002,4 @@
     public LinkedHashSet<String> getPlatformMappingsForFlavor(DataFlavor df) {
         return new LinkedHashSet<>();
     }
-
-    /**
-     * A Comparator which includes a helper function for comparing two Objects
-     * which are likely to be keys in the specified Map.
-     */
-    public abstract static class IndexedComparator<T> implements Comparator<T> {
-
-        /**
-         * The best Object (e.g., DataFlavor) will be the last in sequence.
-         */
-        public static final boolean SELECT_BEST = true;
-
-        /**
-         * The best Object (e.g., DataFlavor) will be the first in sequence.
-         */
-        public static final boolean SELECT_WORST = false;
-
-        final boolean order;
-
-        public IndexedComparator(boolean order) {
-            this.order = order;
-        }
-
-        /**
-         * Helper method to compare two objects by their Integer indices in the
-         * given map. If the map doesn't contain an entry for either of the
-         * objects, the fallback index will be used for the object instead.
-         *
-         * @param indexMap the map which maps objects into Integer indexes.
-         * @param obj1 the first object to be compared.
-         * @param obj2 the second object to be compared.
-         * @param fallbackIndex the Integer to be used as a fallback index.
-         * @return a negative integer, zero, or a positive integer as the
-         *             first object is mapped to a less, equal to, or greater
-         *             index than the second.
-         */
-        static <T> int compareIndices(Map<T, Integer> indexMap,
-                                      T obj1, T obj2,
-                                      Integer fallbackIndex) {
-            Integer index1 = indexMap.getOrDefault(obj1, fallbackIndex);
-            Integer index2 = indexMap.getOrDefault(obj2, fallbackIndex);
-            return index1.compareTo(index2);
-        }
-    }
-
-    /**
-     * An IndexedComparator which compares two String charsets. The comparison
-     * follows the rules outlined in DataFlavor.selectBestTextFlavor. In order
-     * to ensure that non-Unicode, non-ASCII, non-default charsets are sorted
-     * in alphabetical order, charsets are not automatically converted to their
-     * canonical forms.
-     */
-    public static class CharsetComparator extends IndexedComparator<String> {
-        private static final Map<String, Integer> charsets;
-
-        private static final Integer DEFAULT_CHARSET_INDEX = 2;
-        private static final Integer OTHER_CHARSET_INDEX = 1;
-        private static final Integer WORST_CHARSET_INDEX = 0;
-        private static final Integer UNSUPPORTED_CHARSET_INDEX = Integer.MIN_VALUE;
-
-        private static final String UNSUPPORTED_CHARSET = "UNSUPPORTED";
-
-        static {
-            Map<String, Integer> charsetsMap = new HashMap<>(8, 1.0f);
-
-            // we prefer Unicode charsets
-            charsetsMap.put(canonicalName("UTF-16LE"), 4);
-            charsetsMap.put(canonicalName("UTF-16BE"), 5);
-            charsetsMap.put(canonicalName("UTF-8"), 6);
-            charsetsMap.put(canonicalName("UTF-16"), 7);
-
-            // US-ASCII is the worst charset supported
-            charsetsMap.put(canonicalName("US-ASCII"), WORST_CHARSET_INDEX);
-
-            charsetsMap.putIfAbsent(Charset.defaultCharset().name(), DEFAULT_CHARSET_INDEX);
-
-            charsetsMap.put(UNSUPPORTED_CHARSET, UNSUPPORTED_CHARSET_INDEX);
-
-            charsets = Collections.unmodifiableMap(charsetsMap);
-        }
-
-        public CharsetComparator(boolean order) {
-            super(order);
-        }
-
-        /**
-         * Compares two String objects. Returns a negative integer, zero,
-         * or a positive integer as the first charset is worse than, equal to,
-         * or better than the second.
-         *
-         * @param obj1 the first charset to be compared
-         * @param obj2 the second charset to be compared
-         * @return a negative integer, zero, or a positive integer as the
-         *         first argument is worse, equal to, or better than the
-         *         second.
-         * @throws ClassCastException if either of the arguments is not
-         *         instance of String
-         * @throws NullPointerException if either of the arguments is
-         *         <code>null</code>.
-         */
-        public int compare(String obj1, String obj2) {
-            if (order == SELECT_BEST) {
-                return compareCharsets(obj1, obj2);
-            } else {
-                return compareCharsets(obj2, obj1);
-            }
-        }
-
-        /**
-         * Compares charsets. Returns a negative integer, zero, or a positive
-         * integer as the first charset is worse than, equal to, or better than
-         * the second.
-         * <p>
-         * Charsets are ordered according to the following rules:
-         * <ul>
-         * <li>All unsupported charsets are equal.
-         * <li>Any unsupported charset is worse than any supported charset.
-         * <li>Unicode charsets, such as "UTF-16", "UTF-8", "UTF-16BE" and
-         *     "UTF-16LE", are considered best.
-         * <li>After them, platform default charset is selected.
-         * <li>"US-ASCII" is the worst of supported charsets.
-         * <li>For all other supported charsets, the lexicographically less
-         *     one is considered the better.
-         * </ul>
-         *
-         * @param charset1 the first charset to be compared
-         * @param charset2 the second charset to be compared.
-         * @return a negative integer, zero, or a positive integer as the
-         *             first argument is worse, equal to, or better than the
-         *             second.
-         */
-        int compareCharsets(String charset1, String charset2) {
-            charset1 = getEncoding(charset1);
-            charset2 = getEncoding(charset2);
-
-            int comp = compareIndices(charsets, charset1, charset2,
-                                      OTHER_CHARSET_INDEX);
-
-            if (comp == 0) {
-                return charset2.compareTo(charset1);
-            }
-
-            return comp;
-        }
-
-        /**
-         * Returns encoding for the specified charset according to the
-         * following rules:
-         * <ul>
-         * <li>If the charset is <code>null</code>, then <code>null</code> will
-         *     be returned.
-         * <li>Iff the charset specifies an encoding unsupported by this JRE,
-         *     <code>UNSUPPORTED_CHARSET</code> will be returned.
-         * <li>If the charset specifies an alias name, the corresponding
-         *     canonical name will be returned iff the charset is a known
-         *     Unicode, ASCII, or default charset.
-         * </ul>
-         *
-         * @param charset the charset.
-         * @return an encoding for this charset.
-         */
-        static String getEncoding(String charset) {
-            if (charset == null) {
-                return null;
-            } else if (!DataTransferer.isEncodingSupported(charset)) {
-                return UNSUPPORTED_CHARSET;
-            } else {
-                // Only convert to canonical form if the charset is one
-                // of the charsets explicitly listed in the known charsets
-                // map. This will happen only for Unicode, ASCII, or default
-                // charsets.
-                String canonicalName = DataTransferer.canonicalName(charset);
-                return (charsets.containsKey(canonicalName))
-                    ? canonicalName
-                    : charset;
-            }
-        }
-    }
-
-    /**
-     * An IndexedComparator which compares two DataFlavors. For text flavors,
-     * the comparison follows the rules outlined in
-     * DataFlavor.selectBestTextFlavor. For non-text flavors, unknown
-     * application MIME types are preferred, followed by known
-     * application/x-java-* MIME types. Unknown application types are preferred
-     * because if the user provides his own data flavor, it will likely be the
-     * most descriptive one. For flavors which are otherwise equal, the
-     * flavors' string representation are compared in the alphabetical order.
-     */
-    public static class DataFlavorComparator extends IndexedComparator<DataFlavor> {
-
-        private final CharsetComparator charsetComparator;
-
-        private static final Map<String, Integer> exactTypes;
-        private static final Map<String, Integer> primaryTypes;
-        private static final Map<Class<?>, Integer> nonTextRepresentations;
-        private static final Map<String, Integer> textTypes;
-        private static final Map<Class<?>, Integer> decodedTextRepresentations;
-        private static final Map<Class<?>, Integer> encodedTextRepresentations;
-
-        private static final Integer UNKNOWN_OBJECT_LOSES = Integer.MIN_VALUE;
-        private static final Integer UNKNOWN_OBJECT_WINS = Integer.MAX_VALUE;
-
-        static {
-            {
-                Map<String, Integer> exactTypesMap = new HashMap<>(4, 1.0f);
-
-                // application/x-java-* MIME types
-                exactTypesMap.put("application/x-java-file-list", 0);
-                exactTypesMap.put("application/x-java-serialized-object", 1);
-                exactTypesMap.put("application/x-java-jvm-local-objectref", 2);
-                exactTypesMap.put("application/x-java-remote-object", 3);
-
-                exactTypes = Collections.unmodifiableMap(exactTypesMap);
-            }
-
-            {
-                Map<String, Integer> primaryTypesMap = new HashMap<>(1, 1.0f);
-
-                primaryTypesMap.put("application", 0);
-
-                primaryTypes = Collections.unmodifiableMap(primaryTypesMap);
-            }
-
-            {
-                Map<Class<?>, Integer> nonTextRepresentationsMap = new HashMap<>(3, 1.0f);
-
-                nonTextRepresentationsMap.put(java.io.InputStream.class, 0);
-                nonTextRepresentationsMap.put(java.io.Serializable.class, 1);
-
-                Class<?> remoteClass = RMI.remoteClass();
-                if (remoteClass != null) {
-                    nonTextRepresentationsMap.put(remoteClass, 2);
-                }
-
-                nonTextRepresentations = Collections.unmodifiableMap(nonTextRepresentationsMap);
-            }
-
-            {
-                Map<String, Integer> textTypesMap = new HashMap<>(16, 1.0f);
-
-                // plain text
-                textTypesMap.put("text/plain", 0);
-
-                // stringFlavor
-                textTypesMap.put("application/x-java-serialized-object", 1);
-
-                // misc
-                textTypesMap.put("text/calendar", 2);
-                textTypesMap.put("text/css", 3);
-                textTypesMap.put("text/directory", 4);
-                textTypesMap.put("text/parityfec", 5);
-                textTypesMap.put("text/rfc822-headers", 6);
-                textTypesMap.put("text/t140", 7);
-                textTypesMap.put("text/tab-separated-values", 8);
-                textTypesMap.put("text/uri-list", 9);
-
-                // enriched
-                textTypesMap.put("text/richtext", 10);
-                textTypesMap.put("text/enriched", 11);
-                textTypesMap.put("text/rtf", 12);
-
-                // markup
-                textTypesMap.put("text/html", 13);
-                textTypesMap.put("text/xml", 14);
-                textTypesMap.put("text/sgml", 15);
-
-                textTypes = Collections.unmodifiableMap(textTypesMap);
-            }
-
-            {
-                Map<Class<?>, Integer> decodedTextRepresentationsMap = new HashMap<>(4, 1.0f);
-
-                decodedTextRepresentationsMap.put(char[].class, 0);
-                decodedTextRepresentationsMap.put(CharBuffer.class, 1);
-                decodedTextRepresentationsMap.put(String.class, 2);
-                decodedTextRepresentationsMap.put(Reader.class, 3);
-
-                decodedTextRepresentations =
-                        Collections.unmodifiableMap(decodedTextRepresentationsMap);
-            }
-
-            {
-                Map<Class<?>, Integer> encodedTextRepresentationsMap = new HashMap<>(3, 1.0f);
-
-                encodedTextRepresentationsMap.put(byte[].class, 0);
-                encodedTextRepresentationsMap.put(ByteBuffer.class, 1);
-                encodedTextRepresentationsMap.put(InputStream.class, 2);
-
-                encodedTextRepresentations =
-                        Collections.unmodifiableMap(encodedTextRepresentationsMap);
-            }
-        }
-
-        public DataFlavorComparator() {
-            this(SELECT_BEST);
-        }
-
-        public DataFlavorComparator(boolean order) {
-            super(order);
-
-            charsetComparator = new CharsetComparator(order);
-        }
-
-        public int compare(DataFlavor obj1, DataFlavor obj2) {
-            DataFlavor flavor1 = order == SELECT_BEST ? obj1 : obj2;
-            DataFlavor flavor2 = order == SELECT_BEST ? obj2 : obj1;
-
-            if (flavor1.equals(flavor2)) {
-                return 0;
-            }
-
-            int comp = 0;
-
-            String primaryType1 = flavor1.getPrimaryType();
-            String subType1 = flavor1.getSubType();
-            String mimeType1 = primaryType1 + "/" + subType1;
-            Class<?> class1 = flavor1.getRepresentationClass();
-
-            String primaryType2 = flavor2.getPrimaryType();
-            String subType2 = flavor2.getSubType();
-            String mimeType2 = primaryType2 + "/" + subType2;
-            Class<?> class2 = flavor2.getRepresentationClass();
-
-            if (flavor1.isFlavorTextType() && flavor2.isFlavorTextType()) {
-                // First, compare MIME types
-                comp = compareIndices(textTypes, mimeType1, mimeType2,
-                                      UNKNOWN_OBJECT_LOSES);
-                if (comp != 0) {
-                    return comp;
-                }
-
-                // Only need to test one flavor because they both have the
-                // same MIME type. Also don't need to worry about accidentally
-                // passing stringFlavor because either
-                //   1. Both flavors are stringFlavor, in which case the
-                //      equality test at the top of the function succeeded.
-                //   2. Only one flavor is stringFlavor, in which case the MIME
-                //      type comparison returned a non-zero value.
-                if (doesSubtypeSupportCharset(flavor1)) {
-                    // Next, prefer the decoded text representations of Reader,
-                    // String, CharBuffer, and [C, in that order.
-                    comp = compareIndices(decodedTextRepresentations, class1,
-                                          class2, UNKNOWN_OBJECT_LOSES);
-                    if (comp != 0) {
-                        return comp;
-                    }
-
-                    // Next, compare charsets
-                    comp = charsetComparator.compareCharsets
-                        (DataTransferer.getTextCharset(flavor1),
-                         DataTransferer.getTextCharset(flavor2));
-                    if (comp != 0) {
-                        return comp;
-                    }
-                }
-
-                // Finally, prefer the encoded text representations of
-                // InputStream, ByteBuffer, and [B, in that order.
-                comp = compareIndices(encodedTextRepresentations, class1,
-                                      class2, UNKNOWN_OBJECT_LOSES);
-                if (comp != 0) {
-                    return comp;
-                }
-            } else {
-                // First, prefer application types.
-                comp = compareIndices(primaryTypes, primaryType1, primaryType2,
-                                      UNKNOWN_OBJECT_LOSES);
-                if (comp != 0) {
-                    return comp;
-                }
-
-                // Next, look for application/x-java-* types. Prefer unknown
-                // MIME types because if the user provides his own data flavor,
-                // it will likely be the most descriptive one.
-                comp = compareIndices(exactTypes, mimeType1, mimeType2,
-                                      UNKNOWN_OBJECT_WINS);
-                if (comp != 0) {
-                    return comp;
-                }
-
-                // Finally, prefer the representation classes of Remote,
-                // Serializable, and InputStream, in that order.
-                comp = compareIndices(nonTextRepresentations, class1, class2,
-                                      UNKNOWN_OBJECT_LOSES);
-                if (comp != 0) {
-                    return comp;
-                }
-            }
-
-            // The flavours are not equal but still not distinguishable.
-            // Compare String representations in alphabetical order
-            return flavor1.getMimeType().compareTo(flavor2.getMimeType());
-        }
-    }
-
-    /*
-     * Given the Map that maps objects to Integer indices and a boolean value,
-     * this Comparator imposes a direct or reverse order on set of objects.
-     * <p>
-     * If the specified boolean value is SELECT_BEST, the Comparator imposes the
-     * direct index-based order: an object A is greater than an object B if and
-     * only if the index of A is greater than the index of B. An object that
-     * doesn't have an associated index is less or equal than any other object.
-     * <p>
-     * If the specified boolean value is SELECT_WORST, the Comparator imposes the
-     * reverse index-based order: an object A is greater than an object B if and
-     * only if A is less than B with the direct index-based order.
-     */
-    public static class IndexOrderComparator extends IndexedComparator<Long> {
-        private final Map<Long, Integer> indexMap;
-        private static final Integer FALLBACK_INDEX = Integer.MIN_VALUE;
-
-        public IndexOrderComparator(Map<Long, Integer> indexMap, boolean order) {
-            super(order);
-            this.indexMap = indexMap;
-        }
-
-        public int compare(Long obj1, Long obj2) {
-            if (order == SELECT_WORST) {
-                return -compareIndices(indexMap, obj1, obj2, FALLBACK_INDEX);
-            } else {
-                return compareIndices(indexMap, obj1, obj2, FALLBACK_INDEX);
-            }
-        }
-    }
-
-    /**
-     * A class that provides access to java.rmi.Remote and java.rmi.MarshalledObject
-     * without creating a static dependency.
-     */
-    private static class RMI {
-        private static final Class<?> remoteClass = getClass("java.rmi.Remote");
-        private static final Class<?> marshallObjectClass =
-            getClass("java.rmi.MarshalledObject");
-        private static final Constructor<?> marshallCtor =
-            getConstructor(marshallObjectClass, Object.class);
-        private static final Method marshallGet =
-            getMethod(marshallObjectClass, "get");
-
-        private static Class<?> getClass(String name) {
-            try {
-                return Class.forName(name, true, null);
-            } catch (ClassNotFoundException e) {
-                return null;
-            }
-        }
-
-        private static Constructor<?> getConstructor(Class<?> c, Class<?>... types) {
-            try {
-                return (c == null) ? null : c.getDeclaredConstructor(types);
-            } catch (NoSuchMethodException x) {
-                throw new AssertionError(x);
-            }
-        }
-
-        private static Method getMethod(Class<?> c, String name, Class<?>... types) {
-            try {
-                return (c == null) ? null : c.getMethod(name, types);
-            } catch (NoSuchMethodException e) {
-                throw new AssertionError(e);
-            }
-        }
-
-        /**
-         * Returns {@code true} if the given class is java.rmi.Remote.
-         */
-        static boolean isRemote(Class<?> c) {
-            return (remoteClass == null) ? false : remoteClass.isAssignableFrom(c);
-        }
-
-        /**
-         * Returns java.rmi.Remote.class if RMI is present; otherwise {@code null}.
-         */
-        static Class<?> remoteClass() {
-            return remoteClass;
-        }
-
-        /**
-         * Returns a new MarshalledObject containing the serialized representation
-         * of the given object.
-         */
-        static Object newMarshalledObject(Object obj) throws IOException {
-            try {
-                return marshallCtor.newInstance(obj);
-            } catch (InstantiationException | IllegalAccessException x) {
-                throw new AssertionError(x);
-            } catch (InvocationTargetException  x) {
-                Throwable cause = x.getCause();
-                if (cause instanceof IOException)
-                    throw (IOException)cause;
-                throw new AssertionError(x);
-            }
-        }
-
-        /**
-         * Returns a new copy of the contained marshalled object.
-         */
-        static Object getMarshalledObject(Object obj)
-            throws IOException, ClassNotFoundException
-        {
-            try {
-                return marshallGet.invoke(obj);
-            } catch (IllegalAccessException x) {
-                throw new AssertionError(x);
-            } catch (InvocationTargetException x) {
-                Throwable cause = x.getCause();
-                if (cause instanceof IOException)
-                    throw (IOException)cause;
-                if (cause instanceof ClassNotFoundException)
-                    throw (ClassNotFoundException)cause;
-                throw new AssertionError(x);
-            }
-        }
-    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.desktop/share/classes/sun/awt/datatransfer/DesktopDatatransferServiceImpl.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,97 @@
+/*
+ * 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.awt.datatransfer;
+
+import sun.awt.AppContext;
+import sun.datatransfer.DesktopDatatransferService;
+
+import java.awt.EventQueue;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.FlavorMap;
+import java.util.LinkedHashSet;
+import java.util.function.Supplier;
+
+/**
+ * Provides desktop services to the datatransfer module according to
+ * {@code DesktopDatatransferService} interface.
+ *
+ * @author Petr Pchelko
+ * @since 1.9
+ */
+public class DesktopDatatransferServiceImpl implements DesktopDatatransferService {
+
+    private static final Object FLAVOR_MAP_KEY = new Object();
+
+    @Override
+    public void invokeOnEventThread(Runnable r) {
+        EventQueue.invokeLater(r);
+    }
+
+    @Override
+    public String getDefaultUnicodeEncoding() {
+        DataTransferer dataTransferer = DataTransferer.getInstance();
+        if (dataTransferer != null) {
+            return dataTransferer.getDefaultUnicodeEncoding();
+        }
+        return null;
+    }
+
+    @Override
+    public FlavorMap getFlavorMap(Supplier<FlavorMap> supplier) {
+        AppContext context = AppContext.getAppContext();
+        FlavorMap fm = (FlavorMap) context.get(FLAVOR_MAP_KEY);
+        if (fm == null) {
+            fm = supplier.get();
+            context.put(FLAVOR_MAP_KEY, fm);
+        }
+        return fm;
+    }
+
+    @Override
+    public boolean isDesktopPresent() {
+        return true;
+    }
+
+    @Override
+    public LinkedHashSet<DataFlavor> getPlatformMappingsForNative(String nat) {
+        DataTransferer instance = DataTransferer.getInstance();
+        return instance != null ? instance.getPlatformMappingsForNative(nat) : new LinkedHashSet<>();
+    }
+
+    @Override
+    public LinkedHashSet<String> getPlatformMappingsForFlavor(DataFlavor df) {
+        DataTransferer instance = DataTransferer.getInstance();
+        return instance != null ? instance.getPlatformMappingsForFlavor(df) : new LinkedHashSet<>();
+    }
+
+    @Override
+    public void registerTextFlavorProperties(String nat, String charset, String eoln, String terminators) {
+        DataTransferer instance = DataTransferer.getInstance();
+        if (instance != null) {
+            instance.registerTextFlavorProperties(nat, charset, eoln, terminators);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.desktop/share/classes/sun/awt/datatransfer/META-INF/services/sun.datatransfer.DesktopDatatransferService	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,1 @@
+sun.awt.datatransfer.DesktopDatatransferServiceImpl
--- a/src/java.desktop/share/classes/sun/awt/geom/Crossings.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/awt/geom/Crossings.java	Thu Aug 28 14:54:07 2014 -0700
@@ -312,7 +312,7 @@
             super(xlo, ylo, xhi, yhi);
         }
 
-        public final boolean covers(double ystart, double yend) {
+        public boolean covers(double ystart, double yend) {
             return (limit == 2 && yranges[0] <= ystart && yranges[1] >= yend);
         }
 
@@ -398,7 +398,7 @@
             crosscounts = new int[yranges.length / 2];
         }
 
-        public final boolean covers(double ystart, double yend) {
+        public boolean covers(double ystart, double yend) {
             int i = 0;
             while (i < limit) {
                 double ylo = yranges[i++];
--- a/src/java.desktop/share/classes/sun/awt/image/MultiResolutionCachedImage.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/awt/image/MultiResolutionCachedImage.java	Thu Aug 28 14:54:07 2014 -0700
@@ -53,7 +53,7 @@
             Dimension2D[] sizes, BiFunction<Integer, Integer, Image> mapper) {
         this.baseImageWidth = baseImageWidth;
         this.baseImageHeight = baseImageHeight;
-        this.sizes = sizes;
+        this.sizes = (sizes == null) ? null : Arrays.copyOf(sizes, sizes.length);
         this.mapper = mapper;
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.desktop/share/classes/sun/datatransfer/DataFlavorUtil.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,832 @@
+/*
+ * 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.datatransfer;
+
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.FlavorMap;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.IllegalCharsetNameException;
+import java.nio.charset.StandardCharsets;
+import java.nio.charset.UnsupportedCharsetException;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.Map;
+import java.util.ServiceLoader;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.function.Supplier;
+
+
+/**
+ * Utility class with different datatransfer helper functions
+ *
+ * @see 1.9
+ */
+public class DataFlavorUtil {
+
+    private DataFlavorUtil() {
+        // Avoid instantiation
+    }
+
+    private static Comparator<String> getCharsetComparator() {
+       return CharsetComparator.INSTANCE;
+    }
+
+    public static Comparator<DataFlavor> getDataFlavorComparator() {
+       return DataFlavorComparator.INSTANCE;
+    }
+
+    public static Comparator<Long> getIndexOrderComparator(Map<Long, Integer> indexMap) {
+        return new IndexOrderComparator(indexMap);
+    }
+
+    public static Comparator<DataFlavor> getTextFlavorComparator() {
+        return TextFlavorComparator.INSTANCE;
+    }
+
+    /**
+     * Tracks whether a particular text/* MIME type supports the charset
+     * parameter. The Map is initialized with all of the standard MIME types
+     * listed in the DataFlavor.selectBestTextFlavor method comment. Additional
+     * entries may be added during the life of the JRE for text/<other> types.
+     */
+    private static final Map<String, Boolean> textMIMESubtypeCharsetSupport;
+
+    static {
+        Map<String, Boolean> tempMap = new HashMap<>(17);
+        tempMap.put("sgml", Boolean.TRUE);
+        tempMap.put("xml", Boolean.TRUE);
+        tempMap.put("html", Boolean.TRUE);
+        tempMap.put("enriched", Boolean.TRUE);
+        tempMap.put("richtext", Boolean.TRUE);
+        tempMap.put("uri-list", Boolean.TRUE);
+        tempMap.put("directory", Boolean.TRUE);
+        tempMap.put("css", Boolean.TRUE);
+        tempMap.put("calendar", Boolean.TRUE);
+        tempMap.put("plain", Boolean.TRUE);
+        tempMap.put("rtf", Boolean.FALSE);
+        tempMap.put("tab-separated-values", Boolean.FALSE);
+        tempMap.put("t140", Boolean.FALSE);
+        tempMap.put("rfc822-headers", Boolean.FALSE);
+        tempMap.put("parityfec", Boolean.FALSE);
+        textMIMESubtypeCharsetSupport = Collections.synchronizedMap(tempMap);
+    }
+
+    /**
+     * Lazy initialization of Standard Encodings.
+     */
+    private static class StandardEncodingsHolder {
+        private static final SortedSet<String> standardEncodings = load();
+
+        private static SortedSet<String> load() {
+            final SortedSet<String> tempSet = new TreeSet<>(getCharsetComparator().reversed());
+            tempSet.add("US-ASCII");
+            tempSet.add("ISO-8859-1");
+            tempSet.add("UTF-8");
+            tempSet.add("UTF-16BE");
+            tempSet.add("UTF-16LE");
+            tempSet.add("UTF-16");
+            tempSet.add(Charset.defaultCharset().name());
+            return Collections.unmodifiableSortedSet(tempSet);
+        }
+    }
+
+    /**
+     * Returns a {@code SortedSet} of Strings which are a total order of the standard
+     * character sets supported by the JRE. The ordering follows the same principles as
+     * {@link java.awt.datatransfer.DataFlavor#selectBestTextFlavor(java.awt.datatransfer.DataFlavor[])}.
+     * So as to avoid loading all available character converters, optional, non-standard,
+     * character sets are not included.
+     */
+    public static Set<String> standardEncodings() {
+        return StandardEncodingsHolder.standardEncodings;
+    }
+
+    /**
+     * Converts an arbitrary text encoding to its canonical name.
+     */
+    public static String canonicalName(String encoding) {
+        if (encoding == null) {
+            return null;
+        }
+        try {
+            return Charset.forName(encoding).name();
+        } catch (IllegalCharsetNameException icne) {
+            return encoding;
+        } catch (UnsupportedCharsetException uce) {
+            return encoding;
+        }
+    }
+
+    /**
+     * Tests only whether the flavor's MIME type supports the charset
+     * parameter. Must only be called for flavors with a primary type of
+     * "text".
+     */
+    public static boolean doesSubtypeSupportCharset(DataFlavor flavor) {
+        String subType = flavor.getSubType();
+        if (subType == null) {
+            return false;
+        }
+
+        Boolean support = textMIMESubtypeCharsetSupport.get(subType);
+
+        if (support != null) {
+            return support;
+        }
+
+        boolean ret_val = (flavor.getParameter("charset") != null);
+        textMIMESubtypeCharsetSupport.put(subType, ret_val);
+        return ret_val;
+    }
+    public static boolean doesSubtypeSupportCharset(String subType,
+                                                    String charset)
+    {
+        Boolean support = textMIMESubtypeCharsetSupport.get(subType);
+
+        if (support != null) {
+            return support;
+        }
+
+        boolean ret_val = (charset != null);
+        textMIMESubtypeCharsetSupport.put(subType, ret_val);
+        return ret_val;
+    }
+
+
+    /**
+     * Returns whether this flavor is a text type which supports the
+     * 'charset' parameter.
+     */
+    public static boolean isFlavorCharsetTextType(DataFlavor flavor) {
+        // Although stringFlavor doesn't actually support the charset
+        // parameter (because its primary MIME type is not "text"), it should
+        // be treated as though it does. stringFlavor is semantically
+        // equivalent to "text/plain" data.
+        if (DataFlavor.stringFlavor.equals(flavor)) {
+            return true;
+        }
+
+        if (!"text".equals(flavor.getPrimaryType()) ||
+                !doesSubtypeSupportCharset(flavor))
+        {
+            return false;
+        }
+
+        Class<?> rep_class = flavor.getRepresentationClass();
+
+        if (flavor.isRepresentationClassReader() ||
+                String.class.equals(rep_class) ||
+                flavor.isRepresentationClassCharBuffer() ||
+                char[].class.equals(rep_class))
+        {
+            return true;
+        }
+
+        if (!(flavor.isRepresentationClassInputStream() ||
+                flavor.isRepresentationClassByteBuffer() ||
+                byte[].class.equals(rep_class))) {
+            return false;
+        }
+
+        String charset = flavor.getParameter("charset");
+
+        // null equals default encoding which is always supported
+        return (charset == null) || isEncodingSupported(charset);
+    }
+
+    /**
+     * Returns whether this flavor is a text type which does not support the
+     * 'charset' parameter.
+     */
+    public static boolean isFlavorNoncharsetTextType(DataFlavor flavor) {
+        if (!"text".equals(flavor.getPrimaryType()) || doesSubtypeSupportCharset(flavor)) {
+            return false;
+        }
+
+        return (flavor.isRepresentationClassInputStream() ||
+                flavor.isRepresentationClassByteBuffer() ||
+                byte[].class.equals(flavor.getRepresentationClass()));
+    }
+
+    /**
+     * If the specified flavor is a text flavor which supports the "charset"
+     * parameter, then this method returns that parameter, or the default
+     * charset if no such parameter was specified at construction. For non-
+     * text DataFlavors, and for non-charset text flavors, this method returns
+     * null.
+     */
+    public static String getTextCharset(DataFlavor flavor) {
+        if (!isFlavorCharsetTextType(flavor)) {
+            return null;
+        }
+
+        String encoding = flavor.getParameter("charset");
+
+        return (encoding != null) ? encoding : Charset.defaultCharset().name();
+    }
+
+    /**
+     * Determines whether this JRE can both encode and decode text in the
+     * specified encoding.
+     */
+    private static boolean isEncodingSupported(String encoding) {
+        if (encoding == null) {
+            return false;
+        }
+        try {
+            return Charset.isSupported(encoding);
+        } catch (IllegalCharsetNameException icne) {
+            return false;
+        }
+    }
+
+    /**
+     * Helper method to compare two objects by their Integer indices in the
+     * given map. If the map doesn't contain an entry for either of the
+     * objects, the fallback index will be used for the object instead.
+     *
+     * @param indexMap the map which maps objects into Integer indexes.
+     * @param obj1 the first object to be compared.
+     * @param obj2 the second object to be compared.
+     * @param fallbackIndex the Integer to be used as a fallback index.
+     * @return a negative integer, zero, or a positive integer as the
+     *             first object is mapped to a less, equal to, or greater
+     *             index than the second.
+     */
+    static <T> int compareIndices(Map<T, Integer> indexMap,
+                                  T obj1, T obj2,
+                                  Integer fallbackIndex) {
+        Integer index1 = indexMap.getOrDefault(obj1, fallbackIndex);
+        Integer index2 = indexMap.getOrDefault(obj2, fallbackIndex);
+        return index1.compareTo(index2);
+    }
+
+    /**
+     * An IndexedComparator which compares two String charsets. The comparison
+     * follows the rules outlined in DataFlavor.selectBestTextFlavor. In order
+     * to ensure that non-Unicode, non-ASCII, non-default charsets are sorted
+     * in alphabetical order, charsets are not automatically converted to their
+     * canonical forms.
+     */
+    private static class CharsetComparator implements Comparator<String> {
+        static final CharsetComparator INSTANCE = new CharsetComparator();
+
+        private static final Map<String, Integer> charsets;
+
+        private static final Integer DEFAULT_CHARSET_INDEX = 2;
+        private static final Integer OTHER_CHARSET_INDEX = 1;
+        private static final Integer WORST_CHARSET_INDEX = 0;
+        private static final Integer UNSUPPORTED_CHARSET_INDEX = Integer.MIN_VALUE;
+
+        private static final String UNSUPPORTED_CHARSET = "UNSUPPORTED";
+
+        static {
+            Map<String, Integer> charsetsMap = new HashMap<>(8, 1.0f);
+
+            // we prefer Unicode charsets
+            charsetsMap.put(canonicalName("UTF-16LE"), 4);
+            charsetsMap.put(canonicalName("UTF-16BE"), 5);
+            charsetsMap.put(canonicalName("UTF-8"), 6);
+            charsetsMap.put(canonicalName("UTF-16"), 7);
+
+            // US-ASCII is the worst charset supported
+            charsetsMap.put(canonicalName("US-ASCII"), WORST_CHARSET_INDEX);
+
+            charsetsMap.putIfAbsent(Charset.defaultCharset().name(), DEFAULT_CHARSET_INDEX);
+
+            charsetsMap.put(UNSUPPORTED_CHARSET, UNSUPPORTED_CHARSET_INDEX);
+
+            charsets = Collections.unmodifiableMap(charsetsMap);
+        }
+
+        /**
+         * Compares charsets. Returns a negative integer, zero, or a positive
+         * integer as the first charset is worse than, equal to, or better than
+         * the second.
+         * <p>
+         * Charsets are ordered according to the following rules:
+         * <ul>
+         * <li>All unsupported charsets are equal.
+         * <li>Any unsupported charset is worse than any supported charset.
+         * <li>Unicode charsets, such as "UTF-16", "UTF-8", "UTF-16BE" and
+         *     "UTF-16LE", are considered best.
+         * <li>After them, platform default charset is selected.
+         * <li>"US-ASCII" is the worst of supported charsets.
+         * <li>For all other supported charsets, the lexicographically less
+         *     one is considered the better.
+         * </ul>
+         *
+         * @param charset1 the first charset to be compared
+         * @param charset2 the second charset to be compared.
+         * @return a negative integer, zero, or a positive integer as the
+         *             first argument is worse, equal to, or better than the
+         *             second.
+         */
+        public int compare(String charset1, String charset2) {
+            charset1 = getEncoding(charset1);
+            charset2 = getEncoding(charset2);
+
+            int comp = compareIndices(charsets, charset1, charset2, OTHER_CHARSET_INDEX);
+
+            if (comp == 0) {
+                return charset2.compareTo(charset1);
+            }
+
+            return comp;
+        }
+
+        /**
+         * Returns encoding for the specified charset according to the
+         * following rules:
+         * <ul>
+         * <li>If the charset is <code>null</code>, then <code>null</code> will
+         *     be returned.
+         * <li>Iff the charset specifies an encoding unsupported by this JRE,
+         *     <code>UNSUPPORTED_CHARSET</code> will be returned.
+         * <li>If the charset specifies an alias name, the corresponding
+         *     canonical name will be returned iff the charset is a known
+         *     Unicode, ASCII, or default charset.
+         * </ul>
+         *
+         * @param charset the charset.
+         * @return an encoding for this charset.
+         */
+        static String getEncoding(String charset) {
+            if (charset == null) {
+                return null;
+            } else if (!isEncodingSupported(charset)) {
+                return UNSUPPORTED_CHARSET;
+            } else {
+                // Only convert to canonical form if the charset is one
+                // of the charsets explicitly listed in the known charsets
+                // map. This will happen only for Unicode, ASCII, or default
+                // charsets.
+                String canonicalName = canonicalName(charset);
+                return (charsets.containsKey(canonicalName))
+                        ? canonicalName
+                        : charset;
+            }
+        }
+    }
+
+    /**
+     * An IndexedComparator which compares two DataFlavors. For text flavors,
+     * the comparison follows the rules outlined in
+     * DataFlavor.selectBestTextFlavor. For non-text flavors, unknown
+     * application MIME types are preferred, followed by known
+     * application/x-java-* MIME types. Unknown application types are preferred
+     * because if the user provides his own data flavor, it will likely be the
+     * most descriptive one. For flavors which are otherwise equal, the
+     * flavors' string representation are compared in the alphabetical order.
+     */
+    private static class DataFlavorComparator implements Comparator<DataFlavor> {
+
+        static final DataFlavorComparator INSTANCE = new DataFlavorComparator();
+
+        private static final Map<String, Integer> exactTypes;
+        private static final Map<String, Integer> primaryTypes;
+        private static final Map<Class<?>, Integer> nonTextRepresentations;
+        private static final Map<String, Integer> textTypes;
+        private static final Map<Class<?>, Integer> decodedTextRepresentations;
+        private static final Map<Class<?>, Integer> encodedTextRepresentations;
+
+        private static final Integer UNKNOWN_OBJECT_LOSES = Integer.MIN_VALUE;
+        private static final Integer UNKNOWN_OBJECT_WINS = Integer.MAX_VALUE;
+
+        static {
+            {
+                Map<String, Integer> exactTypesMap = new HashMap<>(4, 1.0f);
+
+                // application/x-java-* MIME types
+                exactTypesMap.put("application/x-java-file-list", 0);
+                exactTypesMap.put("application/x-java-serialized-object", 1);
+                exactTypesMap.put("application/x-java-jvm-local-objectref", 2);
+                exactTypesMap.put("application/x-java-remote-object", 3);
+
+                exactTypes = Collections.unmodifiableMap(exactTypesMap);
+            }
+
+            {
+                Map<String, Integer> primaryTypesMap = new HashMap<>(1, 1.0f);
+
+                primaryTypesMap.put("application", 0);
+
+                primaryTypes = Collections.unmodifiableMap(primaryTypesMap);
+            }
+
+            {
+                Map<Class<?>, Integer> nonTextRepresentationsMap = new HashMap<>(3, 1.0f);
+
+                nonTextRepresentationsMap.put(java.io.InputStream.class, 0);
+                nonTextRepresentationsMap.put(java.io.Serializable.class, 1);
+
+                nonTextRepresentationsMap.put(RMI.remoteClass(), 2);
+
+                nonTextRepresentations = Collections.unmodifiableMap(nonTextRepresentationsMap);
+            }
+
+            {
+                Map<String, Integer> textTypesMap = new HashMap<>(16, 1.0f);
+
+                // plain text
+                textTypesMap.put("text/plain", 0);
+
+                // stringFlavor
+                textTypesMap.put("application/x-java-serialized-object", 1);
+
+                // misc
+                textTypesMap.put("text/calendar", 2);
+                textTypesMap.put("text/css", 3);
+                textTypesMap.put("text/directory", 4);
+                textTypesMap.put("text/parityfec", 5);
+                textTypesMap.put("text/rfc822-headers", 6);
+                textTypesMap.put("text/t140", 7);
+                textTypesMap.put("text/tab-separated-values", 8);
+                textTypesMap.put("text/uri-list", 9);
+
+                // enriched
+                textTypesMap.put("text/richtext", 10);
+                textTypesMap.put("text/enriched", 11);
+                textTypesMap.put("text/rtf", 12);
+
+                // markup
+                textTypesMap.put("text/html", 13);
+                textTypesMap.put("text/xml", 14);
+                textTypesMap.put("text/sgml", 15);
+
+                textTypes = Collections.unmodifiableMap(textTypesMap);
+            }
+
+            {
+                Map<Class<?>, Integer> decodedTextRepresentationsMap = new HashMap<>(4, 1.0f);
+
+                decodedTextRepresentationsMap.put(char[].class, 0);
+                decodedTextRepresentationsMap.put(CharBuffer.class, 1);
+                decodedTextRepresentationsMap.put(String.class, 2);
+                decodedTextRepresentationsMap.put(Reader.class, 3);
+
+                decodedTextRepresentations =
+                        Collections.unmodifiableMap(decodedTextRepresentationsMap);
+            }
+
+            {
+                Map<Class<?>, Integer> encodedTextRepresentationsMap = new HashMap<>(3, 1.0f);
+
+                encodedTextRepresentationsMap.put(byte[].class, 0);
+                encodedTextRepresentationsMap.put(ByteBuffer.class, 1);
+                encodedTextRepresentationsMap.put(InputStream.class, 2);
+
+                encodedTextRepresentations =
+                        Collections.unmodifiableMap(encodedTextRepresentationsMap);
+            }
+        }
+
+
+        public int compare(DataFlavor flavor1, DataFlavor flavor2) {
+            if (flavor1.equals(flavor2)) {
+                return 0;
+            }
+
+            int comp;
+
+            String primaryType1 = flavor1.getPrimaryType();
+            String subType1 = flavor1.getSubType();
+            String mimeType1 = primaryType1 + "/" + subType1;
+            Class<?> class1 = flavor1.getRepresentationClass();
+
+            String primaryType2 = flavor2.getPrimaryType();
+            String subType2 = flavor2.getSubType();
+            String mimeType2 = primaryType2 + "/" + subType2;
+            Class<?> class2 = flavor2.getRepresentationClass();
+
+            if (flavor1.isFlavorTextType() && flavor2.isFlavorTextType()) {
+                // First, compare MIME types
+                comp = compareIndices(textTypes, mimeType1, mimeType2, UNKNOWN_OBJECT_LOSES);
+                if (comp != 0) {
+                    return comp;
+                }
+
+                // Only need to test one flavor because they both have the
+                // same MIME type. Also don't need to worry about accidentally
+                // passing stringFlavor because either
+                //   1. Both flavors are stringFlavor, in which case the
+                //      equality test at the top of the function succeeded.
+                //   2. Only one flavor is stringFlavor, in which case the MIME
+                //      type comparison returned a non-zero value.
+                if (doesSubtypeSupportCharset(flavor1)) {
+                    // Next, prefer the decoded text representations of Reader,
+                    // String, CharBuffer, and [C, in that order.
+                    comp = compareIndices(decodedTextRepresentations, class1,
+                            class2, UNKNOWN_OBJECT_LOSES);
+                    if (comp != 0) {
+                        return comp;
+                    }
+
+                    // Next, compare charsets
+                    comp = CharsetComparator.INSTANCE.compare(getTextCharset(flavor1),
+                            getTextCharset(flavor2));
+                    if (comp != 0) {
+                        return comp;
+                    }
+                }
+
+                // Finally, prefer the encoded text representations of
+                // InputStream, ByteBuffer, and [B, in that order.
+                comp = compareIndices(encodedTextRepresentations, class1,
+                        class2, UNKNOWN_OBJECT_LOSES);
+                if (comp != 0) {
+                    return comp;
+                }
+            } else {
+                // First, prefer application types.
+                comp = compareIndices(primaryTypes, primaryType1, primaryType2,
+                        UNKNOWN_OBJECT_LOSES);
+                if (comp != 0) {
+                    return comp;
+                }
+
+                // Next, look for application/x-java-* types. Prefer unknown
+                // MIME types because if the user provides his own data flavor,
+                // it will likely be the most descriptive one.
+                comp = compareIndices(exactTypes, mimeType1, mimeType2,
+                        UNKNOWN_OBJECT_WINS);
+                if (comp != 0) {
+                    return comp;
+                }
+
+                // Finally, prefer the representation classes of Remote,
+                // Serializable, and InputStream, in that order.
+                comp = compareIndices(nonTextRepresentations, class1, class2,
+                        UNKNOWN_OBJECT_LOSES);
+                if (comp != 0) {
+                    return comp;
+                }
+            }
+
+            // The flavours are not equal but still not distinguishable.
+            // Compare String representations in alphabetical order
+            return flavor1.getMimeType().compareTo(flavor2.getMimeType());
+        }
+    }
+
+    /*
+     * Given the Map that maps objects to Integer indices and a boolean value,
+     * this Comparator imposes a direct or reverse order on set of objects.
+     * <p>
+     * If the specified boolean value is SELECT_BEST, the Comparator imposes the
+     * direct index-based order: an object A is greater than an object B if and
+     * only if the index of A is greater than the index of B. An object that
+     * doesn't have an associated index is less or equal than any other object.
+     * <p>
+     * If the specified boolean value is SELECT_WORST, the Comparator imposes the
+     * reverse index-based order: an object A is greater than an object B if and
+     * only if A is less than B with the direct index-based order.
+     */
+    private static class IndexOrderComparator implements Comparator<Long> {
+        private final Map<Long, Integer> indexMap;
+        private static final Integer FALLBACK_INDEX = Integer.MIN_VALUE;
+
+        public IndexOrderComparator(Map<Long, Integer> indexMap) {
+            this.indexMap = indexMap;
+        }
+
+        public int compare(Long obj1, Long obj2) {
+            return compareIndices(indexMap, obj1, obj2, FALLBACK_INDEX);
+        }
+    }
+
+    private static class TextFlavorComparator extends DataFlavorComparator {
+
+        static final TextFlavorComparator INSTANCE = new TextFlavorComparator();
+        /**
+         * Compares two <code>DataFlavor</code> objects. Returns a negative
+         * integer, zero, or a positive integer as the first
+         * <code>DataFlavor</code> is worse than, equal to, or better than the
+         * second.
+         * <p>
+         * <code>DataFlavor</code>s are ordered according to the rules outlined
+         * for <code>selectBestTextFlavor</code>.
+         *
+         * @param flavor1 the first <code>DataFlavor</code> to be compared
+         * @param flavor2 the second <code>DataFlavor</code> to be compared
+         * @return a negative integer, zero, or a positive integer as the first
+         *         argument is worse, equal to, or better than the second
+         * @throws ClassCastException if either of the arguments is not an
+         *         instance of <code>DataFlavor</code>
+         * @throws NullPointerException if either of the arguments is
+         *         <code>null</code>
+         *
+         * @see java.awt.datatransfer.DataFlavor#selectBestTextFlavor
+         */
+        public int compare(DataFlavor flavor1, DataFlavor flavor2) {
+            if (flavor1.isFlavorTextType()) {
+                if (flavor2.isFlavorTextType()) {
+                    return super.compare(flavor1, flavor2);
+                } else {
+                    return 1;
+                }
+            } else if (flavor2.isFlavorTextType()) {
+                return -1;
+            } else {
+                return 0;
+            }
+        }
+    }
+
+    /**
+     * A fallback implementation of {@link sun.datatransfer.DesktopDatatransferService}
+     * used if there is no desktop.
+     */
+    private static final class DefaultDesktopDatatransferService implements DesktopDatatransferService {
+        static final DesktopDatatransferService INSTANCE = getDesktopService();
+
+        private static DesktopDatatransferService getDesktopService() {
+            ServiceLoader<DesktopDatatransferService> loader =
+                    ServiceLoader.load(DesktopDatatransferService.class, null);
+            Iterator<DesktopDatatransferService> iterator = loader.iterator();
+            if (iterator.hasNext()) {
+                return iterator.next();
+            } else {
+                return new DefaultDesktopDatatransferService();
+            }
+        }
+
+        /**
+         * System singleton FlavorTable.
+         * Only used if there is no desktop
+         * to provide an appropriate FlavorMap.
+         */
+        private volatile FlavorMap flavorMap;
+
+        @Override
+        public void invokeOnEventThread(Runnable r) {
+            r.run();
+        }
+
+        @Override
+        public String getDefaultUnicodeEncoding() {
+            return StandardCharsets.UTF_8.name();
+        }
+
+        @Override
+        public FlavorMap getFlavorMap(Supplier<FlavorMap> supplier) {
+            FlavorMap map = flavorMap;
+            if (map == null) {
+                synchronized (this) {
+                    map = flavorMap;
+                    if (map == null) {
+                        flavorMap = map = supplier.get();
+                    }
+                }
+            }
+            return map;
+        }
+
+        @Override
+        public boolean isDesktopPresent() {
+            return false;
+        }
+
+        @Override
+        public LinkedHashSet<DataFlavor> getPlatformMappingsForNative(String nat) {
+            return new LinkedHashSet<>();
+        }
+
+        @Override
+        public LinkedHashSet<String> getPlatformMappingsForFlavor(DataFlavor df) {
+            return new LinkedHashSet<>();
+        }
+
+        @Override
+        public void registerTextFlavorProperties(String nat, String charset,
+                                                 String eoln, String terminators) {
+            // Not needed if desktop module is absent
+        }
+    }
+
+    public static DesktopDatatransferService getDesktopService() {
+        return DefaultDesktopDatatransferService.INSTANCE;
+    }
+
+    /**
+     * A class that provides access to java.rmi.Remote and java.rmi.MarshalledObject
+     * without creating a static dependency.
+     */
+    public static class RMI {
+        private static final Class<?> remoteClass = getClass("java.rmi.Remote");
+        private static final Class<?> marshallObjectClass = getClass("java.rmi.MarshalledObject");
+        private static final Constructor<?> marshallCtor = getConstructor(marshallObjectClass, Object.class);
+        private static final Method marshallGet = getMethod(marshallObjectClass, "get");
+
+        private static Class<?> getClass(String name) {
+            try {
+                return Class.forName(name, true, null);
+            } catch (ClassNotFoundException e) {
+                return null;
+            }
+        }
+
+        private static Constructor<?> getConstructor(Class<?> c, Class<?>... types) {
+            try {
+                return (c == null) ? null : c.getDeclaredConstructor(types);
+            } catch (NoSuchMethodException x) {
+                throw new AssertionError(x);
+            }
+        }
+
+        private static Method getMethod(Class<?> c, String name, Class<?>... types) {
+            try {
+                return (c == null) ? null : c.getMethod(name, types);
+            } catch (NoSuchMethodException e) {
+                throw new AssertionError(e);
+            }
+        }
+
+        /**
+         * Returns java.rmi.Remote.class if RMI is present; otherwise {@code null}.
+         */
+        static Class<?> remoteClass() {
+            return remoteClass;
+        }
+
+        /**
+         * Returns {@code true} if the given class is java.rmi.Remote.
+         */
+        public static boolean isRemote(Class<?> c) {
+            return (remoteClass != null) && remoteClass.isAssignableFrom(c);
+        }
+
+        /**
+         * Returns a new MarshalledObject containing the serialized representation
+         * of the given object.
+         */
+        public static Object newMarshalledObject(Object obj) throws IOException {
+            try {
+                return marshallCtor == null ? null : marshallCtor.newInstance(obj);
+            } catch (InstantiationException | IllegalAccessException x) {
+                throw new AssertionError(x);
+            } catch (InvocationTargetException x) {
+                Throwable cause = x.getCause();
+                if (cause instanceof IOException)
+                    throw (IOException) cause;
+                throw new AssertionError(x);
+            }
+        }
+
+        /**
+         * Returns a new copy of the contained marshalled object.
+         */
+        public static Object getMarshalledObject(Object obj)
+                throws IOException, ClassNotFoundException {
+            try {
+                return marshallGet == null ? null : marshallGet.invoke(obj);
+            } catch (IllegalAccessException x) {
+                throw new AssertionError(x);
+            } catch (InvocationTargetException x) {
+                Throwable cause = x.getCause();
+                if (cause instanceof IOException)
+                    throw (IOException) cause;
+                if (cause instanceof ClassNotFoundException)
+                    throw (ClassNotFoundException) cause;
+                throw new AssertionError(x);
+            }
+        }
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.desktop/share/classes/sun/datatransfer/DesktopDatatransferService.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,106 @@
+/*
+ * 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.datatransfer;
+
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.FlavorMap;
+import java.util.LinkedHashSet;
+import java.util.function.Supplier;
+
+/**
+ * Contains services which desktop provides to the datatransfer system
+ * to enrich it's functionality
+ *
+ * @author Petr Pchelko
+ * @since 1.9
+ */
+public interface DesktopDatatransferService {
+
+    /**
+     * If desktop is present - invokes a {@code Runnable} on
+     * the event dispatch thread. Otherwise invokes a {@code run()}
+     * method directly.
+     *
+     * @param r a {@code Runnable} to invoke
+     */
+    void invokeOnEventThread(Runnable r);
+
+    /**
+     * Get a platform-dependent default unicode encoding to use in
+     * datatransfer system.
+     *
+     * @return default unicode encoding
+     */
+    String getDefaultUnicodeEncoding();
+
+    /**
+     * Takes an appropriate {@code FlavorMap} from the desktop.
+     * If no appropriate table is found - uses a provided supplier to
+     * instantiate a table. If the desktop is absent - creates and returns
+     * a system singleton.
+     *
+     * @param supplier a constructor that should be used to create a new instance of
+     *                 the {@code FlavorMap}
+     * @return a {@code FlavorMap}
+     */
+    FlavorMap getFlavorMap(Supplier<FlavorMap> supplier);
+
+    /**
+     * Checks if desktop is present
+     *
+     * @return {@code true} is the desktop is present
+     */
+    boolean isDesktopPresent();
+
+    /**
+     * Returns platform-specific mappings for the specified native format.
+     * If there are no platform-specific mappings for this native, the method
+     * returns an empty {@code Set}
+     *
+     * @param nat a native format to return flavors for
+     * @return set of platform-specific mappings for a native format
+     */
+    LinkedHashSet<DataFlavor> getPlatformMappingsForNative(String nat);
+
+    /**
+     * Returns platform-specific mappings for the specified flavor.
+     * If there are no platform-specific mappings for this flavor, the method
+     * returns an empty {@code Set}
+     *
+     * @param df {@code DataFlavor} to return mappings for
+     * @return set of platform-specific mappings for a {@code DataFlavor}
+     */
+    LinkedHashSet<String> getPlatformMappingsForFlavor(DataFlavor df);
+
+    /**
+     * This method is called for text flavor mappings established while parsing
+     * the default flavor mappings file. It stores the "eoln" and "terminators"
+     * parameters which are not officially part of the MIME type. They are
+     * MIME parameters specific to the flavormap.properties file format.
+     */
+    void registerTextFlavorProperties(String nat, String charset,
+                                      String eoln, String terminators);
+}
--- a/src/java.desktop/share/classes/sun/font/CompositeGlyphMapper.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/font/CompositeGlyphMapper.java	Thu Aug 28 14:54:07 2014 -0700
@@ -67,11 +67,11 @@
                       compFont.maxIndices != null;
     }
 
-    public final int compositeGlyphCode(int slot, int glyphCode) {
+    public int compositeGlyphCode(int slot, int glyphCode) {
         return (slot << 24 | (glyphCode & GLYPHMASK));
     }
 
-    private final void initMapper() {
+    private void initMapper() {
         if (missingGlyph == CharToGlyphMapper.UNINITIALIZED_GLYPH) {
             if (glyphMaps == null) {
                 glyphMaps = new int[NBLOCKS][];
@@ -108,7 +108,7 @@
         glyphMaps[index0][unicode & 0xff] = glyphCode;
     }
 
-    private final CharToGlyphMapper getSlotMapper(int slot) {
+    private CharToGlyphMapper getSlotMapper(int slot) {
         CharToGlyphMapper mapper = slotMappers[slot];
         if (mapper == null) {
             mapper = font.getSlotFont(slot).getMapper();
@@ -117,7 +117,7 @@
         return mapper;
     }
 
-    private final int convertToGlyph(int unicode) {
+    private int convertToGlyph(int unicode) {
 
         for (int slot = 0; slot < font.numSlots; slot++) {
             if (!hasExcludes || !font.isExcludedChar(slot, unicode)) {
--- a/src/java.desktop/share/classes/sun/font/CoreMetrics.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/font/CoreMetrics.java	Thu Aug 28 14:54:07 2014 -0700
@@ -66,11 +66,11 @@
         return ((FontLineMetrics)lm).cm;
     }
 
-    public final int hashCode() {
+    public int hashCode() {
         return Float.floatToIntBits(ascent + ssOffset);
     }
 
-    public final boolean equals(Object rhs) {
+    public boolean equals(Object rhs) {
         try {
             return equals((CoreMetrics)rhs);
         }
@@ -79,7 +79,7 @@
         }
     }
 
-    public final boolean equals(CoreMetrics rhs) {
+    public boolean equals(CoreMetrics rhs) {
         if (rhs != null) {
             if (this == rhs) {
                 return true;
@@ -105,7 +105,7 @@
     // fullOffsets is an array of 5 baseline offsets,
     // roman, center, hanging, bottom, and top in that order
     // this does NOT add the ssOffset
-    public final float effectiveBaselineOffset(float[] fullOffsets) {
+    public float effectiveBaselineOffset(float[] fullOffsets) {
         switch (baselineIndex) {
         case GraphicAttribute.TOP_ALIGNMENT:
             return fullOffsets[4] + ascent;
--- a/src/java.desktop/share/classes/sun/font/FileFontStrike.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/font/FileFontStrike.java	Thu Aug 28 14:54:07 2014 -0700
@@ -454,6 +454,17 @@
 
     /* Only look in the cache */
     long getCachedGlyphPtr(int glyphCode) {
+        try {
+            return getCachedGlyphPtrInternal(glyphCode);
+        } catch (Exception e) {
+          NullFontScaler nullScaler =
+             (NullFontScaler)FontScaler.getNullScaler();
+          long nullSC = NullFontScaler.getNullScalerContext();
+          return nullScaler.getGlyphImage(nullSC, glyphCode);
+        }
+    }
+
+    private long getCachedGlyphPtrInternal(int glyphCode) {
         switch (glyphCacheFormat) {
             case INTARRAY:
                 return intGlyphImages[glyphCode] & INTMASK;
@@ -481,6 +492,27 @@
     }
 
     private synchronized long setCachedGlyphPtr(int glyphCode, long glyphPtr) {
+        try {
+            return setCachedGlyphPtrInternal(glyphCode, glyphPtr);
+        } catch (Exception e) {
+            switch (glyphCacheFormat) {
+                case INTARRAY:
+                case SEGINTARRAY:
+                    StrikeCache.freeIntPointer((int)glyphPtr);
+                    break;
+                case LONGARRAY:
+                case SEGLONGARRAY:
+                    StrikeCache.freeLongPointer(glyphPtr);
+                    break;
+             }
+             NullFontScaler nullScaler =
+                 (NullFontScaler)FontScaler.getNullScaler();
+             long nullSC = NullFontScaler.getNullScalerContext();
+             return nullScaler.getGlyphImage(nullSC, glyphCode);
+        }
+    }
+
+    private long setCachedGlyphPtrInternal(int glyphCode, long glyphPtr) {
         switch (glyphCacheFormat) {
             case INTARRAY:
                 if (intGlyphImages[glyphCode] == 0) {
--- a/src/java.desktop/share/classes/sun/font/FontLineMetrics.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/font/FontLineMetrics.java	Thu Aug 28 14:54:07 2014 -0700
@@ -50,55 +50,55 @@
         this.frc = frc;
     }
 
-    public final int getNumChars() {
+    public int getNumChars() {
         return numchars;
     }
 
-    public final float getAscent() {
+    public float getAscent() {
         return cm.ascent;
     }
 
-    public final float getDescent() {
+    public float getDescent() {
         return cm.descent;
     }
 
-    public final float getLeading() {
+    public float getLeading() {
         return cm.leading;
     }
 
-    public final float getHeight() {
+    public float getHeight() {
         return cm.height;
     }
 
-    public final int getBaselineIndex() {
+    public int getBaselineIndex() {
         return cm.baselineIndex;
     }
 
-    public final float[] getBaselineOffsets() {
+    public float[] getBaselineOffsets() {
         return cm.baselineOffsets.clone();
     }
 
-    public final float getStrikethroughOffset() {
+    public float getStrikethroughOffset() {
         return cm.strikethroughOffset;
     }
 
-    public final float getStrikethroughThickness() {
+    public float getStrikethroughThickness() {
         return cm.strikethroughThickness;
     }
 
-    public final float getUnderlineOffset() {
+    public float getUnderlineOffset() {
         return cm.underlineOffset;
     }
 
-    public final float getUnderlineThickness() {
+    public float getUnderlineThickness() {
         return cm.underlineThickness;
     }
 
-    public final int hashCode() {
+    public int hashCode() {
         return cm.hashCode();
     }
 
-    public final boolean equals(Object rhs) {
+    public boolean equals(Object rhs) {
         try {
             return cm.equals(((FontLineMetrics)rhs).cm);
         }
@@ -107,7 +107,7 @@
         }
     }
 
-    public final Object clone() {
+    public Object clone() {
         // frc, cm do not need deep clone
         try {
             return super.clone();
--- a/src/java.desktop/share/classes/sun/font/FontRunIterator.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/font/FontRunIterator.java	Thu Aug 28 14:54:07 2014 -0700
@@ -140,11 +140,11 @@
 
     static final int DONE = -1;
 
-    final int nextCodePoint() {
+    int nextCodePoint() {
         return nextCodePoint(limit);
     }
 
-    final int nextCodePoint(int lim) {
+    int nextCodePoint(int lim) {
         if (pos >= lim) {
             return DONE;
         }
@@ -159,7 +159,7 @@
         return ch;
     }
 
-    final void pushback(int ch) {
+    void pushback(int ch) {
         if (ch >= 0) {
             if (ch >= 0x10000) {
                 pos -= 2;
--- a/src/java.desktop/share/classes/sun/font/GlyphList.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/font/GlyphList.java	Thu Aug 28 14:54:07 2014 -0700
@@ -262,7 +262,7 @@
         return mapChars(info, len);
     }
 
-    private final boolean mapChars(FontInfo info, int len) {
+    private boolean mapChars(FontInfo info, int len) {
         /* REMIND.Is it worthwhile for the iteration to convert
          * chars to glyph ids to directly map to images?
          */
--- a/src/java.desktop/share/classes/sun/font/ScriptRun.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/font/ScriptRun.java	Thu Aug 28 14:54:07 2014 -0700
@@ -121,7 +121,7 @@
      *
      * @return the index of the first character in the current script run.
      */
-    public final int getScriptStart() {
+    public int getScriptStart() {
         return scriptStart;
     }
 
@@ -130,7 +130,7 @@
      *
      * @return the index of the first character after the current script run.
      */
-    public final int getScriptLimit() {
+    public int getScriptLimit() {
         return scriptLimit;
     }
 
@@ -140,7 +140,7 @@
      * @return the script code for the script of the current script run.
      * @see #Script
      */
-    public final int getScriptCode() {
+    public int getScriptCode() {
         return scriptCode;
     }
 
@@ -150,7 +150,7 @@
      *
      * @return <code>false</code> if there isn't another run, <code>true</code> if there is.
      */
-    public final boolean next() {
+    public boolean next() {
         int startSP  = parenSP;  // used to find the first new open character
 
         // if we've fallen off the end of the text, we're done
@@ -242,7 +242,7 @@
 
     static final int DONE = -1;
 
-    private final int nextCodePoint() {
+    private int nextCodePoint() {
         if (scriptLimit >= textLimit) {
             return DONE;
         }
@@ -257,7 +257,7 @@
         return ch;
     }
 
-    private final void pushback(int ch) {
+    private void pushback(int ch) {
         if (ch >= 0) {
             if (ch >= 0x10000) {
                 scriptLimit -= 2;
@@ -287,7 +287,7 @@
      * @param n the word in which to find the highest bit that's set.
      * @return the bit number (counting from the low order bit) of the highest bit.
      */
-    private static final byte highBit(int n)
+    private static byte highBit(int n)
     {
         if (n <= 0) {
             return -32;
--- a/src/java.desktop/share/classes/sun/font/ScriptRunData.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/font/ScriptRunData.java	Thu Aug 28 14:54:07 2014 -0700
@@ -39,7 +39,7 @@
     private static final int CHAR_LIMIT = 0x110000;
 
     private static int cache = 0;
-    public static final int getScript(int cp) {
+    public static int getScript(int cp) {
         // optimize for runs of characters in the same script
         if (cp >= data[cache] && cp < data[cache+2]) {
             return data[cache+1];
--- a/src/java.desktop/share/classes/sun/font/StrikeCache.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/font/StrikeCache.java	Thu Aug 28 14:54:07 2014 -0700
@@ -202,7 +202,7 @@
         recentStrikeIndex = index;
     }
 
-    private static final void doDispose(FontStrikeDisposer disposer) {
+    private static void doDispose(FontStrikeDisposer disposer) {
         if (disposer.intGlyphImages != null) {
             freeCachedIntMemory(disposer.intGlyphImages,
                     disposer.pScalerContext);
--- a/src/java.desktop/share/classes/sun/font/SunFontManager.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/font/SunFontManager.java	Thu Aug 28 14:54:07 2014 -0700
@@ -3198,7 +3198,7 @@
      * Returns an array of two strings. The first element is the
      * name of the font. The second element is the file name.
      */
-    public abstract String[] getDefaultPlatformFont();
+    protected abstract String[] getDefaultPlatformFont();
 
     // Begin: Refactored from SunGraphicsEnviroment.
 
--- a/src/java.desktop/share/classes/sun/font/TrueTypeGlyphMapper.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/font/TrueTypeGlyphMapper.java	Thu Aug 28 14:54:07 2014 -0700
@@ -59,7 +59,11 @@
         }
         missingGlyph = 0; /* standard for TrueType fonts */
         ByteBuffer buffer = font.getTableBuffer(TrueTypeFont.maxpTag);
-        numGlyphs = buffer.getChar(4); // offset 4 bytes in MAXP table.
+        if (buffer != null && buffer.capacity() >= 6) {
+            numGlyphs = buffer.getChar(4); // offset 4 bytes in MAXP table.
+        } else {
+            handleBadCMAP();
+        }
         if (FontUtilities.isSolaris && isJAlocale && font.supportsJA()) {
             needsJAremapping = true;
             if (FontUtilities.isSolaris8 &&
--- a/src/java.desktop/share/classes/sun/java2d/StateTrackableDelegate.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/StateTrackableDelegate.java	Thu Aug 28 14:54:07 2014 -0700
@@ -250,7 +250,7 @@
      * {@code IMMUTABLE} delegate is never modified.
      * @since 1.7
      */
-    public final void markDirty() {
+    public void markDirty() {
         theTracker = null;
     }
 }
--- a/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java	Thu Aug 28 14:54:07 2014 -0700
@@ -917,7 +917,7 @@
      * Return the SurfaceData object assigned to manage the destination
      * drawable surface of this Graphics2D.
      */
-    public final SurfaceData getSurfaceData() {
+    public SurfaceData getSurfaceData() {
         return surfaceData;
     }
 
@@ -1734,7 +1734,7 @@
      *      compositeState <= COMP_CUSTOM)
      * though nothing bad will happen if it is run in other states.
      */
-    final void validateColor() {
+    void validateColor() {
         int eargb;
         if (imageComp == CompositeType.Clear) {
             eargb = 0;
--- a/src/java.desktop/share/classes/sun/java2d/cmm/lcms/LCMSProfile.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/cmm/lcms/LCMSProfile.java	Thu Aug 28 14:54:07 2014 -0700
@@ -43,7 +43,7 @@
         tagCache = new TagCache(this);
     }
 
-    final long getLcmsPtr() {
+    long getLcmsPtr() {
         return this.getNativePtr();
     }
 
--- a/src/java.desktop/share/classes/sun/java2d/loops/CompositeType.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/loops/CompositeType.java	Thu Aug 28 14:54:07 2014 -0700
@@ -242,7 +242,7 @@
         this.uniqueID = makeUniqueID(desc);
     }
 
-    public synchronized static final int makeUniqueID(String desc) {
+    public synchronized static int makeUniqueID(String desc) {
         Integer i = compositeUIDMap.get(desc);
 
         if (i == null) {
--- a/src/java.desktop/share/classes/sun/java2d/loops/SurfaceType.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/java2d/loops/SurfaceType.java	Thu Aug 28 14:54:07 2014 -0700
@@ -401,7 +401,7 @@
         this.pixelConverter = parent.pixelConverter;
     }
 
-    public synchronized static final int makeUniqueID(String desc) {
+    public static synchronized int makeUniqueID(String desc) {
         Integer i = surfaceUIDMap.get(desc);
 
         if (i == null) {
--- a/src/java.desktop/share/classes/sun/print/DialogOwner.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/print/DialogOwner.java	Thu Aug 28 14:54:07 2014 -0700
@@ -73,7 +73,7 @@
      * @return  Printing attribute class (category), an instance of class
      *          {@link java.lang.Class java.lang.Class}.
      */
-    public final Class<? extends Attribute> getCategory() {
+    public Class<? extends Attribute> getCategory() {
         return DialogOwner.class;
     }
 
@@ -87,7 +87,7 @@
      *
      * @return  Attribute category name.
      */
-    public final String getName() {
+    public String getName() {
         return "dialog-owner";
     }
 
--- a/src/java.desktop/share/classes/sun/print/SunMinMaxPage.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/print/SunMinMaxPage.java	Thu Aug 28 14:54:07 2014 -0700
@@ -40,23 +40,19 @@
        page_max = max;
     }
 
-
-    public final Class<? extends PrintRequestAttribute> getCategory() {
+    public Class<? extends PrintRequestAttribute> getCategory() {
         return SunMinMaxPage.class;
     }
 
-
-    public final int getMin() {
+    public int getMin() {
         return page_min;
     }
 
-    public final int getMax() {
+    public int getMax() {
         return page_max;
     }
 
-
-    public final String getName() {
+    public String getName() {
         return "sun-page-minmax";
     }
-
 }
--- a/src/java.desktop/share/classes/sun/print/SunPageSelection.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/classes/sun/print/SunPageSelection.java	Thu Aug 28 14:54:07 2014 -0700
@@ -44,11 +44,11 @@
         pages = value;
     }
 
-    public final Class<? extends Attribute> getCategory() {
+    public Class<? extends Attribute> getCategory() {
         return SunPageSelection.class;
     }
 
-    public final String getName() {
+    public String getName() {
         return "sun-page-selection";
     }
 
--- a/src/java.desktop/share/native/libawt/sun/awt/image/BufImgSurfaceData.c	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/share/native/libawt/sun/awt/image/BufImgSurfaceData.c	Thu Aug 28 14:54:07 2014 -0700
@@ -291,7 +291,12 @@
             = (*env)->GetBooleanField(env, bisdo->icm, allGrayID);
         int *pRgb = (int *)
             ((*env)->GetPrimitiveArrayCritical(env, bisdo->lutarray, NULL));
-        CHECK_NULL_RETURN(pRgb, (ColorData*)NULL);
+
+        if (pRgb == NULL) {
+            free(cData);
+            return (ColorData*)NULL;
+        }
+
         cData->img_clr_tbl = initCubemap(pRgb, bisdo->lutsize, 32);
         if (allGray == JNI_TRUE) {
             initInverseGrayLut(pRgb, bisdo->lutsize, cData);
@@ -304,7 +309,13 @@
         if (JNU_IsNull(env, colorData)) {
             jlong pData = ptr_to_jlong(cData);
             colorData = (*env)->NewObjectA(env, clsICMCD, initICMCDmID, (jvalue *)&pData);
-            JNU_CHECK_EXCEPTION_RETURN(env, (ColorData*)NULL);
+
+            if ((*env)->ExceptionCheck(env))
+            {
+                free(cData);
+                return (ColorData*)NULL;
+            }
+
             (*env)->SetObjectField(env, bisdo->icm, colorDataID, colorData);
         }
     }
--- a/src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java	Thu Aug 28 14:54:07 2014 -0700
@@ -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
@@ -40,7 +40,7 @@
  * For now, this class manages the list of items and painting thereof, but not
  * posting of Item or ActionEvents
  */
-public class ListHelper implements XScrollbarClient {
+final class ListHelper implements XScrollbarClient {
     private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.ListHelper");
 
     private final int FOCUS_INSET = 1;
@@ -79,24 +79,16 @@
     // Holds the true if mouse is dragging outside of the area of the list
     // The flag is used at the moment of the dragging and releasing mouse
     // See 6243382 for more information
-    boolean mouseDraggedOutVertically = false;
+    private boolean mouseDraggedOutVertically = false;
     private volatile boolean vsbVisibilityChanged = false;
 
     /*
      * Comment
      */
-    public ListHelper(XWindow peer,
-                      Color[] colors,
-                      int initialSize,
-                      boolean multiSelect,
-                      boolean scrollVert,
-                      boolean scrollHoriz,
-                      Font font,
-                      int maxVisItems,
-                      int SPACE,
-                      int MARGIN,
-                      int BORDER,
-                      int SCROLLBAR) {
+    ListHelper(XWindow peer, Color[] colors, int initialSize,
+               boolean multiSelect, boolean scrollVert, boolean scrollHoriz,
+               Font font, int maxVisItems, int SPACE, int MARGIN, int BORDER,
+               int SCROLLBAR) {
         this.peer = peer;
         this.colors = colors;
         this.multiSelect = multiSelect;
@@ -121,6 +113,7 @@
         SCROLLBAR_WIDTH = SCROLLBAR;
     }
 
+    @Override
     public Component getEventSource() {
         return peer.getEventSource();
     }
@@ -129,36 +122,36 @@
     /* List management methods                                            */
     /**********************************************************************/
 
-    public void add(String item) {
+    void add(String item) {
         items.add(item);
         updateScrollbars();
     }
 
-    public void add(String item, int index) {
+    void add(String item, int index) {
         items.add(index, item);
         updateScrollbars();
     }
 
-    public void remove(String item) {
+    void remove(String item) {
         // FIXME: need to clean up select list, too?
         items.remove(item);
         updateScrollbars();
         // Is vsb visible now?
     }
 
-    public void remove(int index) {
+    void remove(int index) {
         // FIXME: need to clean up select list, too?
         items.remove(index);
         updateScrollbars();
         // Is vsb visible now?
     }
 
-    public void removeAll() {
+    void removeAll() {
         items.removeAll(items);
         updateScrollbars();
     }
 
-    public void setMultiSelect(boolean ms) {
+    void setMultiSelect(boolean ms) {
         multiSelect = ms;
     }
 
@@ -167,7 +160,7 @@
      * merely keeps internal track of which items are selected for painting
      * dealing with target Components happens elsewhere
      */
-    public void select(int index) {
+    void select(int index) {
         if (index > getItemCount() - 1) {
             index = (isEmpty() ? -1 : 0);
         }
@@ -182,13 +175,13 @@
     }
 
     /* docs */
-    public void deselect(int index) {
+    void deselect(int index) {
         assert(false);
     }
 
     /* docs */
     /* if called for multiselect, return -1 */
-    public int getSelectedIndex() {
+    int getSelectedIndex() {
         if (!multiSelect) {
             Integer val = selected.get(0);
             return val.intValue();
@@ -202,21 +195,21 @@
      * A getter method for XChoicePeer.
      * Returns vsbVisiblityChanged value and sets it to false.
      */
-    public boolean checkVsbVisibilityChangedAndReset(){
+    boolean checkVsbVisibilityChangedAndReset(){
         boolean returnVal = vsbVisibilityChanged;
         vsbVisibilityChanged = false;
         return returnVal;
     }
 
-    public boolean isEmpty() {
+    boolean isEmpty() {
         return items.isEmpty();
     }
 
-    public int getItemCount() {
+    int getItemCount() {
         return items.size();
     }
 
-    public String getItem(int index) {
+    String getItem(int index) {
         return items.get(index);
     }
 
@@ -224,15 +217,15 @@
     /* GUI-related methods                                                */
     /**********************************************************************/
 
-    public void setFocusedIndex(int index) {
+    void setFocusedIndex(int index) {
         focusedIndex = index;
     }
 
-    public boolean isFocusedIndex(int index) {
+    private boolean isFocusedIndex(int index) {
         return index == focusedIndex;
     }
 
-    public void setFont(Font newFont) {
+    void setFont(Font newFont) {
         if (newFont != font) {
             font = newFont;
             fm = Toolkit.getDefaultToolkit().getFontMetrics(font);
@@ -243,7 +236,7 @@
     /*
      * Returns width of the text of the longest item
      */
-    public int getMaxItemWidth() {
+    int getMaxItemWidth() {
         int m = 0;
         int end = getItemCount();
         for(int i = 0 ; i < end ; i++) {
@@ -260,7 +253,7 @@
         return fm.getHeight() + (2*TEXT_SPACE);
     }
 
-    public int y2index(int y) {
+    int y2index(int y) {
         if (log.isLoggable(PlatformLogger.Level.FINE)) {
             log.fine("y=" + y +", firstIdx=" + firstDisplayedIndex() +", itemHeight=" + getItemHeight()
                      + ",item_margin=" + ITEM_MARGIN);
@@ -275,14 +268,14 @@
     public int numItemsDisplayed() {}
     */
 
-    public int firstDisplayedIndex() {
+    int firstDisplayedIndex() {
         if (vsbVis) {
             return vsb.getValue();
         }
         return 0;
     }
 
-    public int lastDisplayedIndex() {
+    int lastDisplayedIndex() {
         // FIXME: need to account for horiz scroll bar
         if (hsbVis) {
             assert false : "Implement for horiz scroll bar";
@@ -294,7 +287,7 @@
     /*
      * If the given index is not visible in the List, scroll so that it is.
      */
-    public void makeVisible(int index) {
+    private void makeVisible(int index) {
         if (vsbVis) {
             if (index < firstDisplayedIndex()) {
                 vsb.setValue(index);
@@ -306,7 +299,7 @@
     }
 
     // FIXME: multi-select needs separate focused index
-    public void up() {
+    void up() {
         int curIdx = getSelectedIndex();
         int numItems = getItemCount();
         int newIdx;
@@ -323,12 +316,12 @@
         select(newIdx);
     }
 
-    public void down() {
+    void down() {
         int newIdx = (getSelectedIndex() + 1) % getItemCount();
         select(newIdx);
     }
 
-    public void pageUp() {
+    void pageUp() {
         // FIXME: for multi-select, move the focused item, not the selected item
         if (vsbVis && firstDisplayedIndex() > 0) {
             if (multiSelect) {
@@ -343,7 +336,7 @@
             }
         }
     }
-    public void pageDown() {
+    void pageDown() {
         if (vsbVis && lastDisplayedIndex() < getItemCount() - 1) {
             if (multiSelect) {
                 assert false : "Implement pageDown() for multiSelect";
@@ -357,17 +350,17 @@
             }
         }
     }
-    public void home() {}
-    public void end() {}
+    void home() {}
+    void end() {}
 
 
-    public boolean isVSBVisible() { return vsbVis; }
-    public boolean isHSBVisible() { return hsbVis; }
+    boolean isVSBVisible() { return vsbVis; }
+    boolean isHSBVisible() { return hsbVis; }
 
-    public XVerticalScrollbar getVSB() { return vsb; }
-    public XHorizontalScrollbar getHSB() { return hsb; }
+    XVerticalScrollbar getVSB() { return vsb; }
+    XHorizontalScrollbar getHSB() { return hsb; }
 
-    public boolean isInVertSB(Rectangle bounds, int x, int y) {
+    boolean isInVertSB(Rectangle bounds, int x, int y) {
         if (vsbVis) {
             assert vsb != null : "Vert scrollbar is visible, yet is null?";
             int sbHeight = hsbVis ? bounds.height - SCROLLBAR_WIDTH : bounds.height;
@@ -379,7 +372,7 @@
         return false;
     }
 
-    public boolean isInHorizSB(Rectangle bounds, int x, int y) {
+    boolean isInHorizSB(Rectangle bounds, int x, int y) {
         if (hsbVis) {
             assert hsb != null : "Horiz scrollbar is visible, yet is null?";
 
@@ -392,7 +385,7 @@
         return false;
     }
 
-    public void handleVSBEvent(MouseEvent e, Rectangle bounds, int x, int y) {
+    void handleVSBEvent(MouseEvent e, Rectangle bounds, int x, int y) {
         int sbHeight = hsbVis ? bounds.height - SCROLLBAR_WIDTH : bounds.height;
 
         vsb.handleMouseEvent(e.getID(),
@@ -405,7 +398,7 @@
      * Called when items are added/removed.
      * Update whether the scrollbar is visible or not, scrollbar values
      */
-    void updateScrollbars() {
+    private void updateScrollbars() {
         boolean oldVsbVis = vsbVis;
         vsbVis = vsb != null && items.size() > maxVisItems;
         if (vsbVis) {
@@ -420,10 +413,11 @@
         // FIXME: check if added item makes a hsb necessary (if supported, that of course)
     }
 
-    public int getNumItemsDisplayed() {
+    private int getNumItemsDisplayed() {
         return items.size() > maxVisItems ? maxVisItems : items.size();
     }
 
+    @Override
     public void repaintScrollbarRequest(XScrollbar sb) {
         Graphics g = peer.getGraphics();
         Rectangle bounds = peer.getBounds();
@@ -436,6 +430,7 @@
         g.dispose();
     }
 
+    @Override
     public void notifyValue(XScrollbar obj, int type, int v, boolean isAdjusting) {
         if (obj == vsb) {
             int oldScrollValue = vsb.getValue();
@@ -467,7 +462,7 @@
         }
     }
 
-    public void updateColors(Color[] newColors) {
+    void updateColors(Color[] newColors) {
         colors = newColors;
     }
 
@@ -481,7 +476,7 @@
                            XVerticalScrollbar vsb,
                            XHorizontalScrollbar hsb) {
     */
-    public void paintItems(Graphics g,
+    void paintItems(Graphics g,
                            Color[] colors,
                            Rectangle bounds) {
         // paint border
@@ -490,17 +485,14 @@
         // paint focus?
 
     }
-    public void paintAllItems(Graphics g,
+    void paintAllItems(Graphics g,
                            Color[] colors,
                            Rectangle bounds) {
         paintItems(g, colors, bounds,
                    firstDisplayedIndex(), lastDisplayedIndex());
     }
-    public void paintItems(Graphics g,
-                           Color[] colors,
-                           Rectangle bounds,
-                           int first,
-                           int last) {
+    private void paintItems(Graphics g, Color[] colors, Rectangle bounds,
+                            int first, int last) {
         peer.flush();
         int x = BORDER_WIDTH + ITEM_MARGIN;
         int width = bounds.width - 2*ITEM_MARGIN - 2*BORDER_WIDTH - (vsbVis ? SCROLLBAR_WIDTH : 0);
@@ -529,12 +521,9 @@
     /*
      * comment about what is painted (i.e. the focus rect
      */
-    public void paintItem(Graphics g,
-                          Color[] colors,
-                          String string,
-                          int x, int y, int width, int height,
-                          boolean selected,
-                          boolean focused) {
+    private void paintItem(Graphics g, Color[] colors, String string, int x,
+                           int y, int width, int height, boolean selected,
+                           boolean focused) {
         //System.out.println("LP.pI(): x="+x+" y="+y+" w="+width+" h="+height);
         //g.setColor(colors[BACKGROUND_COLOR]);
 
@@ -575,7 +564,7 @@
         //g.clipRect(clip.x, clip.y, clip.width, clip.height);
     }
 
-    boolean isItemSelected(int index) {
+    private boolean isItemSelected(int index) {
         Iterator<Integer> itr = selected.iterator();
         while (itr.hasNext()) {
             Integer val = itr.next();
@@ -586,7 +575,7 @@
         return false;
     }
 
-    public void paintVSB(Graphics g, Color colors[], Rectangle bounds) {
+    private void paintVSB(Graphics g, Color colors[], Rectangle bounds) {
         int height = bounds.height - 2*BORDER_WIDTH - (hsbVis ? (SCROLLBAR_WIDTH-2) : 0);
         Graphics ng = g.create();
 
@@ -602,7 +591,7 @@
         }
     }
 
-    public void paintHSB(Graphics g, Color colors[], Rectangle bounds) {
+    private void paintHSB(Graphics g, Color colors[], Rectangle bounds) {
 
     }
 
--- a/src/java.desktop/unix/classes/sun/awt/X11/XAtom.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XAtom.java	Thu Aug 28 14:54:07 2014 -0700
@@ -179,7 +179,7 @@
         }
         return xatom;
     }
-    public final String getName() {
+    public String getName() {
         if (name == null) {
             XToolkit.awtLock();
             try {
--- a/src/java.desktop/unix/classes/sun/awt/X11/XDataTransferer.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XDataTransferer.java	Thu Aug 28 14:54:07 2014 -0700
@@ -29,7 +29,6 @@
 
 import java.awt.datatransfer.DataFlavor;
 import java.awt.datatransfer.Transferable;
-import java.awt.datatransfer.UnsupportedFlavorException;
 
 import java.awt.image.BufferedImage;
 import java.awt.image.ColorModel;
@@ -46,7 +45,6 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
-import java.util.List;
 
 import javax.imageio.ImageIO;
 import javax.imageio.ImageReader;
@@ -54,11 +52,11 @@
 import javax.imageio.ImageWriter;
 import javax.imageio.spi.ImageWriterSpi;
 
+import sun.datatransfer.DataFlavorUtil;
 import sun.awt.datatransfer.DataTransferer;
 import sun.awt.datatransfer.ToolkitThreadBlockedHandler;
 
 import java.io.ByteArrayOutputStream;
-import java.util.stream.Stream;
 
 /**
  * Platform-specific support for the data transfer subsystem.
@@ -87,27 +85,30 @@
         return transferer;
     }
 
+    @Override
     public String getDefaultUnicodeEncoding() {
         return "iso-10646-ucs-2";
     }
 
+    @Override
     public boolean isLocaleDependentTextFormat(long format) {
         return false;
     }
 
+    @Override
     public boolean isTextFormat(long format) {
         return super.isTextFormat(format)
             || isMimeFormat(format, "text");
     }
 
+    @Override
     protected String getCharsetForTextFormat(Long lFormat) {
-        long format = lFormat.longValue();
-        if (isMimeFormat(format, "text")) {
-            String nat = getNativeForFormat(format);
+        if (isMimeFormat(lFormat, "text")) {
+            String nat = getNativeForFormat(lFormat);
             DataFlavor df = new DataFlavor(nat, null);
             // Ignore the charset parameter of the MIME type if the subtype
             // doesn't support charset.
-            if (!DataTransferer.doesSubtypeSupportCharset(df)) {
+            if (!DataFlavorUtil.doesSubtypeSupportCharset(df)) {
                 return null;
             }
             String charset = df.getParameter("charset");
@@ -118,6 +119,7 @@
         return super.getCharsetForTextFormat(lFormat);
     }
 
+    @Override
     protected boolean isURIListFormat(long format) {
         String nat = getNativeForFormat(format);
         if (nat == null) {
@@ -134,24 +136,27 @@
         return false;
     }
 
+    @Override
     public boolean isFileFormat(long format) {
         return format == FILE_NAME_ATOM.getAtom() ||
             format == DT_NET_FILE_ATOM.getAtom();
     }
 
+    @Override
     public boolean isImageFormat(long format) {
         return format == PNG_ATOM.getAtom() ||
             format == JFIF_ATOM.getAtom() ||
             isMimeFormat(format, "image");
     }
 
+    @Override
     protected Long getFormatForNativeAsLong(String str) {
         // Just get the atom. If it has already been retrived
         // once, we'll get a copy so this should be very fast.
-        long atom = XAtom.get(str).getAtom();
-        return Long.valueOf(atom);
+        return XAtom.get(str).getAtom();
     }
 
+    @Override
     protected String getNativeForFormat(long format) {
         return getTargetNameForAtom(format);
     }
@@ -167,6 +172,7 @@
         return XAtom.get(atom).getName();
     }
 
+    @Override
     protected byte[] imageToPlatformBytes(Image image, long format)
       throws IOException {
         String mimeType = null;
@@ -196,6 +202,7 @@
         }
     }
 
+    @Override
     protected ByteArrayOutputStream convertFileListToBytes(ArrayList<String> fileList)
         throws IOException
     {
@@ -213,6 +220,7 @@
      * Translates either a byte array or an input stream which contain
      * platform-specific image data in the given format into an Image.
      */
+    @Override
     protected Image platformImageBytesToImage(
         byte[] bytes, long format) throws IOException
     {
@@ -317,8 +325,7 @@
             return flavors;
         }
 
-        DataFlavor df = null;
-
+        DataFlavor df;
         try {
             df = new DataFlavor(nat);
         } catch (Exception e) {
@@ -383,7 +390,7 @@
         String baseType = df.getPrimaryType() + "/" + df.getSubType();
         String mimeType = baseType;
 
-        if (charset != null && DataTransferer.isFlavorCharsetTextType(df)) {
+        if (charset != null && DataFlavorUtil.isFlavorCharsetTextType(df)) {
             mimeType += ";charset=" + charset;
         }
 
@@ -413,14 +420,14 @@
                     }
                 }
             }
-        } else if (DataTransferer.isFlavorCharsetTextType(df)) {
+        } else if (DataFlavorUtil.isFlavorCharsetTextType(df)) {
             // stringFlavor is semantically equivalent to the standard
             // "text/plain" MIME type.
             if (DataFlavor.stringFlavor.equals(df)) {
                 baseType = "text/plain";
             }
 
-            for (String encoding : DataTransferer.standardEncodings()) {
+            for (String encoding : DataFlavorUtil.standardEncodings()) {
                 if (!encoding.equals(charset)) {
                     natives.add(baseType + ";charset=" + encoding);
                 }
--- a/src/java.desktop/unix/classes/sun/awt/X11/XDropTargetRegistry.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XDropTargetRegistry.java	Thu Aug 28 14:54:07 2014 -0700
@@ -86,7 +86,7 @@
         return window;
     }
 
-    static final long getDnDProxyWindow() {
+    static long getDnDProxyWindow() {
         return XWindow.getXAWTRootWindow().getWindow();
     }
 
--- a/src/java.desktop/unix/classes/sun/awt/X11/XSelection.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XSelection.java	Thu Aug 28 14:54:07 2014 -0700
@@ -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
@@ -43,7 +43,7 @@
 /**
  * A class which interfaces with the X11 selection service.
  */
-public final class XSelection {
+final class XSelection {
 
     /* Maps atoms to XSelection instances. */
     private static final Hashtable<XAtom, XSelection> table = new Hashtable<XAtom, XSelection>();
@@ -119,11 +119,10 @@
     /**
      * Creates a selection object.
      *
-     * @param atom   the selection atom.
-     * @param clpbrd the corresponding clipoboard
-     * @exception NullPointerException if atom is <code>null</code>.
+     * @param  atom the selection atom
+     * @throws NullPointerException if atom is {@code null}
      */
-    public XSelection(XAtom atom) {
+    XSelection(XAtom atom) {
         if (atom == null) {
             throw new NullPointerException("Null atom");
         }
@@ -135,10 +134,9 @@
         return selectionAtom;
     }
 
-    public synchronized boolean setOwner(Transferable contents,
-                                         Map<Long, DataFlavor> formatMap,
-                                         long[] formats, long time)
-    {
+    synchronized boolean setOwner(Transferable contents,
+                                  Map<Long, DataFlavor> formatMap,
+                                  long[] formats, long time) {
         long owner = XWindow.getXAWTRootWindow().getWindow();
         long selection = selectionAtom.getAtom();
 
@@ -435,7 +433,7 @@
         return data != null ? data : new byte[0];
     }
 
-    void validateDataGetter(WindowPropertyGetter propertyGetter)
+    private void validateDataGetter(WindowPropertyGetter propertyGetter)
             throws IOException
     {
         // The order of checks is important because a property getter
--- a/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java	Thu Aug 28 14:54:07 2014 -0700
@@ -159,13 +159,13 @@
 
     static native void awt_output_flush();
 
-    static final void  awtFUnlock() {
+    static void  awtFUnlock() {
         awtUnlock();
         awt_output_flush();
     }
 
 
-    public native void nativeLoadSystemColors(int[] systemColors);
+    private native void nativeLoadSystemColors(int[] systemColors);
 
     static UIDefaults getUIDefaults() {
         if (uidefaults == null) {
@@ -876,7 +876,7 @@
     */
 
     // Need this for XMenuItemPeer.
-    protected static final Object targetToPeer(Object target) {
+    protected static Object targetToPeer(Object target) {
         Object p=null;
         if (target != null && !GraphicsEnvironment.isHeadless()) {
             p = specialPeerMap.get(target);
@@ -887,7 +887,7 @@
     }
 
     // Need this for XMenuItemPeer.
-    protected static final void targetDisposedPeer(Object target, Object peer) {
+    protected static void targetDisposedPeer(Object target, Object peer) {
         SunToolkit.targetDisposedPeer(target, peer);
     }
 
--- a/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java	Thu Aug 28 14:54:07 2014 -0700
@@ -43,7 +43,7 @@
 import sun.java2d.SunGraphics2D;
 import sun.java2d.SurfaceData;
 
-public class XWindow extends XBaseWindow implements X11ComponentPeer {
+class XWindow extends XBaseWindow implements X11ComponentPeer {
     private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XWindow");
     private static PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XWindow");
     private static PlatformLogger eventLog = PlatformLogger.getLogger("sun.awt.X11.event.XWindow");
@@ -858,8 +858,10 @@
 
 
     // REMIND: need to implement looking for disabled events
-    public native boolean x11inputMethodLookupString(long event, long [] keysymArray);
-    native boolean haveCurrentX11InputMethodInstance();
+    private native boolean x11inputMethodLookupString(long event,
+                                                      long[] keysymArray);
+
+    private native boolean haveCurrentX11InputMethodInstance();
 
     private boolean mouseAboveMe;
 
--- a/src/java.desktop/unix/classes/sun/awt/X11/XlibWrapper.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XlibWrapper.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -26,12 +26,12 @@
 package sun.awt.X11;
 
 import java.security.AccessController;
-import java.security.PrivilegedAction;
+
+import sun.misc.Unsafe;
 import sun.security.action.GetPropertyAction;
-import sun.misc.*;
 
-final public class XlibWrapper
-{
+final class XlibWrapper {
+
     static Unsafe unsafe = Unsafe.getUnsafe();
     // strange constants
     static final int MAXSIZE = 32767;
@@ -48,7 +48,7 @@
    char *display_name;
 
 */
-    public final static String eventToString[]=
+    static final String[] eventToString =
     {"<none:0>", "<none:1>", "KeyPress", "KeyRelease", "ButtonPress", "ButtonRelease",
      "MotionNotify", "EnterNotify", "LeaveNotify", "FocusIn", "FocusOut",
      "KeymapNotify", "Expose", "GraphicsExpose", "NoExpose", "VisibilityNotify",
@@ -66,7 +66,7 @@
 
     /**
      * Gets byte string from str_ptr and copies it into byte array
-     * String should be NULL terminated
+     * String should be NULL terminated.
      */
     static native byte[] getStringBytes(long str_ptr);
 
@@ -529,7 +529,7 @@
           display   Specifies the connection to the X server.
           onoff     Specifies a Boolean value that indicates whether to enable or disable synchronization.
      */
-    public static native int XSynchronize(long display, boolean onoff);
+    static native int XSynchronize(long display, boolean onoff);
 
     /**
      * Extracts an X event that can be processed in a secondary loop.
--- a/src/java.desktop/unix/classes/sun/awt/X11FontManager.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/unix/classes/sun/awt/X11FontManager.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,3 +1,28 @@
+/*
+ * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
 package sun.awt;
 
 import java.awt.GraphicsEnvironment;
@@ -29,7 +54,7 @@
 /**
  * The X11 implementation of {@link FontManager}.
  */
-public class X11FontManager extends SunFontManager {
+public final class X11FontManager extends SunFontManager {
 
     // constants identifying XLFD and font ID fields
     private static final int FOUNDRY_FIELD = 1;
@@ -129,8 +154,6 @@
       */
      private static String[] fontdirs = null;
 
-    private static String[] defaultPlatformFont = null;
-
     private FontConfigManager fcManager = null;
 
     public static X11FontManager getInstance() {
@@ -768,11 +791,9 @@
         return getFontPathNative(noType1Fonts);
     }
 
-    public String[] getDefaultPlatformFont() {
-        if (defaultPlatformFont != null) {
-            return defaultPlatformFont;
-        }
-        String[] info = new String[2];
+    @Override
+    protected String[] getDefaultPlatformFont() {
+        final String[] info = new String[2];
         getFontConfigManager().initFontConfigFonts(false);
         FontConfigManager.FcCompFont[] fontConfigFonts =
             getFontConfigManager().getFontConfigFonts();
@@ -798,8 +819,7 @@
                 info[1] = "/dialog.ttf";
             }
         }
-        defaultPlatformFont = info;
-        return defaultPlatformFont;
+        return info;
     }
 
     public synchronized FontConfigManager getFontConfigManager() {
--- a/src/java.desktop/windows/classes/sun/awt/Win32FontManager.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/windows/classes/sun/awt/Win32FontManager.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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 @@
 import java.util.NoSuchElementException;
 import java.util.StringTokenizer;
 
-import sun.awt.Win32GraphicsEnvironment;
 import sun.awt.windows.WFontConfiguration;
 import sun.font.FontManager;
 import sun.font.SunFontManager;
@@ -46,9 +45,7 @@
 /**
  * The X11 implementation of {@link FontManager}.
  */
-public class Win32FontManager extends SunFontManager {
-
-    private static String[] defaultPlatformFont = null;
+public final class Win32FontManager extends SunFontManager {
 
     private static TrueTypeFont eudcFont;
 
@@ -213,12 +210,8 @@
 
     protected synchronized native String getFontPath(boolean noType1Fonts);
 
-    public String[] getDefaultPlatformFont() {
-
-        if (defaultPlatformFont != null) {
-            return defaultPlatformFont;
-        }
-
+    @Override
+    protected String[] getDefaultPlatformFont() {
         String[] info = new String[2];
         info[0] = "Arial";
         info[1] = "c:\\windows\\fonts";
@@ -245,8 +238,7 @@
             info[1] = dirs[0];
         }
         info[1] = info[1] + File.separator + "arial.ttf";
-        defaultPlatformFont = info;
-        return defaultPlatformFont;
+        return info;
     }
 
     /* register only TrueType/OpenType fonts
--- a/src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/windows/classes/sun/awt/windows/WInputMethod.java	Thu Aug 28 14:54:07 2014 -0700
@@ -145,7 +145,7 @@
     }
 
     @Override
-    public final void dispose() {
+    public void dispose() {
         // Due to a memory management problem in Windows 98, we should retain
         // the native input context until this object is finalized. So do
         // nothing here.
--- a/src/java.desktop/windows/classes/sun/awt/windows/WPrinterJob.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/windows/classes/sun/awt/windows/WPrinterJob.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1573,7 +1573,7 @@
 
     //** BEGIN Functions called by native code for querying/updating attributes
 
-    private final String getPrinterAttrib() {
+    private String getPrinterAttrib() {
         // getPrintService will get current print service or default if none
         PrintService service = this.getPrintService();
         String name = (service != null) ? service.getName() : null;
@@ -1581,7 +1581,7 @@
     }
 
     /* SheetCollate */
-    private final int getCollateAttrib() {
+    private int getCollateAttrib() {
         // -1 means unset, 0 uncollated, 1 collated.
         return mAttCollate;
     }
@@ -1602,7 +1602,7 @@
 
     /* Orientation */
 
-    private final int getOrientAttrib() {
+    private int getOrientAttrib() {
         int orient = PageFormat.PORTRAIT;
         OrientationRequested orientReq = (attributes == null) ? null :
             (OrientationRequested)attributes.get(OrientationRequested.class);
@@ -1629,7 +1629,7 @@
     }
 
     /* Copies and Page Range. */
-    private final int getCopiesAttrib() {
+    private int getCopiesAttrib() {
         if (defaultCopies) {
             return 0;
         } else {
@@ -1637,9 +1637,8 @@
         }
      }
 
-    private final void setRangeCopiesAttribute(int from, int to,
-                                               boolean isRangeSet,
-                                               int copies) {
+    private void setRangeCopiesAttribute(int from, int to, boolean isRangeSet,
+                                         int copies) {
         if (attributes != null) {
             if (isRangeSet) {
                 attributes.add(new PageRanges(from, to));
@@ -1658,12 +1657,12 @@
 
 
 
-    private final boolean getDestAttrib() {
+    private boolean getDestAttrib() {
         return (mDestination != null);
     }
 
     /* Quality */
-    private final int getQualityAttrib() {
+    private int getQualityAttrib() {
         return mAttQuality;
     }
 
@@ -1684,7 +1683,7 @@
     }
 
     /* Color/Chromaticity */
-    private final int getColorAttrib() {
+    private int getColorAttrib() {
         return mAttChromaticity;
     }
 
@@ -1703,7 +1702,7 @@
     }
 
     /* Sides */
-    private final int getSidesAttrib() {
+    private int getSidesAttrib() {
         return mAttSides;
     }
 
@@ -1724,7 +1723,7 @@
     }
 
     /** MediaSizeName / dmPaper */
-    private final int[] getWin32MediaAttrib() {
+    private int[] getWin32MediaAttrib() {
         int wid_ht[] = {0, 0};
         if (attributes != null) {
             Media media = (Media)attributes.get(Media.class);
@@ -1810,7 +1809,7 @@
 
 
 
-    private final boolean getPrintToFileEnabled() {
+    private boolean getPrintToFileEnabled() {
         SecurityManager security = System.getSecurityManager();
         if (security != null) {
             FilePermission printToFilePermission =
@@ -1824,7 +1823,7 @@
         return true;
     }
 
-    private final void setNativeAttributes(int flags, int fields, int values) {
+    private void setNativeAttributes(int flags, int fields, int values) {
         if (attributes == null) {
             return;
         }
@@ -2016,7 +2015,7 @@
      * The attribute set here is a temporary one installed whilst this
      * happens,
      */
-    private final void setJobAttributes(PrintRequestAttributeSet attributes,
+    private void setJobAttributes(PrintRequestAttributeSet attributes,
                                         int fields, int values,
                                         short copies,
                                         short dmPaperSize,
@@ -2152,7 +2151,7 @@
     }
 
     /* Printer Resolution. See also getXRes() and getYRes() */
-    private final void setResolutionDPI(int xres, int yres) {
+    private void setResolutionDPI(int xres, int yres) {
         if (attributes != null) {
             PrinterResolution res =
                 new PrinterResolution(xres, yres, PrinterResolution.DPI);
--- a/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/windows/classes/sun/awt/windows/WToolkit.java	Thu Aug 28 14:54:07 2014 -0700
@@ -276,7 +276,7 @@
         setExtraMouseButtonsEnabledNative(areExtraMouseButtonsEnabled);
     }
 
-    private final void registerShutdownHook() {
+    private void registerShutdownHook() {
         AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
             Thread shutdown = new Thread(ThreadGroupUtils.getRootThreadGroup(), this::shutdown);
             shutdown.setContextClassLoader(null);
@@ -746,11 +746,11 @@
     @Override
     protected native void loadSystemColors(int[] systemColors);
 
-    public static final Object targetToPeer(Object target) {
+    public static Object targetToPeer(Object target) {
         return SunToolkit.targetToPeer(target);
     }
 
-    public static final void targetDisposedPeer(Object target, Object peer) {
+    public static void targetDisposedPeer(Object target, Object peer) {
         SunToolkit.targetDisposedPeer(target, peer);
     }
 
--- a/src/java.desktop/windows/native/libawt/sun/windows/awt_Button.cpp	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/windows/native/libawt/sun/windows/awt_Button.cpp	Thu Aug 28 14:54:07 2014 -0700
@@ -186,7 +186,7 @@
 void
 AwtButton::NotifyListeners()
 {
-    DoCallback("handleAction", "(JI)V", TimeHelper::getMessageTimeUTC(),
+    DoCallback("handleAction", "(JI)V", ::JVM_CurrentTimeMillis(NULL, 0),
                (jint)AwtComponent::GetJavaModifiers());
 }
 
--- a/src/java.desktop/windows/native/libawt/sun/windows/awt_Component.cpp	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/windows/native/libawt/sun/windows/awt_Component.cpp	Thu Aug 28 14:54:07 2014 -0700
@@ -467,7 +467,9 @@
         jclass win32GCCls = env->FindClass("sun/awt/Win32GraphicsConfig");
         DASSERT(win32GCCls != NULL);
         DASSERT(env->IsInstanceOf(compGC, win32GCCls));
-        CHECK_NULL(win32GCCls);
+        if (win32GCCls == NULL) {
+            throw std::bad_alloc();
+        }
         env->SetObjectField(peer, AwtComponent::peerGCID, compGC);
     }
 }
@@ -2125,37 +2127,6 @@
     return mrDoDefault;
 }
 
-namespace TimeHelper {
-    // Sometimes the message belongs to another event queue and
-    // GetMessageTime() may return wrong non-zero value (the case is
-    // the TrayIcon peer). Using TimeHelper::windowsToUTC(::GetTickCount())
-    // could help there.
-    static DWORD getMessageTimeWindows(){
-        DWORD time = ::GetMessageTime();
-        // The following 'if' seems to be a unneeded hack.
-        // Consider removing it.
-        if (time == 0) {
-            time = ::GetTickCount();
-        }
-        return time;
-    }
-
-    jlong getMessageTimeUTC() {
-        return windowsToUTC(getMessageTimeWindows());
-    }
-
-    // If calling order of GetTickCount and JVM_CurrentTimeMillis
-    // is swapped, it would sometimes give different result.
-    // Anyway, we would not always have determinism
-    // and sortedness of time conversion here (due to Windows's
-    // timers peculiarities). Having some euristic algorithm might
-    // help here.
-    jlong windowsToUTC(DWORD windowsTime) {
-        jlong offset = ::GetTickCount() - windowsTime;
-        jlong jvm_time = ::JVM_CurrentTimeMillis(NULL, 0);
-        return jvm_time - offset;
-    }
-} //TimeHelper
 
 MsgRouting AwtComponent::WmPaint(HDC)
 {
@@ -2253,7 +2224,7 @@
 MsgRouting AwtComponent::WmMouseEnter(UINT flags, int x, int y)
 {
     SendMouseEvent(java_awt_event_MouseEvent_MOUSE_ENTERED,
-                   TimeHelper::getMessageTimeUTC(), x, y, GetJavaModifiers(), 0, JNI_FALSE);
+                   ::JVM_CurrentTimeMillis(NULL, 0), x, y, GetJavaModifiers(), 0, JNI_FALSE);
     if ((flags & ALL_MK_BUTTONS) == 0) {
         AwtCursor::UpdateCursor(this);
     }
@@ -2288,7 +2259,7 @@
     msg->message = message;
     msg->wParam = wParam;
     msg->lParam = lParam;
-    msg->time = TimeHelper::getMessageTimeWindows();
+    msg->time = ::GetMessageTime();
     msg->pt.x = x;
     msg->pt.y = y;
 }
@@ -2327,7 +2298,7 @@
 
 MsgRouting AwtComponent::WmMouseDown(UINT flags, int x, int y, int button)
 {
-    jlong now = TimeHelper::getMessageTimeUTC();
+    jlong now = ::JVM_CurrentTimeMillis(NULL, 0);
 
     if (lastClickWnd == this &&
         lastButton == button &&
@@ -2392,7 +2363,7 @@
     MSG msg;
     InitMessage(&msg, lastMessage, flags, MAKELPARAM(x, y), x, y);
 
-    SendMouseEvent(java_awt_event_MouseEvent_MOUSE_RELEASED, TimeHelper::getMessageTimeUTC(),
+    SendMouseEvent(java_awt_event_MouseEvent_MOUSE_RELEASED, ::JVM_CurrentTimeMillis(NULL, 0),
                    x, y, GetJavaModifiers(), clickCount,
                    (GetButton(button) == java_awt_event_MouseEvent_BUTTON3 ?
                     TRUE : FALSE), GetButton(button), &msg);
@@ -2403,7 +2374,7 @@
      */
     if ((m_mouseButtonClickAllowed & GetButtonMK(button)) != 0) { //CLICK allowed
         SendMouseEvent(java_awt_event_MouseEvent_MOUSE_CLICKED,
-                       TimeHelper::getMessageTimeUTC(), x, y, GetJavaModifiers(),
+                       ::JVM_CurrentTimeMillis(NULL, 0), x, y, GetJavaModifiers(),
                        clickCount, JNI_FALSE, GetButton(button));
     }
     // Exclude button from allowed to generate CLICK messages
@@ -2452,7 +2423,7 @@
             // This is a partial backout of 5039416 fix.
             MSG msg;
             InitMessage(&msg, lastMessage, flags, MAKELPARAM(x, y), x, y);
-            SendMouseEvent(java_awt_event_MouseEvent_MOUSE_DRAGGED, TimeHelper::getMessageTimeUTC(), x, y,
+            SendMouseEvent(java_awt_event_MouseEvent_MOUSE_DRAGGED, ::JVM_CurrentTimeMillis(NULL, 0), x, y,
                            GetJavaModifiers(), 0, JNI_FALSE,
                            java_awt_event_MouseEvent_NOBUTTON, &msg);
             //dragging means no more CLICKs until next WM_MOUSE_DOWN/WM_MOUSE_UP message sequence
@@ -2460,7 +2431,7 @@
         } else {
             MSG msg;
             InitMessage(&msg, lastMessage, flags, MAKELPARAM(x, y), x, y);
-            SendMouseEvent(java_awt_event_MouseEvent_MOUSE_MOVED, TimeHelper::getMessageTimeUTC(), x, y,
+            SendMouseEvent(java_awt_event_MouseEvent_MOUSE_MOVED, ::JVM_CurrentTimeMillis(NULL, 0), x, y,
                            GetJavaModifiers(), 0, JNI_FALSE,
                            java_awt_event_MouseEvent_NOBUTTON, &msg);
         }
@@ -2471,7 +2442,7 @@
 
 MsgRouting AwtComponent::WmMouseExit(UINT flags, int x, int y)
 {
-    SendMouseEvent(java_awt_event_MouseEvent_MOUSE_EXITED, TimeHelper::getMessageTimeUTC(), x,
+    SendMouseEvent(java_awt_event_MouseEvent_MOUSE_EXITED, ::JVM_CurrentTimeMillis(NULL, 0), x,
                    y, GetJavaModifiers(), 0, JNI_FALSE);
     sm_cursorOn = NULL;
     return mrConsume;   /* Don't pass our synthetic event on! */
@@ -2523,7 +2494,7 @@
 
     DTRACE_PRINTLN("calling SendMouseWheelEvent");
 
-    SendMouseWheelEvent(java_awt_event_MouseEvent_MOUSE_WHEEL, TimeHelper::getMessageTimeUTC(),
+    SendMouseWheelEvent(java_awt_event_MouseEvent_MOUSE_WHEEL, ::JVM_CurrentTimeMillis(NULL, 0),
                         eventPt.x, eventPt.y, GetJavaModifiers(), 0, 0, scrollType,
                         scrollLines, roundedWheelRotation, preciseWheelRotation, &msg);
 
@@ -3578,7 +3549,7 @@
 
 
     SendKeyEventToFocusOwner(java_awt_event_KeyEvent_KEY_PRESSED,
-                             TimeHelper::windowsToUTC(msg.time), jkey, character,
+                             ::JVM_CurrentTimeMillis(NULL, 0), jkey, character,
                              modifiers, keyLocation, (jlong)wkey, &msg);
 
     // bugid 4724007: Windows does not create a WM_CHAR for the Del key
@@ -3588,7 +3559,7 @@
     // for Java - we don't want Windows trying to process it).
     if (jkey == java_awt_event_KeyEvent_VK_DELETE) {
         SendKeyEventToFocusOwner(java_awt_event_KeyEvent_KEY_TYPED,
-                                 TimeHelper::windowsToUTC(msg.time),
+                                 ::JVM_CurrentTimeMillis(NULL, 0),
                                  java_awt_event_KeyEvent_VK_UNDEFINED,
                                  character, modifiers,
                                  java_awt_event_KeyEvent_KEY_LOCATION_UNKNOWN, (jlong)0);
@@ -3620,7 +3591,7 @@
     UpdateDynPrimaryKeymap(wkey, jkey, keyLocation, modifiers);
 
     SendKeyEventToFocusOwner(java_awt_event_KeyEvent_KEY_RELEASED,
-                             TimeHelper::windowsToUTC(msg.time), jkey, character,
+                             ::JVM_CurrentTimeMillis(NULL, 0), jkey, character,
                              modifiers, keyLocation, (jlong)wkey, &msg);
     return mrConsume;
 }
@@ -3665,7 +3636,7 @@
 
     jint modifiers = GetJavaModifiers();
     SendKeyEventToFocusOwner(java_awt_event_KeyEvent_KEY_TYPED,
-                             TimeHelper::windowsToUTC(msg.time),
+                             ::JVM_CurrentTimeMillis(NULL, 0),
                              java_awt_event_KeyEvent_VK_UNDEFINED,
                              unicodeChar, modifiers,
                              java_awt_event_KeyEvent_KEY_LOCATION_UNKNOWN, (jlong)0,
@@ -3734,7 +3705,7 @@
     InitMessage(&msg, message, character,
                               MAKELPARAM(repCnt, flags));
     SendKeyEventToFocusOwner(java_awt_event_KeyEvent_KEY_TYPED,
-                             TimeHelper::windowsToUTC(msg.time),
+                             ::JVM_CurrentTimeMillis(NULL, 0),
                              java_awt_event_KeyEvent_VK_UNDEFINED,
                              unicodeChar, modifiers,
                              java_awt_event_KeyEvent_KEY_LOCATION_UNKNOWN, (jlong)0,
@@ -4020,7 +3991,7 @@
     }
 
     // call m_InputMethod.sendInputMethod()
-    env->CallVoidMethod(m_InputMethod, sendIMEventMid, id, TimeHelper::getMessageTimeUTC(),
+    env->CallVoidMethod(m_InputMethod, sendIMEventMid, id, ::JVM_CurrentTimeMillis(NULL, 0),
                         text, clauseBoundary, clauseReading, attrBoundary,
                         attrValue, commitedTextLength, caretPos, visiblePos);
     if (safe_ExceptionOccurred(env))   env->ExceptionDescribe();
--- a/src/java.desktop/windows/native/libawt/sun/windows/awt_Component.h	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/windows/native/libawt/sun/windows/awt_Component.h	Thu Aug 28 14:54:07 2014 -0700
@@ -908,11 +908,6 @@
 void ReleaseDCList(HWND hwnd, DCList &list);
 void MoveDCToPassiveList(HDC hDC);
 
-namespace TimeHelper{
-    jlong getMessageTimeUTC();
-    jlong windowsToUTC(DWORD event_offset);
-}
-
 #include "ObjectList.h"
 
 #endif /* AWT_COMPONENT_H */
--- a/src/java.desktop/windows/native/libawt/sun/windows/awt_Cursor.cpp	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/windows/native/libawt/sun/windows/awt_Cursor.cpp	Thu Aug 28 14:54:07 2014 -0700
@@ -229,9 +229,10 @@
                 if (cur != NULL) {
                     ::SetCursor(cur);
                 } else {
-                    safe_ExceptionOccurred(env);
+                    if (safe_ExceptionOccurred(env)) {
+                        env->ExceptionClear();
+                    }
                 }
-
                 if (AwtCursor::updateCursorID == NULL) {
                     jclass cls =
                     env->FindClass("sun/awt/windows/WGlobalCursorManager");
--- a/src/java.desktop/windows/native/libawt/sun/windows/awt_List.cpp	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/windows/native/libawt/sun/windows/awt_List.cpp	Thu Aug 28 14:54:07 2014 -0700
@@ -535,7 +535,7 @@
             }
             else if (notifyCode == LBN_DBLCLK) {
                 DoCallback("handleAction", "(IJI)V", nCurrentSelection,
-                           TimeHelper::getMessageTimeUTC(),
+                           ::JVM_CurrentTimeMillis(NULL, 0),
                            (jint)AwtComponent::GetJavaModifiers());
             }
         }
--- a/src/java.desktop/windows/native/libawt/sun/windows/awt_MenuItem.cpp	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/windows/native/libawt/sun/windows/awt_MenuItem.cpp	Thu Aug 28 14:54:07 2014 -0700
@@ -665,7 +665,7 @@
         DASSERT(nState != 0xFFFFFFFF);
         DoCallback("handleAction", "(Z)V", ((nState & MF_CHECKED) == 0));
     } else {
-        DoCallback("handleAction", "(JI)V", TimeHelper::getMessageTimeUTC(),
+        DoCallback("handleAction", "(JI)V", ::JVM_CurrentTimeMillis(NULL, 0),
                    (jint)AwtComponent::GetJavaModifiers());
     }
 }
--- a/src/java.desktop/windows/native/libawt/sun/windows/awt_PrintJob.cpp	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/windows/native/libawt/sun/windows/awt_PrintJob.cpp	Thu Aug 28 14:54:07 2014 -0700
@@ -758,6 +758,7 @@
   // through print dialog or start of printing
   // None of those may have happened yet, so call initPrinter()
   initPrinter(env, self);
+  JNU_CHECK_EXCEPTION(env);
   HANDLE hDevNames = AwtPrintControl::getPrintHDName(env, self);
   HDC hdc = AwtPrintControl::getPrintDC(env, self);
 
@@ -1102,6 +1103,7 @@
     jboolean err;
 
     initPrinter(env, self);
+    JNU_CHECK_EXCEPTION(env);
 
     // check for collation
     HGLOBAL hDevNames = AwtPrintControl::getPrintHDName(env, self);
@@ -1362,6 +1364,13 @@
     }
 
     initPrinter(env, self);
+    if (env->ExceptionCheck()) {
+        if (dest != NULL) {
+            JNU_ReleaseStringPlatformChars(env, dest, destination);
+        }
+        return JNI_FALSE;
+    }
+
     HDC printDC = AwtPrintControl::getPrintDC(env, self);
 
     SAVE_CONTROLWORD
@@ -3814,6 +3823,7 @@
     // pixels per inch in y direction
     jint yRes = GetDeviceCaps(printDC, LOGPIXELSY);
     err = setIntField(env, self, YRES_STR, yRes);
+    if (err) return;
 
     // x coord of printable area in pixels
     jint xOrg = GetDeviceCaps(printDC, PHYSICALOFFSETX);
--- a/src/java.desktop/windows/native/libawt/sun/windows/awt_TrayIcon.cpp	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/windows/native/libawt/sun/windows/awt_TrayIcon.cpp	Thu Aug 28 14:54:07 2014 -0700
@@ -325,7 +325,7 @@
 
 MsgRouting AwtTrayIcon::WmMouseDown(UINT flags, int x, int y, int button)
 {
-    jlong now = TimeHelper::windowsToUTC(::GetTickCount());
+    jlong now = ::JVM_CurrentTimeMillis(NULL, 0);
     jint javaModif = AwtComponent::GetJavaModifiers();
 
     if (lastClickTrIc == this &&
@@ -361,14 +361,14 @@
     MSG msg;
     AwtComponent::InitMessage(&msg, lastMessage, flags, MAKELPARAM(x, y), x, y);
 
-    SendMouseEvent(java_awt_event_MouseEvent_MOUSE_RELEASED, TimeHelper::windowsToUTC(::GetTickCount()),
+    SendMouseEvent(java_awt_event_MouseEvent_MOUSE_RELEASED, ::JVM_CurrentTimeMillis(NULL, 0),
                    x, y, AwtComponent::GetJavaModifiers(), clickCount,
                    (AwtComponent::GetButton(button) == java_awt_event_MouseEvent_BUTTON3 ?
                     TRUE : FALSE), AwtComponent::GetButton(button), &msg);
 
     if ((m_mouseButtonClickAllowed & AwtComponent::GetButtonMK(button)) != 0) { // No up-button in the drag-state
         SendMouseEvent(java_awt_event_MouseEvent_MOUSE_CLICKED,
-                       TimeHelper::windowsToUTC(::GetTickCount()), x, y, AwtComponent::GetJavaModifiers(),
+                       ::JVM_CurrentTimeMillis(NULL, 0), x, y, AwtComponent::GetJavaModifiers(),
                        clickCount, JNI_FALSE, AwtComponent::GetButton(button));
     }
     m_mouseButtonClickAllowed &= ~AwtComponent::GetButtonMK(button); // Exclude the up-button from the drag-state
@@ -395,7 +395,7 @@
         if ((flags & ALL_MK_BUTTONS) != 0) {
             m_mouseButtonClickAllowed = 0;
         } else {
-            SendMouseEvent(java_awt_event_MouseEvent_MOUSE_MOVED, TimeHelper::windowsToUTC(::GetTickCount()), x, y,
+            SendMouseEvent(java_awt_event_MouseEvent_MOUSE_MOVED, ::JVM_CurrentTimeMillis(NULL, 0), x, y,
                            AwtComponent::GetJavaModifiers(), 0, JNI_FALSE,
                            java_awt_event_MouseEvent_NOBUTTON, &msg);
         }
@@ -408,7 +408,7 @@
     if (AwtComponent::GetJavaModifiers() & java_awt_event_InputEvent_BUTTON1_DOWN_MASK) {
         MSG msg;
         AwtComponent::InitMessage(&msg, lastMessage, flags, MAKELPARAM(x, y), x, y);
-        SendActionEvent(java_awt_event_ActionEvent_ACTION_PERFORMED, TimeHelper::windowsToUTC(::GetTickCount()),
+        SendActionEvent(java_awt_event_ActionEvent_ACTION_PERFORMED, ::JVM_CurrentTimeMillis(NULL, 0),
                         AwtComponent::GetJavaModifiers(), &msg);
     }
     return mrConsume;
@@ -417,14 +417,14 @@
 MsgRouting AwtTrayIcon::WmKeySelect(UINT flags, int x, int y)
 {
     static jlong lastKeySelectTime = 0;
-    jlong now = TimeHelper::windowsToUTC(::GetTickCount());
+    jlong now = ::JVM_CurrentTimeMillis(NULL, 0);
 
     // If a user selects a notify icon with the ENTER key,
     // Shell 5.0 sends double NIN_KEYSELECT notification.
     if (lastKeySelectTime != now) {
         MSG msg;
         AwtComponent::InitMessage(&msg, lastMessage, flags, MAKELPARAM(x, y), x, y);
-        SendActionEvent(java_awt_event_ActionEvent_ACTION_PERFORMED, TimeHelper::windowsToUTC(::GetTickCount()),
+        SendActionEvent(java_awt_event_ActionEvent_ACTION_PERFORMED, ::JVM_CurrentTimeMillis(NULL, 0),
                         AwtComponent::GetJavaModifiers(), &msg);
     }
     lastKeySelectTime = now;
@@ -441,7 +441,7 @@
     if (clickCount == 2) {
         MSG msg;
         AwtComponent::InitMessage(&msg, lastMessage, flags, MAKELPARAM(x, y), x, y);
-        SendActionEvent(java_awt_event_ActionEvent_ACTION_PERFORMED, TimeHelper::windowsToUTC(::GetTickCount()),
+        SendActionEvent(java_awt_event_ActionEvent_ACTION_PERFORMED, ::JVM_CurrentTimeMillis(NULL, 0),
                         AwtComponent::GetJavaModifiers(), &msg);
     }
     return mrConsume;
--- a/src/java.desktop/windows/native/libawt/sun/windows/awt_Window.cpp	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.desktop/windows/native/libawt/sun/windows/awt_Window.cpp	Thu Aug 28 14:54:07 2014 -0700
@@ -1552,7 +1552,7 @@
         }
     }
     jobject event = env->NewObject(wClassEvent, wEventInitMID, target, id,
-                                   jOpposite, oldState, newState, TimeHelper::getMessageTimeUTC());
+                                   jOpposite, oldState, newState, ::JVM_CurrentTimeMillis(NULL, 0));
     DASSERT(!safe_ExceptionOccurred(env));
     DASSERT(event != NULL);
     if (jOpposite != NULL) {
--- a/src/java.prefs/macosx/native/libprefs/MacOSXPreferencesFile.m	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.prefs/macosx/native/libprefs/MacOSXPreferencesFile.m	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -71,6 +71,8 @@
     static jclass exceptionClass = NULL;
     jclass c;
 
+    (*env)->ExceptionClear(env);  // If an exception is pending, clear it before
+                                  // calling FindClass() and/or ThrowNew().
     if (exceptionClass) {
         c = exceptionClass;
     } else {
@@ -534,8 +536,13 @@
 (JNIEnv *env, jobject klass, jobject jpath,
  jobject jname, jlong juser, jlong jhost)
 {
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef name = toCF(env, jname);
+    CFStringRef path = NULL;
+    CFStringRef name = NULL;
+
+    path = toCF(env, jpath);
+    if (path != NULL) {
+        name = toCF(env, jname);
+    }
     CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
     CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
     CFDictionaryRef node = NULL;
@@ -579,8 +586,13 @@
 (JNIEnv *env, jobject klass, jobject jpath,
  jobject jname, jlong juser, jlong jhost)
 {
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef name = toCF(env, jname);
+    CFStringRef path = NULL;
+    CFStringRef name = NULL;
+
+    path = toCF(env, jpath);
+    if (path != NULL) {
+        name = toCF(env, jname);
+    }
     CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
     CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
     CFStringRef parentName;
@@ -647,9 +659,17 @@
  jobject jname, jlong juser, jlong jhost)
 {
     // like addNode, but can put a three-level-deep dict into the root file
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef child = toCF(env, jchild);
-    CFStringRef name = toCF(env, jname);
+    CFStringRef path = NULL;
+    CFStringRef child = NULL;
+    CFStringRef name = NULL;
+
+    path = toCF(env, jpath);
+    if (path != NULL) {
+        child = toCF(env, jchild);
+    }
+    if (child != NULL) {
+        name = toCF(env, jname);
+    }
     CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
     CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
     CFMutableDictionaryRef parent;
@@ -693,9 +713,17 @@
 (JNIEnv *env, jobject klass, jobject jpath, jobject jchild,
  jobject jname, jlong juser, jlong jhost)
 {
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef child = toCF(env, jchild);
-    CFStringRef name = toCF(env, jname);
+    CFStringRef path = NULL;
+    CFStringRef child = NULL;
+    CFStringRef name = NULL;
+
+    path = toCF(env, jpath);
+    if (path != NULL) {
+        child = toCF(env, jchild);
+    }
+    if (child != NULL) {
+        name = toCF(env, jname);
+    }
     CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
     CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
     CFDictionaryRef constParent;
@@ -734,10 +762,21 @@
 (JNIEnv *env, jobject klass, jobject jpath, jobject jkey, jobject jvalue,
  jobject jname, jlong juser, jlong jhost)
 {
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef key = toCF(env, jkey);
-    CFStringRef value = toCF(env, jvalue);
-    CFStringRef name = toCF(env, jname);
+    CFStringRef path = NULL;
+    CFStringRef key = NULL;
+    CFStringRef value = NULL;
+    CFStringRef name = NULL;
+
+    path = toCF(env, jpath);
+    if (path != NULL) {
+        key = toCF(env, jkey);
+    }
+    if (key != NULL) {
+        value = toCF(env, jvalue);
+    }
+    if (value != NULL) {
+        name = toCF(env, jname);
+    }
     CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
     CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
     CFMutableDictionaryRef node = NULL;
@@ -771,9 +810,17 @@
 (JNIEnv *env, jobject klass, jobject jpath, jobject jkey,
  jobject jname, jlong juser, jlong jhost)
 {
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef key = toCF(env, jkey);
-    CFStringRef name = toCF(env, jname);
+    CFStringRef path = NULL;
+    CFStringRef key = NULL;
+    CFStringRef name = NULL;
+
+    path = toCF(env, jpath);
+    if (path != NULL) {
+        key = toCF(env, jkey);
+    }
+    if (key != NULL) {
+        name = toCF(env, jname);
+    }
     CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
     CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
     CFDictionaryRef constNode;
@@ -812,9 +859,17 @@
 (JNIEnv *env, jobject klass, jobject jpath, jobject jkey,
  jobject jname, jlong juser, jlong jhost)
 {
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef key = toCF(env, jkey);
-    CFStringRef name = toCF(env, jname);
+    CFStringRef path = NULL;
+    CFStringRef key = NULL;
+    CFStringRef name = NULL;
+
+    path = toCF(env, jpath);
+    if (path != NULL) {
+        key = toCF(env, jkey);
+    }
+    if (key != NULL) {
+        name = toCF(env, jname);
+    }
     CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
     CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
     CFPropertyListRef value;
@@ -914,8 +969,13 @@
                                 jobject jname, jlong juser, jlong jhost,
                                 Boolean allowSlash)
 {
-    CFStringRef path = toCF(env, jpath);
-    CFStringRef name = toCF(env, jname);
+    CFStringRef path = NULL;
+    CFStringRef name = NULL;
+
+    path = toCF(env, jpath);
+    if (path != NULL) {
+        name = toCF(env, jname);
+    }
     CFStringRef user = (CFStringRef)jlong_to_ptr(juser);
     CFStringRef host = (CFStringRef)jlong_to_ptr(jhost);
     CFDictionaryRef node;
--- a/src/java.security.jgss/share/classes/com/sun/security/jgss/InquireType.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.security.jgss/share/classes/com/sun/security/jgss/InquireType.java	Thu Aug 28 14:54:07 2014 -0700
@@ -43,7 +43,7 @@
      *    </ul>
      * @deprecated as of 1.9, replaced by {@link #KRB5_GET_SESSION_KEY_EX}
      * which returns an instance of
-     * {@link sun.security.jgss.krb5.Krb5Context.EncryptionKey}
+     * {@link javax.security.auth.kerberos.EncryptionKey}
      * that implements the {@link javax.crypto.SecretKey} interface and
      * has similar methods with {@link javax.security.auth.kerberos.KerberosKey}.
      */
--- a/src/java.security.jgss/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.security.jgss/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java	Thu Aug 28 14:54:07 2014 -0700
@@ -43,7 +43,6 @@
 import java.io.FileOutputStream;
 import java.io.BufferedReader;
 import java.io.InputStreamReader;
-import java.lang.reflect.*;
 
 /**
  * CredentialsCache stores credentials(tickets, session keys, etc) in a
@@ -388,52 +387,36 @@
 
         /*
          * For Unix platforms we use the default cache name to be
-         * /tmp/krbcc_uid ; for all other platforms  we use
-         * {user_home}/krb5_cc{user_name}
-         * Please note that for Windows 2K we will use LSA to get
+         * /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;
          * however when we create cache we will create a cache under
-         * {user_home}/krb5_cc{user_name} for non-Unix platforms including
-         * Windows 2K.
+         * {user_home}/krb5cc_{user_name} for non-Unix platforms including
+         * Windows.
          */
 
-        if (osname != null) {
-            String cmd = null;
-            String uidStr = null;
-            long uid = 0;
-
-            if (osname.startsWith("SunOS") ||
-                (osname.startsWith("Linux"))) {
-                try {
-                    Class<?> c = Class.forName
-                        ("com.sun.security.auth.module.UnixSystem");
-                    Constructor<?> constructor = c.getConstructor();
-                    Object obj = constructor.newInstance();
-                    Method method = c.getMethod("getUid");
-                    uid =  ((Long)method.invoke(obj)).longValue();
-                    name = File.separator + "tmp" +
+        if (osname != null && !osname.startsWith("Windows")) {
+            long uid = sun.misc.VM.getuid();
+            if (uid != -1) {
+                name = File.separator + "tmp" +
                         File.separator + stdCacheNameComponent + "_" + uid;
-                    if (DEBUG) {
-                        System.out.println(">>>KinitOptions cache name is " +
-                                           name);
-                    }
-                    return name;
-                } catch (Exception e) {
-                    if (DEBUG) {
-                        System.out.println("Exception in obtaining uid " +
-                                            "for Unix platforms " +
-                                            "Using user's home directory");
-
-
-                        e.printStackTrace();
-                    }
+                if (DEBUG) {
+                    System.out.println(">>>KinitOptions cache name is " +
+                            name);
+                }
+                return name;
+            } else {
+                if (DEBUG) {
+                    System.out.println("Error in obtaining uid " +
+                                        "for Unix platforms " +
+                                        "Using user's home directory");
                 }
             }
         }
 
         // we did not get the uid;
 
-
         String user_name =
             java.security.AccessController.doPrivileged(
                         new sun.security.action.GetPropertyAction("user.name"));
--- a/src/java.smartcardio/share/classes/sun/security/smartcardio/CardImpl.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.smartcardio/share/classes/sun/security/smartcardio/CardImpl.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, 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
@@ -26,9 +26,9 @@
 package sun.security.smartcardio;
 
 import java.nio.ByteBuffer;
-
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import javax.smartcardio.*;
-
 import static sun.security.smartcardio.PCSC.*;
 
 /**
@@ -62,6 +62,15 @@
     // thread holding exclusive access to the card, or null
     private volatile Thread exclusiveThread;
 
+    // used for platform specific logic
+    private static final boolean isWindows;
+
+    static {
+        final String osName = AccessController.doPrivileged(
+            (PrivilegedAction<String>) () -> System.getProperty("os.name"));
+        isWindows = osName.startsWith("Windows");
+    }
+
     CardImpl(TerminalImpl terminal, String protocol) throws PCSCException {
         this.terminal = terminal;
         int sharingMode = SCARD_SHARE_SHARED;
@@ -74,7 +83,12 @@
             connectProtocol = SCARD_PROTOCOL_T1;
         } else if (protocol.equalsIgnoreCase("direct")) {
             // testing
-            connectProtocol = 0;
+
+            // MSDN states that the preferred protocol can be zero, but doesn't
+            //     specify whether other values are allowed.
+            // pcsc-lite implementation expects the preferred protocol to be non zero.
+            connectProtocol = isWindows ? 0 : SCARD_PROTOCOL_RAW;
+
             sharingMode = SCARD_SHARE_DIRECT;
         } else {
             throw new IllegalArgumentException("Unsupported protocol " + protocol);
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/BaseRowSet.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/BaseRowSet.java	Thu Aug 28 14:54:07 2014 -0700
@@ -368,7 +368,7 @@
      * <code>DriverManager.getConnection</code> when the
      * <code>DriverManager</code> is used to get a connection.
      * <P>
-     * The JDBC URL identifies the driver to be used to make the conndection.
+     * The JDBC URL identifies the driver to be used to make the connection.
      * This URL can be found in the documentation supplied by the driver
      * vendor.
      * @serial
@@ -562,7 +562,7 @@
     * <code>null</code>, this method silently discards the <code>null</code>
     * value and does not add a null reference to the set of listeners.
     * <p>
-    * <b>Note</b>: if the listener is already set, and the new <code>RowSetListerner</code>
+    * <b>Note</b>: if the listener is already set, and the new <code>RowSetListener</code>
     * instance is added to the set of listeners already registered to receive
     * event notifications from this <code>RowSet</code>.
     *
@@ -767,7 +767,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).
@@ -1093,7 +1093,7 @@
                 "Connection.TRANSACTION_NONE or " +
                 "Connection.TRANSACTION_READ_UNCOMMITTED or " +
                 "Connection.TRANSACTION_READ_COMMITTED or " +
-                "Connection.RRANSACTION_REPEATABLE_READ or " +
+                "Connection.TRANSACTION_REPEATABLE_READ or " +
                 "Connection.TRANSACTION_SERIALIZABLE");
             }
         this.isolation = level;
@@ -3193,7 +3193,7 @@
     } //end getParams
 
 
- /**
+   /**
     * Sets the designated parameter to SQL <code>NULL</code>.
     *
     * <P><B>Note:</B> You must specify the parameter's SQL type.
@@ -3210,8 +3210,7 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
- /**
+   /**
     * Sets the designated parameter to SQL <code>NULL</code>.
     * This version of the method <code>setNull</code> should
     * be used for user-defined types and REF type parameters.  Examples
@@ -3248,9 +3247,7 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
-
- /**
+   /**
     * Sets the designated parameter to the given Java <code>boolean</code> value.
     * The driver converts this
     * to an SQL <code>BIT</code> or <code>BOOLEAN</code> value when it sends it to the database.
@@ -3268,9 +3265,7 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
-
- /**
+   /**
     * Sets the designated parameter to the given Java <code>byte</code> value.
     * The driver converts this
     * to an SQL <code>TINYINT</code> value when it sends it to the database.
@@ -3288,9 +3283,7 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
-
- /**
+   /**
     * Sets the designated parameter to the given Java <code>short</code> value.
     * The driver converts this
     * to an SQL <code>SMALLINT</code> value when it sends it to the database.
@@ -3308,8 +3301,7 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
- /**
+   /**
     * Sets the designated parameter to the given Java <code>int</code> value.
     * The driver converts this
     * to an SQL <code>INTEGER</code> value when it sends it to the database.
@@ -3328,7 +3320,7 @@
    }
 
 
- /**
+   /**
     * Sets the designated parameter to the given Java <code>long</code> value.
     * The driver converts this
     * to an SQL <code>BIGINT</code> value when it sends it to the database.
@@ -3346,8 +3338,7 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
- /**
+   /**
     * Sets the designated parameter to the given Java <code>float</code> value.
     * The driver converts this
     * to an SQL <code>FLOAT</code> value when it sends it to the database.
@@ -3365,8 +3356,7 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
- /**
+   /**
     * Sets the designated parameter to the given Java <code>double</code> value.
     * The driver converts this
     * to an SQL <code>DOUBLE</code> value when it sends it to the database.
@@ -3384,9 +3374,7 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
-
- /**
+   /**
     * Sets the designated parameter to the given
     * <code>java.math.BigDecimal</code> value.
     * The driver converts this to an SQL <code>NUMERIC</code> value when
@@ -3405,9 +3393,7 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
-
- /**
+   /**
     * Sets the designated parameter to the given Java <code>String</code> value.
     * The driver converts this
     * to an SQL <code>VARCHAR</code> or <code>LONGVARCHAR</code> value
@@ -3428,9 +3414,7 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
-
- /**
+   /**
     * Sets the designated parameter to the given Java array of bytes.
     * The driver converts this to an SQL <code>VARBINARY</code> or
     * <code>LONGVARBINARY</code> (depending on the argument's size relative
@@ -3450,9 +3434,7 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
-
- /**
+   /**
     * Sets the designated parameter to the given <code>java.sql.Timestamp</code> value.
     * The driver
     * converts this to an SQL <code>TIMESTAMP</code> value when it sends it to the
@@ -3472,9 +3454,7 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
-
- /**
+   /**
     * Sets the designated parameter to the given input stream, which will have
     * the specified number of bytes.
     * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
@@ -3501,8 +3481,7 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
- /**
+   /**
     * Sets the designated parameter to the given input stream, which will have
     * the specified number of bytes.
     * When a very large binary value is input to a <code>LONGVARBINARY</code>
@@ -3528,8 +3507,7 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
-  /**
+   /**
     * Sets the designated parameter to the given <code>Reader</code>
     * object, which is the given number of characters long.
     * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
@@ -3558,7 +3536,6 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
   /**
    * Sets the designated parameter to the given input stream.
    * When a very large ASCII value is input to a <code>LONGVARCHAR</code>
@@ -3586,8 +3563,7 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
- /**
+   /**
     * Sets the designated parameter to the given input stream.
     * When a very large binary value is input to a <code>LONGVARBINARY</code>
     * parameter, it may be more practical to send it via a
@@ -3613,9 +3589,7 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
-
- /**
+   /**
     * Sets the designated parameter to the given <code>Reader</code>
     * object.
     * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
@@ -3644,7 +3618,6 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
  /**
   * Sets the designated parameter in this <code>RowSet</code> object's command
   * to a <code>Reader</code> object. The
@@ -3672,9 +3645,7 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
-
- /**
+   /**
     * Sets the value of the designated parameter with the given object. The second
     * argument must be an object type; for integral values, the
     * <code>java.lang</code> equivalent objects should be used.
@@ -3692,7 +3663,7 @@
     * or <code>Array</code>, the driver should pass it to the database as a
     * value of the corresponding SQL type.
     * <P>
-    * Note that this method may be used to pass datatabase-
+    * Note that this method may be used to pass database-
     * specific abstract data types.
     *
     * @param parameterName the name of the parameter
@@ -3720,9 +3691,7 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
-
- /**
+   /**
     * Sets the value of the designated parameter with the given object.
     * This method is like the method <code>setObject</code>
     * above, except that it assumes a scale of zero.
@@ -3748,8 +3717,7 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
- /**
+  /**
    * Sets the value of the designated parameter with the given object.
    * The second parameter must be of type <code>Object</code>; therefore, the
    * <code>java.lang</code> equivalent objects should be used for built-in types.
@@ -3759,7 +3727,7 @@
    * will be converted to the corresponding SQL type before being
    * sent to the database.
    *
-   * <p>Note that this method may be used to pass datatabase-
+   * <p>Note that this method may be used to pass database-
    * specific abstract data types, by using a driver-specific Java
    * type.
    *
@@ -3789,10 +3757,9 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
-
- /**
-    * Sets the designated parameter to a <code>InputStream</code> object.  The inputstream must contain  the number
+   /**
+    * Sets the designated parameter to a <code>InputStream</code> object.
+    * The <code>InputStream</code> must contain  the number
     * of characters specified by length otherwise a <code>SQLException</code> will be
     * generated when the <code>PreparedStatement</code> is executed.
     * This method differs from the <code>setBinaryStream (int, InputStream, int)</code>
@@ -3809,8 +3776,8 @@
     * this method is called on a closed <code>PreparedStatement</code>,
     * if parameterIndex does not correspond
     * to a parameter marker in the SQL statement,  if the length specified
-    * is less than zero or if the number of bytes in the inputstream does not match
-    * the specified length.
+    * is less than zero or if the number of bytes in the
+    * <code>InputStream</code> does not match the specified length.
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
     *
     * @since 1.6
@@ -3820,8 +3787,7 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
- /**
+   /**
     * Sets the designated parameter to a <code>InputStream</code> object.
     * This method differs from the <code>setBinaryStream (int, InputStream)</code>
     * method because it informs the driver that the parameter value should be
@@ -3848,11 +3814,11 @@
     public void setBlob(int parameterIndex, InputStream inputStream)
        throws SQLException{
         throw new SQLFeatureNotSupportedException("Feature not supported");
-   }
-
+    }
 
- /**
-    * Sets the designated parameter to a <code>InputStream</code> object.  The <code>inputstream</code> must contain  the number
+    /**
+     * Sets the designated parameter to a <code>InputStream</code> object.
+     * The <code>Inputstream</code> must contain  the number
      * of characters specified by length, otherwise a <code>SQLException</code> will be
      * generated when the <code>CallableStatement</code> is executed.
      * This method differs from the <code>setBinaryStream (int, InputStream, int)</code>
@@ -3869,7 +3835,7 @@
      * @param length the number of bytes in the parameter data.
      * @throws SQLException  if parameterIndex does not correspond
      * to a parameter marker in the SQL statement,  or if the length specified
-     * is less than zero; if the number of bytes in the inputstream does not match
+     * is less than zero; if the number of bytes in the <code>InputStream</code> does not match
      * the specified length; if a database access error occurs or
      * this method is called on a closed <code>CallableStatement</code>
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
@@ -3882,8 +3848,7 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
- /**
+   /**
     * Sets the designated parameter to the given <code>java.sql.Blob</code> object.
     * The driver converts this to an SQL <code>BLOB</code> value when it
     * sends it to the database.
@@ -3900,8 +3865,7 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
- /**
+   /**
     * Sets the designated parameter to a <code>InputStream</code> object.
     * This method differs from the <code>setBinaryStream (int, InputStream)</code>
     * method because it informs the driver that the parameter value should be
@@ -3925,35 +3889,34 @@
     public void setBlob(String parameterName, InputStream inputStream)
        throws SQLException{
         throw new SQLFeatureNotSupportedException("Feature not supported");
-   }
-
+    }
 
- /**
-   * Sets the designated parameter to a <code>Reader</code> object.  The reader must contain  the number
-   * of characters specified by length otherwise a <code>SQLException</code> will be
-   * generated when the <code>PreparedStatement</code> is executed.
-   *This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
-   * because it informs the driver that the parameter value should be sent to
-   * the server as a <code>CLOB</code>.  When the <code>setCharacterStream</code> method is used, the
-   * driver may have to do extra work to determine whether the parameter
-   * data should be sent to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>
-   * @param parameterIndex index of the first parameter is 1, the second is 2, ...
-   * @param reader An object that contains the data to set the parameter value to.
-   * @param length the number of characters in the parameter data.
-   * @throws SQLException if a database access error occurs, this method is called on
-   * a closed <code>PreparedStatement</code>, if parameterIndex does not correspond to a parameter
-   * marker in the SQL statement, or if the length specified is less than zero.
-   *
-   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
-   * @since 1.6
-   */
+   /**
+    * Sets the designated parameter to a <code>Reader</code> object.
+    * The reader must contain  the number
+    * of characters specified by length otherwise a <code>SQLException</code> will be
+    * generated when the <code>PreparedStatement</code> is executed.
+    * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
+    * because it informs the driver that the parameter value should be sent to
+    * the server as a <code>CLOB</code>.  When the <code>setCharacterStream</code> method is used, the
+    * driver may have to do extra work to determine whether the parameter
+    * data should be sent to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>
+    * @param parameterIndex index of the first parameter is 1, the second is 2, ...
+    * @param reader An object that contains the data to set the parameter value to.
+    * @param length the number of characters in the parameter data.
+    * @throws SQLException if a database access error occurs, this method is called on
+    * a closed <code>PreparedStatement</code>, if parameterIndex does not correspond to a parameter
+    * marker in the SQL statement, or if the length specified is less than zero.
+    *
+    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
+    * @since 1.6
+    */
    public void setClob(int parameterIndex, Reader reader, long length)
      throws SQLException{
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
-/**
+  /**
    * Sets the designated parameter to a <code>Reader</code> object.
    * This method differs from the <code>setCharacterStream (int, Reader)</code> method
    * because it informs the driver that the parameter value should be sent to
@@ -3979,35 +3942,34 @@
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
- /**
-    * Sets the designated parameter to a <code>Reader</code> object.  The <code>reader</code> must contain  the number
-               * of characters specified by length otherwise a <code>SQLException</code> will be
-               * generated when the <code>CallableStatement</code> is executed.
-              * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
-              * because it informs the driver that the parameter value should be sent to
-              * the server as a <code>CLOB</code>.  When the <code>setCharacterStream</code> method is used, the
-              * driver may have to do extra work to determine whether the parameter
-              * data should be send to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>
-              * @param parameterName the name of the parameter to be set
-              * @param reader An object that contains the data to set the parameter value to.
-              * @param length the number of characters in the parameter data.
-              * @throws SQLException if parameterIndex does not correspond to a parameter
-              * marker in the SQL statement; if the length specified is less than zero;
-              * a database access error occurs or
-              * this method is called on a closed <code>CallableStatement</code>
-              * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-              * this method
-              *
-              * @since 1.6
-              */
-              public void setClob(String parameterName, Reader reader, long length)
-      throws SQLException{
-        throw new SQLFeatureNotSupportedException("Feature not supported");
+   /**
+    * Sets the designated parameter to a <code>Reader</code> object.
+    * The <code>reader</code> must contain  the number
+    * of characters specified by length otherwise a <code>SQLException</code> will be
+    * generated when the <code>CallableStatement</code> is executed.
+    * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
+    * because it informs the driver that the parameter value should be sent to
+    * the server as a <code>CLOB</code>.  When the <code>setCharacterStream</code> method is used, the
+    * driver may have to do extra work to determine whether the parameter
+    * data should be send to the server as a <code>LONGVARCHAR</code> or a <code>CLOB</code>
+    * @param parameterName the name of the parameter to be set
+    * @param reader An object that contains the data to set the parameter value to.
+    * @param length the number of characters in the parameter data.
+    * @throws SQLException if parameterIndex does not correspond to a parameter
+    * marker in the SQL statement; if the length specified is less than zero;
+    * a database access error occurs or
+    * this method is called on a closed <code>CallableStatement</code>
+    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
+    * this method
+    *
+    * @since 1.6
+    */
+   public void setClob(String parameterName, Reader reader, long length)
+      throws SQLException {
+       throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
-  /**
+   /**
     * Sets the designated parameter to the given <code>java.sql.Clob</code> object.
     * The driver converts this to an SQL <code>CLOB</code> value when it
     * sends it to the database.
@@ -4020,12 +3982,11 @@
     * this method
     * @since 1.6
     */
-   public void setClob (String parameterName, Clob x) throws SQLException{
-        throw new SQLFeatureNotSupportedException("Feature not supported");
+   public void setClob (String parameterName, Clob x) throws SQLException {
+       throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
- /**
+   /**
     * Sets the designated parameter to a <code>Reader</code> object.
     * This method differs from the <code>setCharacterStream (int, Reader)</code> method
     * because it informs the driver that the parameter value should be sent to
@@ -4045,13 +4006,11 @@
     * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
     * @since 1.6
     */
-    public void setClob(String parameterName, Reader reader)
-      throws SQLException{
+    public void setClob(String parameterName, Reader reader) throws SQLException {
         throw new SQLFeatureNotSupportedException("Feature not supported");
-   }
+    }
 
-
- /**
+   /**
     * Sets the designated parameter to the given <code>java.sql.Date</code> value
     * using the default time zone of the virtual machine that is running
     * the application.
@@ -4068,12 +4027,11 @@
     * @since 1.4
     */
    public void setDate(String parameterName, java.sql.Date x)
-       throws SQLException{
-        throw new SQLFeatureNotSupportedException("Feature not supported");
+           throws SQLException {
+       throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
- /**
+   /**
     * Sets the designated parameter to the given <code>java.sql.Date</code> value,
     * using the given <code>Calendar</code> object.  The driver uses
     * the <code>Calendar</code> object to construct an SQL <code>DATE</code> value,
@@ -4095,12 +4053,11 @@
     * @since 1.4
     */
    public void setDate(String parameterName, java.sql.Date x, Calendar cal)
-       throws SQLException{
+           throws SQLException {
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
- /**
+   /**
     * Sets the designated parameter to the given <code>java.sql.Time</code> value.
     * The driver converts this
     * to an SQL <code>TIME</code> value when it sends it to the database.
@@ -4115,12 +4072,11 @@
     * @since 1.4
     */
    public void setTime(String parameterName, java.sql.Time x)
-       throws SQLException{
+           throws SQLException {
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
- /**
+   /**
     * Sets the designated parameter to the given <code>java.sql.Time</code> value,
     * using the given <code>Calendar</code> object.  The driver uses
     * the <code>Calendar</code> object to construct an SQL <code>TIME</code> value,
@@ -4142,12 +4098,11 @@
     * @since 1.4
     */
    public void setTime(String parameterName, java.sql.Time x, Calendar cal)
-       throws SQLException{
+           throws SQLException {
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
- /**
+   /**
     * Sets the designated parameter to the given <code>java.sql.Timestamp</code> value,
     * using the given <code>Calendar</code> object.  The driver uses
     * the <code>Calendar</code> object to construct an SQL <code>TIMESTAMP</code> value,
@@ -4169,366 +4124,347 @@
     * @since 1.4
     */
    public void setTimestamp(String parameterName, java.sql.Timestamp x, Calendar cal)
-       throws SQLException{
+           throws SQLException {
         throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
-
- /**
-  * Sets the designated parameter to the given <code>java.sql.SQLXML</code> object. The driver converts this to an
-  * SQL <code>XML</code> value when it sends it to the database.
-  * @param parameterIndex index of the first parameter is 1, the second is 2, ...
-  * @param xmlObject a <code>SQLXML</code> object that maps an SQL <code>XML</code> value
-  * @throws SQLException if a database access error occurs, this method
-  *  is called on a closed result set,
-  * the <code>java.xml.transform.Result</code>,
-  *  <code>Writer</code> or <code>OutputStream</code> has not been closed
-  * for the <code>SQLXML</code> object  or
-  *  if there is an error processing the XML value.  The <code>getCause</code> method
-  *  of the exception may provide a more detailed exception, for example, if the
-  *  stream does not contain valid XML.
-  * @throws SQLFeatureNotSupportedException if the JDBC driver does not
-  * support this method
-  * @since 1.6
-  */
- public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException{
-     throw new SQLFeatureNotSupportedException("Feature not supported");
- }
-
-
- /**
-  * Sets the designated parameter to the given <code>java.sql.SQLXML</code> object. The driver converts this to an
-  * <code>SQL XML</code> value when it sends it to the database.
-  * @param parameterName the name of the parameter
-  * @param xmlObject a <code>SQLXML</code> object that maps an <code>SQL XML</code> value
-  * @throws SQLException if a database access error occurs, this method
-  *  is called on a closed result set,
-  * the <code>java.xml.transform.Result</code>,
-  *  <code>Writer</code> or <code>OutputStream</code> has not been closed
-  * for the <code>SQLXML</code> object  or
-  *  if there is an error processing the XML value.  The <code>getCause</code> method
-  *  of the exception may provide a more detailed exception, for example, if the
-  *  stream does not contain valid XML.
-  * @throws SQLFeatureNotSupportedException if the JDBC driver does not
-  * support this method
-  * @since 1.6
-  */
- public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException{
-     throw new SQLFeatureNotSupportedException("Feature not supported");
- }
-
-
- /**
-  * Sets the designated parameter to the given <code>java.sql.RowId</code> object. The
-  * driver converts this to a SQL <code>ROWID</code> value when it sends it
-  * to the database
-  *
-  * @param parameterIndex the first parameter is 1, the second is 2, ...
-  * @param x the parameter value
-  * @throws SQLException if a database access error occurs
-  * @throws SQLFeatureNotSupportedException if the JDBC driver does not
-  * support this method
-  *
-  * @since 1.6
-  */
- public void setRowId(int parameterIndex, RowId x) throws SQLException{
-     throw new SQLFeatureNotSupportedException("Feature not supported");
- }
-
-
- /**
-  * Sets the designated parameter to the given <code>java.sql.RowId</code> object. The
-  * driver converts this to a SQL <code>ROWID</code> when it sends it to the
-  * database.
-  *
-  * @param parameterName the name of the parameter
-  * @param x the parameter value
-  * @throws SQLException if a database access error occurs
-  * @throws SQLFeatureNotSupportedException if the JDBC driver does not
-  * support this method
-  * @since 1.6
-  */
- public void setRowId(String parameterName, RowId x) throws SQLException{
-     throw new SQLFeatureNotSupportedException("Feature not supported");
- }
+   /**
+    * Sets the designated parameter to the given <code>java.sql.SQLXML</code> object. The driver converts this to an
+    * SQL <code>XML</code> value when it sends it to the database.
+    * @param parameterIndex index of the first parameter is 1, the second is 2, ...
+    * @param xmlObject a <code>SQLXML</code> object that maps an SQL <code>XML</code> value
+    * @throws SQLException if a database access error occurs, this method
+    *  is called on a closed result set,
+    * the <code>java.xml.transform.Result</code>,
+    *  <code>Writer</code> or <code>OutputStream</code> has not been closed
+    * for the <code>SQLXML</code> object  or
+    *  if there is an error processing the XML value.  The <code>getCause</code> method
+    *  of the exception may provide a more detailed exception, for example, if the
+    *  stream does not contain valid XML.
+    * @throws SQLFeatureNotSupportedException if the JDBC driver does not
+    * support this method
+    * @since 1.6
+    */
+   public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException {
+       throw new SQLFeatureNotSupportedException("Feature not supported");
+   }
 
- /**
-  * Sets the designated parameter to the given <code>String</code> object.
-  * The driver converts this to a SQL <code>NCHAR</code> or
-  * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> value
-  * (depending on the argument's
-  * size relative to the driver's limits on <code>NVARCHAR</code> values)
-  * when it sends it to the database.
-  *
-  * @param parameterIndex of the first parameter is 1, the second is 2, ...
-  * @param value the parameter value
-  * @throws SQLException if the driver does not support national
-  *         character sets;  if the driver can detect that a data conversion
-  *  error could occur ; or if a database access error occurs
-  * @throws SQLFeatureNotSupportedException if the JDBC driver does not
-  * support this method
-  * @since 1.6
-  */
- public void setNString(int parameterIndex, String value) throws SQLException{
-     throw new SQLFeatureNotSupportedException("Feature not supported");
- }
-
-
- /**
-  * Sets the designated parameter to the given <code>String</code> object.
-  * The driver converts this to a SQL <code>NCHAR</code> or
-  * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code>
-  * @param parameterName the name of the column to be set
-  * @param value the parameter value
-  * @throws SQLException if the driver does not support national
-  *         character sets;  if the driver can detect that a data conversion
-  *  error could occur; or if a database access error occurs
-  * @throws SQLFeatureNotSupportedException if the JDBC driver does not
-  * support this method
-  * @since 1.6
-  */
- public void setNString(String parameterName, String value)
-         throws SQLException{
-     throw new SQLFeatureNotSupportedException("Feature not supported");
- }
-
-
- /**
-  * Sets the designated parameter to a <code>Reader</code> object. The
-  * <code>Reader</code> reads the data till end-of-file is reached. The
-  * driver does the necessary conversion from Java character format to
-  * the national character set in the database.
-  * @param parameterIndex of the first parameter is 1, the second is 2, ...
-  * @param value the parameter value
-  * @param length the number of characters in the parameter data.
-  * @throws SQLException if the driver does not support national
-  *         character sets;  if the driver can detect that a data conversion
-  *  error could occur ; or if a database access error occurs
-  * @throws SQLFeatureNotSupportedException if the JDBC driver does not
-  * support this method
-  * @since 1.6
-  */
- public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException{
-     throw new SQLFeatureNotSupportedException("Feature not supported");
- }
-
-
- /**
-  * Sets the designated parameter to a <code>Reader</code> object. The
-  * <code>Reader</code> reads the data till end-of-file is reached. The
-  * driver does the necessary conversion from Java character format to
-  * the national character set in the database.
-  * @param parameterName the name of the column to be set
-  * @param value the parameter value
-  * @param length the number of characters in the parameter data.
-  * @throws SQLException if the driver does not support national
-  *         character sets;  if the driver can detect that a data conversion
-  *  error could occur; or if a database access error occurs
-  * @throws SQLFeatureNotSupportedException  if the JDBC driver does not
-  * support this method
-  * @since 1.6
-  */
- public void setNCharacterStream(String parameterName, Reader value, long length)
-         throws SQLException{
-     throw new SQLFeatureNotSupportedException("Feature not supported");
- }
-
-
- /**
-  * Sets the designated parameter to a <code>Reader</code> object. The
-  * <code>Reader</code> reads the data till end-of-file is reached. The
-  * driver does the necessary conversion from Java character format to
-  * the national character set in the database.
-
-  * <P><B>Note:</B> This stream object can either be a standard
-  * Java stream object or your own subclass that implements the
-  * standard interface.
-  * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
-  * it might be more efficient to use a version of
-  * <code>setNCharacterStream</code> which takes a length parameter.
-  *
-  * @param parameterName the name of the parameter
-  * @param value the parameter value
-  * @throws SQLException if the driver does not support national
-  *         character sets;  if the driver can detect that a data conversion
-  *  error could occur ; if a database access error occurs; or
-  * this method is called on a closed <code>CallableStatement</code>
-  * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
-  * @since 1.6
-  */
-  public void setNCharacterStream(String parameterName, Reader value) throws SQLException{
-        throw new SQLFeatureNotSupportedException("Feature not supported");
+   /**
+    * Sets the designated parameter to the given <code>java.sql.SQLXML</code> object. The driver converts this to an
+    * <code>SQL XML</code> value when it sends it to the database.
+    * @param parameterName the name of the parameter
+    * @param xmlObject a <code>SQLXML</code> object that maps an <code>SQL XML</code> value
+    * @throws SQLException if a database access error occurs, this method
+    *  is called on a closed result set,
+    * the <code>java.xml.transform.Result</code>,
+    *  <code>Writer</code> or <code>OutputStream</code> has not been closed
+    * for the <code>SQLXML</code> object  or
+    *  if there is an error processing the XML value.  The <code>getCause</code> method
+    *  of the exception may provide a more detailed exception, for example, if the
+    *  stream does not contain valid XML.
+    * @throws SQLFeatureNotSupportedException if the JDBC driver does not
+    * support this method
+    * @since 1.6
+    */
+   public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException {
+       throw new SQLFeatureNotSupportedException("Feature not supported");
    }
 
+   /**
+   * Sets the designated parameter to the given <code>java.sql.RowId</code> object. The
+   * driver converts this to a SQL <code>ROWID</code> value when it sends it
+   * to the database
+   *
+   * @param parameterIndex the first parameter is 1, the second is 2, ...
+   * @param x the parameter value
+   * @throws SQLException if a database access error occurs
+   * @throws SQLFeatureNotSupportedException if the JDBC driver does not
+   * support this method
+   *
+   * @since 1.6
+   */
+  public void setRowId(int parameterIndex, RowId x) throws SQLException {
+      throw new SQLFeatureNotSupportedException("Feature not supported");
+  }
+
+  /**
+   * Sets the designated parameter to the given <code>java.sql.RowId</code> object. The
+   * driver converts this to a SQL <code>ROWID</code> when it sends it to the
+   * database.
+   *
+   * @param parameterName the name of the parameter
+   * @param x the parameter value
+   * @throws SQLException if a database access error occurs
+   * @throws SQLFeatureNotSupportedException if the JDBC driver does not
+   * support this method
+   * @since 1.6
+   */
+  public void setRowId(String parameterName, RowId x) throws SQLException {
+      throw new SQLFeatureNotSupportedException("Feature not supported");
+  }
 
   /**
-   * Sets the designated parameter to a <code>java.sql.NClob</code> object. The object
-   * implements the <code>java.sql.NClob</code> interface. This <code>NClob</code>
-   * object maps to a SQL <code>NCLOB</code>.
+   * Sets the designated parameter to the given <code>String</code> object.
+   * The driver converts this to a SQL <code>NCHAR</code> or
+   * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code> value
+   * (depending on the argument's
+   * size relative to the driver's limits on <code>NVARCHAR</code> values)
+   * when it sends it to the database.
+   *
+   * @param parameterIndex of the first parameter is 1, the second is 2, ...
+   * @param value the parameter value
+   * @throws SQLException if the driver does not support national
+   * character sets;  if the driver can detect that a data conversion
+   * error could occur ; or if a database access error occurs
+   * @throws SQLFeatureNotSupportedException if the JDBC driver does not
+   * support this method
+   * @since 1.6
+   */
+  public void setNString(int parameterIndex, String value) throws SQLException {
+      throw new SQLFeatureNotSupportedException("Feature not supported");
+  }
+
+  /**
+   * Sets the designated parameter to the given <code>String</code> object.
+   * The driver converts this to a SQL <code>NCHAR</code> or
+   * <code>NVARCHAR</code> or <code>LONGNVARCHAR</code>
    * @param parameterName the name of the column to be set
    * @param value the parameter value
    * @throws SQLException if the driver does not support national
+   * character sets;  if the driver can detect that a data conversion
+   * error could occur; or if a database access error occurs
+   * @throws SQLFeatureNotSupportedException if the JDBC driver does not
+   * support this method
+   * @since 1.6
+   */
+  public void setNString(String parameterName, String value) throws SQLException {
+     throw new SQLFeatureNotSupportedException("Feature not supported");
+  }
+
+  /**
+   * Sets the designated parameter to a <code>Reader</code> object. The
+   * <code>Reader</code> reads the data till end-of-file is reached. The
+   * driver does the necessary conversion from Java character format to
+   * the national character set in the database.
+   * @param parameterIndex of the first parameter is 1, the second is 2, ...
+   * @param value the parameter value
+   * @param length the number of characters in the parameter data.
+   * @throws SQLException if the driver does not support national
+   *         character sets;  if the driver can detect that a data conversion
+   *  error could occur ; or if a database access error occurs
+   * @throws SQLFeatureNotSupportedException if the JDBC driver does not
+   * support this method
+   * @since 1.6
+   */
+  public void setNCharacterStream(int parameterIndex, Reader value, long length)
+          throws SQLException {
+      throw new SQLFeatureNotSupportedException("Feature not supported");
+  }
+
+  /**
+   * Sets the designated parameter to a <code>Reader</code> object. The
+   * <code>Reader</code> reads the data till end-of-file is reached. The
+   * driver does the necessary conversion from Java character format to
+   * the national character set in the database.
+   * @param parameterName the name of the column to be set
+   * @param value the parameter value
+   * @param length the number of characters in the parameter data.
+   * @throws SQLException if the driver does not support national
    *         character sets;  if the driver can detect that a data conversion
    *  error could occur; or if a database access error occurs
    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not
    * support this method
    * @since 1.6
    */
-  public void setNClob(String parameterName, NClob value) throws SQLException{
-        throw new SQLFeatureNotSupportedException("Feature not supported");
+  public void setNCharacterStream(String parameterName, Reader value, long length)
+          throws SQLException {
+      throw new SQLFeatureNotSupportedException("Feature not supported");
   }
 
-
   /**
-   * Sets the designated parameter to a <code>Reader</code> object.  The <code>reader</code> must contain
-   * the number
-   * of characters specified by length otherwise a <code>SQLException</code> will be
-   * generated when the <code>CallableStatement</code> is executed.
-   * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
-   * because it informs the driver that the parameter value should be sent to
-   * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
-   * driver may have to do extra work to determine whether the parameter
-   * data should be send to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
-   *
-   * @param parameterName the name of the parameter to be set
-   * @param reader An object that contains the data to set the parameter value to.
-   * @param length the number of characters in the parameter data.
-   * @throws SQLException if parameterIndex does not correspond to a parameter
-   * marker in the SQL statement; if the length specified is less than zero;
-   * if the driver does not support national
-   *         character sets;  if the driver can detect that a data conversion
-   *  error could occur; if a database access error occurs or
-   * this method is called on a closed <code>CallableStatement</code>
-   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
-   * this method
-   * @since 1.6
-   */
-  public void setNClob(String parameterName, Reader reader, long length)
-           throws SQLException{
-       throw new SQLFeatureNotSupportedException("Feature not supported");
-  }
-
-
-  /**
-   * Sets the designated parameter to a <code>Reader</code> object.
-   * This method differs from the <code>setCharacterStream (int, Reader)</code> method
-   * because it informs the driver that the parameter value should be sent to
-   * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
-   * driver may have to do extra work to determine whether the parameter
-   * data should be send to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
+   * Sets the designated parameter to a <code>Reader</code> object. The
+   * <code>Reader</code> reads the data till end-of-file is reached. The
+   * driver does the necessary conversion from Java character format to
+   * the national character set in the database.
+   * <P><B>Note:</B> This stream object can either be a standard
+   * Java stream object or your own subclass that implements the
+   * standard interface.
    * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
    * it might be more efficient to use a version of
-   * <code>setNClob</code> which takes a length parameter.
+   * <code>setNCharacterStream</code> which takes a length parameter.
    *
    * @param parameterName the name of the parameter
-   * @param reader An object that contains the data to set the parameter value to.
-   * @throws SQLException if the driver does not support national character sets;
-   * if the driver can detect that a data conversion
-   *  error could occur;  if a database access error occurs or
-   * this method is called on a closed <code>CallableStatement</code>
-   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
-   *
-   * @since 1.6
-   */
-  public void setNClob(String parameterName, Reader reader)
-    throws SQLException{
-        throw new SQLFeatureNotSupportedException("Feature not supported");
-  }
-
-
-  /**
-   * Sets the designated parameter to a <code>Reader</code> object.  The reader must contain  the number
-   * of characters specified by length otherwise a <code>SQLException</code> will be
-   * generated when the <code>PreparedStatement</code> is executed.
-   * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
-   * because it informs the driver that the parameter value should be sent to
-   * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
-   * driver may have to do extra work to determine whether the parameter
-   * data should be sent to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
-   * @param parameterIndex index of the first parameter is 1, the second is 2, ...
-   * @param reader An object that contains the data to set the parameter value to.
-   * @param length the number of characters in the parameter data.
-   * @throws SQLException if parameterIndex does not correspond to a parameter
-   * marker in the SQL statement; if the length specified is less than zero;
-   * if the driver does not support national character sets;
-   * if the driver can detect that a data conversion
-   *  error could occur;  if a database access error occurs or
-   * this method is called on a closed <code>PreparedStatement</code>
-   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not
-   * support this method
-   *
-   * @since 1.6
-   */
-  public void setNClob(int parameterIndex, Reader reader, long length)
-       throws SQLException{
-        throw new SQLFeatureNotSupportedException("Feature not supported");
-  }
-
-
-  /**
-   * Sets the designated parameter to a <code>java.sql.NClob</code> object. The driver converts this oa
-   * SQL <code>NCLOB</code> value when it sends it to the database.
-   * @param parameterIndex of the first parameter is 1, the second is 2, ...
    * @param value the parameter value
    * @throws SQLException if the driver does not support national
    *         character sets;  if the driver can detect that a data conversion
-   *  error could occur ; or if a database access error occurs
-   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not
-   * support this method
+   *  error could occur ; if a database access error occurs; or
+   * this method is called on a closed <code>CallableStatement</code>
+   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
    * @since 1.6
    */
- public void setNClob(int parameterIndex, NClob value) throws SQLException{
-        throw new SQLFeatureNotSupportedException("Feature not supported");
- }
+  public void setNCharacterStream(String parameterName, Reader value)
+          throws SQLException {
+      throw new SQLFeatureNotSupportedException("Feature not supported");
+   }
+
+   /**
+    * Sets the designated parameter to a <code>java.sql.NClob</code> object. The object
+    * implements the <code>java.sql.NClob</code> interface. This <code>NClob</code>
+    * object maps to a SQL <code>NCLOB</code>.
+    * @param parameterName the name of the column to be set
+    * @param value the parameter value
+    * @throws SQLException if the driver does not support national
+    *         character sets;  if the driver can detect that a data conversion
+    *  error could occur; or if a database access error occurs
+    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not
+    * support this method
+    * @since 1.6
+    */
+   public void setNClob(String parameterName, NClob value) throws SQLException {
+       throw new SQLFeatureNotSupportedException("Feature not supported");
+   }
 
+   /**
+    * Sets the designated parameter to a <code>Reader</code> object.  The <code>reader</code> must contain
+    * the number
+    * of characters specified by length otherwise a <code>SQLException</code> will be
+    * generated when the <code>CallableStatement</code> is executed.
+    * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
+    * because it informs the driver that the parameter value should be sent to
+    * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
+    * driver may have to do extra work to determine whether the parameter
+    * data should be send to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
+    *
+    * @param parameterName the name of the parameter to be set
+    * @param reader An object that contains the data to set the parameter value to.
+    * @param length the number of characters in the parameter data.
+    * @throws SQLException if parameterIndex does not correspond to a parameter
+    * marker in the SQL statement; if the length specified is less than zero;
+    * if the driver does not support national
+    *         character sets;  if the driver can detect that a data conversion
+    *  error could occur; if a database access error occurs or
+    * this method is called on a closed <code>CallableStatement</code>
+    * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
+    * this method
+    * @since 1.6
+    */
+   public void setNClob(String parameterName, Reader reader, long length)
+           throws SQLException {
+       throw new SQLFeatureNotSupportedException("Feature not supported");
+   }
+
+   /**
+    * Sets the designated parameter to a <code>Reader</code> object.
+    * This method differs from the <code>setCharacterStream (int, Reader)</code> method
+    * because it informs the driver that the parameter value should be sent to
+    * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
+    * driver may have to do extra work to determine whether the parameter
+    * data should be send to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
+    * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
+    * it might be more efficient to use a version of
+    * <code>setNClob</code> which takes a length parameter.
+    *
+    * @param parameterName the name of the parameter
+    * @param reader An object that contains the data to set the parameter value to.
+    * @throws SQLException if the driver does not support national character sets;
+    * if the driver can detect that a data conversion
+    *  error could occur;  if a database access error occurs or
+    * this method is called on a closed <code>CallableStatement</code>
+    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
+    *
+    * @since 1.6
+    */
+   public void setNClob(String parameterName, Reader reader) throws SQLException {
+       throw new SQLFeatureNotSupportedException("Feature not supported");
+   }
 
- /**
-  * Sets the designated parameter to a <code>Reader</code> object.
-  * This method differs from the <code>setCharacterStream (int, Reader)</code> method
-  * because it informs the driver that the parameter value should be sent to
-  * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
-  * driver may have to do extra work to determine whether the parameter
-  * data should be sent to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
-  * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
-  * it might be more efficient to use a version of
-  * <code>setNClob</code> which takes a length parameter.
-  *
-  * @param parameterIndex index of the first parameter is 1, the second is 2, ...
-  * @param reader An object that contains the data to set the parameter value to.
-  * @throws SQLException if parameterIndex does not correspond to a parameter
-  * marker in the SQL statement;
-  * if the driver does not support national character sets;
-  * if the driver can detect that a data conversion
-  *  error could occur;  if a database access error occurs or
-  * this method is called on a closed <code>PreparedStatement</code>
-  * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
-  *
-  * @since 1.6
-  */
-  public void setNClob(int parameterIndex, Reader reader)
-    throws SQLException{
+   /**
+    * Sets the designated parameter to a <code>Reader</code> object.  The reader must contain  the number
+    * of characters specified by length otherwise a <code>SQLException</code> will be
+    * generated when the <code>PreparedStatement</code> is executed.
+    * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
+    * because it informs the driver that the parameter value should be sent to
+    * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
+    * driver may have to do extra work to determine whether the parameter
+    * data should be sent to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
+    * @param parameterIndex index of the first parameter is 1, the second is 2, ...
+    * @param reader An object that contains the data to set the parameter value to.
+    * @param length the number of characters in the parameter data.
+    * @throws SQLException if parameterIndex does not correspond to a parameter
+    * marker in the SQL statement; if the length specified is less than zero;
+    * if the driver does not support national character sets;
+    * if the driver can detect that a data conversion
+    *  error could occur;  if a database access error occurs or
+    * this method is called on a closed <code>PreparedStatement</code>
+    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not
+    * support this method
+    *
+    * @since 1.6
+    */
+   public void setNClob(int parameterIndex, Reader reader, long length)
+           throws SQLException {
+       throw new SQLFeatureNotSupportedException("Feature not supported");
+   }
+
+   /**
+    * Sets the designated parameter to a <code>java.sql.NClob</code> object. The driver converts this oa
+    * SQL <code>NCLOB</code> value when it sends it to the database.
+    * @param parameterIndex of the first parameter is 1, the second is 2, ...
+    * @param value the parameter value
+    * @throws SQLException if the driver does not support national
+    *         character sets;  if the driver can detect that a data conversion
+    *  error could occur ; or if a database access error occurs
+    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not
+    * support this method
+    * @since 1.6
+    */
+   public void setNClob(int parameterIndex, NClob value) throws SQLException {
         throw new SQLFeatureNotSupportedException("Feature not supported");
-  }
-
+   }
 
-  /**
-   * Sets the designated parameter to the given <code>java.net.URL</code> value.
-   * The driver converts this to an SQL <code>DATALINK</code> value
-   * when it sends it to the database.
-   *
-   * @param parameterIndex the first parameter is 1, the second is 2, ...
-   * @param x the <code>java.net.URL</code> object to be set
-   * @exception SQLException if a database access error occurs or
-   * this method is called on a closed <code>PreparedStatement</code>
-   * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
-   * @since 1.4
-   */
-  public void setURL(int parameterIndex, java.net.URL x) throws SQLException{
-        throw new SQLFeatureNotSupportedException("Feature not supported");
-  }
+   /**
+    * Sets the designated parameter to a <code>Reader</code> object.
+    * This method differs from the <code>setCharacterStream (int, Reader)</code> method
+    * because it informs the driver that the parameter value should be sent to
+    * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
+    * driver may have to do extra work to determine whether the parameter
+    * data should be sent to the server as a <code>LONGNVARCHAR</code> or a <code>NCLOB</code>
+    * <P><B>Note:</B> Consult your JDBC driver documentation to determine if
+    * it might be more efficient to use a version of
+    * <code>setNClob</code> which takes a length parameter.
+    *
+    * @param parameterIndex index of the first parameter is 1, the second is 2, ...
+    * @param reader An object that contains the data to set the parameter value to.
+    * @throws SQLException if parameterIndex does not correspond to a parameter
+    * marker in the SQL statement;
+    * if the driver does not support national character sets;
+    * if the driver can detect that a data conversion
+    *  error could occur;  if a database access error occurs or
+    * this method is called on a closed <code>PreparedStatement</code>
+    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
+    *
+    * @since 1.6
+    */
+   public void setNClob(int parameterIndex, Reader reader)throws SQLException {
+       throw new SQLFeatureNotSupportedException("Feature not supported");
+   }
 
-
+   /**
+    * Sets the designated parameter to the given <code>java.net.URL</code> value.
+    * The driver converts this to an SQL <code>DATALINK</code> value
+    * when it sends it to the database.
+    *
+    * @param parameterIndex the first parameter is 1, the second is 2, ...
+    * @param x the <code>java.net.URL</code> object to be set
+    * @exception SQLException if a database access error occurs or
+    * this method is called on a closed <code>PreparedStatement</code>
+    * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
+    * @since 1.4
+    */
+   public void setURL(int parameterIndex, java.net.URL x) throws SQLException {
+       throw new SQLFeatureNotSupportedException("Feature not supported");
+   }
 
-  static final long serialVersionUID = 4886719666485113312L;
+   static final long serialVersionUID = 4886719666485113312L;
 
-} //end class
+} //end class
\ No newline at end of file
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/CachedRowSet.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/CachedRowSet.java	Thu Aug 28 14:54:07 2014 -0700
@@ -286,7 +286,7 @@
  * <code>setSyncProvider</code>.
  * <P>
  * In order to use the optimistic concurrency control routine, the
- * <code>RIOptismisticProvider</code> maintains both its current
+ * <code>RIOptimisticProvider</code> maintains both its current
  * value and its original value (the value it had immediately preceding the
  * current value). Note that if no changes have been made to the data in a
  * <code>RowSet</code> object, its current values and its original values are the same,
@@ -351,7 +351,7 @@
  * <code>CachedRowSet</code> object can be used to augment the
  * capabilities of a JDBC technology-enabled driver (hereafter called a
  * "JDBC driver") when the DBMS does not provide full support for scrolling and
- * updating. To achieve the effect of making a non-scrollble and read-only
+ * updating. To achieve the effect of making a non-scrollable and read-only
  * <code>ResultSet</code> object scrollable and updatable, a programmer
  * simply needs to create a <code>CachedRowSet</code> object populated
  * with that <code>ResultSet</code> object's data.  This is demonstrated
@@ -732,7 +732,7 @@
     * Note: The <code>acceptChanges()</code> method will determine if the
     * <code>COMMIT_ON_ACCEPT_CHANGES</code> is set to true or not. If it is set
     * to true, all updates in the synchronization are committed to the data
-    * source. Otherwise, the application <b>must</b> explicity call the
+    * source. Otherwise, the application <b>must</b> explicitly call the
     * <code>commit()</code> or <code>rollback()</code> methods as appropriate.
     *
     * @throws SyncProviderException if the underlying
@@ -801,7 +801,7 @@
     * Note: The <code>acceptChanges()</code> method will determine if the
     * <code>COMMIT_ON_ACCEPT_CHANGES</code> is set to true or not. If it is set
     * to true, all updates in the synchronization are committed to the data
-    * source. Otherwise, the application <b>must</b> explicity call the
+    * source. Otherwise, the application <b>must</b> explicitly call the
     * <code>commit</code> or <code>rollback</code> methods as appropriate.
     *
     * @param con a standard JDBC <code>Connection</code> object
@@ -850,7 +850,7 @@
     * associated updates are fully cleared, thus preventing 'dirty' reads by
     * other components that hold a reference to this <code>RowSet</code> object.
     * In addition, the contents cannot be released
-    * until all all components reading this <code>CachedRowSet</code> object
+    * until all components reading this <code>CachedRowSet</code> object
     * have completed their reads. This <code>CachedRowSet</code> object
     * should be returned to normal behavior after firing the
     * <code>rowSetChanged</code> event.
@@ -934,7 +934,7 @@
     * effect until further modification to the rowset data has occurred.
     *
     * @throws SQLException if the cursor is before the first row or after the last
-    *     row in in this <code>CachedRowSet</code> object
+    *     row in this <code>CachedRowSet</code> object
     * @see #undoDelete
     * @see #undoInsert
     * @see java.sql.ResultSet#cancelRowUpdates
@@ -1071,7 +1071,7 @@
     * <code>CachedRowSet</code> object. Internally, this method is used by a rowset
     * to trigger read or write actions between the rowset
     * and the data source. For example, a rowset may need to get a handle
-    * on the the rowset reader (<code>RowSetReader</code> object) from the
+    * on the rowset reader (<code>RowSetReader</code> object) from the
     * <code>SyncProvider</code> to allow the rowset to be populated.
     * <pre>
     *     RowSetReader rowsetReader = null;
@@ -1096,7 +1096,7 @@
     * it currently has set.
     *
     * @return the <code>SyncProvider</code> object that was set when the rowset
-    *      was instantiated, or if none was was set, the default provider
+    *      was instantiated, or if none was set, the default provider
     * @throws SQLException if an error occurs while returning the
     * <code>SyncProvider</code> object
     * @see #setSyncProvider
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/FilteredRowSet.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/FilteredRowSet.java	Thu Aug 28 14:54:07 2014 -0700
@@ -108,7 +108,7 @@
  * The <code>FilteredRowSet</code> range criterion can be modified by applying
  * a new <code>Predicate</code> object to the <code>FilteredRowSet</code>
  * instance at any time. This is  possible if no additional references to the
- * <code>FilteredRowSet</code> object are detected. A new filter has has an
+ * <code>FilteredRowSet</code> object are detected. A new filter has an
  * immediate effect on criterion enforcement within the
  * <code>FilteredRowSet</code> object, and all subsequent views and updates will be
  * subject to similar enforcement.
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/JoinRowSet.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/JoinRowSet.java	Thu Aug 28 14:54:07 2014 -0700
@@ -111,7 +111,7 @@
  * and they do not have to store the exact same data type as long as the data types
  * can be compared.
  * <P>
- * A match column can be be set in two ways:
+ * A match column can be set in two ways:
  * <ul>
  *  <li>By calling the <code>Joinable</code> method <code>setMatchColumn</code><br>
  *  This is the only method that can set the match column before a <code>RowSet</code>
@@ -527,7 +527,7 @@
     public static int RIGHT_OUTER_JOIN = 3;
 
     /**
-     * An ANSI-style <code>JOIN</code> providing a a full JOIN. Specifies that all
+     * An ANSI-style <code>JOIN</code> providing a full JOIN. Specifies that all
      * rows from either table be returned regardless of matching
      * records on the other table.
      */
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/Predicate.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/Predicate.java	Thu Aug 28 14:54:07 2014 -0700
@@ -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
@@ -102,7 +102,7 @@
  */
 
  // <h3>3.0 FilteredRowSet Internals</h3>
- // internalNext, Frist, Last. Discuss guidelines on how to approach this
+ // internalNext, First, Last. Discuss guidelines on how to approach this
  // and cite examples in reference implementations.
 public interface Predicate {
     /**
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/RowSetMetaDataImpl.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/RowSetMetaDataImpl.java	Thu Aug 28 14:54:07 2014 -0700
@@ -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
@@ -607,7 +607,7 @@
     }
 
     /**
-     * Retrieves the the suggested column title for the designated
+     * Retrieves the suggested column title for the designated
      * column for use in printouts and displays.
      *
      * @param columnIndex the first column is 1, the second is 2, and so on;
@@ -1073,7 +1073,7 @@
         public int colType;
 
         /**
-         * The field that holds the the type name used by this particular data source
+         * The field that holds the type name used by this particular data source
          * for the value stored in this column.
          *
          * @serial
@@ -1081,7 +1081,7 @@
         public String colTypeName;
 
         /**
-         * The field that holds the updatablity boolean per column of a RowSet
+         * The field that holds the updatability boolean per column of a RowSet
          *
          * @serial
          */
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/RowSetProvider.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/RowSetProvider.java	Thu Aug 28 14:54:07 2014 -0700
@@ -97,7 +97,7 @@
      * The {@link ServiceLoader} API. The {@code ServiceLoader} API will look
      * for a class name in the file
      * {@code META-INF/services/javax.sql.rowset.RowSetFactory}
-     * in jars available to the runtime. For example, to have the the RowSetFactory
+     * in jars available to the runtime. For example, to have the RowSetFactory
      * implementation {@code com.sun.rowset.RowSetFactoryImpl } loaded, the
      * entry in {@code META-INF/services/javax.sql.rowset.RowSetFactory} would be:
      *  <ul>
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/RowSetWarning.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/RowSetWarning.java	Thu Aug 28 14:54:07 2014 -0700
@@ -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
@@ -111,7 +111,7 @@
      * @param reason a <code>String</code> giving a description of the
      *        warning;
      * @param SQLState an XOPEN code identifying the warning; if a non standard
-     *        XPOEN <i>SQLState</i> is supplied, no exception is thrown.
+     *        XOPEN <i>SQLState</i> is supplied, no exception is thrown.
      * @param vendorCode a database vendor-specific warning code
      */
     public RowSetWarning(java.lang.String reason, java.lang.String SQLState, int vendorCode) {
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/WebRowSet.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/WebRowSet.java	Thu Aug 28 14:54:07 2014 -0700
@@ -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
@@ -52,7 +52,7 @@
  * of the {@code WebRowSet} interface to ensure interoperability. In addition,
  * the {@code WebRowSet} schema uses specific SQL/XML Schema annotations,
  * thus ensuring greater cross
- * platform inter-operability. This is an effort currently under way at the ISO
+ * platform interoperability. This is an effort currently under way at the ISO
  * organization. The SQL/XML definition is available at the following URI:
  * <ul>
  * <li>
@@ -109,7 +109,7 @@
  *      <max-rows>0</max-rows>
  *      <query-timeout>0</query-timeout>
  *      <read-only>false</read-only>
- *      <rowset-type>TRANSACTION_READ_UNCOMMITED</rowset-type>
+ *      <rowset-type>TRANSACTION_READ_UNCOMMITTED</rowset-type>
  *      <show-deleted>false</show-deleted>
  *      <table-name/>
  *      <url>jdbc:thin:oracle</url>
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/package.html	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/package.html	Thu Aug 28 14:54:07 2014 -0700
@@ -156,7 +156,7 @@
 <li><b>3.2 Role of the <code>BaseRowSet</code> Class</b>
 <p>
 A compliant JDBC <code>RowSet</code> implementation <b>must</b> implement one or more 
-standard interfaces specified in this package and and <b>may</b> extend the 
+standard interfaces specified in this package and <b>may</b> extend the 
 <a href="BaseRowSet.html"><code>BaseRowSet</code></a> abstract class. For example, a 
 <code>CachedRowSet</code> implementation must implement the <code>CachedRowSet</code>
 interface and extend the <code>BaseRowSet</code> abstract class. The
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialArray.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialArray.java	Thu Aug 28 14:54:07 2014 -0700
@@ -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
@@ -202,7 +202,7 @@
   }
 
     /**
-     * This method frees the {@code SeriableArray} object and releases the
+     * This method frees the {@code SerialArray} object and releases the
      * resources that it holds. The object is invalid once the {@code free}
      * method is called. <p> If {@code free} is called multiple times, the
      * subsequent calls to {@code free} are treated as a no-op. </P>
@@ -313,7 +313,6 @@
         return dst;
     }
 
- //[if an error occurstype map used??]
     /**
      * Returns a new array that is a copy of this <code>SerialArray</code>
      * object, using the given type map for the custom
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialBlob.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialBlob.java	Thu Aug 28 14:54:07 2014 -0700
@@ -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
@@ -475,7 +475,7 @@
 
 
     /**
-     * This method frees the {@code SeriableBlob} object and releases the
+     * This method frees the {@code SerialBlob} object and releases the
      * resources that it holds. The object is invalid once the {@code free}
      * method is called. <p> If {@code free} is called multiple times, the
      * subsequent calls to {@code free} are treated as a no-op. </P>
@@ -578,7 +578,7 @@
         fields.put("len", len);
         fields.put("origLen", origLen);
         // Note: this check to see if it is an instance of Serializable
-        // is for backwards compatibiity
+        // is for backwards compatibility
         fields.put("blob", blob instanceof Serializable ? blob : null);
         s.writeFields();
     }
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialClob.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialClob.java	Thu Aug 28 14:54:07 2014 -0700
@@ -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
@@ -565,7 +565,7 @@
     }
 
     /**
-     * This method frees the {@code SeriableClob} object and releases the
+     * This method frees the {@code SerialClob} object and releases the
      * resources that it holds.
      * The object is invalid once the {@code free} method is called.
      * <p>
@@ -670,7 +670,7 @@
         fields.put("len", len);
         fields.put("origLen", origLen);
         // Note: this check to see if it is an instance of Serializable
-        // is for backwards compatibiity
+        // is for backwards compatibility
         fields.put("clob", clob instanceof Serializable ? clob : null);
         s.writeFields();
     }
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialDatalink.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialDatalink.java	Thu Aug 28 14:54:07 2014 -0700
@@ -61,7 +61,7 @@
 
     /**
      * The SQL type of the elements in this <code>SerialDatalink</code>
-     * object.  The type is expressed as one of the contants from the
+     * object.  The type is expressed as one of the constants from the
      * class <code>java.sql.Types</code>.
      * @serial
      */
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialRef.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/SerialRef.java	Thu Aug 28 14:54:07 2014 -0700
@@ -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
@@ -243,7 +243,7 @@
         fields.put("baseTypeName", baseTypeName);
         fields.put("object", object);
         // Note: this check to see if it is an instance of Serializable
-        // is for backwards compatibiity
+        // is for backwards compatibility
         fields.put("reference", reference instanceof Serializable ? reference : null);
         s.writeFields();
     }
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/package.html	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/serial/package.html	Thu Aug 28 14:54:07 2014 -0700
@@ -87,7 +87,7 @@
 <h3>5.0 SerialDatalink</h3>
 A serializable mapping in the Java programming language of an SQL DATALINK
 value. A DATALINK value references a file outside of the underlying data source
-that the the originating data source manages. <br>
+that the originating data source manages. <br>
 <br>
 <code>RowSet</code> implementations can use the method <tt>RowSet.getURL() </tt>to retrieve
 a <code>java.net.URL</code> object, which can be used to manipulate the external data.
@@ -141,7 +141,7 @@
   The <tt>SQLInputImpl</tt> class provides a set of reader methods
  analogous to the <tt>ResultSet</tt> getter methods. These methods make it
  possible to read the values in an <tt>SQLInputImpl</tt> object. The method
-<code>wasNull</code> is used to determine whether the the last value read was SQL NULL.
+<code>wasNull</code> is used to determine whether the last value read was SQL NULL.
  <br>
   <br>
   When a constructor or getter method that takes a <code>Map</code> object is called, 
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/spi/SyncFactory.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/spi/SyncFactory.java	Thu Aug 28 14:54:07 2014 -0700
@@ -259,7 +259,7 @@
     private static Hashtable<String, SyncProvider> implementations;
 
     /**
-     * Adds the the given synchronization provider to the factory register. Guidelines
+     * Adds the given synchronization provider to the factory register. Guidelines
      * are provided in the <code>SyncProvider</code> specification for the
      * required naming conventions for <code>SyncProvider</code>
      * implementations.
@@ -462,7 +462,7 @@
 
     /**
      * Internal handler for all standard property parsing. Parses standard
-     * ROWSET properties and stores lazy references into the the internal registry.
+     * ROWSET properties and stores lazy references into the internal registry.
      */
     private static void parseProperties(Properties p) {
 
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/spi/SyncProvider.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/spi/SyncProvider.java	Thu Aug 28 14:54:07 2014 -0700
@@ -173,7 +173,7 @@
  * are used as return values or parameters for <code>SyncProvider</code> methods.
  * <code>SyncProvider</code> objects may be implemented to perform synchronization
  * between a <code>RowSet</code> object and its underlying data source with varying
- * degrees of of care. The first group of constants indicate how synchronization
+ * degrees of care. The first group of constants indicate how synchronization
  * is handled. For example, <code>GRADE_NONE</code> indicates that a
  * <code>SyncProvider</code> object will not take any care to see what data is
  * valid and will simply write the <code>RowSet</code> data to the data source.
--- a/src/java.sql.rowset/share/classes/javax/sql/rowset/spi/package.html	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql.rowset/share/classes/javax/sql/rowset/spi/package.html	Thu Aug 28 14:54:07 2014 -0700
@@ -122,7 +122,7 @@
      <a href="http://www.syncml.org">http://www.syncml.org</a>
 </PRE>
 <P>
-For the the next level up, the
+For the next level up, the
 writer checks to see if there are any conflicts, and if there are, 
 it does not write anything to the data source.  The problem with this concurrency
 level is that if another party has modified the corresponding data in the data source 
--- a/src/java.sql/share/classes/java/sql/Array.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql/share/classes/java/sql/Array.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -181,7 +181,7 @@
   Object getArray(long index, int count) throws SQLException;
 
   /**
-   * Retreives a slice of the SQL <code>ARRAY</code> value
+   * Retrieves a slice of the SQL <code>ARRAY</code> value
    * designated by this <code>Array</code> object, beginning with the specified
    * <code>index</code> and containing up to <code>count</code>
    * successive elements of the SQL array.
--- a/src/java.sql/share/classes/java/sql/BatchUpdateException.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql/share/classes/java/sql/BatchUpdateException.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -479,14 +479,14 @@
    * to BatchUpdateException:
    * <ul>
    * <li>Add field longUpdateCounts</li>
-   * <li>Add Constructorr which takes long[] for update counts</li>
+   * <li>Add Constructor which takes long[] for update counts</li>
    * <li>Add getLargeUpdateCounts method</li>
    * </ul>
    * When any of the constructors are called, the int[] and long[] updateCount
    * fields are populated by copying the one array to each other.
    *
    * As the JDBC driver passes in the updateCounts, there has always been the
-   * possiblity for overflow and BatchUpdateException does not need to account
+   * possibility for overflow and BatchUpdateException does not need to account
    * for that, it simply copies the arrays.
    *
    * JDBC drivers should always use the constructor that specifies long[] and
--- a/src/java.sql/share/classes/java/sql/CallableStatement.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql/share/classes/java/sql/CallableStatement.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -1145,7 +1145,7 @@
      * Java <code>Object</code> types to SQL types.  The given argument
      * will be converted to the corresponding SQL type before being
      * sent to the database.
-     * <p>Note that this method may be used to pass datatabase-
+     * <p>Note that this method may be used to pass database-
      * specific abstract data types, by using a driver-specific Java
      * type.
      *
@@ -1882,7 +1882,8 @@
        throws SQLException;
 
     /**
-     * Sets the designated parameter to a <code>InputStream</code> object.  The <code>inputstream</code> must contain  the number
+     * Sets the designated parameter to a {@code InputStream} object.
+     * The <code>Inputstream</code> must contain the number
      * of characters specified by length, otherwise a <code>SQLException</code> will be
      * generated when the <code>CallableStatement</code> is executed.
      * This method differs from the <code>setBinaryStream (int, InputStream, int)</code>
@@ -1899,8 +1900,8 @@
      * @param length the number of bytes in the parameter data.
      * @throws SQLException  if parameterName does not correspond to a named
      * parameter; if the length specified
-     * is less than zero; if the number of bytes in the inputstream does not match
-     * the specified length; if a database access error occurs or
+     * is less than zero; if the number of bytes in the {@code InputStream}
+     * does not match the specified length; if a database access error occurs or
      * this method is called on a closed <code>CallableStatement</code>
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
      * this method
@@ -2378,7 +2379,7 @@
        throws SQLException;
 
     /**
-     * Sets the designated parameter to a <code>InputStream</code> object.
+     * Sets the designated parameter to a {@code InputStream} object.
      * This method differs from the <code>setBinaryStream (int, InputStream)</code>
      * method because it informs the driver that the parameter value should be
      * sent to the server as a <code>BLOB</code>.  When the <code>setBinaryStream</code> method is used,
@@ -2430,7 +2431,7 @@
 
 
     /**
-     *<p>Returns an object representing the value of OUT parameter
+     * Returns an object representing the value of OUT parameter
      * {@code parameterIndex} and will convert from the
      * SQL type of the parameter to the requested Java data type, if the
      * conversion is supported. If the conversion is not
@@ -2459,7 +2460,7 @@
 
 
     /**
-     *<p>Returns an object representing the value of OUT parameter
+     * Returns an object representing the value of OUT parameter
      * {@code parameterName} and will convert from the
      * SQL type of the parameter to the requested Java data type, if the
      * conversion is supported. If the conversion is not
@@ -2490,7 +2491,7 @@
      //------------------------- JDBC 4.2 -----------------------------------
 
      /**
-     * <p>Sets the value of the designated parameter with the given object.
+     * Sets the value of the designated parameter with the given object.
      *
      * If the second argument is an {@code InputStream} then the stream
      * must contain the number of bytes specified by scaleOrLength.
--- a/src/java.sql/share/classes/java/sql/Connection.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql/share/classes/java/sql/Connection.java	Thu Aug 28 14:54:07 2014 -0700
@@ -274,7 +274,7 @@
      * <code>close</code> method.  If the <code>close</code> method is called
      * and there is an active transaction, the results are implementation-defined.
      *
-     * @exception SQLException SQLException if a database access error occurs
+     * @exception SQLException if a database access error occurs
      */
     void close() throws SQLException;
 
@@ -335,7 +335,7 @@
      *
      * @return <code>true</code> if this <code>Connection</code> object
      *         is read-only; <code>false</code> otherwise
-     * @exception SQLException SQLException if a database access error occurs
+     * @exception SQLException if a database access error occurs
      * or this method is called on a closed connection
      */
     boolean isReadOnly() throws SQLException;
@@ -492,7 +492,7 @@
      * returns <code>null</code> until a new warning is
      * reported for this <code>Connection</code> object.
      *
-     * @exception SQLException SQLException if a database access error occurs
+     * @exception SQLException if a database access error occurs
      * or this method is called on a closed connection
      */
     void clearWarnings() throws SQLException;
@@ -632,7 +632,7 @@
      * this <code>Connection</code> object.  The type map will be used for the
      * custom mapping of SQL structured types and distinct types.
      * <p>
-     * You must set the the values for the <code>TypeMap</code> prior to
+     * You must set the values for the <code>TypeMap</code> prior to
      * callng <code>setMap</code> as a JDBC driver may create an internal copy
      * of the <code>TypeMap</code>:
      *
@@ -662,7 +662,7 @@
      * Changes the default holdability of <code>ResultSet</code> objects
      * created using this <code>Connection</code> object to the given
      * holdability.  The default holdability of <code>ResultSet</code> objects
-     * can be be determined by invoking
+     * can be determined by invoking
      * {@link DatabaseMetaData#getResultSetHoldability}.
      *
      * @param holdability a <code>ResultSet</code> holdability constant; one of
--- a/src/java.sql/share/classes/java/sql/DatabaseMetaData.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql/share/classes/java/sql/DatabaseMetaData.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -1216,7 +1216,7 @@
      * <code>PROCEDURE_CAT</code>, <code>PROCEDURE_SCHEM</code>,
      * <code>PROCEDURE_NAME</code> and <code>SPECIFIC_ NAME</code>.
      *
-     * <P>Each procedure description has the the following columns:
+     * <P>Each procedure description has the following columns:
      *  <OL>
      *  <LI><B>PROCEDURE_CAT</B> String {@code =>} procedure catalog (may be <code>null</code>)
      *  <LI><B>PROCEDURE_SCHEM</B> String {@code =>} procedure schema (may be <code>null</code>)
@@ -1487,7 +1487,7 @@
      *  <LI><B>TABLE_TYPE</B> String {@code =>} table type.  Typical types are "TABLE",
      *                  "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY",
      *                  "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
-     *  <LI><B>REMARKS</B> String {@code =>} explanatory comment on the table
+     *  <LI><B>REMARKS</B> String {@code =>} explanatory comment on the table (may be {@code null})
      *  <LI><B>TYPE_CAT</B> String {@code =>} the types catalog (may be <code>null</code>)
      *  <LI><B>TYPE_SCHEM</B> String {@code =>} the types schema (may be <code>null</code>)
      *  <LI><B>TYPE_NAME</B> String {@code =>} type name (may be <code>null</code>)
@@ -1710,7 +1710,7 @@
      *  <LI><B>GRANTOR</B> String {@code =>} grantor of access (may be <code>null</code>)
      *  <LI><B>GRANTEE</B> String {@code =>} grantee of access
      *  <LI><B>PRIVILEGE</B> String {@code =>} name of access (SELECT,
-     *      INSERT, UPDATE, REFRENCES, ...)
+     *      INSERT, UPDATE, REFERENCES, ...)
      *  <LI><B>IS_GRANTABLE</B> String {@code =>} "YES" if grantee is permitted
      *      to grant to others; "NO" if not; <code>null</code> if unknown
      *  </OL>
@@ -1755,7 +1755,7 @@
      *  <LI><B>GRANTOR</B> String {@code =>} grantor of access (may be <code>null</code>)
      *  <LI><B>GRANTEE</B> String {@code =>} grantee of access
      *  <LI><B>PRIVILEGE</B> String {@code =>} name of access (SELECT,
-     *      INSERT, UPDATE, REFRENCES, ...)
+     *      INSERT, UPDATE, REFERENCES, ...)
      *  <LI><B>IS_GRANTABLE</B> String {@code =>} "YES" if grantee is permitted
      *      to grant to others; "NO" if not; <code>null</code> if unknown
      *  </OL>
@@ -2509,7 +2509,7 @@
      *  <LI><B>TYPE</B> short {@code =>} index type:
      *      <UL>
      *      <LI> tableIndexStatistic - this identifies table statistics that are
-     *           returned in conjuction with a table's index descriptions
+     *           returned in conjunction with a table's index descriptions
      *      <LI> tableIndexClustered - this is a clustered index
      *      <LI> tableIndexHashed - this is a hashed index
      *      <LI> tableIndexOther - this is some other style of index
@@ -2524,7 +2524,7 @@
      *  <LI><B>CARDINALITY</B> long {@code =>} When TYPE is tableIndexStatistic, then
      *      this is the number of rows in the table; otherwise, it is the
      *      number of unique values in the index.
-     *  <LI><B>PAGES</B> long {@code =>} When TYPE is  tableIndexStatisic then
+     *  <LI><B>PAGES</B> long {@code =>} When TYPE is  tableIndexStatistic then
      *      this is the number of pages used for the table, otherwise it
      *      is the number of pages used for the current index.
      *  <LI><B>FILTER_CONDITION</B> String {@code =>} Filter condition, if any.
@@ -2858,7 +2858,7 @@
      * @return <code>true</code> if a <code>CallableStatement</code> object
      *         can return multiple <code>ResultSet</code> objects
      *         simultaneously; <code>false</code> otherwise
-     * @exception SQLException if a datanase access error occurs
+     * @exception SQLException if a database access error occurs
      * @since 1.4
      */
     boolean supportsMultipleOpenResults() throws SQLException;
@@ -3302,7 +3302,7 @@
      * <code>FUNCTION_NAME</code> and
      * <code>SPECIFIC_ NAME</code>.
      *
-     * <P>Each function description has the the following columns:
+     * <P>Each function description has the following columns:
      *  <OL>
      *  <LI><B>FUNCTION_CAT</B> String {@code =>} function catalog (may be <code>null</code>)
      *  <LI><B>FUNCTION_SCHEM</B> String {@code =>} function schema (may be <code>null</code>)
--- a/src/java.sql/share/classes/java/sql/NClob.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql/share/classes/java/sql/NClob.java	Thu Aug 28 14:54:07 2014 -0700
@@ -25,8 +25,6 @@
 
 package java.sql;
 
-import java.sql.Clob;
-
 /**
  * The mapping in the Java&trade; programming language
  * for the SQL <code>NCLOB</code> type.
@@ -34,7 +32,7 @@
  * that stores a Character Large Object using the National Character Set
  *  as a column value in a row of  a database table.
  * <P>The <code>NClob</code> interface extends the <code>Clob</code> interface
- * which provides provides methods for getting the
+ * which provides methods for getting the
  * length of an SQL <code>NCLOB</code> value,
  * for materializing a <code>NCLOB</code> value on the client, and for
  * searching for a substring or <code>NCLOB</code> object within a
--- a/src/java.sql/share/classes/java/sql/PreparedStatement.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql/share/classes/java/sql/PreparedStatement.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -415,7 +415,7 @@
      * will be converted to the corresponding SQL type before being
      * sent to the database.
      *
-     * <p>Note that this method may be used to pass datatabase-
+     * <p>Note that this method may be used to pass database-
      * specific abstract data types, by using a driver-specific Java
      * type.
      *
@@ -838,7 +838,8 @@
        throws SQLException;
 
     /**
-     * Sets the designated parameter to a <code>InputStream</code> object.  The inputstream must contain  the number
+     * Sets the designated parameter to a <code>InputStream</code> object.
+     * The {@code Inputstream} must contain  the number
      * of characters specified by length otherwise a <code>SQLException</code> will be
      * generated when the <code>PreparedStatement</code> is executed.
      * This method differs from the <code>setBinaryStream (int, InputStream, int)</code>
@@ -854,8 +855,8 @@
      * @throws SQLException if parameterIndex does not correspond to a parameter
      * marker in the SQL statement; if a database access error occurs;
      * this method is called on a closed <code>PreparedStatement</code>;
-     *  if the length specified
-     * is less than zero or if the number of bytes in the inputstream does not match
+     * if the length specified
+     * is less than zero or if the number of bytes in the {@code InputStream} does not match
      * the specified length.
      * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
      *
--- a/src/java.sql/share/classes/java/sql/SQLException.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql/share/classes/java/sql/SQLException.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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,7 @@
  * <P>Each <code>SQLException</code> provides several kinds of information:
  * <UL>
  *   <LI> a string describing the error.  This is used as the Java Exception
- *       message, available via the method <code>getMesasge</code>.
+ *       message, available via the method <code>getMessage</code>.
  *   <LI> a "SQLstate" string, which follows either the XOPEN SQLstate conventions
  *        or the SQL:2003 conventions.
  *       The values of the SQLState string are described in the appropriate spec.
--- a/src/java.sql/share/classes/java/sql/SQLPermission.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql/share/classes/java/sql/SQLPermission.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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,7 @@
  * <code>DriverManager.setLogStream</code> (deprecated) method,
  * {@code SyncFactory.setJNDIContext} method,
  * {@code SyncFactory.setLogger} method,
- * {@code Connection.setNetworktimeout} method,
+ * {@code Connection.setNetworkTimeout} method,
  * or the <code>Connection.abort</code> method.
  * If there is no <code>SQLPermission</code> object, these methods
  * throw a <code>java.lang.SecurityException</code> as a runtime exception.
--- a/src/java.sql/share/classes/java/sql/SQLXML.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql/share/classes/java/sql/SQLXML.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, 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
@@ -174,7 +174,7 @@
  * reading APIs are called: getBinaryStream(), getCharacterStream(), getSource(), and getString().
  * Implementations may also change the state to not writable when this occurs.
  * <p>
- * The state moves from writable to not writeable once free() or any of the
+ * The state moves from writable to not writable once free() or any of the
  * writing APIs are called: setBinaryStream(), setCharacterStream(), setResult(), and setString().
  * Implementations may also change the state to not readable when this occurs.
  *
@@ -192,7 +192,7 @@
 {
   /**
    * This method closes this object and releases the resources that it held.
-   * The SQL XML object becomes invalid and neither readable or writeable
+   * The SQL XML object becomes invalid and neither readable or writable
    * when this method is called.
    *
    * After <code>free</code> has been called, any attempt to invoke a
@@ -231,7 +231,7 @@
    * The behavior of this method is the same as ResultSet.updateBinaryStream()
    * when the designated column of the ResultSet has a type java.sql.Types of SQLXML.
    * <p>
-   * The SQL XML object becomes not writeable when this method is called and
+   * The SQL XML object becomes not writable when this method is called and
    * may also become not readable depending on implementation.
    *
    * @return a stream to which data can be written.
@@ -277,7 +277,7 @@
    * The behavior of this method is the same as ResultSet.updateCharacterStream()
    * when the designated column of the ResultSet has a type java.sql.Types of SQLXML.
    * <p>
-   * The SQL XML object becomes not writeable when this method is called and
+   * The SQL XML object becomes not writable when this method is called and
    * may also become not readable depending on implementation.
    *
    * @return a stream to which data can be written.
@@ -325,7 +325,7 @@
    * The behavior of this method is the same as ResultSet.updateString()
    * when the designated column of the ResultSet has a type java.sql.Types of SQLXML.
    * <p>
-   * The SQL XML object becomes not writeable when this method is called and
+   * The SQL XML object becomes not writable when this method is called and
    * may also become not readable depending on implementation.
    *
    * @param value the XML value
@@ -387,7 +387,7 @@
    * <p>
    * The systemID of the Result is implementation dependent.
    * <p>
-   * The SQL XML object becomes not writeable when this method is called and
+   * The SQL XML object becomes not writable when this method is called and
    * may also become not readable depending on implementation.
    * <p>
    * Note that SAX is a callback architecture and the returned
--- a/src/java.sql/share/classes/java/sql/Timestamp.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql/share/classes/java/sql/Timestamp.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -590,7 +590,7 @@
      *  the provided instant
      * @exception NullPointerException if {@code instant} is null.
      * @exception IllegalArgumentException if the instant is too large to
-     *  represent as a {@code Timesamp}
+     *  represent as a {@code Timestamp}
      * @since 1.8
      */
     public static Timestamp from(Instant instant) {
--- a/src/java.sql/share/classes/java/sql/Types.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql/share/classes/java/sql/Types.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -243,7 +243,7 @@
         public final static int REF                 = 2006;
 
     /**
-     * The constant in the Java programming language, somtimes referred to
+     * The constant in the Java programming language, sometimes referred to
      * as a type code, that identifies the generic SQL type <code>DATALINK</code>.
      *
      * @since 1.4
@@ -251,7 +251,7 @@
     public final static int DATALINK = 70;
 
     /**
-     * The constant in the Java programming language, somtimes referred to
+     * The constant in the Java programming language, sometimes referred to
      * as a type code, that identifies the generic SQL type <code>BOOLEAN</code>.
      *
      * @since 1.4
--- a/src/java.sql/share/classes/javax/sql/RowSet.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/src/java.sql/share/classes/javax/sql/RowSet.java	Thu Aug 28 14:54:07 2014 -0700
@@ -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
@@ -66,9 +66,9 @@
  * changes to its data while it is disconnected and then send the changes back
  * to the original source of the data, but it must reestablish a connection to do so.
  * <P>
- * A disconnected rowset may have a reader (a <code>RowSetReader</code> object)
+ * A disconnected rowset may have a {@code Reader} (a <code>RowSetReader</code> object)
  * and a writer (a <code>RowSetWriter</code> object) associated with it.
- * The reader may be implemented in many different ways to populate a rowset
+ * The {@code Reader} may be implemented in many different ways to populate a rowset
  * with data, including getting data from a non-relational data source. The
  * writer can also be implemented in many different ways to propagate changes
  * made to the rowset's data back to the underlying data source.
@@ -727,7 +727,7 @@
 
   /**
    * Sets the designated parameter in this <code>RowSet</code> object's command
-   * to the given <code>java.math.BigDeciaml</code> value.
+   * to the given {@code java.math.BigDecimal} value.
    * The driver converts this to
    * an SQL <code>NUMERIC</code> value before sending it to the database.
    *
@@ -974,7 +974,7 @@
    * standard interface.
    *
    * @param parameterIndex the first parameter is 1, the second is 2, ...
-   * @param reader the <code>Reader</code> object that contains the UNICODE data
+   * @param reader the {@code Reader} object that contains the UNICODE data
    *        to be set
    * @param length the number of characters in the stream
    * @exception SQLException if a database access error occurs
@@ -984,7 +984,7 @@
                           int length) throws SQLException;
 
   /**
-     * Sets the designated parameter to the given <code>Reader</code>
+     * Sets the designated parameter to the given {@code Reader}
      * object, which is the given number of characters long.
      * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
      * parameter, it may be more practical to send it via a
@@ -1112,7 +1112,7 @@
 
   /**
    * Sets the designated parameter in this <code>RowSet</code> object's command
-   * to the given <code>Reader</code>
+   * to the given {@code Reader}
    * object.
    * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
    * parameter, it may be more practical to send it via a
@@ -1139,7 +1139,7 @@
                           java.io.Reader reader) throws SQLException;
 
   /**
-     * Sets the designated parameter to the given <code>Reader</code>
+     * Sets the designated parameter to the given {@code Reader}
      * object.
      * When a very large UNICODE value is input to a <code>LONGVARCHAR</code>
      * parameter, it may be more practical to send it via a
@@ -1167,8 +1167,8 @@
 
   /**
    * Sets the designated parameter in this <code>RowSet</code> object's command
-   * to a <code>Reader</code> object. The
-   * <code>Reader</code> reads the data till end-of-file is reached. The
+   * to a {@code Reader} object. The
+   * {@code Reader} reads the data till end-of-file is reached. The
    * driver does the necessary conversion from Java character format to
    * the national character set in the database.
 
@@ -1200,7 +1200,8 @@
    *
    * If the second argument is an <code>InputStream</code> then the stream must contain
    * the number of bytes specified by scaleOrLength.  If the second argument is a
-   * <code>Reader</code> then the reader must contain the number of characters specified    * by scaleOrLength. If these conditions are not true the driver will generate a
+   * {@code Reader} then the {@code Reader} must contain the number of characters specified
+   * by scaleOrLength. If these conditions are not true the driver will generate a
    * <code>SQLException</code> when the prepared statement is executed.
    *
    * <p>The given Java object will be converted to the targetSqlType
@@ -1216,7 +1217,7 @@
    * value of the corresponding SQL type.
    *
    *
-   * <p>Note that this method may be used to pass datatabase-specific
+   * <p>Note that this method may be used to pass database-specific
    * abstract data types.
    *
    * @param parameterIndex the first parameter is 1, the second is 2, ...
@@ -1227,9 +1228,9 @@
    * @param scaleOrLength for <code>java.sql.Types.DECIMAL</code>
    *          or <code>java.sql.Types.NUMERIC types</code>,
    *          this is the number of digits after the decimal point. For
-   *          Java Object types <code>InputStream</code> and <code>Reader</code>,
+   *          Java Object types <code>InputStream</code> and {@code Reader},
    *          this is the length
-   *          of the data in the stream or reader.  For all other types,
+   *          of the data in the stream or {@code Reader}.  For all other types,
    *          this value will be ignored.
    * @exception SQLException if a database access error occurs
    * @see java.sql.Types
@@ -1255,7 +1256,7 @@
      * or <code>Array</code>, the driver should pass it to the database as a
      * value of the corresponding SQL type.
      * <P>
-     * Note that this method may be used to pass datatabase-
+     * Note that this method may be used to pass database-
      * specific abstract data types.
      *
      * @param parameterName the name of the parameter
@@ -1335,7 +1336,7 @@
      * will be converted to the corresponding SQL type before being
      * sent to the database.
      *
-     * <p>Note that this method may be used to pass datatabase-
+     * <p>Note that this method may be used to pass database-
      * specific abstract data types, by using a driver-specific Java
      * type.
      *
@@ -1373,7 +1374,7 @@
    * given Java object to its standard SQL mapping before sending it
    * to the database.
    *
-   * <p>Note that this method may be used to pass datatabase-specific
+   * <p>Note that this method may be used to pass database-specific
    * abstract data types by using a driver-specific Java type.
    *
    * If the object is of a class implementing <code>SQLData</code>,
@@ -1420,7 +1421,8 @@
   void setBlob (int i, Blob x) throws SQLException;
 
   /**
-     * Sets the designated parameter to a <code>InputStream</code> object.  The inputstream must contain  the number
+     * Sets the designated parameter to a <code>InputStream</code> object.
+     * The <code>InputStream</code> must contain  the number
      * of characters specified by length otherwise a <code>SQLException</code> will be
      * generated when the <code>PreparedStatement</code> is executed.
      * This method differs from the <code>setBinaryStream (int, InputStream, int)</code>
@@ -1437,7 +1439,7 @@
      * this method is called on a closed <code>PreparedStatement</code>,
      * if parameterIndex does not correspond
      * to a parameter marker in the SQL statement,  if the length specified
-     * is less than zero or if the number of bytes in the inputstream does not match
+     * is less than zero or if the number of bytes in the <code>InputStream</code> does not match
      * the specified length.
      * @throws SQLFeatureNotSupportedException  if the JDBC driver does not support this method
      *
@@ -1474,7 +1476,8 @@
         throws SQLException;
 
   /**
-     * Sets the designated parameter to a <code>InputStream</code> object.  The <code>inputstream</code> must contain  the number
+     * Sets the designated parameter to a <code>InputStream</code> object.
+     * The "{@code InputStream} must contain  the number
      * of characters specified by length, otherwise a <code>SQLException</code> will be
      * generated when the <code>CallableStatement</code> is executed.
      * This method differs from the <code>setBinaryStream (int, InputStream, int)</code>
@@ -1491,7 +1494,7 @@
      * @param length the number of bytes in the parameter data.
      * @throws SQLException  if parameterIndex does not correspond
      * to a parameter marker in the SQL statement,  or if the length specified
-     * is less than zero; if the number of bytes in the inputstream does not match
+     * is less than zero; if the number of bytes in the <code>InputStream</code> does not match
      * the specified length; if a database access error occurs or
      * this method is called on a closed <code>CallableStatement</code>
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
@@ -1554,7 +1557,8 @@
   void setClob (int i, Clob x) throws SQLException;
 
   /**
-     * Sets the designated parameter to a <code>Reader</code> object.  The reader must contain  the number
+     * Sets the designated parameter to a {@code Reader} object.
+     * The {@code Reader} must contain  the number
      * of characters specified by length otherwise a <code>SQLException</code> will be
      * generated when the <code>PreparedStatement</code> is executed.
      *This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
@@ -1576,7 +1580,7 @@
        throws SQLException;
 
   /**
-     * Sets the designated parameter to a <code>Reader</code> object.
+     * Sets the designated parameter to a {@code Reader} object.
      * This method differs from the <code>setCharacterStream (int, Reader)</code> method
      * because it informs the driver that the parameter value should be sent to
      * the server as a <code>CLOB</code>.  When the <code>setCharacterStream</code> method is used, the
@@ -1600,7 +1604,8 @@
        throws SQLException;
 
   /**
-     * Sets the designated parameter to a <code>Reader</code> object.  The <code>reader</code> must contain  the number
+     * Sets the designated parameter to a {@code Reader} object.  The
+     * {@code Reader} must contain  the number
      * of characters specified by length otherwise a <code>SQLException</code> will be
      * generated when the <code>CallableStatement</code> is executed.
      * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
@@ -1639,7 +1644,7 @@
     void setClob (String parameterName, Clob x) throws SQLException;
 
   /**
-     * Sets the designated parameter to a <code>Reader</code> object.
+     * Sets the designated parameter to a {@code Reader} object.
      * This method differs from the <code>setCharacterStream (int, Reader)</code> method
      * because it informs the driver that the parameter value should be sent to
      * the server as a <code>CLOB</code>.  When the <code>setCharacterStream</code> method is used, the
@@ -1859,10 +1864,10 @@
    * outstanding updates, they are ignored.
    * <P>
    * If this <code>RowSet</code> object does not maintain a continuous connection
-   * with its source of data, it may use a reader (a <code>RowSetReader</code>
-   * object) to fill itself with data.  In this case, a reader will have been
+   * with its source of data, it may use a {@code Reader} (a <code>RowSetReader</code>
+   * object) to fill itself with data.  In this case, a {@code Reader} will have been
    * registered with this <code>RowSet</code> object, and the method
-   * <code>execute</code> will call on the reader's <code>readData</code>
+   * <code>execute</code> will call on the {@code Reader}'s <code>readData</code>
    * method as part of its implementation.
    *
    * @exception SQLException if a database access error occurs or any of the
@@ -1987,8 +1992,8 @@
             throws SQLException;
 
     /**
-     * Sets the designated parameter to a <code>Reader</code> object. The
-     * <code>Reader</code> reads the data till end-of-file is reached. The
+     * Sets the designated parameter to a {@code Reader} object. The
+     * {@code Reader} reads the data till end-of-file is reached. The
      * driver does the necessary conversion from Java character format to
      * the national character set in the database.
      * @param parameterIndex of the first parameter is 1, the second is 2, ...
@@ -2002,8 +2007,8 @@
      void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException;
 
     /**
-     * Sets the designated parameter to a <code>Reader</code> object. The
-     * <code>Reader</code> reads the data till end-of-file is reached. The
+     * Sets the designated parameter to a {@code Reader} object. The
+     * {@code Reader} reads the data till end-of-file is reached. The
      * driver does the necessary conversion from Java character format to
      * the national character set in the database.
      * @param parameterName the name of the column to be set
@@ -2018,8 +2023,8 @@
             throws SQLException;
 
     /**
-     * Sets the designated parameter to a <code>Reader</code> object. The
-     * <code>Reader</code> reads the data till end-of-file is reached. The
+     * Sets the designated parameter to a {@code Reader} object. The
+     * {@code Reader} reads the data till end-of-file is reached. The
      * driver does the necessary conversion from Java character format to
      * the national character set in the database.
 
@@ -2055,7 +2060,8 @@
     void setNClob(String parameterName, NClob value) throws SQLException;
 
     /**
-     * Sets the designated parameter to a <code>Reader</code> object.  The <code>reader</code> must contain  the number
+     * Sets the designated parameter to a {@code Reader} object.
+     * The {@code Reader} must contain  the number
      * of characters specified by length otherwise a <code>SQLException</code> will be
      * generated when the <code>CallableStatement</code> is executed.
      * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
@@ -2081,7 +2087,7 @@
        throws SQLException;
 
     /**
-     * Sets the designated parameter to a <code>Reader</code> object.
+     * Sets the designated parameter to a {@code Reader} object.
      * This method differs from the <code>setCharacterStream (int, Reader)</code> method
      * because it informs the driver that the parameter value should be sent to
      * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
@@ -2105,7 +2111,8 @@
        throws SQLException;
 
     /**
-     * Sets the designated parameter to a <code>Reader</code> object.  The reader must contain  the number
+     * Sets the designated parameter to a {@code Reader} object.
+     * The {@code Reader} must contain  the number
      * of characters specified by length otherwise a <code>SQLException</code> will be
      * generated when the <code>PreparedStatement</code> is executed.
      * This method differs from the <code>setCharacterStream (int, Reader, int)</code> method
@@ -2142,7 +2149,7 @@
      void setNClob(int parameterIndex, NClob value) throws SQLException;
 
     /**
-     * Sets the designated parameter to a <code>Reader</code> object.
+     * Sets the designated parameter to a {@code Reader} object.
      * This method differs from the <code>setCharacterStream (int, Reader)</code> method
      * because it informs the driver that the parameter value should be sent to
      * the server as a <code>NCLOB</code>.  When the <code>setCharacterStream</code> method is used, the
--- a/test/ProblemList.txt	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/ProblemList.txt	Thu Aug 28 14:54:07 2014 -0700
@@ -217,6 +217,9 @@
 java/security/KeyPairGenerator/SolarisShortDSA.java             solaris-all
 sun/security/tools/keytool/standard.sh                          solaris-all
 
+# 8049312
+com/sun/crypto/provider/Cipher/AES/CICO.java			generic-all
+
 ############################################################################
 
 # jdk_sound
@@ -257,7 +260,7 @@
 # 8031555
 com/sun/jdi/JdbMethodExitTest.sh                                generic-all
 
-# 8041934
+# 8043571
 com/sun/jdi/RepStep.java                                        generic-all
 
 # 8044419
@@ -284,13 +287,15 @@
 # 8033104
 sun/jvmstat/monitor/MonitoredVm/CR6672135.java			generic-all
 
-# 8041989
-sun/tools/jstatd/TestJstatdDefaults.java                        generic-all
-
-# 8037285
-sun/tools/jstatd/TestJstatdServer.java                          generic-all
+# 8027668
+sun/tools/jstatd/TestJstatdDefaults.java                generic-all
+sun/tools/jstatd/TestJstatdServer.java                  generic-all
+sun/tools/jstatd/TestJstatdPort.java                    generic-all
 
 # 8046355
 sun/tools/jstatd/TestJstatdExternalRegistry.java                generic-all
 
+# 6456333
+sun/tools/jps/TestJpsJarRelative.java				generic-all
+
 ############################################################################
--- a/test/TEST.ROOT	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/TEST.ROOT	Thu Aug 28 14:54:07 2014 -0700
@@ -8,7 +8,7 @@
 othervm.dirs=java/awt java/beans javax/accessibility javax/imageio javax/sound javax/print javax/management com/sun/awt sun/awt sun/java2d sun/pisces
 
 # Tests that cannot run concurrently
-exclusiveAccess.dirs=java/rmi/Naming java/util/Currency java/util/prefs sun/management/jmxremote sun/tools/jstatd sun/security/mscapi
+exclusiveAccess.dirs=java/rmi/Naming java/util/prefs sun/management/jmxremote sun/tools/jstatd sun/security/mscapi
 
 # Group definitions
 groups=TEST.groups [closed/TEST.groups]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/crypto/provider/Cipher/AES/CICO.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,186 @@
+/*
+ * 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.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.spec.AlgorithmParameterSpec;
+import java.util.Random;
+import javax.crypto.Cipher;
+import javax.crypto.CipherInputStream;
+import javax.crypto.CipherOutputStream;
+import javax.crypto.KeyGenerator;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.IvParameterSpec;
+
+/**
+ * @test
+ * @bug 8043836
+ * @summary Test AES ciphers with different modes and padding schemes (ECB mode
+ *          doesn't use IV). The test tries 3 different read methods of
+ *          CipherInputStream.
+ */
+public class CICO {
+    private static final String ALGORITHM = "aEs";
+    private static final String[] MODES = { "PCBC", "ECb", "cbC", "cFB",
+        "cFB24", "cFB32", "Cfb40", "CFB72", "OfB", "OfB20", "OfB48",
+        "OfB56", "OFB64", "OFB112", "CFB112", "pCbC" };
+    private static final String[] PADDING = { "noPadding", "pkcs5padding" };
+    private static final String PROVIDER = "SunJCE";
+    private static final int NREADS = 3;
+    private static final int KEY_LENGTH = 128;
+
+    private final byte[] plainText = new byte[1600000];
+
+
+    public static void main(String argv[]) throws Exception {
+        CICO test = new CICO();
+        for (String mode : MODES) {
+            for (String pad : PADDING) {
+                for (int m = 0; m < NREADS; m++) {
+                    test.runTest(ALGORITHM, mode, pad, m);
+                }
+            }
+        }
+    }
+
+    public void runTest(String algo, String mo, String pad, int whichRead) throws Exception {
+        Cipher ci1 = null;
+        Cipher ci2 = null;
+        byte[] iv = null;
+        AlgorithmParameterSpec aps = null;
+        SecretKey key = null;
+
+        try {
+            // Do initialization
+            Random rdm = new Random();
+            rdm.nextBytes(plainText);
+            KeyGenerator kg = KeyGenerator.getInstance(algo, PROVIDER);
+            if (!kg.getAlgorithm().equals(algo)) {
+                throw new RuntimeException("Unexpected algorithm <"
+                        + kg.getAlgorithm() + ">, expected value is <" + algo
+                        + ">");
+            }
+
+            kg.init(KEY_LENGTH);
+            key = kg.generateKey();
+
+            ci1 = Cipher.getInstance(algo + "/" + mo + "/" + pad, PROVIDER);
+
+            if (mo.equalsIgnoreCase("ECB")) {
+                ci1.init(Cipher.ENCRYPT_MODE, key);
+            } else {
+                ci1.init(Cipher.ENCRYPT_MODE, key, aps);
+            }
+
+            if (!mo.equalsIgnoreCase("ECB")) {
+                iv = ci1.getIV();
+                aps = new IvParameterSpec(iv);
+            } else {
+                aps = null;
+            }
+
+            ci2 = Cipher.getInstance(algo + "/" + mo + "/" + pad, PROVIDER);
+            if (mo.equalsIgnoreCase("ECB")) {
+                ci2.init(Cipher.DECRYPT_MODE, key);
+            } else {
+                ci2.init(Cipher.DECRYPT_MODE, key, aps);
+            }
+
+            ByteArrayInputStream baInput = new ByteArrayInputStream(plainText);
+            ByteArrayOutputStream baOutput = new ByteArrayOutputStream();
+            try (CipherInputStream ciInput = new CipherInputStream(baInput, ci1);
+                    CipherOutputStream ciOutput = new CipherOutputStream(
+                            baOutput, ci2)) {
+                // According to specification, CipherInputStream does not support the
+                // mark and reset methods
+                if (ciInput.markSupported()) {
+                    throw new RuntimeException(
+                            "CipherInputStream unexpectedly supports the mark and reset methods");
+                }
+
+                // Read from the input and write to the output using 2 types
+                // of buffering : byte[] and int
+                switch (whichRead) {
+                case 0:
+                    int buffer0 = ciInput.read();
+                    while (buffer0 != -1) {
+                        ciOutput.write(buffer0);
+                        buffer0 = ciInput.read();
+                    }
+                    break;
+                case 1:
+                    byte[] buffer1 = new byte[20];
+                    int len1 = ciInput.read(buffer1);
+                    while (len1 != -1) {
+                        ciOutput.write(buffer1, 0, len1);
+                        len1 = ciInput.read(buffer1);
+                    }
+                    break;
+                case NREADS - 1:
+                    byte[] buffer2 = new byte[ci1
+                                              .getOutputSize(plainText.length)];
+                    int offset2 = 0;
+                    int len2 = 0;
+                    while (len2 != -1) {
+                        len2 = ciInput.read(buffer2, offset2, buffer2.length
+                                - offset2);
+                        offset2 += len2;
+                    }
+                    ciOutput.write(buffer2, 0, buffer2.length);
+                    break;
+                }
+            }
+
+            // Get the output
+            byte[] recoveredText = new byte[baOutput.size()];
+            recoveredText = baOutput.toByteArray();
+            if (!java.util.Arrays.equals(plainText, recoveredText)) {
+                throw new RuntimeException(
+                        "Original text is not equal with recovered text, with "
+                                + algo + "/" + mo + "/" + pad + "/" + whichRead);
+            }
+
+            // Compare input and output
+
+        } catch (NoSuchAlgorithmException e) {
+            //OFB20 is for negative testing
+            if (!mo.equalsIgnoreCase("OFB20")) {
+                System.out.println("Unexpected NoSuchAlgorithmException with "
+                        + algo + "/" + mo + "/" + pad + "/" + whichRead);
+                throw new RuntimeException("Test failed!");
+            }
+        } catch (IOException | NoSuchProviderException | NoSuchPaddingException
+                | InvalidKeyException | InvalidAlgorithmParameterException e) {
+            System.out.println("Unexpected Exception with "
+                    + algo + "/" + mo + "/" + pad + "/" + whichRead);
+            System.out.println("Test failed!");
+            throw e;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/crypto/provider/Cipher/AES/CTR.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,145 @@
+/*
+ * 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.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.spec.AlgorithmParameterSpec;
+import java.util.Arrays;
+import java.util.Random;
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.KeyGenerator;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+import javax.crypto.ShortBufferException;
+import javax.crypto.spec.IvParameterSpec;
+
+
+/**
+ * @test
+ * @bug 8043836
+ * @summary Test AES ciphers with 4 different modes with NoPadding. Check if
+ *          data before encryption and after decryption is the same.
+ */
+
+public class CTR {
+
+    private static final String ALGORITHM = "AES";
+
+    private static final String PROVIDER = "SunJCE";
+
+    private static final String[] MODES = {"CTR","CFB24","OFB32","GCM"};
+
+    private static final String PADDING = "NoPadding";
+
+
+    private static final int KEY_LENGTH = 128;
+
+    public static void main(String argv[]) throws Exception {
+        CTR test = new CTR();
+        for (String mode : MODES) {
+            test.runTest(ALGORITHM, mode, PADDING);
+        }
+    }
+
+
+    public void runTest(String algo, String mo, String pad) throws Exception {
+        Cipher ci = null;
+        byte[] iv = null;
+        AlgorithmParameterSpec aps = null;
+        SecretKey key = null;
+
+        try {
+            Random rdm = new Random();
+            byte[] plainText;
+
+            ci = Cipher.getInstance(algo + "/" + mo + "/" + pad, PROVIDER);
+            KeyGenerator kg = KeyGenerator.getInstance(algo, PROVIDER);
+            kg.init(KEY_LENGTH);
+            key = kg.generateKey();
+
+            for (int i = 0; i < 15; i++) {
+                plainText = new byte[1600 + i + 1];
+                rdm.nextBytes(plainText);
+
+                if (!mo.equalsIgnoreCase("GCM")) {
+                    ci.init(Cipher.ENCRYPT_MODE, key, aps);
+                } else {
+                    ci.init(Cipher.ENCRYPT_MODE, key);
+                }
+
+                byte[] cipherText = new byte[ci.getOutputSize(plainText.length)];
+                int offset = ci.update(plainText, 0, plainText.length,
+                        cipherText, 0);
+
+                ci.doFinal(cipherText, offset);
+
+                if (!mo.equalsIgnoreCase("ECB")) {
+                    iv = ci.getIV();
+                    aps = new IvParameterSpec(iv);
+                } else {
+                    aps = null;
+                }
+
+                if (!mo.equalsIgnoreCase("GCM")) {
+                    ci.init(Cipher.DECRYPT_MODE, key, aps);
+                } else {
+                    ci.init(Cipher.DECRYPT_MODE, key, ci.getParameters());
+                }
+
+                byte[] recoveredText = new byte[ci.getOutputSize(cipherText.length)];
+                int len = ci.doFinal(cipherText, 0, cipherText.length,
+                        recoveredText);
+                byte[] tmp = new byte[len];
+
+                for (int j = 0; j < len; j++) {
+                    tmp[j] = recoveredText[j];
+                }
+                Arrays.toString(plainText);
+                if (!java.util.Arrays.equals(plainText, tmp)) {
+                    System.out.println("Original: ");
+                    dumpBytes(plainText);
+                    System.out.println("Recovered: ");
+                    dumpBytes(tmp);
+                    throw new RuntimeException("Original text is not equal with recovered text, with mode:" + mo);
+                }
+            }
+        } catch (NoSuchAlgorithmException | NoSuchProviderException | NoSuchPaddingException
+                | InvalidKeyException | InvalidAlgorithmParameterException
+                | ShortBufferException | IllegalBlockSizeException
+                | BadPaddingException e) {
+            System.out.println("Test failed!");
+            throw e;
+        }
+    }
+
+    private void dumpBytes(byte[] bytes){
+        for (byte b : bytes){
+            System.out.print(Integer.toHexString(b));
+        }
+        System.out.println();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/crypto/provider/Cipher/AES/Padding.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,151 @@
+/*
+ * 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.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.spec.AlgorithmParameterSpec;
+import java.util.Random;
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.KeyGenerator;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+import javax.crypto.ShortBufferException;
+import javax.crypto.spec.IvParameterSpec;
+
+/**
+ * @test
+ * @bug 8043836
+ * @summary Test AES ciphers with different modes and padding schemes (ECB mode
+ *          doesn't use IV). The test tries 3 different read methods of
+ *          CipherInputStream.
+ */
+public class Padding {
+
+    private static final String ALGORITHM = "AES";
+    private static final String PROVIDER = "SunJCE";
+    private static final String[] MODES = { "ECb", "CbC", "PCBC", "OFB",
+        "OFB150", "cFB", "CFB7", "cFB8", "cFB16", "cFB24", "cFB32",
+        "Cfb40", "cfB48", "cfB56", "cfB64", "cfB72", "cfB80", "cfB88",
+        "cfB96", "cfb104", "cfB112", "cfB120", "OFB8", "OFB16", "OFB24",
+        "OFB32", "OFB40", "OFB48", "OFB56", "OFB64", "OFB72", "OFB80",
+        "OFB88", "OFB96", "OFB104", "OFB112", "OFB120", "GCM" };
+    private static final String PADDING = "PKCS5Padding";
+    private static final int KEY_LENGTH = 128;
+
+    public static void main(String argv[]) throws Exception {
+        Padding test = new Padding();
+        for (String mode : MODES) {
+            test.runTest(ALGORITHM, mode, PADDING);
+        }
+    }
+
+    public void runTest(String algo, String mo, String pad) throws Exception {
+        Cipher ci = null;
+        byte[] iv = null;
+        AlgorithmParameterSpec aps = null;
+        SecretKey key = null;
+        try {
+            Random rdm = new Random();
+            byte[] plainText;
+
+            ci = Cipher.getInstance(algo + "/" + mo + "/" + pad, PROVIDER);
+            KeyGenerator kg = KeyGenerator.getInstance(algo, PROVIDER);
+            kg.init(KEY_LENGTH);
+            key = kg.generateKey();
+
+            for (int i = 0; i < 15; i++) {
+                plainText = new byte[1600 + i + 1];
+                rdm.nextBytes(plainText);
+
+                if (!mo.equalsIgnoreCase("GCM")) {
+                    ci.init(Cipher.ENCRYPT_MODE, key, aps);
+                } else {
+                    ci.init(Cipher.ENCRYPT_MODE, key);
+                }
+
+                byte[] cipherText = new byte[ci.getOutputSize(plainText.length)];
+                int offset = ci.update(plainText, 0, plainText.length,
+                        cipherText, 0);
+                ci.doFinal(cipherText, offset);
+
+                if (!mo.equalsIgnoreCase("ECB")) {
+                    iv = ci.getIV();
+                    aps = new IvParameterSpec(iv);
+                } else {
+                    aps = null;
+                }
+
+                if (!mo.equalsIgnoreCase("GCM")) {
+                    ci.init(Cipher.DECRYPT_MODE, key, aps);
+                } else {
+                    ci.init(Cipher.DECRYPT_MODE, key, ci.getParameters());
+                }
+
+                byte[] recoveredText = new byte[ci.getOutputSize(cipherText.length)];
+                int len = ci.doFinal(cipherText, 0, cipherText.length,
+                        recoveredText);
+                byte[] tmp = new byte[len];
+
+                for (int j = 0; j < len; j++) {
+                    tmp[j] = recoveredText[j];
+                }
+
+                if (!java.util.Arrays.equals(plainText, tmp)) {
+                    System.out.println("Original: ");
+                    dumpBytes(plainText);
+                    System.out.println("Recovered: ");
+                    dumpBytes(tmp);
+                    throw new RuntimeException(
+                            "Original text is not equal with recovered text, with mode:"
+                                    + mo);
+                }
+            }
+        } catch (NoSuchAlgorithmException e) {
+            //CFB7 and OFB150 are for negative testing
+            if (!mo.equalsIgnoreCase("CFB7") && !mo.equalsIgnoreCase("OFB150")) {
+                System.out
+                .println("Unexpected NoSuchAlgorithmException with mode: "
+                        + mo);
+                throw new RuntimeException("Test failed!");
+            }
+        } catch ( NoSuchProviderException | NoSuchPaddingException
+                | InvalidKeyException | InvalidAlgorithmParameterException
+                | ShortBufferException | IllegalBlockSizeException
+                | BadPaddingException e) {
+            System.out.println("Test failed!");
+            throw e;
+        }
+    }
+
+    private void dumpBytes(byte[] bytes) {
+        for (byte b : bytes) {
+            System.out.print(Integer.toHexString(b));
+        }
+
+        System.out.println();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/crypto/provider/Cipher/AES/TestAESCipher.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,156 @@
+/*
+ * 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.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.spec.AlgorithmParameterSpec;
+import java.util.Random;
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.KeyGenerator;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+import javax.crypto.ShortBufferException;
+import javax.crypto.spec.IvParameterSpec;
+
+/**
+ * @test
+ * @bug 8043836
+ * @summary Test AES ciphers with different modes and padding schemes (ECB mode
+ *          doesn't use IV).
+ * @author Liwen Wang
+ * @author Parag Salvi
+ */
+public class TestAESCipher {
+
+    private static final String ALGORITHM = "AES";
+    private static final String PROVIDER = "SunJCE";
+    private static final String[] MODES = { "ECb", "CbC", "CTR", "PCBC", "OFB",
+        "OFB150", "cFB", "CFB7", "cFB8", "cFB16", "cFB24", "cFB32",
+        "Cfb40", "cfB48", "cfB56", "cfB64", "cfB72", "cfB80", "cfB88",
+        "cfB96", "cfb104", "cfB112", "cfB120", "OFB8", "OFB16", "OFB24",
+        "OFB32", "OFB40", "OFB48", "OFB56", "OFB64", "OFB72", "OFB80",
+        "OFB88", "OFB96", "OFB104", "OFB112", "OFB120", "GCM" };
+    private static final String[] PADDING = { "NoPadding", "PKCS5Padding" };
+    private static final int KEY_LENGTH = 128;
+
+    public static void main(String argv[]) throws Exception {
+        TestAESCipher test = new TestAESCipher();
+        for (String mode : MODES) {
+            int padKinds = 1;
+            if (mode.equalsIgnoreCase("ECB") || mode.equalsIgnoreCase("PCBC")
+                    || mode.equalsIgnoreCase("CBC")) {
+                padKinds = PADDING.length;
+            }
+
+            for (int k = 0; k < padKinds; k++) {
+                test.runTest(ALGORITHM, mode, PADDING[k]);
+            }
+        }
+    }
+
+    public void runTest(String algo, String mo, String pad) throws Exception {
+        Cipher ci = null;
+        byte[] iv = null;
+        AlgorithmParameterSpec aps = null;
+        SecretKey key = null;
+        try {
+            // Initialization
+            Random rdm = new Random();
+            byte[] plainText = new byte[128];
+            rdm.nextBytes(plainText);
+
+            ci = Cipher.getInstance(algo + "/" + mo + "/" + pad, PROVIDER);
+            KeyGenerator kg = KeyGenerator.getInstance(algo, PROVIDER);
+            kg.init(KEY_LENGTH);
+            key = kg.generateKey();
+
+            // encrypt
+            if (!mo.equalsIgnoreCase("GCM")) {
+                ci.init(Cipher.ENCRYPT_MODE, key, aps);
+            } else {
+                ci.init(Cipher.ENCRYPT_MODE, key);
+            }
+
+            byte[] cipherText = new byte[ci.getOutputSize(plainText.length)];
+            int offset = ci.update(plainText, 0, plainText.length, cipherText,
+                    0);
+            ci.doFinal(cipherText, offset);
+
+            if (!mo.equalsIgnoreCase("ECB")) {
+                iv = ci.getIV();
+                aps = new IvParameterSpec(iv);
+            } else {
+                aps = null;
+            }
+
+            if (!mo.equalsIgnoreCase("GCM")) {
+                ci.init(Cipher.DECRYPT_MODE, key, aps);
+            } else {
+                ci.init(Cipher.DECRYPT_MODE, key, ci.getParameters());
+            }
+
+            byte[] recoveredText = new byte[ci.getOutputSize(cipherText.length)];
+            int len = ci.doFinal(cipherText, 0, cipherText.length,
+                    recoveredText);
+            byte[] tmp = new byte[len];
+            System.arraycopy(recoveredText, 0, tmp, 0, len);
+
+            // Comparison
+            if (!java.util.Arrays.equals(plainText, tmp)) {
+                System.out.println("Original: ");
+                dumpBytes(plainText);
+                System.out.println("Recovered: ");
+                dumpBytes(tmp);
+                throw new RuntimeException(
+                        "Original text is not equal with recovered text, with mode:"
+                                + mo);
+            }
+
+        } catch (NoSuchAlgorithmException e) {
+            //CFB7 and OFB150 are for negative testing
+            if (!mo.equalsIgnoreCase("CFB7") && !mo.equalsIgnoreCase("OFB150")) {
+                System.out.println("Unexpected NoSuchAlgorithmException with mode: "
+                        + mo);
+                throw new RuntimeException("Test failed!");
+            }
+        }  catch ( NoSuchProviderException | NoSuchPaddingException
+                | InvalidKeyException | InvalidAlgorithmParameterException
+                | ShortBufferException | IllegalBlockSizeException
+                | BadPaddingException e) {
+            System.out.println("Test failed!");
+            throw e;
+        }
+    }
+
+    private void dumpBytes(byte[] bytes) {
+        for (byte b : bytes) {
+            System.out.print(Integer.toHexString(b));
+        }
+
+        System.out.println();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/crypto/provider/Cipher/AES/TestNonexpanding.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,115 @@
+/*
+ * 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.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.spec.InvalidParameterSpecException;
+import java.util.Random;
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.KeyGenerator;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+import javax.crypto.ShortBufferException;
+import javax.crypto.spec.GCMParameterSpec;
+
+/**
+ * @test
+ * @bug 8043836
+ * @summary Test AES encryption with no padding. Expect the original data length
+ *          is the same as the encrypted data.
+ */
+public class TestNonexpanding {
+
+    private static final String ALGORITHM = "AES";
+    private static final String PROVIDER = "SunJCE";
+    private static final String[] MODES = { "ECb", "CbC", "OFB", "OFB150",
+        "cFB", "CFB7", "cFB8", "cFB16", "cFB24", "cFB32", "Cfb40", "cfB48",
+        "cfB56", "cfB64", "cfB72", "cfB80", "cfB88", "cfB96", "cfb104",
+        "cfB112", "cfB120", "GCM" };
+    private static final String PADDING = "NoPadding";
+    private static final int KEY_LENGTH = 128;
+
+    public static void main(String argv[]) throws Exception {
+        TestNonexpanding test = new TestNonexpanding();
+        for (String mode : MODES) {
+            test.runTest(ALGORITHM, mode, PADDING);
+        }
+    }
+
+    public void runTest(String algo, String mo, String pad) throws Exception {
+        Cipher ci = null;
+        SecretKey key = null;
+        try {
+            // Initialization
+            Random rdm = new Random();
+            byte[] plainText = new byte[128];
+            rdm.nextBytes(plainText);
+
+            ci = Cipher.getInstance(algo + "/" + mo + "/" + pad, PROVIDER);
+
+            KeyGenerator kg = KeyGenerator.getInstance(algo, PROVIDER);
+            kg.init(KEY_LENGTH);
+            key = kg.generateKey();
+
+            // encrypt
+            ci.init(Cipher.ENCRYPT_MODE, key);
+            byte[] cipherText = new byte[ci.getOutputSize(plainText.length)];
+            int offset = ci.update(plainText, 0, plainText.length, cipherText,
+                    0);
+            ci.doFinal(cipherText, offset);
+
+            // Comparison
+            if (!(plainText.length == cipherText.length)) {
+                // The result of encryption in GCM is a combination of an
+                // authentication tag and cipher text.
+                if (mo.equalsIgnoreCase("GCM")) {
+                    GCMParameterSpec spec = ci.getParameters().getParameterSpec(GCMParameterSpec.class);
+                    int cipherTextLength = cipherText.length - spec.getTLen()
+                            / 8;
+                    if (plainText.length == cipherTextLength) {
+                        return;
+                    }
+                }
+                System.out.println("Original length: " + plainText.length);
+                System.out.println("Cipher text length: " + cipherText.length);
+                throw new RuntimeException("Test failed!");
+            }
+        } catch (NoSuchAlgorithmException e) {
+            //CFB7 and OFB150 are for negative testing
+            if (!mo.equalsIgnoreCase("CFB7") && !mo.equalsIgnoreCase("OFB150")) {
+                System.out.println("Unexpected NoSuchAlgorithmException with mode: "
+                        + mo);
+                throw new RuntimeException("Test failed!");
+            }
+        } catch ( NoSuchProviderException | NoSuchPaddingException
+                | InvalidKeyException | InvalidParameterSpecException
+                | ShortBufferException | IllegalBlockSizeException
+                | BadPaddingException e) {
+            System.out.println("Test failed!");
+            throw e;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/crypto/provider/Cipher/AES/TestSameBuffer.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,138 @@
+/*
+ * 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.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.spec.AlgorithmParameterSpec;
+import java.util.Random;
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.KeyGenerator;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+import javax.crypto.ShortBufferException;
+import javax.crypto.spec.IvParameterSpec;
+
+/**
+ * @test
+ * @bug 8043836
+ * @summary Test AES ciphers with different modes and padding schemes (ECB mode
+ *          doesn't use IV). The test tries 3 different read methods of
+ *          CipherInputStream.
+ */
+public class TestSameBuffer {
+
+    private static final String ALGORITHM = "Rijndael";
+    private static final String PROVIDER = "SunJCE";
+    private static final String[] MODES = { "ECb", "CbC", "OFB", "CFB150",
+        "cFB", "CFB7", " cFB8", "cFB16", "cFB24", "cFB32", "Cfb40",
+        "cfB48", " cfB56", "cfB64", "cfB72", "cfB80", "cfB88", "cfB96",
+        "cfb104", "cfB112", "cfB120" };
+    private static final String PADDING = "NoPadding";
+    private static final int KEY_LENGTH = 128;
+
+    public static void main(String argv[]) throws Exception {
+        TestSameBuffer test = new TestSameBuffer();
+        for (String mode : MODES) {
+            test.runTest(ALGORITHM, mode, PADDING);
+        }
+    }
+
+    public void runTest(String algo, String mo, String pad) throws Exception {
+        Cipher ci = null;
+        byte[] iv = null;
+        AlgorithmParameterSpec aps = null;
+        SecretKey key = null;
+        try {
+            // Initialization
+            Random rdm = new Random();
+            byte[] plainText = new byte[128];
+            rdm.nextBytes(plainText);
+
+            // keep the plain text
+            byte[] tmpText = new byte[plainText.length];
+            for (int i = 0; i < plainText.length; i++) {
+                tmpText[i] = plainText[i];
+            }
+
+            ci = Cipher.getInstance(algo + "/" + mo + "/" + pad, PROVIDER);
+
+            KeyGenerator kg = KeyGenerator.getInstance(algo, PROVIDER);
+            kg.init(KEY_LENGTH);
+            key = kg.generateKey();
+
+            // encrypt
+            ci.init(Cipher.ENCRYPT_MODE, key);
+            int offset = ci
+                    .update(plainText, 0, plainText.length, plainText, 0);
+            ci.doFinal(plainText, offset);
+
+            if (!mo.equalsIgnoreCase("ECB")) {
+                iv = ci.getIV();
+                aps = new IvParameterSpec(iv);
+            } else {
+                aps = null;
+            }
+
+            ci.init(Cipher.DECRYPT_MODE, key, aps);
+            byte[] recoveredText = new byte[ci.getOutputSize(plainText.length)];
+            ci.doFinal(plainText, 0, plainText.length, recoveredText);
+
+            // Comparison
+            if (!java.util.Arrays.equals(tmpText, recoveredText)) {
+                System.out.println("Original: ");
+                dumpBytes(plainText);
+                System.out.println("Recovered: ");
+                dumpBytes(recoveredText);
+                throw new RuntimeException(
+                        "Original text is not equal with recovered text, with mode:"
+                                + mo);
+            }
+
+        } catch (NoSuchAlgorithmException e) {
+            //CFB7 and CFB150 are for negative testing
+            if (!mo.equalsIgnoreCase("CFB7") && !mo.equalsIgnoreCase("CFB150")) {
+                System.out.println("Unexpected NoSuchAlgorithmException with mode: "
+                        + mo);
+                throw new RuntimeException("Test failed!");
+            }
+        }  catch (NoSuchProviderException | NoSuchPaddingException
+                | InvalidKeyException | InvalidAlgorithmParameterException
+                | ShortBufferException | IllegalBlockSizeException
+                | BadPaddingException e) {
+            System.out.println("Test failed!");
+            throw e;
+        }
+    }
+
+    private void dumpBytes(byte[] bytes) {
+        for (byte b : bytes) {
+            System.out.print(Integer.toHexString(b));
+        }
+
+        System.out.println();
+    }
+}
--- a/test/com/sun/jdi/ShellScaffold.sh	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/com/sun/jdi/ShellScaffold.sh	Thu Aug 28 14:54:07 2014 -0700
@@ -882,7 +882,7 @@
 
 startDebuggee()
 {
-    args=$TESTVMOPTS $TESTJAVAOPTS
+    args="$TESTVMOPTS $TESTJAVAOPTS"
 
     if [ ! -z "$args" ] ; then
        echo "--Starting debuggee with args from TESTVMOPTS and/or TESTJAVAOPTS: $args"
--- a/test/com/sun/tools/attach/StartManagementAgent.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/com/sun/tools/attach/StartManagementAgent.java	Thu Aug 28 14:54:07 2014 -0700
@@ -40,7 +40,7 @@
  * @test
  * @summary Test for VirtualMachine.startManagementAgent and VirtualMachine.startLocalManagementAgent
  * @library /lib/testlibrary
- * @run build Application jdk.testlibrary.*
+ * @run build Application SimpleProvider jdk.testlibrary.*
  * @run main StartManagementAgent
  */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Focus/8044614/TestApplet.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,34 @@
+/*
+ * 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.applet.Applet;
+import java.awt.TextField;
+
+public class TestApplet extends Applet {
+    TextField textField = null;
+
+    public void init() {
+        textField = new TextField(25);
+        add(textField);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Focus/8044614/applet1.html	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,37 @@
+<!--
+ 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.
+-->
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=utf-8">
+  <title>First Applet</title>
+</head>
+  <body>
+    <applet 
+      code="TestApplet.class"
+      width="400" 
+      height="200"/>
+    </applet>
+  </body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Focus/8044614/applet2.html	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,37 @@
+<!--
+ 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.
+-->
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=utf-8">
+  <title>Second Applet</title>
+</head>
+  <body>
+    <applet 
+      code="TestApplet.class"
+      width="400" 
+      height="200"/>
+    </applet>
+  </body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Focus/8044614/bug8044614.html	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,36 @@
+<!--
+ 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.
+-->
+
+<html>
+<head>
+<title>bug8044614</title>
+</head>
+<body>
+
+<h1>bug8044614</h1>
+
+<p> See the dialog box (usually in upper left corner) for instructions</p>
+
+<APPLET CODE="bug8044614.class" WIDTH=200 HEIGHT=200></APPLET>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Focus/8044614/bug8044614.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8044614
+ * @summary Tests focus transfer between applets in different browser windows
+ * @author Dmitry Markov
+ * @library ../../regtesthelpers
+ * @build Sysout
+ * @run applet/manual=yesno bug8044614.html
+ */
+
+import javax.swing.JApplet;
+
+import test.java.awt.regtesthelpers.Sysout;
+
+public class bug8044614 extends JApplet {
+    public void init() {
+        String[] instructions = {
+            "(1) Go to the test directory test/java/awt/Focus/8044614",
+            "(2) Compile source file: javac TestApplet.java",
+            "(3) Open the \"main.html\" file in the browser",
+            "(4) Click the \"Start First Applet\" link to open the first applet window",
+            "(5) Wait for the applet to start (press \"Run\" to any security alerts that appears)",
+            "(6) Enter \"Hello\" to the text field",
+            "(7) Click the \"Start Second Applet)\" link to open the second applet window",
+            "(8) Wait for the applet to start (press \"Run\" to any security alerts that appears)",
+            "(9) Enter \"World\" to the text field",
+            "(10) Go back to the first applet and make sure you can enter some text to the text field"
+        };
+
+        Sysout.createDialogWithInstructions(instructions);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Focus/8044614/main.html	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,46 @@
+<!--
+ 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.
+-->
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=utf-8">
+  <title>Applet Focus Bug main window</title>
+  <script language="JavaScript">
+    function openWindow(strURL, strWindowName, strWindowFeatures) {
+      var win = window.open(strURL, strWindowName, strWindowFeatures);
+    }
+  </script>
+
+</head>
+  <body>
+    <table>
+      <tr>
+        <td><a href="javascript:openWindow('applet1.html', '', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=400, top=0, left=0, hide=no')">Start First Applet</a></td>
+      </tr>
+      <tr>
+        <td><a href="javascript:openWindow('applet2.html', '', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=400, top=0, left=350, hide=no')">Start Second Applet</a></td>
+      </tr>
+    </table>
+  </body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Focus/WindowIsFocusableAccessByThreadsTest/WindowIsFocusableAccessByThreadsTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,113 @@
+/*
+ * 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.
+ */
+
+/*
+  @test
+  @bug      8047288
+  @summary  Tests method isFocusable of Window component. It should be accessed only from EDT
+  @author   artem.malinko@oracle.com
+  @library  ../../regtesthelpers
+  @build    Util
+  @run      main WindowIsFocusableAccessByThreadsTest
+*/
+
+import test.java.awt.regtesthelpers.Util;
+
+import javax.swing.*;
+import java.awt.*;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+public class WindowIsFocusableAccessByThreadsTest {
+    private static AtomicBoolean testPassed = new AtomicBoolean(true);
+    private static volatile TestFrame frame;
+    private static volatile TestWindow window;
+    private static volatile Button openWindowBtn;
+
+    public static void main(String[] args) {
+        frame = new TestFrame("Test EDT access to Window components");
+        window = new TestWindow(frame);
+
+        SwingUtilities.invokeLater(WindowIsFocusableAccessByThreadsTest::init);
+
+        Util.waitTillShown(frame);
+        Robot robot = Util.createRobot();
+        Util.clickOnComp(frame, robot, 100);
+        Util.clickOnComp(openWindowBtn, robot, 100);
+
+        Util.waitTillShown(window);
+
+        if (!testPassed.get()) {
+            throw new RuntimeException("Window component methods has been accessed not " +
+                    "from Event Dispatching Thread");
+        }
+    }
+
+    private static void init() {
+        frame.setSize(400, 400);
+        frame.setLayout(new FlowLayout());
+        openWindowBtn = new Button("open window");
+        openWindowBtn.addActionListener(e -> {
+            window.setSize(100, 100);
+            window.setLocation(400, 100);
+            window.setVisible(true);
+        });
+        frame.add(openWindowBtn);
+        frame.setVisible(true);
+    }
+
+    private static void testThread() {
+        if (!SwingUtilities.isEventDispatchThread()) {
+            testPassed.set(false);
+        }
+    }
+
+    private static class TestWindow extends Window {
+        public TestWindow(Frame owner) {
+            super(owner);
+        }
+
+        // isFocusable method is final and we can't add this test to it.
+        // But it invokes getFocusableWindowState and here we can check
+        // if thread is EDT.
+        @Override
+        public boolean getFocusableWindowState() {
+            testThread();
+            return super.getFocusableWindowState();
+        }
+    }
+
+    private static class TestFrame extends Frame {
+        private TestFrame(String title) throws HeadlessException {
+            super(title);
+        }
+
+        // isFocusable method is final and we can't add this test to it.
+        // But it invokes getFocusableWindowState and here we can check
+        // if thread is EDT.
+        @Override
+        public boolean getFocusableWindowState() {
+            testThread();
+            return super.getFocusableWindowState();
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopAppModal1Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether an application modal Dialog created with null Frame
+ *          constructor stays on top of the windows it blocks.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopAppModal1Test
+ */
+
+public class OnTopAppModal1Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            Dialog.ModalityType.APPLICATION_MODAL,
+            OnTopFDFTest.DialogOwner.NULL_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopAppModal2Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether an application modal Dialog created with null Dialog
+ *          constructor stays on top of the windows it blocks.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopAppModal2Test
+ */
+
+public class OnTopAppModal2Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            Dialog.ModalityType.APPLICATION_MODAL,
+            OnTopFDFTest.DialogOwner.NULL_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopAppModal3Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether an application modal Dialog created with hidden Frame
+ *          constructor stays on top of the windows it blocks.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopAppModal3Test
+ */
+
+public class OnTopAppModal3Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            Dialog.ModalityType.APPLICATION_MODAL,
+            OnTopFDFTest.DialogOwner.HIDDEN_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopAppModal4Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether an application modal Dialog created with hidden Dialog
+ *          constructor stays on top of the windows it blocks.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopAppModal4Test
+ */
+
+public class OnTopAppModal4Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            Dialog.ModalityType.APPLICATION_MODAL,
+            OnTopFDFTest.DialogOwner.HIDDEN_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopAppModal5Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether an application modal Dialog created with visible Frame
+ *          constructor stays on top of the windows it blocks.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopAppModal5Test
+ */
+
+public class OnTopAppModal5Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            Dialog.ModalityType.APPLICATION_MODAL,
+            OnTopFDFTest.DialogOwner.FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopAppModal6Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether an application modal Dialog created with visible
+ *          Dialog constructor stays on top of the windows it blocks.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopAppModal6Test
+ */
+
+public class OnTopAppModal6Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopDDFTest(
+            Dialog.ModalityType.APPLICATION_MODAL)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopDDFTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,169 @@
+/*
+ * Copyright (c) 2007, 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.awt.*;
+import static jdk.testlibrary.Asserts.*;
+
+// DDF: Dialog - Dialog - Frame
+
+public class OnTopDDFTest {
+
+    private volatile TestDialog dialog, leftDialog;
+    private volatile TestFrame rightFrame;
+    private volatile Frame hiddenFrame;
+
+    private static final int delay = 500;
+    private final ExtendedRobot robot;
+
+    boolean setModal;
+
+    Dialog.ModalityType modalityType;
+
+    private OnTopDDFTest(Dialog.ModalityType modType,
+                         boolean             modal) throws Exception {
+        modalityType = modType;
+        setModal = modal;
+
+        robot = new ExtendedRobot();
+        EventQueue.invokeLater(this::createGUI);
+    }
+
+    public OnTopDDFTest(Dialog.ModalityType modalityType) throws Exception {
+        this(modalityType, false);
+    }
+
+    public OnTopDDFTest() throws Exception {
+        this(null, true);
+    }
+
+    private void createGUI() {
+
+        hiddenFrame = new Frame();
+        leftDialog = new TestDialog(hiddenFrame);
+        leftDialog.setSize(200, 100);
+        leftDialog.setLocation(50, 50);
+        leftDialog.setVisible(true);
+
+        dialog = new CustomDialog(leftDialog);
+        if (setModal) {
+            dialog.setModal(true);
+            modalityType = dialog.getModalityType();
+        } else if (modalityType != null) {
+            dialog.setModalityType(modalityType);
+        }
+
+        dialog.setSize(200, 100);
+        dialog.setLocation(200, 50);
+
+        rightFrame = new TestFrame();
+        rightFrame.setSize(200, 100);
+        rightFrame.setLocation(350, 50);
+
+        dialog.setVisible(true);
+    }
+
+    public void doTest() throws Exception {
+
+        try {
+
+            robot.waitForIdle(delay);
+
+            dialog.activated.waitForFlagTriggered();
+            assertTrue(dialog.activated.flag(), "Dialog still not visible.");
+
+            dialog.clickOpenButton(robot);
+            robot.waitForIdle(delay);
+
+            if ((modalityType == Dialog.ModalityType.MODELESS) ||
+                (modalityType == Dialog.ModalityType.DOCUMENT_MODAL)) {
+
+                rightFrame.clickCloseButton(robot);
+                robot.waitForIdle(delay);
+
+                rightFrame.closeClicked.reset();
+                dialog.transferFocusToDialog(robot, "A Frame partially hides the " +
+                    modalityType + " Dialog.", dialog.openButton);
+                robot.waitForIdle(delay);
+
+                dialog.checkUnblockedDialog(robot,
+                    "This is " + modalityType + " dialog and no other Dialogs blocks it.");
+                robot.waitForIdle(delay);
+
+                rightFrame.closeClicked.waitForFlagTriggered(5);
+                assertFalse(rightFrame.closeClicked.flag(), "Clicking on " + modalityType +
+                    "dialog did not bring it to the top. A frame on top of Dialog.");
+                robot.waitForIdle(delay);
+
+                dialog.closeClicked.reset();
+                if (modalityType == Dialog.ModalityType.MODELESS) {
+                    leftDialog.transferFocusToDialog(robot, "This dialog is not " +
+                        "blocked by any other dialogs.", leftDialog.closeButton);
+                } else {
+                    leftDialog.transferFocusToBlockedDialog(robot, "This dialog is not " +
+                        "blocked by any other dialogs.", leftDialog.closeButton);
+                }
+            } else {
+                dialog.checkUnblockedDialog(robot, "Checking if modal dialog " +
+                    "appears on top of blocked Frame.");
+                robot.waitForIdle(delay);
+
+                rightFrame.closeClicked.waitForFlagTriggered(5);
+                assertFalse(rightFrame.closeClicked.flag(),
+                    "Frame on top of an application modal Dialog.");
+                robot.waitForIdle(delay);
+
+                leftDialog.transferFocusToBlockedDialog(robot,
+                    "An application modal dialog blocks the Dialog.", leftDialog.closeButton);
+            }
+
+            robot.waitForIdle(delay);
+
+            dialog.clickCloseButton(robot);
+            robot.waitForIdle(delay);
+
+        } finally {
+            EventQueue.invokeAndWait(this::closeAll);
+        }
+    }
+
+    private void closeAll() {
+        if (dialog != null) { dialog.dispose(); }
+        if (leftDialog != null) { leftDialog.dispose(); }
+        if (rightFrame != null) { rightFrame.dispose(); }
+        if (hiddenFrame != null) { hiddenFrame.dispose(); }
+    }
+
+
+    class CustomDialog extends TestDialog {
+
+        public CustomDialog(Dialog d) { super(d); }
+
+        @Override
+        public void doOpenAction() {
+            if (rightFrame != null) {
+                rightFrame.setVisible(true);
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopDocModal1Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a document modal Dialog created with null Frame
+ *          constructor follows normal Z order.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopDocModal1Test
+ */
+
+public class OnTopDocModal1Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            Dialog.ModalityType.DOCUMENT_MODAL,
+            OnTopFDFTest.DialogOwner.NULL_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopDocModal2Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a document modal Dialog created with null Dialog
+ *          constructor follows normal Z order.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopDocModal2Test
+ */
+
+public class OnTopDocModal2Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            Dialog.ModalityType.DOCUMENT_MODAL,
+            OnTopFDFTest.DialogOwner.NULL_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopDocModal3Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a document modal Dialog created with hidden Frame
+ *          constructor follows normal Z order.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopDocModal3Test
+ */
+
+public class OnTopDocModal3Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            Dialog.ModalityType.DOCUMENT_MODAL,
+            OnTopFDFTest.DialogOwner.HIDDEN_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopDocModal4Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a document modal Dialog created with hidden Dialog
+ *          constructor follows normal Z order.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopDocModal4Test
+ */
+
+public class OnTopDocModal4Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            Dialog.ModalityType.DOCUMENT_MODAL,
+            OnTopFDFTest.DialogOwner.HIDDEN_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopDocModal5Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a document modal Dialog created with visible Frame
+ *          constructor stays on top of the windows it blocks.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopDocModal5Test
+ */
+
+public class OnTopDocModal5Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            Dialog.ModalityType.DOCUMENT_MODAL,
+            OnTopFDFTest.DialogOwner.FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopDocModal6Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a document modal Dialog created with visible
+ *          Dialog constructor stays on top of the windows it blocks.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopDocModal6Test
+ */
+
+public class OnTopDocModal6Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopDDFTest(Dialog.ModalityType.DOCUMENT_MODAL)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopFDFTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,230 @@
+/*
+ * Copyright (c) 2007, 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.awt.*;
+import static jdk.testlibrary.Asserts.*;
+
+// FDF: Frame - Dialog - Frame
+
+public class OnTopFDFTest {
+
+    private volatile CustomDialog dialog;
+    private volatile TestFrame leftFrame, rightFrame;
+    private volatile Dialog hiddenDialog;
+    private volatile Frame  hiddenFrame;
+
+    private static final int delay = 500;
+    private final ExtendedRobot robot;
+
+    public enum DialogOwner {HIDDEN_DIALOG, NULL_DIALOG, HIDDEN_FRAME, NULL_FRAME, FRAME};
+
+    private DialogOwner owner;
+    boolean setModal;
+
+    Dialog.ModalityType modalityType;
+
+    private OnTopFDFTest(Dialog.ModalityType modType,
+                         boolean             modal,
+                         DialogOwner         o) throws Exception {
+
+        modalityType = modType;
+        setModal = modal;
+        owner = o;
+        robot = new ExtendedRobot();
+        EventQueue.invokeLater(this::createGUI);
+    }
+
+    public OnTopFDFTest(Dialog.ModalityType modalityType,
+                        DialogOwner         o) throws Exception {
+        this(modalityType, false, o);
+    }
+
+    public OnTopFDFTest(DialogOwner o) throws Exception {
+        this(null, true, o);
+    }
+
+    private void createGUI() {
+
+        leftFrame = new TestFrame();
+        leftFrame.setSize(200, 100);
+        leftFrame.setLocation(50, 50);
+        leftFrame.setVisible(true);
+
+        switch (owner) {
+            case HIDDEN_DIALOG:
+                hiddenDialog = new Dialog((Frame) null);
+                dialog = new CustomDialog(hiddenDialog);
+                break;
+            case NULL_DIALOG:
+                dialog = new CustomDialog((Dialog) null);
+                break;
+            case HIDDEN_FRAME:
+                hiddenFrame = new Frame();
+                dialog = new CustomDialog(hiddenFrame);
+                break;
+            case NULL_FRAME:
+                dialog = new CustomDialog((Frame) null);
+                break;
+            case FRAME:
+                dialog = new CustomDialog(leftFrame);
+                break;
+        }
+
+        if (setModal) {
+            dialog.setModal(true);
+            modalityType = dialog.getModalityType();
+        } else if (modalityType != null) {
+            dialog.setModalityType(modalityType);
+        }
+
+        dialog.setSize(200, 100);
+        dialog.setLocation(200, 50);
+
+        rightFrame = new TestFrame();
+        rightFrame.setSize(200, 100);
+        rightFrame.setLocation(350, 50);
+
+        dialog.setVisible(true);
+    }
+
+    private void BlockingTest() throws Exception {
+
+        dialog.checkUnblockedDialog(robot, "Checking if " + modalityType +
+            " dialog appears on top of blocked Frame.");
+        robot.waitForIdle(delay);
+
+        rightFrame.closeClicked.waitForFlagTriggered(5);
+        assertFalse(rightFrame.closeClicked.flag(),
+            "Frame is on top of " + modalityType + " Dialog.");
+        robot.waitForIdle(delay);
+
+        leftFrame.transferFocusToBlockedFrame(robot,
+            modalityType + " dialog blocks the Frame.", leftFrame.closeButton);
+        robot.waitForIdle(delay);
+
+        dialog.clickCloseButton(robot);
+        robot.waitForIdle(delay);
+    }
+
+    private void Test() throws Exception {
+
+        rightFrame.clickCloseButton(robot);
+        robot.waitForIdle(delay);
+
+        rightFrame.closeClicked.reset();
+        dialog.transferFocusToDialog(
+            robot, "Frame partially hides the dialog.", dialog.openButton);
+        robot.waitForIdle(delay);
+
+        dialog.checkUnblockedDialog(
+            robot, "This is " + modalityType + " dialog.");
+        robot.waitForIdle(delay);
+
+        rightFrame.closeClicked.waitForFlagTriggered(5);
+        assertFalse(rightFrame.closeClicked.flag(), "Clicking on a " +
+            modalityType + " dialog did not bring it to the top. " +
+            "A frame is on top of the dialog.");
+        robot.waitForIdle(delay);
+
+        dialog.closeClicked.reset();
+
+        if (owner == DialogOwner.FRAME) {
+
+            if (modalityType == Dialog.ModalityType.MODELESS) {
+                leftFrame.transferFocusToFrame(robot, "modeless dialog " +
+                    "partially hides the Frame.", leftFrame.closeButton);
+            } else {
+                leftFrame.transferFocusToBlockedFrame(robot, "a document modal " +
+                    "dialog partially hides the Frame.", leftFrame.closeButton);
+            }
+
+        } else {
+
+            leftFrame.transferFocusToFrame(robot,
+                "A dialog partially hides the Frame.", leftFrame.closeButton);
+            robot.waitForIdle(delay);
+
+            leftFrame.checkUnblockedFrame(robot,
+                modalityType + " dialog present should not block this Frame.");
+            robot.waitForIdle(delay);
+
+            dialog.closeClicked.waitForFlagTriggered(5);
+            assertFalse(dialog.closeClicked.flag(), "Clicking on a frame did not " +
+                "bring it to the top. The document modal dialog is staying on top.");
+        }
+
+        robot.waitForIdle(delay);
+    }
+
+
+    public void doTest() throws Exception {
+
+        try {
+
+            robot.waitForIdle(delay);
+
+            dialog.activated.waitForFlagTriggered();
+            assertTrue(dialog.activated.flag(), "Dialog still not visible.");
+
+            dialog.clickOpenButton(robot);
+            robot.waitForIdle(delay);
+
+            switch (modalityType) {
+                case DOCUMENT_MODAL:
+                case MODELESS:
+                    Test();
+                    break;
+                case APPLICATION_MODAL:
+                case TOOLKIT_MODAL:
+                    BlockingTest();
+                    break;
+            }
+
+        } finally {
+            EventQueue.invokeAndWait(this::closeAll);
+        }
+    }
+
+    private void closeAll() {
+        if (dialog != null) { dialog.dispose(); }
+        if (leftFrame  != null) {  leftFrame.dispose(); }
+        if (rightFrame != null) { rightFrame.dispose(); }
+        if (hiddenDialog != null) { hiddenDialog.dispose(); }
+        if (hiddenFrame  != null) {  hiddenFrame.dispose(); }
+    }
+
+
+    class CustomDialog extends TestDialog {
+
+        public CustomDialog(Dialog d) { super(d); }
+        public CustomDialog(Frame  f) { super(f); }
+
+        @Override
+        public void doOpenAction() {
+            if (rightFrame != null) {
+                rightFrame.setVisible(true);
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopModal1Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a modal Dialog created with null Frame
+ *          constructor stays on top of the windows it blocks.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopModal1Test
+ */
+
+public class OnTopModal1Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            OnTopFDFTest.DialogOwner.NULL_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopModal2Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a modal Dialog created with null Dialog
+ *          constructor stays on top of the windows it blocks.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopModal2Test
+ */
+
+public class OnTopModal2Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            OnTopFDFTest.DialogOwner.NULL_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopModal3Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a modal Dialog created with hidden Frame
+ *          constructor stays on top of the windows it blocks.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopModal3Test
+ */
+
+public class OnTopModal3Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            OnTopFDFTest.DialogOwner.HIDDEN_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopModal4Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a modal Dialog created with hidden Dialog
+ *          constructor stays on top of the windows it blocks.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopModal4Test
+ */
+
+public class OnTopModal4Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            OnTopFDFTest.DialogOwner.HIDDEN_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopModal5Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a modal Dialog created with visible Frame
+ *          constructor stays on top of the windows it blocks.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopModal5Test
+ */
+
+public class OnTopModal5Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            OnTopFDFTest.DialogOwner.FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopModal6Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a modal Dialog created with visible Dialog
+ *          constructor stays on top of the windows it blocks.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopModal6Test
+ */
+
+public class OnTopModal6Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopDDFTest()).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopModeless1Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a modeless Dialog created with a
+ *          null Frame constructor follows normal Z Order.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopModeless1Test
+ */
+
+public class OnTopModeless1Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            Dialog.ModalityType.MODELESS,
+            OnTopFDFTest.DialogOwner.NULL_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopModeless2Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a modeless Dialog created with a
+ *          null Dialog constructor follows normal Z Order.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopModeless2Test
+ */
+
+public class OnTopModeless2Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            Dialog.ModalityType.MODELESS,
+            OnTopFDFTest.DialogOwner.NULL_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopModeless3Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a modeless Dialog created with a
+ *          hidden Frame constructor follows normal Z Order.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopModeless3Test
+ */
+
+public class OnTopModeless3Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            Dialog.ModalityType.MODELESS,
+            OnTopFDFTest.DialogOwner.HIDDEN_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopModeless4Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a modeless Dialog created with a
+ *          hidden Dialog constructor follows normal Z Order.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopModeless4Test
+ */
+
+public class OnTopModeless4Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            Dialog.ModalityType.MODELESS,
+            OnTopFDFTest.DialogOwner.HIDDEN_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopModeless5Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a modeless Dialog created with a
+ *          visible Frame constructor follows normal Z Order.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopModeless5Test
+ */
+
+public class OnTopModeless5Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            Dialog.ModalityType.MODELESS,
+            OnTopFDFTest.DialogOwner.FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopModeless6Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a modeless Dialog created with a visible Dialog
+ *          constructor follows a normal Z order.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopModeless6Test
+ */
+
+public class OnTopModeless6Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopDDFTest(Dialog.ModalityType.MODELESS)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopTKModal1Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a toolkit modal Dialog created with null Frame
+ *          constructor stays on top of the windows it blocks.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopTKModal1Test
+ */
+
+public class OnTopTKModal1Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            Dialog.ModalityType.TOOLKIT_MODAL,
+            OnTopFDFTest.DialogOwner.NULL_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopTKModal2Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a toolkit modal Dialog created with null Dialog
+ *          constructor stays on top of the windows it blocks.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopTKModal2Test
+ */
+
+public class OnTopTKModal2Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            Dialog.ModalityType.TOOLKIT_MODAL,
+            OnTopFDFTest.DialogOwner.NULL_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopTKModal3Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a toolkit modal Dialog created with hidden Frame
+ *          constructor stays on top of the windows it blocks.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopTKModal3Test
+ */
+
+public class OnTopTKModal3Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            Dialog.ModalityType.TOOLKIT_MODAL,
+            OnTopFDFTest.DialogOwner.HIDDEN_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopTKModal4Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a toolkit modal Dialog created with hidden Dialog
+ *          constructor stays on top of the windows it blocks.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopTKModal4Test
+ */
+
+public class OnTopTKModal4Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            Dialog.ModalityType.TOOLKIT_MODAL,
+            OnTopFDFTest.DialogOwner.HIDDEN_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopTKModal5Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a toolkit modal Dialog created with visible Frame
+ *          constructor stays on top of the windows it blocks.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopTKModal5Test
+ */
+
+public class OnTopTKModal5Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopFDFTest(
+            Dialog.ModalityType.TOOLKIT_MODAL,
+            OnTopFDFTest.DialogOwner.FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/OnTop/OnTopTKModal6Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8052012
+ * @summary Check whether a toolkit modal Dialog created with visible
+ *          Dialog constructor stays on top of the windows it blocks.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main OnTopTKModal6Test
+ */
+
+public class OnTopTKModal6Test {
+
+    public static void main(String[] args) throws Exception {
+        (new OnTopDDFTest(Dialog.ModalityType.TOOLKIT_MODAL)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/DialogToFrontAppModalTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method for a dialog in presence of
+ *          blocking application modal dialog does not bring it to the top
+ *          of the modal dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main DialogToFrontAppModalTest
+ */
+
+public class DialogToFrontAppModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new DialogToFrontModalBlockedTest(
+             Dialog.ModalityType.APPLICATION_MODAL)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/DialogToFrontDocModalTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method for a dialog in presence of
+ *          blocking document modal dialog does not bring it to the top
+ *          of the modal dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main DialogToFrontDocModalTest
+ */
+
+public class DialogToFrontDocModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new DialogToFrontModalBlockedTest(
+             Dialog.ModalityType.DOCUMENT_MODAL)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/DialogToFrontModalBlockedTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2007, 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.awt.*;
+
+public class DialogToFrontModalBlockedTest {
+
+    private volatile CustomDialog dialog;
+    private volatile TestDialog leftDialog;
+    private volatile TestFrame  rightFrame;
+    private volatile Frame parent;
+
+    private static final int delay = 500;
+    private final ExtendedRobot robot;
+
+    private DialogToFrontModalBlockedTest(Dialog.ModalityType modalityType,
+                                          boolean             setModal) throws Exception {
+
+        robot = new ExtendedRobot();
+        EventQueue.invokeLater(() -> {
+            createGUI(modalityType, setModal);
+        });
+    }
+
+    public DialogToFrontModalBlockedTest(Dialog.ModalityType modalityType) throws Exception {
+        this(modalityType, false);
+    }
+
+    public DialogToFrontModalBlockedTest() throws Exception {
+        this(null, true);
+    }
+
+    private void createGUI(Dialog.ModalityType modalityType,
+                           boolean             setModal) {
+
+        parent = new Frame();
+        leftDialog = new TestDialog(parent);
+        leftDialog.setSize(200, 100);
+        leftDialog.setLocation(50, 50);
+        leftDialog.setVisible(true);
+
+        dialog = new CustomDialog(leftDialog);
+
+        if (setModal) { dialog.setModal(true); }
+        else if (modalityType != null) {
+            dialog.setModalityType(modalityType);
+        }
+
+        dialog.setSize(200, 100);
+        dialog.setLocation(150, 50);
+
+        rightFrame = new TestFrame();
+        rightFrame.setSize(200, 100);
+        rightFrame.setLocation(250, 50);
+
+        if (setModal || modalityType == Dialog.ModalityType.APPLICATION_MODAL) {
+            rightFrame.setModalExclusionType(
+                Dialog.ModalExclusionType.APPLICATION_EXCLUDE);
+        } else if (modalityType == Dialog.ModalityType.TOOLKIT_MODAL) {
+            rightFrame.setModalExclusionType(
+                Dialog.ModalExclusionType.TOOLKIT_EXCLUDE);
+        }
+
+        dialog.setVisible(true);
+    }
+
+    public void doTest() throws Exception {
+
+        try {
+            robot.waitForIdle(delay);
+
+            dialog.clickOpenButton(robot);
+            robot.waitForIdle(delay);
+
+            rightFrame.clickCloseButton(robot);
+            robot.waitForIdle(delay);
+
+            EventQueue.invokeAndWait(() -> { leftDialog.toFront(); });
+            robot.waitForIdle(delay);
+
+            rightFrame.clickDummyButton(robot);
+
+            EventQueue.invokeAndWait(() -> { leftDialog.toFront(); });
+            robot.waitForIdle(delay);
+
+            leftDialog.clickDummyButton(robot, 7, false, "Calling toFront " +
+                    "for Dialog blocked by " + dialog.getModalityType() +
+                    "dialog brought it to the top of the modal dialog");
+
+            robot.waitForIdle(delay);
+        } finally {
+            EventQueue.invokeAndWait(this::closeAll);
+        }
+    }
+
+    private void closeAll() {
+        if (dialog != null) { dialog.dispose(); }
+        if (parent != null) { parent.dispose(); }
+        if (leftDialog != null) { leftDialog.dispose(); }
+        if (rightFrame != null) { rightFrame.dispose(); }
+    }
+
+    class CustomDialog extends TestDialog {
+
+        public CustomDialog(Dialog d) { super(d); }
+        public CustomDialog(Frame  f) { super(f); }
+
+        @Override
+        public void doOpenAction() {
+            if (rightFrame != null) {
+                rightFrame.setVisible(true);
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/DialogToFrontModalTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2007, 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.
+ */
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method for a dialog in presence of
+ *          blocking modal dialog does not bring it to the top
+ *          of the modal dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main DialogToFrontModalTest
+ */
+
+public class DialogToFrontModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new DialogToFrontModalBlockedTest()).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/DialogToFrontModeless1Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2007, 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.
+ */
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method does not bring a dialog to the top
+ *          of a child modeless dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main DialogToFrontModeless1Test
+ */
+
+public class DialogToFrontModeless1Test {
+
+    public static void main(String[] args) throws Exception {
+        (new DialogToFrontModelessTest()).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/DialogToFrontModelessTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2007, 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.awt.*;
+
+public class DialogToFrontModelessTest {
+
+    private volatile TestDialog dialog, leftDialog;
+    private volatile TestFrame  rightFrame;
+    private volatile Frame parent;
+
+    private static final int delay = 500;
+    private final ExtendedRobot robot;
+
+    private boolean isModeless;
+
+    public DialogToFrontModelessTest(boolean modeless) throws Exception {
+        isModeless = modeless;
+        robot = new ExtendedRobot();
+        EventQueue.invokeLater(this::createGUI);
+    }
+
+    public DialogToFrontModelessTest() throws Exception { this(true); }
+
+    private void createGUI() {
+
+        parent = new Frame();
+
+        leftDialog = new TestDialog(parent);
+        leftDialog.setSize(200, 100);
+        leftDialog.setLocation(50, 50);
+        leftDialog.setVisible(true);
+
+        dialog = new TestDialog(leftDialog);
+
+        if (isModeless) { dialog.setModalityType(Dialog.ModalityType.MODELESS); }
+
+        dialog.setSize(200, 100);
+        dialog.setLocation(150, 50);
+
+        rightFrame = new TestFrame();
+        rightFrame.setSize(200, 100);
+        rightFrame.setLocation(250, 50);
+
+        dialog.setVisible(true);
+        rightFrame.setVisible(true);
+    }
+
+    public void doTest() throws Exception {
+
+        try {
+            robot.waitForIdle(delay);
+
+            rightFrame.clickCloseButton(robot);
+            robot.waitForIdle(delay);
+
+            EventQueue.invokeAndWait(() -> { leftDialog.toFront(); });
+            robot.waitForIdle(delay);
+
+            leftDialog.clickDummyButton(robot, 7, false,
+                "Calling toFront method for the parent left dialog " +
+                "brought it to the top of the child dialog.");
+            robot.waitForIdle(delay);
+
+            rightFrame.clickDummyButton(robot);
+            robot.waitForIdle(delay);
+
+            String msg = "The " + (isModeless ? "modeless" : "non-modal") +
+            " dialog still on top of the right frame" +
+            " even after a button on the frame is clicked.";
+            dialog.clickDummyButton(robot, 7, false, msg);
+            robot.waitForIdle(delay);
+
+        } finally {
+            EventQueue.invokeAndWait(this::closeAll);
+        }
+    }
+
+    private void closeAll() {
+        if (dialog != null) { dialog.dispose(); }
+        if (parent != null) { parent.dispose(); }
+        if (leftDialog != null) { leftDialog.dispose(); }
+        if (rightFrame != null) { rightFrame.dispose(); }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/DialogToFrontNonModalTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2007, 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.
+ */
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method does not bring a dialog to the top
+ *          of a non-modal child dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main DialogToFrontNonModalTest
+ */
+
+public class DialogToFrontNonModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new DialogToFrontModelessTest(false)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/DialogToFrontTKModalTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method for a dialog in presence of
+ *          blocking toolkit modal dialog does not bring it to the top
+ *          of the modal dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main DialogToFrontTKModalTest
+ */
+
+public class DialogToFrontTKModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new DialogToFrontModalBlockedTest(
+             Dialog.ModalityType.TOOLKIT_MODAL)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/FrameToFrontAppModal1Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method for a frame in presence of
+ *          blocking application modal dialog having a null Frame parent
+ *          does not bring the frame to the top of the modal dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main FrameToFrontAppModal1Test
+ */
+
+public class FrameToFrontAppModal1Test {
+
+    public static void main(String[] args) throws Exception {
+        (new FrameToFrontModalBlockedTest(
+             Dialog.ModalityType.APPLICATION_MODAL,
+             FrameToFrontModalBlockedTest.DialogOwner.NULL_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/FrameToFrontAppModal2Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method for a frame in presence of
+ *          blocking application modal dialog having a null Dialog parent
+ *          does not bring the frame to the top of the modal dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main FrameToFrontAppModal2Test
+ */
+
+public class FrameToFrontAppModal2Test {
+
+    public static void main(String[] args) throws Exception {
+        (new FrameToFrontModalBlockedTest(
+             Dialog.ModalityType.APPLICATION_MODAL,
+             FrameToFrontModalBlockedTest.DialogOwner.NULL_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/FrameToFrontAppModal3Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method for a frame in presence of
+ *          blocking application modal dialog having a hidden Frame parent
+ *          does not bring the frame to the top of the modal dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main FrameToFrontAppModal3Test
+ */
+
+public class FrameToFrontAppModal3Test {
+
+    public static void main(String[] args) throws Exception {
+        (new FrameToFrontModalBlockedTest(
+             Dialog.ModalityType.APPLICATION_MODAL,
+             FrameToFrontModalBlockedTest.DialogOwner.HIDDEN_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/FrameToFrontAppModal4Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method for a frame in presence of
+ *          blocking application modal dialog having a hidden Dialog parent
+ *          does not bring the frame to the top of the modal dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main FrameToFrontAppModal4Test
+ */
+
+public class FrameToFrontAppModal4Test {
+
+    public static void main(String[] args) throws Exception {
+        (new FrameToFrontModalBlockedTest(
+             Dialog.ModalityType.APPLICATION_MODAL,
+             FrameToFrontModalBlockedTest.DialogOwner.HIDDEN_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/FrameToFrontAppModal5Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method for a frame in presence of
+ *          blocking application modal dialog having a visible Frame parent
+ *          does not bring the frame to the top of the modal dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main FrameToFrontAppModal5Test
+ */
+
+public class FrameToFrontAppModal5Test {
+
+    public static void main(String[] args) throws Exception {
+        (new FrameToFrontModalBlockedTest(
+             Dialog.ModalityType.APPLICATION_MODAL,
+             FrameToFrontModalBlockedTest.DialogOwner.FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/FrameToFrontDocModal1Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method for a frame in presence of
+ *          blocking document modal dialog having a visible Frame parent
+ *          does not bring the frame to the top of the modal dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main FrameToFrontDocModal1Test
+ */
+
+public class FrameToFrontDocModal1Test {
+
+    public static void main(String[] args) throws Exception {
+        (new FrameToFrontModalBlockedTest(
+             Dialog.ModalityType.DOCUMENT_MODAL,
+             FrameToFrontModalBlockedTest.DialogOwner.FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/FrameToFrontDocModal2Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check if toFront method works correctly for a document modal dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main FrameToFrontDocModal2Test
+ */
+
+public class FrameToFrontDocModal2Test {
+
+    public static void main(String[] args) throws Exception {
+
+        for (FrameToFrontModalBlockedTest.DialogOwner o:
+                FrameToFrontModalBlockedTest.DialogOwner.values()) {
+
+            if (o != FrameToFrontModalBlockedTest.DialogOwner.FRAME) {
+                (new FrameToFrontModalBlockedTest(
+                    Dialog.ModalityType.DOCUMENT_MODAL, o)).doTest();
+            }
+        }
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/FrameToFrontModal1Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007, 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.
+ */
+
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method for a frame in presence of
+ *          blocking modal dialog having a null Frame parent
+ *          does not bring the frame to the top of the modal dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main FrameToFrontModal1Test
+ */
+
+public class FrameToFrontModal1Test {
+
+    public static void main(String[] args) throws Exception {
+        (new FrameToFrontModalBlockedTest(
+             FrameToFrontModalBlockedTest.DialogOwner.NULL_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/FrameToFrontModal2Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007, 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.
+ */
+
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method for a frame in presence of
+ *          blocking modal dialog having a null Dialog parent
+ *          does not bring the frame to the top of the modal dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main FrameToFrontModal2Test
+ */
+
+public class FrameToFrontModal2Test {
+
+    public static void main(String[] args) throws Exception {
+        (new FrameToFrontModalBlockedTest(
+             FrameToFrontModalBlockedTest.DialogOwner.NULL_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/FrameToFrontModal3Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007, 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.
+ */
+
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method for a frame in presence of
+ *          blocking modal dialog having a hidden Frame parent
+ *          does not bring the frame to the top of the modal dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main FrameToFrontModal3Test
+ */
+
+public class FrameToFrontModal3Test {
+
+    public static void main(String[] args) throws Exception {
+        (new FrameToFrontModalBlockedTest(
+             FrameToFrontModalBlockedTest.DialogOwner.HIDDEN_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/FrameToFrontModal4Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007, 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.
+ */
+
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method for a frame in presence of
+ *          blocking modal dialog having a hidden Dialog parent
+ *          does not bring the frame to the top of the modal dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main FrameToFrontModal4Test
+ */
+
+public class FrameToFrontModal4Test {
+
+    public static void main(String[] args) throws Exception {
+        (new FrameToFrontModalBlockedTest(
+             FrameToFrontModalBlockedTest.DialogOwner.HIDDEN_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/FrameToFrontModal5Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2007, 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.
+ */
+
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method for a frame in presence of
+ *          blocking modal dialog having a visible Frame parent
+ *          does not bring the frame to the top of the modal dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main FrameToFrontModal5Test
+ */
+
+public class FrameToFrontModal5Test {
+
+    public static void main(String[] args) throws Exception {
+        (new FrameToFrontModalBlockedTest(
+             FrameToFrontModalBlockedTest.DialogOwner.FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/FrameToFrontModalBlockedTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,207 @@
+/*
+ * Copyright (c) 2007, 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.awt.*;
+
+
+public class FrameToFrontModalBlockedTest {
+
+    private volatile CustomDialog dialog;
+    private volatile TestFrame leftFrame, rightFrame;
+    private volatile Dialog hiddenDialog;
+    private volatile Frame  hiddenFrame;
+
+    private static final int delay = 500;
+    private final ExtendedRobot robot;
+
+    public enum DialogOwner {HIDDEN_DIALOG, NULL_DIALOG, HIDDEN_FRAME, NULL_FRAME, FRAME};
+
+    private DialogOwner owner;
+    boolean setModal;
+
+    Dialog.ModalityType modalityType;
+
+    private FrameToFrontModalBlockedTest(Dialog.ModalityType modType,
+                                         boolean             modal,
+                                         DialogOwner         o) throws Exception {
+        modalityType = modType;
+        setModal = modal;
+        owner = o;
+
+        robot = new ExtendedRobot();
+        EventQueue.invokeLater(this::createGUI);
+    }
+
+    public FrameToFrontModalBlockedTest(Dialog.ModalityType modalityType,
+                                        DialogOwner         o) throws Exception {
+        this(modalityType, false, o);
+    }
+
+    public FrameToFrontModalBlockedTest(DialogOwner o) throws Exception {
+        this(null, true, o);
+    }
+
+    private void createGUI() {
+
+        leftFrame = new TestFrame();
+        leftFrame.setSize(200, 100);
+        leftFrame.setLocation(50, 50);
+        leftFrame.setVisible(true);
+
+        switch (owner) {
+            case HIDDEN_DIALOG:
+                hiddenDialog = new Dialog((Frame) null);
+                dialog = new CustomDialog(hiddenDialog);
+                break;
+            case NULL_DIALOG:
+                dialog = new CustomDialog((Dialog) null);
+                break;
+            case HIDDEN_FRAME:
+                hiddenFrame = new Frame();
+                dialog = new CustomDialog(hiddenFrame);
+                break;
+            case NULL_FRAME:
+                dialog = new CustomDialog((Frame) null);
+                break;
+            case FRAME:
+                dialog = new CustomDialog(leftFrame);
+                break;
+        }
+
+        if (setModal) {
+            dialog.setModal(true);
+            modalityType = dialog.getModalityType();
+        } else if (modalityType != null) {
+            dialog.setModalityType(modalityType);
+        }
+
+        dialog.setSize(200, 100);
+        dialog.setLocation(230, 50);
+
+        rightFrame = new TestFrame();
+        rightFrame.setSize(200, 100);
+        rightFrame.setLocation(280, 50);
+
+        if  (setModal ||
+            (modalityType == Dialog.ModalityType.APPLICATION_MODAL)) {
+            rightFrame.setModalExclusionType(
+                    Dialog.ModalExclusionType.APPLICATION_EXCLUDE);
+        }
+
+        if (modalityType == Dialog.ModalityType.TOOLKIT_MODAL) {
+            rightFrame.setModalExclusionType(
+                    Dialog.ModalExclusionType.TOOLKIT_EXCLUDE);
+        }
+
+        dialog.setVisible(true);
+    }
+
+    private void blockingTest() throws Exception {
+
+        dialog.clickOpenButton(robot);
+        robot.waitForIdle(delay);
+
+        rightFrame.clickCloseButton(robot);
+        robot.waitForIdle(delay);
+
+        EventQueue.invokeAndWait(() -> { leftFrame.toFront(); });
+        robot.waitForIdle(delay);
+
+        rightFrame.clickDummyButton(robot);
+        robot.waitForIdle(delay);
+
+        EventQueue.invokeAndWait(() -> { leftFrame.toFront(); });
+        robot.waitForIdle(delay);
+
+        leftFrame.clickDummyButton(robot, 7, false,
+            "Calling toFront for Frame blocked by " + dialog.getModalityType() +
+            " dialog brought it to the top of the modal dialog.");
+        robot.waitForIdle(delay);
+    }
+
+    private void docModalTest() throws Exception {
+
+        if (owner == DialogOwner.FRAME) { blockingTest(); }
+        else {
+            EventQueue.invokeAndWait(() -> { leftFrame.toFront(); });
+            robot.waitForIdle(delay);
+
+            leftFrame.clickDummyButton(robot);
+            robot.waitForIdle(delay);
+
+            EventQueue.invokeAndWait(() -> { dialog.toFront(); });
+            robot.waitForIdle(delay);
+
+            dialog.clickDummyButton(robot);
+            robot.waitForIdle(delay);
+        }
+
+    }
+
+
+    public void doTest() throws Exception {
+
+        try {
+
+            robot.waitForIdle(delay);
+
+            switch (modalityType) {
+                case APPLICATION_MODAL:
+                case TOOLKIT_MODAL:
+                    blockingTest();
+                    break;
+                case DOCUMENT_MODAL:
+                    docModalTest();
+                    break;
+                default:
+                    throw new RuntimeException(
+                        "improper modality type, please do not use it for this test");
+            }
+
+        } finally {
+            EventQueue.invokeAndWait(this::closeAll);
+        }
+    }
+
+    private void closeAll() {
+        if (dialog != null) { dialog.dispose(); }
+        if (leftFrame  != null) {  leftFrame.dispose(); }
+        if (rightFrame != null) { rightFrame.dispose(); }
+        if (hiddenDialog != null) { hiddenDialog.dispose(); }
+        if (hiddenFrame  != null) {  hiddenFrame.dispose(); }
+    }
+
+
+    class CustomDialog extends TestDialog {
+
+        public CustomDialog(Dialog d) { super(d); }
+        public CustomDialog(Frame  f) { super(f); }
+
+        @Override
+        public void doOpenAction() {
+            if (rightFrame != null) {
+                rightFrame.setVisible(true);
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/FrameToFrontModeless1Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2007, 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.
+ */
+
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method does not bring a frame to the top of
+ *          a modeless child dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main FrameToFrontModeless1Test
+ */
+
+public class FrameToFrontModeless1Test {
+
+    public static void main(String[] args) throws Exception {
+        (new FrameToFrontModelessTest(true)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/FrameToFrontModelessTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2007, 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.awt.*;
+
+
+public class FrameToFrontModelessTest {
+
+    private volatile TestDialog dialog;
+    private volatile TestFrame  leftFrame, rightFrame;
+
+    private static final int delay = 500;
+    private final ExtendedRobot robot;
+
+    private boolean isModeless;
+
+    public FrameToFrontModelessTest(boolean modeless) throws Exception {
+        isModeless = modeless;
+        robot = new ExtendedRobot();
+        EventQueue.invokeLater(this::createGUI);
+    }
+
+    private void createGUI() {
+
+        leftFrame = new TestFrame();
+        leftFrame.setSize(200, 100);
+        leftFrame.setLocation(50, 50);
+        leftFrame.setVisible(true);
+
+        dialog = new TestDialog(leftFrame);
+        if (isModeless) { dialog.setModalityType(Dialog.ModalityType.MODELESS); }
+        dialog.setSize(200, 100);
+        dialog.setLocation(150, 50);
+        dialog.setVisible(true);
+
+        rightFrame = new TestFrame();
+        rightFrame.setSize(200, 100);
+        rightFrame.setLocation(250, 50);
+        rightFrame.setVisible(true);
+    }
+
+
+    public void doTest() throws Exception {
+
+        try {
+
+            robot.waitForIdle(delay);
+
+            EventQueue.invokeAndWait(() -> { leftFrame.toFront(); });
+            robot.waitForIdle(delay);
+
+            leftFrame.clickDummyButton(
+                robot, 7, false, "Calling toFront method on the parent " +
+                "left frame brought it to the top of the child dialog");
+            robot.waitForIdle(delay);
+
+            // show the right frame appear on top of the dialog
+            rightFrame.clickDummyButton(robot);
+            robot.waitForIdle(delay);
+
+            String msg = "The " + (isModeless ? "modeless" : "non-modal") +
+                " dialog still on top of the right frame" +
+                " even after a button on the frame is clicked";
+            dialog.clickDummyButton(robot, 7, false, msg);
+
+        } finally {
+            EventQueue.invokeAndWait(this::closeAll);
+        }
+    }
+
+    private void closeAll() {
+        if (dialog != null) { dialog.dispose(); }
+        if (leftFrame  != null) {  leftFrame.dispose(); }
+        if (rightFrame != null) { rightFrame.dispose(); }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/FrameToFrontNonModalTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2007, 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.
+ */
+
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method does not bring a frame to the top
+ *          of a non-modal child dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main FrameToFrontNonModalTest
+ */
+
+public class FrameToFrontNonModalTest {
+
+    public static void main(String[] args) throws Exception {
+        (new FrameToFrontModelessTest(false)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/FrameToFrontTKModal1Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method for a frame in presence of
+ *          blocking modal toolkit dialog having a null Frame parent
+ *          does not bring the frame to the top of the modal dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main FrameToFrontTKModal1Test
+ */
+
+public class FrameToFrontTKModal1Test {
+
+    public static void main(String[] args) throws Exception {
+        (new FrameToFrontModalBlockedTest(
+             Dialog.ModalityType.TOOLKIT_MODAL,
+             FrameToFrontModalBlockedTest.DialogOwner.NULL_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/FrameToFrontTKModal2Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method for a frame in presence of
+ *          blocking toolkit modal dialog having a null Dialog parent
+ *          does not bring the frame to the top of the modal dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main FrameToFrontTKModal2Test
+ */
+
+public class FrameToFrontTKModal2Test {
+
+    public static void main(String[] args) throws Exception {
+        (new FrameToFrontModalBlockedTest(
+             Dialog.ModalityType.TOOLKIT_MODAL,
+             FrameToFrontModalBlockedTest.DialogOwner.NULL_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/FrameToFrontTKModal3Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method for a frame in presence of
+ *          blocking toolkit modal dialog having a hidden Frame parent
+ *          does not bring the frame to the top of the modal dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main FrameToFrontTKModal3Test
+ */
+
+public class FrameToFrontTKModal3Test {
+
+    public static void main(String[] args) throws Exception {
+        (new FrameToFrontModalBlockedTest(
+             Dialog.ModalityType.TOOLKIT_MODAL,
+             FrameToFrontModalBlockedTest.DialogOwner.HIDDEN_FRAME)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/FrameToFrontTKModal4Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method for a frame in presence of
+ *          blocking toolkit modal dialog having a hidden Dialog parent
+ *          does not bring the frame to the top of the modal dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main FrameToFrontTKModal4Test
+ */
+
+public class FrameToFrontTKModal4Test {
+
+    public static void main(String[] args) throws Exception {
+        (new FrameToFrontModalBlockedTest(
+             Dialog.ModalityType.TOOLKIT_MODAL,
+             FrameToFrontModalBlockedTest.DialogOwner.HIDDEN_DIALOG)).doTest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/Modal/ToFront/FrameToFrontTKModal5Test.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2007, 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.awt.Dialog;
+
+/*
+ * @test
+ * @bug 8050885
+ * @summary Check that calling toFront method for a frame in presence of
+ *          blocking toolkit modal dialog having a visible Frame parent
+ *          does not bring the frame to the top of the modal dialog.
+ *
+ * @library ../helpers ../../../../lib/testlibrary/
+ * @build ExtendedRobot
+ * @build Flag
+ * @build TestDialog
+ * @build TestFrame
+ * @run main FrameToFrontTKModal5Test
+ */
+
+public class FrameToFrontTKModal5Test {
+
+    public static void main(String[] args) throws Exception {
+        (new FrameToFrontModalBlockedTest(
+             Dialog.ModalityType.TOOLKIT_MODAL,
+             FrameToFrontModalBlockedTest.DialogOwner.FRAME)).doTest();
+    }
+}
--- a/test/java/awt/Modal/helpers/TestDialog.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/java/awt/Modal/helpers/TestDialog.java	Thu Aug 28 14:54:07 2014 -0700
@@ -211,36 +211,63 @@
     }
 
     public void clickOpenButton(ExtendedRobot robot) throws Exception {
+        clickOpenButton(robot, true, "");
+    }
+
+    public void clickOpenButton(ExtendedRobot robot,
+                                boolean       refState,
+                                String        message) throws Exception {
         openClicked.reset();
         clickButton(openButton, robot);
+        openClicked.waitForFlagTriggered();
 
-        openClicked.waitForFlagTriggered();
-        assertTrue(openClicked.flag(),
-            "clicking the dialog Open button did not trigger an action");
+        String msg = "Clicking the dialog Open button " + (refState ?
+            "did not trigger an action." :
+            "triggered an action when it should not.");
+        assertEQ(openClicked.flag(), refState, msg + " " + message);
     }
 
     public void clickCloseButton(ExtendedRobot robot) throws Exception {
+        clickCloseButton(robot, true, "");
+    }
+
+    public void clickCloseButton(ExtendedRobot robot,
+                                 boolean       refState,
+                                 String        message) throws Exception {
         closeClicked.reset();
         clickButton(closeButton, robot);
+        closeClicked.waitForFlagTriggered();
 
-        closeClicked.waitForFlagTriggered();
-        assertTrue(closeClicked.flag(),
-            "clicking the dialog Close button did not trigger an action");
+        String msg = "Clicking the dialog Close button " + (refState ?
+            "did not trigger an action." :
+            "triggered an action when it should not.");
+        assertEQ(closeClicked.flag(), refState, msg + " " + message);
     }
 
     public void clickDummyButton(ExtendedRobot robot) throws Exception {
         clickDummyButton(robot, Flag.ATTEMPTS);
     }
 
-    public void clickDummyButton(ExtendedRobot robot, int attempts) throws Exception {
+    public void clickDummyButton(ExtendedRobot robot,
+                                 int           attempts) throws Exception {
+        clickDummyButton(robot, attempts, true, "");
+    }
+
+    public void clickDummyButton(ExtendedRobot robot,
+                                 int           attempts,
+                                 boolean       refState,
+                                 String        message) throws Exception {
         dummyClicked.reset();
         clickButton(dummyButton, robot);
+        dummyClicked.waitForFlagTriggered(attempts);
 
-        dummyClicked.waitForFlagTriggered(attempts);
-        assertTrue(dummyClicked.flag(),
-            "clicking the dialog Dummy button did not trigger an action");
+        String msg = "Clicking the dialog Dummy button " + (refState ?
+            "did not trigger an action." :
+            "triggered an action when it should not.");
+        assertEQ(dummyClicked.flag(), refState, msg + " " + message);
     }
 
+
     private void clickInside(ExtendedRobot robot) throws Exception {
 
         try {
--- a/test/java/awt/Modal/helpers/TestFrame.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/java/awt/Modal/helpers/TestFrame.java	Thu Aug 28 14:54:07 2014 -0700
@@ -203,19 +203,37 @@
     }
 
     public void clickOpenButton(ExtendedRobot robot) throws Exception {
+        clickOpenButton(robot, true, "");
+    }
+
+    public void clickOpenButton(ExtendedRobot robot,
+                                boolean       refState,
+                                String        message) throws Exception {
         openClicked.reset();
         clickButton(openButton, robot);
         openClicked.waitForFlagTriggered();
-        assertTrue(openClicked.flag(),
-            "clicking the frame Open button did not trigger an action");
+
+        String msg = "Clicking the frame Open button " + (refState ?
+            "did not trigger an action." :
+            "triggered an action when it should not.");
+        assertEQ(openClicked.flag(), refState, msg + " " + message);
     }
 
     public void clickCloseButton(ExtendedRobot robot) throws Exception {
+        clickCloseButton(robot, true, "");
+    }
+
+    public void clickCloseButton(ExtendedRobot robot,
+                                 boolean       refState,
+                                 String        message) throws Exception {
         closeClicked.reset();
         clickButton(closeButton, robot);
         closeClicked.waitForFlagTriggered();
-        assertTrue(closeClicked.flag(),
-            "clicking the frame Close button did not trigger an action");
+
+        String msg = "Clicking the frame Close button " + (refState ?
+            "did not trigger an action." :
+            "triggered an action when it should not.");
+        assertEQ(closeClicked.flag(), refState, msg + " " + message);
     }
 
     public void clickDummyButton(ExtendedRobot robot) throws Exception {
@@ -223,13 +241,22 @@
     }
 
     public void clickDummyButton(ExtendedRobot robot,
-                                 int amountOfAttempts) throws Exception {
+                                 int           attempts) throws Exception {
+        clickDummyButton(robot, attempts, true, "");
+    }
+
+    public void clickDummyButton(ExtendedRobot robot,
+                                 int           attempts,
+                                 boolean       refState,
+                                 String        message) throws Exception {
         dummyClicked.reset();
         clickButton(dummyButton, robot);
+        dummyClicked.waitForFlagTriggered();
 
-        dummyClicked.waitForFlagTriggered();
-        assertTrue(dummyClicked.flag(),
-            "clicking the frame Dummy button did not trigger an action");
+        String msg = "Clicking the frame Dummy button " + (refState ?
+            "did not trigger an action." :
+            "triggered an action when it should not.");
+        assertEQ(dummyClicked.flag(), refState, msg + " " + message);
     }
 
     public void clickInside(ExtendedRobot robot) throws Exception {
--- a/test/java/awt/Modal/helpers/TestWindow.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/java/awt/Modal/helpers/TestWindow.java	Thu Aug 28 14:54:07 2014 -0700
@@ -210,30 +210,54 @@
     }
 
     public void clickOpenButton(ExtendedRobot robot) throws Exception {
+        clickOpenButton(robot, true, "");
+    }
+
+    public void clickOpenButton(ExtendedRobot robot,
+                                boolean       refState,
+                                String        message) throws Exception {
         openClicked.reset();
         clickButton(openButton, robot);
+        openClicked.waitForFlagTriggered();
 
-        openClicked.waitForFlagTriggered();
-        assertTrue(openClicked.flag(),
-            "clicking the window Open button did not trigger an action");
+        String msg = "Clicking the window Open button " + (refState ?
+            "did not trigger an action." :
+            "triggered an action when it should not.");
+        assertEQ(openClicked.flag(), refState, msg + " " + message);
     }
 
     public void clickCloseButton(ExtendedRobot robot) throws Exception {
+        clickCloseButton(robot, true, "");
+    }
+
+    public void clickCloseButton(ExtendedRobot robot,
+                                 boolean       refState,
+                                 String        message) throws Exception {
         closeClicked.reset();
         clickButton(closeButton, robot);
+        closeClicked.waitForFlagTriggered();
 
-        closeClicked.waitForFlagTriggered();
-        assertTrue(closeClicked.flag(),
-            "clicking the window Close button did not trigger an action");
+        String msg = "Clicking the window Close button " + (refState ?
+            "did not trigger an action." :
+            "triggered an action when it should not.");
+        assertEQ(closeClicked.flag(), refState, msg + " " + message);
     }
 
     public void clickDummyButton(ExtendedRobot robot) throws Exception {
+        clickDummyButton(robot, true, "");
+    }
+
+    public void clickDummyButton(ExtendedRobot robot,
+                                 boolean       refState,
+                                 String        message) throws Exception {
         dummyClicked.reset();
         clickButton(dummyButton, robot);
+        dummyClicked.waitForFlagTriggered();
 
-        dummyClicked.waitForFlagTriggered();
-        assertTrue(dummyClicked.flag(),
-            "clicking the window Dummy button did not trigger an action");
+        String msg = "Clicking the window Dummy button " + (refState ?
+            "did not trigger an action." :
+            "triggered an action when it should not.");
+        assertEQ(dummyClicked.flag(), refState, msg + " " + message);
     }
 
     public void checkBlockedWindow(ExtendedRobot robot,
--- a/test/java/awt/datatransfer/SystemFlavorMap/AddFlavorTest.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/java/awt/datatransfer/SystemFlavorMap/AddFlavorTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -23,11 +23,10 @@
  * questions.
  */
 
-import sun.awt.datatransfer.DataTransferer;
-
 import java.awt.datatransfer.DataFlavor;
 import java.awt.datatransfer.SystemFlavorMap;
 import java.util.*;
+import java.nio.charset.Charset;
 
 /*
  * @test
@@ -70,17 +69,8 @@
             // construct a unique String native
             key = key.concat("TEST");
 
-            for (DataFlavor element : flavorsSet)
+            for (DataFlavor element : flavorsSet) {
                 flavorMap.addFlavorForUnencodedNative(key, element);
-
-            // This part is valid only for X-based graphical systems
-            if (!System.getProperty("os.name").startsWith("Win") && !System.getProperty("os.name").startsWith("Mac") ) {
-                if (key.contains("/")) {
-                    Set<DataFlavor> fls = DataTransferer.getInstance().getPlatformMappingsForNative(key);
-                    flavorsSet.addAll(fls);
-                    if (!fls.isEmpty() && key.startsWith("text/"))
-                        flavorsSet.addAll(convertMimeTypeToDataFlavors(key));
-                }
             }
             hashVerify.put(key, new Vector(flavorsSet));
         }
@@ -103,12 +93,10 @@
     }
 
     void compareFlavors(List<DataFlavor> flavors1, List<DataFlavor> flavors2, String key){
-        DataTransferer.DataFlavorComparator comparator = new DataTransferer.DataFlavorComparator();
         for (DataFlavor flavor1 : flavors1) {
             boolean result = false;
             for (DataFlavor flavor2 : flavors2) {
-                if (comparator.compare(flavor1, flavor2) == 0)
-                    result = true;
+                if (flavor1.equals(flavor2)) result = true;
             }
             if (!result)
                 throw new RuntimeException("\n*** Error in verifyNewMappings()" +
@@ -125,7 +113,7 @@
     Set<DataFlavor> convertMimeTypeToDataFlavors(String baseType) throws Exception {
         Set<DataFlavor> result = new LinkedHashSet<>();
 
-        for (String charset : DataTransferer.standardEncodings()) {
+        for (String charset : getStandardEncodings()) {
             for (String txtClass : new String[]{"java.io.InputStream", "java.nio.ByteBuffer", "\"[B\""}) {
                 String mimeType = baseType + ";charset=" + charset + ";class=" + txtClass;
 
@@ -142,5 +130,17 @@
         }
         return result;
     }
+
+    Set<String> getStandardEncodings() {
+        Set<String> tempSet = new HashSet<>();
+        tempSet.add("US-ASCII");
+        tempSet.add("ISO-8859-1");
+        tempSet.add("UTF-8");
+        tempSet.add("UTF-16BE");
+        tempSet.add("UTF-16LE");
+        tempSet.add("UTF-16");
+        tempSet.add(Charset.defaultCharset().name());
+        return tempSet;
+    }
 }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/datatransfer/UnicodeTransferTest/UnicodeTransferTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,169 @@
+/*
+ * 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.
+ */
+
+
+/*
+  @test
+  @bug 4718897
+  @summary tests that a Unicode string can be transferred between JVMs.
+  @author das@sparc.spb.su area=datatransfer
+  @library ../../regtesthelpers/process
+  @build ProcessResults ProcessCommunicator
+  @run main UnicodeTransferTest
+*/
+
+import java.awt.datatransfer.*;
+import java.awt.*;
+import java.text.Normalizer;
+
+import test.java.awt.regtesthelpers.process.ProcessResults;
+import test.java.awt.regtesthelpers.process.ProcessCommunicator;
+
+public class UnicodeTransferTest {
+    private static final Toolkit tk = Toolkit.getDefaultToolkit();
+    private static final Clipboard clipboard = tk.getSystemClipboard();
+    private static final Transferable t = new StringSelection(Util.getTestString());
+
+    public static void main(String[] args) throws Exception {
+        Util.setClipboardContents(clipboard, t, null);
+        ProcessResults result = ProcessCommunicator.executeChildProcess(
+                UnicodeTransferTestChild.class, new String[0]);
+        verifyTestResults(result);
+    }
+
+    private static void verifyTestResults(ProcessResults processResults) {
+        if (processResults.getExitValue() != 0) {
+            processResults.printProcessErrorOutput(System.err);
+            throw new RuntimeException("TEST IS FAILED. See child stderr");
+        }
+        processResults.verifyStdErr(System.err);
+        processResults.verifyProcessExitValue(System.err);
+        processResults.printProcessStandartOutput(System.out);
+    }
+
+}
+
+class Util {
+    private static String testString = null;
+
+    static {
+        StringBuilder buf = new StringBuilder();
+        for (int i = 1; i < 0x10000; i++) {
+            // Skip surrogates.
+            if (i < 0xD800 || (i > 0xDFFF && i < 0xFFF0)) {
+                buf.append((char) i);
+            } else {
+                buf.append(0x20);
+            }
+        }
+        // On OS X the unicode string is normalized but the clipboard,
+        // so we need to use normalized strings as well to be able to
+        // check the result
+        testString = Normalizer.normalize(buf.toString(), Normalizer.Form.NFC);
+    }
+
+    public static String getTestString() {
+        return testString;
+    }
+
+    public static void setClipboardContents(Clipboard cb,
+                                            Transferable contents,
+                                            ClipboardOwner owner) {
+
+        boolean set = false;
+        while (!set) {
+            try {
+                cb.setContents(contents, owner);
+                set = true;
+            } catch (IllegalStateException ise) {
+                try {
+                    Thread.sleep(100);
+                } catch (InterruptedException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
+
+    public static Transferable getClipboardContents(Clipboard cb,
+                                                    Object requestor) {
+        while (true) {
+            try {
+                return cb.getContents(requestor);
+            } catch (IllegalStateException ise) {
+                try {
+                    Thread.sleep(100);
+                } catch (InterruptedException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
+}
+
+class UnicodeTransferTestChild {
+    private static final Toolkit tk = Toolkit.getDefaultToolkit();
+    private static final Clipboard clipboard = tk.getSystemClipboard();
+
+    public static void main(String[] args) {
+        Transferable t = Util.getClipboardContents(clipboard, null);
+
+        if (t.isDataFlavorSupported(DataFlavor.stringFlavor)) {
+            Object o = null;
+            try {
+                o = t.getTransferData(DataFlavor.stringFlavor);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            String testStr = Util.getTestString();
+
+            if (!testStr.equals(o)) {
+                if (o instanceof String) {
+                    String s = (String)o;
+                    if (s.length() != testStr.length()) {
+                        System.err.println("Received length:" + s.length() +
+                                " Expected length: " +
+                                testStr.length());
+                    } else {
+                        for (int i = 0; i < s.length(); i++) {
+                            char ch = s.charAt(i);
+                            char expected = testStr.charAt(i);
+                            if (ch != expected) {
+                                System.err.println("i=" + i +
+                                        " char=" +
+                                        Integer.toHexString((int)ch) +
+                                        " expected=" +
+                                        Integer.toHexString(expected));
+                            }
+                        }
+                    }
+                } else {
+                    System.err.println("Received object:" + o);
+                }
+                throw new RuntimeException("String doesn't match.");
+            }
+        } else {
+            throw new RuntimeException("Clipboard content was not set");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/event/InputEvent/EventWhenTest/EventWhenTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,132 @@
+/*
+ * 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 sun.awt.SunToolkit;
+
+import java.awt.*;
+import java.awt.event.AWTEventListener;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseEvent;
+
+/*
+ * @test
+ * @bug 8046495
+ * @summary Verifies that mouse/key events has always increasing 'when' timestamps
+ * @author Anton Nashatyrev
+ * @run main EventWhenTest
+ */
+public class EventWhenTest {
+
+    private static volatile int eventsCount = 0;
+    private static volatile boolean failed = false;
+
+    static {
+        Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
+            long lastWhen = 0;
+
+            @Override
+            public void eventDispatched(AWTEvent event) {
+                long curWhen;
+                if (event instanceof KeyEvent) {
+                    curWhen = ((KeyEvent) event).getWhen();
+                } else if (event instanceof MouseEvent) {
+                    curWhen = ((MouseEvent) event).getWhen();
+                } else {
+                    return;
+                }
+
+                eventsCount++;
+
+                if (curWhen < lastWhen) {
+                    System.err.println("FAILED: " + curWhen + " < " + lastWhen +
+                        " for " + event);
+                    failed = true;
+                } else {
+                    lastWhen = curWhen;
+                }
+            }
+        }, AWTEvent.KEY_EVENT_MASK | AWTEvent.MOUSE_EVENT_MASK);
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        Frame frame = new Frame();
+
+        try {
+            Button b = new Button("Button");
+            frame.setBounds(300, 300, 300, 300);
+            frame.add(b);
+            frame.setVisible(true);
+            toolkit.realSync();
+
+            Robot robot = new Robot();
+            robot.mouseMove((int)frame.getLocationOnScreen().getX() + 150,
+                    (int)frame.getLocationOnScreen().getY() + 150);
+
+            eventsCount = 0;
+            System.out.println("Clicking mouse...");
+            for (int i = 0; i < 300 && !failed; i++) {
+                robot.mousePress(InputEvent.BUTTON1_MASK);
+                robot.mouseRelease(InputEvent.BUTTON1_MASK);
+                Thread.sleep(10);
+                b.setLabel("Click: " + i);
+            }
+
+            if (eventsCount == 0) {
+                throw new RuntimeException("No events were received");
+            }
+
+            if (failed) {
+                throw new RuntimeException("Test failed.");
+            }
+            System.out.println("Clicking mouse done: " + eventsCount + " events.");
+
+            b.requestFocusInWindow();
+            toolkit.realSync();
+
+            eventsCount = 0;
+            System.out.println("Typing a key...");
+            for (int i = 0; i < 300 && !failed; i++) {
+                robot.keyPress(KeyEvent.VK_A);
+                robot.keyRelease(KeyEvent.VK_A);
+                Thread.sleep(10);
+                b.setLabel("Type: " + i);
+            }
+            System.out.println("Key typing done: " + eventsCount + " events.");
+
+            if (eventsCount == 0) {
+                throw new RuntimeException("No events were received");
+            }
+
+            if (failed) {
+                throw new RuntimeException("Test failed.");
+            }
+
+            System.out.println("Success!");
+        } finally {
+            frame.dispose();
+        }
+    }
+}
--- a/test/java/lang/Long/ParsingTest.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/java/lang/Long/ParsingTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -128,10 +128,10 @@
     }
 
     private static void checkNumberFormatException(String val, int radix, int start) {
-        int n = 0;
+        long n = 0;
         try {
-            n = Integer.parseInt(val, radix, start);
-            System.err.println("parseInt(" + val + ", " + radix + ", " + start +
+            n = Long.parseLong(val, radix, start);
+            System.err.println("parseLong(" + val + ", " + radix + ", " + start +
                     ") incorrectly returned " + n);
             throw new RuntimeException();
         } catch (NumberFormatException nfe) {
@@ -143,7 +143,7 @@
         long n = 0;
         try {
             n = Long.parseLong(val, radix, start, end);
-            System.err.println("parseInt(" + val + ", " + radix + ", " + start + ", " + end +
+            System.err.println("parseLong(" + val + ", " + radix + ", " + start + ", " + end +
                     ") incorrectly returned " + n);
             throw new RuntimeException();
         } catch (NumberFormatException nfe) {
@@ -152,10 +152,10 @@
     }
 
     private static void checkIndexOutOfBoundsException(String val, int radix, int start) {
-        int n = 0;
+        long n = 0;
         try {
-            n = Integer.parseInt(val, radix, start);
-            System.err.println("parseInt(" + val + ", " + radix + ", " + start +
+            n = Long.parseLong(val, radix, start);
+            System.err.println("parseLong(" + val + ", " + radix + ", " + start +
                     ") incorrectly returned " + n);
             throw new RuntimeException();
         } catch (IndexOutOfBoundsException ioob) {
@@ -167,7 +167,7 @@
         long n = 0;
         try {
             n = Long.parseLong(val, radix, start, end);
-            System.err.println("parseInt(" + val + ", " + radix + ", " + start + ", " + end +
+            System.err.println("parseLong(" + val + ", " + radix + ", " + start + ", " + end +
                     ") incorrectly returned " + n);
             throw new RuntimeException();
         } catch (IndexOutOfBoundsException ioob) {
@@ -179,7 +179,7 @@
         long n = 0;
         try {
             n = Long.parseLong(null, 10, start, end);
-            System.err.println("parseInt(null, " + radix + ", " + start + ", " + end +
+            System.err.println("parseLong(null, " + radix + ", " + start + ", " + end +
                     ") incorrectly returned " + n);
             throw new RuntimeException();
         } catch (NullPointerException npe) {
--- a/test/java/lang/SecurityManager/CheckPackageAccess.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/java/lang/SecurityManager/CheckPackageAccess.java	Thu Aug 28 14:54:07 2014 -0700
@@ -92,8 +92,6 @@
         String osName = System.getProperty("os.name");
         if (osName.contains("OS X")) {
             pkgs.add("apple.");  // add apple package for OS X
-        } else if (osName.startsWith("Windows")) {
-            pkgs.add("com.sun.java.accessibility.");
         }
 
         List<String> jspkgs =
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/SecurityManager/CheckSecurityProvider.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,98 @@
+/*
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6997010
+ * @summary Consolidate java.security files into one file with modifications
+ */
+
+import java.security.Provider;
+import java.security.Security;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/*
+ * The main benefit of this test is to catch merge errors or other types
+ * of issues where one or more of the security providers are accidentally
+ * removed. This is why the known security providers have to
+ * be explicitly listed below.
+ */
+public class CheckSecurityProvider {
+    public static void main(String[] args) throws Exception {
+
+        String os = System.getProperty("os.name");
+
+        /*
+         * This array should be updated whenever new security providers
+         * are added to the the java.security file.
+         * NOTE: it should be in the same order as the java.security file
+         */
+
+        List<String> expected = new ArrayList<>();
+
+        if (os.equals("SunOS")) {
+            if (!isOpenJDKOnly()) {
+                expected.add("com.oracle.security.ucrypto.UcryptoProvider");
+            }
+            expected.add("sun.security.pkcs11.SunPKCS11");
+        }
+        expected.add("sun.security.provider.Sun");
+        expected.add("sun.security.rsa.SunRsaSign");
+        expected.add("sun.security.ec.SunEC");
+        expected.add("com.sun.net.ssl.internal.ssl.Provider");
+        expected.add("com.sun.crypto.provider.SunJCE");
+        expected.add("sun.security.jgss.SunProvider");
+        expected.add("com.sun.security.sasl.Provider");
+        expected.add("org.jcp.xml.dsig.internal.dom.XMLDSigRI");
+        expected.add("sun.security.smartcardio.SunPCSC");
+        if (os.startsWith("Windows")) {
+            expected.add("sun.security.mscapi.SunMSCAPI");
+        }
+        if (os.contains("OS X")) {
+            expected.add("apple.security.AppleProvider");
+        }
+
+        Iterator<String> iter = expected.iterator();
+        for (Provider p: Security.getProviders()) {
+            if (!iter.hasNext()) {
+                throw new Exception("Less expected");
+            }
+            String n1 = iter.next();
+            String n2 = p.getClass().getName();
+            if (!n1.equals(n2)) {
+                throw new Exception("Expected " + n1 + ", actual " + n2);
+            }
+        }
+        if (iter.hasNext()) {
+            throw new Exception("More expected");
+        }
+    }
+
+    // Copied from CheckPackageAccess.java in the same directory
+    private static boolean isOpenJDKOnly() {
+        String prop = System.getProperty("java.runtime.name");
+        return prop != null && prop.startsWith("OpenJDK");
+    }
+}
--- a/test/java/lang/annotation/typeAnnotations/ConstructorReceiverTest.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/java/lang/annotation/typeAnnotations/ConstructorReceiverTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8023651
+ * @bug 8023651 8044629
  * @summary Test that the receiver annotations and the return annotations of
  *          constructors behave correctly.
  * @run testng ConstructorReceiverTest
@@ -38,11 +38,16 @@
 import static org.testng.Assert.*;
 
 public class ConstructorReceiverTest {
+    public static final Integer EMPTY_ANNOTATED_TYPE =  Integer.valueOf(-1);
+
     // Format is {
     //   { Class to get ctor for,
     //       ctor param class,
     //       value of anno of return type,
-    //       value of anno for receiver or null if there should be no receiver anno
+    //       value of anno for receiver,
+    //              or null if there should be no receiver,
+    //              or EMPTY_ANNOTATED_TYPE of there should be a receiver but
+    //              no annotation
     //    },
     //    ...
     // }
@@ -51,13 +56,15 @@
         { ConstructorReceiverTest.Middle.class, ConstructorReceiverTest.class, Integer.valueOf(10), Integer.valueOf(15) },
         { ConstructorReceiverTest.Middle.Inner.class, ConstructorReceiverTest.Middle.class, Integer.valueOf(100), Integer.valueOf(150) },
         { ConstructorReceiverTest.Middle.Inner.Innermost.class, ConstructorReceiverTest.Middle.Inner.class, Integer.valueOf(1000), Integer.valueOf(1500) },
-        { ConstructorReceiverTest.Middle.InnerNoReceiver.class, ConstructorReceiverTest.Middle.class, Integer.valueOf(300), null },
+        { ConstructorReceiverTest.Middle.InnerNoReceiver.class, ConstructorReceiverTest.Middle.class, Integer.valueOf(300), EMPTY_ANNOTATED_TYPE },
         { ConstructorReceiverTest.Nested.class, null, Integer.valueOf(20), null },
         { ConstructorReceiverTest.Nested.NestedMiddle.class, ConstructorReceiverTest.Nested.class, Integer.valueOf(200), Integer.valueOf(250)},
         { ConstructorReceiverTest.Nested.NestedMiddle.NestedInner.class, ConstructorReceiverTest.Nested.NestedMiddle.class, Integer.valueOf(2000), Integer.valueOf(2500)},
-        { ConstructorReceiverTest.Nested.NestedMiddle.NestedInnerNoReceiver.class, ConstructorReceiverTest.Nested.NestedMiddle.class, Integer.valueOf(4000), null},
+        { ConstructorReceiverTest.Nested.NestedMiddle.NestedInnerNoReceiver.class, ConstructorReceiverTest.Nested.NestedMiddle.class, Integer.valueOf(4000), EMPTY_ANNOTATED_TYPE},
+        { ConstructorReceiverTest.Nested.NestedMiddle.SecondNestedInnerNoReceiver.class, ConstructorReceiverTest.Nested.NestedMiddle.class, Integer.valueOf(5000), EMPTY_ANNOTATED_TYPE},
     };
 
+
     @DataProvider
     public Object[][] data() { return TESTS; }
 
@@ -71,14 +78,27 @@
             c = toTest.getDeclaredConstructor(ctorParamType);
 
         AnnotatedType annotatedReceiverType = c.getAnnotatedReceiverType();
-        Annotation[] receiverAnnotations = annotatedReceiverType.getAnnotations();
 
+        // Some Constructors doesn't conceptually have a receiver, they should return null
         if (receiverVal == null) {
-            assertEquals(receiverAnnotations.length, 0, Arrays.asList(receiverAnnotations).toString() +
-                    " should be empty. Looking at 'length': ");
+            assertNull(annotatedReceiverType, "getAnnotatedReciverType  should return null for Constructor: " + c);
             return;
         }
 
+        // check that getType() matches the receiver
+        assertEquals(annotatedReceiverType.getType(),
+                ctorParamType,
+                "getType() doesn't match receiver type: " + ctorParamType);
+
+        Annotation[] receiverAnnotations = annotatedReceiverType.getAnnotations();
+
+        // Some Constructors have no annotations on but in theory can have a receiver
+        if (receiverVal.equals(EMPTY_ANNOTATED_TYPE)) {
+            assertEquals(receiverAnnotations.length, 0, "expecting an empty annotated type for: " + c);
+            return;
+        }
+
+        // The rest should have annotations
         assertEquals(receiverAnnotations.length, 1, "expecting a 1 element array. Looking at 'length': ");
         assertEquals(((Annot)receiverAnnotations[0]).value(), receiverVal.intValue(), " wrong annotation found. Found " +
                 receiverAnnotations[0] +
@@ -136,6 +156,10 @@
             class NestedInnerNoReceiver {
                 @Annot(4000) public NestedInnerNoReceiver() {}
             }
+
+            class SecondNestedInnerNoReceiver {
+                @Annot(5000) public SecondNestedInnerNoReceiver(NestedMiddle NestedMiddle.this) {}
+            }
         }
     }
 
--- a/test/java/lang/annotation/typeAnnotations/GetAnnotatedReceiverType.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/java/lang/annotation/typeAnnotations/GetAnnotatedReceiverType.java	Thu Aug 28 14:54:07 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 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
@@ -23,10 +23,11 @@
 
 /*
  * @test
- * @bug 8024915
+ * @bug 8024915 8044629
  */
 
 import java.lang.reflect.AnnotatedType;
+import java.lang.reflect.Executable;
 import java.util.Arrays;
 
 public class GetAnnotatedReceiverType {
@@ -42,41 +43,115 @@
         public Inner1(GetAnnotatedReceiverType GetAnnotatedReceiverType.this) {}
     }
 
+    public static class Nested {
+        public Nested() {}
+
+        public class NestedInner {
+            public NestedInner() { }
+
+            public Class<?> getLocalClass () {
+                class NestedInnerLocal { public NestedInnerLocal() {} }
+                return NestedInnerLocal.class;
+            }
+
+            public Class<?> getAnonymousClass() {
+                return new Object() {}.getClass();
+            }
+        }
+    }
+
+    public class Inner2 {
+        public Inner2() { }
+
+        public class Inner3 {
+            public Inner3() { }
+
+            public Class<?> getLocalClass () {
+                class InnerLocal { public InnerLocal() {} }
+                return InnerLocal.class;
+            }
+
+            public Class<?> getAnonymousClass() {
+                return new Object() {}.getClass();
+            }
+        }
+
+        public Class<?> getLocalClass () {
+            class InnerLocal { public InnerLocal() {} }
+                return InnerLocal.class;
+        }
+
+        public Class<?> getAnonymousClass() {
+            return new Object() {}.getClass();
+        }
+    }
+
     private static int failures = 0;
     private static int tests = 0;
 
     public static void main(String[] args) throws NoSuchMethodException {
-        checkEmptyAT(GetAnnotatedReceiverType.class.getMethod("method").getAnnotatedReceiverType(),
+        checkEmptyAT(GetAnnotatedReceiverType.class.getMethod("method"),
                 "getAnnotatedReceiverType for \"method\" should return an empty AnnotatedType");
-        checkEmptyAT(Inner0.class.getConstructor(GetAnnotatedReceiverType.class).getAnnotatedReceiverType(),
+        checkEmptyAT(Inner0.class.getConstructor(GetAnnotatedReceiverType.class),
                 "getAnnotatedReceiverType for a ctor without a \"this\" should return an empty AnnotatedType");
 
-        checkEmptyAT(GetAnnotatedReceiverType.class.getMethod("method0").getAnnotatedReceiverType(),
+        checkEmptyAT(GetAnnotatedReceiverType.class.getMethod("method0"),
                 "getAnnotatedReceiverType for \"method0\" should return an empty AnnotatedType");
-        checkEmptyAT(Inner1.class.getConstructor(GetAnnotatedReceiverType.class).getAnnotatedReceiverType(),
+        checkEmptyAT(Inner1.class.getConstructor(GetAnnotatedReceiverType.class),
                 "getAnnotatedReceiverType for a ctor with a \"this\" should return an empty AnnotatedType");
 
-        checkNull(GetAnnotatedReceiverType.class.getMethod("method4").getAnnotatedReceiverType(),
+        checkNull(GetAnnotatedReceiverType.class.getMethod("method4"),
                 "getAnnotatedReceiverType() on a static method should return null");
 
+        // More nested, inner, local and anonymous classes
+        Nested nested = new Nested();
+        Nested.NestedInner instance = nested.new NestedInner();
+        checkNull(nested.getClass().getConstructors()[0],
+                "getAnnotatedReceiverType() on a constructor for a static class should return null");
+        checkEmptyAT(instance.getClass().getConstructors()[0],
+                "getAnnotatedReceiverType for a ctor without a \"this\" should return an empty AnnotatedType");
+        checkNull(instance.getLocalClass().getConstructors()[0],
+                "getAnnotatedReceiverType() on a constructor for a local class should return null");
+        checkNull(instance.getAnonymousClass().getDeclaredConstructors()[0],
+                "getAnnotatedReceiverType() on a constructor for an anonymous class should return null");
+
+        GetAnnotatedReceiverType outer = new GetAnnotatedReceiverType();
+        Inner2 instance2 = outer.new Inner2();
+        checkEmptyAT(instance2.getClass().getConstructors()[0],
+                "getAnnotatedReceiverType for a ctor without a \"this\" should return an empty AnnotatedType");
+        checkNull(instance2.getLocalClass().getConstructors()[0],
+                "getAnnotatedReceiverType() on a constructor for a local class should return null");
+        checkNull(instance2.getAnonymousClass().getDeclaredConstructors()[0],
+                "getAnnotatedReceiverType() on a constructor for an anonymous class should return null");
+
+        Inner2.Inner3 instance3 = instance2.new Inner3();
+        checkEmptyAT(instance3.getClass().getConstructors()[0],
+                "getAnnotatedReceiverType for a ctor without a \"this\" should return an empty AnnotatedType");
+        checkNull(instance3.getLocalClass().getConstructors()[0],
+                "getAnnotatedReceiverType() on a constructor for a local class should return null");
+        checkNull(instance3.getAnonymousClass().getDeclaredConstructors()[0],
+                "getAnnotatedReceiverType() on a constructor for an anonymous class should return null");
+
         if (failures != 0)
             throw new RuntimeException("Test failed, see log for details");
-        else if (tests != 5)
+        else if (tests != 15)
             throw new RuntimeException("Not all cases ran, failing");
     }
 
-    private static void checkNull(Object o, String msg) {
-        if (o != null) {
+    private static void checkNull(Executable e, String msg) {
+        AnnotatedType a = e.getAnnotatedReceiverType();
+        if (a != null) {
             failures++;
-            System.err.println(msg);
+            System.err.println(msg + ": " + e);
         }
         tests++;
     }
 
-    private static void checkEmptyAT(AnnotatedType a, String msg) {
+    private static void checkEmptyAT(Executable e, String msg) {
+        AnnotatedType a = e.getAnnotatedReceiverType();
         if (a.getAnnotations().length != 0) {
             failures++;
-            System.err.print(msg);
+            System.err.print(msg + ": " + e);
         }
         tests++;
     }
--- a/test/java/lang/annotation/typeAnnotations/TestExecutableGetAnnotatedType.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/java/lang/annotation/typeAnnotations/TestExecutableGetAnnotatedType.java	Thu Aug 28 14:54:07 2014 -0700
@@ -73,13 +73,11 @@
         testParameters(e.getParameters());
     }
 
-    // should test constructors as well, see JDK-8044629
     @Test(dataProvider = "genericMethodData")
     public void testGenericReceiverType(Executable e) throws Exception {
         testReceiverType0(e);
     }
 
-    // should test constructors as well, see JDK-8044629
     @Test(dataProvider = "methodData")
     public void testReceiverType(Executable e) throws Exception {
         testReceiverType0(e);
--- a/test/java/lang/instrument/NMTHelper.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/java/lang/instrument/NMTHelper.java	Thu Aug 28 14:54:07 2014 -0700
@@ -32,8 +32,8 @@
         executeDcmd("vmNativeMemory", "baseline");
     }
 
-    // Total:  reserved=3484685KB  +293KB, committed=266629KB +293KB
-    private static Pattern totalLine = Pattern.compile("^Total:  reserved=\\d+KB  .*KB, committed=\\d+KB (.*)KB$");
+    // Total: reserved=3484685KB +293KB, committed=266629KB +293KB
+    private static Pattern totalLine = Pattern.compile("^Total: reserved=\\d+KB .*KB, committed=\\d+KB (.*)KB$");
 
     public static long committedDiff() throws Exception {
         String res = (String) executeDcmd("vmNativeMemory", "detail.diff");
--- a/test/java/lang/management/MemoryMXBean/LowMemoryTest.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/java/lang/management/MemoryMXBean/LowMemoryTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -50,6 +50,7 @@
     private static boolean testFailed = false;
     private static final int NUM_TRIGGERS = 5;
     private static final int NUM_CHUNKS = 2;
+    private static final int YOUNG_GEN_SIZE = 8 * 1024 * 1024;
     private static long chunkSize;
 
     /**
@@ -59,11 +60,14 @@
      */
     public static void main(String a[]) throws Throwable {
         final String main = "LowMemoryTest$TestMain";
-        RunUtil.runTestKeepGcOpts(main);
-        RunUtil.runTestClearGcOpts(main, "-XX:+UseSerialGC");
-        RunUtil.runTestClearGcOpts(main, "-XX:+UseParallelGC");
-        RunUtil.runTestClearGcOpts(main, "-XX:+UseG1GC");
-        RunUtil.runTestClearGcOpts(main, "-XX:+UseConcMarkSweepGC");
+        // Use a low young gen size to ensure that the
+        // allocated objects are put in the old gen.
+        final String nmFlag = "-Xmn" + YOUNG_GEN_SIZE;
+        RunUtil.runTestKeepGcOpts(main, nmFlag);
+        RunUtil.runTestClearGcOpts(main, nmFlag, "-XX:+UseSerialGC");
+        RunUtil.runTestClearGcOpts(main, nmFlag, "-XX:+UseParallelGC");
+        RunUtil.runTestClearGcOpts(main, nmFlag, "-XX:+UseG1GC");
+        RunUtil.runTestClearGcOpts(main, nmFlag, "-XX:+UseConcMarkSweepGC");
     }
 
     private static volatile boolean listenerInvoked = false;
@@ -156,6 +160,16 @@
             chunkSize = (mu.getMax() - mu.getUsed()) / 20;
             newThreshold = mu.getUsed() + (chunkSize * NUM_CHUNKS);
 
+            // Sanity check. Make sure the chunkSize is large than the YOUNG_GEN_SIZE
+            // If the chunkSize are lower than the YOUNG_GEN_SIZE, we will get intermittent
+            // failures when objects end up in the young gen instead of the old gen.
+            // Tweak the test if this fails.
+            if (chunkSize < YOUNG_GEN_SIZE) {
+                throw new RuntimeException("TEST FAILED: " +
+                        " chunkSize: " + chunkSize + " is less than YOUNG_GEN_SIZE: " + YOUNG_GEN_SIZE +
+                        " max: " + mu.getMax() + " used: " + mu.getUsed() + " newThreshold: " + newThreshold);
+            }
+
             System.out.println("Setting threshold for " + mpool.getName() +
                 " from " + mpool.getUsageThreshold() + " to " + newThreshold +
                 ".  Current used = " + mu.getUsed());
--- a/test/java/lang/management/MemoryMXBean/MemoryManagement.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/java/lang/management/MemoryMXBean/MemoryManagement.java	Thu Aug 28 14:54:07 2014 -0700
@@ -31,7 +31,7 @@
  * @author  Mandy Chung
  *
  * @build MemoryManagement MemoryUtil
- * @run main/othervm/timeout=600 MemoryManagement
+ * @run main/othervm/timeout=600 -Xmn8m MemoryManagement
  */
 
 import java.lang.management.*;
@@ -49,6 +49,8 @@
     private static volatile boolean trace = false;
     private static volatile boolean testFailed = false;
     private static final int NUM_CHUNKS = 2;
+    // Must match -Xmn set on the @run line
+    private static final int YOUNG_GEN_SIZE = 8 * 1024 * 1024;
     private static volatile long chunkSize;
     private static volatile int listenerInvoked = 0;
 
@@ -112,6 +114,16 @@
         }
         newThreshold = mu.getUsed() + (chunkSize * NUM_CHUNKS);
 
+        // Sanity check. Make sure the chunkSize is large than the YOUNG_GEN_SIZE
+        // If the chunkSize are lower than the YOUNG_GEN_SIZE, we will get intermittent
+        // failures when objects end up in the young gen instead of the old gen.
+        // Tweak the test if this fails.
+        if (chunkSize < YOUNG_GEN_SIZE) {
+            throw new RuntimeException("TEST FAILED: " +
+                    " chunkSize: " + chunkSize + " is less than YOUNG_GEN_SIZE: " + YOUNG_GEN_SIZE +
+                    " max: " + mu.getMax() + " used: " + mu.getUsed() + " newThreshold: " + newThreshold);
+        }
+
         System.out.println("Setting threshold for " + mpool.getName() +
             " from " + mpool.getUsageThreshold() + " to " + newThreshold +
             ".  Current used = " + mu.getUsed());
--- a/test/java/net/ipv6tests/Tests.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/java/net/ipv6tests/Tests.java	Thu Aug 28 14:54:07 2014 -0700
@@ -26,6 +26,9 @@
 import java.util.*;
 
 public class Tests {
+
+    static boolean isWindows = System.getProperty("os.name").startsWith("Windows");
+
     /**
      * performs a simple exchange of data between the two sockets
      * and throws an exception if there is any problem.
@@ -264,6 +267,12 @@
             if (ifs != null) {
                 while (ifs.hasMoreElements()) {
                     NetworkInterface nic = (NetworkInterface)ifs.nextElement();
+                    // Skip (Windows)Teredo Tunneling Pseudo-Interface
+                    if (isWindows) {
+                        String dName = nic.getDisplayName();
+                        if (dName != null && dName.contains("Teredo"))
+                            continue;
+                    }
                     try {
                         if (nic.isUp() && !nic.isLoopback())
                             return nic;
--- a/test/java/util/Base64/TestBase64.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/java/util/Base64/TestBase64.java	Thu Aug 28 14:54:07 2014 -0700
@@ -114,8 +114,6 @@
         testDecodeIgnoredAfterPadding();
     }
 
-    private static sun.misc.BASE64Encoder sunmisc = new sun.misc.BASE64Encoder();
-
     private static void test(Base64.Encoder enc, Base64.Decoder dec,
                              int numRuns, int numBytes) throws Throwable {
         Random rnd = new java.util.Random();
@@ -143,21 +141,6 @@
                             throw new RuntimeException(
                                "Base64 enc.encode().withoutPadding() has padding!");
                     }
-                    // compare to sun.misc.BASE64Encoder
-
-                    byte[] encoded2 = sunmisc.encode(orig).getBytes("ASCII");
-                    if (!withoutPadding) {    // don't test for withoutPadding()
-                        checkEqual(normalize(encoded), normalize(encoded2),
-                                   "Base64 enc.encode() does not match sun.misc.base64!");
-                    }
-                    // remove padding '=' to test non-padding decoding case
-                    if (encoded[encoded.length -2] == '=')
-                        encoded2 = Arrays.copyOf(encoded,  encoded.length -2);
-                    else if (encoded[encoded.length -1] == '=')
-                        encoded2 = Arrays.copyOf(encoded, encoded.length -1);
-                    else
-                        encoded2 = null;
-
                     // --------testing encodetoString(byte[])/decode(String)--------
                     String str = enc.encodeToString(orig);
                     if (!Arrays.equals(str.getBytes("ASCII"), encoded)) {
@@ -167,11 +150,6 @@
                     byte[] buf = dec.decode(new String(encoded, "ASCII"));
                     checkEqual(buf, orig, "Base64 decoding(String) failed!");
 
-                    if (encoded2 != null) {
-                        buf = dec.decode(new String(encoded2, "ASCII"));
-                        checkEqual(buf, orig, "Base64 decoding(String) failed!");
-                    }
-
                     //-------- testing encode/decode(Buffer)--------
                     testEncode(enc, ByteBuffer.wrap(orig), encoded);
                     ByteBuffer bin = ByteBuffer.allocateDirect(orig.length);
@@ -183,9 +161,6 @@
                     bin.put(encoded).flip();
                     testDecode(dec, bin, orig);
 
-                    if (encoded2 != null)
-                        testDecode(dec, ByteBuffer.wrap(encoded2), orig);
-
                     // --------testing decode.wrap(input stream)--------
                     // 1) random buf length
                     ByteArrayInputStream bais = new ByteArrayInputStream(encoded);
--- a/test/java/util/Base64/TestBase64Golden.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/java/util/Base64/TestBase64Golden.java	Thu Aug 28 14:54:07 2014 -0700
@@ -40,9 +40,6 @@
 import java.util.Objects;
 import java.util.Random;
 
-import sun.misc.BASE64Decoder;
-import sun.misc.BASE64Encoder;
-
 public class TestBase64Golden {
 
     public static void main(String[] args) throws Exception {
@@ -138,16 +135,6 @@
             resArr = decoder.decode(encodedStr);
             assertEqual(resArr, srcArr);
 
-            // test compatible with sun.misc.Base64Encoder
-            if (type == Base64Type.MIME) {
-                sun.misc.BASE64Encoder miscEncoder = new BASE64Encoder();
-                sun.misc.BASE64Decoder miscDecoder = new BASE64Decoder();
-                resArr = decoder.decode(miscEncoder.encode(srcArr));
-                assertEqual(resArr, srcArr);
-
-                resArr = encoder.encode(miscDecoder.decodeBuffer(encodedStr));
-                assertEqual(new String(resArr, DEF_CHARSET), encodedStr);
-            }
         }
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/Calendar/SupplementalJapaneseEraTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,156 @@
+/*
+ * 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.text.SimpleDateFormat;
+import java.time.chrono.JapaneseDate;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import static java.util.GregorianCalendar.*;
+import java.util.Locale;
+import java.util.TimeZone;
+
+/*
+ * Usage:
+ *   java SupplementalJapaneseEraTest <flag>
+ *    <flag>
+ *      -s   prints start time for a test era
+ *      -e   prints the English name of the last predefined era
+ *
+ *   java -Djdk.calendar.japanese.supplemental.era=... SupplementalJapaneseEraTest <flag>
+ *      -t   executes tests with a valid property value
+ *      -b <eraname>
+ *           executes tests with an invalid property value
+ *           <eraname> must be the output with -e
+ */
+
+public class SupplementalJapaneseEraTest {
+    private static final Locale WAREKI_LOCALE = Locale.forLanguageTag("ja-JP-u-ca-japanese");
+    private static final String NEW_ERA_NAME = "NewEra";
+    private static final String NEW_ERA_ABBR = "N.E.";
+    private static int errors = 0;
+
+    public static void main(String[] args) {
+        // args[0] is a flag.
+        switch (args[0]) {
+        case "-s":
+            // print the start time of the new era for testing
+            Calendar cal = new Calendar.Builder()
+                .setCalendarType("japanese")
+                .setTimeZone(TimeZone.getTimeZone("GMT"))
+                .setDate(200, FEBRUARY, 11)
+                .build();
+            System.out.println(cal.getTimeInMillis());
+            break;
+
+        case "-e":
+            // print the current era name in English
+            Calendar jcal = new Calendar.Builder()
+                .setCalendarType("japanese")
+                .setFields(YEAR, 1, DAY_OF_YEAR, 1)
+                .build();
+            System.out.println(jcal.getDisplayName(ERA, LONG, Locale.US));
+            break;
+
+        case "-t":
+            // test with a valid property value
+            testProperty();
+            break;
+
+        case "-b":
+            // test with an invalid property value
+            // args[1] is the current era name given by -e.
+            testValidation(args[1].replace("\r", "")); // remove any CR for Cygwin
+            break;
+        }
+        if (errors != 0) {
+            throw new RuntimeException("test failed");
+        }
+    }
+
+    private static void testProperty() {
+        Calendar jcal = new Calendar.Builder()
+            .setCalendarType("japanese")
+            .setFields(YEAR, 1, DAY_OF_YEAR, 1)
+            .build();
+        Date firstDayOfEra = jcal.getTime();
+
+        jcal.set(ERA, jcal.get(ERA) - 1); // previous era
+        jcal.set(YEAR, 1);
+        jcal.set(DAY_OF_YEAR, 1);
+        Calendar cal = new GregorianCalendar();
+        cal.setTimeInMillis(jcal.getTimeInMillis());
+        cal.add(YEAR, 199);
+        int year = cal.get(YEAR);
+
+        SimpleDateFormat sdf;
+        String expected, got;
+
+        // test long era name
+        sdf = new SimpleDateFormat("GGGG y-MM-dd", WAREKI_LOCALE);
+        got = sdf.format(firstDayOfEra);
+        expected = NEW_ERA_NAME + " 1-02-11";
+        if (!expected.equals(got)) {
+            System.err.printf("GGGG y-MM-dd: got=\"%s\", expected=\"%s\"%n", got, expected);
+            errors++;
+        }
+
+        // test era abbreviation
+        sdf = new SimpleDateFormat("G y-MM-dd", WAREKI_LOCALE);
+        got = sdf.format(firstDayOfEra);
+        expected = NEW_ERA_ABBR+" 1-02-11";
+        if (!expected.equals(got)) {
+            System.err.printf("GGGG y-MM-dd: got=\"%s\", expected=\"%s\"%n", got, expected);
+            errors++;
+        }
+
+        // confirm the gregorian year
+        sdf = new SimpleDateFormat("y", Locale.US);
+        int y = Integer.parseInt(sdf.format(firstDayOfEra));
+        if (y != year) {
+            System.err.printf("Gregorian year: got=%d, expected=%d%n", y, year);
+            errors++;
+        }
+
+        // test java.time.chrono.JapaneseEra
+        JapaneseDate jdate = JapaneseDate.of(year, 2, 11);
+        got = jdate.toString();
+        expected = "Japanese " + NEW_ERA_NAME + " 1-02-11";
+        if (!expected.equals(got)) {
+            System.err.printf("JapaneseDate: got=\"%s\", expected=\"%s\"%n", got, expected);
+            errors++;
+        }
+    }
+
+    private static void testValidation(String eraName) {
+        Calendar jcal = new Calendar.Builder()
+            .setCalendarType("japanese")
+            .setFields(YEAR, 1, DAY_OF_YEAR, 1)
+            .build();
+        if (!jcal.getDisplayName(ERA, LONG, Locale.US).equals(eraName)) {
+            errors++;
+            String prop = System.getProperty("jdk.calendar.japanese.supplemental.era");
+            System.err.println("Era changed with invalid property: " + prop);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/Calendar/SupplementalJapaneseEraTest.sh	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,74 @@
+#
+# 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.
+#
+
+# @test
+# @bug 8048123
+# @summary Test for jdk.calendar.japanese.supplemental.era support
+# @build SupplementalJapaneseEraTest
+# @run shell SupplementalJapaneseEraTest.sh
+
+PROPERTY=jdk.calendar.japanese.supplemental.era
+STATUS=0
+
+# get the start time of the fictional next era
+SINCE=`${TESTJAVA}/bin/java -cp "${TESTCLASSES}" SupplementalJapaneseEraTest -s`
+
+echo "Tests with valid property values..."
+for P in "name=NewEra,abbr=N.E.,since=$SINCE" \
+         "name = NewEra, abbr = N.E., since = $SINCE"
+do
+    if ${TESTJAVA}/bin/java ${TESTVMOPTS} -cp "${TESTCLASSES}" \
+           -D$PROPERTY="$P" SupplementalJapaneseEraTest -t; then
+        echo "$P: passed"
+    else
+        echo "$P: failed"
+        STATUS=1
+    fi
+done
+
+# get the name of the current era to be used to confirm that
+# invalid property values are ignored.
+ERA=`${TESTJAVA}/bin/java -cp "${TESTCLASSES}" SupplementalJapaneseEraTest -e`
+
+echo "Tests with invalid property values..."
+for P in "foo=Bar,name=NewEra,abbr=N.E.,since=$SINCE" \
+         "=NewEra,abbr=N.E.,since=$SINCE" \
+         "=,abbr=N.E.,since=$SINCE" \
+         "name,abbr=N.E.,since=$SINCE" \
+         "abbr=N.E.,since=$SINCE" \
+         "name=NewEra,since=$SINCE" \
+         "name=,abbr=N.E.,since=$SINCE" \
+         "name=NewEra,abbr=,since=$SINCE" \
+         "name=NewEra,abbr=N.E." \
+         "name=NewEra,abbr=N.E.,since=0" \
+         "name=NewEra,abbr=N.E.,since=9223372036854775808" # Long.MAX_VALUE+1
+do
+    if ${TESTJAVA}/bin/java ${TESTVMOPTS} -cp "${TESTCLASSES}" \
+           -D$PROPERTY="$P" SupplementalJapaneseEraTest -b "$ERA"; then
+        echo "$P: passed"
+    else
+        echo "$P: failed"
+        STATUS=1
+    fi
+done
+exit $STATUS
--- a/test/java/util/Currency/PropertiesTest.sh	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/java/util/Currency/PropertiesTest.sh	Thu Aug 28 14:54:07 2014 -0700
@@ -97,25 +97,16 @@
 # Dump built-in currency data + overrides in properties file copied into
 # JRE image.
 
-# Copy the test properties file. If testjava is not a typical jdk-image
-# or testjava is not writable, make a private copy of it.
-COPIED=0
-if [ -w ${TESTJAVA}${FS}jre${FS}lib ]
-then
-  WRITABLEJDK=$TESTJAVA
+# Make a private copy of the jdk so we can write to the properties file location
+# without disturbing other users, including concurrently executing tests.
+WRITABLEJDK=.${FS}testjava
+cp -Hr $TESTJAVA $WRITABLEJDK
+if [ -d ${TESTJAVA}${FS}jre ]; then
   PROPLOCATION=${WRITABLEJDK}${FS}jre${FS}lib
 else
-  WRITABLEJDK=.${FS}testjava
-  if [ -d ${TESTJAVA}${FS}jre ]
-  then
-    PROPLOCATION=${WRITABLEJDK}${FS}jre${FS}lib
-  else
-    PROPLOCATION=${WRITABLEJDK}${FS}lib
-  fi
-  cp -r $TESTJAVA $WRITABLEJDK
-  chmod -R +w $WRITABLEJDK
-  COPIED=1
+  PROPLOCATION=${WRITABLEJDK}${FS}lib
 fi
+chmod -R +w $WRITABLEJDK
 cp ${PROPS} $PROPLOCATION
 echo "Properties location: ${PROPLOCATION}"
 
@@ -125,11 +116,7 @@
 if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
 
 # Cleanup
-rm -f ${PROPLOCATION}${FS}currency.properties
-if [ $COPIED -eq 1 ]
-then
-  rm -rf $WRITABLEJDK
-fi
+rm -rf $WRITABLEJDK
 
 # compare the two dump files
 run PropertiesTest -c dump1 dump3 ${PROPS}
--- a/test/java/util/StringJoiner/MergeTest.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/java/util/StringJoiner/MergeTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @bug 8017231 8020977
+ * @bug 8017231 8020977 8054221
  * @summary test  StringJoiner::merge
  * @run testng MergeTest
  */
@@ -36,98 +36,135 @@
 
 @Test
 public class MergeTest {
-    public void testNull() {
-        StringJoiner sj = new StringJoiner(",", "{", "}");
-        try {
-            sj.merge(null);
-            fail("Should throw NullPointerException!");
-        } catch (NullPointerException npe) {
-            // expected
+    private final static String[] PREFIXES = {"", "{", "@#$%"};
+    private final static String[] SUFFIXES = {"", "}", "*&%$"};
+
+    private static class Fixes {
+        public String pre0, suf0;
+        public String pre1, suf1;
+        public Fixes(String prefix0, String suffix0,
+                     String prefix1, String suffix1) {
+            this.pre0 = prefix0;
+            this.suf0 = suffix0;
+            this.pre1 = prefix1;
+            this.suf1 = suffix1;
         }
     }
 
-    public void testSimple() {
+    private static Stream<Fixes> fixesStream() {
+        Stream.Builder<Fixes> builder = Stream.builder();
+        for (final String prefix0 : PREFIXES) {
+            for (final String suffix0 : SUFFIXES) {
+                for (final String prefix1 : PREFIXES) {
+                    for (final String suffix1 : SUFFIXES) {
+                        builder.accept(new Fixes(prefix0, suffix0,
+                                                 prefix1, suffix1));
+                    }
+                }
+            }
+        }
+        return builder.build();
+    }
+
+    @Test(expectedExceptions = {NullPointerException.class})
+    public void testNull() {
         StringJoiner sj = new StringJoiner(",", "{", "}");
-        StringJoiner other = new StringJoiner(",", "[", "]");
-        Stream.of("a", "b", "c").forEachOrdered(sj::add);
-        Stream.of("d", "e", "f").forEachOrdered(other::add);
+        sj.merge(null);
+    }
 
-        sj.merge(other);
-        assertEquals(sj.toString(), "{a,b,c,d,e,f}");
+    public void testSimple() {
+        fixesStream().forEach(fixes -> {
+            StringJoiner sj = new StringJoiner(",", fixes.pre0, fixes.suf0);
+            StringJoiner other = new StringJoiner(",", fixes.pre1, fixes.suf1);
+            Stream.of("a", "b", "c").forEachOrdered(sj::add);
+            Stream.of("d", "e", "f").forEachOrdered(other::add);
+
+            sj.merge(other);
+            assertEquals(sj.toString(), fixes.pre0 + "a,b,c,d,e,f" + fixes.suf0);
+        });
     }
 
     public void testEmptyOther() {
-        StringJoiner sj = new StringJoiner(",", "{", "}");
-        StringJoiner other = new StringJoiner(",", "[", "]");
-        Stream.of("a", "b", "c").forEachOrdered(sj::add);
+        fixesStream().forEach(fixes -> {
+            StringJoiner sj = new StringJoiner(",", fixes.pre0, fixes.suf0);
+            StringJoiner other = new StringJoiner(",", fixes.pre1, fixes.suf1);
+            Stream.of("a", "b", "c").forEachOrdered(sj::add);
 
-        sj.merge(other);
-        assertEquals(sj.toString(), "{a,b,c}");
+            sj.merge(other);
+            assertEquals(sj.toString(), fixes.pre0 + "a,b,c" + fixes.suf0);
 
-        other.setEmptyValue("EMPTY");
-        sj.merge(other);
-        assertEquals(sj.toString(), "{a,b,c}");
+            other.setEmptyValue("EMPTY");
+            sj.merge(other);
+            assertEquals(sj.toString(), fixes.pre0 + "a,b,c" + fixes.suf0);
+        });
     }
 
     public void testEmptyThis() {
-        StringJoiner sj = new StringJoiner(",", "{", "}");
-        StringJoiner other = new StringJoiner(":", "[", "]");
-        Stream.of("d", "e", "f").forEachOrdered(other::add);
+        fixesStream().forEach(fixes -> {
+            StringJoiner sj = new StringJoiner(",", fixes.pre0, fixes.suf0);
+            StringJoiner other = new StringJoiner(":", fixes.pre1, fixes.suf1);
+            Stream.of("d", "e", "f").forEachOrdered(other::add);
 
-        sj.merge(other);
-        assertEquals(sj.toString(), "{d:e:f}");
+            sj.merge(other);
+            assertEquals(sj.toString(), fixes.pre0 + "d:e:f" + fixes.suf0);
 
-        sj = new StringJoiner(",", "{", "}").setEmptyValue("EMPTY");
-        assertEquals(sj.toString(), "EMPTY");
-        sj.merge(other);
-        assertEquals(sj.toString(), "{d:e:f}");
+            sj = new StringJoiner(",", fixes.pre0, fixes.suf0).setEmptyValue("EMPTY");
+            assertEquals(sj.toString(), "EMPTY");
+            sj.merge(other);
+            assertEquals(sj.toString(), fixes.pre0 + "d:e:f" + fixes.suf0);
+        });
     }
 
     public void testEmptyBoth() {
-        StringJoiner sj = new StringJoiner(",", "{", "}");
-        StringJoiner other = new StringJoiner(":", "[", "]");
+        fixesStream().forEach(fixes -> {
+            StringJoiner sj = new StringJoiner(",", fixes.pre0, fixes.suf0);
+            StringJoiner other = new StringJoiner(":", fixes.pre1, fixes.suf1);
 
-        sj.merge(other);
-        assertEquals(sj.toString(), "{}");
+            sj.merge(other);
+            assertEquals(sj.toString(), fixes.pre0 + fixes.suf0);
 
-        other.setEmptyValue("NOTHING");
-        sj.merge(other);
-        assertEquals(sj.toString(), "{}");
+            other.setEmptyValue("NOTHING");
+            sj.merge(other);
+            assertEquals(sj.toString(), fixes.pre0 + fixes.suf0);
 
-        sj = new StringJoiner(",", "{", "}").setEmptyValue("EMPTY");
-        assertEquals(sj.toString(), "EMPTY");
-        sj.merge(other);
-        assertEquals(sj.toString(), "EMPTY");
+            sj = new StringJoiner(",", fixes.pre0, fixes.suf0).setEmptyValue("EMPTY");
+            assertEquals(sj.toString(), "EMPTY");
+            sj.merge(other);
+            assertEquals(sj.toString(), "EMPTY");
+        });
     }
 
     public void testCascadeEmpty() {
-        StringJoiner sj = new StringJoiner(",", "{", "}");
-        StringJoiner o1 = new StringJoiner(":", "[", "]").setEmptyValue("Empty1");
-        StringJoiner o2 = new StringJoiner(",", "<", ">").setEmptyValue("Empty2");
+        fixesStream().forEach(fixes -> {
+            StringJoiner sj = new StringJoiner(",", fixes.pre0, fixes.suf0);
+            StringJoiner o1 = new StringJoiner(":", fixes.pre1, fixes.suf1).setEmptyValue("Empty1");
+            StringJoiner o2 = new StringJoiner(",", "<", ">").setEmptyValue("Empty2");
 
-        o1.merge(o2);
-        assertEquals(o1.toString(), "Empty1");
+            o1.merge(o2);
+            assertEquals(o1.toString(), "Empty1");
 
-        sj.merge(o1);
-        assertEquals(sj.toString(), "{}");
+            sj.merge(o1);
+            assertEquals(sj.toString(), fixes.pre0 + fixes.suf0);
+        });
     }
 
     public void testDelimiter() {
-        StringJoiner sj = new StringJoiner(",", "{", "}");
-        StringJoiner other = new StringJoiner(":", "[", "]");
-        Stream.of("a", "b", "c").forEachOrdered(sj::add);
-        Stream.of("d", "e", "f").forEachOrdered(other::add);
+        fixesStream().forEach(fixes -> {
+            StringJoiner sj = new StringJoiner(",", fixes.pre0, fixes.suf0);
+            StringJoiner other = new StringJoiner(":", fixes.pre1, fixes.suf1);
+            Stream.of("a", "b", "c").forEachOrdered(sj::add);
+            Stream.of("d", "e", "f").forEachOrdered(other::add);
 
-        sj.merge(other);
-        assertEquals(sj.toString(), "{a,b,c,d:e:f}");
+            sj.merge(other);
+            assertEquals(sj.toString(), fixes.pre0 + "a,b,c,d:e:f" + fixes.suf0);
+        });
     }
 
     public void testMergeSelf() {
-        final StringJoiner sj = new StringJoiner(",", "[", "]").add("a").add("b");
-        assertEquals(sj.merge(sj).toString(), "[a,b,a,b]");
-        assertEquals(sj.merge(sj).toString(), "[a,b,a,b,a,b,a,b]");
-
-        final StringJoiner sj2 = new StringJoiner(",").add("c").add("d");
-        assertEquals(sj2.merge(sj2).toString(), "c,d,c,d");
+        fixesStream().forEach(fixes -> {
+            final StringJoiner sj = new StringJoiner(",", fixes.pre0, fixes.suf0).add("a").add("b");
+            assertEquals(sj.merge(sj).toString(), fixes.pre0 + "a,b,a,b" + fixes.suf0);
+            assertEquals(sj.merge(sj).toString(), fixes.pre0 + "a,b,a,b,a,b,a,b" + fixes.suf0);
+        });
     }
 }
--- a/test/java/util/StringJoiner/StringJoinerTest.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/java/util/StringJoiner/StringJoinerTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -305,9 +305,9 @@
         sj.add("2");
         assertEquals(sj.toString(), prefix + "1" + infix + "2" + suffix);
         sj.add("");
-        assertEquals(sj.toString(), prefix + "1" + infix + "2" +infix + suffix);
+        assertEquals(sj.toString(), prefix + "1" + infix + "2" + infix + suffix);
         sj.add("3");
-        assertEquals(sj.toString(), prefix + "1" + infix + "2" +infix + infix + "3" + suffix);
+        assertEquals(sj.toString(), prefix + "1" + infix + "2" + infix + infix + "3" + suffix);
     }
 
     public void testDelimiterCombinations() {
--- a/test/java/util/logging/CheckZombieLockTest.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/java/util/logging/CheckZombieLockTest.java	Thu Aug 28 14:54:07 2014 -0700
@@ -51,23 +51,23 @@
 import java.util.logging.LogRecord;
 public class CheckZombieLockTest {
 
-    private static final String WRITABLE_DIR = "writable-dir";
+    private static final String WRITABLE_DIR = "writable-lockfile-dir";
     private static volatile boolean supportsLocking = true;
 
     static enum TestCase {
-        WRITABLE,  // just verifies that we can create a file in our 'writable-dir'
+        WRITABLE,  // just verifies that we can create a file in our 'writable-lockfile-dir'
         CLOSE, // checks that closing a FileHandler removes its lock file
-        CREATE_FIRST, // verifies that 'writable-dir' contains no lock, then creates a first FileHandler.
-        CREATE_NEXT, // verifies that 'writable-dir' contains a single lock, then creates the next FileHandler
+        CREATE_FIRST, // verifies that 'writable-lockfile-dir' contains no lock, then creates a first FileHandler.
+        CREATE_NEXT, // verifies that 'writable-lockfile-dir' contains a single lock, then creates the next FileHandler
         REUSE, // verifies that zombie lock files can be reused
-        CLEANUP // removes "writable-dir"
+        CLEANUP // removes "writable-lockfile-dir"
     };
 
     public static void main(String... args) throws IOException {
         // we'll base all file creation attempts on the system temp directory,
         // %t
         File writableDir = setup();
-        System.out.println("Writable dir is: "+writableDir.getAbsolutePath());
+        System.out.println("Writable dir is: " + writableDir.getAbsolutePath());
         // we now have one writable directory to work with:
         //    writableDir
         if (args == null || args.length == 0) {
@@ -104,7 +104,7 @@
                 case REUSE: testFileHandlerReuse(writableDir); break;
                 // Removes the writableDir
                 case CLEANUP: delete(writableDir); break;
-                default: throw new RuntimeException("No such test case: "+arg);
+                default: throw new RuntimeException("No such test case: " + arg);
             }
         }
     }
@@ -120,7 +120,7 @@
         // Test 1: make sure we can create/delete files in the writable dir.
         final File file = new File(writableDir, "test.txt");
         if (!createFile(file, false)) {
-            throw new IOException("Can't create "+file+"\n\tUnable to run test");
+            throw new IOException("Can't create " + file + "\n\tUnable to run test");
         } else {
             delete(file);
         }
@@ -159,22 +159,22 @@
     private static void testFileHandlerClose(File writableDir) throws IOException {
         File fakeLock = new File(writableDir, "log.log.lck");
         if (!createFile(fakeLock, false)) {
-            throw new IOException("Can't create fake lock file: "+fakeLock);
+            throw new IOException("Can't create fake lock file: " + fakeLock);
         }
         try {
             List<File> before = listLocks(writableDir, true);
-            System.out.println("before: " +before.size() + " locks found");
+            System.out.println("before: " + before.size() + " locks found");
             FileHandler handler = createFileHandler(writableDir);
-            System.out.println("handler created: "+handler);
+            System.out.println("handler created: " + handler);
             List<File> after = listLocks(writableDir, true);
             System.out.println("after creating handler: " + after.size() + " locks found");
             handler.close();
-            System.out.println("handler closed: "+handler);
+            System.out.println("handler closed: " + handler);
             List<File> afterClose = listLocks(writableDir, true);
             System.out.println("after closing handler: " + afterClose.size() + " locks found");
             afterClose.removeAll(before);
             if (!afterClose.isEmpty()) {
-                throw new RuntimeException("Zombie lock file detected: "+ afterClose);
+                throw new RuntimeException("Zombie lock file detected: " + afterClose);
             }
         } finally {
             if (fakeLock.canRead()) delete(fakeLock);
@@ -186,21 +186,22 @@
 
     private static void testFileHandlerReuse(File writableDir) throws IOException {
         List<File> before = listLocks(writableDir, true);
-        System.out.println("before: " +before.size() + " locks found");
+        System.out.println("before: " + before.size() + " locks found");
         try {
             if (!before.isEmpty()) {
-                throw new RuntimeException("Expected no lock file! Found: "+before);
+                throw new RuntimeException("Expected no lock file! Found: " + before);
             }
         } finally {
             before.stream().forEach(CheckZombieLockTest::delete);
         }
 
         FileHandler handler1 = createFileHandler(writableDir);
-        System.out.println("handler created: "+handler1);
+        System.out.println("handler created: " + handler1);
         List<File> after = listLocks(writableDir, true);
         System.out.println("after creating handler: " + after.size() + " locks found");
         if (after.size() != 1) {
-            throw new RuntimeException("Unexpected number of lock files found for "+handler1+": "+after);
+            throw new RuntimeException("Unexpected number of lock files found for "
+                    + handler1 + ": " + after);
         }
         final File lock = after.get(0);
         after.clear();
@@ -208,33 +209,34 @@
         after = listLocks(writableDir, true);
         System.out.println("after closing handler: " + after.size() + " locks found");
         if (!after.isEmpty()) {
-            throw new RuntimeException("Unexpected number of lock files found for "+handler1+": "+after);
+            throw new RuntimeException("Unexpected number of lock files found for "
+                    + handler1 + ": " + after);
         }
         if (!createFile(lock, false)) {
-            throw new IOException("Can't create fake lock file: "+lock);
+            throw new IOException("Can't create fake lock file: " + lock);
         }
         try {
             before = listLocks(writableDir, true);
-            System.out.println("before: " +before.size() + " locks found");
+            System.out.println("before: " + before.size() + " locks found");
             if (before.size() != 1) {
-                throw new RuntimeException("Unexpected number of lock files found: "+before+" expected ["
-                        +lock+"].");
+                throw new RuntimeException("Unexpected number of lock files found: "
+                        + before + " expected [" + lock + "].");
             }
             FileHandler handler2 = createFileHandler(writableDir);
-            System.out.println("handler created: "+handler2);
+            System.out.println("handler created: " + handler2);
             after = listLocks(writableDir, true);
             System.out.println("after creating handler: " + after.size() + " locks found");
             after.removeAll(before);
             if (!after.isEmpty()) {
-                throw new RuntimeException("Unexpected lock file found: "+after
+                throw new RuntimeException("Unexpected lock file found: " + after
                         + "\n\t" + lock + " should have been reused");
             }
             handler2.close();
-            System.out.println("handler closed: "+handler2);
+            System.out.println("handler closed: " + handler2);
             List<File> afterClose = listLocks(writableDir, true);
             System.out.println("after closing handler: " + afterClose.size() + " locks found");
             if (!afterClose.isEmpty()) {
-                throw new RuntimeException("Zombie lock file detected: "+ afterClose);
+                throw new RuntimeException("Zombie lock file detected: " + afterClose);
             }
 
             if (supportsLocking) {
@@ -243,18 +245,19 @@
                     StandardOpenOption.WRITE);
                 try {
                     if (fc.tryLock() != null) {
-                        System.out.println("locked: "+lock);
+                        System.out.println("locked: " + lock);
                         handler2 = createFileHandler(writableDir);
-                        System.out.println("handler created: "+handler2);
+                        System.out.println("handler created: " + handler2);
                         after = listLocks(writableDir, true);
-                        System.out.println("after creating handler: " + after.size() + " locks found");
+                        System.out.println("after creating handler: " + after.size()
+                                + " locks found");
                         after.removeAll(before);
                         if (after.size() != 1) {
-                            throw new RuntimeException("Unexpected lock files found: "+after
+                            throw new RuntimeException("Unexpected lock files found: " + after
                                 + "\n\t" + lock + " should not have been reused");
                         }
                     } else {
-                        throw new RuntimeException("Failed to lock: "+lock);
+                        throw new RuntimeException("Failed to lock: " + lock);
                     }
                 } finally {
                     delete(lock);
@@ -271,22 +274,23 @@
     private static void testFileHandlerCreate(File writableDir, boolean first)
             throws IOException {
         List<File> before = listLocks(writableDir, true);
-        System.out.println("before: " +before.size() + " locks found");
+        System.out.println("before: " + before.size() + " locks found");
         try {
             if (first && !before.isEmpty()) {
-                throw new RuntimeException("Expected no lock file! Found: "+before);
+                throw new RuntimeException("Expected no lock file! Found: " + before);
             } else if (!first && before.size() != 1) {
-                throw new RuntimeException("Expected a single lock file! Found: "+before);
+                throw new RuntimeException("Expected a single lock file! Found: " + before);
             }
         } finally {
             before.stream().forEach(CheckZombieLockTest::delete);
         }
         FileHandler handler = createFileHandler(writableDir);
-        System.out.println("handler created: "+handler);
+        System.out.println("handler created: " + handler);
         List<File> after = listLocks(writableDir, true);
         System.out.println("after creating handler: " + after.size() + " locks found");
         if (after.size() != 1) {
-            throw new RuntimeException("Unexpected number of lock files found for "+handler+": "+after);
+            throw new RuntimeException("Unexpected number of lock files found for "
+                    + handler + ": " + after);
         }
     }
 
@@ -305,7 +309,7 @@
             tmpDir = System.getProperty("user.home");
         }
         File tmpOrHomeDir = new File(tmpDir);
-        // Create a writable directory here (%t/writable-dir)
+        // Create a writable directory here (%t/writable-lockfile-dir)
         File writableDir = new File(tmpOrHomeDir, WRITABLE_DIR);
         if (!createFile(writableDir, true)) {
             throw new RuntimeException("Test setup failed: unable to create"
@@ -314,9 +318,10 @@
         }
 
         // try to determine whether file locking is supported
+        final String uniqueFileName = UUID.randomUUID().toString()+".lck";
         try {
             FileChannel fc = FileChannel.open(Paths.get(writableDir.getAbsolutePath(),
-                    UUID.randomUUID().toString()+".lck"),
+                    uniqueFileName),
                     StandardOpenOption.CREATE_NEW, StandardOpenOption.APPEND,
                     StandardOpenOption.DELETE_ON_CLOSE);
             try {
@@ -326,9 +331,11 @@
             } finally {
                 fc.close();
             }
-        } catch(Throwable t) {
+        } catch (IOException t) {
             // should not happen
-            t.printStackTrace();
+            System.err.println("Failed to create new file " + uniqueFileName +
+                    " in " + writableDir.getAbsolutePath());
+            throw new RuntimeException("Test setup failed: unable to run test", t);
         }
         return writableDir;
     }
--- a/test/java/util/logging/TestLoggerBundleSync.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/java/util/logging/TestLoggerBundleSync.java	Thu Aug 28 14:54:07 2014 -0700
@@ -58,6 +58,7 @@
  */
 public class TestLoggerBundleSync {
 
+    static final boolean VERBOSE = false;
     static volatile Exception thrown = null;
     static volatile boolean goOn = true;
 
@@ -65,6 +66,7 @@
     static final long TIME = 4 * 1000; // 4 sec.
     static final long STEP = 1 * 1000;  // message every 1 sec.
     static final int  LCOUNT = 50; // change bundle 50 times...
+    static final AtomicLong ignoreLogCount = new AtomicLong(0);
     static final AtomicLong setRBcount = new AtomicLong(0);
     static final AtomicLong setRBNameCount = new AtomicLong(0);
     static final AtomicLong getRBcount = new AtomicLong(0);
@@ -150,6 +152,7 @@
           long sSetRBNameCount  = setRBNameCount.get();
           long sCheckCount = checkCount.get();
           long sNextLong = nextLong.get();
+          long sIgnoreLogCount = ignoreLogCount.get();
           List<Thread> threads = new ArrayList<>();
           for (Class<? extends ResourceBundle> type : classes) {
               threads.add(new SetRB(type));
@@ -181,21 +184,58 @@
                   + " resource bundles set by " + classes.size() + " Thread(s),");
           System.out.println("\t " + (setRBNameCount.get() - sSetRBNameCount)
                   + " resource bundle names set by " + classes.size() + " Thread(s),");
+          System.out.println("\t " + (ignoreLogCount.get() - sIgnoreLogCount)
+                  + " log messages emitted by other GetRB threads were ignored"
+                  + " to ensure MT test consistency,");
           System.out.println("\t ThreadMXBean.findDeadlockedThreads called "
                   + (checkCount.get() -sCheckCount) + " times by 1 Thread.");
 
     }
 
     final static class GetRB extends Thread {
-        final static class MyHandler extends Handler {
+        final class MyHandler extends Handler {
             volatile ResourceBundle rb;
             volatile String rbName;
             volatile int count = 0;
             @Override
             public synchronized void publish(LogRecord record) {
-                count++;
-                rb = record.getResourceBundle();
-                rbName = record.getResourceBundleName();
+                Object[] params = record.getParameters();
+                // Each GetRB thread has its own handler, but since they
+                // log into the same logger, each handler may receive
+                // messages emitted by other threads.
+                // This means that GetRB#2.handler may receive a message
+                // emitted by GetRB#1 at a time where the resource bundle
+                // was still null.
+                // To avoid falling into this trap, the GetRB thread passes
+                // 'this' as argument to the messages it logs - which does
+                // allow us here to ignore messages that where not emitted
+                // by our own GetRB.this thread...
+                if (params.length == 1) {
+                    if (params[0] == GetRB.this) {
+                        // The message was emitted by our thread.
+                        count++;
+                        rb = record.getResourceBundle();
+                        rbName = record.getResourceBundleName();
+                    } else {
+                        // The message was emitted by another thread: just
+                        // ignore it, as it may have been emitted at a time
+                        // where the resource bundle was still null, and
+                        // processing it may overwrite the 'rb' and 'rbName'
+                        // recorded from the message emitted by our own thread.
+                        if (VERBOSE) {
+                            System.out.println("Ignoring message logged by " + params[0]);
+                        }
+                        ignoreLogCount.incrementAndGet();
+                    }
+                } else {
+                    ignoreLogCount.incrementAndGet();
+                    System.err.println("Unexpected message received");
+                }
+            }
+
+            void reset() {
+                rbName = null;
+                rb = null;
             }
 
             @Override
@@ -207,6 +247,7 @@
             }
         };
         final MyHandler handler = new MyHandler();
+
         @Override
         public void run() {
             try {
@@ -234,9 +275,10 @@
                                     + handler.getLevel());
                         }
                         final int countBefore = handler.count;
+                        handler.reset();
                         ll.setLevel(Level.FINEST);
                         ll.addHandler(handler);
-                        ll.fine("dummy");
+                        ll.log(Level.FINE, "dummy {0}", this);
                         ll.removeHandler(handler);
                         final int countAfter = handler.count;
                         if (countBefore == countAfter) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JLayer/8041982/bug8041982.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,97 @@
+/*
+ * 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.
+ */
+
+/* @test
+ * @bug 8041982
+ * @summary Use of animated icon in JLayer causes CPU spin
+ * @author Alexander Potochkin
+ */
+
+import javax.swing.*;
+import javax.swing.plaf.LayerUI;
+import java.awt.*;
+import java.beans.PropertyChangeEvent;
+
+public class bug8041982 extends JFrame {
+
+    public bug8041982() {
+        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        add(new JLayer<>(new JPanel(), new BusyLayer()));
+        setSize(200, 300);
+        setVisible(true);
+    }
+
+    public static void main(String... args) throws Exception {
+        SwingUtilities.invokeLater(new Runnable() {
+            public void run() {
+                new bug8041982().setVisible(true);
+            }
+        });
+        Thread.sleep(5000);
+    }
+
+    private class BusyLayer extends LayerUI<JComponent> {
+        private volatile boolean animated = true;
+        private Icon icon = new ImageIcon(bug8041982.class.getResource("cupanim.gif"));
+        private int imageUpdateCount;
+
+        @Override
+        public void paint(Graphics g, JComponent c) {
+            super.paint(g, c);
+            if (isAnimated()) {
+                icon.paintIcon(c, g, c.getWidth() / 2 - icon.getIconWidth() /
+                        2,
+                        c.getHeight() / 2 - icon.getIconHeight() / 2);
+            }
+        }
+
+        public boolean isAnimated() {
+            return animated;
+        }
+
+        public void setAnimated(boolean animated) {
+            if (this.animated != animated) {
+                this.animated = animated;
+                firePropertyChange("animated", !animated, animated);
+            }
+        }
+
+        @Override
+        public void applyPropertyChange(PropertyChangeEvent evt, JLayer l) {
+            // this will be called when the busy flag is changed
+            l.repaint();
+        }
+
+        @Override
+        public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h, JLayer<? extends JComponent> l) {
+            System.out.println("imageUpdate " + imageUpdateCount);
+            if (imageUpdateCount++ == 100) {
+                setAnimated(false);
+            } else if (imageUpdateCount > 100) {
+                throw new RuntimeException("Test failed");
+            }
+            return isAnimated() && super.imageUpdate(img, infoflags, x, y, w, h, l);
+        }
+    }
+}
+
Binary file test/javax/swing/JLayer/8041982/cupanim.gif has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/JTabbedPane/8017284/bug8017284.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,81 @@
+/*
+ * 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.awt.BorderLayout;
+import java.awt.Toolkit;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JTabbedPane;
+import javax.swing.SwingUtilities;
+import javax.swing.plaf.metal.MetalLookAndFeel;
+import sun.awt.SunToolkit;
+
+/**
+ * @test
+ * @bug 8017284
+ * @author Alexander Scherbatiy
+ * @summary  Aqua LaF: memory leak when HTML is used for JTabbedPane tab titles
+ * @run main/othervm/timeout=60 -Xmx128m bug8017284
+ */
+public class bug8017284 {
+
+    private static final int TAB_COUNT = 100;
+    private static final int ITERATIONS = 100;
+    private static JFrame frame;
+    private static JTabbedPane tabbedPane;
+
+    public static void main(String[] args) throws Exception {
+
+        SwingUtilities.invokeAndWait(() -> {
+            frame = new JFrame();
+            frame.setSize(500, 500);
+            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+
+            tabbedPane = new JTabbedPane();
+
+            for (int i = 0; i < TAB_COUNT; i++) {
+                tabbedPane.add("Header " + i, new JLabel("Content: " + i));
+            }
+
+            frame.getContentPane().setLayout(new BorderLayout());
+            frame.getContentPane().add(tabbedPane, BorderLayout.CENTER);
+            frame.setVisible(true);
+        });
+
+        ((SunToolkit) Toolkit.getDefaultToolkit()).realSync();
+
+        SwingUtilities.invokeAndWait(() -> {
+            for (int j = 0; j < ITERATIONS; j++) {
+                for (int i = 0; i < TAB_COUNT; i++) {
+                    tabbedPane.setTitleAt(i, getHtmlText(j * TAB_COUNT + i));
+                }
+            }
+        });
+        ((SunToolkit) Toolkit.getDefaultToolkit()).realSync();
+
+        SwingUtilities.invokeAndWait(() -> frame.dispose());
+    }
+
+    private static String getHtmlText(int i) {
+        return "<html><b><i>" + i + "</b></i>";
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/SwingUtilities/8049533/bug8049533.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,57 @@
+/*
+ * 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.awt.Frame;
+import java.awt.Panel;
+import java.awt.event.MouseWheelEvent;
+import javax.swing.SwingUtilities;
+
+/**
+ * @test
+ * @bug 8049533
+ * @summary SwingUtilities.convertMouseEvent misses
+ *      MouseWheelEvent.preciseWheelRotation
+ * @run main bug8049533
+ */
+public class bug8049533 {
+
+    private static final double PRECISE_WHEEL_ROTATION = 3.14;
+
+    public static void main(String[] args) {
+        Frame frame = new Frame();
+        Panel panel = new Panel();
+        frame.add(panel);
+
+        MouseWheelEvent event = new MouseWheelEvent(panel,
+                0, 0, 0, 0, 0, 0, 0, 0, false, 0, 0,
+                2, // wheelRotation
+                PRECISE_WHEEL_ROTATION); // preciseWheelRotation
+
+        MouseWheelEvent convertedEvent = (MouseWheelEvent) SwingUtilities.
+                convertMouseEvent(event.getComponent(), event, null);
+
+        if (convertedEvent.getPreciseWheelRotation() != PRECISE_WHEEL_ROTATION) {
+            throw new RuntimeException("PreciseWheelRotation field is not copied!");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/reliability/GUIUndFrame.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2004, 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 javax.swing.*;
+import java.awt.*;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+/*
+ * @author Aruna Samji
+ */
+
+public class GUIUndFrame extends Frame {
+
+    JFrame jframe1, jframe2, jframe3;
+    Component comp;
+    JButton jbutton1, jbutton2, jbutton3, jbutton4;
+    JTextArea jtextarea;
+
+    volatile boolean win_act, win_deact, win_ico, win_deico, win_close;
+
+    public GUIUndFrame() {
+        //GUI for UndJFrameProperties
+        jframe1 = new JFrame();
+        jframe1.getContentPane().setLayout(new FlowLayout());
+        jframe1.setSize(500,255);
+        jframe1.setUndecorated(true);
+        jframe1.getContentPane().setBackground(Color.red);
+
+        jframe1.addWindowListener( new WindowAdapter() {
+            public void windowActivated(WindowEvent e){
+                comp = null;
+                comp = e.getComponent();
+                if (e.getComponent() == jframe1)
+                    win_act = true;
+            }
+
+            public void windowDeactivated(WindowEvent e){
+                win_deact = true;
+            }
+        });
+
+
+        jbutton1 = new JButton("Hide me");
+        jbutton1.addActionListener(e -> jframe1.setVisible(false));
+
+
+        //Create a normal decorated frame to test all the relevant assertions
+        jframe2 = new JFrame();
+        jframe2.getContentPane().setLayout(new FlowLayout());
+        jframe2.setLocation(0,270);
+        jframe2.setSize(500,255);
+        jframe2.getContentPane().setBackground(Color.blue);
+        jbutton2 = new JButton("Show hiddenJFrame");
+        jbutton2.addActionListener(e -> jframe1.setVisible(true));
+
+
+        //GUI for UndFrameIconifyRepaint
+        jframe3 = new JFrame();
+        jframe3.getContentPane().setLayout(new FlowLayout());
+        jframe3.setSize(500,255);
+        jframe3.getContentPane().setBackground(Color.green);
+        jframe3.setUndecorated(true);
+        jframe3.addWindowListener( new WindowAdapter() {
+            public void windowActivated(WindowEvent e) {
+                comp = null;
+                comp = e.getComponent();
+                if(e.getComponent() == jframe3){
+                    win_act=true;
+
+                }
+            }
+            public void windowIconified(WindowEvent e){ win_ico = true; }
+            public void windowDeiconified(WindowEvent e){ win_deico = true; }
+            public void windowDeactivated(WindowEvent e){ win_deact = true; }
+            public void windowClosed(WindowEvent e){ win_close = true; }
+        });
+
+        jbutton3 = new JButton("Minimize me");
+        jbutton3.addActionListener(e -> jframe3.setState(Frame.ICONIFIED));
+        jbutton4 = new JButton("Maximize me");
+        jbutton4.addActionListener(e -> {
+            if (Toolkit.getDefaultToolkit().isFrameStateSupported
+                    (Frame.MAXIMIZED_BOTH)) {
+                jframe3.setExtendedState(Frame.MAXIMIZED_BOTH);
+            }
+        });
+
+        jtextarea = new JTextArea("Textarea");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/reliability/GUIZoomFrame.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2004, 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 javax.swing.*;
+import java.awt.*;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+
+/*
+ * @author Aruna Samji
+ */
+
+public class GUIZoomFrame extends Frame {
+
+    JFrame jframe1, jframe2;
+    JButton jbutton;
+    JTextArea jtextarea;
+    volatile boolean maxHor, maxVer, maxBoth, normal, iconify;
+
+    public GUIZoomFrame() {
+        //GUI for ZoomJFrameChangeState
+        jframe1 = new JFrame("ZoomJFrameChangeState");
+        jframe1.getContentPane().setBackground(Color.red);
+        jframe1.getContentPane().setLayout(null);
+        jframe1.setSize(500,270);
+
+        //GUI for ZoomJFrameRepaint
+        jframe2 = new JFrame("ZoomJFrameRepaint");
+        jframe2.getContentPane().setBackground(Color.red);
+        jframe2.setSize(500, 270);
+        jframe2.getContentPane().setLayout(null);
+        jbutton = new JButton("TestButton");
+        jtextarea = new JTextArea("TextArea");
+        jbutton.setBounds(20, 100, 80, 60);
+        jtextarea.setBounds(120, 100, 80, 60);
+
+        //Listeners for ZoomJFrameChangeState
+        jframe1.addWindowStateListener(new WindowAdapter() {
+            public void windowStateChanged(WindowEvent e) {
+                if (e.getNewState() == Frame.MAXIMIZED_BOTH)
+                    maxBoth = true;
+
+                if (e.getNewState() == Frame.NORMAL)
+                    normal = true;
+
+                if (e.getNewState() == Frame.ICONIFIED)
+                    iconify = true;
+
+                if (e.getNewState() == Frame.MAXIMIZED_HORIZ)
+                    maxHor = true;
+
+                if (e.getNewState() == Frame.MAXIMIZED_VERT)
+                    maxVer = true;
+            }
+        });
+
+        //Listeners for ZoomJFrameRepaint
+        jframe2.addWindowStateListener( new WindowAdapter() {
+            public void windowStateChanged(WindowEvent e) {
+                if (e.getNewState() == Frame.MAXIMIZED_BOTH)
+                    maxBoth = true;
+
+                if (e.getNewState() == Frame.NORMAL)
+                    normal = true;
+            }
+        });
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/reliability/Task.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2004, 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 javax.swing.*;
+import java.awt.*;
+
+/*
+ * @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
+ */
+
+public abstract class Task <T extends Frame> {
+
+    protected T gui;
+    protected ExtendedRobot robot;
+
+    public Task(Class guiClass, ExtendedRobot robot) throws Exception {
+        this.robot = robot;
+        SwingUtilities.invokeAndWait( () -> {
+            try {
+                this.gui = (T) guiClass.getConstructor().newInstance();
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+        });
+
+        robot.waitForIdle(1000);
+    }
+
+    public abstract void task() throws Exception;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/reliability/TaskUndJFrameProperties.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2004, 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 javax.swing.*;
+import java.awt.*;
+
+/*
+ * @test
+ * @summary Construct a Undecorated JFrame, try to change the properties
+ *          using setVisible() method.
+ * @author Aruna Samji
+ * @library ../../../lib/testlibrary
+ * @build ExtendedRobot
+ * @run main TaskUndJFrameProperties
+ */
+
+public class TaskUndJFrameProperties extends Task<GUIUndFrame> {
+
+    public static void main (String[] args) throws Exception {
+        new TaskUndJFrameProperties(GUIUndFrame.class, new ExtendedRobot()).task();
+    }
+
+    TaskUndJFrameProperties(Class guiClass, ExtendedRobot robot) throws Exception {
+        super(guiClass, robot);
+    }
+
+    public void task() throws Exception {
+        SwingUtilities.invokeAndWait(() -> {
+            gui.jframe2.setVisible(true);
+            gui.jframe1.setVisible(true);
+
+            gui.jframe1.getContentPane().removeAll();
+            gui.jframe2.getContentPane().removeAll();
+            gui.jframe1.getContentPane().add(gui.jbutton1);
+            gui.jframe2.getContentPane().add(gui.jbutton2);
+            gui.jframe1.revalidate();
+            gui.jframe2.revalidate();
+        });
+        robot.waitForIdle(1000);
+
+        Point button1Origin = gui.jbutton1.getLocationOnScreen();
+        Point button1Center = gui.jbutton1.getLocationOnScreen();
+        button1Center.translate(gui.jbutton1.getWidth()/2, gui.jbutton1.getHeight()/2);
+        Point button2Origin = gui.jbutton2.getLocationOnScreen();
+        Point button2Center = gui.jbutton2.getLocationOnScreen();
+        button2Center.translate(gui.jbutton2.getWidth()/2, gui.jbutton2.getHeight()/2);
+
+        robot.glide(button1Origin, button1Center);
+        robot.waitForIdle(1000);
+        robot.click();
+        //After Hide
+        if (gui.win_deact == false)
+            throw new RuntimeException("Undecorated JFrame has not triggered " +
+                    "WINDOW_DEACTIVATED event when in Hide state\n");
+
+        if (gui.jframe1.hasFocus() == true)
+            throw new RuntimeException("Undecorated Frame Still has Focus even " +
+                    "when in Hide state\n");
+
+        //click on the jbutton2 in jframe2
+        SwingUtilities.invokeAndWait(gui.jframe2::toFront);
+        robot.waitForIdle(1000);
+        robot.glide(button2Origin, button2Center);
+        robot.waitForIdle(1000);
+        robot.click();
+        //After Show
+        if (gui.win_act == false)
+            throw new RuntimeException("Undecorated Frame can't trigger " +
+                    "WINDOW_ACTIVATED when visible\n");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/reliability/TaskZoomJFrameChangeState.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 2004, 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 javax.swing.*;
+import java.awt.*;
+
+/*
+ * @test
+ * @summary Construct a JFrame, zoom it from the normal state and back forth
+ *          using Frame.ZOOMED and Frame.NORMAL. Iconofy from the zoomed
+ *          state and back forth using Frame.ICONIFIED and Frame.NORMAL and
+ *          check the zoomed size is same as the screen size. Check the
+ *          location of the jframe after restoration from zoom or icon.
+ * @author Aruna Samji
+ * @library ../../../lib/testlibrary
+ * @build ExtendedRobot
+ * @run main TaskZoomJFrameChangeState
+ */
+
+public class TaskZoomJFrameChangeState extends Task<GUIZoomFrame> {
+
+    public static void main (String[] args) throws Exception {
+        new TaskZoomJFrameChangeState(GUIZoomFrame.class, new ExtendedRobot()).task();
+    }
+
+    TaskZoomJFrameChangeState(Class guiClass, ExtendedRobot robot) throws Exception {
+         super(guiClass, robot);
+    }
+
+    public void task() throws Exception {
+        SwingUtilities.invokeAndWait(() -> {
+            gui.jframe1.setVisible(true);
+            gui.jframe1.getContentPane().removeAll();
+            if (gui.jframe1.getExtendedState() != Frame.NORMAL)
+                gui.jframe1.setExtendedState(Frame.NORMAL);
+        });
+        robot.waitForIdle(1000);
+
+        Point frameOrigin = gui.jframe1.getLocationOnScreen();
+        SwingUtilities.invokeAndWait(() ->
+            gui.jframe1.setExtendedState(Frame.ICONIFIED)
+        );
+        robot.waitForIdle(1000);
+
+        //To check whether the bitwise mask for ICONIFIED state is set
+        if (gui.jframe1.getExtendedState() != Frame.ICONIFIED)
+            throw new RuntimeException("The bitwise mask Frame.ICONIFIED is " +
+                    "not set when the frame is in ICONIFIED state");
+
+        //To check whether the Frame is iconified programmatically
+        if (!gui.iconify)
+            throw new RuntimeException("Frame is not Iconified");
+
+        //Normalising the Frame.
+        SwingUtilities.invokeAndWait(() ->
+            gui.jframe1.setExtendedState(Frame.NORMAL)
+        );
+        robot.waitForIdle(1000);
+
+        //To check whether the bitwise mask for NORMAL state is set
+        if (gui.jframe1.getExtendedState() != Frame.NORMAL)
+            throw new RuntimeException("The bitwise mask Frame.NORMAL is " +
+                    "not set when the frame is in NORMAL state");
+
+        //To check whether the Frame is normalised programmatically
+        if (!gui.normal)
+            throw new RuntimeException("Frame is not restored to normal");
+
+        Point newposition = gui.jframe1.getLocationOnScreen();
+
+        if ((frameOrigin.x != newposition.x) & (frameOrigin.y != newposition.y))
+            throw new RuntimeException("The frame is not positioned back to " +
+                    "the original place  on the screen after iconified");
+
+        robot.waitForIdle(1000);
+
+        //To check whether the state is supported in the platform
+        if (Toolkit.getDefaultToolkit().isFrameStateSupported(Frame.MAXIMIZED_HORIZ)) {
+            //Maximising the Frame horizontally
+            SwingUtilities.invokeAndWait(() ->
+                gui.jframe1.setExtendedState(Frame.MAXIMIZED_HORIZ)
+            );
+            robot.waitForIdle(1000);
+
+            //To check whether the bitwise mask for MAXIMIZED_HORIZ state is set
+            if (gui.jframe1.getExtendedState() != Frame.MAXIMIZED_HORIZ)
+                throw new RuntimeException("The bitwise mask Frame.MAXIMIZED_HOR " +
+                        "is not set when the frame is in MAXIMIZED_HOR state");
+
+            //To check whether the Frame is maximized horizontally
+            if (!gui.maxHor)
+                throw new RuntimeException("Frame is not maximized horizontally");
+
+            SwingUtilities.invokeAndWait(() ->
+                gui.jframe1.setExtendedState(Frame.NORMAL)
+            );
+            robot.waitForIdle(1000);
+        }
+
+        //To check whether the state is supported in the platform
+        if (Toolkit.getDefaultToolkit().isFrameStateSupported(Frame.MAXIMIZED_VERT)) {
+            //Maximising the Frame vertically
+            SwingUtilities.invokeAndWait(() ->
+                gui.jframe1.setExtendedState(Frame.MAXIMIZED_VERT)
+            );
+            robot.waitForIdle(1000);
+
+            //To check whether the bitwise mask for MAXIMIZED_VERT state is set
+            if (gui.jframe1.getExtendedState() != Frame.MAXIMIZED_VERT)
+                throw new RuntimeException("The bitwise mask Frame.MAXIMIZED_VERT " +
+                        "is not set when the frame is in MAXIMIZED_VERT state");
+
+            //To check whether the Frame is maximized vertically
+            if (!gui.maxVer)
+                throw new RuntimeException("Frame is not maximized vertically");
+
+            SwingUtilities.invokeAndWait(() ->
+                gui.jframe1.setExtendedState(Frame.NORMAL)
+            );
+            robot.waitForIdle(1000);
+        }
+
+        if (Toolkit.getDefaultToolkit().isFrameStateSupported
+                (Frame.MAXIMIZED_BOTH)){
+            //Maximising the Frame fully
+            SwingUtilities.invokeAndWait(() ->
+                gui.jframe1.setExtendedState(Frame.MAXIMIZED_BOTH)
+            );
+        }
+        robot.waitForIdle(1000);
+
+        //To check whether the state is supported in the platform
+        if (Toolkit.getDefaultToolkit().isFrameStateSupported(Frame.MAXIMIZED_BOTH)) {
+            //To check whether the bitwise mask for MAXIMIZED_BOTH state is set
+            if (gui.jframe1.getExtendedState() != Frame.MAXIMIZED_BOTH)
+                throw new RuntimeException("The bitwise mask Frame.MAXIMIZED_BOTH " +
+                        "is not set when the frame is in MAXIMIZED_BOTH state");
+
+            //To check whether the Frame is maximized fully
+            if (!gui.maxBoth)
+                throw new RuntimeException("Frame is not maximized fully");
+        }
+
+        //Normalising the Frame
+        SwingUtilities.invokeAndWait(() ->
+            gui.jframe1.setExtendedState(Frame.NORMAL)
+        );
+        robot.waitForIdle(1000);
+
+        //To check whether the bitwise mask for NORMAL state is set
+        if (gui.jframe1.getExtendedState() != Frame.NORMAL)
+            throw new RuntimeException("The bitwise mask Frame.NORMAL is not " +
+                    "set when the frame is in NORMAL state after Zoomed");
+
+        //To check whether the Frame is normalised programmatically
+        if (!gui.normal)
+            throw new RuntimeException("Frame is not restored to normal after Zoomed");
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/javax/swing/reliability/TaskZoomJFrameRepaint.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2004, 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 javax.swing.*;
+import java.awt.*;
+
+/*
+ * @test
+ * @summary Construct a jframe with some components and zoom the frame and bring it back to normal state.
+ * @author Aruna Samji
+ * @library ../../../lib/testlibrary
+ * @build ExtendedRobot
+ * @run main TaskZoomJFrameRepaint
+ */
+
+public class TaskZoomJFrameRepaint extends Task<GUIZoomFrame> {
+
+    public static void main (String[] args) throws Exception {
+        new TaskZoomJFrameRepaint(GUIZoomFrame.class, new ExtendedRobot()).task();
+    }
+
+    TaskZoomJFrameRepaint(Class guiClass, ExtendedRobot robot) throws Exception {
+         super(guiClass, robot);
+    }
+
+    public void task() throws Exception {
+        SwingUtilities.invokeAndWait(() -> {
+            gui.jframe2.setVisible(true);
+            gui.jframe2.getContentPane().removeAll();
+            gui.jframe2.getContentPane().add(gui.jbutton);
+            gui.jframe2.getContentPane().add(gui.jtextarea);
+            if (gui.jframe2.getExtendedState() != Frame.NORMAL)
+                gui.jframe2.setExtendedState(Frame.NORMAL);
+        });
+        robot.waitForIdle(1000);
+
+        Point buttonOrigin, newbuttonOrigin,  newbuttonCenter;
+        Point textareaOrigin, newtextareaOrigin,  newtextareaCenter ;
+
+        //to find the lenght and width of the component originally
+        buttonOrigin = gui.jbutton.getLocationOnScreen();
+        textareaOrigin = gui.jtextarea.getLocationOnScreen();
+
+        if (Toolkit.getDefaultToolkit().isFrameStateSupported(
+            Frame.MAXIMIZED_BOTH)){
+            //Maximising the Frame fully
+            SwingUtilities.invokeAndWait(() ->
+                gui.jframe2.setExtendedState(Frame.MAXIMIZED_BOTH)
+            );
+            robot.waitForIdle(1000);
+
+            //To check whether the bitwise mask for MAXIMIZED_BOTH state is set
+            if (gui.jframe2.getExtendedState() != Frame.MAXIMIZED_BOTH)
+                throw new RuntimeException("The bitwise mask Frame.MAXIMIZED_BOTH " +
+                        "is not set when the frame is in MAXIMIZED_BOTH state");
+
+            //To check whether the Frame is maximized fully
+            if (gui.maxBoth == false)
+                throw new RuntimeException("Frame is not maximized fully");
+        }
+
+        //Normalising the Frame....
+        SwingUtilities.invokeAndWait(() ->
+            gui.jframe2.setExtendedState(Frame.NORMAL)
+        );
+        robot.waitForIdle(1000);
+
+        //To check whether the bitwise mask for NORMAL state is set
+        if (gui.jframe2.getExtendedState() != Frame.NORMAL)
+            throw new RuntimeException("The bitwise mask Frame.NORMAL is not " +
+                    "set when the frame is in NORMAL state");
+
+        //To check whether the Frame is normalised programmatically
+        if (! gui.normal)
+            throw new RuntimeException("Frame is not restored to normal");
+
+        //to find the lenght and width of the component after zommed and back to normal
+        newbuttonOrigin = gui.jbutton.getLocationOnScreen();
+        newtextareaOrigin = gui.jtextarea.getLocationOnScreen();
+        newbuttonCenter = gui.jbutton.getLocationOnScreen();
+        newbuttonCenter.translate(gui.jbutton.getWidth()/2, gui.jbutton.getHeight()/2);
+        newtextareaCenter = gui.jtextarea.getLocationOnScreen();
+        newtextareaCenter.translate(gui.jtextarea.getWidth()/2, gui.jtextarea.getHeight()/2);
+
+        if((buttonOrigin.x != newbuttonOrigin.x) & (buttonOrigin.y != newbuttonOrigin.y))
+            throw new RuntimeException("The button is not positioned back " +
+                    "to the original place  on the screen after iconified");
+
+        if((textareaOrigin.x != newtextareaOrigin.x) & (textareaOrigin.y != newtextareaOrigin.y))
+            throw new RuntimeException("The TextArea is not positioned back " +
+                    "to the original place  on the screen after iconified");
+    }
+}
--- a/test/lib/testlibrary/jdk/testlibrary/Utils.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/lib/testlibrary/jdk/testlibrary/Utils.java	Thu Aug 28 14:54:07 2014 -0700
@@ -126,7 +126,10 @@
      * GC specified by the framework must first be removed.
      * @return A copy of given opts with all GC options removed.
      */
-    private static final Pattern useGcPattern = Pattern.compile("\\-XX\\:[\\+\\-]Use.+GC");
+    private static final Pattern useGcPattern = Pattern.compile(
+            "(?:\\-XX\\:[\\+\\-]Use.+GC)"
+            + "|(?:\\-Xconcgc)"
+            + "|(?:\\-Xincgc)");
     public static List<String> removeGcOpts(List<String> opts) {
         List<String> optsWithoutGC = new ArrayList<String>();
         for (String opt : opts) {
--- a/test/sun/jvmstat/monitor/MonitoredVm/MonitorVmStartTerminate.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/sun/jvmstat/monitor/MonitoredVm/MonitorVmStartTerminate.java	Thu Aug 28 14:54:07 2014 -0700
@@ -73,7 +73,6 @@
 public final class MonitorVmStartTerminate {
 
     private static final int PROCESS_COUNT = 10;
-    private static final long PROCESS_TIMEOUT_IN_NS = 1000*1000_000_000L;
 
     public static void main(String... args) throws Exception {
 
@@ -223,13 +222,12 @@
 
         private static void createFile(Path path) throws IOException {
             Files.write(path, new byte[0], StandardOpenOption.CREATE);
-            if (!Files.exists(path)) {
-                throw new Error("Newly created file " + path
-                        + " does not exist!");
-            }
         }
 
         private static void waitForRemoval(Path path) {
+            String timeoutFactorText = System.getProperty("test.timeout.factor", "1.0");
+            double timeoutFactor = Double.parseDouble(timeoutFactorText);
+            long timeoutNanos = 1000_000_000L*(long)(1000*timeoutFactor);
             long start = System.nanoTime();
             while (true) {
                 long now = System.nanoTime();
@@ -238,10 +236,10 @@
                 if (!Files.exists(path)) {
                     return;
                 }
-                if (waited > PROCESS_TIMEOUT_IN_NS) {
+                if (waited > timeoutNanos) {
                     System.out.println("Start: " + start);
                     System.out.println("Now: " + now);
-                    System.out.print("Process timed out after " + waited + " ns. Abort.");
+                    System.out.println("Process timed out after " + waited + " ns. Abort.");
                     System.exit(1);
                 }
                 takeNap();
@@ -293,7 +291,14 @@
         public void terminate() {
             try {
                 System.out.println("Terminating " + mainArgsIdentifier);
-                Files.delete(Paths.get(mainArgsIdentifier));
+                // File must be created before proceeding,
+                // otherwise Java process may loop forever
+                // waiting for file to be removed.
+                Path path = Paths.get(mainArgsIdentifier);
+                while (!Files.exists(path)) {
+                    takeNap();
+                }
+                Files.delete(path);
             } catch (IOException e) {
                 e.printStackTrace();
             }
@@ -303,10 +308,11 @@
         private void executeJava() throws Exception, IOException {
             String className = JavaProcess.class.getName();
             String classPath = System.getProperty("test.classes");
-            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-cp",
-                    classPath, className, mainArgsIdentifier);
+            ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+                "-Dtest.timeout.factor=" + System.getProperty("test.timeout.factor", "1.0"),
+                "-cp", classPath, className, mainArgsIdentifier);
             OutputBuffer ob = ProcessTools.getOutput(pb.start());
-            System.out.println("Java Process " + getMainArgsIdentifier() + " stder:"
+            System.out.println("Java Process " + getMainArgsIdentifier() + " stderr:"
                     + ob.getStderr());
             System.err.println("Java Process " + getMainArgsIdentifier() + " stdout:"
                     + ob.getStdout());
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/security/krb5/ccache/DefaultFile.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8054817
+ * @summary File ccache only recognizes Linux and Solaris defaults
+ */
+
+import sun.security.krb5.internal.ccache.FileCredentialsCache;
+
+public class DefaultFile {
+    public static void main(String[] args) throws Exception {
+        // There are 2 cases where default ccache name is not
+        // /tmp/krb5cc_uid.
+        if (System.getenv("KRB5CCNAME") != null) {
+            return;
+        }
+        if (System.getProperty("os.name").startsWith("Windows")) {
+            return;
+        }
+        String name = FileCredentialsCache.getDefaultCacheName();
+        if (!name.startsWith("/tmp/krb5cc_")) {
+            throw new Exception("default name is " + name);
+        }
+    }
+}
--- a/test/sun/security/smartcardio/TestAll.java	Thu Aug 21 14:16:26 2014 -0700
+++ b/test/sun/security/smartcardio/TestAll.java	Thu Aug 28 14:54:07 2014 -0700
@@ -40,6 +40,7 @@
         TestMultiplePresent.class,
         TestPresent.class,
         TestTransmit.class,
+        TestDirect.class,
     };
 
     public static void main(String[] args) throws Exception {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/security/smartcardio/TestDirect.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * 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.
+ */
+
+/**
+ * @test
+ * @bug 8046343
+ * @summary Make sure that direct protocol is available
+ * @run main/manual TestDirect
+ */
+
+// This test requires special hardware.
+
+import javax.smartcardio.Card;
+import javax.smartcardio.CardTerminal;
+import javax.smartcardio.CardTerminals;
+import javax.smartcardio.TerminalFactory;
+
+public class TestDirect {
+    public static void main(String[] args) throws Exception {
+        TerminalFactory terminalFactory = TerminalFactory.getDefault();
+        CardTerminals cardTerminals = terminalFactory.terminals();
+        CardTerminal cardTerminal = cardTerminals.list().get(0);
+        Card card = cardTerminal.connect("DIRECT");
+        card.disconnect(true);
+
+        System.out.println("OK.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/jps/JpsBase.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,144 @@
+/*
+ * 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.File;
+import java.net.URL;
+import java.util.List;
+
+import jdk.testlibrary.OutputAnalyzer;
+import jdk.testlibrary.ProcessTools;
+
+/**
+ * The base class for testing the jps utility.
+ * The test sequence is to start jps with different combinations of arguments
+ * and verify the output contains proper values.
+ */
+public final class JpsBase {
+
+    private static final String shortProcessName;
+    private static final String fullProcessName;
+
+    /**
+     * The jps output should contain processes' names
+     * (except when jps is started in quite mode).
+     * The expected name of the test process is prepared here.
+     */
+    static {
+        URL url = JpsBase.class.getResource("JpsBase.class");
+        boolean isJar = url.getProtocol().equals("jar");
+
+        if (isJar) {
+            shortProcessName = JpsBase.class.getSimpleName() + ".jar";
+            String urlPath = url.getPath();
+            File jar = new File(urlPath.substring(urlPath.indexOf("file:") + 5, urlPath.indexOf("jar!") + 3));
+            fullProcessName = jar.getAbsolutePath();
+        } else {
+            shortProcessName = JpsBase.class.getSimpleName();
+            fullProcessName = JpsBase.class.getName();
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        int pid = ProcessTools.getProcessId();
+
+        List<List<JpsHelper.JpsArg>> combinations = JpsHelper.JpsArg.generateCombinations();
+        for (List<JpsHelper.JpsArg> combination : combinations) {
+            OutputAnalyzer output = JpsHelper.jps(JpsHelper.JpsArg.asCmdArray(combination));
+            output.shouldHaveExitValue(0);
+
+            boolean isQuiet = false;
+            boolean isFull = false;
+            String pattern;
+            for (JpsHelper.JpsArg jpsArg : combination) {
+                switch (jpsArg) {
+                case q:
+                    // If '-q' is specified output should contain only a list of local VM identifiers:
+                    // 30673
+                    isQuiet = true;
+                    JpsHelper.verifyJpsOutput(output, "^\\d+$");
+                    output.shouldContain(Integer.toString(pid));
+                    break;
+                case l:
+                    // If '-l' is specified output should contain the full package name for the application's main class
+                    // or the full path name to the application's JAR file:
+                    // 30673 /tmp/jtreg/jtreg-workdir/scratch/JpsBase.jar ...
+                    isFull = true;
+                    pattern = "^" + pid + "\\s+" + replaceSpecialChars(fullProcessName) + ".*";
+                    output.shouldMatch(pattern);
+                    break;
+                case m:
+                    // If '-m' is specified output should contain the arguments passed to the main method:
+                    // 30673 JpsBase monkey ...
+                    for (String arg : args) {
+                        pattern = "^" + pid + ".*" + replaceSpecialChars(arg) + ".*";
+                        output.shouldMatch(pattern);
+                    }
+                    break;
+                case v:
+                    // If '-v' is specified output should contain VM arguments:
+                    // 30673 JpsBase -Xmx512m -XX:+UseParallelGC -XX:Flags=/tmp/jtreg/jtreg-workdir/scratch/vmflags ...
+                    for (String vmArg : JpsHelper.getVmArgs()) {
+                        pattern = "^" + pid + ".*" + replaceSpecialChars(vmArg) + ".*";
+                        output.shouldMatch(pattern);
+                    }
+                    break;
+                case V:
+                    // If '-V' is specified output should contain VM flags:
+                    // 30673 JpsBase +DisableExplicitGC ...
+                    pattern = "^" + pid + ".*" + replaceSpecialChars(JpsHelper.VM_FLAG) + ".*";
+                    output.shouldMatch(pattern);
+                    break;
+                }
+
+                if (isQuiet) {
+                    break;
+                }
+            }
+
+            if (!isQuiet) {
+                // Verify output line by line.
+                // Output should only contain lines with pids after the first line with pid.
+                JpsHelper.verifyJpsOutput(output, "^\\d+\\s+.*");
+                if (!isFull) {
+                    pattern = "^" + pid + "\\s+" + replaceSpecialChars(shortProcessName);
+                    if (combination.isEmpty()) {
+                        // If no arguments are specified output should only contain
+                        // pid and process name
+                        pattern += "$";
+                    } else {
+                        pattern += ".*";
+                    }
+                    output.shouldMatch(pattern);
+                }
+            }
+        }
+    }
+
+    private static String replaceSpecialChars(String str) {
+        String tmp = str.replace("\\", "\\\\");
+        tmp = tmp.replace("+", "\\+");
+        tmp = tmp.replace(".", "\\.");
+        return tmp;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/jps/JpsHelper.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,238 @@
+/*
+ * 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 static jdk.testlibrary.Asserts.assertGreaterThan;
+import static jdk.testlibrary.Asserts.assertTrue;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import jdk.testlibrary.Asserts;
+import jdk.testlibrary.JDKToolLauncher;
+import jdk.testlibrary.OutputAnalyzer;
+import jdk.testlibrary.Utils;
+
+/**
+ * The helper class for running jps utility and verifying output from it
+ */
+public final class JpsHelper {
+
+    /**
+     * Helper class for handling jps arguments
+     */
+    public enum JpsArg {
+        q,
+        l,
+        m,
+        v,
+        V;
+
+        /**
+         * Generate all possible combinations of {@link JpsArg}
+         * (31 argument combinations and no arguments case)
+         */
+        public static List<List<JpsArg>> generateCombinations() {
+            final int argCount = JpsArg.values().length;
+            // If there are more than 30 args this algorithm will overflow.
+            Asserts.assertLessThan(argCount, 31, "Too many args");
+
+            List<List<JpsArg>> combinations = new ArrayList<>();
+            int combinationCount = (int) Math.pow(2, argCount);
+            for (int currCombo = 0; currCombo < combinationCount; ++currCombo) {
+                List<JpsArg> combination = new ArrayList<>();
+                for (int position = 0; position < argCount; ++position) {
+                    int bit = 1 << position;
+                    if ((bit & currCombo) != 0) {
+                        combination.add(JpsArg.values()[position]);
+                    }
+                }
+                combinations.add(combination);
+            }
+            return combinations;
+        }
+
+        /**
+         *  Return combination of {@link JpsArg} as a String array
+         */
+        public static String[] asCmdArray(List<JpsArg> jpsArgs) {
+            List<String> list = new ArrayList<>();
+            for (JpsArg jpsArg : jpsArgs) {
+                list.add("-" + jpsArg.toString());
+            }
+            return list.toArray(new String[list.size()]);
+        }
+
+    }
+
+    /**
+     * VM arguments to start test application with
+     */
+    public static final String[] VM_ARGS = {"-Xmx512m", "-XX:+UseParallelGC"};
+    /**
+     * VM flag to start test application with
+     */
+    public static final String VM_FLAG = "+DisableExplicitGC";
+
+    private static File vmFlagsFile = null;
+    private static List<String> testVmArgs = null;
+    private static File manifestFile = null;
+
+    /**
+     * Create a file containing VM_FLAG in the working directory
+     */
+    public static File getVmFlagsFile() throws IOException {
+        if (vmFlagsFile == null) {
+            vmFlagsFile = new File("vmflags");
+            try (BufferedWriter output = new BufferedWriter(new FileWriter(vmFlagsFile))) {
+                output.write(VM_FLAG);
+            }
+            vmFlagsFile.deleteOnExit();
+        }
+        return vmFlagsFile;
+    }
+
+    /**
+     * Return a list of VM arguments
+     */
+    public static List<String> getVmArgs() throws IOException {
+        if (testVmArgs == null) {
+            testVmArgs = new ArrayList<>();
+            testVmArgs.addAll(Arrays.asList(VM_ARGS));
+            testVmArgs.add("-XX:Flags=" + getVmFlagsFile().getAbsolutePath());
+        }
+        return testVmArgs;
+    }
+
+    /**
+     * Start jps utility without any arguments
+     */
+    public static OutputAnalyzer jps() throws Exception {
+        return jps(null, null);
+    }
+
+    /**
+     * Start jps utility with tool arguments
+     */
+    public static OutputAnalyzer jps(String... toolArgs) throws Exception {
+        return jps(null, Arrays.asList(toolArgs));
+    }
+
+    /**
+     * Start jps utility with VM args and tool arguments
+     */
+    public static OutputAnalyzer jps(List<String> vmArgs, List<String> toolArgs) throws Exception {
+        JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jps");
+        if (vmArgs != null) {
+            for (String vmArg : vmArgs) {
+                launcher.addVMArg(vmArg);
+            }
+        }
+        if (toolArgs != null) {
+            for (String toolArg : toolArgs) {
+                launcher.addToolArg(toolArg);
+            }
+        }
+
+        ProcessBuilder processBuilder = new ProcessBuilder(launcher.getCommand());
+        System.out.println(Arrays.toString(processBuilder.command().toArray()).replace(",", ""));
+        OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
+        System.out.println(output.getOutput());
+
+        return output;
+    }
+
+    /**
+     * Verify jps output contains pids and programs' name information.
+     * The function will discard any lines that come before the first line with pid.
+     * This can happen if the JVM outputs a warning message for some reason
+     * before running jps.
+     *
+     * The output can look like:
+     * 35536 Jps
+     * 35417 Main
+     * 31103 org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
+     */
+    public static void verifyJpsOutput(OutputAnalyzer output, String regex) throws Exception {
+        output.shouldHaveExitValue(0);
+        int matchedCount = output.shouldMatchByLineFrom(regex, regex);
+        assertGreaterThan(matchedCount , 0, "Found no lines matching pattern: " + regex);
+    }
+
+    /**
+     * Compare jps output with a content in a file line by line
+     */
+    public static void verifyOutputAgainstFile(OutputAnalyzer output) throws IOException {
+        String testSrc = System.getProperty("test.src", "?");
+        File file = new File(testSrc, "usage.out");
+        List<String> fileOutput = Utils.fileAsList(file);
+        List<String> outputAsLines = output.asLines();
+        assertTrue(outputAsLines.containsAll(fileOutput),
+                "The ouput should contain all content of " + file.getAbsolutePath());
+    }
+
+    private static File getManifest(String className) throws IOException {
+        if (manifestFile == null) {
+            manifestFile = new File(className + ".mf");
+            try (BufferedWriter output = new BufferedWriter(new FileWriter(manifestFile))) {
+                output.write("Main-Class: " + className + Utils.NEW_LINE);
+            }
+        }
+        return manifestFile;
+    }
+
+    /**
+     * Build a jar of test classes in runtime
+     */
+    public static File buildJar(String className) throws Exception {
+        File jar = new File(className + ".jar");
+
+        List<String> jarArgs = new ArrayList<>();
+        jarArgs.add("-cfm");
+        jarArgs.add(jar.getAbsolutePath());
+        File manifestFile = getManifest(className);
+        jarArgs.add(manifestFile.getAbsolutePath());
+        String testClassPath = System.getProperty("test.class.path", "?");
+        for (String path : testClassPath.split(File.pathSeparator)) {
+            jarArgs.add("-C");
+            jarArgs.add(path);
+            jarArgs.add(".");
+        }
+
+        System.out.println("Running jar " + jarArgs.toString());
+        sun.tools.jar.Main jarTool = new sun.tools.jar.Main(System.out, System.err, "jar");
+        if (!jarTool.run(jarArgs.toArray(new String[jarArgs.size()]))) {
+            throw new Exception("jar failed: args=" + jarArgs.toString());
+        }
+
+        manifestFile.delete();
+        jar.deleteOnExit();
+
+        return jar;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/jps/TestJpsClass.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,63 @@
+/*
+ * 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.util.ArrayList;
+import java.util.List;
+
+import jdk.testlibrary.OutputAnalyzer;
+import jdk.testlibrary.ProcessTools;
+
+/*
+ * @test
+ * @summary The test application will be started with java class:
+ *          java JpsBase
+ *          For all possible combinations of jps arguments a jps process
+ *          will be started from within the test application.
+ *          The output should contain proper values.
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.* JpsHelper JpsBase
+ * @run driver TestJpsClass
+ */
+public class TestJpsClass {
+
+    public static void main(String[] args) throws Throwable {
+        String testJdk = System.getProperty("test.jdk", "?");
+        String testSrc = System.getProperty("test.src", "?");
+        String testClassPath = System.getProperty("test.class.path", "?");
+
+        List<String> cmd = new ArrayList<>();
+        cmd.addAll(JpsHelper.getVmArgs());
+        cmd.add("-Dtest.jdk=" + testJdk);
+        cmd.add("-Dtest.src=" + testSrc);
+        cmd.add("-cp");
+        cmd.add(testClassPath);
+        cmd.add("JpsBase");
+        cmd.add("monkey");
+
+        ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder(cmd.toArray(new String[cmd.size()]));
+        OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
+        System.out.println(output.getOutput());
+        output.shouldHaveExitValue(0);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/jps/TestJpsJar.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,63 @@
+/*
+ * 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.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import jdk.testlibrary.OutputAnalyzer;
+import jdk.testlibrary.ProcessTools;
+
+/*
+ * @test
+ * @summary The test application will be started with absolute jar:
+ *          java -jar /tmp/jtreg/jtreg-workdir/scratch/JpsBase.jar
+ *          For all possible combinations of jps arguments a jps process
+ *          will be started from within the test application.
+ *          The output should contain proper values.
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.* JpsHelper JpsBase
+ * @run driver TestJpsJar
+ */
+public class TestJpsJar {
+
+    public static void main(String[] args) throws Throwable {
+        String testJdk = System.getProperty("test.jdk", "?");
+        String testSrc = System.getProperty("test.src", "?");
+        File jar = JpsHelper.buildJar("JpsBase");
+
+        List<String> cmd = new ArrayList<>();
+        cmd.addAll(JpsHelper.getVmArgs());
+        cmd.add("-Dtest.jdk=" + testJdk);
+        cmd.add("-Dtest.src=" + testSrc);
+        cmd.add("-jar");
+        cmd.add(jar.getAbsolutePath());
+        cmd.add("monkey");
+
+        ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder(cmd.toArray(new String[cmd.size()]));
+        OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
+        System.out.println(output.getOutput());
+        output.shouldHaveExitValue(0);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/jps/TestJpsJarRelative.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,63 @@
+/*
+ * 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.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import jdk.testlibrary.OutputAnalyzer;
+import jdk.testlibrary.ProcessTools;
+
+/*
+ * @test
+ * @summary The test application will be started with relative jar:
+ *          java -jar ./JpsBase.jar
+ *          For all possible combinations of jps arguments a jps process
+ *          will be started from within the test application.
+ *          The output should contain proper values.
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.* JpsHelper JpsBase
+ * @run driver TestJpsJarRelative
+ */
+public class TestJpsJarRelative {
+
+    public static void main(String[] args) throws Throwable {
+        String testJdk = System.getProperty("test.jdk", "?");
+        String testSrc = System.getProperty("test.src", "?");
+        File jar = JpsHelper.buildJar("JpsBase");
+
+        List<String> cmd = new ArrayList<>();
+        cmd.addAll(JpsHelper.getVmArgs());
+        cmd.add("-Dtest.jdk=" + testJdk);
+        cmd.add("-Dtest.src=" + testSrc);
+        cmd.add("-jar");
+        cmd.add("." + File.separator + jar.getName());
+        cmd.add("monkey");
+
+        ProcessBuilder processBuilder = ProcessTools.createJavaProcessBuilder(cmd.toArray(new String[cmd.size()]));
+        OutputAnalyzer output = new OutputAnalyzer(processBuilder.start());
+        System.out.println(output.getOutput());
+        output.shouldHaveExitValue(0);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/tools/jps/TestJpsSanity.java	Thu Aug 28 14:54:07 2014 -0700
@@ -0,0 +1,66 @@
+/*
+ * 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 jdk.testlibrary.Asserts;
+import jdk.testlibrary.OutputAnalyzer;
+
+/*
+ * @test
+ * @summary This test verifies jps usage and checks that appropriate error message is shown
+ *          when running jps with illegal arguments.
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.* JpsHelper
+ * @run driver TestJpsSanity
+ */
+public class TestJpsSanity {
+
+    public static void main(String[] args) throws Throwable {
+        testJpsUsage();
+        testJpsVersion();
+        testJpsUnknownHost();
+    }
+
+    private static void testJpsUsage() throws Exception {
+        OutputAnalyzer output = JpsHelper.jps("-?");
+        JpsHelper.verifyOutputAgainstFile(output);
+
+        output = JpsHelper.jps("-help");
+        JpsHelper.verifyOutputAgainstFile(output);
+    }
+
+    private static void testJpsVersion() throws Exception {
+        OutputAnalyzer output = JpsHelper.jps("-version");
+        Asserts.assertNotEquals(output.getExitValue(), 0, "Exit code shouldn't be 0");
+        Asserts.assertFalse(output.getStderr().isEmpty(), "Error output should not be empty");
+        output.shouldContain("illegal argument: -version");
+    }
+
+    private static void testJpsUnknownHost() throws Exception {
+        String invalidHostName = "Oja781nh2ev7vcvbajdg-Sda1-C";
+        OutputAnalyzer output = JpsHelper.jps(invalidHostName);
+        Asserts.assertNotEquals(output.getExitValue(), 0, "Exit code shouldn't be 0");
+        Asserts.assertFalse(output.getStderr().isEmpty(), "Error output should not be empty");
+        output.shouldContain("Unknown host: " + invalidHostName);
+    }
+
+}
--- a/test/sun/tools/jps/jps-Defaults.sh	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#
-# Copyright (c) 2004, 2011, 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.
-#
-
-# @test
-# @bug 4990825
-# @run shell jps-Defaults.sh
-# @summary Test that output of 'jps' matches a specific pattern
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-verify_os
-
-JPS="${TESTJAVA}/bin/jps"
-
-${JPS} -J-XX:+UsePerfData 2>&1 | awk -f ${TESTSRC}/jps_Output1.awk
--- a/test/sun/tools/jps/jps-V_2.sh	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#
-# Copyright (c) 2004, 2012, 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.
-#
-
-# @test
-# @bug 4990825
-# @run shell jps-V_2.sh
-# @summary Test that output of 'jps -V' shows JVM flags
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-verify_os
-
-JPS="${TESTJAVA}/bin/jps"
-
-${JPS} -J-XX:+UsePerfData -J-XX:Flags=${TESTSRC}/vmflags -V | awk -f ${TESTSRC}/jps-V_Output2.awk
--- a/test/sun/tools/jps/jps-V_Output2.awk	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-#
-BEGIN	{
-	    totallines=0; matched=0
-	}
-
-/^[0-9]+ Jps.* \+DisableExplicitGC$/	{
-	    matched++;
-	}
-
-	{ totallines++; print $0 }
-
-END	{
-	    if ((totallines > 0) && (matched >= 1)) {
-	        exit 0
-	    }
-	    else {
-	        exit 1
-	    }
-	}
--- a/test/sun/tools/jps/jps-Vm_2.sh	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#
-# Copyright (c) 2004, 2011, 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.
-#
-
-# @test
-# @bug 4990825
-# @run shell jps-Vm_2.sh
-# @summary Test that output of 'jps -Vm' shows JVM flags and main args
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-verify_os
-
-JPS="${TESTJAVA}/bin/jps"
-
-${JPS} -J-XX:+UsePerfData -J-XX:Flags=${TESTSRC}/vmflags -Vm | awk -f ${TESTSRC}/jps-Vm_Output2.awk
--- a/test/sun/tools/jps/jps-Vm_Output2.awk	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-#
-BEGIN	{
-	    totallines=0; matched=0
-	}
-
-/^[0-9]+ Jps -Vm.* \+DisableExplicitGC$/	{
-	    matched++;
-	}
-
-	{ totallines++; print $0 }
-
-END	{
-	    if ((totallines > 0) && (matched >= 1)) {
-	        exit 0
-	    }
-	    else {
-	        exit 1
-	    }
-	}
--- a/test/sun/tools/jps/jps-Vvm.sh	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#
-# Copyright (c) 2004, 2011, 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.
-#
-
-# @test
-# @bug 4990825
-# @run shell jps-Vvm.sh
-# @summary Test that output of 'jps -Vvm' shows JVM flags, arguments and main args
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-verify_os
-
-JPS="${TESTJAVA}/bin/jps"
-
-${JPS} -J-XX:+UsePerfData -J-XX:Flags=${TESTSRC}/vmflags -Vvm | awk -f ${TESTSRC}/jps-Vvm_Output1.awk
--- a/test/sun/tools/jps/jps-Vvm_Output1.awk	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-#
-BEGIN	{
-	    totallines=0; matched=0
-	}
-
-/^[0-9]+ Jps -Vvm.*-XX:Flags=.*vmflags.* \+DisableExplicitGC$/	{
-	    matched++;
-	}
-
-	{ totallines++; print $0 }
-
-END	{
-	    if ((totallines > 0) && (matched >= 1)) {
-	        exit 0
-	    }
-	    else {
-	        exit 1
-	    }
-	}
--- a/test/sun/tools/jps/jps-Vvml.sh	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#
-# Copyright (c) 2004, 2011, 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.
-#
-
-# @test
-# @bug 4990825
-# @run shell jps-Vvml.sh
-# @summary Test that output of 'jps -Vvml' shows JVM arguments, flags, and main args with long class names
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-verify_os
-
-JPS="${TESTJAVA}/bin/jps"
-
-${JPS} -J-XX:+UsePerfData -J-XX:Flags=${TESTSRC}/vmflags -Vvml | awk -f ${TESTSRC}/jps-Vvml_Output1.awk
--- a/test/sun/tools/jps/jps-Vvml_2.sh	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-#
-# Copyright (c) 2004, 2012, 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.
-#
-
-# @test
-# @bug 5009652
-# @library ../../jvmstat/testlibrary
-# @build Sleeper
-# @run shell jps-Vvml_2.sh
-# @summary Test that output of 'jps -Vvml' shows proper output when no JVM arguments, flags, or main args are present
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-verify_os
-
-cleanup() {
-  kill_proc ${SLEEPER_PID}
-}
-
-trap 'cleanup' 0 HUP INT QUIT TERM
-
-JPS="${TESTJAVA}/bin/jps"
-
-JAVA="${TESTJAVA}/bin/java"
-
-# fire up a Sleeper that block indefinitely - but don't pass
-# any args to Sleeper.main() or any jvm flags or options, as we
-# need to inspect jps output for the no args condition.
-#
-# Note: this test can not pass on a VM with UsePerfData disabled by default,
-# and we can not set -XX:+UsePerfData as that invalidates the test premise of
-# there being no jvm flags
-
-${JAVA} -cp ${TESTCLASSPATH:-${TESTCLASSES}} Sleeper &
-SLEEPER_PID=$!
-
-${JPS} -J-XX:Flags=${TESTSRC}/vmflags -Vvml | awk -f ${TESTSRC}/jps-Vvml_Output2.awk
-RC=$?
-
-cleanup
-
-exit ${RC}
-
--- a/test/sun/tools/jps/jps-Vvml_Output1.awk	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-#
-
-BEGIN	{
-	    totallines=0; matched=0
-	}
-
-/^[0-9]+ sun.tools.jps.Jps -Vvml.*-XX:Flags=.*vmflags.* \+DisableExplicitGC$/	{
-	    matched++;
-	}
-
-	{ totallines++; print $0 }
-
-END	{
-	    if ((totallines > 0) && (matched >= 1)) {
-	        exit 0
-	    }
-	    else {
-	        exit 1
-	    }
-	}
--- a/test/sun/tools/jps/jps-Vvml_Output2.awk	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-# 1.1 04/03/08
-
-BEGIN	{
-	    totallines=0; matched=0
-	}
-
-/^[0-9]+ Sleeper$/	{
-	    matched++;
-	}
-
-/^[0-9]+ sun.tools.jps.Jps -Vvml.*-XX:Flags=.*vmflags.* \+DisableExplicitGC$/	{
-	    matched++;
-	}
-
-	{ totallines++; print $0 }
-
-END	{
-	    if ((totallines > 0) && (matched >= 2)) {
-	        exit 0
-	    }
-	    else {
-	        exit 1
-	    }
-	}
--- a/test/sun/tools/jps/jps-help.sh	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-#
-# Copyright (c) 2004, 2011, 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.
-#
-
-# @test
-# @bug 4990825
-# @run shell jps-help.sh
-# @summary Test that output of 'jps -?' matches the usage.out file
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-
-JPS="${TESTJAVA}/bin/jps"
-
-rm -f jps.out 2>/dev/null
-${JPS} -J-XX:+UsePerfData -? > jps.out 2>&1
-
-diff -w jps.out ${TESTSRC}/usage.out
-if [ $? != 0 ]
-then
-  echo "Output of jps -? differ from expected output. Failed."
-  rm -f jps.out 2>/dev/null
-  exit 1
-fi
-
-rm -f jps.out 2>/dev/null
-${JPS} -J-XX:+UsePerfData -help > jps.out 2>&1
-
-diff -w jps.out ${TESTSRC}/usage.out
-if [ $? != 0 ]
-then
-  echo "Output of jps -help differ from expected output. Failed."
-  rm -f jps.out 2>/dev/null
-  exit 1
-fi
-
-exit 0
--- a/test/sun/tools/jps/jps-l_1.sh	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#
-# Copyright (c) 2004, 2011, 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.
-#
-
-# @test
-# @bug 4990825
-# @run shell jps-l_1.sh
-# @summary Test that output of 'jps -l' matches a specific pattern
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-verify_os
-
-JPS="${TESTJAVA}/bin/jps"
-
-${JPS} -J-XX:+UsePerfData -l 2>&1 | awk -f ${TESTSRC}/jps-l_Output1.awk
--- a/test/sun/tools/jps/jps-l_2.sh	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#
-# Copyright (c) 2004, 2011, 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.
-#
-
-# @test
-# @bug 4990825
-# @run shell jps-l_2.sh
-# @summary Test that output of 'jps -l' shows the long class name
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-verify_os
-
-JPS="${TESTJAVA}/bin/jps"
-
-${JPS} -J-XX:+UsePerfData -l | awk -f ${TESTSRC}/jps-l_Output2.awk
--- a/test/sun/tools/jps/jps-l_Output1.awk	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-#
-BEGIN	{
-	    totallines=0; matched=0
-	}
-
-# match on a fully qualified class name
-/^[0-9]+ [a-z|A-Z][a-z|A-Z|0-9|\.|\$|\+]*$/	{
-	    matched++;
-	}
-
-# or match on a jar or war file name - note, jar files ending with
-# ".jar" is only a convention , not a requirement. Theoretically,
-# any valid file name could occur here.
-/^[0-9]+ .*\.(jar|war)$/	{
-	    matched++;
-}
-
-# or match on the condition that the class name is not available
-/^[0-9]+ -- .*$/	{
-	    matched++;
-	}
-
-# or match an empty class name
-/^[0-9]+ $/	{
-	    matched++;
-	}
-
-	{ totallines++; print $0 }
-
-END	{
-	    if ((totallines > 0) && (matched == totallines)) {
-	        exit 0
-	    }
-	    else {
-	        exit 1
-	    }
-	}
--- a/test/sun/tools/jps/jps-l_Output2.awk	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-#
-BEGIN	{
-	    totallines=0; matched=0
-	}
-
-/^[0-9]+ sun.tools.jps.Jps$/	{
-	    matched++;
-	}
-
-	{ totallines++; print $0 }
-
-END	{
-	    if ((totallines > 0) && (matched >= 1)) {
-	        exit 0
-	    }
-	    else {
-	        exit 1
-	    }
-	}
--- a/test/sun/tools/jps/jps-lm.sh	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#
-# Copyright (c) 2004, 2011, 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.
-#
-
-# @test
-# @bug 4990825
-# @run shell jps-lm.sh
-# @summary Test that output of 'jps -lm' shows the long class name and main args
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-verify_os
-
-JPS="${TESTJAVA}/bin/jps"
-
-${JPS} -J-XX:+UsePerfData -lm | awk -f ${TESTSRC}/jps-lm_Output1.awk
--- a/test/sun/tools/jps/jps-lm_Output1.awk	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-#
-BEGIN	{
-	    totallines=0; matched=0
-	}
-
-/^[0-9]+ sun.tools.jps.Jps -lm$/	{
-	    matched++;
-	}
-
-	{ totallines++; print $0 }
-
-END	{
-	    if ((totallines > 0) && (matched >= 1)) {
-	        exit 0
-	    }
-	    else {
-	        exit 1
-	    }
-	}
--- a/test/sun/tools/jps/jps-m.sh	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#
-# Copyright (c) 2004, 2011, 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.
-#
-
-# @test
-# @bug 4990825
-# @run shell jps-m.sh
-# @summary Test that output of 'jps -m' shows args to main
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-verify_os
-
-JPS="${TESTJAVA}/bin/jps"
-
-${JPS} -J-XX:+UsePerfData -m | awk -f ${TESTSRC}/jps-m_Output1.awk
--- a/test/sun/tools/jps/jps-m_2.sh	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 2004, 2012, 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.
-#
-
-# @test
-# @bug 5009652
-# @library ../../jvmstat/testlibrary
-# @build Sleeper
-# @run shell jps-m_2.sh
-# @summary Test that output of 'jps -m' shows proper output for main with no args.
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-verify_os
-
-cleanup() {
-  kill_proc ${SLEEPER_PID}
-}
-
-trap 'cleanup' 0 HUP INT QUIT TERM
-
-JPS="${TESTJAVA}/bin/jps"
-JAVA="${TESTJAVA}/bin/java"
-
-# fire up a Sleeper that blocks indefinitely - but don't pass
-# any args to Sleeper.main(), as we need to inspect jps output
-# for the no args condition.
-#
-${JAVA} -XX:+UsePerfData -cp ${TESTCLASSPATH:-${TESTCLASSES}} Sleeper &
-SLEEPER_PID=$!
-
-${JPS} -J-XX:+UsePerfData -m | awk -f ${TESTSRC}/jps-m_Output2.awk
-RC=$?
-
-cleanup
-
-exit ${RC}
-
--- a/test/sun/tools/jps/jps-m_Output1.awk	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-#
-BEGIN	{
-	    totallines=0; matched=0
-	}
-
-/^[0-9]+ Jps -m$/	{
-	    matched++;
-	}
-
-	{ totallines++; print $0 }
-
-END	{
-	    if ((totallines > 0) && (matched >= 1)) {
-	        exit 0
-	    }
-	    else {
-	        exit 1
-	    }
-	}
--- a/test/sun/tools/jps/jps-m_Output2.awk	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-#
-BEGIN	{
-	    totallines=0; matched=0
-	}
-
-/^[0-9]+ Sleeper$/	{
-	    matched++;
-	}
-
-/^[0-9]+ Jps -m$/	{
-	    matched++;
-	}
-
-	{ totallines++; print $0 }
-
-END	{
-	    if ((totallines > 0) && (matched >= 2)) {
-	        exit 0
-	    }
-	    else {
-	        exit 1
-	    }
-	}
--- a/test/sun/tools/jps/jps-q.sh	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#
-# Copyright (c) 2004, 2011, 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.
-#
-
-# @test
-# @bug 4990825
-# @run shell jps-q.sh
-# @summary Test that output of 'jps -q' shows only the process ids
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-verify_os
-
-JPS="${TESTJAVA}/bin/jps"
-
-${JPS} -J-XX:+UsePerfData -q | awk -f ${TESTSRC}/jps-q_Output1.awk
--- a/test/sun/tools/jps/jps-q_Output1.awk	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-#
-BEGIN	{
-	    totallines=0; matched=0
-	}
-
-/^[0-9]+$/	{
-	    matched++;
-	}
-
-	{ totallines++; print $0 }
-
-END	{
-	    if ((totallines > 0) && (matched >= 1)) {
-	        exit 0
-	    }
-	    else {
-	        exit 1
-	    }
-	}
--- a/test/sun/tools/jps/jps-v_1.sh	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#
-# Copyright (c) 2004, 2011, 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.
-#
-
-# @test
-# @bug 4990825
-# @run shell jps-v_1.sh
-# @summary Test that output of 'jps -v' shows JVM arguments
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-verify_os
-
-JPS="${TESTJAVA}/bin/jps"
-
-${JPS} -J-XX:+UsePerfData -J-XX:+UseParallelGC -v | awk -f ${TESTSRC}/jps-v_Output1.awk
--- a/test/sun/tools/jps/jps-v_Output1.awk	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-#
-BEGIN	{
-	    totallines=0; matched=0
-	}
-
-/^[0-9]+ Jps.* -XX:\+UseParallelGC$/	{
-	    matched++;
-	}
-
-	{ totallines++; print $0 }
-
-END	{
-	    if ((totallines > 0) && (matched >= 1)) {
-	        exit 0
-	    }
-	    else {
-	        exit 1
-	    }
-	}
--- a/test/sun/tools/jps/jps-vm_1.sh	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#
-# Copyright (c) 2004, 2011, 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.
-#
-
-# @test
-# @bug 4990825
-# @run shell jps-vm_1.sh
-# @summary Test that output of 'jps -vm' shows JVM arguments and main args
-
-. ${TESTSRC-.}/../../jvmstat/testlibrary/utils.sh
-
-setup
-verify_os
-
-JPS="${TESTJAVA}/bin/jps"
-
-${JPS} -J-XX:+UsePerfData -J-XX:+UseParallelGC -vm | awk -f ${TESTSRC}/jps-vm_Output1.awk
--- a/test/sun/tools/jps/jps-vm_Output1.awk	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-#
-BEGIN	{
-	    totallines=0; matched=0
-	}
-
-/^[0-9]+ Jps -vm.* -XX:\+UseParallelGC$/	{
-	    matched++;
-	}
-
-	{ totallines++; print $0 }
-
-END	{
-	    if ((totallines > 0) && (matched >= 1)) {
-	        exit 0
-	    }
-	    else {
-	        exit 1
-	    }
-	}
--- a/test/sun/tools/jps/jps_Output1.awk	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-#
-BEGIN	{
-	    totallines=0; matched=0
-	}
-
-# match on a main class name
-/^[0-9]+ [a-z|A-Z][a-z|A-Z|0-9|\$|\+]*$/	{
-	    matched++;
-	}
-
-# or match on a path name to a jar or war file - note, jar files ending with
-# ".jar" is only a convention, not a requirement. Theoretically,
-# any valid file name could occur here.
-/^[0-9]+ .*\.(jar|war)$/	{
-	    matched++;
-}
-
-# or match on the condition that the class name is not available
-/^[0-9]+ -- .*$/	{
-	    matched++;
-	}
-
-# or match an empty class name
-/^[0-9]+ $/	{
-	    matched++;
-	}
-
-	{ totallines++; print $0 }
-
-END	{
-	    if ((totallines > 0) && (matched == totallines)) {
-	        exit 0
-	    }
-	    else {
-	        exit 1
-	    }
-	}
--- a/test/sun/tools/jps/vmflags	Thu Aug 21 14:16:26 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-+DisableExplicitGC