changeset 12307:f376824d4940 jdk9-b72

Merge
author lana
date Thu, 02 Jul 2015 16:08:47 -0700
parents dd489ac949cc efc27aefd2e2
children cce0dee6d995 d94566351c12
files src/java.desktop/windows/native/libawt/windows/hand.cur src/jdk.accessibility/windows/conf/accessibility.properties
diffstat 784 files changed, 5482 insertions(+), 2147 deletions(-) [+]
line wrap: on
line diff
--- a/make/CopySamples.gmk	Thu Jul 02 08:54:01 2015 -0700
+++ b/make/CopySamples.gmk	Thu Jul 02 16:08:47 2015 -0700
@@ -28,7 +28,7 @@
 include $(SPEC)
 include MakeBase.gmk
 
-SAMPLE_TARGET_DIR := $(SUPPORT_OUTPUTDIR)/sample
+SAMPLE_TARGET_DIR := $(SUPPORT_OUTPUTDIR)/sample/image
 SAMPLE_SOURCE_DIR := $(JDK_TOPDIR)/src/sample/share
 SAMPLE_CLOSED_SOURCE_DIR := $(JDK_TOPDIR)/src/closed/sample/share
 SAMPLE_SOLARIS_SOURCE_DIR := $(JDK_TOPDIR)/src/sample/solaris
--- a/make/copy/Copy-jdk.accessibility.gmk	Thu Jul 02 08:54:01 2015 -0700
+++ b/make/copy/Copy-jdk.accessibility.gmk	Thu Jul 02 16:08:47 2015 -0700
@@ -31,17 +31,12 @@
   TARGETS += $(INCLUDE_DST_OS_DIR)/bridge/AccessBridgeCallbacks.h \
       $(INCLUDE_DST_OS_DIR)/bridge/AccessBridgeCalls.h \
       $(INCLUDE_DST_OS_DIR)/bridge/AccessBridgePackages.h \
-      $(INCLUDE_DST_OS_DIR)/bridge/AccessBridgeCalls.c \
-      $(CONF_DST_DIR)/accessibility.properties
+      $(INCLUDE_DST_OS_DIR)/bridge/AccessBridgeCalls.c
 
   $(INCLUDE_DST_OS_DIR)/bridge/%: \
       $(JDK_TOPDIR)/src/jdk.accessibility/windows/native/include/bridge/%
 		$(install-file)
 
-  $(CONF_DST_DIR)/accessibility.properties: \
-      $(JDK_TOPDIR)/src/jdk.accessibility/windows/conf/accessibility.properties
-		$(install-file)
-
 endif
 
 ################################################################################
--- a/make/data/tzdata/VERSION	Thu Jul 02 08:54:01 2015 -0700
+++ b/make/data/tzdata/VERSION	Thu Jul 02 16:08:47 2015 -0700
@@ -21,4 +21,4 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-tzdata2015d
+tzdata2015e
--- a/make/data/tzdata/africa	Thu Jul 02 08:54:01 2015 -0700
+++ b/make/data/tzdata/africa	Thu Jul 02 16:08:47 2015 -0700
@@ -361,9 +361,10 @@
 # time this summer, and carry out studies on the possibility of canceling the
 # practice altogether in future years."
 #
-# From Paul Eggert (2015-04-20):
-# For now, assume DST will be canceled.  Any resumption would likely
-# use different rules anyway.
+# From Paul Eggert (2015-04-24):
+# Yesterday the office of Egyptian President El-Sisi announced his
+# decision to abandon DST permanently.  See Ahram Online 2015-04-24.
+# http://english.ahram.org.eg/NewsContent/1/64/128509/Egypt/Politics-/Sisi-cancels-daylight-saving-time-in-Egypt.aspx
 
 Rule	Egypt	2008	only	-	Aug	lastThu	24:00	0	-
 Rule	Egypt	2009	only	-	Aug	20	24:00	0	-
@@ -810,20 +811,41 @@
 # will resume again at 02:00 on Saturday, August 2, 2014....
 # http://www.mmsp.gov.ma/fr/actualites.aspx?id=586
 
-# From Paul Eggert (2014-06-05):
-# For now, guess that later spring and fall transitions will use 2014's rules,
+# From Milamber (2015-06-08):
+# (Google Translation) The hour will thus be delayed 60 minutes
+# Sunday, June 14 at 3:00, the ministry said in a statement, adding
+# that the time will be advanced again 60 minutes Sunday, July 19,
+# 2015 at 2:00.  The move comes under 2.12.126 Decree of 26 Jumada I
+# 1433 (18 April 2012) and the decision of the Head of Government of
+# 16 N. 3-29-15 Chaaban 1435 (4 June 2015).
+# Source (french):
+# http://lnt.ma/le-maroc-reculera-dune-heure-le-dimanche-14-juin/
+#
+# From Milamber (2015-06-09):
+# http://www.mmsp.gov.ma/fr/actualites.aspx?id=863
+#
+# From Michael Deckers (2015-06-09):
+# [The gov.ma announcement] would (probably) make the switch on 2015-07-19 go
+# from 03:00 to 04:00 rather than from 02:00 to 03:00, as in the patch....
+# I think the patch is correct and the quoted text is wrong; the text in
+# <http://lnt.ma/le-maroc-reculera-dune-heure-le-dimanche-14-juin/> agrees
+# with the patch.
+
+# From Paul Eggert (2015-06-08):
+# For now, guess that later spring and fall transitions will use 2015's rules,
 # and guess that Morocco will switch to standard time at 03:00 the last
-# Saturday before Ramadan, and back to DST at 02:00 the first Saturday after
-# Ramadan.  To implement this, transition dates for 2015 through 2037 were
+# Sunday before Ramadan, and back to DST at 02:00 the first Sunday after
+# Ramadan.  To implement this, transition dates for 2016 through 2037 were
 # determined by running the following program under GNU Emacs 24.3, with the
 # results integrated by hand into the table below.
-# (let ((islamic-year 1436))
+# (let ((islamic-year 1437))
+#   (require 'cal-islam)
 #   (while (< islamic-year 1460)
 #     (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year)))
 #           (b (calendar-islamic-to-absolute (list 10 1 islamic-year)))
-#           (saturday 6))
-#       (while (/= saturday (mod (setq a (1- a)) 7)))
-#       (while (/= saturday (mod b 7))
+#           (sunday 0))
+#       (while (/= sunday (mod (setq a (1- a)) 7)))
+#       (while (/= sunday (mod b 7))
 #         (setq b (1+ b)))
 #       (setq a (calendar-gregorian-from-absolute a))
 #       (setq b (calendar-gregorian-from-absolute b))
@@ -867,32 +889,30 @@
 Rule	Morocco	2013	only	-	Jul	 7	 3:00	0	-
 Rule	Morocco	2013	only	-	Aug	10	 2:00	1:00	S
 Rule	Morocco	2013	max	-	Oct	lastSun	 3:00	0	-
-Rule	Morocco	2014	2022	-	Mar	lastSun	 2:00	1:00	S
+Rule	Morocco	2014	2021	-	Mar	lastSun	 2:00	1:00	S
 Rule	Morocco	2014	only	-	Jun	28	 3:00	0	-
 Rule	Morocco	2014	only	-	Aug	 2	 2:00	1:00	S
-Rule	Morocco	2015	only	-	Jun	13	 3:00	0	-
-Rule	Morocco	2015	only	-	Jul	18	 2:00	1:00	S
-Rule	Morocco	2016	only	-	Jun	 4	 3:00	0	-
-Rule	Morocco	2016	only	-	Jul	 9	 2:00	1:00	S
-Rule	Morocco	2017	only	-	May	20	 3:00	0	-
-Rule	Morocco	2017	only	-	Jul	 1	 2:00	1:00	S
-Rule	Morocco	2018	only	-	May	12	 3:00	0	-
-Rule	Morocco	2018	only	-	Jun	16	 2:00	1:00	S
-Rule	Morocco	2019	only	-	May	 4	 3:00	0	-
-Rule	Morocco	2019	only	-	Jun	 8	 2:00	1:00	S
-Rule	Morocco	2020	only	-	Apr	18	 3:00	0	-
-Rule	Morocco	2020	only	-	May	30	 2:00	1:00	S
-Rule	Morocco	2021	only	-	Apr	10	 3:00	0	-
-Rule	Morocco	2021	only	-	May	15	 2:00	1:00	S
-Rule	Morocco	2022	only	-	Apr	 2	 3:00	0	-
-Rule	Morocco	2022	only	-	May	 7	 2:00	1:00	S
-Rule	Morocco	2023	only	-	Apr	22	 2:00	1:00	S
-Rule	Morocco	2024	only	-	Apr	13	 2:00	1:00	S
-Rule	Morocco	2025	only	-	Apr	 5	 2:00	1:00	S
+Rule	Morocco	2015	only	-	Jun	14	 3:00	0	-
+Rule	Morocco	2015	only	-	Jul	19	 2:00	1:00	S
+Rule	Morocco	2016	only	-	Jun	 5	 3:00	0	-
+Rule	Morocco	2016	only	-	Jul	10	 2:00	1:00	S
+Rule	Morocco	2017	only	-	May	21	 3:00	0	-
+Rule	Morocco	2017	only	-	Jul	 2	 2:00	1:00	S
+Rule	Morocco	2018	only	-	May	13	 3:00	0	-
+Rule	Morocco	2018	only	-	Jun	17	 2:00	1:00	S
+Rule	Morocco	2019	only	-	May	 5	 3:00	0	-
+Rule	Morocco	2019	only	-	Jun	 9	 2:00	1:00	S
+Rule	Morocco	2020	only	-	Apr	19	 3:00	0	-
+Rule	Morocco	2020	only	-	May	24	 2:00	1:00	S
+Rule	Morocco	2021	only	-	Apr	11	 3:00	0	-
+Rule	Morocco	2021	only	-	May	16	 2:00	1:00	S
+Rule	Morocco	2022	only	-	May	 8	 2:00	1:00	S
+Rule	Morocco	2023	only	-	Apr	23	 2:00	1:00	S
+Rule	Morocco	2024	only	-	Apr	14	 2:00	1:00	S
+Rule	Morocco	2025	only	-	Apr	 6	 2:00	1:00	S
 Rule	Morocco	2026	max	-	Mar	lastSun	 2:00	1:00	S
-Rule	Morocco	2035	only	-	Oct	27	 3:00	0	-
-Rule	Morocco	2036	only	-	Oct	18	 3:00	0	-
-Rule	Morocco	2037	only	-	Oct	10	 3:00	0	-
+Rule	Morocco	2036	only	-	Oct	19	 3:00	0	-
+Rule	Morocco	2037	only	-	Oct	 4	 3:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Africa/Casablanca	-0:30:20 -	LMT	1913 Oct 26
--- a/make/data/tzdata/iso3166.tab	Thu Jul 02 08:54:01 2015 -0700
+++ b/make/data/tzdata/iso3166.tab	Thu Jul 02 16:08:47 2015 -0700
@@ -26,11 +26,10 @@
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
-# From Paul Eggert (2014-07-18):
+# From Paul Eggert (2015-05-02):
 # This file contains a table of two-letter country codes.  Columns are
 # separated by a single tab.  Lines beginning with '#' are comments.
-# Although all text currently uses ASCII encoding, this is planned to
-# change to UTF-8 soon.  The columns of the table are as follows:
+# All text uses UTF-8 encoding.  The columns of the table are as follows:
 #
 # 1.  ISO 3166-1 alpha-2 country code, current as of
 #     ISO 3166-1 Newsletter VI-16 (2013-07-11).  See: Updates on ISO 3166
@@ -61,7 +60,7 @@
 AT	Austria
 AU	Australia
 AW	Aruba
-AX	Aaland Islands
+AX	Åland Islands
 AZ	Azerbaijan
 BA	Bosnia & Herzegovina
 BB	Barbados
@@ -90,7 +89,7 @@
 CF	Central African Rep.
 CG	Congo (Rep.)
 CH	Switzerland
-CI	Cote d'Ivoire
+CI	Côte d'Ivoire
 CK	Cook Islands
 CL	Chile
 CM	Cameroon
@@ -234,7 +233,7 @@
 PW	Palau
 PY	Paraguay
 QA	Qatar
-RE	Reunion
+RE	Réunion
 RO	Romania
 RS	Serbia
 RU	Russia
--- a/make/data/tzdata/northamerica	Thu Jul 02 08:54:01 2015 -0700
+++ b/make/data/tzdata/northamerica	Thu Jul 02 16:08:47 2015 -0700
@@ -2684,7 +2684,17 @@
 			-4:00	US	A%sT
 
 # Cayman Is
-# See America/Panama.
+
+# From Paul Eggert (2015-05-15):
+# The Cayman government has decided to introduce DST in 2016, the idea being
+# to keep in sync with New York.  The legislation hasn't passed but the change
+# seems quite likely.  See: Meade B. Cayman 27.
+# http://www.cayman27.com.ky/2015/05/15/clock-ticks-toward-daylight-saving-time-in-cayman
+
+Zone	America/Cayman	-5:25:32 -	LMT	1890     # Georgetown
+			-5:07:11 -	KMT	1912 Feb # Kingston Mean Time
+			-5:00	-	EST	2016
+			-5:00	US	E%sT
 
 # Costa Rica
 
@@ -3207,7 +3217,6 @@
 Zone	America/Panama	-5:18:08 -	LMT	1890
 			-5:19:36 -	CMT	1908 Apr 22 # Colón Mean Time
 			-5:00	-	EST
-Link America/Panama America/Cayman
 
 # Puerto Rico
 # There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'.
--- a/make/data/tzdata/southamerica	Thu Jul 02 08:54:01 2015 -0700
+++ b/make/data/tzdata/southamerica	Thu Jul 02 16:08:47 2015 -0700
@@ -53,7 +53,7 @@
 #	I suggest the use of _Summer time_ instead of the more cumbersome
 #	_daylight-saving time_.  _Summer time_ seems to be in general use
 #	in Europe and South America.
-#	-- E O Cutler, _New York Times_ (1937-02-14), quoted in
+#	-- E O Cutler, _New York Times_ (1937-02-14), quoted in
 #	H L Mencken, _The American Language: Supplement I_ (1960), p 466
 #
 # Earlier editions of these tables also used the North American style
--- a/make/gensrc/GensrcCLDR.gmk	Thu Jul 02 08:54:01 2015 -0700
+++ b/make/gensrc/GensrcCLDR.gmk	Thu Jul 02 16:08:47 2015 -0700
@@ -29,7 +29,7 @@
 GENSRC_BASEDIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.base
 GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.localedata
 
-CLDR_BASEMETAINFO_FILE := $(GENSRC_DIR)/sun/util/cldr/CLDRBaseLocaleDataMetaInfo.java
+CLDR_BASEMETAINFO_FILE := $(GENSRC_BASEDIR)/sun/util/cldr/CLDRBaseLocaleDataMetaInfo.java
 CLDR_METAINFO_FILE := $(GENSRC_DIR)/sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo_jdk_localedata.java
 
 CLDR_BASE_LOCALES := "en-US"
--- a/make/lib/LibCommon.gmk	Thu Jul 02 08:54:01 2015 -0700
+++ b/make/lib/LibCommon.gmk	Thu Jul 02 16:08:47 2015 -0700
@@ -60,17 +60,6 @@
       $(JDK_TOPDIR)/src/$(strip $1)/share/native/lib$(strip $2)))
 
 ################################################################################
-# Find lib dir for module
-# Param 1 - module name
-ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
-  FindLibDirForModule = \
-      $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)$(OPENJDK_TARGET_CPU_LIBDIR)
-else
-  FindLibDirForModule = \
-      $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
-endif
-
-################################################################################
 # Find a library
 # Param 1 - module name
 # Param 2 - library name
--- a/make/lib/NioLibraries.gmk	Thu Jul 02 08:54:01 2015 -0700
+++ b/make/lib/NioLibraries.gmk	Thu Jul 02 16:08:47 2015 -0700
@@ -81,7 +81,8 @@
     LDFLAGS_SUFFIX_windows := jvm.lib ws2_32.lib $(WIN_JAVA_LIB) \
         $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libnet/net.lib \
         advapi32.lib, \
-    LDFLAGS_SUFFIX_macosx := -ljava -lnet -pthread -framework CoreFoundation, \
+    LDFLAGS_SUFFIX_macosx := -ljava -lnet -pthread \
+        -framework CoreFoundation -framework CoreServices, \
     LDFLAGS_SUFFIX :=, \
     VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
     RC_FLAGS := $(RC_FLAGS) \
--- a/make/src/classes/build/tools/module/ModuleArchive.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/make/src/classes/build/tools/module/ModuleArchive.java	Thu Jul 02 16:08:47 2015 -0700
@@ -228,7 +228,8 @@
         private static String nativeDir(String filename) {
             if (System.getProperty("os.name").startsWith("Windows")) {
                 if (filename.endsWith(".dll") || filename.endsWith(".diz")
-                    || filename.endsWith(".pdb") || filename.endsWith(".map")) {
+                    || filename.endsWith(".pdb") || filename.endsWith(".map")
+                    || filename.endsWith(".cpl")) {
                     return "bin";
                 } else {
                     return "lib";
--- a/src/java.base/macosx/classes/sun/nio/fs/MacOSXFileSystemProvider.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/macosx/classes/sun/nio/fs/MacOSXFileSystemProvider.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, 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
@@ -49,6 +49,8 @@
     FileTypeDetector getFileTypeDetector() {
         Path userMimeTypes = Paths.get(AccessController.doPrivileged(
             new GetPropertyAction("user.home")), ".mime.types");
-        return new MimeTypesFileTypeDetector(userMimeTypes);
+
+        return chain(new MimeTypesFileTypeDetector(userMimeTypes),
+                     new UTIFileTypeDetector());
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/macosx/classes/sun/nio/fs/UTIFileTypeDetector.java	Thu Jul 02 16:08:47 2015 -0700
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2015, 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.nio.fs;
+
+import java.io.IOException;
+import java.nio.file.Path;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * File type detector that uses a file extension to look up its MIME type
+ * via the Apple Uniform Type Identifier interfaces.
+ */
+class UTIFileTypeDetector extends AbstractFileTypeDetector {
+    UTIFileTypeDetector() {
+        super();
+    }
+
+    private native String probe0(String fileExtension) throws IOException;
+
+    @Override
+    protected String implProbeContentType(Path path) throws IOException {
+        Path fn = path.getFileName();
+        if (fn == null)
+            return null;  // no file name
+
+        String ext = getExtension(fn.toString());
+        if (ext.isEmpty())
+            return null;  // no extension
+
+        return probe0(ext);
+    }
+
+    static {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
+            @Override
+            public Void run() {
+                System.loadLibrary("nio");
+                return null;
+            }
+        });
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/macosx/native/libnio/fs/UTIFileTypeDetector.c	Thu Jul 02 16:08:47 2015 -0700
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#include "jni.h"
+#include "jni_util.h"
+
+#include <CoreFoundation/CoreFoundation.h>
+#include <CoreServices/CoreServices.h>
+
+/**
+ * Creates a CF string from the given Java string.
+ * If javaString is NULL, NULL is returned.
+ * If a memory error occurs, and OutOfMemoryError is thrown and
+ * NULL is returned.
+ */
+static CFStringRef toCFString(JNIEnv *env, jstring javaString)
+{
+    if (javaString == NULL) {
+        return NULL;
+    } else {
+        CFStringRef result = NULL;
+        jsize length = (*env)->GetStringLength(env, javaString);
+        const jchar *chars = (*env)->GetStringChars(env, javaString, NULL);
+        if (chars == NULL) {
+            JNU_ThrowOutOfMemoryError(env, "toCFString failed");
+            return NULL;
+        }
+        result = CFStringCreateWithCharacters(NULL, (const UniChar *)chars,
+                                              length);
+        (*env)->ReleaseStringChars(env, javaString, chars);
+        if (result == NULL) {
+            JNU_ThrowOutOfMemoryError(env, "toCFString failed");
+            return NULL;
+        }
+        return result;
+    }
+}
+
+/**
+ * Creates a Java string from the given CF string.
+ * If cfString is NULL, NULL is returned.
+ * If a memory error occurs, and OutOfMemoryError is thrown and
+ * NULL is returned.
+ */
+static jstring toJavaString(JNIEnv *env, CFStringRef cfString)
+{
+    if (cfString == NULL) {
+        return NULL;
+    } else {
+        jstring javaString = NULL;
+
+        CFIndex length = CFStringGetLength(cfString);
+        const UniChar *constchars = CFStringGetCharactersPtr(cfString);
+        if (constchars) {
+            javaString = (*env)->NewString(env, constchars, length);
+        } else {
+            UniChar *chars = malloc(length * sizeof(UniChar));
+            if (chars == NULL) {
+                JNU_ThrowOutOfMemoryError(env, "toJavaString failed");
+                return NULL;
+            }
+            CFStringGetCharacters(cfString, CFRangeMake(0, length), chars);
+            javaString = (*env)->NewString(env, chars, length);
+            free(chars);
+        }
+        return javaString;
+    }
+}
+
+/**
+ * Returns the content type corresponding to the supplied file extension.
+ * The mapping is determined using Uniform Type Identifiers (UTIs).  If
+ * the file extension parameter is NULL, a CFString cannot be created
+ * from the file extension parameter, there is no UTI corresponding to
+ * the file extension, the UTI cannot supply a MIME type for the file
+ * extension, or a Java string cannot be created, then NULL is returned;
+ * otherwise the MIME type string is returned.
+ */
+JNIEXPORT jstring JNICALL
+Java_sun_nio_fs_UTIFileTypeDetector_probe0(JNIEnv* env, jobject ftd,
+                                           jstring ext)
+{
+    jstring result = NULL;
+
+    CFStringRef extension = toCFString(env, ext);
+    if (extension != NULL) {
+        CFStringRef uti =
+            UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension,
+                                                  extension, NULL);
+        CFRelease(extension);
+
+        if (uti != NULL) {
+            CFStringRef mimeType =
+                UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType);
+            CFRelease(uti);
+
+            if (mimeType != NULL) {
+                result = toJavaString(env, mimeType);
+                CFRelease(mimeType);
+            }
+        }
+    }
+
+    return result;
+}
--- a/src/java.base/share/classes/com/sun/crypto/provider/GHASH.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/com/sun/crypto/provider/GHASH.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2015 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -62,14 +62,16 @@
 
     private static final int AES_BLOCK_SIZE = 16;
 
-    // Multiplies state0, state1 by V0, V1.
-    private void blockMult(long V0, long V1) {
+    // Multiplies state[0], state[1] by subkeyH[0], subkeyH[1].
+    private static void blockMult(long[] st, long[] subH) {
         long Z0 = 0;
         long Z1 = 0;
+        long V0 = subH[0];
+        long V1 = subH[1];
         long X;
 
-        // Separate loops for processing state0 and state1.
-        X = state0;
+        // Separate loops for processing state[0] and state[1].
+        X = st[0];
         for (int i = 0; i < 64; i++) {
             // Zi+1 = Zi if bit i of x is 0
             long mask = X >> 63;
@@ -89,7 +91,7 @@
             X <<= 1;
         }
 
-        X = state1;
+        X = st[1];
         for (int i = 64; i < 127; i++) {
             // Zi+1 = Zi if bit i of x is 0
             long mask = X >> 63;
@@ -115,15 +117,18 @@
         Z1 ^= V1 & mask;
 
         // Save result.
-        state0 = Z0;
-        state1 = Z1;
+        st[0] = Z0;
+        st[1] = Z1;
+
     }
 
+    /* subkeyH and state are stored in long[] for GHASH intrinsic use */
+
     // hash subkey H; should not change after the object has been constructed
-    private final long subkeyH0, subkeyH1;
+    private final long[] subkeyH;
 
     // buffer for storing hash
-    private long state0, state1;
+    private final long[] state;
 
     // variables for save/restore calls
     private long stateSave0, stateSave1;
@@ -141,8 +146,10 @@
         if ((subkeyH == null) || subkeyH.length != AES_BLOCK_SIZE) {
             throw new ProviderException("Internal error");
         }
-        this.subkeyH0 = getLong(subkeyH, 0);
-        this.subkeyH1 = getLong(subkeyH, 8);
+        state = new long[2];
+        this.subkeyH = new long[2];
+        this.subkeyH[0] = getLong(subkeyH, 0);
+        this.subkeyH[1] = getLong(subkeyH, 8);
     }
 
     /**
@@ -151,33 +158,30 @@
      * this object for different data w/ the same H.
      */
     void reset() {
-        state0 = 0;
-        state1 = 0;
+        state[0] = 0;
+        state[1] = 0;
     }
 
     /**
      * Save the current snapshot of this GHASH object.
      */
     void save() {
-        stateSave0 = state0;
-        stateSave1 = state1;
+        stateSave0 = state[0];
+        stateSave1 = state[1];
     }
 
     /**
      * Restores this object using the saved snapshot.
      */
     void restore() {
-        state0 = stateSave0;
-        state1 = stateSave1;
+        state[0] = stateSave0;
+        state[1] = stateSave1;
     }
 
-    private void processBlock(byte[] data, int ofs) {
-        if (data.length - ofs < AES_BLOCK_SIZE) {
-            throw new RuntimeException("need complete block");
-        }
-        state0 ^= getLong(data, ofs);
-        state1 ^= getLong(data, ofs + 8);
-        blockMult(subkeyH0, subkeyH1);
+    private static void processBlock(byte[] data, int ofs, long[] st, long[] subH) {
+        st[0] ^= getLong(data, ofs);
+        st[1] ^= getLong(data, ofs + 8);
+        blockMult(st, subH);
     }
 
     void update(byte[] in) {
@@ -185,22 +189,57 @@
     }
 
     void update(byte[] in, int inOfs, int inLen) {
-        if (inLen - inOfs > in.length) {
-            throw new RuntimeException("input length out of bound");
+        if (inLen == 0) {
+            return;
+        }
+        ghashRangeCheck(in, inOfs, inLen, state, subkeyH);
+        processBlocks(in, inOfs, inLen/AES_BLOCK_SIZE, state, subkeyH);
+    }
+
+    private static void ghashRangeCheck(byte[] in, int inOfs, int inLen, long[] st, long[] subH) {
+        if (inLen < 0) {
+            throw new RuntimeException("invalid input length: " + inLen);
+        }
+        if (inOfs < 0) {
+            throw new RuntimeException("invalid offset: " + inOfs);
+        }
+        if (inLen > in.length - inOfs) {
+            throw new RuntimeException("input length out of bound: " +
+                                       inLen + " > " + (in.length - inOfs));
         }
         if (inLen % AES_BLOCK_SIZE != 0) {
-            throw new RuntimeException("input length unsupported");
+            throw new RuntimeException("input length/block size mismatch: " +
+                                       inLen);
         }
 
-        for (int i = inOfs; i < (inOfs + inLen); i += AES_BLOCK_SIZE) {
-            processBlock(in, i);
+        // These two checks are for C2 checking
+        if (st.length != 2) {
+            throw new RuntimeException("internal state has invalid length: " +
+                                       st.length);
+        }
+        if (subH.length != 2) {
+            throw new RuntimeException("internal subkeyH has invalid length: " +
+                                       subH.length);
+        }
+    }
+    /*
+     * This is an intrinsified method.  The method's argument list must match
+     * the hotspot signature.  This method and methods called by it, cannot
+     * throw exceptions or allocate arrays as it will breaking intrinsics
+     */
+    private static void processBlocks(byte[] data, int inOfs, int blocks, long[] st, long[] subH) {
+        int offset = inOfs;
+        while (blocks > 0) {
+            processBlock(data, offset, st, subH);
+            blocks--;
+            offset += AES_BLOCK_SIZE;
         }
     }
 
     byte[] digest() {
         byte[] result = new byte[AES_BLOCK_SIZE];
-        putLong(result, 0, state0);
-        putLong(result, 8, state1);
+        putLong(result, 0, state[0]);
+        putLong(result, 8, state[1]);
         reset();
         return result;
     }
--- a/src/java.base/share/classes/com/sun/crypto/provider/OAEPParameters.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/com/sun/crypto/provider/OAEPParameters.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -121,7 +121,7 @@
             } else if (data.isContextSpecific((byte) 0x01)) {
                 // mgf algid
                 AlgorithmId val = AlgorithmId.parse(data.data.getDerValue());
-                if (!val.getOID().equals((Object) OID_MGF1)) {
+                if (!val.getOID().equals(OID_MGF1)) {
                     throw new IOException("Only MGF1 mgf is supported");
                 }
                 AlgorithmId params = AlgorithmId.parse(
@@ -144,7 +144,7 @@
             } else if (data.isContextSpecific((byte) 0x02)) {
                 // pSource algid
                 AlgorithmId val = AlgorithmId.parse(data.data.getDerValue());
-                if (!val.getOID().equals((Object) OID_PSpecified)) {
+                if (!val.getOID().equals(OID_PSpecified)) {
                     throw new IOException("Wrong OID for pSpecified");
                 }
                 DerInputStream dis = new DerInputStream(val.getEncodedParams());
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/Attribute.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/Attribute.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1235,7 +1235,7 @@
         int sofar = 0;  // how far have we processed the layout?
         for (;;) {
             // for each dash, collect everything up to the dash
-            result.append(layout.substring(sofar, dash));
+            result.append(layout, sofar, dash);
             sofar = dash+1;  // skip the dash
             // then collect intermediate values
             int value0 = parseIntBefore(layout, dash);
@@ -1249,7 +1249,7 @@
             dash = findCaseDash(layout, sofar);
             if (dash < 0)  break;
         }
-        result.append(layout.substring(sofar));  // collect the rest
+        result.append(layout, sofar, layout.length());  // collect the rest
         return result.toString();
     }
     static {
--- a/src/java.base/share/classes/java/io/BufferedOutputStream.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/java/io/BufferedOutputStream.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2015, 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,8 +34,7 @@
  * @author  Arthur van Hoff
  * @since   1.0
  */
-public
-class BufferedOutputStream extends FilterOutputStream {
+public class BufferedOutputStream extends FilterOutputStream {
     /**
      * The internal buffer where data is stored.
      */
@@ -90,6 +89,7 @@
      * @param      b   the byte to be written.
      * @exception  IOException  if an I/O error occurs.
      */
+    @Override
     public synchronized void write(int b) throws IOException {
         if (count >= buf.length) {
             flushBuffer();
@@ -113,6 +113,7 @@
      * @param      len   the number of bytes to write.
      * @exception  IOException  if an I/O error occurs.
      */
+    @Override
     public synchronized void write(byte b[], int off, int len) throws IOException {
         if (len >= buf.length) {
             /* If the request length exceeds the size of the output buffer,
@@ -136,6 +137,7 @@
      * @exception  IOException  if an I/O error occurs.
      * @see        java.io.FilterOutputStream#out
      */
+    @Override
     public synchronized void flush() throws IOException {
         flushBuffer();
         out.flush();
--- a/src/java.base/share/classes/java/io/FilterOutputStream.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/java/io/FilterOutputStream.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2015, 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,13 +41,15 @@
  * @author  Jonathan Payne
  * @since   1.0
  */
-public
-class FilterOutputStream extends OutputStream {
+public class FilterOutputStream extends OutputStream {
     /**
      * The underlying output stream to be filtered.
      */
     protected OutputStream out;
 
+    /**
+     * Whether the stream is closed; implicitly initialized to false.
+     */
     private boolean closed;
 
     /**
@@ -75,6 +77,7 @@
      * @param      b   the <code>byte</code>.
      * @exception  IOException  if an I/O error occurs.
      */
+    @Override
     public void write(int b) throws IOException {
         out.write(b);
     }
@@ -95,6 +98,7 @@
      * @exception  IOException  if an I/O error occurs.
      * @see        java.io.FilterOutputStream#write(byte[], int, int)
      */
+    @Override
     public void write(byte b[]) throws IOException {
         write(b, 0, b.length);
     }
@@ -119,6 +123,7 @@
      * @exception  IOException  if an I/O error occurs.
      * @see        java.io.FilterOutputStream#write(int)
      */
+    @Override
     public void write(byte b[], int off, int len) throws IOException {
         if ((off | len | (b.length - (len + off)) | (off + len)) < 0)
             throw new IndexOutOfBoundsException();
@@ -138,6 +143,7 @@
      * @exception  IOException  if an I/O error occurs.
      * @see        java.io.FilterOutputStream#out
      */
+    @Override
     public void flush() throws IOException {
         out.flush();
     }
@@ -154,13 +160,40 @@
      * @see        java.io.FilterOutputStream#flush()
      * @see        java.io.FilterOutputStream#out
      */
-    @SuppressWarnings("try")
+    @Override
     public void close() throws IOException {
-        if (closed)
+        if (closed) {
             return;
+        }
         closed = true;
-        try (OutputStream ostream = out) {
+
+        Throwable flushException = null;
+        try {
             flush();
+        } catch (Throwable e) {
+            flushException = e;
+            throw e;
+        } finally {
+            if (flushException == null) {
+                out.close();
+            } else {
+                try {
+                    out.close();
+                } catch (Throwable closeException) {
+                   // evaluate possible precedence of flushException over closeException
+                   if ((flushException instanceof ThreadDeath) &&
+                       !(closeException instanceof ThreadDeath)) {
+                       flushException.addSuppressed(closeException);
+                       throw (ThreadDeath) flushException;
+                   }
+
+                    if (flushException != closeException) {
+                        closeException.addSuppressed(flushException);
+                    }
+
+                    throw closeException;
+                }
+            }
         }
     }
 }
--- a/src/java.base/share/classes/java/io/StringWriter.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/java/io/StringWriter.java	Thu Jul 02 16:08:47 2015 -0700
@@ -109,7 +109,7 @@
      * @param  len  Number of characters to write
      */
     public void write(String str, int off, int len)  {
-        buf.append(str.substring(off, off + len));
+        buf.append(str, off, off + len);
     }
 
     /**
--- a/src/java.base/share/classes/java/lang/AbstractStringBuilder.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/java/lang/AbstractStringBuilder.java	Thu Jul 02 16:08:47 2015 -0700
@@ -515,8 +515,12 @@
                 + s.length());
         int len = end - start;
         ensureCapacityInternal(count + len);
-        for (int i = start, j = count; i < end; i++, j++)
-            value[j] = s.charAt(i);
+        if (s instanceof String) {
+            ((String)s).getChars(start, end, value, count);
+        } else {
+            for (int i = start, j = count; i < end; i++, j++)
+                value[j] = s.charAt(i);
+        }
         count += len;
         return this;
     }
--- a/src/java.base/share/classes/java/net/NetworkInterface.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/java/net/NetworkInterface.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, 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,10 +25,14 @@
 
 package java.net;
 
+import java.util.Arrays;
 import java.util.Enumeration;
 import java.util.NoSuchElementException;
-import sun.security.action.*;
 import java.security.AccessController;
+import java.util.Spliterator;
+import java.util.Spliterators;
+import java.util.stream.Stream;
+import java.util.stream.StreamSupport;
 
 /**
  * This class represents a Network Interface made up of a name,
@@ -95,8 +99,8 @@
     }
 
     /**
-     * Convenience method to return an Enumeration with all or a
-     * subset of the InetAddresses bound to this network interface.
+     * Get an Enumeration with all or a subset of the InetAddresses bound to
+     * this network interface.
      * <p>
      * If there is a security manager, its {@code checkConnect}
      * method is called for each InetAddress. Only InetAddresses where
@@ -104,53 +108,56 @@
      * will be returned in the Enumeration. However, if the caller has the
      * {@link NetPermission}("getNetworkInformation") permission, then all
      * InetAddresses are returned.
+     *
      * @return an Enumeration object with all or a subset of the InetAddresses
      * bound to this network interface
+     * @see #inetAddresses()
      */
     public Enumeration<InetAddress> getInetAddresses() {
+        return enumerationFromArray(getCheckedInetAddresses());
+    }
 
-        class checkedAddresses implements Enumeration<InetAddress> {
+    /**
+     * Get a Stream of all or a subset of the InetAddresses bound to this
+     * network interface.
+     * <p>
+     * If there is a security manager, its {@code checkConnect}
+     * method is called for each InetAddress. Only InetAddresses where
+     * the {@code checkConnect} doesn't throw a SecurityException will be
+     * returned in the Stream. However, if the caller has the
+     * {@link NetPermission}("getNetworkInformation") permission, then all
+     * InetAddresses are returned.
+     *
+     * @return a Stream object with all or a subset of the InetAddresses
+     * bound to this network interface
+     * @since 1.9
+     */
+    public Stream<InetAddress> inetAddresses() {
+        return streamFromArray(getCheckedInetAddresses());
+    }
 
-            private int i=0, count=0;
-            private InetAddress local_addrs[];
+    private InetAddress[] getCheckedInetAddresses() {
+        InetAddress[] local_addrs = new InetAddress[addrs.length];
+        boolean trusted = true;
 
-            checkedAddresses() {
-                local_addrs = new InetAddress[addrs.length];
-                boolean trusted = true;
-
-                SecurityManager sec = System.getSecurityManager();
-                if (sec != null) {
-                    try {
-                        sec.checkPermission(new NetPermission("getNetworkInformation"));
-                    } catch (SecurityException e) {
-                        trusted = false;
-                    }
-                }
-                for (int j=0; j<addrs.length; j++) {
-                    try {
-                        if (sec != null && !trusted) {
-                            sec.checkConnect(addrs[j].getHostAddress(), -1);
-                        }
-                        local_addrs[count++] = addrs[j];
-                    } catch (SecurityException e) { }
-                }
-
-            }
-
-            public InetAddress nextElement() {
-                if (i < count) {
-                    return local_addrs[i++];
-                } else {
-                    throw new NoSuchElementException();
-                }
-            }
-
-            public boolean hasMoreElements() {
-                return (i < count);
+        SecurityManager sec = System.getSecurityManager();
+        if (sec != null) {
+            try {
+                sec.checkPermission(new NetPermission("getNetworkInformation"));
+            } catch (SecurityException e) {
+                trusted = false;
             }
         }
-        return new checkedAddresses();
-
+        int i = 0;
+        for (int j = 0; j < addrs.length; j++) {
+            try {
+                if (!trusted) {
+                    sec.checkConnect(addrs[j].getHostAddress(), -1);
+                }
+                local_addrs[i++] = addrs[j];
+            } catch (SecurityException e) { }
+        }
+        return Arrays.copyOf(local_addrs, i);
     }
 
     /**
@@ -188,30 +195,23 @@
      *
      * @return an Enumeration object with all of the subinterfaces
      * of this network interface
+     * @see #subInterfaces()
      * @since 1.6
      */
     public Enumeration<NetworkInterface> getSubInterfaces() {
-        class subIFs implements Enumeration<NetworkInterface> {
+        return enumerationFromArray(childs);
+    }
 
-            private int i=0;
-
-            subIFs() {
-            }
-
-            public NetworkInterface nextElement() {
-                if (i < childs.length) {
-                    return childs[i++];
-                } else {
-                    throw new NoSuchElementException();
-                }
-            }
-
-            public boolean hasMoreElements() {
-                return (i < childs.length);
-            }
-        }
-        return new subIFs();
-
+    /**
+     * Get a Stream of all subinterfaces (also known as virtual
+     * interfaces) attached to this network interface.
+     *
+     * @return a Stream object with all of the subinterfaces
+     * of this network interface
+     * @since 1.9
+     */
+    public Stream<NetworkInterface> subInterfaces() {
+        return streamFromArray(childs);
     }
 
     /**
@@ -326,43 +326,80 @@
     }
 
     /**
-     * Returns all the interfaces on this machine. The {@code Enumeration}
-     * contains at least one element, possibly representing a loopback
-     * interface that only supports communication between entities on
+     * Returns an {@code Enumeration} of all the interfaces on this machine. The
+     * {@code Enumeration} contains at least one element, possibly representing
+     * a loopback interface that only supports communication between entities on
      * this machine.
      *
-     * NOTE: can use getNetworkInterfaces()+getInetAddresses()
-     *       to obtain all IP addresses for this node
+     * @apiNote this method can be used in combination with
+     * {@link #getInetAddresses()} to obtain all IP addresses for this node
      *
      * @return an Enumeration of NetworkInterfaces found on this machine
      * @exception  SocketException  if an I/O error occurs.
+     * @see #networkInterfaces()
      */
-
     public static Enumeration<NetworkInterface> getNetworkInterfaces()
         throws SocketException {
-        final NetworkInterface[] netifs = getAll();
+        NetworkInterface[] netifs = getAll();
+        assert netifs != null && netifs.length > 0;
 
-        // specified to return null if no network interfaces
-        if (netifs == null)
-            return null;
+        return enumerationFromArray(netifs);
+    }
 
+    /**
+     * Returns a {@code Stream} of all the interfaces on this machine.  The
+     * {@code Stream} contains at least one interface, possibly representing a
+     * loopback interface that only supports communication between entities on
+     * this machine.
+     *
+     * @apiNote this method can be used in combination with
+     * {@link #inetAddresses()}} to obtain a stream of all IP addresses for
+     * this node, for example:
+     * <pre> {@code
+     * Stream<InetAddress> addrs = NetworkInterface.networkInterfaces()
+     *     .flatMap(NetworkInterface::inetAddresses);
+     * }</pre>
+     *
+     * @return a Stream of NetworkInterfaces found on this machine
+     * @exception  SocketException  if an I/O error occurs.
+     * @since 1.9
+     */
+    public static Stream<NetworkInterface> networkInterfaces()
+        throws SocketException {
+        NetworkInterface[] netifs = getAll();
+        assert netifs != null && netifs.length > 0;
+
+        return streamFromArray(netifs);
+    }
+
+    private static <T> Enumeration<T> enumerationFromArray(T[] a) {
         return new Enumeration<>() {
-            private int i = 0;
-            public NetworkInterface nextElement() {
-                if (netifs != null && i < netifs.length) {
-                    NetworkInterface netif = netifs[i++];
-                    return netif;
+            int i = 0;
+
+            @Override
+            public T nextElement() {
+                if (i < a.length) {
+                    return a[i++];
                 } else {
                     throw new NoSuchElementException();
                 }
             }
 
+            @Override
             public boolean hasMoreElements() {
-                return (netifs != null && i < netifs.length);
+                return i < a.length;
             }
         };
     }
 
+    private static <T> Stream<T> streamFromArray(T[] a) {
+        return StreamSupport.stream(
+                Spliterators.spliterator(
+                        a,
+                        Spliterator.DISTINCT | Spliterator.IMMUTABLE | Spliterator.NONNULL),
+                false);
+    }
+
     private native static NetworkInterface[] getAll()
         throws SocketException;
 
--- a/src/java.base/share/classes/java/net/URI.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/java/net/URI.java	Thu Jul 02 16:08:47 2015 -0700
@@ -2018,7 +2018,7 @@
             StringBuilder sb = new StringBuilder(base.length() + cn);
             // 5.2 (6a)
             if (i >= 0)
-                sb.append(base.substring(0, i + 1));
+                sb.append(base, 0, i + 1);
             // 5.2 (6b)
             sb.append(child);
             path = sb.toString();
@@ -2686,7 +2686,7 @@
                 if (!match(c, lowMask, highMask)) {
                     if (sb == null) {
                         sb = new StringBuffer();
-                        sb.append(s.substring(0, i));
+                        sb.append(s, 0, i);
                     }
                     appendEscape(sb, (byte)c);
                 } else {
@@ -2698,7 +2698,7 @@
                            || Character.isISOControl(c))) {
                 if (sb == null) {
                     sb = new StringBuffer();
-                    sb.append(s.substring(0, i));
+                    sb.append(s, 0, i);
                 }
                 appendEncoded(sb, c);
             } else {
--- a/src/java.base/share/classes/java/security/PermissionCollection.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/java/security/PermissionCollection.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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,6 +26,8 @@
 package java.security;
 
 import java.util.*;
+import java.util.stream.Stream;
+import java.util.stream.StreamSupport;
 
 /**
  * Abstract class representing a collection of Permission objects.
@@ -126,10 +128,35 @@
      * Returns an enumeration of all the Permission objects in the collection.
      *
      * @return an enumeration of all the Permissions.
+     * @see #elementsAsStream()
      */
     public abstract Enumeration<Permission> elements();
 
     /**
+     * Returns a stream of all the Permission objects in the collection.
+     *
+     * <p> The collection should not be modified (see {@link #add}) during the
+     * execution of the terminal stream operation. Otherwise, the result of the
+     * terminal stream operation is undefined.
+     *
+     * @implSpec
+     * The default implementation creates a stream whose source is derived from
+     * the enumeration returned from a call to {@link #elements()}.
+     *
+     * @return a stream of all the Permissions.
+     * @since 1.9
+     */
+    public Stream<Permission> elementsAsStream() {
+        int characteristics = isReadOnly()
+                ? Spliterator.NONNULL | Spliterator.IMMUTABLE
+                : Spliterator.NONNULL;
+        return StreamSupport.stream(
+                Spliterators.spliteratorUnknownSize(
+                        elements().asIterator(), characteristics),
+                false);
+    }
+
+    /**
      * Marks this PermissionCollection object as "readonly". After
      * a PermissionCollection object
      * is marked as readonly, no new Permission objects can be added to it
--- a/src/java.base/share/classes/java/security/cert/X509CertSelector.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/java/security/cert/X509CertSelector.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, 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
@@ -2238,7 +2238,7 @@
                     + subjectPublicKeyAlgID + ", xcert subjectPublicKeyAlgID = "
                     + algID.getOID());
             }
-            if (!subjectPublicKeyAlgID.equals((Object)algID.getOID())) {
+            if (!subjectPublicKeyAlgID.equals(algID.getOID())) {
                 if (debug != null) {
                     debug.println("X509CertSelector.match: "
                         + "subject public key alg IDs don't match");
--- a/src/java.base/share/classes/java/text/MergeCollation.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/java/text/MergeCollation.java	Thu Jul 02 16:08:47 2015 -0700
@@ -329,8 +329,8 @@
                 PatternEntry e = patterns.get(i);
                 if (e.chars.regionMatches(0,entry.chars,0,
                                               e.chars.length())) {
-                    excessChars.append(entry.chars.substring(e.chars.length(),
-                                                            entry.chars.length()));
+                    excessChars.append(entry.chars, e.chars.length(),
+                            entry.chars.length());
                     break;
                 }
             }
--- a/src/java.base/share/classes/java/text/MessageFormat.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/java/text/MessageFormat.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1239,7 +1239,7 @@
         int lastOffset = 0;
         int last = result.length();
         for (int i = 0; i <= maxOffset; ++i) {
-            result.append(pattern.substring(lastOffset, offsets[i]));
+            result.append(pattern, lastOffset, offsets[i]);
             lastOffset = offsets[i];
             int argumentNumber = argumentNumbers[i];
             if (arguments == null || argumentNumber >= arguments.length) {
@@ -1332,7 +1332,7 @@
                 }
             }
         }
-        result.append(pattern.substring(lastOffset, pattern.length()));
+        result.append(pattern, lastOffset, pattern.length());
         if (characterIterators != null && last != result.length()) {
             characterIterators.add(createAttributedCharacterIterator(
                                    result.substring(last)));
--- a/src/java.base/share/classes/java/util/Collections.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/java/util/Collections.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -4268,6 +4268,7 @@
 
         public boolean hasMoreElements() { return false; }
         public E nextElement() { throw new NoSuchElementException(); }
+        public Iterator<E> asIterator() { return emptyIterator(); }
     }
 
     /**
@@ -5199,6 +5200,11 @@
      * interoperability with legacy APIs that require an enumeration
      * as input.
      *
+     * <p>The iterator returned from a call to {@link Enumeration#asIterator()}
+     * does not support removal of elements from the specified collection.  This
+     * is necessary to avoid unintentionally increasing the capabilities of the
+     * returned enumeration.
+     *
      * @param  <T> the class of the objects in the collection
      * @param c the collection for which an enumeration is to be returned.
      * @return an enumeration over the specified collection.
--- a/src/java.base/share/classes/java/util/LinkedList.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/java/util/LinkedList.java	Thu Jul 02 16:08:47 2015 -0700
@@ -88,18 +88,22 @@
 
     /**
      * Pointer to first node.
-     * Invariant: (first == null && last == null) ||
-     *            (first.prev == null && first.item != null)
      */
     transient Node<E> first;
 
     /**
      * Pointer to last node.
-     * Invariant: (first == null && last == null) ||
-     *            (last.next == null && last.item != null)
      */
     transient Node<E> last;
 
+    /*
+    void dataStructureInvariants() {
+        assert (size == 0)
+            ? (first == null && last == null)
+            : (first.prev == null && last.next == null);
+    }
+    */
+
     /**
      * Constructs an empty list.
      */
--- a/src/java.base/share/classes/java/util/jar/JarFile.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/java/util/jar/JarFile.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -265,6 +265,10 @@
         public JarEntry nextElement() {
             return next();
         }
+
+        public Iterator<JarEntry> asIterator() {
+            return this;
+        }
     }
 
     /**
--- a/src/java.base/share/classes/java/util/zip/ZipFile.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/java/util/zip/ZipFile.java	Thu Jul 02 16:08:47 2015 -0700
@@ -526,6 +526,10 @@
                 return ze;
             }
         }
+
+        public Iterator<ZipEntry> asIterator() {
+            return this;
+        }
     }
 
     /**
--- a/src/java.base/share/classes/sun/invoke/util/BytecodeName.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/invoke/util/BytecodeName.java	Thu Jul 02 16:08:47 2015 -0700
@@ -511,7 +511,7 @@
                 if (s.charAt(0) != ESCAPE_C && i > 0)
                     sb.append(NULL_ESCAPE);
                 // append the string so far, which is unremarkable:
-                sb.append(s.substring(0, i));
+                sb.append(s, 0, i);
             }
 
             // rewrite \ to \-, / to \|, etc.
@@ -544,7 +544,7 @@
                     if (sb == null) {
                         sb = new StringBuilder(s.length());
                         // append the string so far, which is unremarkable:
-                        sb.append(s.substring(stringStart, i));
+                        sb.append(s, stringStart, i);
                     }
                     ++i;  // skip both characters
                     c = oc;
--- a/src/java.base/share/classes/sun/net/www/ParseUtil.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/net/www/ParseUtil.java	Thu Jul 02 16:08:47 2015 -0700
@@ -451,7 +451,7 @@
                 if (!match(c, lowMask, highMask) && !isEscaped(s, i)) {
                     if (sb == null) {
                         sb = new StringBuffer();
-                        sb.append(s.substring(0, i));
+                        sb.append(s, 0, i);
                     }
                     appendEscape(sb, (byte)c);
                 } else {
@@ -463,7 +463,7 @@
                            || Character.isISOControl(c))) {
                 if (sb == null) {
                     sb = new StringBuffer();
-                    sb.append(s.substring(0, i));
+                    sb.append(s, 0, i);
                 }
                 appendEncoded(sb, c);
             } else {
--- a/src/java.base/share/classes/sun/nio/fs/AbstractFileTypeDetector.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/nio/fs/AbstractFileTypeDetector.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, 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,6 +42,27 @@
     }
 
     /**
+     * Returns the extension of a file name, specifically the portion of the
+     * parameter string after the first dot. If the parameter is {@code null},
+     * empty, does not contain a dot, or the dot is the last character, then an
+     * empty string is returned, otherwise the characters after the dot are
+     * returned.
+     *
+     * @param name A file name
+     * @return The characters after the first dot or an empty string.
+     */
+    protected final String getExtension(String name) {
+        String ext = "";
+        if (name != null && !name.isEmpty()) {
+            int dot = name.indexOf('.');
+            if ((dot >= 0) && (dot < name.length() - 1)) {
+                ext = name.substring(dot + 1);
+            }
+        }
+        return ext;
+    }
+
+    /**
      * Invokes the appropriate probe method to guess a file's content type,
      * and checks that the content type's syntax is valid.
      */
--- a/src/java.base/share/classes/sun/security/pkcs/ContentInfo.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/security/pkcs/ContentInfo.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, 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
@@ -163,9 +163,9 @@
     }
 
     public byte[] getData() throws IOException {
-        if (contentType.equals((Object)DATA_OID) ||
-            contentType.equals((Object)OLD_DATA_OID) ||
-            contentType.equals((Object)TIMESTAMP_TOKEN_INFO_OID)) {
+        if (contentType.equals(DATA_OID) ||
+            contentType.equals(OLD_DATA_OID) ||
+            contentType.equals(TIMESTAMP_TOKEN_INFO_OID)) {
             if (content == null)
                 return null;
             else
--- a/src/java.base/share/classes/sun/security/pkcs/PKCS7.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/security/pkcs/PKCS7.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, 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
@@ -182,13 +182,12 @@
         contentType = contentInfo.contentType;
         DerValue content = contentInfo.getContent();
 
-        if (contentType.equals((Object)ContentInfo.SIGNED_DATA_OID)) {
+        if (contentType.equals(ContentInfo.SIGNED_DATA_OID)) {
             parseSignedData(content);
-        } else if (contentType.equals((Object)ContentInfo.OLD_SIGNED_DATA_OID)) {
+        } else if (contentType.equals(ContentInfo.OLD_SIGNED_DATA_OID)) {
             // This is for backwards compatibility with JDK 1.1.x
             parseOldSignedData(content);
-        } else if (contentType.equals((Object)
-                       ContentInfo.NETSCAPE_CERT_SEQUENCE_OID)){
+        } else if (contentType.equals(ContentInfo.NETSCAPE_CERT_SEQUENCE_OID)){
             parseNetscapeCertChain(content);
         } else {
             throw new ParsingException("content type " + contentType +
--- a/src/java.base/share/classes/sun/security/pkcs/SignerInfo.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/security/pkcs/SignerInfo.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, 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
@@ -307,7 +307,7 @@
                        authenticatedAttributes.getAttributeValue(
                          PKCS9Attribute.CONTENT_TYPE_OID);
                 if (contentType == null ||
-                    !contentType.equals((Object)content.contentType))
+                    !contentType.equals(content.contentType))
                     return null;  // contentType does not match, bad SignerInfo
 
                 // now, check message digest
--- a/src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java	Thu Jul 02 16:08:47 2015 -0700
@@ -789,7 +789,7 @@
                 }
             }
             if (params != null) {
-                if (algorithm.equals((Object)pbes2_OID)) {
+                if (algorithm.equals(pbes2_OID)) {
                     algParams = AlgorithmParameters.getInstance("PBES2");
                 } else {
                     algParams = AlgorithmParameters.getInstance("PBE");
@@ -926,7 +926,7 @@
     private static String mapPBEParamsToAlgorithm(ObjectIdentifier algorithm,
         AlgorithmParameters algParams) throws NoSuchAlgorithmException {
         // Check for PBES2 algorithms
-        if (algorithm.equals((Object)pbes2_OID) && algParams != null) {
+        if (algorithm.equals(pbes2_OID) && algParams != null) {
             return algParams.toString();
         }
         return algorithm.toString();
@@ -1937,7 +1937,7 @@
         ContentInfo authSafe = new ContentInfo(s);
         ObjectIdentifier contentType = authSafe.getContentType();
 
-        if (contentType.equals((Object)ContentInfo.DATA_OID)) {
+        if (contentType.equals(ContentInfo.DATA_OID)) {
            authSafeData = authSafe.getData();
         } else /* signed data */ {
            throw new IOException("public key protected PKCS12 not supported");
@@ -1965,14 +1965,14 @@
             safeContents = new ContentInfo(sci);
             contentType = safeContents.getContentType();
             safeContentsData = null;
-            if (contentType.equals((Object)ContentInfo.DATA_OID)) {
+            if (contentType.equals(ContentInfo.DATA_OID)) {
 
                 if (debug != null) {
                     debug.println("Loading PKCS#7 data content-type");
                 }
 
                 safeContentsData = safeContents.getData();
-            } else if (contentType.equals((Object)ContentInfo.ENCRYPTED_DATA_OID)) {
+            } else if (contentType.equals(ContentInfo.ENCRYPTED_DATA_OID)) {
                 if (password == null) {
 
                     if (debug != null) {
@@ -2178,12 +2178,12 @@
                                         + bagValue.tag);
             }
             bagValue = bagValue.data.getDerValue();
-            if (bagId.equals((Object)PKCS8ShroudedKeyBag_OID)) {
+            if (bagId.equals(PKCS8ShroudedKeyBag_OID)) {
                 PrivateKeyEntry kEntry = new PrivateKeyEntry();
                 kEntry.protectedPrivKey = bagValue.toByteArray();
                 bagItem = kEntry;
                 privateKeyCount++;
-            } else if (bagId.equals((Object)CertBag_OID)) {
+            } else if (bagId.equals(CertBag_OID)) {
                 DerInputStream cs = new DerInputStream(bagValue.toByteArray());
                 DerValue[] certValues = cs.getSequence(2);
                 ObjectIdentifier certId = certValues[0].getOID();
@@ -2198,7 +2198,7 @@
                         (new ByteArrayInputStream(certValue.getOctetString()));
                 bagItem = cert;
                 certificateCount++;
-            } else if (bagId.equals((Object)SecretBag_OID)) {
+            } else if (bagId.equals(SecretBag_OID)) {
                 DerInputStream ss = new DerInputStream(bagValue.toByteArray());
                 DerValue[] secretValues = ss.getSequence(2);
                 ObjectIdentifier secretId = secretValues[0].getOID();
@@ -2249,12 +2249,12 @@
                         throw new IOException("Attribute " + attrId +
                                 " should have a value " + e.getMessage());
                     }
-                    if (attrId.equals((Object)PKCS9FriendlyName_OID)) {
+                    if (attrId.equals(PKCS9FriendlyName_OID)) {
                         alias = valSet[0].getBMPString();
-                    } else if (attrId.equals((Object)PKCS9LocalKeyId_OID)) {
+                    } else if (attrId.equals(PKCS9LocalKeyId_OID)) {
                         keyId = valSet[0].getOctetString();
                     } else if
-                        (attrId.equals((Object)TrustedKeyUsage_OID)) {
+                        (attrId.equals(TrustedKeyUsage_OID)) {
                         trustedKeyUsage = new ObjectIdentifier[valSet.length];
                         for (int k = 0; k < valSet.length; k++) {
                             trustedKeyUsage[k] = valSet[k].getOID();
--- a/src/java.base/share/classes/sun/security/provider/certpath/OCSP.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/security/provider/certpath/OCSP.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, 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
@@ -322,7 +322,7 @@
 
         List<AccessDescription> descriptions = aia.getAccessDescriptions();
         for (AccessDescription description : descriptions) {
-            if (description.getAccessMethod().equals((Object)
+            if (description.getAccessMethod().equals(
                 AccessDescription.Ad_OCSP_Id)) {
 
                 GeneralName generalName = description.getAccessLocation();
--- a/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/security/provider/certpath/OCSPResponse.java	Thu Jul 02 16:08:47 2015 -0700
@@ -239,7 +239,7 @@
         // responseType
         derIn = tmp.data;
         ObjectIdentifier responseType = derIn.getOID();
-        if (responseType.equals((Object)OCSP_BASIC_RESPONSE_OID)) {
+        if (responseType.equals(OCSP_BASIC_RESPONSE_OID)) {
             if (debug != null) {
                 debug.println("OCSP response type: basic");
             }
@@ -338,8 +338,7 @@
                         debug.println("OCSP extension: " + ext);
                     }
                     // Only the NONCE extension is recognized
-                    if (ext.getExtensionId().equals((Object)
-                        OCSP.NONCE_EXTENSION_OID))
+                    if (ext.getExtensionId().equals(OCSP.NONCE_EXTENSION_OID))
                     {
                         nonce = ext.getExtensionValue();
                     } else if (ext.isCritical())  {
--- a/src/java.base/share/classes/sun/security/provider/certpath/URICertStore.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/security/provider/certpath/URICertStore.java	Thu Jul 02 16:08:47 2015 -0700
@@ -202,7 +202,7 @@
      * object of a certificate's Authority Information Access Extension.
      */
     static CertStore getInstance(AccessDescription ad) {
-        if (!ad.getAccessMethod().equals((Object)
+        if (!ad.getAccessMethod().equals(
                 AccessDescription.Ad_CAISSUERS_Id)) {
             return null;
         }
--- a/src/java.base/share/classes/sun/security/rsa/RSASignature.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/security/rsa/RSASignature.java	Thu Jul 02 16:08:47 2015 -0700
@@ -232,7 +232,7 @@
             throw new IOException("SEQUENCE length error");
         }
         AlgorithmId algId = AlgorithmId.parse(values[0]);
-        if (algId.getOID().equals((Object)oid) == false) {
+        if (algId.getOID().equals(oid) == false) {
             throw new IOException("ObjectIdentifier mismatch: "
                 + algId.getOID());
         }
--- a/src/java.base/share/classes/sun/security/tools/keytool/Main.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/security/tools/keytool/Main.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1280,7 +1280,7 @@
         Iterator<PKCS10Attribute> attrs = req.getAttributes().getAttributes().iterator();
         while (attrs.hasNext()) {
             PKCS10Attribute attr = attrs.next();
-            if (attr.getAttributeId().equals((Object)PKCS9Attribute.EXTENSION_REQUEST_OID)) {
+            if (attr.getAttributeId().equals(PKCS9Attribute.EXTENSION_REQUEST_OID)) {
                 reqex = (CertificateExtensions)attr.getAttributeValue();
             }
         }
@@ -2338,7 +2338,7 @@
                 req.getSubjectName(), pkey.getFormat(), pkey.getAlgorithm());
         for (PKCS10Attribute attr: req.getAttributes().getAttributes()) {
             ObjectIdentifier oid = attr.getAttributeId();
-            if (oid.equals((Object)PKCS9Attribute.EXTENSION_REQUEST_OID)) {
+            if (oid.equals(PKCS9Attribute.EXTENSION_REQUEST_OID)) {
                 CertificateExtensions exts = (CertificateExtensions)attr.getAttributeValue();
                 if (exts != null) {
                     printExtensions(rb.getString("Extension.Request."), exts, out);
--- a/src/java.base/share/classes/sun/security/util/ObjectIdentifier.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/security/util/ObjectIdentifier.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, 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
@@ -319,14 +319,6 @@
     }
 
     /**
-     * @deprecated Use equals((Object)oid)
-     */
-    @Deprecated
-    public boolean equals(ObjectIdentifier other) {
-        return equals((Object)other);
-    }
-
-    /**
      * Compares this identifier with another, for equality.
      *
      * @return true iff the names are identical.
--- a/src/java.base/share/classes/sun/security/x509/AVA.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/security/x509/AVA.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, 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
@@ -364,8 +364,8 @@
 
         // encode as PrintableString unless value contains
         // non-PrintableString chars
-        if (this.oid.equals((Object)PKCS9Attribute.EMAIL_ADDRESS_OID) ||
-            (this.oid.equals((Object)X500Name.DOMAIN_COMPONENT_OID) &&
+        if (this.oid.equals(PKCS9Attribute.EMAIL_ADDRESS_OID) ||
+            (this.oid.equals(X500Name.DOMAIN_COMPONENT_OID) &&
                 PRESERVE_OLD_DC_ENCODING == false)) {
             // EmailAddress and DomainComponent must be IA5String
             return new DerValue(DerValue.tag_IA5String,
@@ -495,8 +495,8 @@
 
         // encode as PrintableString unless value contains
         // non-PrintableString chars
-        if (this.oid.equals((Object)PKCS9Attribute.EMAIL_ADDRESS_OID) ||
-            (this.oid.equals((Object)X500Name.DOMAIN_COMPONENT_OID) &&
+        if (this.oid.equals(PKCS9Attribute.EMAIL_ADDRESS_OID) ||
+            (this.oid.equals(X500Name.DOMAIN_COMPONENT_OID) &&
                 PRESERVE_OLD_DC_ENCODING == false)) {
             // EmailAddress and DomainComponent must be IA5String
             return new DerValue(DerValue.tag_IA5String, temp.toString());
--- a/src/java.base/share/classes/sun/security/x509/AccessDescription.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/security/x509/AccessDescription.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -95,19 +95,19 @@
         if (this == that) {
             return true;
         }
-        return (accessMethod.equals((Object)that.getAccessMethod()) &&
+        return (accessMethod.equals(that.getAccessMethod()) &&
             accessLocation.equals(that.getAccessLocation()));
     }
 
     public String toString() {
         String method = null;
-        if (accessMethod.equals((Object)Ad_CAISSUERS_Id)) {
+        if (accessMethod.equals(Ad_CAISSUERS_Id)) {
             method = "caIssuers";
-        } else if (accessMethod.equals((Object)Ad_CAREPOSITORY_Id)) {
+        } else if (accessMethod.equals(Ad_CAREPOSITORY_Id)) {
             method = "caRepository";
-        } else if (accessMethod.equals((Object)Ad_TIMESTAMPING_Id)) {
+        } else if (accessMethod.equals(Ad_TIMESTAMPING_Id)) {
             method = "timeStamping";
-        } else if (accessMethod.equals((Object)Ad_OCSP_Id)) {
+        } else if (accessMethod.equals(Ad_OCSP_Id)) {
             method = "ocsp";
         } else {
             method = accessMethod.toString();
--- a/src/java.base/share/classes/sun/security/x509/CertificateExtensions.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/security/x509/CertificateExtensions.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -241,7 +241,7 @@
 
     public String getNameByOid(ObjectIdentifier oid) throws IOException {
         for (String name: map.keySet()) {
-            if (map.get(name).getExtensionId().equals((Object)oid)) {
+            if (map.get(name).getExtensionId().equals(oid)) {
                 return name;
             }
         }
--- a/src/java.base/share/classes/sun/security/x509/CertificatePolicyId.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/security/x509/CertificatePolicyId.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -93,8 +93,7 @@
      */
     public boolean equals(Object other) {
         if (other instanceof CertificatePolicyId)
-            return id.equals((Object)
-                    ((CertificatePolicyId) other).getIdentifier());
+            return id.equals(((CertificatePolicyId) other).getIdentifier());
         else
             return false;
     }
--- a/src/java.base/share/classes/sun/security/x509/Extension.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/security/x509/Extension.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -264,7 +264,7 @@
         Extension otherExt = (Extension) other;
         if (critical != otherExt.critical)
             return false;
-        if (!extensionId.equals((Object)otherExt.extensionId))
+        if (!extensionId.equals(otherExt.extensionId))
             return false;
         return Arrays.equals(extensionValue, otherExt.extensionValue);
     }
--- a/src/java.base/share/classes/sun/security/x509/NameConstraintsExtension.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/security/x509/NameConstraintsExtension.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -579,7 +579,7 @@
     public boolean verifyRFC822SpecialCase(X500Name subject) throws IOException {
         for (AVA ava : subject.allAvas()) {
             ObjectIdentifier attrOID = ava.getObjectIdentifier();
-            if (attrOID.equals((Object)PKCS9Attribute.EMAIL_ADDRESS_OID)) {
+            if (attrOID.equals(PKCS9Attribute.EMAIL_ADDRESS_OID)) {
                 String attrValue = ava.getValueString();
                 if (attrValue != null) {
                     RFC822Name emailName;
--- a/src/java.base/share/classes/sun/security/x509/OIDName.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/security/x509/OIDName.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -120,7 +120,7 @@
 
         OIDName other = (OIDName)obj;
 
-        return oid.equals((Object)other.oid);
+        return oid.equals(other.oid);
     }
 
     /**
--- a/src/java.base/share/classes/sun/security/x509/OtherName.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/security/x509/OtherName.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -176,7 +176,7 @@
             return false;
         }
         OtherName otherOther = (OtherName)other;
-        if (!(otherOther.oid.equals((Object)oid))) {
+        if (!(otherOther.oid.equals(oid))) {
             return false;
         }
         GeneralNameInterface otherGNI = null;
--- a/src/java.base/share/classes/sun/security/x509/RDN.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/security/x509/RDN.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, 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
@@ -321,7 +321,7 @@
      */
     DerValue findAttribute(ObjectIdentifier oid) {
         for (int i = 0; i < assertion.length; i++) {
-            if (assertion[i].oid.equals((Object)oid)) {
+            if (assertion[i].oid.equals(oid)) {
                 return assertion[i].value;
             }
         }
--- a/src/java.base/share/classes/sun/security/x509/X509CRLEntryImpl.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/security/x509/X509CRLEntryImpl.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -414,7 +414,7 @@
                                                  e.hasMoreElements();) {
                     ex = e.nextElement();
                     inCertOID = ex.getExtensionId();
-                    if (inCertOID.equals((Object)findOID)) {
+                    if (inCertOID.equals(findOID)) {
                         crlExt = ex;
                         break;
                     }
--- a/src/java.base/share/classes/sun/security/x509/X509CRLImpl.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/security/x509/X509CRLImpl.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -1039,7 +1039,7 @@
                                                  e.hasMoreElements();) {
                     ex = e.nextElement();
                     inCertOID = ex.getExtensionId();
-                    if (inCertOID.equals((Object)findOID)) {
+                    if (inCertOID.equals(findOID)) {
                         crlExt = ex;
                         break;
                     }
--- a/src/java.base/share/classes/sun/security/x509/X509CertImpl.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/security/x509/X509CertImpl.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, 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
@@ -1339,7 +1339,7 @@
                     return ex;
                 }
                 for (Extension ex2: extensions.getAllExtensions()) {
-                    if (ex2.getExtensionId().equals((Object)oid)) {
+                    if (ex2.getExtensionId().equals(oid)) {
                         //XXXX May want to consider cloning this
                         return ex2;
                     }
@@ -1395,7 +1395,7 @@
 
                 for (Extension ex : exts.getAllExtensions()) {
                     ObjectIdentifier inCertOID = ex.getExtensionId();
-                    if (inCertOID.equals((Object)findOID)) {
+                    if (inCertOID.equals(findOID)) {
                         certExt = ex;
                         break;
                     }
--- a/src/java.base/share/classes/sun/text/normalizer/UnicodeSet.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/text/normalizer/UnicodeSet.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1850,7 +1850,7 @@
             syntaxError(chars, "Invalid property pattern");
         }
         chars.jumpahead(pos.getIndex());
-        rebuiltPat.append(patStr.substring(0, pos.getIndex()));
+        rebuiltPat.append(patStr, 0, pos.getIndex());
     }
 
     //----------------------------------------------------------------
--- a/src/java.base/share/classes/sun/util/BuddhistCalendar.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/classes/sun/util/BuddhistCalendar.java	Thu Jul 02 16:08:47 2015 -0700
@@ -242,12 +242,13 @@
             return s;
         }
         p += yearField.length();
-        StringBuilder sb = new StringBuilder(s.substring(0, p));
+        StringBuilder sb = new StringBuilder(s.length() + 10);
+        sb.append(s, 0, p);
         // Skip the year number
         while (Character.isDigit(s.charAt(p++)))
             ;
         int year = internalGet(YEAR) + BUDDHIST_YEAR_OFFSET;
-        sb.append(year).append(s.substring(p - 1));
+        sb.append(year).append(s, p - 1, s.length());
         return sb.toString();
     }
 
--- a/src/java.base/share/native/libjli/java.c	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/share/native/libjli/java.c	Thu Jul 02 16:08:47 2015 -0700
@@ -145,7 +145,7 @@
 static int knownVMsCount = 0;
 static int knownVMsLimit = 0;
 
-static void GrowKnownVMs();
+static void GrowKnownVMs(int minimum);
 static int  KnownVMIndex(const char* name);
 static void FreeKnownVMs();
 static jboolean IsWildCardEnabled();
--- a/src/java.base/unix/classes/java/io/UnixFileSystem.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/unix/classes/java/io/UnixFileSystem.java	Thu Jul 02 16:08:47 2015 -0700
@@ -65,8 +65,8 @@
         int n = len;
         while ((n > 0) && (pathname.charAt(n - 1) == '/')) n--;
         if (n == 0) return "/";
-        StringBuffer sb = new StringBuffer(pathname.length());
-        if (off > 0) sb.append(pathname.substring(0, off));
+        StringBuilder sb = new StringBuilder(pathname.length());
+        if (off > 0) sb.append(pathname, 0, off);
         char prevChar = 0;
         for (int i = off; i < n; i++) {
             char c = pathname.charAt(i);
--- a/src/java.base/unix/classes/sun/nio/fs/MimeTypesFileTypeDetector.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/unix/classes/sun/nio/fs/MimeTypesFileTypeDetector.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -83,18 +83,6 @@
         return mimeType;
     }
 
-    // Get the extension of a file name.
-    private static String getExtension(String name) {
-        String ext = "";
-        if (name != null && !name.isEmpty()) {
-            int dot = name.indexOf('.');
-            if ((dot >= 0) && (dot < name.length() - 1)) {
-                ext = name.substring(dot + 1);
-            }
-        }
-        return ext;
-    }
-
     /**
      * Parse the mime types file, and store the type-extension mappings into
      * mimeTypeMap. The mime types file is not loaded until the first probe
--- a/src/java.base/windows/classes/java/io/WinNTFileSystem.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.base/windows/classes/java/io/WinNTFileSystem.java	Thu Jul 02 16:08:47 2015 -0700
@@ -104,7 +104,7 @@
         if (off < 3) off = 0;   /* Avoid fencepost cases with UNC pathnames */
         int src;
         char slash = this.slash;
-        StringBuffer sb = new StringBuffer(len);
+        StringBuilder sb = new StringBuilder(len);
 
         if (off == 0) {
             /* Complete normalization, including prefix */
@@ -112,7 +112,7 @@
         } else {
             /* Partial normalization */
             src = off;
-            sb.append(path.substring(0, off));
+            sb.append(path, 0, off);
         }
 
         /* Remove redundant slashes from the remainder of the path, forcing all
@@ -156,8 +156,7 @@
             }
         }
 
-        String rv = sb.toString();
-        return rv;
+        return sb.toString();
     }
 
     /* A normal Win32 pathname contains no duplicate slashes, except possibly
@@ -172,7 +171,7 @@
                 else directory-relative (has form "z:foo")
            3  absolute local pathname (begins with "z:\\")
      */
-    private int normalizePrefix(String path, int len, StringBuffer sb) {
+    private int normalizePrefix(String path, int len, StringBuilder sb) {
         int src = 0;
         while ((src < len) && isSlash(path.charAt(src))) src++;
         char c;
--- a/src/java.desktop/macosx/classes/apple/laf/JRSUIControl.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.desktop/macosx/classes/apple/laf/JRSUIControl.java	Thu Jul 02 16:08:47 2015 -0700
@@ -275,7 +275,7 @@
     }
 
 
-    Hit getHitForPoint(final double x, final double y, final double w, final double h, final double hitX, final double hitY) {
+    Hit getHitForPoint(final int x, final int y, final int w, final int h, final int hitX, final int hitY) {
         sync();
         // reflect hitY about the midline of the control before sending to native
         final Hit hit = JRSUIConstants.getHit(getNativeHitPart(cfDictionaryPtr, priorEncodedProperties, currentEncodedProperties, x, y, w, h, hitX, 2 * y + h - hitY));
@@ -283,7 +283,7 @@
         return hit;
     }
 
-    void getPartBounds(final double[] rect, final double x, final double y, final double w, final double h, final int part) {
+    void getPartBounds(final double[] rect, final int x, final int y, final int w, final int h, final int part) {
         if (rect == null) throw new NullPointerException("Cannot load null rect");
         if (rect.length != 4) throw new IllegalArgumentException("Rect must have four elements");
 
@@ -292,7 +292,7 @@
         priorEncodedProperties = currentEncodedProperties;
     }
 
-    double getScrollBarOffsetChange(final double x, final double y, final double w, final double h, final int offset, final int visibleAmount, final int extent) {
+    double getScrollBarOffsetChange(final int x, final int y, final int w, final int h, final int offset, final int visibleAmount, final int extent) {
         sync();
         final double offsetChange = getNativeScrollBarOffsetChange(cfDictionaryPtr, priorEncodedProperties, currentEncodedProperties, x, y, w, h, offset, visibleAmount, extent);
         priorEncodedProperties = currentEncodedProperties;
--- a/src/java.desktop/macosx/classes/apple/laf/JRSUIUtils.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.desktop/macosx/classes/apple/laf/JRSUIUtils.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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,14 +25,15 @@
 
 package apple.laf;
 
+import java.security.AccessController;
+
+import apple.laf.JRSUIConstants.Hit;
+import apple.laf.JRSUIConstants.ScrollBarPart;
 import com.apple.laf.AquaImageFactory.NineSliceMetrics;
-
-import apple.laf.JRSUIConstants.*;
 import sun.security.action.GetPropertyAction;
 
-import java.security.AccessController;
+public final class JRSUIUtils {
 
-public class JRSUIUtils {
     static boolean isLeopard = isMacOSXLeopard();
     static boolean isSnowLeopardOrBelow = isMacOSXSnowLeopardOrBelow();
 
@@ -48,7 +49,9 @@
         return currentMacOSXVersionMatchesGivenVersionRange(version, true, false, false);
     }
 
-    static boolean currentMacOSXVersionMatchesGivenVersionRange(final int version, final boolean inclusive, final boolean matchBelow, final boolean matchAbove) {
+    static boolean currentMacOSXVersionMatchesGivenVersionRange(
+            final int version, final boolean inclusive,
+            final boolean matchBelow, final boolean matchAbove) {
         // split the "10.x.y" version number
         String osVersion = AccessController.doPrivileged(new GetPropertyAction("os.version"));
         String[] fragments = osVersion.split("\\.");
@@ -99,12 +102,22 @@
             return shouldUseScrollToClick();
         }
 
-        public static void getPartBounds(final double[] rect, final JRSUIControl control, final double x, final double y, final double w, final double h, final ScrollBarPart part) {
+        public static void getPartBounds(final double[] rect,
+                                         final JRSUIControl control,
+                                         final int x, final int y, final int w,
+                                         final int h,
+                                         final ScrollBarPart part) {
             control.getPartBounds(rect, x, y, w, h, part.ordinal);
         }
 
-        public static double getNativeOffsetChange(final JRSUIControl control, final double x, final double y, final double w, final double h, final int offset, final int visibleAmount, final int extent) {
-            return control.getScrollBarOffsetChange(x, y, w, h, offset, visibleAmount, extent);
+        public static double getNativeOffsetChange(final JRSUIControl control,
+                                                   final int x, final int y,
+                                                   final int w, final int h,
+                                                   final int offset,
+                                                   final int visibleAmount,
+                                                   final int extent) {
+            return control.getScrollBarOffsetChange(x, y, w, h, offset,
+                                                    visibleAmount, extent);
         }
     }
 
@@ -115,7 +128,10 @@
     }
 
     public static class HitDetection {
-        public static Hit getHitForPoint(final JRSUIControl control, final double x, final double y, final double w, final double h, final double hitX, final double hitY) {
+        public static Hit getHitForPoint(final JRSUIControl control,
+                                         final int x, final int y, final int w,
+                                         final int h, final int hitX,
+                                         final int hitY) {
             return control.getHitForPoint(x, y, w, h, hitX, hitY);
         }
     }
--- a/src/java.desktop/share/classes/java/awt/Cursor.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.desktop/share/classes/java/awt/Cursor.java	Thu Jul 02 16:08:47 2015 -0700
@@ -26,8 +26,8 @@
 
 import java.beans.ConstructorProperties;
 import java.io.InputStream;
-import java.net.URL;
 import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.security.PrivilegedExceptionAction;
 import java.util.Hashtable;
 import java.util.Properties;
@@ -261,7 +261,7 @@
      * @throws IllegalArgumentException if the specified cursor type is
      *         invalid
      */
-    static public Cursor getPredefinedCursor(int type) {
+    public static Cursor getPredefinedCursor(int type) {
         if (type < Cursor.DEFAULT_CURSOR || type > Cursor.MOVE_CURSOR) {
             throw new IllegalArgumentException("illegal cursor type");
         }
@@ -286,7 +286,7 @@
      * <code>GraphicsEnvironment.isHeadless</code> returns true
      * @exception AWTException in case of erroneous retrieving of the cursor
      */
-    static public Cursor getSystemCustomCursor(final String name)
+    public static Cursor getSystemCustomCursor(final String name)
         throws AWTException, HeadlessException {
         GraphicsEnvironment.checkHeadless();
         Cursor cursor = systemCustomCursors.get(name);
@@ -330,18 +330,15 @@
             } catch (NumberFormatException nfe) {
                 throw new AWTException("failed to parse hotspot property for cursor: " + name);
             }
-
-            try {
-                final Toolkit toolkit = Toolkit.getDefaultToolkit();
-                final String file = RESOURCE_PREFIX + fileName;
-
-                cursor = AccessController.doPrivileged(
-                        (PrivilegedExceptionAction<Cursor>) () -> {
-                            URL url = Cursor.class.getResource(file);
-                            Image image = toolkit.getImage(url);
-                            return toolkit.createCustomCursor(image, hotPoint,
-                                                              localized);
-                        });
+            final Toolkit toolkit = Toolkit.getDefaultToolkit();
+            final String file = RESOURCE_PREFIX + fileName;
+            final InputStream in = AccessController.doPrivileged(
+                    (PrivilegedAction<InputStream>) () -> {
+                        return Cursor.class.getResourceAsStream(file);
+                    });
+            try (in) {
+                Image image = toolkit.createImage(in.readAllBytes());
+                cursor = toolkit.createCustomCursor(image, hotPoint, localized);
             } catch (Exception e) {
                 throw new AWTException(
                     "Exception: " + e.getClass() + " " + e.getMessage() +
@@ -365,7 +362,7 @@
      *
      * @return the default cursor
      */
-    static public Cursor getDefaultCursor() {
+    public static Cursor getDefaultCursor() {
         return getPredefinedCursor(Cursor.DEFAULT_CURSOR);
     }
 
--- a/src/java.desktop/share/classes/java/awt/Toolkit.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.desktop/share/classes/java/awt/Toolkit.java	Thu Jul 02 16:08:47 2015 -0700
@@ -58,6 +58,14 @@
 import sun.awt.SunToolkit;
 import sun.util.CoreResourceBundleControl;
 
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Arrays;
+import java.util.ServiceLoader;
+import java.util.Set;
+import java.util.stream.Collectors;
+import javax.accessibility.AccessibilityProvider;
+
 /**
  * This class is the abstract superclass of all actual
  * implementations of the Abstract Window Toolkit. Subclasses of
@@ -420,7 +428,7 @@
                     }
                 }
 
-                // Get the names of any assistive technolgies to load.  First
+                // Get the names of any assistive technologies to load.  First
                 // check the system property and then check the properties
                 // file.
                 String classNames = System.getProperty("javax.accessibility.assistive_technologies");
@@ -436,85 +444,125 @@
     }
 
     /**
-     * Loads additional classes into the VM, using the property
-     * 'assistive_technologies' specified in the Sun reference
-     * implementation by a line in the 'accessibility.properties'
-     * file.  The form is "assistive_technologies=..." where
-     * the "..." is a comma-separated list of assistive technology
-     * classes to load.  Each class is loaded in the order given
-     * and a single instance of each is created using
-     * Class.forName(class).newInstance().  All errors are handled
-     * via an AWTError exception.
+     * Rethrow the AWTError but include the cause.
      *
-     * <p>The assumption is made that assistive technology classes are supplied
-     * as part of INSTALLED (as opposed to: BUNDLED) extensions or specified
-     * on the class path
-     * (and therefore can be loaded using the class loader returned by
-     * a call to <code>ClassLoader.getSystemClassLoader</code>, whose
-     * delegation parent is the extension class loader for installed
-     * extensions).
+     * @param s the error message
+     * @param e the original exception
+     * @throw the new AWTError including the cause (the original exception)
+     */
+    private static void newAWTError(Throwable e, String s) {
+        AWTError newAWTError = new AWTError(s);
+        newAWTError.initCause(e);
+        throw newAWTError;
+    }
+
+    /**
+     * When a service provider for Assistive Technology is not found look for a
+     * supporting class on the class path and instantiate it.
+     *
+     * @param atName the name of the class to be loaded
+     */
+    private static void fallbackToLoadClassForAT(String atName) {
+        try {
+            Class.forName(atName, false, ClassLoader.getSystemClassLoader()).newInstance();
+        } catch (ClassNotFoundException e) {
+            newAWTError(e, "Assistive Technology not found: " + atName);
+        } catch (InstantiationException e) {
+            newAWTError(e, "Could not instantiate Assistive Technology: " + atName);
+        } catch (IllegalAccessException e) {
+            newAWTError(e, "Could not access Assistive Technology: " + atName);
+        } catch (Exception e) {
+            newAWTError(e, "Error trying to install Assistive Technology: " + atName);
+        }
+    }
+
+    /**
+     * Loads accessibility support using the property assistive_technologies.
+     * The form is assistive_technologies= followed by a comma-separated list of
+     * assistive technology providers to load.  The order in which providers are
+     * loaded is determined by the order in which the ServiceLoader discovers
+     * implementations of the AccessibilityProvider interface, not by the order
+     * of provider names in the property list.  When a provider is found its
+     * accessibility implementation will be started by calling the provider's
+     * activate method.  All errors are handled via an AWTError exception.
      */
     private static void loadAssistiveTechnologies() {
         // Load any assistive technologies
         if (atNames != null) {
             ClassLoader cl = ClassLoader.getSystemClassLoader();
-            StringTokenizer parser = new StringTokenizer(atNames," ,");
-            String atName;
-            while (parser.hasMoreTokens()) {
-                atName = parser.nextToken();
+            Set<String> names = Arrays.stream(atNames.split(","))
+                                      .map(String::trim)
+                                      .collect(Collectors.toSet());
+            final Map<String, AccessibilityProvider> providers = new HashMap<>();
+            AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
                 try {
-                    Class<?> clazz;
-                    if (cl != null) {
-                        clazz = cl.loadClass(atName);
-                    } else {
-                        clazz = Class.forName(atName);
+                    for (AccessibilityProvider p : ServiceLoader.load(AccessibilityProvider.class, cl)) {
+                        String name = p.getName();
+                        if (names.contains(name) && !providers.containsKey(name)) {
+                            p.activate();
+                            providers.put(name, p);
+                        }
                     }
-                    clazz.newInstance();
-                } catch (ClassNotFoundException e) {
-                    throw new AWTError("Assistive Technology not found: "
-                            + atName);
-                } catch (InstantiationException e) {
-                    throw new AWTError("Could not instantiate Assistive"
-                            + " Technology: " + atName);
-                } catch (IllegalAccessException e) {
-                    throw new AWTError("Could not access Assistive"
-                            + " Technology: " + atName);
-                } catch (Exception e) {
-                    throw new AWTError("Error trying to install Assistive"
-                            + " Technology: " + atName + " " + e);
+                } catch (java.util.ServiceConfigurationError | Exception e) {
+                    newAWTError(e, "Could not load or activate service provider");
                 }
-            }
+                return null;
+            });
+            names.stream()
+                 .filter(n -> !providers.containsKey(n))
+                 .forEach(Toolkit::fallbackToLoadClassForAT);
         }
     }
 
     /**
      * Gets the default toolkit.
      * <p>
-     * If a system property named <code>"java.awt.headless"</code> is set
-     * to <code>true</code> then the headless implementation
-     * of <code>Toolkit</code> is used.
+     * If a system property named {@code "java.awt.headless"} is set
+     * to {@code true} then the headless implementation
+     * of {@code Toolkit} is used.
      * <p>
-     * If there is no <code>"java.awt.headless"</code> or it is set to
-     * <code>false</code> and there is a system property named
-     * <code>"awt.toolkit"</code>,
+     * If there is no {@code "java.awt.headless"} or it is set to
+     * {@code false} and there is a system property named
+     * {@code "awt.toolkit"},
      * that property is treated as the name of a class that is a subclass
-     * of <code>Toolkit</code>;
+     * of {@code Toolkit};
      * otherwise the default platform-specific implementation of
-     * <code>Toolkit</code> is used.
+     * {@code Toolkit} is used.
      * <p>
-     * Also loads additional classes into the VM, using the property
-     * 'assistive_technologies' specified in the Sun reference
-     * implementation by a line in the 'accessibility.properties'
-     * file.  The form is "assistive_technologies=..." where
-     * the "..." is a comma-separated list of assistive technology
-     * classes to load.  Each class is loaded in the order given
-     * and a single instance of each is created using
-     * Class.forName(class).newInstance().  This is done just after
-     * the AWT toolkit is created.  All errors are handled via an
-     * AWTError exception.
-     * @return    the default toolkit.
+     * If this Toolkit is not a headless implementation and if they exist, service
+     * providers of {@link javax.accessibility.AccessibilityProvider} will be loaded
+     * if specified by the system property
+     * {@code javax.accessibility.assistive_technologies}.
+     * <p>
+     * An example of setting this property is to invoke Java with
+     * {@code -Djavax.accessibility.assistive_technologies=MyServiceProvider}.
+     * In addition to MyServiceProvider other service providers can be specified
+     * using a comma separated list.  Service providers are loaded after the AWT
+     * toolkit is created. All errors are handled via an AWTError exception.
+     * <p>
+     * The names specified in the assistive_technologies property are used to query
+     * each service provider implementation.  If the requested name matches the
+     * {@linkplain AccessibilityProvider#getName name} of the service provider, the
+     * {@link AccessibilityProvider#activate} method will be invoked to activate the
+     * matching service provider.
+     *
+     * @implSpec
+     * If assistive technology service providers are not specified with a system
+     * property this implementation will look in a properties file located as follows:
+     * <ul>
+     * <li> {@code ${user.home}/.accessibility.properties}
+     * <li> {@code ${java.home}/conf/accessibility.properties}
+     * </ul>
+     * Only the first of these files to be located will be consulted.  The requested
+     * service providers are specified by setting the {@code assistive_technologies=}
+     * property.  A single provider or a comma separated list of providers can be
+     * specified.
+     *
+     * @return     the default toolkit.
      * @exception  AWTError  if a toolkit could not be found, or
      *                 if one could not be accessed or instantiated.
+     * @see java.util.ServiceLoader
+     * @see javax.accessibility.AccessibilityProvider
      */
     public static synchronized Toolkit getDefaultToolkit() {
         if (toolkit == null) {
@@ -550,7 +598,9 @@
                     return null;
                 }
             });
-            loadAssistiveTechnologies();
+            if (!GraphicsEnvironment.isHeadless()) {
+                loadAssistiveTechnologies();
+            }
         }
         return toolkit;
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.desktop/share/classes/javax/accessibility/AccessibilityProvider.java	Thu Jul 02 16:08:47 2015 -0700
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2015, 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 javax.accessibility;
+
+/**
+ * Service Provider Interface (SPI) for Assistive Technology.
+ * <p>
+ * This service provider class provides mappings from the platform
+ * specific accessibility APIs to the Java Accessibility API.
+ * <p>
+ * Each service provider implementation is named and can be activated via the
+ * {@link #activate} method. Service providers can be loaded when the default
+ * {@link java.awt.Toolkit toolkit} is initialized.
+ *
+ * @apiNote There will typically be one provider per platform, such as Windows
+ * or Linux, to support accessibility for screen readers and magnifiers.  However,
+ * more than one service provider can be activated.  For example, a test tool
+ * which provides visual results obtained by interrogating the Java Accessibility
+ * API can be activated along with the activation of the support for screen readers
+ * and screen magnifiers.
+ *
+ * @see java.awt.Toolkit#getDefaultToolkit
+ * @see java.util.ServiceLoader
+ * @since 1.9
+ */
+public abstract class AccessibilityProvider {
+
+    /**
+     * Initializes a new accessibility provider.
+     *
+     * @throws  SecurityException
+     *          If a security manager has been installed and it denies
+     *          {@link RuntimePermission} {@code "accessibilityProvider"}
+     */
+    protected AccessibilityProvider() {
+        // Use a permission check when calling a private constructor to check that
+        // the proper security permission has been granted before the Object superclass
+        // is called.  If an exception is thrown before the Object superclass is
+        // constructed a finalizer in a subclass of this class will not be run.
+        // This protects against a finalizer vulnerability.
+        this(checkPermission());
+    }
+
+    private AccessibilityProvider(Void ignore) { }
+
+    /**
+     * If this code is running with a security manager and if the permission
+     * "accessibilityProvider" has not been granted SecurityException will be thrown.
+     *
+     */
+    private static Void checkPermission() {
+        SecurityManager sm = System.getSecurityManager();
+        if (sm != null)
+            sm.checkPermission(new RuntimePermission("accessibilityProvider"));
+        return null;
+    }
+
+    /**
+     * Returns the name of this service provider.  This name is used to locate a
+     * requested service provider.
+     *
+     * @return the name of this service provider
+     */
+    public abstract String getName();
+
+    /**
+     * Activates the support provided by this service provider.
+     */
+    public abstract void activate();
+
+}
--- a/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalTabbedPaneUI.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalTabbedPaneUI.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -896,11 +896,12 @@
 
         // Paint the background for the tab area
         if ( tabPane.isOpaque() ) {
-            if (!c.isBackgroundSet() && (tabAreaBackground != null)) {
+            Color background = c.getBackground();
+            if (background instanceof UIResource && tabAreaBackground != null) {
                 g.setColor(tabAreaBackground);
             }
             else {
-                g.setColor( c.getBackground() );
+                g.setColor(background);
             }
             switch ( tabPlacement ) {
             case LEFT:
--- a/src/java.desktop/share/classes/sun/awt/SunToolkit.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.desktop/share/classes/sun/awt/SunToolkit.java	Thu Jul 02 16:08:47 2015 -0700
@@ -291,7 +291,7 @@
     // Maps from non-Component/MenuComponent to AppContext.
     // WeakHashMap<Component,AppContext>
     private static final Map<Object, AppContext> appContextMap =
-        Collections.synchronizedMap(new WeakHashMap<Object, AppContext>());
+        Collections.synchronizedMap(new WeakIdentityHashMap<Object, AppContext>());
 
     /**
      * Sets the appContext field of target. If target is not a Component or
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.desktop/share/classes/sun/awt/WeakIdentityHashMap.java	Thu Jul 02 16:08:47 2015 -0700
@@ -0,0 +1,195 @@
+package sun.awt;
+
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.WeakReference;
+import java.util.*;
+
+// A weak key reference hash map that uses System.identityHashCode() and "=="
+// instead of hashCode() and equals(Object)
+class WeakIdentityHashMap<K, V> implements Map<K, V> {
+    private final Map<WeakKey<K>, V> map;
+    private final transient ReferenceQueue<K> queue = new ReferenceQueue<K>();
+
+    /**
+     * Constructs a new, empty identity hash map with a default initial
+     * size (16).
+     */
+    public WeakIdentityHashMap() {
+        map = new HashMap<>(16);
+    }
+
+    /**
+     * Constructs a new, empty identity map with the specified initial size.
+     */
+    public WeakIdentityHashMap(int initialSize) {
+        map = new HashMap<>(initialSize);
+    }
+
+    private Map<WeakKey<K>, V> getMap() {
+        for(Reference<? extends K> ref; (ref = this.queue.poll()) != null;) {
+            map.remove(ref);
+        }
+        return map;
+    }
+
+    @Override
+    public int size() {
+        return getMap().size();
+    }
+
+    @Override
+    public boolean isEmpty() {
+        return getMap().isEmpty();
+    }
+
+    @Override
+    public boolean containsKey(Object key) {
+        return getMap().containsKey(new WeakKey<>(key, null));
+    }
+
+    @Override
+    public boolean containsValue(Object value) {
+        return getMap().containsValue(value);
+    }
+
+    @Override
+    public V get(Object key) {
+        return getMap().get(new WeakKey<>(key, null));
+    }
+
+    @Override
+    public V put(K key, V value) {
+        return getMap().put(new WeakKey<K>(key, queue), value);
+    }
+
+    @Override
+    public V remove(Object key) {
+        return getMap().remove(new WeakKey<>(key, null));
+    }
+
+    @Override
+    public void putAll(Map<? extends K, ? extends V> m) {
+        for (Entry<? extends K, ? extends V> entry : m.entrySet()) {
+            put(entry.getKey(), entry.getValue());
+        }
+    }
+
+    @Override
+    public void clear() {
+        getMap().clear();
+    }
+
+    @Override
+    public Set<K> keySet() {
+        return new AbstractSet<K>() {
+            @Override
+            public Iterator<K> iterator() {
+                return new Iterator<K>() {
+                    private K next;
+                    Iterator<WeakKey<K>> iterator = getMap().keySet().iterator();
+
+                    @Override
+                    public boolean hasNext() {
+                        while (iterator.hasNext()) {
+                            if ((next = iterator.next().get()) != null) {
+                                return true;
+                            }
+                        }
+                        return false;
+                    }
+
+                    @Override
+                    public K next() {
+                        if(next == null && !hasNext()) {
+                            throw new NoSuchElementException();
+                        }
+                        K ret = next;
+                        next = null;
+                        return ret;
+                    }
+                };
+            }
+
+            @Override
+            public int size() {
+                return getMap().keySet().size();
+            }
+        };
+    }
+
+    @Override
+    public Collection<V> values() {
+        return getMap().values();
+    }
+
+    @Override
+    public Set<Entry<K, V>> entrySet() {
+        return new AbstractSet<Entry<K, V>>() {
+            @Override
+            public Iterator<Entry<K, V>> iterator() {
+                final Iterator<Entry<WeakKey<K>, V>> iterator = getMap().entrySet().iterator();
+                return new Iterator<Entry<K, V>>() {
+                    @Override
+                    public boolean hasNext() {
+                        return iterator.hasNext();
+                    }
+
+                    @Override
+                    public Entry<K, V> next() {
+                        return new Entry<K, V>() {
+                            Entry<WeakKey<K>, V> entry = iterator.next();
+
+                            @Override
+                            public K getKey() {
+                                return entry.getKey().get();
+                            }
+
+                            @Override
+                            public V getValue() {
+                                return entry.getValue();
+                            }
+
+                            @Override
+                            public V setValue(V value) {
+                                return null;
+                            }
+                        };
+                    }
+                };
+            }
+
+            @Override
+            public int size() {
+                return getMap().entrySet().size();
+            }
+        };
+    }
+
+    private static class WeakKey<K> extends WeakReference<K>  {
+        private final int hash;
+
+        WeakKey(K key, ReferenceQueue <K> q) {
+            super(key, q);
+            hash = System.identityHashCode(key);
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            if(this == o) {
+                return true;
+            } else if( o instanceof WeakKey ) {
+                return get() == ((WeakKey)o).get();
+            } else {
+                return false;
+            }
+        }
+
+        @Override
+        public int hashCode() {
+            return hash;
+        }
+    }
+
+
+}
--- a/src/java.desktop/share/native/libfontmanager/layout/LookupProcessor.cpp	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.desktop/share/native/libfontmanager/layout/LookupProcessor.cpp	Thu Jul 02 16:08:47 2015 -0700
@@ -175,7 +175,7 @@
   LEReferenceTo<LangSysTable> langSysTable;
     le_uint16 featureCount = 0;
     le_uint16 lookupListCount = 0;
-    le_uint16 requiredFeatureIndex;
+    le_uint16 requiredFeatureIndex = 0xFFFF;
 
     if (LE_FAILURE(success)) {
         return;
--- a/src/java.desktop/share/native/liblcms/cmsopt.c	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.desktop/share/native/liblcms/cmsopt.c	Thu Jul 02 16:08:47 2015 -0700
@@ -260,7 +260,9 @@
                             cmsStage* Multmat = cmsStageAllocMatrix(Lut->ContextID, 3, 3, (const cmsFloat64Number*) &res, NULL);
 
                             // Recover the chain
-                            Multmat->Next = chain;
+                            if (Multmat != NULL) {
+                                Multmat->Next = chain;
+                            }
                             *pt1 = Multmat;
                      }
 
--- a/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java	Thu Jul 02 16:08:47 2015 -0700
@@ -2466,7 +2466,7 @@
 
     private static XEventDispatcher oops_waiter;
     private static boolean oops_updated;
-    private static boolean oops_move;
+    private static int oops_position = 0;
 
     /**
      * @inheritDoc
@@ -2495,9 +2495,12 @@
             oops_updated = false;
             long event_number = getEventNumber();
             // Generate OOPS ConfigureNotify event
-            XlibWrapper.XMoveWindow(getDisplay(), win.getWindow(), oops_move ? 0 : 1, 0);
+            XlibWrapper.XMoveWindow(getDisplay(), win.getWindow(), ++oops_position, 0);
             // Change win position each time to avoid system optimization
-            oops_move = !oops_move;
+            if (oops_position > 50) {
+                oops_position = 0;
+            }
+
             XSync();
 
             eventLog.finer("Generated OOPS ConfigureNotify event");
--- a/src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolder2.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolder2.java	Thu Jul 02 16:08:47 2015 -0700
@@ -29,6 +29,7 @@
 import java.awt.Toolkit;
 import java.awt.image.BufferedImage;
 import java.io.File;
+import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.util.*;
 import java.util.concurrent.*;
@@ -233,6 +234,7 @@
     private Image smallIcon = null;
     private Image largeIcon = null;
     private Boolean isDir = null;
+    private final boolean isLib;
 
     /*
      * The following is to identify the My Documents folder as being special
@@ -254,6 +256,7 @@
         // Desktop is parent of DRIVES and NETWORK, not necessarily
         // other special shell folders.
         super(null, composePathForCsidl(csidl));
+        isLib = false;
 
         invoke(new Callable<Void>() {
             public Void call() throws InterruptedException {
@@ -279,7 +282,7 @@
                                 // Now we know that parent isn't immediate to 'this' because it
                                 // has a continued ID list. Create a shell folder for this child
                                 // pidl and make it the new 'parent'.
-                                parent = new Win32ShellFolder2((Win32ShellFolder2) parent, childPIDL);
+                                parent = createShellFolder((Win32ShellFolder2) parent, childPIDL);
                             } else {
                                 // No grandchildren means we have arrived at the parent of 'this',
                                 // and childPIDL is directly relative to parent.
@@ -301,8 +304,9 @@
     /**
      * Create a system shell folder
      */
-    Win32ShellFolder2(Win32ShellFolder2 parent, long pIShellFolder, long relativePIDL, String path) {
+    Win32ShellFolder2(Win32ShellFolder2 parent, long pIShellFolder, long relativePIDL, String path, boolean isLib) {
         super(parent, (path != null) ? path : "ShellFolder: ");
+        this.isLib = isLib;
         this.disposer.pIShellFolder = pIShellFolder;
         this.disposer.relativePIDL = relativePIDL;
         sun.java2d.Disposer.addRecord(this, disposer);
@@ -312,16 +316,19 @@
     /**
      * Creates a shell folder with a parent and relative PIDL
      */
-    Win32ShellFolder2(final Win32ShellFolder2 parent, final long relativePIDL) throws InterruptedException {
-        super(parent,
-            invoke(new Callable<String>() {
-                public String call() {
-                    return getFileSystemPath(parent.getIShellFolder(), relativePIDL);
-                }
-            }, RuntimeException.class)
-        );
-        this.disposer.relativePIDL = relativePIDL;
-        sun.java2d.Disposer.addRecord(this, disposer);
+    static Win32ShellFolder2 createShellFolder(Win32ShellFolder2 parent, long pIDL)
+            throws InterruptedException {
+        String path = invoke(new Callable<String>() {
+            public String call() {
+                return getFileSystemPath(parent.getIShellFolder(), pIDL);
+            }
+        }, RuntimeException.class);
+        String libPath = resolveLibrary(path);
+        if (libPath == null) {
+            return new Win32ShellFolder2(parent, 0, pIDL, path, false);
+        } else {
+            return new Win32ShellFolder2(parent, 0, pIDL, libPath, true);
+        }
     }
 
     // Initializes the desktop shell folder
@@ -601,20 +608,24 @@
         }
         String path = getDisplayNameOf(parentIShellFolder, relativePIDL,
                         SHGDN_FORPARSING);
+        return path;
+    }
+
+    private static String resolveLibrary(String path) {
         // if this is a library its default save location is taken as a path
         // this is a temp fix until java.io starts support Libraries
         if( path != null && path.startsWith("::{") &&
                 path.toLowerCase().endsWith(".library-ms")) {
             for (KnownFolderDefinition kf : KnownFolderDefinition.libraries) {
-                if( path.toLowerCase().endsWith(
-                            kf.relativePath.toLowerCase()) &&
-                            path.toUpperCase().startsWith(
-                            kf.parsingName.substring(0, 40).toUpperCase()) ) {
+                if (path.toLowerCase().endsWith(
+                        "\\" + kf.relativePath.toLowerCase()) &&
+                        path.toUpperCase().startsWith(
+                        kf.parsingName.substring(0, 40).toUpperCase())) {
                     return kf.saveLocation;
                 }
             }
         }
-        return path;
+        return null;
     }
 
     // Needs to be accessible to Win32ShellFolderManager2
@@ -750,7 +761,7 @@
                                             && pidlsEqual(pIShellFolder, childPIDL, personal.disposer.relativePIDL)) {
                                         childFolder = personal;
                                     } else {
-                                        childFolder = new Win32ShellFolder2(Win32ShellFolder2.this, childPIDL);
+                                        childFolder = createShellFolder(Win32ShellFolder2.this, childPIDL);
                                         releasePIDL = false;
                                     }
                                     list.add(childFolder);
@@ -790,10 +801,11 @@
                 while ((childPIDL = getNextChild(pEnumObjects)) != 0) {
                     if (getAttributes0(pIShellFolder, childPIDL, ATTRIB_FILESYSTEM) != 0) {
                         String path = getFileSystemPath(pIShellFolder, childPIDL);
+                        if(isLib) path = resolveLibrary( path );
                         if (path != null && path.equalsIgnoreCase(filePath)) {
                             long childIShellFolder = bindToObject(pIShellFolder, childPIDL);
                             child = new Win32ShellFolder2(Win32ShellFolder2.this,
-                                    childIShellFolder, childPIDL, path);
+                                    childIShellFolder, childPIDL, path, isLib);
                             break;
                         }
                     }
@@ -839,14 +851,14 @@
         return getLinkLocation(true);
     }
 
-    private ShellFolder getLinkLocation(final boolean resolve) {
-        return invoke(new Callable<ShellFolder>() {
-            public ShellFolder call() {
+    private Win32ShellFolder2 getLinkLocation(final boolean resolve) {
+        return invoke(new Callable<Win32ShellFolder2>() {
+            public Win32ShellFolder2 call() {
                 if (!isLink()) {
                     return null;
                 }
 
-                ShellFolder location = null;
+                Win32ShellFolder2 location = null;
                 long linkLocationPIDL = getLinkLocation(getParentIShellFolder(),
                         getRelativePIDL(), resolve);
                 if (linkLocationPIDL != 0) {
@@ -956,7 +968,7 @@
 
     // NOTE: this method uses COM and must be called on the 'COM thread'. See ComInvoker for the details
     private static native long extractIcon(long parentIShellFolder, long relativePIDL,
-                                           boolean getLargeIcon);
+                                           boolean getLargeIcon, boolean getDefaultIcon);
 
     // Returns an icon from the Windows system icon list in the form of an HICON
     private static native long getSystemIcon(int iconID);
@@ -1007,7 +1019,13 @@
                 invoke(new Callable<Image>() {
                     public Image call() {
                         Image newIcon = null;
-                        if (isFileSystem()) {
+                        if (isLink()) {
+                            Win32ShellFolder2 folder = getLinkLocation(false);
+                            if (folder != null && folder.isLibrary()) {
+                                return folder.getIcon(getLargeIcon);
+                            }
+                        }
+                        if (isFileSystem() || isLibrary()) {
                             long parentIShellIcon = (parent != null)
                                 ? ((Win32ShellFolder2) parent).getIShellIcon()
                                 : 0L;
@@ -1037,7 +1055,19 @@
                         if (newIcon == null) {
                             // These are only cached per object
                             long hIcon = extractIcon(getParentIShellFolder(),
-                                getRelativePIDL(), getLargeIcon);
+                                    getRelativePIDL(), getLargeIcon, false);
+                            // E_PENDING: loading can take time so get the default
+                            if(hIcon <= 0) {
+                                hIcon = extractIcon(getParentIShellFolder(),
+                                         getRelativePIDL(), getLargeIcon, true);
+                                if(hIcon <= 0) {
+                                    if (isDirectory()) {
+                                        return getShell32Icon(4, getLargeIcon);
+                                    } else {
+                                        return getShell32Icon(1, getLargeIcon);
+                                    }
+                                }
+                            }
                             newIcon = makeIcon(hIcon, getLargeIcon);
                             disposeIcon(hIcon);
                         }
@@ -1129,6 +1159,8 @@
     private static final int LVCFMT_CENTER = 2;
 
     public ShellFolderColumnInfo[] getFolderColumns() {
+        ShellFolder library = resolveLibrary();
+        if (library != null) return library.getFolderColumns();
         return invoke(new Callable<ShellFolderColumnInfo[]>() {
             public ShellFolderColumnInfo[] call() {
                 ShellFolderColumnInfo[] columns = doGetColumnInfo(getIShellFolder());
@@ -1159,6 +1191,10 @@
     }
 
     public Object getFolderColumnValue(final int column) {
+        if(!isLibrary()) {
+            ShellFolder library = resolveLibrary();
+            if (library != null) return library.getFolderColumnValue(column);
+        }
         return invoke(new Callable<Object>() {
             public Object call() {
                 return doGetColumnValue(getParentIShellFolder(), getRelativePIDL(), column);
@@ -1166,6 +1202,26 @@
         });
     }
 
+    boolean isLibrary() {
+        return isLib;
+    }
+
+    private ShellFolder resolveLibrary() {
+        for (ShellFolder f = this; f != null; f = f.parent) {
+            if (!f.isFileSystem()) {
+                if (f instanceof Win32ShellFolder2 &&
+                                           ((Win32ShellFolder2)f).isLibrary()) {
+                    try {
+                        return getShellFolder(new File(getPath()));
+                    } catch (FileNotFoundException e) {
+                    }
+                }
+                break;
+            }
+        }
+        return null;
+    }
+
     // NOTE: this method uses COM and must be called on the 'COM thread'. See ComInvoker for the details
     private native ShellFolderColumnInfo[] doGetColumnInfo(long iShellFolder2);
 
--- a/src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -94,7 +94,7 @@
         while (pIDL != 0) {
             long curPIDL = Win32ShellFolder2.copyFirstPIDLEntry(pIDL);
             if (curPIDL != 0) {
-                parent = new Win32ShellFolder2(parent, curPIDL);
+                parent = Win32ShellFolder2.createShellFolder(parent, curPIDL);
                 pIDL = Win32ShellFolder2.getNextPIDLEntry(pIDL);
             } else {
                 // The list is empty if the parent is Desktop and pIDL is a shortcut to Desktop
--- a/src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp	Thu Jul 02 16:08:47 2015 -0700
@@ -868,10 +868,11 @@
 /*
  * Class:     sun_awt_shell_Win32ShellFolder2
  * Method:    extractIcon
- * Signature: (JJZ)J
+ * Signature: (JJZZ)J
  */
 JNIEXPORT jlong JNICALL Java_sun_awt_shell_Win32ShellFolder2_extractIcon
-    (JNIEnv* env, jclass cls, jlong pIShellFolderL, jlong relativePIDL, jboolean getLargeIcon)
+    (JNIEnv* env, jclass cls, jlong pIShellFolderL, jlong relativePIDL,
+                                jboolean getLargeIcon, jboolean getDefaultIcon)
 {
     IShellFolder* pIShellFolder = (IShellFolder*)pIShellFolderL;
     LPITEMIDLIST pidl = (LPITEMIDLIST)relativePIDL;
@@ -889,7 +890,8 @@
         WCHAR szBuf[MAX_PATH];
         INT index;
         UINT flags;
-        hres = pIcon->GetIconLocation(GIL_FORSHELL, szBuf, MAX_PATH, &index, &flags);
+        UINT uFlags = getDefaultIcon ? GIL_DEFAULTICON : GIL_FORSHELL | GIL_ASYNC;
+        hres = pIcon->GetIconLocation(uFlags, szBuf, MAX_PATH, &index, &flags);
         if (SUCCEEDED(hres)) {
             HICON hIconLarge;
             hres = pIcon->Extract(szBuf, index, &hIconLarge, &hIcon, (16 << 16) + 32);
@@ -901,6 +903,9 @@
                     fn_DestroyIcon((HICON)hIconLarge);
                 }
             }
+        } else if (hres == E_PENDING) {
+            pIcon->Release();
+            return E_PENDING;
         }
         pIcon->Release();
     }
@@ -1284,7 +1289,6 @@
 JNIEXPORT jobjectArray JNICALL Java_sun_awt_shell_Win32ShellFolder2_loadKnownFolders
     (JNIEnv* env, jclass cls )
 {
-    CoInitialize(NULL);
     IKnownFolderManager* pkfm = NULL;
     HRESULT hr = CoCreateInstance(CLSID_KnownFolderManager, NULL,
                                 CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pkfm));
--- a/src/java.desktop/windows/native/libawt/windows/awt.rc	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.desktop/windows/native/libawt/windows/awt.rc	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 // 
-// Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
+// Copyright (c) 1997, 2015, 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,7 +31,6 @@
 
 LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
 
-HAND_CURSOR  CURSOR  DISCARDABLE "hand.cur"
 AWT_ICON     ICON    DISCARDABLE "awt.ico"
 CHECK_BITMAP BITMAP  DISCARDABLE "check.bmp"
 
--- a/src/java.desktop/windows/native/libawt/windows/awt_Cursor.cpp	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.desktop/windows/native/libawt/windows/awt_Cursor.cpp	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -144,7 +144,7 @@
         winCursor = IDC_SIZEWE;
         break;
       case java_awt_Cursor_HAND_CURSOR:
-        winCursor = TEXT("HAND_CURSOR");
+        winCursor = IDC_HAND;
         break;
       case java_awt_Cursor_MOVE_CURSOR:
         winCursor = IDC_SIZEALL;
Binary file src/java.desktop/windows/native/libawt/windows/hand.cur has changed
--- a/src/java.security.jgss/share/classes/org/ietf/jgss/Oid.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.security.jgss/share/classes/org/ietf/jgss/Oid.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, 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
@@ -157,7 +157,7 @@
             return (true);
 
         if (other instanceof Oid)
-            return this.oid.equals((Object)((Oid) other).oid);
+            return this.oid.equals(((Oid) other).oid);
         else if (other instanceof ObjectIdentifier)
             return this.oid.equals(other);
         else
--- a/src/java.security.jgss/share/classes/sun/security/jgss/GSSContextImpl.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.security.jgss/share/classes/sun/security/jgss/GSSContextImpl.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, 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
@@ -252,7 +252,7 @@
                 } else {
                     // parse GSS header
                     gssHeader = new GSSHeader(inStream);
-                    if (!gssHeader.getOid().equals((Object) objId))
+                    if (!gssHeader.getOid().equals(objId))
                         throw new GSSExceptionImpl
                             (GSSException.DEFECTIVE_TOKEN,
                              "Mechanism not equal to " +
@@ -346,7 +346,7 @@
                 } else {
                     // parse GSS Header
                     gssHeader = new GSSHeader(inStream);
-                    if (!gssHeader.getOid().equals((Object) objId))
+                    if (!gssHeader.getOid().equals(objId))
                         throw new GSSExceptionImpl
                             (GSSException.DEFECTIVE_TOKEN,
                              "Mechanism not equal to " +
--- a/src/java.security.jgss/share/classes/sun/security/jgss/krb5/MessageToken.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.security.jgss/share/classes/sun/security/jgss/krb5/MessageToken.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, 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
@@ -182,7 +182,7 @@
         try {
             gssHeader = new GSSHeader(is);
 
-            if (!gssHeader.getOid().equals((Object)OID)) {
+            if (!gssHeader.getOid().equals(OID)) {
                 throw new GSSException(GSSException.DEFECTIVE_TOKEN, -1,
                                        getTokenName(tokenId));
             }
--- a/src/java.sql/share/classes/java/sql/DriverManager.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/java.sql/share/classes/java/sql/DriverManager.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2015, 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,17 @@
 
 package java.sql;
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
 import java.util.Iterator;
+import java.util.List;
 import java.util.ServiceLoader;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.stream.Stream;
+
 import sun.reflect.CallerSensitive;
 import sun.reflect.Reflection;
 
@@ -429,29 +435,44 @@
      * <CODE>d.getClass().getName()</CODE>
      *
      * @return the list of JDBC Drivers loaded by the caller's class loader
+     * @see #drivers()
      */
     @CallerSensitive
-    public static java.util.Enumeration<Driver> getDrivers() {
-        java.util.Vector<Driver> result = new java.util.Vector<>();
-
+    public static Enumeration<Driver> getDrivers() {
         ensureDriversInitialized();
 
-        Class<?> callerClass = Reflection.getCallerClass();
+        return Collections.enumeration(getDrivers(Reflection.getCallerClass()));
+    }
 
+    /**
+     * Retrieves a Stream with all of the currently loaded JDBC drivers
+     * to which the current caller has access.
+     *
+     * @return the stream of JDBC Drivers loaded by the caller's class loader
+     * @since 1.9
+     */
+    @CallerSensitive
+    public static Stream<Driver> drivers() {
+        ensureDriversInitialized();
+
+        return getDrivers(Reflection.getCallerClass()).stream();
+    }
+
+    private static List<Driver> getDrivers(Class<?> callerClass) {
+        List<Driver> result = new ArrayList<>();
         // Walk through the loaded registeredDrivers.
         for (DriverInfo aDriver : registeredDrivers) {
             // If the caller does not have permission to load the driver then
             // skip it.
             if (isDriverAllowed(aDriver.driver, callerClass)) {
-                result.addElement(aDriver.driver);
+                result.add(aDriver.driver);
             } else {
                 println("    skipping: " + aDriver.getClass().getName());
             }
         }
-        return (result.elements());
+        return result;
     }
 
-
     /**
      * Sets the maximum time in seconds that a driver will wait
      * while attempting to connect to a database once the driver has
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.accessibility/windows/classes/META-INF/services/javax.accessibility.AccessibilityProvider	Thu Jul 02 16:08:47 2015 -0700
@@ -0,0 +1,26 @@
+# Copyright (c) 2015, 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.
+
+
+com.sun.java.accessibility.ProviderImpl
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.accessibility/windows/classes/com/sun/java/accessibility/ProviderImpl.java	Thu Jul 02 16:08:47 2015 -0700
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2015, 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 com.sun.java.accessibility;
+
+import javax.accessibility.AccessibilityProvider;
+
+/* This class provided methods to identify and activate the mapping from the
+ * JavaAccessBridge API to the Java Accessibility API.
+ */
+public final class ProviderImpl extends AccessibilityProvider {
+    /**
+     * Typically the service name returned by the name() method would be a simple
+     * name such as JavaAccessBridge, but the following name is used for compatibility
+     * with prior versions of ${user.home}/.accessibility.properties and
+     * ${java.home}/conf/accessibility.properties where the text on the
+     * assistive.technologies= line is a fully qualified class name. As of Java 9
+     * class names are no longer used to identify assistive technology implementations.
+     * If the properties file exists the installer will not replace it thus the
+     * need for compatibility.
+     */
+    private final String name = "com.sun.java.accessibility.AccessBridge";
+
+    public ProviderImpl() {}
+
+    public String getName() {
+        return name;
+    }
+
+    public void activate() {
+        /**
+         * Note that the AccessBridge is instantiated here rather than in the
+         * constructor.  If the caller determines that this object is named
+         * "com.sun.java.accessibility.AccessBridge" then the caller will call
+         * start to instantiate the AccessBridge which will in turn activate it.
+         */
+        new AccessBridge();
+    }
+
+}
--- a/src/jdk.accessibility/windows/conf/accessibility.properties	Thu Jul 02 08:54:01 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-#
-# Load the Java Access Bridge class into the JVM
-#
-#assistive_technologies=com.sun.java.accessibility.AccessBridge
-#screen_magnifier_present=true
-
--- a/src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp	Thu Jul 02 16:08:47 2015 -0700
@@ -30,6 +30,7 @@
 
 #include <jni.h>
 #include <stdlib.h>
+#include <string.h>
 #include <windows.h>
 #include <BaseTsd.h>
 #include <wincrypt.h>
@@ -58,11 +59,16 @@
     char szMessage[1024];
     szMessage[0] = '\0';
 
-    FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwError, NULL, szMessage,
-        1024, NULL);
+    DWORD res = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, dwError,
+        NULL, szMessage, sizeof(szMessage), NULL);
+    if (res == 0) {
+        strcpy(szMessage, "Unknown error");
+    }
 
     jclass exceptionClazz = env->FindClass(exceptionName);
-    env->ThrowNew(exceptionClazz, szMessage);
+    if (exceptionClazz != NULL) {
+        env->ThrowNew(exceptionClazz, szMessage);
+    }
 }
 
 
@@ -295,22 +301,42 @@
 
         // Determine clazz and method ID to generate certificate
         jclass clazzArrayList = env->FindClass("java/util/ArrayList");
+        if (clazzArrayList == NULL) {
+            __leave;
+        }
 
         jmethodID mNewArrayList = env->GetMethodID(clazzArrayList, "<init>", "()V");
+        if (mNewArrayList == NULL) {
+            __leave;
+        }
 
-        jmethodID mGenCert = env->GetMethodID(env->GetObjectClass(obj),
+        jclass clazzOfThis = env->GetObjectClass(obj);
+        if (clazzOfThis == NULL) {
+            __leave;
+        }
+
+        jmethodID mGenCert = env->GetMethodID(clazzOfThis,
                                               "generateCertificate",
                                               "([BLjava/util/Collection;)V");
+        if (mGenCert == NULL) {
+            __leave;
+        }
 
         // Determine method ID to generate certificate chain
-        jmethodID mGenCertChain = env->GetMethodID(env->GetObjectClass(obj),
+        jmethodID mGenCertChain = env->GetMethodID(clazzOfThis,
                                                    "generateCertificateChain",
                                                    "(Ljava/lang/String;Ljava/util/Collection;Ljava/util/Collection;)V");
+        if (mGenCertChain == NULL) {
+            __leave;
+        }
 
         // Determine method ID to generate RSA certificate chain
-        jmethodID mGenRSAKeyAndCertChain = env->GetMethodID(env->GetObjectClass(obj),
+        jmethodID mGenRSAKeyAndCertChain = env->GetMethodID(clazzOfThis,
                                                    "generateRSAKeyAndCertificateChain",
                                                    "(Ljava/lang/String;JJILjava/util/Collection;Ljava/util/Collection;)V");
+        if (mGenRSAKeyAndCertChain == NULL) {
+            __leave;
+        }
 
         // Use CertEnumCertificatesInStore to get the certificates
         // from the open store. pCertContext must be reset to
@@ -590,9 +616,6 @@
     }
     __finally
     {
-        if (hCryptProvAlt)
-            ::CryptReleaseContext(hCryptProvAlt, 0);
-
         if (pSignedHashBuffer)
             delete [] pSignedHashBuffer;
 
@@ -601,6 +624,9 @@
 
         if (hHash)
             ::CryptDestroyHash(hHash);
+
+        if (hCryptProvAlt)
+            ::CryptReleaseContext(hCryptProvAlt, 0);
     }
 
     return jSignedHash;
@@ -688,9 +714,6 @@
 
     __finally
     {
-        if (hCryptProvAlt)
-            ::CryptReleaseContext(hCryptProvAlt, 0);
-
         if (pSignedHashBuffer)
             delete [] pSignedHashBuffer;
 
@@ -699,6 +722,9 @@
 
         if (hHash)
             ::CryptDestroyHash(hHash);
+
+        if (hCryptProvAlt)
+            ::CryptReleaseContext(hCryptProvAlt, 0);
     }
 
     return result;
@@ -763,9 +789,15 @@
         // Get the method ID for the RSAKeyPair constructor
         jclass clazzRSAKeyPair =
             env->FindClass("sun/security/mscapi/RSAKeyPair");
+        if (clazzRSAKeyPair == NULL) {
+            __leave;
+        }
 
         jmethodID mNewRSAKeyPair =
             env->GetMethodID(clazzRSAKeyPair, "<init>", "(JJI)V");
+        if (mNewRSAKeyPair == NULL) {
+            __leave;
+        }
 
         // Create a new RSA keypair
         keypair = env->NewObject(clazzRSAKeyPair, mNewRSAKeyPair,
@@ -1948,9 +1980,15 @@
         // Get the method ID for the RSAPrivateKey constructor
         jclass clazzRSAPrivateKey =
             env->FindClass("sun/security/mscapi/RSAPrivateKey");
+        if (clazzRSAPrivateKey == NULL) {
+            __leave;
+        }
 
         jmethodID mNewRSAPrivateKey =
             env->GetMethodID(clazzRSAPrivateKey, "<init>", "(JJI)V");
+        if (mNewRSAPrivateKey == NULL) {
+            __leave;
+        }
 
         // Create a new RSA private key
         privateKey = env->NewObject(clazzRSAPrivateKey, mNewRSAPrivateKey,
@@ -2035,9 +2073,15 @@
         // Get the method ID for the RSAPublicKey constructor
         jclass clazzRSAPublicKey =
             env->FindClass("sun/security/mscapi/RSAPublicKey");
+        if (clazzRSAPublicKey == NULL) {
+            __leave;
+        }
 
         jmethodID mNewRSAPublicKey =
             env->GetMethodID(clazzRSAPublicKey, "<init>", "(JJI)V");
+        if (mNewRSAPublicKey == NULL) {
+            __leave;
+        }
 
         // Create a new RSA public key
         publicKey = env->NewObject(clazzRSAPublicKey, mNewRSAPublicKey,
--- a/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/TimestampedSigner.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/TimestampedSigner.java	Thu Jul 02 16:08:47 2015 -0700
@@ -169,7 +169,7 @@
             for (int i = 0; i < derValue.length; i++) {
                 description = new AccessDescription(derValue[i]);
                 if (description.getAccessMethod()
-                        .equals((Object)AD_TIMESTAMPING_Id)) {
+                        .equals(AD_TIMESTAMPING_Id)) {
                     location = description.getAccessLocation();
                     if (location.getType() == GeneralNameInterface.NAME_URI) {
                         uri = (URIName) location.getName();
--- a/test/ProblemList.txt	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/ProblemList.txt	Thu Jul 02 16:08:47 2015 -0700
@@ -116,6 +116,12 @@
 
 # jdk_beans
 
+# 8060027
+java/beans/XMLEncoder/Test4903007.java                        generic-all
+java/beans/XMLEncoder/java_awt_GridBagLayout.java             generic-all
+java/beans/XMLDecoder/8028054/TestConstructorFinder.java      generic-all
+java/beans/XMLDecoder/8028054/TestMethodFinder.java           generic-all
+
 ############################################################################
 
 # jdk_lang
@@ -221,9 +227,6 @@
 # 7164518: no PortUnreachableException on Mac
 sun/security/krb5/auto/Unreachable.java                         macosx-all
 
-# 8058849
-sun/security/krb5/config/dns.sh                                 generic-all
-
 # 7041639: Solaris DSA keypair generation bug
 java/security/KeyPairGenerator/SolarisShortDSA.java             solaris-all
 sun/security/tools/keytool/standard.sh                          solaris-all
@@ -292,10 +295,16 @@
 sun/security/pkcs11/tls/TestPRF.java                            windows-all
 sun/security/pkcs11/tls/TestPremaster.java                      windows-all
 
+# 8051770
+sun/security/provider/SecureRandom/StrongSecureRandom.java      macosx-10.10
+
 ############################################################################
 
 # jdk_sound
 
+# 8059743
+javax/sound/midi/Gervill/SoftProvider/GetDevice.java            generic-all
+
 ############################################################################
 
 # jdk_swing
--- a/test/com/apple/eawt/DefaultMenuBar/DefaultMenuBarTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/apple/eawt/DefaultMenuBar/DefaultMenuBarTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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,6 +26,7 @@
  * @bug 8007267
  * @summary [macosx] com.apple.eawt.Application.setDefaultMenuBar is not working
  * @author leonid.romanov@oracle.com
+ * @modules java.desktop/sun.awt
  * @run main DefaultMenuBarTest
  */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/apple/eawt/TEST.properties	Thu Jul 02 16:08:47 2015 -0700
@@ -0,0 +1,2 @@
+modules=java.desktop
+
--- a/test/com/sun/awt/SecurityWarning/GetSizeShouldNotReturnZero.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/awt/SecurityWarning/GetSizeShouldNotReturnZero.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, 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,6 +27,8 @@
   @summary The size returned by SecurityWarning.getSize() should not be zero
   @author anthony.petrov@sun.com: area=awt.toplevel
   @library ../../../../java/awt/regtesthelpers
+  @modules java.desktop/com.sun.awt
+           java.desktop/sun.awt
   @build Util CustomSecurityManager CopyClassFile
   @run main CopyClassFile CustomSecurityManager bootcp/
   @run main/othervm/secure=CustomSecurityManager -Xbootclasspath/a:bootcp GetSizeShouldNotReturnZero
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/awt/TEST.properties	Thu Jul 02 16:08:47 2015 -0700
@@ -0,0 +1,2 @@
+modules=java.desktop
+
--- a/test/com/sun/awt/Translucency/WindowOpacity.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/awt/Translucency/WindowOpacity.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, 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,6 +26,7 @@
   @bug 6594131
   @summary Tests the AWTUtilities.get/setWindowOpacity() methods
   @author anthony.petrov@...: area=awt.toplevel
+  @modules java.desktop/com.sun.awt
   @run main WindowOpacity
 */
 
--- a/test/com/sun/crypto/provider/Cipher/AES/Test4511676.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/Cipher/AES/Test4511676.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, 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,6 @@
 import javax.crypto.*;
 import javax.crypto.spec.*;
 import java.security.Provider;
-import com.sun.crypto.provider.*;
 
 public class Test4511676 {
     private static final String ALGO = "AES";
@@ -59,7 +58,6 @@
     }
 
     public static void main (String[] args) throws Exception {
-        Security.addProvider(new com.sun.crypto.provider.SunJCE());
 
         Test4511676 test = new Test4511676();
         String testName = test.getClass().getName() + "[" + ALGO +
--- a/test/com/sun/crypto/provider/Cipher/AES/Test4512524.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/Cipher/AES/Test4512524.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, 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
@@ -35,7 +35,6 @@
 import javax.crypto.*;
 import javax.crypto.spec.*;
 import java.security.Provider;
-import com.sun.crypto.provider.*;
 
 public class Test4512524 {
 
@@ -65,8 +64,6 @@
     }
 
     public static void main (String[] args) throws Exception {
-        Security.addProvider(new com.sun.crypto.provider.SunJCE());
-
         Test4512524 test = new Test4512524();
         test.execute("CBC");
         test.execute("GCM");
--- a/test/com/sun/crypto/provider/Cipher/AES/Test4512704.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/Cipher/AES/Test4512704.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, 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
@@ -35,7 +35,6 @@
 import javax.crypto.*;
 import javax.crypto.spec.*;
 import java.security.Provider;
-import com.sun.crypto.provider.*;
 
 public class Test4512704 {
     private static final String ALGO = "AES";
@@ -61,8 +60,6 @@
     }
 
     public static void main (String[] args) throws Exception {
-        Security.addProvider(new com.sun.crypto.provider.SunJCE());
-
         Test4512704 test = new Test4512704();
         test.execute("CBC");
         test.execute("GCM");
--- a/test/com/sun/crypto/provider/Cipher/AES/Test4513830.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/Cipher/AES/Test4513830.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, 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
@@ -85,8 +85,6 @@
     }
 
     public static void main (String[] args) throws Exception {
-        Security.addProvider(new com.sun.crypto.provider.SunJCE());
-
         Test4513830 test = new Test4513830();
         String testName = test.getClass().getName() + "[" + ALGO +
             "/" + MODE + "/" + PADDING + "]";
--- a/test/com/sun/crypto/provider/Cipher/AES/Test4517355.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/Cipher/AES/Test4517355.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, 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 javax.crypto.*;
 import javax.crypto.spec.*;
 import java.security.Provider;
-import com.sun.crypto.provider.*;
 
 public class Test4517355 {
 
@@ -93,8 +92,6 @@
     }
 
     public static void main (String[] args) throws Exception {
-        Security.addProvider(new com.sun.crypto.provider.SunJCE());
-
         Test4517355 test = new Test4517355();
         Random rdm = new Random();
         rdm.nextBytes(test.plainText);
--- a/test/com/sun/crypto/provider/Cipher/AES/Test4626070.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/Cipher/AES/Test4626070.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, 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
@@ -60,8 +60,6 @@
     }
 
     public static void main (String[] args) throws Exception {
-        Security.addProvider(new com.sun.crypto.provider.SunJCE());
-
         Test4626070 test = new Test4626070();
         test.execute("CBC", "PKCS5Padding");
         test.execute("GCM", "NoPadding");
--- a/test/com/sun/crypto/provider/Cipher/AES/TestGHASH.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/Cipher/AES/TestGHASH.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2015, Red Hat, Inc.
+ * Copyright (c) 2015, Oracle, Inc.
  * 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,7 +25,14 @@
 /*
  * @test
  * @bug 8069072
- * @summary Test vectors for com.sun.crypto.provider.GHASH
+ * @summary Test vectors for com.sun.crypto.provider.GHASH.
+ *
+ * Single iteration to verify software-only GHASH algorithm.
+ * @run main TestGHASH
+ *
+ * Multi-iteration to verify test intrinsics GHASH, if available.
+ * Many iterations are needed so we are sure hotspot will use intrinsic
+ * @run main TestGHASH -n 10000
  */
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
@@ -124,43 +132,55 @@
 
     public static void main(String[] args) throws Exception {
         TestGHASH test;
-        if (args.length == 0) {
-            test = new TestGHASH("com.sun.crypto.provider.GHASH");
-        } else {
-            test = new TestGHASH(args[0]);
+        String test_class = "com.sun.crypto.provider.GHASH";
+        int i = 0;
+        int num_of_loops = 1;
+        while (args.length > i) {
+            if (args[i].compareTo("-c") == 0) {
+                test_class = args[++i];
+            } else if (args[i].compareTo("-n") == 0) {
+                num_of_loops = Integer.parseInt(args[++i]);
+            }
+            i++;
         }
 
-        // Test vectors from David A. McGrew, John Viega,
-        // "The Galois/Counter Mode of Operation (GCM)", 2005.
-        // <http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/gcm/gcm-revised-spec.pdf>
+        System.out.println("Running " + num_of_loops + " iterations.");
+        test = new TestGHASH(test_class);
+        i = 0;
 
-        test.check(1, "66e94bd4ef8a2c3b884cfa59ca342b2e", "", "",
-                "00000000000000000000000000000000");
-        test.check(2,
-                "66e94bd4ef8a2c3b884cfa59ca342b2e", "",
-                "0388dace60b6a392f328c2b971b2fe78",
-                "f38cbb1ad69223dcc3457ae5b6b0f885");
-        test.check(3,
-                "b83b533708bf535d0aa6e52980d53b78", "",
-                "42831ec2217774244b7221b784d0d49c" +
-                "e3aa212f2c02a4e035c17e2329aca12e" +
-                "21d514b25466931c7d8f6a5aac84aa05" +
-                "1ba30b396a0aac973d58e091473f5985",
-                "7f1b32b81b820d02614f8895ac1d4eac");
-        test.check(4,
-                "b83b533708bf535d0aa6e52980d53b78",
-                "feedfacedeadbeeffeedfacedeadbeef" + "abaddad2",
-                "42831ec2217774244b7221b784d0d49c" +
-                "e3aa212f2c02a4e035c17e2329aca12e" +
-                "21d514b25466931c7d8f6a5aac84aa05" +
-                "1ba30b396a0aac973d58e091",
-                "698e57f70e6ecc7fd9463b7260a9ae5f");
-        test.check(5, "b83b533708bf535d0aa6e52980d53b78",
-                "feedfacedeadbeeffeedfacedeadbeef" + "abaddad2",
-                "61353b4c2806934a777ff51fa22a4755" +
-                "699b2a714fcdc6f83766e5f97b6c7423" +
-                "73806900e49f24b22b097544d4896b42" +
-                "4989b5e1ebac0f07c23f4598",
-                "df586bb4c249b92cb6922877e444d37b");
+        while (num_of_loops > i) {
+            // Test vectors from David A. McGrew, John Viega,
+            // "The Galois/Counter Mode of Operation (GCM)", 2005.
+            // <http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/gcm/gcm-revised-spec.pdf>
+            test.check(1, "66e94bd4ef8a2c3b884cfa59ca342b2e", "", "",
+                       "00000000000000000000000000000000");
+            test.check(2,
+                       "66e94bd4ef8a2c3b884cfa59ca342b2e", "",
+                       "0388dace60b6a392f328c2b971b2fe78",
+                       "f38cbb1ad69223dcc3457ae5b6b0f885");
+            test.check(3,
+                       "b83b533708bf535d0aa6e52980d53b78", "",
+                       "42831ec2217774244b7221b784d0d49c" +
+                       "e3aa212f2c02a4e035c17e2329aca12e" +
+                       "21d514b25466931c7d8f6a5aac84aa05" +
+                       "1ba30b396a0aac973d58e091473f5985",
+                       "7f1b32b81b820d02614f8895ac1d4eac");
+            test.check(4,
+                       "b83b533708bf535d0aa6e52980d53b78",
+                       "feedfacedeadbeeffeedfacedeadbeef" + "abaddad2",
+                       "42831ec2217774244b7221b784d0d49c" +
+                       "e3aa212f2c02a4e035c17e2329aca12e" +
+                       "21d514b25466931c7d8f6a5aac84aa05" +
+                       "1ba30b396a0aac973d58e091",
+                       "698e57f70e6ecc7fd9463b7260a9ae5f");
+            test.check(5, "b83b533708bf535d0aa6e52980d53b78",
+                       "feedfacedeadbeeffeedfacedeadbeef" + "abaddad2",
+                       "61353b4c2806934a777ff51fa22a4755" +
+                       "699b2a714fcdc6f83766e5f97b6c7423" +
+                       "73806900e49f24b22b097544d4896b42" +
+                       "4989b5e1ebac0f07c23f4598",
+                       "df586bb4c249b92cb6922877e444d37b");
+            i++;
+        }
     }
 }
--- a/test/com/sun/crypto/provider/Cipher/AES/TestKATForECB_IV.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/Cipher/AES/TestKATForECB_IV.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, 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
@@ -118,8 +118,6 @@
     }
 
     public static void main (String[] args) throws Exception {
-        Security.addProvider(new com.sun.crypto.provider.SunJCE());
-
         TestKATForECB_IV test = new TestKATForECB_IV();
         String testName = test.getClass().getName() + "[" + ALGO +
             "/" + MODE + "/" + PADDING + "]";
--- a/test/com/sun/crypto/provider/Cipher/AES/TestKATForECB_VK.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/Cipher/AES/TestKATForECB_VK.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, 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,6 @@
 import javax.crypto.*;
 import javax.crypto.spec.*;
 import java.math.*;
-import com.sun.crypto.provider.*;
 
 import java.util.*;
 
@@ -746,8 +745,6 @@
     }
 
     public static void main (String[] args) throws Exception {
-        Security.addProvider(new com.sun.crypto.provider.SunJCE());
-
         TestKATForECB_VK test = new TestKATForECB_VK();
         String testName = test.getClass().getName() + "[" + ALGO +
             "/" + MODE + "/" + PADDING + "]";
--- a/test/com/sun/crypto/provider/Cipher/AES/TestKATForECB_VT.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/Cipher/AES/TestKATForECB_VT.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, 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,6 @@
 import javax.crypto.*;
 import javax.crypto.spec.*;
 import java.math.*;
-import com.sun.crypto.provider.*;
 
 import java.util.*;
 
@@ -555,8 +554,6 @@
     }
 
     public static void main (String[] args) throws Exception {
-        Security.addProvider(new com.sun.crypto.provider.SunJCE());
-
         TestKATForECB_VT test = new TestKATForECB_VT();
         String testName = test.getClass().getName() + "[" + ALGO +
             "/" + MODE + "/" + PADDING + "]";
--- a/test/com/sun/crypto/provider/Cipher/Blowfish/BlowfishTestVector.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/Cipher/Blowfish/BlowfishTestVector.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -68,10 +68,8 @@
 
     public static void main(String[] argv) throws Exception {
 
-        Provider p = new com.sun.crypto.provider.SunJCE();
-        Security.addProvider(p);
         String transformation = "Blowfish/ECB/NoPadding";
-        Cipher cipher = Cipher.getInstance(transformation);
+        Cipher cipher = Cipher.getInstance(transformation, "SunJCE");
         int MAX_KEY_SIZE = Cipher.getMaxAllowedKeyLength(transformation);
         //
         // test 1
--- a/test/com/sun/crypto/provider/Cipher/DES/DESSecretKeySpec.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/Cipher/DES/DESSecretKeySpec.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -46,11 +46,11 @@
         System.out.println("Testing DES key");
         SecretKeySpec skey = new SecretKeySpec(key, "DES");
         c = Cipher.getInstance("DES/CBC/PKCS5Padding", "SunJCE");
-        SecretKeyFactory.getInstance("DES").generateSecret(skey);
+        SecretKeyFactory.getInstance("DES", "SunJCE").generateSecret(skey);
 
         System.out.println("Testing DESede key");
         skey = new SecretKeySpec(key, "DESede");
         c = Cipher.getInstance("DESede/CBC/PKCS5Padding", "SunJCE");
-        SecretKeyFactory.getInstance("TripleDES").generateSecret(skey);
+        SecretKeyFactory.getInstance("TripleDES", "SunJCE").generateSecret(skey);
     }
 }
--- a/test/com/sun/crypto/provider/Cipher/DES/DesAPITest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/Cipher/DES/DesAPITest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -32,7 +32,6 @@
 import java.security.spec.*;
 import javax.crypto.*;
 import javax.crypto.spec.*;
-import com.sun.crypto.provider.*;
 
 public class DesAPITest {
 
@@ -87,9 +86,6 @@
     public void init(String crypt, String mode, String padding)
         throws Exception {
 
-        SunJCE jce = new SunJCE();
-        Security.addProvider(jce);
-
         KeySpec desKeySpec = null;
         SecretKeyFactory factory = null;
 
@@ -99,7 +95,7 @@
         if (padding.length() != 0)
             cipherName.append("/" + padding);
 
-        cipher = Cipher.getInstance(cipherName.toString());
+        cipher = Cipher.getInstance(cipherName.toString(), "SunJCE");
         if (crypt.endsWith("ede")) {
             desKeySpec = new DESedeKeySpec(key3);
             factory = SecretKeyFactory.getInstance("DESede", "SunJCE");
--- a/test/com/sun/crypto/provider/Cipher/DES/DoFinalReturnLen.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/Cipher/DES/DoFinalReturnLen.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -85,9 +85,7 @@
         IvParameterSpec IvParamSpec = null;
         SecretKey sKey = null;
 
-        // Step 0: add providers
-        Provider sun = new com.sun.crypto.provider.SunJCE();
-        Security.addProvider(sun);
+        // Step 0: list providers
         Provider[] theProviders = Security.getProviders();
         for (int index = 0; index < theProviders.length; index++) {
             System.out.println(theProviders[index].getName());
--- a/test/com/sun/crypto/provider/Cipher/DES/FlushBug.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/Cipher/DES/FlushBug.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -32,18 +32,13 @@
 import java.security.*;
 import javax.crypto.*;
 import javax.crypto.spec.*;
-import com.sun.crypto.provider.SunJCE;
 
 public class FlushBug {
     public static void main(String[] args) throws Exception {
-
-        Provider prov = new com.sun.crypto.provider.SunJCE();
-        Security.addProvider(prov);
-
         SecureRandom sr = new SecureRandom();
 
         // Create new DES key.
-        KeyGenerator kg = KeyGenerator.getInstance("DES");
+        KeyGenerator kg = KeyGenerator.getInstance("DES", "SunJCE");
         kg.init(sr);
         Key key = kg.generateKey();
 
@@ -53,13 +48,13 @@
         IvParameterSpec iv = new IvParameterSpec(iv_bytes);
 
         // Create the consumer
-        Cipher decrypter = Cipher.getInstance("DES/CFB8/NoPadding");
+        Cipher decrypter = Cipher.getInstance("DES/CFB8/NoPadding", "SunJCE");
         decrypter.init(Cipher.DECRYPT_MODE, key, iv);
         PipedInputStream consumer = new PipedInputStream();
         InputStream in = new CipherInputStream(consumer, decrypter);
 
         // Create the producer
-        Cipher encrypter = Cipher.getInstance("DES/CFB8/NoPadding");
+        Cipher encrypter = Cipher.getInstance("DES/CFB8/NoPadding", "SunJCE");
         encrypter.init(Cipher.ENCRYPT_MODE, key, iv);
         PipedOutputStream producer = new PipedOutputStream();
         OutputStream out = new CipherOutputStream(producer, encrypter);
--- a/test/com/sun/crypto/provider/Cipher/DES/PaddingTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/Cipher/DES/PaddingTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -118,7 +118,7 @@
         if (padding.length() != 0)
             cipherName.append("/" + padding);
 
-        cipher = Cipher.getInstance(cipherName.toString());
+        cipher = Cipher.getInstance(cipherName.toString(), "SunJCE");
         if (crypt.endsWith("ede")) {
             desKeySpec = new DESedeKeySpec(key3);
             factory = SecretKeyFactory.getInstance("DESede", "SunJCE");
--- a/test/com/sun/crypto/provider/Cipher/DES/PerformanceTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/Cipher/DES/PerformanceTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -152,7 +152,7 @@
         if (padding.length() != 0)
             cipherName.append("/" + padding);
 
-        cipher = Cipher.getInstance(cipherName.toString());
+        cipher = Cipher.getInstance(cipherName.toString(), "SunJCE");
         if (crypt.endsWith("ede")) {
             desKeySpec = new DESedeKeySpec(key3);
             factory = SecretKeyFactory.getInstance("DESede", "SunJCE");
--- a/test/com/sun/crypto/provider/Cipher/DES/Sealtest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/Cipher/DES/Sealtest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -35,19 +35,17 @@
 
     public static void main(String[] args) throws Exception {
 
-        Security.addProvider(new com.sun.crypto.provider.SunJCE());
-
         // create DSA keypair
         KeyPairGenerator kpgen = KeyPairGenerator.getInstance("DSA");
         kpgen.initialize(512);
         KeyPair kp = kpgen.generateKeyPair();
 
         // create DES key
-        KeyGenerator kg = KeyGenerator.getInstance("DES");
+        KeyGenerator kg = KeyGenerator.getInstance("DES", "SunJCE");
         SecretKey skey = kg.generateKey();
 
         // create cipher
-        Cipher c = Cipher.getInstance("DES/CFB16/PKCS5Padding");
+        Cipher c = Cipher.getInstance("DES/CFB16/PKCS5Padding", "SunJCE");
         c.init(Cipher.ENCRYPT_MODE, skey);
 
         // seal the DSA private key
--- a/test/com/sun/crypto/provider/Cipher/UTIL/SunJCEGetInstance.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/Cipher/UTIL/SunJCEGetInstance.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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.Security;
+import java.security.Provider;
 import javax.crypto.Cipher;
 import javax.crypto.spec.SecretKeySpec;
 
@@ -40,13 +41,12 @@
 
         try{
             // Remove SunJCE from Provider list
+            Provider prov = Security.getProvider("SunJCE");
             Security.removeProvider("SunJCE");
-
             // Create our own instance of SunJCE provider.  Purposefully not
             // using SunJCE.getInstance() so we can have our own instance
             // for the test.
-            jce = Cipher.getInstance("AES/CBC/PKCS5Padding",
-                new com.sun.crypto.provider.SunJCE());
+            jce = Cipher.getInstance("AES/CBC/PKCS5Padding", prov);
 
             jce.init(Cipher.ENCRYPT_MODE,
                 new SecretKeySpec("1234567890abcedf".getBytes(), "AES"));
--- a/test/com/sun/crypto/provider/KeyAgreement/DHGenSharedSecret.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/KeyAgreement/DHGenSharedSecret.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -32,7 +32,6 @@
 import java.security.interfaces.*;
 import javax.crypto.*;
 import javax.crypto.spec.*;
-import com.sun.crypto.provider.*;
 import java.math.BigInteger;
 
 public class DHGenSharedSecret {
@@ -69,8 +68,6 @@
     };
 
     public static void main(String[] args) throws Exception {
-        SunJCE jce = new SunJCE();
-        Security.addProvider(jce);
         DHGenSharedSecret test = new DHGenSharedSecret();
         test.run();
     }
--- a/test/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement2.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement2.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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,7 @@
  * @test
  * @bug 7146728
  * @summary DHKeyAgreement2
+ * @modules java.base/sun.misc
  * @author Jan Luehe
  */
 
@@ -36,7 +37,6 @@
 import javax.crypto.*;
 import javax.crypto.spec.*;
 import javax.crypto.interfaces.*;
-import com.sun.crypto.provider.SunJCE;
 
 import sun.misc.HexDumpEncoder;
 
--- a/test/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement3.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement3.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,6 @@
 import javax.crypto.*;
 import javax.crypto.spec.*;
 import javax.crypto.interfaces.*;
-import com.sun.crypto.provider.SunJCE;
 
 /**
  * This test utility executes the Diffie-Hellman key agreement protocol
@@ -51,10 +50,6 @@
     private DHKeyAgreement3() {}
 
     public static void main(String argv[]) throws Exception {
-            // Add JCE to the list of providers
-            SunJCE jce = new SunJCE();
-            Security.addProvider(jce);
-
             DHKeyAgreement3 keyAgree = new DHKeyAgreement3();
             keyAgree.run();
             System.out.println("Test Passed");
@@ -69,36 +64,36 @@
 
         // Alice creates her own DH key pair
         System.err.println("ALICE: Generate DH keypair ...");
-        KeyPairGenerator aliceKpairGen = KeyPairGenerator.getInstance("DH");
+        KeyPairGenerator aliceKpairGen = KeyPairGenerator.getInstance("DH", "SunJCE");
         aliceKpairGen.initialize(dhSkipParamSpec);
         KeyPair aliceKpair = aliceKpairGen.generateKeyPair();
 
         // Bob creates his own DH key pair
         System.err.println("BOB: Generate DH keypair ...");
-        KeyPairGenerator bobKpairGen = KeyPairGenerator.getInstance("DH");
+        KeyPairGenerator bobKpairGen = KeyPairGenerator.getInstance("DH", "SunJCE");
         bobKpairGen.initialize(dhSkipParamSpec);
         KeyPair bobKpair = bobKpairGen.generateKeyPair();
 
         // Carol creates her own DH key pair
         System.err.println("CAROL: Generate DH keypair ...");
-        KeyPairGenerator carolKpairGen = KeyPairGenerator.getInstance("DH");
+        KeyPairGenerator carolKpairGen = KeyPairGenerator.getInstance("DH", "SunJCE");
         carolKpairGen.initialize(dhSkipParamSpec);
         KeyPair carolKpair = carolKpairGen.generateKeyPair();
 
 
         // Alice initialize
         System.err.println("ALICE: Initialize ...");
-        KeyAgreement aliceKeyAgree = KeyAgreement.getInstance("DH");
+        KeyAgreement aliceKeyAgree = KeyAgreement.getInstance("DH", "SunJCE");
         aliceKeyAgree.init(aliceKpair.getPrivate());
 
         // Bob initialize
         System.err.println("BOB: Initialize ...");
-        KeyAgreement bobKeyAgree = KeyAgreement.getInstance("DH");
+        KeyAgreement bobKeyAgree = KeyAgreement.getInstance("DH", "SunJCE");
         bobKeyAgree.init(bobKpair.getPrivate());
 
         // Carol initialize
         System.err.println("CAROL: Initialize ...");
-        KeyAgreement carolKeyAgree = KeyAgreement.getInstance("DH");
+        KeyAgreement carolKeyAgree = KeyAgreement.getInstance("DH", "SunJCE");
         carolKeyAgree.init(carolKpair.getPrivate());
 
 
--- a/test/com/sun/crypto/provider/KeyAgreement/DHKeyFactory.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/KeyAgreement/DHKeyFactory.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,6 @@
 import javax.crypto.*;
 import javax.crypto.spec.*;
 import javax.crypto.interfaces.*;
-import com.sun.crypto.provider.SunJCE;
 
 /**
  * This test creates a DH keypair, retrieves the encodings of the DH public and
@@ -49,10 +48,6 @@
     private DHKeyFactory() {}
 
     public static void main(String argv[]) throws Exception {
-            // Add JCE to the list of providers
-            SunJCE jce = new SunJCE();
-            Security.addProvider(jce);
-
             DHKeyFactory test = new DHKeyFactory();
             test.run();
             System.out.println("Test Passed");
@@ -67,7 +62,7 @@
         dhSkipParamSpec = new DHParameterSpec(skip1024Modulus,
                                               skip1024Base);
 
-        KeyPairGenerator kpgen = KeyPairGenerator.getInstance("DH");
+        KeyPairGenerator kpgen = KeyPairGenerator.getInstance("DH", "SunJCE");
         kpgen.initialize(dhSkipParamSpec);
         KeyPair kp = kpgen.generateKeyPair();
 
@@ -77,7 +72,7 @@
         // get the private key encoding
         byte[] privKeyEnc = kp.getPrivate().getEncoded();
 
-        KeyFactory kfac = KeyFactory.getInstance("DH");
+        KeyFactory kfac = KeyFactory.getInstance("DH", "SunJCE");
 
         X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(pubKeyEnc);
         PublicKey pubKey = kfac.generatePublic(x509KeySpec);
--- a/test/com/sun/crypto/provider/KeyAgreement/DHKeyGenSpeed.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/KeyAgreement/DHKeyGenSpeed.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -32,7 +32,6 @@
 import java.security.interfaces.*;
 import javax.crypto.*;
 import javax.crypto.spec.*;
-import com.sun.crypto.provider.*;
 import java.math.*;
 
 public class DHKeyGenSpeed {
@@ -71,8 +70,6 @@
     };
 
     public static void main(String[] args) throws Exception {
-        SunJCE jce = new SunJCE();
-        Security.addProvider(jce);
         DHKeyGenSpeed test = new DHKeyGenSpeed();
         test.run();
         System.out.println("Test Passed");
--- a/test/com/sun/crypto/provider/KeyFactory/TestProviderLeak.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/KeyFactory/TestProviderLeak.java	Thu Jul 02 16:08:47 2015 -0700
@@ -66,15 +66,17 @@
                 megaByte = new byte [MB];
                 data.add(megaByte);
             } catch (OutOfMemoryError e) {
-                System.out.println("OOME is thrown when allocating "
-                        + data.size() + "MB memory.");
-                megaByte = null;
+                megaByte = null;    // Free memory ASAP
+
+                int size = data.size();
 
                 for (int j = 0; j < RESERVATION && !data.isEmpty(); j++) {
                     data.removeLast();
                 }
                 System.gc();
                 hasException = true;
+                System.out.println("OOME is thrown when allocating "
+                        + size + "MB memory.");
             }
         }
         dumpMemoryStats("After memory allocation");
--- a/test/com/sun/crypto/provider/KeyGenerator/Test4628062.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/KeyGenerator/Test4628062.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, 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
@@ -78,8 +78,6 @@
     }
 
     public static void main (String[] args) throws Exception {
-        Security.addProvider(new com.sun.crypto.provider.SunJCE());
-
         Test4628062 test = new Test4628062();
         String testName = test.getClass().getName();
         if (test.execute("AES", AES_SIZES)) {
--- a/test/com/sun/crypto/provider/KeyGenerator/TestExplicitKeyLength.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/KeyGenerator/TestExplicitKeyLength.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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,6 @@
     }
 
     public static void main (String[] args) throws Exception {
-        Security.addProvider(new com.sun.crypto.provider.SunJCE());
         for (int i = 0; i < ALGOS.length; i++) {
             System.out.println("Testing " + ALGOS[i] + " KeyGenerator with " +
                                KEY_SIZES[i] + "-bit keysize");
--- a/test/com/sun/crypto/provider/Mac/HmacMD5.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/Mac/HmacMD5.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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,9 +39,6 @@
             int i, j, n;
             Mac mac;
 
-            Provider jce = new com.sun.crypto.provider.SunJCE();
-            Security.addProvider(jce);
-
             byte[][][] test_data = {
                 {
                     { (byte)0x0b, (byte)0x0b, (byte)0x0b, (byte)0x0b,
@@ -92,7 +89,7 @@
                 }
             };
 
-            mac = Mac.getInstance("HmacMD5");
+            mac = Mac.getInstance("HmacMD5", "SunJCE");
             for (i=0; i<3; i++) {
                 j=0;
 
@@ -109,7 +106,7 @@
             }
 
             // now test multiple-part operation, using the 2nd test vector
-            mac = Mac.getInstance("HmacMD5");
+            mac = Mac.getInstance("HmacMD5", "SunJCE");
             mac.init(new SecretKeySpec("Jefe".getBytes(), "HMAC"));
             mac.update("what do ya ".getBytes());
             mac.update("want for ".getBytes());
--- a/test/com/sun/crypto/provider/TLS/TestLeadingZeroes.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/crypto/provider/TLS/TestLeadingZeroes.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -35,7 +35,6 @@
 import javax.crypto.*;
 import javax.crypto.spec.*;
 import javax.crypto.interfaces.*;
-import com.sun.crypto.provider.SunJCE;
 
 /**
  * Test that leading zeroes are stripped in TlsPremasterSecret case,
@@ -52,10 +51,6 @@
     private TestLeadingZeroes() {}
 
     public static void main(String argv[]) throws Exception {
-        // Add JCE to the list of providers
-        SunJCE jce = new SunJCE();
-        Security.addProvider(jce);
-
         TestLeadingZeroes keyAgree = new TestLeadingZeroes();
         keyAgree.run();
         System.out.println("Test Passed");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/java/swing/TEST.properties	Thu Jul 02 16:08:47 2015 -0700
@@ -0,0 +1,2 @@
+modules=java.desktop
+
--- a/test/com/sun/java/swing/plaf/windows/Test6824600.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/java/swing/plaf/windows/Test6824600.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, 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,7 @@
    @bug 6824600
    @summary OOM occurs when setLookAndFeel() is executed in Windows L&F(XP style)
    @author Pavel Porvatov
+   @modules java.desktop/com.sun.java.swing.plaf.windows
    @run main Test6824600
 */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/jdi/cds/CDSBreakpointTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2015, 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 8054386
+ * @summary java debugging test for CDS
+ * @modules jdk.jdi
+ *          java.base/sun.misc
+ *          java.management
+ *          jdk.jartool/sun.tools.jar
+ * @library /lib/testlibrary
+ * @library ..
+ * @run compile -g ../BreakpointTest.java
+ * @run main CDSBreakpointTest
+ */
+
+/*
+ * Launch the JDI BreakpointTest, which will set a debugger breakpoint in
+ * BreakpointTarg. BreakpointTarg is first dumped into the CDS archive,
+ * so this will test debugging a class in the archive.
+ */
+
+public class CDSBreakpointTest extends CDSJDITest {
+    static String jarClasses[] = {
+        // BreakpointTarg is the only class we need in the archive. It will
+        // be launched by BreakpointTest as the debuggee application. Note,
+        // compiling BreakpointTest.java above will cause BreakpointTarg to
+        // be compiled since it is also in BreakpointTest.java.
+        "BreakpointTarg",
+    };
+    static String testname = "BreakpointTest";
+
+    public static void main(String[] args) throws Exception {
+        runTest(testname, jarClasses);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/jdi/cds/CDSDeleteAllBkptsTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2015, 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 8054386
+ * @summary java debugging test for CDS
+ * @modules jdk.jdi
+ *          java.base/sun.misc
+ *          java.management
+ *          jdk.jartool/sun.tools.jar
+ * @library /lib/testlibrary
+ * @library ..
+ * @run compile -g ../DeleteAllBkptsTest.java
+ * @run main CDSDeleteAllBkptsTest
+ */
+
+/*
+ * Launch the JDI DeleteAllBkptsTest, which will set a debugger breakpoint in
+ * DeleteAllBkptsTarg and then clear them. DeleteAllBkptsTarg is first dumped
+ * into the CDS archive, so this will test debugging a class in the archive.
+ */
+
+public class CDSDeleteAllBkptsTest extends CDSJDITest {
+    static String jarClasses[] = {
+        // DeleteAllBkptsTarg is the only class we need in the archive. It will
+        // be launched by DeleteAllBkptsTest as the debuggee application. Note,
+        // compiling DeleteAllBkptsTest.java above will cause DeleteAllBkptsTarg to
+        // be compiled since it is also in DeleteAllBkptsTest.java.
+        "DeleteAllBkptsTarg",
+    };
+    static String testname = "DeleteAllBkptsTest";
+
+    public static void main(String[] args) throws Exception {
+        runTest(testname, jarClasses);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/jdi/cds/CDSFieldWatchpoints.java	Thu Jul 02 16:08:47 2015 -0700
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2015, 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 8054386
+ * @summary java debugging test for CDS
+ * @modules jdk.jdi
+ *          java.base/sun.misc
+ *          java.management
+ *          jdk.jartool/sun.tools.jar
+ * @library /lib/testlibrary
+ * @library ..
+ * @run compile -g ../FieldWatchpoints.java
+ * @run main CDSFieldWatchpoints
+ */
+
+/*
+ * Launch the JDI FieldWatchpoints test, which will setup field watchpoints in
+ * FieldWatchpointsDebugee. FieldWatchpointsDebugee is first dumped into the
+ * CDS archive, so this will test debugging a class in the archive.
+ */
+
+public class CDSFieldWatchpoints extends CDSJDITest {
+    static String jarClasses[] = {
+        // FieldWatchpointsDebugee. A, and B are the only classes we need in the archive.
+        // FieldWatchpointsDebugee will be launched by FieldWatchpoints as the debuggee
+        // application. Note, compiling FieldWatchpoints.java above will cause
+        // FieldWatchpointsDebugee to be compiled since it is also in FieldWatchpoints.java.
+        "FieldWatchpointsDebugee", "A", "B",
+    };
+    static String testname = "FieldWatchpoints";
+
+    public static void main(String[] args) throws Exception {
+        runTest(testname, jarClasses);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/jdi/cds/CDSJDITest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -0,0 +1,202 @@
+/*
+ * Copyright (c) 2013, 2015, 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.
+ */
+
+/*
+ * Helper superclass for launching JDI tests out of the CDS archive.
+*/
+
+import jdk.testlibrary.OutputAnalyzer;
+import jdk.testlibrary.ProcessTools;
+
+import java.io.*;
+import java.util.ArrayList;
+import sun.tools.jar.Main;
+
+public class CDSJDITest {
+    private static final String classesDir = System.getProperty("test.classes");
+
+    public static void runTest(String testname, String[] jarClasses) throws Exception {
+        File jarClasslistFile = makeClassList(jarClasses);
+        String appJar = buildJar(testname, jarClasses);
+
+        // These are the arguments passed to createJavaProcessBuilder() to launch
+        // the JDI test.
+        String[] testArgs = {
+        // JVM Args:
+            // These first three properties are setup by jtreg, and must be passed
+            // to the JDI test subprocess because it needs them in order to
+            // pass them to the subprocess it will create for the debuggee. This
+            // is how the JPRT -javaopts are passed to the debggee. See
+            // VMConnection.getDebuggeeVMOptions().
+            getPropOpt("test.classes"),
+            getPropOpt("test.java.opts"),
+            getPropOpt("test.vm.opts"),
+            // Pass -showversion to the JDI test just so we get a bit of trace output.
+            "-showversion",
+        // Main class:
+            testname,
+        // Args to the Main Class:
+            // These argument all follow the above <testname> argument, and are
+            // in fact passed to <testname>.main() as java arguments. <testname> will
+            // pass them as JVM arguments to the debuggee process it creates.
+            "-Xbootclasspath/a:" + appJar,
+            "-XX:+UnlockDiagnosticVMOptions",
+            "-XX:+TraceClassPaths",
+            "-XX:SharedArchiveFile=./SharedArchiveFile.jsa",
+            "-Xshare:on",
+            "-showversion"
+        };
+
+        // Dump the archive
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+            "-Xbootclasspath/a:" + appJar,
+            "-XX:+UnlockDiagnosticVMOptions", "-XX:SharedArchiveFile=./SharedArchiveFile.jsa",
+            "-XX:ExtraSharedClassListFile=" + jarClasslistFile.getPath(),
+            "-Xshare:dump");
+        OutputAnalyzer outputDump = executeAndLog(pb, "exec");
+        for (String jarClass : jarClasses) {
+            outputDump.shouldNotContain("Cannot find " + jarClass);
+        }
+        outputDump.shouldContain("Loading classes to share");
+        outputDump.shouldHaveExitValue(0);
+
+        // Run the test specified JDI test
+        pb = ProcessTools.createJavaProcessBuilder(true, testArgs);
+        OutputAnalyzer outputRun = executeAndLog(pb, "exec");
+        try {
+            outputRun.shouldContain("sharing");
+            outputRun.shouldHaveExitValue(0);
+        } catch (RuntimeException e) {
+            outputRun.shouldContain("Unable to use shared archive");
+            outputRun.shouldHaveExitValue(1);
+        }
+    }
+
+    public static String getPropOpt(String prop) {
+        String propVal = System.getProperty(prop);
+        if (propVal == null) propVal = "";
+        System.out.println(prop + ": '" + propVal  + "'");
+        return "-D" + prop + "=" + propVal;
+    }
+
+    public static File makeClassList(String appClasses[]) throws Exception {
+        File classList = getOutputFile("test.classlist");
+        FileOutputStream fos = new FileOutputStream(classList);
+        PrintStream ps = new PrintStream(fos);
+
+        addToClassList(ps, appClasses);
+
+        ps.close();
+        fos.close();
+
+        return classList;
+    }
+
+    public static OutputAnalyzer executeAndLog(ProcessBuilder pb, String logName) throws Exception {
+        long started = System.currentTimeMillis();
+        OutputAnalyzer output = ProcessTools.executeProcess(pb);
+        writeFile(getOutputFile(logName + ".stdout"), output.getStdout());
+        writeFile(getOutputFile(logName + ".stderr"), output.getStderr());
+        System.out.println("[ELAPSED: " + (System.currentTimeMillis() - started) + " ms]");
+        System.out.println("[STDOUT]\n" + output.getStdout());
+        System.out.println("[STDERR]\n" + output.getStderr());
+        return output;
+    }
+
+    private static void writeFile(File file, String content) throws Exception {
+        FileOutputStream fos = new FileOutputStream(file);
+        PrintStream ps = new PrintStream(fos);
+        ps.print(content);
+        ps.close();
+        fos.close();
+    }
+
+    public static File getOutputFile(String name) {
+        File dir = new File(System.getProperty("test.classes", "."));
+        return new File(dir, getTestNamePrefix() + name);
+    }
+
+    private static void addToClassList(PrintStream ps, String classes[]) throws IOException {
+        if (classes != null) {
+            for (String s : classes) {
+                ps.println(s);
+            }
+        }
+    }
+
+    private static String testNamePrefix;
+
+    private static String getTestNamePrefix() {
+        if (testNamePrefix == null) {
+            StackTraceElement[] elms = (new Throwable()).getStackTrace();
+            if (elms.length > 0) {
+                for (StackTraceElement n: elms) {
+                    if ("main".equals(n.getMethodName())) {
+                        testNamePrefix = n.getClassName() + "-";
+                        break;
+                    }
+                }
+            }
+
+            if (testNamePrefix == null) {
+                testNamePrefix = "";
+            }
+        }
+        return testNamePrefix;
+    }
+
+    private static String buildJar(String jarName, String ...classNames)
+        throws Exception {
+
+        String jarFullName = classesDir + File.separator + jarName + ".jar";
+        createSimpleJar(classesDir, jarFullName, classNames);
+        return jarFullName;
+    }
+
+    private static void createSimpleJar(String jarClassesDir, String jarName,
+        String[] classNames) throws Exception {
+
+        ArrayList<String> args = new ArrayList<String>();
+        args.add("cf");
+        args.add(jarName);
+        addJarClassArgs(args, jarClassesDir, classNames);
+        createJar(args);
+    }
+
+    private static void addJarClassArgs(ArrayList<String> args, String jarClassesDir,
+        String[] classNames) {
+
+        for (String name : classNames) {
+            args.add("-C");
+            args.add(jarClassesDir);
+            args.add(name + ".class");
+        }
+    }
+
+    private static void createJar(ArrayList<String> args) {
+        Main jarTool = new Main(System.out, System.err, "jar");
+        if (!jarTool.run(args.toArray(new String[1]))) {
+            throw new RuntimeException("jar operation failed");
+        }
+    }
+}
--- a/test/com/sun/tools/attach/BasicTests.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/tools/attach/BasicTests.java	Thu Jul 02 16:08:47 2015 -0700
@@ -21,17 +21,21 @@
  * questions.
  */
 
-import com.sun.tools.attach.*;
+import java.io.File;
+import java.io.IOException;
 import java.net.ServerSocket;
 import java.net.Socket;
-import java.io.IOException;
+import java.util.List;
 import java.util.Properties;
-import java.util.List;
-import java.io.File;
+
 import jdk.testlibrary.OutputAnalyzer;
-import jdk.testlibrary.JDKToolLauncher;
+import jdk.testlibrary.ProcessThread;
 import jdk.testlibrary.ProcessTools;
-import jdk.testlibrary.ProcessThread;
+
+import com.sun.tools.attach.AgentInitializationException;
+import com.sun.tools.attach.AgentLoadException;
+import com.sun.tools.attach.VirtualMachine;
+import com.sun.tools.attach.VirtualMachineDescriptor;
 
 /*
  * @test
--- a/test/com/sun/tools/attach/RunnerUtil.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/com/sun/tools/attach/RunnerUtil.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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,7 +48,7 @@
      */
     public static ProcessThread startApplication(String... additionalOpts) throws Throwable {
         String classpath = System.getProperty("test.class.path", ".");
-        String[] myArgs = concat(additionalOpts, new String [] { "-Dattach.test=true", "-classpath", classpath, "Application" });
+        String[] myArgs = concat(additionalOpts, new String [] { "-XX:+UsePerfData", "-Dattach.test=true", "-classpath", classpath, "Application" });
         String[] args = Utils.addTestJavaOpts(myArgs);
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args);
         ProcessThread pt = new ProcessThread("runApplication", (line) -> line.equals(Application.READY_MSG), pb);
--- a/test/java/awt/Choice/ItemStateChangeTest/ItemStateChangeTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Choice/ItemStateChangeTest/ItemStateChangeTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, 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 @@
   @author Oleg Pekhovskiy: area=awt-choice
   @library ../../regtesthelpers
   @library ../../../../lib/testlibrary
+  @modules java.desktop/sun.awt
   @build Util
   @build jdk.testlibrary.OSInfo
   @run main ItemStateChangeTest
--- a/test/java/awt/Cursor/MultiResolutionCursorTest/MultiResolutionCursorTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Cursor/MultiResolutionCursorTest/MultiResolutionCursorTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -45,6 +45,7 @@
  * @summary [macosx] Custom Cursor HiDPI support
  * @author Alexander Scherbatiy
  * @library ../../../../lib/testlibrary
+ * @modules java.desktop/sun.awt.image
  * @build jdk.testlibrary.OSInfo
  * @run applet/manual=yesno MultiResolutionCursorTest.html
  */
--- a/test/java/awt/Desktop/8064934/bug8064934.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Desktop/8064934/bug8064934.java	Thu Jul 02 16:08:47 2015 -0700
@@ -26,6 +26,7 @@
  * @summary Incorrect Exception message from java.awt.Desktop.open()
  * @author Dmitry Markov
  * @library ../../../../lib/testlibrary
+ * @modules java.desktop/sun.awt
  * @build jdk.testlibrary.OSInfo
  * @run main bug8064934
  */
--- a/test/java/awt/Dialog/CloseDialog/CloseDialogTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Dialog/CloseDialog/CloseDialogTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -32,6 +32,7 @@
  * @test
  * @bug 8043705
  * @summary Can't exit color chooser dialog when running as an applet
+ * @modules java.desktop/sun.awt
  * @run main CloseDialogTest
  */
 public class CloseDialogTest {
--- a/test/java/awt/EventDispatchThread/EDTShutdownTest/EDTShutdownTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/EventDispatchThread/EDTShutdownTest/EDTShutdownTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +26,7 @@
   @bug 8031694
   @summary [macosx] TwentyThousandTest test intermittently hangs
   @author Oleg Pekhovskiy
+  @modules java.desktop/sun.awt
   @run main EDTShutdownTest
  */
 
--- a/test/java/awt/EventDispatchThread/LoopRobustness/LoopRobustness.html	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/EventDispatchThread/LoopRobustness/LoopRobustness.html	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 <!--
- Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 1998, 2015, 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 @@
         loop does not crash AWT.
         @author Andrei Dmitriev: area=awt.event
         @library ../../regtesthelpers
+        @modules java.desktop/sun.awt
         @build Util
         @run main LoopRobustness
   -->
--- a/test/java/awt/EventQueue/MainAppContext/MainAppContext.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/EventQueue/MainAppContext/MainAppContext.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011,2013 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011,2015 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,6 +26,7 @@
  * @bug 8004584
  * @summary Tests 8004584
  * @author anthony.petrov@oracle.com, petr.pchelko@oracle.com
+ * @modules java.desktop/sun.awt
  */
 
 import java.awt.*;
--- a/test/java/awt/EventQueue/PostEventOrderingTest/PostEventOrderingTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/EventQueue/PostEventOrderingTest/PostEventOrderingTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, 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,6 +26,7 @@
  * @bug 4171596 6699589
  * @summary Checks that the posting of events between the PostEventQueue
  * @summary and the EventQueue maintains proper ordering.
+ * @modules java.desktop/sun.awt
  * @run main PostEventOrderingTest
  * @author fredx
  */
--- a/test/java/awt/EventQueue/PushPopDeadlock2/PushPopTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/EventQueue/PushPopDeadlock2/PushPopTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, 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,7 @@
   @test
   @bug 4913324
   @author Oleg Sukhodolsky: area=eventqueue
+  @modules java.desktop/sun.awt
   @run main/timeout=30 PushPopTest
 */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/FileDialog/8017487/bug8017487.java	Thu Jul 02 16:08:47 2015 -0700
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2015, 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 8017487
+   @summary filechooser in Windows-Libraries folder: columns are mixed up
+   @author Semyon Sadetsky
+   @library /lib/testlibrary
+   @build jdk.testlibrary.OSInfo
+   @run main bug8017487
+  */
+
+
+import jdk.testlibrary.OSInfo;
+
+import sun.awt.shell.ShellFolder;
+import sun.awt.shell.ShellFolderColumnInfo;
+import javax.swing.filechooser.FileSystemView;
+import java.io.File;
+
+public class bug8017487
+{
+    public static void main(String[] p_args) throws Exception {
+        if (OSInfo.getOSType() == OSInfo.OSType.WINDOWS &&
+                OSInfo.getWindowsVersion().compareTo(OSInfo.WINDOWS_VISTA) > 0 ) {
+            test();
+            System.out.println("ok");
+        }
+    }
+
+    private static void test() throws Exception {
+        FileSystemView fsv = FileSystemView.getFileSystemView();
+        File def = new File(fsv.getDefaultDirectory().getAbsolutePath());
+        ShellFolderColumnInfo[] defColumns =
+                ShellFolder.getShellFolder(def).getFolderColumns();
+
+        File[] files = fsv.getHomeDirectory().listFiles();
+        for (File file : files) {
+            if( "Libraries".equals(ShellFolder.getShellFolder( file ).getDisplayName())) {
+                File[] libs = file.listFiles();
+                for (File lib : libs) {
+                    ShellFolder libFolder =
+                            ShellFolder.getShellFolder(lib);
+                    if( "Library".equals(libFolder.getFolderType() ) ) {
+                        ShellFolderColumnInfo[] folderColumns =
+                                libFolder.getFolderColumns();
+
+                        for (int i = 0; i < defColumns.length; i++) {
+                            if (!defColumns[i].getTitle()
+                                    .equals(folderColumns[i].getTitle()))
+                                throw new RuntimeException("Columnn " +
+                                        folderColumns[i].getTitle() +
+                                        " doesn't match " +
+                                        defColumns[i].getTitle());
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/FileDialog/FileDialogOpenDirTest/FileDialogOpenDirTest.html	Thu Jul 02 16:08:47 2015 -0700
@@ -0,0 +1,43 @@
+<!--
+ Copyright (c) 2004, 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>
+<!--
+  @test
+  @bug 4974135
+  @summary FileDialog should open current directory by default.
+  @author tav@sparc.spb.su: area=awt.filedialog
+  @run applet/manual=yesno FileDialogOpenDirTest.html
+  -->
+<head>
+<title>FileDialogOpenDirTest</title>
+</head>
+<body>
+
+<h1>FileDialogOpenDirTest<br>Bug ID: 4974135</h1>
+
+<p>See the dialog box (usually in upper left corner) for instructions</p>
+
+<APPLET CODE="FileDialogOpenDirTest.class" WIDTH=200 HEIGHT=200></APPLET>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/FileDialog/FileDialogOpenDirTest/FileDialogOpenDirTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -0,0 +1,239 @@
+/*
+ * Copyright (c) 2004, 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 4974135
+ @summary FileDialog should open current directory by default.
+ @author tav@sparc.spb.su area=awt.filedialog
+ @run applet/manual=yesno FileDialogOpenDirTest.html
+*/
+
+import java.awt.*;
+import java.awt.event.*;
+import java.applet.*;
+
+public class FileDialogOpenDirTest extends Applet {
+
+    public static void main(String[] args) {
+        Applet a = new FileDialogOpenDirTest();
+        a.init();
+        a.start();
+    }
+
+    public void init()
+    {
+        System.setProperty("sun.awt.disableGtkFileDialogs","true");
+        //Create instructions for the user here, as well as set up
+        // the environment -- set the layout manager, add buttons,
+        // etc.
+        this.setLayout (new BorderLayout ());
+
+        String curdir = System.getProperty("user.dir");
+
+        String[] instructions1 =
+        {
+            "After test started you will see 'Test Frame' with a button inside.",
+            "Click the button to open FileDialog.",
+            "Verify that the directory opened is current directory, that is:",
+            curdir,
+            "If so press PASSED, otherwise FAILED."
+        };
+
+        String[] instructions2 =
+        {
+            "The test is not applicable for current platform. Press PASSED."
+        };
+
+        Sysout.createDialogWithInstructions(Toolkit.getDefaultToolkit().getClass().getName().
+                                            equals("sun.awt.X11.XToolkit") ?
+                                            instructions1 : instructions2);
+    }
+
+    public void start() {
+        Frame frame = new Frame("Test Frame");
+        Button open = new Button("Open File Dialog");
+
+        open.addActionListener(new ActionListener() {
+                public void actionPerformed(ActionEvent e) {
+                    new FileDialog(new Frame()).show();
+                }
+            });
+
+        frame.setLayout(new FlowLayout());
+        frame.add(open);
+
+        int x = 0;
+        int y = 0;
+        Component dlg = null;
+
+        if ((dlg = Sysout.getDialog()) != null) {
+            x = dlg.getBounds().x + dlg.getBounds().width;
+            y = dlg.getBounds().y;
+        }
+        frame.setBounds(x, y, 150, 70);
+        frame.setVisible(true);
+    }
+}
+
+
+/****************************************************
+ Standard Test Machinery
+ DO NOT modify anything below -- it's a standard
+  chunk of code whose purpose is to make user
+  interaction uniform, and thereby make it simpler
+  to read and understand someone else's test.
+ ****************************************************/
+
+/**
+ This is part of the standard test machinery.
+ It creates a dialog (with the instructions), and is the interface
+  for sending text messages to the user.
+ To print the instructions, send an array of strings to Sysout.createDialog
+  WithInstructions method.  Put one line of instructions per array entry.
+ To display a message for the tester to see, simply call Sysout.println
+  with the string to be displayed.
+ This mimics System.out.println but works within the test harness as well
+  as standalone.
+ */
+
+class Sysout
+{
+    private static TestDialog dialog;
+
+    public static void createDialogWithInstructions( String[] instructions )
+    {
+        dialog = new TestDialog( new Frame(), "Instructions" );
+        dialog.printInstructions( instructions );
+        dialog.setVisible(true);
+        println( "Any messages for the tester will display here." );
+    }
+
+    public static void createDialog( )
+    {
+        dialog = new TestDialog( new Frame(), "Instructions" );
+        String[] defInstr = { "Instructions will appear here. ", "" } ;
+        dialog.printInstructions( defInstr );
+        dialog.setVisible(true);
+        println( "Any messages for the tester will display here." );
+    }
+
+
+    public static void printInstructions( String[] instructions )
+    {
+        dialog.printInstructions( instructions );
+    }
+
+
+    public static void println( String messageIn )
+    {
+        dialog.displayMessage( messageIn );
+    }
+
+    public static Component getDialog() {
+        return dialog;
+    }
+
+}// Sysout  class
+
+/**
+  This is part of the standard test machinery.  It provides a place for the
+   test instructions to be displayed, and a place for interactive messages
+   to the user to be displayed.
+  To have the test instructions displayed, see Sysout.
+  To have a message to the user be displayed, see Sysout.
+  Do not call anything in this dialog directly.
+  */
+class TestDialog extends Dialog
+{
+
+    TextArea instructionsText;
+    TextArea messageText;
+    int maxStringLength = 80;
+
+    //DO NOT call this directly, go through Sysout
+    public TestDialog( Frame frame, String name )
+    {
+        super( frame, name );
+        int scrollBoth = TextArea.SCROLLBARS_BOTH;
+        instructionsText = new TextArea( "", 15, maxStringLength, scrollBoth );
+        add( "North", instructionsText );
+
+        messageText = new TextArea( "", 5, maxStringLength, scrollBoth );
+        add("Center", messageText);
+
+        pack();
+
+        setVisible(true);
+    }// TestDialog()
+
+    //DO NOT call this directly, go through Sysout
+    public void printInstructions( String[] instructions )
+    {
+        //Clear out any current instructions
+        instructionsText.setText( "" );
+
+        //Go down array of instruction strings
+
+        String printStr, remainingStr;
+        for( int i=0; i < instructions.length; i++ )
+        {
+            //chop up each into pieces maxSringLength long
+            remainingStr = instructions[ i ];
+            while( remainingStr.length() > 0 )
+            {
+                //if longer than max then chop off first max chars to print
+                if( remainingStr.length() >= maxStringLength )
+                {
+                    //Try to chop on a word boundary
+                    int posOfSpace = remainingStr.
+                        lastIndexOf( ' ', maxStringLength - 1 );
+
+                    if( posOfSpace <= 0 ) posOfSpace = maxStringLength - 1;
+
+                    printStr = remainingStr.substring( 0, posOfSpace + 1 );
+                    remainingStr = remainingStr.substring( posOfSpace + 1 );
+                }
+                //else just print
+                else
+                {
+                    printStr = remainingStr;
+                    remainingStr = "";
+                }
+
+                instructionsText.append( printStr + "\n" );
+
+            }// while
+
+        }// for
+
+    }//printInstructions()
+
+    //DO NOT call this directly, go through Sysout
+    public void displayMessage( String messageIn )
+    {
+        messageText.append( messageIn + "\n" );
+        System.out.println(messageIn);
+    }
+
+}// TestDialog  class
--- a/test/java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowBlockingTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowBlockingTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -36,7 +36,6 @@
 import java.applet.Applet;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.lang.reflect.InvocationTargetException;
-import sun.awt.SunToolkit;
 import test.java.awt.regtesthelpers.Util;
 
 public class ActualFocusedWindowBlockingTest extends Applet {
--- a/test/java/awt/Focus/ModalExcludedWindowClickTest/ModalExcludedWindowClickTest.html	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Focus/ModalExcludedWindowClickTest/ModalExcludedWindowClickTest.html	Thu Jul 02 16:08:47 2015 -0700
@@ -27,6 +27,7 @@
   @bug        6271849
   @summary    Tests that component in modal excluded Window which parent is blocked responses to mouse clicks.
   @author     anton.tarasov@sun.com: area=awt.focus
+  @modules java.desktop/sun.awt
   @run        applet ModalExcludedWindowClickTest.html
   -->
 <head>
--- a/test/java/awt/Focus/NonFocusableBlockedOwnerTest/NonFocusableBlockedOwnerTest.html	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Focus/NonFocusableBlockedOwnerTest/NonFocusableBlockedOwnerTest.html	Thu Jul 02 16:08:47 2015 -0700
@@ -27,6 +27,7 @@
   @bug        6272324
   @summary    Modal excluded Window which decorated parent is blocked should be non-focusable.
   @author     anton.tarasov@sun.com: area=awt.focus
+  @modules java.desktop/sun.awt
   @run        applet NonFocusableBlockedOwnerTest.html
   -->
 <head>
--- a/test/java/awt/Focus/WindowUpdateFocusabilityTest/WindowUpdateFocusabilityTest.html	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Focus/WindowUpdateFocusabilityTest/WindowUpdateFocusabilityTest.html	Thu Jul 02 16:08:47 2015 -0700
@@ -27,6 +27,7 @@
   @bug        6253913
   @summary    Tests that a Window shown before its owner is focusable.
   @author     anton.tarasov@sun.com: area=awt-focus
+  @modules java.desktop/sun.awt
   @run        applet WindowUpdateFocusabilityTest.html
   -->
 <head>
--- a/test/java/awt/Graphics2D/Test8004859/Test8004859.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Graphics2D/Test8004859/Test8004859.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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,8 @@
  * @bug 8004859
  * @summary getClipBounds/getClip should return equivalent bounds.
  * @author Sergey Bylokhov
+ * @modules java.desktop/sun.java2d
+ *          java.desktop/sun.java2d.pipe
  */
 public final class Test8004859 {
 
--- a/test/java/awt/Graphics2D/TransformSetGet/TransformSetGet.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Graphics2D/TransformSetGet/TransformSetGet.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -33,6 +33,7 @@
  * @bug 8000629
  * @summary Set/get transform should work on constrained graphics.
  * @author Sergey Bylokhov
+ * @modules java.desktop/sun.java2d
  */
 public class TransformSetGet {
 
--- a/test/java/awt/KeyboardFocusmanager/TypeAhead/TestDialogTypeAhead.html	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/KeyboardFocusmanager/TypeAhead/TestDialogTypeAhead.html	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 <!--
- Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2003, 2015, 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 @@
   @summary Tests that type-ahead for dialog works and doesn't block program
   @author  area=awt.focus
   @library    ../../regtesthelpers
+  @modules java.desktop/sun.awt
   @build      Util        
   @run applet TestDialogTypeAhead.html
   -->
--- a/test/java/awt/Menu/OpensWithNoGrab/OpensWithNoGrab.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Menu/OpensWithNoGrab/OpensWithNoGrab.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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 @@
   @author andrei.dmitriev: area=awt.menu
   @library ../../regtesthelpers
   @library ../../../../lib/testlibrary
+  @modules java.desktop/sun.awt
   @build jdk.testlibrary.OSInfo
   @build Util
   @run main OpensWithNoGrab
--- a/test/java/awt/Mixing/AWT_Mixing/JButtonInGlassPaneOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JButtonInGlassPaneOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -33,6 +33,7 @@
 @summary Simple Overlapping test for javax.swing.JButton
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JButtonInGlassPaneOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JButtonOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JButtonOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -33,6 +33,7 @@
 @summary Simple Overlapping test for javax.swing.JButton
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JButtonOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JColorChooserOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JColorChooserOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -32,6 +32,7 @@
 @summary Simple Overlapping test for javax.swing.JColorChooser
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JColorChooserOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JComboBoxOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JComboBoxOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +43,7 @@
 @summary Overlapping test for javax.swing.JScrollPane
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JComboBoxOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JEditorPaneInGlassPaneOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JEditorPaneInGlassPaneOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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 @@
 @summary Simple Overlapping test for javax.swing.JLabel
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JEditorPaneInGlassPaneOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JEditorPaneOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JEditorPaneOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -32,6 +32,7 @@
 @summary Simple Overlapping test for javax.swing.JLabel
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JEditorPaneOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JGlassPaneInternalFrameOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JGlassPaneInternalFrameOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -45,6 +45,7 @@
 @summary Overlapping test for javax.swing.JScrollPane
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JGlassPaneInternalFrameOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JGlassPaneMoveOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JGlassPaneMoveOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -46,6 +46,7 @@
 @summary Overlapping test for javax.swing.JScrollPane
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JGlassPaneMoveOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JInternalFrameMoveOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JInternalFrameMoveOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +42,7 @@
 @summary Overlapping test for javax.swing.JScrollPane
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JInternalFrameMoveOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JInternalFrameOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JInternalFrameOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +41,7 @@
 @summary Overlapping test for javax.swing.JScrollPane
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JInternalFrameOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JLabelInGlassPaneOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JLabelInGlassPaneOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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 @@
 @summary Simple Overlapping test for javax.swing.JLabel
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JLabelInGlassPaneOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JLabelOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JLabelOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -33,6 +33,7 @@
 @summary Simple Overlapping test for javax.swing.JLabel
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JLabelOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JListInGlassPaneOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JListInGlassPaneOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -33,6 +33,7 @@
 @summary Simple Overlapping test for javax.swing.JList
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JListInGlassPaneOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JListOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JListOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -32,6 +32,7 @@
 @summary Simple Overlapping test for javax.swing.JList
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JListOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JMenuBarOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JMenuBarOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +48,7 @@
 @summary Overlapping test for javax.swing.JScrollPane
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JMenuBarOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JPanelInGlassPaneOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JPanelInGlassPaneOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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 @@
 @summary Simple Overlapping test for javax.swing.JPanel
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JPanelInGlassPaneOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JPanelOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JPanelOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -33,6 +33,7 @@
 @summary Simple Overlapping test for javax.swing.JPanel
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JPanelOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JPopupMenuOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JPopupMenuOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -45,6 +45,7 @@
 @summary Overlapping test for javax.swing.JScrollPane
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JPopupMenuOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JProgressBarInGlassPaneOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JProgressBarInGlassPaneOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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 @@
 @summary Simple Overlapping test for javax.swing.JProgressBar
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JProgressBarInGlassPaneOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JProgressBarOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JProgressBarOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -33,6 +33,7 @@
 @summary Simple Overlapping test for javax.swing.JProgressBar
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JProgressBarOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JScrollBarInGlassPaneOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JScrollBarInGlassPaneOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +37,7 @@
 @summary Simple Overlapping test for javax.swing.JScrollBar
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JScrollBarInGlassPaneOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JScrollBarOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JScrollBarOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +36,7 @@
 @summary Simple Overlapping test for javax.swing.JScrollBar
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JScrollBarOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JScrollPaneOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JScrollPaneOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +43,7 @@
 @summary Overlapping test for javax.swing.JScrollPane
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JScrollPaneOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JSliderInGlassPaneOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JSliderInGlassPaneOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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 @@
 @summary Simple Overlapping test for javax.swing.JSlider
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JSliderInGlassPaneOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JSliderOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JSliderOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -33,6 +33,7 @@
 @summary Simple Overlapping test for javax.swing.JSlider
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JSliderOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JSpinnerInGlassPaneOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JSpinnerInGlassPaneOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +36,7 @@
 @summary Simple Overlapping test for javax.swing.JSpinner
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JSpinnerInGlassPaneOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JSpinnerOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JSpinnerOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -35,6 +35,7 @@
 @summary Simple Overlapping test for javax.swing.JSpinner
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JSpinnerOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JSplitPaneOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JSplitPaneOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -49,6 +49,7 @@
 @summary Overlapping test for javax.swing.JSplitPane
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JSplitPaneOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JTableInGlassPaneOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JTableInGlassPaneOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +36,7 @@
 @summary Simple Overlapping test for JTable
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JTableInGlassPaneOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JTableOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JTableOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -32,6 +32,7 @@
 @summary Simple Overlapping test for JTable
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JTableOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JTextAreaInGlassPaneOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JTextAreaInGlassPaneOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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 @@
 @summary Simple Overlapping test for javax.swing.JLabel
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JTextAreaInGlassPaneOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JTextAreaOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JTextAreaOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -33,6 +33,7 @@
 @summary Simple Overlapping test for javax.swing.JLabel
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JTextAreaOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JTextFieldInGlassPaneOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JTextFieldInGlassPaneOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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 @@
 @summary Simple Overlapping test for javax.swing.JLabel
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JTextFieldInGlassPaneOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JTextFieldOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JTextFieldOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -33,6 +33,7 @@
 @summary Simple Overlapping test for javax.swing.JLabel
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JTextFieldOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JToggleButtonInGlassPaneOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JToggleButtonInGlassPaneOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -33,6 +33,7 @@
 @summary Simple Overlapping test for javax.swing.JToggleButton
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JToggleButtonInGlassPaneOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/JToggleButtonOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/JToggleButtonOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -32,6 +32,7 @@
 @summary Simple Overlapping test for javax.swing.JToggleButton
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main JToggleButtonOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/MixingFrameResizing.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/MixingFrameResizing.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +42,7 @@
 @summary Issues when resizing the JFrame with HW components
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main MixingFrameResizing
  */
--- a/test/java/awt/Mixing/AWT_Mixing/OpaqueOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/OpaqueOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -46,6 +46,8 @@
 @bug 6776743
 @summary Opaque overlapping test for each AWT component
 @library ../../regtesthelpers
+@modules java.desktop/com.sun.awt
+         java.desktop/sun.awt
 @build Util
 @run main OpaqueOverlapping
  */
--- a/test/java/awt/Mixing/AWT_Mixing/OpaqueOverlappingChoice.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/OpaqueOverlappingChoice.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -32,6 +32,8 @@
 @bug 6994264
 @summary Opaque overlapping test for Choice AWT component
 @library ../../regtesthelpers
+@modules java.desktop/com.sun.awt
+         java.desktop/sun.awt
 @build Util
 @run main OpaqueOverlappingChoice
  */
--- a/test/java/awt/Mixing/AWT_Mixing/ViewportOverlapping.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/AWT_Mixing/ViewportOverlapping.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -51,6 +51,7 @@
 @summary Viewport overlapping test for each AWT component
 @author sergey.grinev@oracle.com: area=awt.mixing
 @library ../../regtesthelpers
+@modules java.desktop/sun.awt
 @build Util
 @run main ViewportOverlapping
  */
--- a/test/java/awt/Mixing/OpaqueTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mixing/OpaqueTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, 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,6 +27,7 @@
   @summary Tests whether opaque and non-opaque components mix correctly
   @author anthony.petrov@...: area=awt.mixing
   @library ../regtesthelpers
+  @modules java.desktop/com.sun.awt
   @build Util
   @run main OpaqueTest
 */
--- a/test/java/awt/Mouse/EnterExitEvents/FullscreenEnterEventTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Mouse/EnterExitEvents/FullscreenEnterEventTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -21,7 +21,6 @@
 * questions.
 */
 
-import sun.misc.OSEnvironment;
 import test.java.awt.regtesthelpers.Util;
 
 import javax.swing.*;
--- a/test/java/awt/Robot/AcceptExtraMouseButtons/AcceptExtraMouseButtons.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Robot/AcceptExtraMouseButtons/AcceptExtraMouseButtons.java	Thu Jul 02 16:08:47 2015 -0700
@@ -38,7 +38,6 @@
 
 import java.awt.*;
 import java.awt.event.*;
-import sun.awt.SunToolkit;
 import test.java.awt.regtesthelpers.Util;
 
 public class AcceptExtraMouseButtons extends Frame {
--- a/test/java/awt/SplashScreen/FullscreenAfterSplash/FullScreenAfterSplash.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/SplashScreen/FullscreenAfterSplash/FullScreenAfterSplash.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2013, 2015, 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,6 +38,7 @@
  * @summary Native Mac OS X full screen does not work after showing the splash
  * @library ../
  * @library ../../../../lib/testlibrary
+ * @modules java.desktop/sun.awt
  * @build jdk.testlibrary.OSInfo
  * @build GenerateTestImage
  * @run main GenerateTestImage
--- a/test/java/awt/SplashScreen/MultiResolutionSplash/MultiResolutionSplashTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/SplashScreen/MultiResolutionSplash/MultiResolutionSplashTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -44,6 +44,7 @@
  * @author Alexander Scherbatiy
  * @summary [macosx] java -splash does not honor 2x hi dpi notation for retina
  * support
+ * @modules java.desktop/sun.java2d
  * @run main MultiResolutionSplashTest GENERATE_IMAGES
  * @run main/othervm -splash:splash1.png MultiResolutionSplashTest TEST_SPLASH 0
  * @run main/othervm -splash:splash2 MultiResolutionSplashTest TEST_SPLASH 1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/TEST.properties	Thu Jul 02 16:08:47 2015 -0700
@@ -0,0 +1,2 @@
+modules=java.desktop
+
--- a/test/java/awt/Toolkit/RealSync/RealSyncOnEDT.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Toolkit/RealSync/RealSyncOnEDT.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, 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,6 +26,7 @@
   @bug 6541903
   @summary Tests if the realSync() throws the IllegalThreadException while invoked on the EDT
   @author anthony.petrov: area=awt.toolkit
+  @modules java.desktop/sun.awt
   @run main/timeout=10 RealSyncOnEDT
 */
 
--- a/test/java/awt/Toolkit/RealSync/Test.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Toolkit/RealSync/Test.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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,6 +26,7 @@
   @bug 6252005
   @summary Tests that realSync feature works
   @author denis.mikhalkin: area=awt.toolkit
+  @modules java.desktop/sun.awt
   @run main/timeout=6000 Test
 */
 
--- a/test/java/awt/Window/AlwaysOnTop/AutoTestOnTop.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Window/AlwaysOnTop/AutoTestOnTop.java	Thu Jul 02 16:08:47 2015 -0700
@@ -26,6 +26,7 @@
   @bug 4632143
   @summary Unit test for the RFE window/frame/dialog always on top
   @author dom@sparc.spb.su: area=awt.toplevel
+  @modules java.desktop/sun.awt
   @run main AutoTestOnTop
 */
 
--- a/test/java/awt/Window/Grab/GrabTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Window/Grab/GrabTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, 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,6 +27,7 @@
   @summary Tests that SunToolkit.grab API works
   @author anton.tarasov@oracle.com: area=awt.toolkit
   @library ../../regtesthelpers
+  @modules java.desktop/sun.awt
   @build Util
   @run main GrabTest
 */
--- a/test/java/awt/Window/WindowsLeak/WindowsLeak.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/Window/WindowsLeak/WindowsLeak.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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,7 @@
  * @test
  * @bug 8013563
  * @summary Tests that windows are removed from windows list
+ * @modules java.desktop/sun.awt
  * @run main/othervm -Xms32M -Xmx32M WindowsLeak
 */
 
--- a/test/java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2015, 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,6 +27,8 @@
 #   @bug     6193279 6619458
 #   @summary REGRESSION: AppletViewer throws IOException when path is encoded URL
 #   @author  Dmitry Cherepanov: area=appletviewer
+#   @modules java.base/sun.net.www
+#            java.desktop
 #   @run compile IOExceptionIfEncodedURLTest.java
 #   @run main IOExceptionIfEncodedURLTest
 #   @run shell IOExceptionIfEncodedURLTest.sh
--- a/test/java/awt/datatransfer/Clipboard/BasicClipboardTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/Clipboard/BasicClipboardTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, 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
@@ -29,6 +29,7 @@
  * @test
  * @summary To test the basic Clipboard functions
  * @author Kanishk Jethi (kanishk.jethi@sun.com) area=Clipboard
+ * @modules java.datatransfer
  * @run main BasicClipboardTest
  */
 
--- a/test/java/awt/datatransfer/DataFlavor/DataFlavorCloneTest/DataFlavorCloneTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/DataFlavor/DataFlavorCloneTest/DataFlavorCloneTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +26,7 @@
   @bug 4181601
   @summary tests that DataFlavor.clone method doesn't throw exception
   @author xianfa: area=
+  @modules java.datatransfer
   @run main DataFlavorCloneTest
 */
 
--- a/test/java/awt/datatransfer/DataFlavor/DataFlavorEqualsNullTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/DataFlavor/DataFlavorEqualsNullTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +26,7 @@
   @bug 4175731
   @summary DataFlavor.equals(null) throws NullPointerException
   @author prs@sparc.spb.su: area=
+  @modules java.datatransfer
   @run main DataFlavorEqualsNullTest
 */
 
--- a/test/java/awt/datatransfer/DataFlavor/DataFlavorEqualsTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/DataFlavor/DataFlavorEqualsTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +26,7 @@
   @bug 4175341
   @summary DataFlavor.equals throws NullPointerException
   @author prs@sparc.spb.su: area=
+  @modules java.datatransfer
   @run main DataFlavorEqualsTest
 */
 
--- a/test/java/awt/datatransfer/DataFlavor/DataFlavorFileListTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/DataFlavor/DataFlavorFileListTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +26,7 @@
   @bug 4172848
   @summary DataFlavor.isFlavorJavaFileListType works wrong
   @author prs@sparc.spb.su: area=
+  @modules java.datatransfer
   @run main DataFlavorFileListTest
 */
 
--- a/test/java/awt/datatransfer/DataFlavor/DataFlavorSerializedTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/DataFlavor/DataFlavorSerializedTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +26,7 @@
   @bug 4174020
   @summary DataFlavor.isMimeTypeSerializedObject works wrong
   @author prs@sparc.spb.su: area=
+  @modules java.datatransfer
   @run main DataFlavorSerializedTest
 */
 
--- a/test/java/awt/datatransfer/DataFlavor/DefaultMatchTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/DataFlavor/DefaultMatchTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +26,7 @@
   @bug 4250750
   @summary tests that DataFlavor.match() does not throw NPE.
   @author prs@sparc.spb.su: area=
+  @modules java.datatransfer
   @run main DefaultMatchTest
 */
 
--- a/test/java/awt/datatransfer/DataFlavor/EqualsHashCodeSymmetryTest/EqualsHashCodeSymmetryTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/DataFlavor/EqualsHashCodeSymmetryTest/EqualsHashCodeSymmetryTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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 @@
  * @bug 8038999
  * @summary DataFlavor.equals is not symmetric
  * @author Petr Pchelko <petr.pchelko@oracle.com>
+ * @modules java.datatransfer
  */
 public class EqualsHashCodeSymmetryTest {
 
--- a/test/java/awt/datatransfer/DataFlavor/ExternalizeTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/DataFlavor/ExternalizeTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +26,7 @@
   @bug 4274267
   @summary Tests that externalized DataFlavor is restored properly
   @author prs@sparc.spb.su: area=
+  @modules java.datatransfer
   @run main ExternalizeTest
 */
 
--- a/test/java/awt/datatransfer/DataFlavor/GetReaderForTextIAEForStringSelectionTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/DataFlavor/GetReaderForTextIAEForStringSelectionTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +26,7 @@
   @bug 4260874
   @summary Tests that DataFlavor.getReaderForText do not throw NPE when transferObject is null
   @author tdv@sparc.spb.su: area=
+  @modules java.datatransfer
   @run main GetReaderForTextIAEForStringSelectionTest
 */
 
--- a/test/java/awt/datatransfer/DataFlavor/GetReaderForTextNPETest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/DataFlavor/GetReaderForTextNPETest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +26,7 @@
   @bug 4260874
   @summary Tests that DataFlavor.getReaderForText do not throw NPE when transferObject is null
   @author tdv@sparc.spb.su: area=
+  @modules java.datatransfer
   @run main GetReaderForTextNPETest
 */
 
--- a/test/java/awt/datatransfer/DataFlavor/MimeTypeSerializationTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/DataFlavor/MimeTypeSerializationTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +27,7 @@
   @summary Tests that long (more than 64K) MimeType can be serialized
            and deserialized.
   @author gas@sparc.spb.su area=datatransfer
+  @modules java.datatransfer
   @run main MimeTypeSerializationTest
 */
 
--- a/test/java/awt/datatransfer/DataFlavor/NoClassParameterTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/DataFlavor/NoClassParameterTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +26,7 @@
   @bug 4212613
   @summary tests that DataFlavor(String) doesn't through Exception if no "class=" specified.
   @author prs@sparc.spb.su: area=
+  @modules java.datatransfer
   @run main NoClassParameterTest
 */
 
--- a/test/java/awt/datatransfer/DataFlavor/NormalizeMimeTypeParameter.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/DataFlavor/NormalizeMimeTypeParameter.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +26,7 @@
   @bug 4260860
   @summary tests that DataFlavor.normalizeMimeTypeParameter() returns parm value
   @author ssi@sparc.spb.su area=
+  @modules java.datatransfer
   @run main NormalizeMimeTypeParameter
 */
 
--- a/test/java/awt/datatransfer/DataFlavor/ReaderForUnicodeText.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/DataFlavor/ReaderForUnicodeText.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +26,7 @@
   @bug 4274234
   @summary Tests that DataFlavor.getReaderForText() doesn't throw UnsupportedEncodingException for unicode text
   @author prs@sparc.spb.su: area=
+  @modules java.datatransfer
   @run main ReaderForUnicodeText
 */
 
--- a/test/java/awt/datatransfer/DataFlavor/SelectBestFlavorNPETest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/DataFlavor/SelectBestFlavorNPETest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +26,7 @@
   @bug 4370469
   @summary tests that selectBestTextFlavor doesn't throw NPE
   @author prs@sparc.spb.su: area=
+  @modules java.datatransfer
   @run main SelectBestFlavorNPETest
 */
 
--- a/test/java/awt/datatransfer/DataFlavor/SelectBestTextFlavorBadArrayTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/DataFlavor/SelectBestTextFlavorBadArrayTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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 @@
            is a null array or an empty array or an array which doesn't contain
            a text flavor in a supported encoding.
   @author das@sparc.spb.su area=datatransfer
+  @modules java.datatransfer
   @run main SelectBestTextFlavorBadArrayTest
 */
 
--- a/test/java/awt/datatransfer/DataFlavor/ToStringNullPointerTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/DataFlavor/ToStringNullPointerTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +26,7 @@
   @bug 4250768
   @summary tests that DataFlavor.toString() does not throw NPE
   @author prs@sparc.spb.su: area=
+  @modules java.datatransfer
   @run main ToStringNullPointerTest
 */
 
--- a/test/java/awt/datatransfer/Headless/HeadlessClipboard.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/Headless/HeadlessClipboard.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, 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,6 +27,7 @@
  * @test
  * @summary Check Clipboard constructor and getName() method do not throw
  *          exceptions in headless mode
+ * @modules java.datatransfer
  * @run main/othervm -Djava.awt.headless=true HeadlessClipboard
  */
 
--- a/test/java/awt/datatransfer/Headless/HeadlessDataFlavor.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/Headless/HeadlessDataFlavor.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, 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,6 +27,7 @@
  * @test
  * @summary Check that DataFlavor constructors do not throw unexpected exceptions
  *          in headless mode
+ * @modules java.datatransfer
  * @run main/othervm -Djava.awt.headless=true HeadlessDataFlavor
  */
 
--- a/test/java/awt/datatransfer/Headless/HeadlessSystemFlavorMap.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/Headless/HeadlessSystemFlavorMap.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, 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 @@
  * @test
  * @summary Check that SystemFlavorMap constructor does not throw unexpected
  *          exceptions in headless mode
+ * @modules java.datatransfer
  * @run main/othervm -Djava.awt.headless=true HeadlessSystemFlavorMap
  */
 
--- a/test/java/awt/datatransfer/SystemFlavorMap/AddFlavorForNativeTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/SystemFlavorMap/AddFlavorForNativeTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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,6 +37,7 @@
  *          adding new mappings, one-way and two-way, and to update
  *          existing mappings.
  * @author Rick Reynaga (rick.reynaga@eng.sun.com) area=Clipboard
+ * @modules java.datatransfer
  * @run main AddFlavorForNativeTest
  */
 
--- a/test/java/awt/datatransfer/SystemFlavorMap/AddFlavorTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/SystemFlavorMap/AddFlavorTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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,6 +38,7 @@
  *          that all entries are present, and order is maintained.
  * @author Rick Reynaga (rick.reynaga@eng.sun.com) area=Clipboard
  * @author dmitriy.ermashov@oracle.com
+ * @modules java.datatransfer
  * @run main AddFlavorTest
  */
 
--- a/test/java/awt/datatransfer/SystemFlavorMap/AddNativeForFlavorTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/SystemFlavorMap/AddNativeForFlavorTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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,6 +37,7 @@
  *          adding new mappings, one-way and two-way, and to update
  *          existing mappings.
  * @author Rick Reynaga (rick.reynaga@eng.sun.com) area=Clipboard
+ * @modules java.datatransfer
  * @run main AddNativeForFlavorTest
  */
 
--- a/test/java/awt/datatransfer/SystemFlavorMap/AddNativeTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/SystemFlavorMap/AddNativeTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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,6 +36,7 @@
  *          DataFlavors.  The mappings will be verified by examining
  *          that all entries are present.
  * @author Rick Reynaga (rick.reynaga@eng.sun.com) area=Clipboard
+ * @modules java.datatransfer
  * @run main AddNativeTest
  */
 
--- a/test/java/awt/datatransfer/SystemFlavorMap/DuplicateMappingTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/SystemFlavorMap/DuplicateMappingTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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,6 +27,7 @@
   @summary tests that addUnencodedNativeForFlavor()/addFlavorForUnencodedNative()
            do not allow to duplicate mappings
   @author das@sparc.spb.su area=datatransfer
+  @modules java.datatransfer
   @run main DuplicateMappingTest
 */
 
--- a/test/java/awt/datatransfer/SystemFlavorMap/DuplicatedNativesTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/SystemFlavorMap/DuplicatedNativesTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -32,6 +32,7 @@
  * @bug 8028230
  * @summary Checks that SystemFlavorMap.getNativesForFlavor returns a list without duplicates
  * @author Petr Pchelko
+ * @modules java.datatransfer
  * @run main DuplicatedNativesTest
  */
 public class DuplicatedNativesTest {
--- a/test/java/awt/datatransfer/SystemFlavorMap/GetFlavorsForNewNativeTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/SystemFlavorMap/GetFlavorsForNewNativeTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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,6 +38,7 @@
  *          returned, and with unknown Encoded String native where
  *          two-way mapping should be established.
  * @author Rick Reynaga (rick.reynaga@eng.sun.com) area=Clipboard
+ * @modules java.datatransfer
  * @run main GetFlavorsForNewNativeTest
  */
 
--- a/test/java/awt/datatransfer/SystemFlavorMap/GetNativesForFlavorTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/SystemFlavorMap/GetNativesForFlavorTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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 @@
            only if there are no mappings for the DataFlavor and the mappings
            were not explicitly removed
   @author das@sparc.spb.su area=datatransfer
+  @modules java.datatransfer
   @run main GetNativesForFlavorTest
 */
 
--- a/test/java/awt/datatransfer/SystemFlavorMap/GetNativesForNewFlavorTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/SystemFlavorMap/GetNativesForNewFlavorTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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,6 +37,7 @@
  *          passing an unknown DataFlavor where two-way mapping
  *          should be established.
  * @author Rick Reynaga (rick.reynaga@eng.sun.com) area=Clipboard
+ * @modules java.datatransfer
  * @run main GetNativesForNewFlavorTest
  */
 
--- a/test/java/awt/datatransfer/SystemFlavorMap/InvalidMapArgumentsTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/SystemFlavorMap/InvalidMapArgumentsTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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,6 +36,7 @@
  *          - setNativesForFlavor(DataFlavor flav, String[] natives)
  *          - setFlavorsForNative(String nat, DataFlavor[] flavors)
  * @author Rick Reynaga (rick.reynaga@eng.sun.com) area=Clipboard
+ * @modules java.datatransfer
  * @run main InvalidMapArgumentsTest
  */
 
--- a/test/java/awt/datatransfer/SystemFlavorMap/ManyFlavorMapTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/SystemFlavorMap/ManyFlavorMapTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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,6 +37,7 @@
  *          include all entries and that the correct order is
  *          maintained.
  * @author Rick Reynaga (rick.reynaga@eng.sun.com) area=Clipboard
+ * @modules java.datatransfer
  * @run main ManyFlavorMapTest
  */
 
--- a/test/java/awt/datatransfer/SystemFlavorMap/MappingGenerationTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/SystemFlavorMap/MappingGenerationTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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 @@
   @bug 4512530 8027148
   @summary tests that mappings for text flavors are generated properly
   @author das@sparc.spb.su area=datatransfer
+  @modules java.datatransfer
 */
 
 public class MappingGenerationTest {
--- a/test/java/awt/datatransfer/SystemFlavorMap/SetDataFlavorsTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/SystemFlavorMap/SetDataFlavorsTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, 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,7 @@
  *          DataFlavors.  The mappings will be verified by examining
  *          that all entries are present, and order is maintained.
  * @author Rick Reynaga (rick.reynaga@eng.sun.com) area=Clipboard
+ * @modules java.datatransfer
  * @run main SetDataFlavorsTest
  */
 
--- a/test/java/awt/datatransfer/SystemFlavorMap/SetFlavorsForNativeTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/SystemFlavorMap/SetFlavorsForNativeTest.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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,6 +37,7 @@
  *          adding new mappings, one-way and two-way, and to update
  *          existing mappings.
  * @author Rick Reynaga (rick.reynaga@eng.sun.com) area=Clipboard
+ * @modules java.datatransfer
  * @run main SetFlavorsForNativeTest
  */
 
--- a/test/java/awt/datatransfer/SystemFlavorMap/SetNativesForFlavor.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/SystemFlavorMap/SetNativesForFlavor.java	Thu Jul 02 16:08:47 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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,6 +37,7 @@
  *          adding new mappings, one-way and two-way, and to update
  *          existing mappings.
  * @author Rick Reynaga (rick.reynaga@eng.sun.com) area=Clipboard
+ * @modules java.datatransfer
  * @run main SetNativesForFlavorTest
  */
 
--- a/test/java/awt/datatransfer/SystemFlavorMap/SetNativesForFlavorTest.java	Thu Jul 02 08:54:01 2015 -0700
+++ b/test/java/awt/datatransfer/SystemFlavorMap/SetNativesForFlavorTest.java	Thu Jul