Merge
authorprr
Thu, 01 Sep 2016 12:22:59 -0700
changeset 40994 43ee03955b10
parent 40993 a24dc7d0dd28 (current diff)
parent 40731 70a4f131d226 (diff)
child 40995 c096d4be5b5e
child 40999 d0d0a00fc1b0
Merge
jdk/test/sun/security/krb5/auto/unreachable.krb5.conf
--- a/jdk/make/GenerateClasslist.gmk	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/make/GenerateClasslist.gmk	Thu Sep 01 12:22:59 2016 -0700
@@ -50,6 +50,8 @@
 
 CLASSLIST_FILE := $(SUPPORT_OUTPUTDIR)/classlist/classlist
 
+JLI_TRACE_FILE := $(SUPPORT_OUTPUTDIR)/classlist/jli_trace.out
+
 # If an external buildjdk has been supplied, we don't build a separate interim
 # image, so just use the external build jdk instead.
 ifeq ($(EXTERNAL_BUILDJDK), true)
@@ -59,13 +61,11 @@
 $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR)
 	$(call MakeDir, $(@D))
 	$(call LogInfo, Generating lib/classlist)
-	$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.tmp \
+	$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@ \
+	    -Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \
 	    -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
-	    build.tools.classlist.HelloClasslist $(LOG_DEBUG) 2>&1
-        # Filter out generated classes, remove after JDK-8149977
-	$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@ \
-	    -Xshare:dump -XX:SharedClassListFile=$@.tmp $(LOG_DEBUG) 2>&1
-	$(RM) $@.tmp
+	    build.tools.classlist.HelloClasslist \
+	    $(LOG_DEBUG) 2>&1 > $(JLI_TRACE_FILE)
 
 TARGETS += $(CLASSLIST_FILE)
 
--- a/jdk/src/java.base/share/classes/java/net/ServerSocket.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/src/java.base/share/classes/java/net/ServerSocket.java	Thu Sep 01 12:22:59 2016 -0700
@@ -25,8 +25,13 @@
 
 package java.net;
 
+import jdk.internal.misc.JavaNetSocketAccess;
+import jdk.internal.misc.SharedSecrets;
+
 import java.io.FileDescriptor;
 import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
 import java.nio.channels.ServerSocketChannel;
 import java.security.AccessController;
 import java.security.PrivilegedExceptionAction;
@@ -1011,4 +1016,27 @@
             return options;
         }
     }
+
+    static {
+        SharedSecrets.setJavaNetSocketAccess(
+            new JavaNetSocketAccess() {
+                @Override
+                public ServerSocket newServerSocket(SocketImpl impl) {
+                    return new ServerSocket(impl);
+                }
+
+                @Override
+                public SocketImpl newSocketImpl(Class<? extends SocketImpl> implClass) {
+                    try {
+                        Constructor<? extends SocketImpl> ctor =
+                            implClass.getDeclaredConstructor();
+                        return ctor.newInstance();
+                    } catch (NoSuchMethodException | InstantiationException |
+                             IllegalAccessException | InvocationTargetException e) {
+                        throw new AssertionError(e);
+                    }
+                }
+            }
+        );
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaNetSocketAccess.java	Thu Sep 01 12:22:59 2016 -0700
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * 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 jdk.internal.misc;
+
+import java.net.ServerSocket;
+import java.net.SocketImpl;
+
+public interface JavaNetSocketAccess {
+    /**
+     * Creates a ServerSocket associated with the given SocketImpl.
+     */
+    ServerSocket newServerSocket(SocketImpl impl);
+
+    /*
+     * Constructs a SocketImpl instance of the given class.
+     */
+    SocketImpl newSocketImpl(Class<? extends SocketImpl> implClass);
+}
--- a/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java	Thu Sep 01 12:22:59 2016 -0700
@@ -55,6 +55,7 @@
     private static JavaNetAccess javaNetAccess;
     private static JavaNetInetAddressAccess javaNetInetAddressAccess;
     private static JavaNetHttpCookieAccess javaNetHttpCookieAccess;
+    private static JavaNetSocketAccess javaNetSocketAccess;
     private static JavaNioAccess javaNioAccess;
     private static JavaIOFileDescriptorAccess javaIOFileDescriptorAccess;
     private static JavaSecurityProtectionDomainAccess javaSecurityProtectionDomainAccess;
@@ -161,6 +162,16 @@
         return javaNetHttpCookieAccess;
     }
 
+    public static void setJavaNetSocketAccess(JavaNetSocketAccess jnsa) {
+        javaNetSocketAccess = jnsa;
+    }
+
+    public static JavaNetSocketAccess getJavaNetSocketAccess() {
+        if (javaNetSocketAccess == null)
+            unsafe.ensureClassInitialized(java.net.ServerSocket.class);
+        return javaNetSocketAccess;
+    }
+
     public static void setJavaNioAccess(JavaNioAccess jna) {
         javaNioAccess = jna;
     }
--- a/jdk/src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1496,7 +1496,7 @@
             }
         } catch (CertPathValidatorException cpve) {
             throw new CertificateException(
-                "Certificates does not conform to algorithm constraints");
+                "Certificates do not conform to algorithm constraints", cpve);
         }
     }
 }
--- a/jdk/src/java.base/share/native/libjli/java.c	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/src/java.base/share/native/libjli/java.c	Thu Sep 01 12:22:59 2016 -0700
@@ -556,20 +556,6 @@
            JLI_StrCmp(name, "--list-modules") == 0;
 }
 
-#ifndef OLD_MODULE_OPTIONS
-/*
- * Old module options for transition
- */
-static jboolean
-IsOldModuleOption(const char* name) {
-    return JLI_StrCmp(name, "-modulepath") == 0 ||
-    JLI_StrCmp(name, "-mp") == 0 ||
-    JLI_StrCmp(name, "-upgrademodulepath") == 0 ||
-    JLI_StrCmp(name, "-addmods") == 0 ||
-    JLI_StrCmp(name, "-limitmods") == 0;
-}
-#endif
-
 /*
  * Test if the given name is a module-system white-space option that
  * will be passed to the VM with its corresponding long-form option
@@ -584,8 +570,7 @@
            JLI_StrCmp(name, "--limit-modules") == 0 ||
            JLI_StrCmp(name, "--add-exports") == 0 ||
            JLI_StrCmp(name, "--add-reads") == 0 ||
-           JLI_StrCmp(name, "--patch-module") == 0 ||
-           IsOldModuleOption(name);
+           JLI_StrCmp(name, "--patch-module") == 0;
 }
 
 /*
@@ -1224,32 +1209,6 @@
         }
     }
 
-#ifndef OLD_MODULE_OPTIONS
-    // for transition to support both old and new syntax
-    if (JLI_StrCmp(arg, "-modulepath") == 0 ||
-        JLI_StrCmp(arg, "-mp") == 0) {
-        option = "--module-path";
-    } else if (JLI_StrCmp(arg, "-upgrademodulepath") == 0) {
-        option = "--upgrade-module-path";
-    } else if (JLI_StrCmp(arg, "-addmods") == 0) {
-        option = "--add-modules";
-    } else if (JLI_StrCmp(arg, "-limitmods") == 0) {
-        option = "--limit-modules";
-    } else if (JLI_StrCCmp(arg, "-XaddExports:") == 0) {
-        option = "--add-exports";
-        value = arg + 13;
-        kind = VM_LONG_OPTION_WITH_ARGUMENT;
-    } else if (JLI_StrCCmp(arg, "-XaddReads:") == 0) {
-        option = "--add-reads";
-        value = arg + 11;
-        kind = VM_LONG_OPTION_WITH_ARGUMENT;
-    } else if (JLI_StrCCmp(arg, "-Xpatch:") == 0) {
-        option = "--patch-module";
-        value = arg + 8;
-        kind = VM_LONG_OPTION_WITH_ARGUMENT;
-    }
-#endif
-
     *pargc = argc;
     *pargv = argv;
     *poption = option;
@@ -1340,16 +1299,6 @@
                        JLI_StrCmp(arg, "--patch-module") == 0) {
                 REPORT_ERROR (has_arg, ARG_ERROR6, arg);
             }
-#ifndef OLD_MODULE_OPTIONS
-            else if (JLI_StrCmp(arg, "-modulepath") == 0 ||
-                     JLI_StrCmp(arg, "-mp") == 0 ||
-                     JLI_StrCmp(arg, "-upgrademodulepath") == 0) {
-                REPORT_ERROR (has_arg, ARG_ERROR4, arg);
-            } else if (JLI_StrCmp(arg, "-addmods") == 0 ||
-                       JLI_StrCmp(arg, "-limitmods") == 0) {
-                REPORT_ERROR (has_arg, ARG_ERROR6, arg);
-            }
-#endif
 /*
  * The following cases will cause the argument parsing to stop
  */
@@ -1548,6 +1497,7 @@
 
     NULL_CHECK0(cls = FindBootStrapClass(env, "java/lang/String"));
     NULL_CHECK0(ary = (*env)->NewObjectArray(env, strc, cls, 0));
+    CHECK_EXCEPTION_RETURN_VALUE(0);
     for (i = 0; i < strc; i++) {
         jstring str = NewPlatformString(env, *strv++);
         NULL_CHECK0(str);
--- a/jdk/src/java.base/share/native/libjli/java.h	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/src/java.base/share/native/libjli/java.h	Thu Sep 01 12:22:59 2016 -0700
@@ -253,6 +253,13 @@
 #define NULL_CHECK(NC_check_pointer) \
     NULL_CHECK_RETURN_VALUE(NC_check_pointer, )
 
+#define CHECK_EXCEPTION_RETURN_VALUE(CER_value) \
+    do { \
+        if ((*env)->ExceptionOccurred(env)) { \
+            return CER_value; \
+        } \
+    } while (JNI_FALSE)
+
 #define CHECK_EXCEPTION_RETURN() \
     do { \
         if ((*env)->ExceptionOccurred(env)) { \
--- a/jdk/src/jdk.attach/aix/classes/sun/tools/attach/VirtualMachineImpl.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/src/jdk.attach/aix/classes/sun/tools/attach/VirtualMachineImpl.java	Thu Sep 01 12:22:59 2016 -0700
@@ -76,20 +76,29 @@
                 sendQuitTo(pid);
 
                 // give the target VM time to start the attach mechanism
-                int i = 0;
-                long delay = 200;
-                int retries = (int)(attachTimeout() / delay);
+                final int delay_step = 100;
+                final long timeout = attachTimeout();
+                long time_spend = 0;
+                long delay = 0;
                 do {
+                    // Increase timeout on each attempt to reduce polling
+                    delay += delay_step;
                     try {
                         Thread.sleep(delay);
                     } catch (InterruptedException x) { }
                     path = findSocketFile(pid);
-                    i++;
-                } while (i <= retries && path == null);
+
+                    time_spend += delay;
+                    if (time_spend > timeout/2 && path == null) {
+                        // Send QUIT again to give target VM the last chance to react
+                        sendQuitTo(pid);
+                    }
+                } while (time_spend <= timeout && path == null);
                 if (path == null) {
                     throw new AttachNotSupportedException(
-                        "Unable to open socket file: target process not responding " +
-                        "or HotSpot VM not loaded");
+                        String.format("Unable to open socket file %s: " +
+                          "target process %d doesn't respond within %dms " +
+                          "or HotSpot VM not loaded", f.getPath(), pid, time_spend));
                 }
             } finally {
                 f.delete();
--- a/jdk/src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java	Thu Sep 01 12:22:59 2016 -0700
@@ -44,9 +44,6 @@
     // Any changes to this needs to be synchronized with HotSpot.
     private static final String tmpdir = "/tmp";
 
-    // Indicates if this machine uses the old LinuxThreads
-    static boolean isLinuxThreads;
-
     // The patch to the socket file created by the target VM
     String path;
 
@@ -73,44 +70,37 @@
         if (path == null) {
             File f = createAttachFile(pid);
             try {
-                // On LinuxThreads each thread is a process and we don't have the
-                // pid of the VMThread which has SIGQUIT unblocked. To workaround
-                // this we get the pid of the "manager thread" that is created
-                // by the first call to pthread_create. This is parent of all
-                // threads (except the initial thread).
-                if (isLinuxThreads) {
-                    int mpid;
-                    try {
-                        mpid = getLinuxThreadsManager(pid);
-                    } catch (IOException x) {
-                        throw new AttachNotSupportedException(x.getMessage());
-                    }
-                    assert(mpid >= 1);
-                    sendQuitToChildrenOf(mpid);
-                } else {
-                    sendQuitTo(pid);
-                }
+                sendQuitTo(pid);
 
                 // give the target VM time to start the attach mechanism
-                int i = 0;
-                long delay = 200;
-                int retries = (int)(attachTimeout() / delay);
+                final int delay_step = 100;
+                final long timeout = attachTimeout();
+                long time_spend = 0;
+                long delay = 0;
                 do {
+                    // Increase timeout on each attempt to reduce polling
+                    delay += delay_step;
                     try {
                         Thread.sleep(delay);
                     } catch (InterruptedException x) { }
                     path = findSocketFile(pid);
-                    i++;
-                } while (i <= retries && path == null);
+
+                    time_spend += delay;
+                    if (time_spend > timeout/2 && path == null) {
+                        // Send QUIT again to give target VM the last chance to react
+                        sendQuitTo(pid);
+                    }
+                } while (time_spend <= timeout && path == null);
                 if (path == null) {
                     throw new AttachNotSupportedException(
-                        "Unable to open socket file: target process not responding " +
-                        "or HotSpot VM not loaded");
+                        String.format("Unable to open socket file %s: " +
+                          "target process %d doesn't respond within %dms " +
+                          "or HotSpot VM not loaded", f.getPath(), pid, time_spend));
                 }
             } finally {
                 f.delete();
             }
-        }
+      }
 
         // Check that the file owner/permission to avoid attaching to
         // bogus process
@@ -340,6 +330,5 @@
 
     static {
         System.loadLibrary("attach");
-        isLinuxThreads = isLinuxThreads();
     }
 }
--- a/jdk/src/jdk.attach/macosx/classes/sun/tools/attach/VirtualMachineImpl.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/src/jdk.attach/macosx/classes/sun/tools/attach/VirtualMachineImpl.java	Thu Sep 01 12:22:59 2016 -0700
@@ -70,26 +70,34 @@
         // Then we attempt to find the socket file again.
         path = findSocketFile(pid);
         if (path == null) {
-            File f = new File(tmpdir, ".attach_pid" + pid);
-            createAttachFile(f.getPath());
+            File f = createAttachFile(pid);
             try {
                 sendQuitTo(pid);
 
                 // give the target VM time to start the attach mechanism
-                int i = 0;
-                long delay = 200;
-                int retries = (int)(attachTimeout() / delay);
+                final int delay_step = 100;
+                final long timeout = attachTimeout();
+                long time_spend = 0;
+                long delay = 0;
                 do {
+                    // Increase timeout on each attempt to reduce polling
+                    delay += delay_step;
                     try {
                         Thread.sleep(delay);
                     } catch (InterruptedException x) { }
                     path = findSocketFile(pid);
-                    i++;
-                } while (i <= retries && path == null);
+
+                    time_spend += delay;
+                    if (time_spend > timeout/2 && path == null) {
+                        // Send QUIT again to give target VM the last chance to react
+                        sendQuitTo(pid);
+                    }
+                } while (time_spend <= timeout && path == null);
                 if (path == null) {
                     throw new AttachNotSupportedException(
-                        "Unable to open socket file: target process not responding " +
-                        "or HotSpot VM not loaded");
+                        String.format("Unable to open socket file %s: " +
+                          "target process %d doesn't respond within %dms " +
+                          "or HotSpot VM not loaded", f.getPath(), pid, time_spend));
                 }
             } finally {
                 f.delete();
@@ -282,6 +290,12 @@
         write(fd, b, 0, 1);
     }
 
+    private File createAttachFile(int pid) throws IOException {
+        String fn = ".attach_pid" + pid;
+        File f = new File(tmpdir, fn);
+        createAttachFile0(f.getPath());
+        return f;
+    }
 
     //-- native methods
 
@@ -299,7 +313,7 @@
 
     static native void write(int fd, byte buf[], int off, int bufLen) throws IOException;
 
-    static native void createAttachFile(String path);
+    static native void createAttachFile0(String path);
 
     static native String getTempDir();
 
--- a/jdk/src/jdk.attach/macosx/native/libattach/VirtualMachineImpl.c	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/src/jdk.attach/macosx/native/libattach/VirtualMachineImpl.c	Thu Sep 01 12:22:59 2016 -0700
@@ -270,7 +270,7 @@
  * Method:    createAttachFile
  * Signature: (Ljava.lang.String;)V
  */
-JNIEXPORT void JNICALL Java_sun_tools_attach_VirtualMachineImpl_createAttachFile(JNIEnv *env, jclass cls, jstring path)
+JNIEXPORT void JNICALL Java_sun_tools_attach_VirtualMachineImpl_createAttachFile0(JNIEnv *env, jclass cls, jstring path)
 {
     const char* _path;
     jboolean isCopy;
--- a/jdk/src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java	Thu Sep 01 12:22:59 2016 -0700
@@ -319,7 +319,7 @@
 
     // -- attach timeout support
 
-    private static long defaultAttachTimeout = 5000;
+    private static long defaultAttachTimeout = 10000;
     private volatile long attachTimeout;
 
     /*
--- a/jdk/src/jdk.attach/solaris/classes/sun/tools/attach/VirtualMachineImpl.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/src/jdk.attach/solaris/classes/sun/tools/attach/VirtualMachineImpl.java	Thu Sep 01 12:22:59 2016 -0700
@@ -71,27 +71,36 @@
         } catch (FileNotFoundException fnf1) {
             File f = createAttachFile(pid);
             try {
-                // kill -QUIT will tickle target VM to check for the
-                // attach file.
                 sigquit(pid);
 
                 // give the target VM time to start the attach mechanism
-                int i = 0;
-                long delay = 200;
-                int retries = (int)(attachTimeout() / delay);
+                final int delay_step = 100;
+                final long timeout = attachTimeout();
+                long time_spend = 0;
+                long delay = 0;
                 do {
+                    // Increase timeout on each attempt to reduce polling
+                    delay += delay_step;
                     try {
                         Thread.sleep(delay);
                     } catch (InterruptedException x) { }
                     try {
                         fd = openDoor(pid);
-                    } catch (FileNotFoundException fnf2) { }
-                    i++;
-                } while (i <= retries && fd == -1);
-                if (fd == -1) {
+                    } catch (FileNotFoundException fnf2) {
+                        // pass
+                    }
+
+                    time_spend += delay;
+                    if (time_spend > timeout/2 && fd == -1) {
+                        // Send QUIT again to give target VM the last chance to react
+                        sigquit(pid);
+                    }
+                } while (time_spend <= timeout && fd == -1);
+                if (fd  == -1) {
                     throw new AttachNotSupportedException(
-                        "Unable to open door: target process not responding or " +
-                        "HotSpot VM not loaded");
+                        String.format("Unable to open door %s: " +
+                          "target process %d doesn't respond within %dms " +
+                          "or HotSpot VM not loaded", f.getPath(), pid, time_spend));
                 }
             } finally {
                 f.delete();
--- a/jdk/src/jdk.internal.le/share/classes/jdk/internal/jline/console/ConsoleReader.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/src/jdk.internal.le/share/classes/jdk/internal/jline/console/ConsoleReader.java	Thu Sep 01 12:22:59 2016 -0700
@@ -39,6 +39,7 @@
 //import java.util.Map;
 import java.util.ResourceBundle;
 import java.util.Stack;
+import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import jdk.internal.jline.Terminal;
@@ -2336,6 +2337,33 @@
                 out.flush();
             }
 
+            Stack<Character> pushBackChar = new Stack<Character>();
+
+            if (terminal.isAnsiSupported()) {
+                //detect the prompt length by reading the cursor position from the terminal
+                //the real prompt length could differ from the simple prompt length due to
+                //use of escape sequences:
+                out.write("\033[6n");
+                out.flush();
+                StringBuilder input = new StringBuilder();
+                while (true) {
+                    int read;
+                    while ((read = in.read()) != 'R') {
+                        input.appendCodePoint(read);
+                    }
+                    input.appendCodePoint(read);
+                    Matcher m = CURSOR_COLUMN_PATTERN.matcher(input);
+                    if (m.matches()) {
+                        promptLen = Integer.parseInt(m.group("column")) - 1;
+                        String prefix = m.group("prefix");
+                        for (int i = prefix.length() - 1; i >= 0; i--) {
+                            pushBackChar.push(prefix.charAt(i));
+                        }
+                        break;
+                    }
+                }
+            }
+
             // if the terminal is unsupported, just use plain-java reading
             if (!terminal.isSupported()) {
                 return readLineSimple();
@@ -2352,7 +2380,6 @@
             boolean success = true;
 
             StringBuilder sb = new StringBuilder();
-            Stack<Character> pushBackChar = new Stack<Character>();
             while (true) {
                 int c = pushBackChar.isEmpty() ? readCharacter() : pushBackChar.pop ();
                 if (c == -1) {
@@ -3193,6 +3220,9 @@
             }
         }
     }
+    //where:
+        private Pattern CURSOR_COLUMN_PATTERN =
+                Pattern.compile("(?<prefix>.*)\033\\[[0-9]+;(?<column>[0-9]+)R");
 
     /**
      * Read a line for unsupported terminals.
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java	Thu Sep 01 12:22:59 2016 -0700
@@ -29,12 +29,12 @@
 import java.lang.invoke.MethodType;
 import java.nio.file.Files;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.EnumSet;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 import jdk.internal.misc.SharedSecrets;
@@ -69,11 +69,11 @@
     private static final JavaLangInvokeAccess JLIA
             = SharedSecrets.getJavaLangInvokeAccess();
 
-    List<String> speciesTypes;
+    Set<String> speciesTypes;
 
-    List<String> invokerTypes;
+    Set<String> invokerTypes;
 
-    Map<String, List<String>> dmhMethods;
+    Map<String, Set<String>> dmhMethods;
 
     public GenerateJLIClassesPlugin() {
     }
@@ -110,8 +110,8 @@
      * A better long-term solution is to define and run a set of quick
      * generators and extracting this list as a step in the build process.
      */
-    public static List<String> defaultSpecies() {
-        return List.of("LL", "L3", "L4", "L5", "L6", "L7", "L7I",
+    public static Set<String> defaultSpecies() {
+        return Set.of("LL", "L3", "L4", "L5", "L6", "L7", "L7I",
                 "L7II", "L7IIL", "L8", "L9", "L10", "L10I", "L10II", "L10IIL",
                 "L11", "L12", "L13", "LI", "D", "L3I", "LIL", "LLI", "LLIL",
                 "LILL", "I", "LLILL");
@@ -120,23 +120,23 @@
     /**
      * @return the default invoker forms to generate.
      */
-    private static List<String> defaultInvokers() {
-        return List.of("LL_L", "LL_I", "LILL_I", "L6_L");
+    private static Set<String> defaultInvokers() {
+        return Set.of("LL_L", "LL_I", "LILL_I", "L6_L");
     }
 
     /**
      * @return the list of default DirectMethodHandle methods to generate.
      */
-    private static Map<String, List<String>> defaultDMHMethods() {
+    private static Map<String, Set<String>> defaultDMHMethods() {
         return Map.of(
-            DMH_INVOKE_VIRTUAL, List.of("L_L", "LL_L", "LLI_I", "L3_V"),
-            DMH_INVOKE_SPECIAL, List.of("LL_I", "LL_L", "LLF_L", "LLD_L", "L3_L",
+            DMH_INVOKE_VIRTUAL, Set.of("L_L", "LL_L", "LLI_I", "L3_V"),
+            DMH_INVOKE_SPECIAL, Set.of("LL_I", "LL_L", "LLF_L", "LLD_L", "L3_L",
                 "L4_L", "L5_L", "L6_L", "L7_L", "L8_L", "LLI_I", "LLI_L",
                 "LLIL_I", "LLII_I", "LLII_L", "L3I_L", "L3I_I", "LLILI_I",
                 "LLIIL_L", "LLIILL_L", "LLIILL_I", "LLIIL_I", "LLILIL_I",
                 "LLILILL_I", "LLILII_I", "LLI3_I", "LLI3L_I", "LLI3LL_I",
                 "LLI3_L", "LLI4_I"),
-            DMH_INVOKE_STATIC, List.of("LII_I", "LIL_I", "LILIL_I", "LILII_I",
+            DMH_INVOKE_STATIC, Set.of("LII_I", "LIL_I", "LILIL_I", "LILII_I",
                 "L_I", "L_L", "L_V", "LD_L", "LF_L", "LI_I", "LII_L", "LLI_L",
                 "LL_V", "LL_L", "L3_L", "L4_L", "L5_L", "L6_L", "L7_L",
                 "L8_L", "L9_L", "L10_L", "L10I_L", "L10II_L", "L10IIL_L",
@@ -159,15 +159,48 @@
     public void configure(Map<String, String> config) {
         String mainArgument = config.get(NAME);
 
-        if (mainArgument != null && mainArgument.startsWith("@")) {
+        if ("none".equals(mainArgument)) {
+            speciesTypes = Set.of();
+            invokerTypes = Set.of();
+            dmhMethods = Map.of();
+            return;
+        }
+
+        // Start with the default configuration
+        Set<String> defaultBMHSpecies = defaultSpecies();
+        // Expand BMH species signatures
+        defaultBMHSpecies = defaultBMHSpecies.stream()
+                .map(type -> expandSignature(type))
+                .collect(Collectors.toSet());
+
+        Set<String> defaultInvokerTypes = defaultInvokers();
+        validateMethodTypes(defaultInvokerTypes);
+
+        Map<String, Set<String>> defaultDmhMethods = defaultDMHMethods();
+        for (Set<String> dmhMethodTypes : defaultDmhMethods.values()) {
+            validateMethodTypes(dmhMethodTypes);
+        }
+
+        // Extend the default configuration with the contents in the supplied
+        // input file
+        if (mainArgument == null || !mainArgument.startsWith("@")) {
+            speciesTypes = defaultBMHSpecies;
+            invokerTypes = defaultInvokerTypes;
+            dmhMethods = defaultDmhMethods;
+        } else {
             File file = new File(mainArgument.substring(1));
             if (file.exists()) {
-                speciesTypes = new ArrayList<>();
-                invokerTypes = new ArrayList<>();
-                dmhMethods = new HashMap<>();
-                Stream<String> lines = fileLines(file);
-
-                lines.map(line -> line.split(" "))
+                // Use TreeSet/TreeMap to keep things sorted in a deterministic
+                // order to avoid scrambling the layout on small changes and to
+                // ease finding methods in the generated code
+                speciesTypes = new TreeSet<>(defaultBMHSpecies);
+                invokerTypes = new TreeSet<>(defaultInvokerTypes);
+                dmhMethods = new TreeMap<>();
+                for (Map.Entry<String, Set<String>> entry : defaultDmhMethods.entrySet()) {
+                    dmhMethods.put(entry.getKey(), new TreeSet<>(entry.getValue()));
+                }
+                fileLines(file)
+                    .map(line -> line.split(" "))
                     .forEach(parts -> {
                         switch (parts[0]) {
                             case "[BMH_RESOLVE]":
@@ -191,28 +224,14 @@
                         }
                 });
             }
-        } else {
-            List<String> bmhSpecies = defaultSpecies();
-            // Expand BMH species signatures
-            speciesTypes = bmhSpecies.stream()
-                    .map(type -> expandSignature(type))
-                    .collect(Collectors.toList());
-
-            invokerTypes = defaultInvokers();
-            validateMethodTypes(invokerTypes);
-
-            dmhMethods = defaultDMHMethods();
-            for (List<String> dmhMethodTypes : dmhMethods.values()) {
-                validateMethodTypes(dmhMethodTypes);
-            }
         }
     }
 
     private void addDMHMethodType(String dmh, String methodType) {
         validateMethodType(methodType);
-        List<String> methodTypes = dmhMethods.get(dmh);
+        Set<String> methodTypes = dmhMethods.get(dmh);
         if (methodTypes == null) {
-            methodTypes = new ArrayList<>();
+            methodTypes = new TreeSet<>();
             dmhMethods.put(dmh, methodTypes);
         }
         methodTypes.add(methodType);
@@ -226,7 +245,7 @@
         }
     }
 
-    private void validateMethodTypes(List<String> dmhMethodTypes) {
+    private void validateMethodTypes(Set<String> dmhMethodTypes) {
         for (String type : dmhMethodTypes) {
             validateMethodType(type);
         }
@@ -291,13 +310,13 @@
 
     private void generateHolderClasses(ResourcePoolBuilder out) {
         int count = 0;
-        for (List<String> entry : dmhMethods.values()) {
+        for (Set<String> entry : dmhMethods.values()) {
             count += entry.size();
         }
         MethodType[] directMethodTypes = new MethodType[count];
         int[] dmhTypes = new int[count];
         int index = 0;
-        for (Map.Entry<String, List<String>> entry : dmhMethods.entrySet()) {
+        for (Map.Entry<String, Set<String>> entry : dmhMethods.entrySet()) {
             String dmhType = entry.getKey();
             for (String type : entry.getValue()) {
                 // The DMH type to actually ask for is retrieved by removing
@@ -314,10 +333,11 @@
             }
         }
         MethodType[] invokerMethodTypes = new MethodType[this.invokerTypes.size()];
-        for (int i = 0; i < invokerTypes.size(); i++) {
+        int i = 0;
+        for (String invokerType : invokerTypes) {
             // The invoker type to ask for is retrieved by removing the first
             // and the last argument, which needs to be of Object.class
-            MethodType mt = asMethodType(invokerTypes.get(i));
+            MethodType mt = asMethodType(invokerType);
             final int lastParam = mt.parameterCount() - 1;
             if (mt.parameterCount() < 2 ||
                     mt.parameterType(0) != Object.class ||
@@ -327,6 +347,7 @@
             }
             mt = mt.dropParameterTypes(lastParam, lastParam + 1);
             invokerMethodTypes[i] = mt.dropParameterTypes(0, 1);
+            i++;
         }
         try {
             byte[] bytes = JLIA.generateDirectMethodHandleHolderClassBytes(
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties	Thu Sep 01 12:22:59 2016 -0700
@@ -68,12 +68,12 @@
 exclude-resources.description=\
 Specify resources to exclude. e.g.: **.jcov,glob:**/META-INF/**
 
-generate-jli-classes.argument=<@filename>
+generate-jli-classes.argument=<none|@filename>
 
 generate-jli-classes.description=\
 Takes a file hinting to jlink what java.lang.invoke classes to pre-generate. If\n\
-this flag is not specified a default set of classes will be generated, so to \n\
-disable pre-generation supply the name of an empty or non-existing file
+this flag is not specified a default set of classes will be generated. To \n\
+disable pre-generation specify none as the argument
 
 installed-modules.description=Fast loading of module descriptors (always enabled)
 
--- a/jdk/src/jdk.management/share/native/libmanagement_ext/GcInfoBuilder.c	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/src/jdk.management/share/native/libmanagement_ext/GcInfoBuilder.c	Thu Sep 01 12:22:59 2016 -0700
@@ -87,9 +87,32 @@
     for (i = 0; i < num_attributes; i++) {
         nativeTypes[i] = ext_att_info[i].type;
         attName = (*env)->NewStringUTF(env, ext_att_info[i].name);
-        desc = (*env)->NewStringUTF(env, ext_att_info[i].description);
+        if ((*env)->ExceptionCheck(env)) {
+           free(ext_att_info);
+           free(nativeTypes);
+           return;
+        }
+
         (*env)->SetObjectArrayElement(env, attributeNames, i, attName);
+        if ((*env)->ExceptionCheck(env)) {
+           free(ext_att_info);
+           free(nativeTypes);
+           return;
+        }
+
+        desc = (*env)->NewStringUTF(env, ext_att_info[i].description);
+        if ((*env)->ExceptionCheck(env)) {
+           free(ext_att_info);
+           free(nativeTypes);
+           return;
+        }
+
         (*env)->SetObjectArrayElement(env, descriptions, i, desc);
+        if ((*env)->ExceptionCheck(env)) {
+           free(ext_att_info);
+           free(nativeTypes);
+           return;
+        }
     }
     (*env)->SetCharArrayRegion(env, types, 0, num_attributes, nativeTypes);
 
--- a/jdk/test/ProblemList.txt	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/ProblemList.txt	Thu Sep 01 12:22:59 2016 -0700
@@ -213,8 +213,6 @@
 
 sun/security/pkcs11/ec/TestKeyFactory.java                      8026976 generic-all
 
-sun/security/krb5/auto/Unreachable.java                         7164518 macosx-all
-
 sun/security/tools/keytool/ListKeychainStore.sh                 8156889 macosx-all
 
 sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java      8026393 generic-all
--- a/jdk/test/TEST.groups	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/TEST.groups	Thu Sep 01 12:22:59 2016 -0700
@@ -189,7 +189,6 @@
     -sun/security/krb5 \
     -sun/security/jgss \
     javax/net \
-    sun/net/www/protocol/https \
     com/sun/net/ssl \
     lib/security
 
--- a/jdk/test/com/sun/jdi/SunBootClassPathEmptyTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/com/sun/jdi/SunBootClassPathEmptyTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -32,7 +32,7 @@
  * @summary Verifies that PathSearchingVirtualMachine.bootClassPath()
  *          returns an empty list in case no bootclass path specified
  *          regardless of sun.boot.class.path option, which is now obsolete
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @compile TestClass.java
  * @compile SunBootClassPathEmptyTest.java
  * @run main/othervm SunBootClassPathEmptyTest
--- a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/DumpHeap.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/DumpHeap.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,7 +38,7 @@
  * @bug 6455258
  * @summary Sanity test for com.sun.management.HotSpotDiagnosticMXBean.dumpHeap method
  * @library /lib/testlibrary
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @build jdk.testlibrary.*
  * @build jdk.test.lib.hprof.*
  * @build jdk.test.lib.hprof.model.*
--- a/jdk/test/java/lang/Class/GetModuleTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/Class/GetModuleTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
--- a/jdk/test/java/lang/Class/GetPackageTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/Class/GetPackageTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
--- a/jdk/test/java/lang/ClassLoader/GetSystemPackage.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/ClassLoader/GetSystemPackage.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/lang/ClassLoader/deadlock/GetResource.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/ClassLoader/deadlock/GetResource.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/lang/ProcessBuilder/CloseRace.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/ProcessBuilder/CloseRace.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/lang/ProcessBuilder/PipelineTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/ProcessBuilder/PipelineTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,7 +19,6 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
 import java.io.File;
--- a/jdk/test/java/lang/ProcessHandle/Basic.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/ProcessHandle/Basic.java	Thu Sep 01 12:22:59 2016 -0700
@@ -36,7 +36,7 @@
 
 /*
  * @test
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          jdk.management
  * @run testng Basic
--- a/jdk/test/java/lang/ProcessHandle/InfoTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/ProcessHandle/InfoTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -48,7 +48,7 @@
 /*
  * @test
  * @bug 8077350 8081566 8081567 8098852 8136597
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          jdk.management
  * @build jdk.test.lib.Platform jdk.test.lib.Utils
--- a/jdk/test/java/lang/ProcessHandle/OnExitTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/ProcessHandle/OnExitTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -38,7 +38,7 @@
 
 /*
  * @test
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          jdk.management
  * @build jdk.test.lib.Platform jdk.test.lib.Utils
--- a/jdk/test/java/lang/ProcessHandle/TreeTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/ProcessHandle/TreeTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -44,7 +44,7 @@
 
 /*
  * @test
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          jdk.management
  * @build jdk.test.lib.Utils
--- a/jdk/test/java/lang/StackWalker/CountLocalSlots.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/StackWalker/CountLocalSlots.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/lang/StackWalker/LocalsAndOperands.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/StackWalker/LocalsAndOperands.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/lang/StackWalker/LocalsCrash.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/StackWalker/LocalsCrash.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/lang/String/concat/CompactStringsInitialCoder.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/String/concat/CompactStringsInitialCoder.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/lang/String/concat/StringConcatFactoryEmptyMethods.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/String/concat/StringConcatFactoryEmptyMethods.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/lang/String/concat/WithSecurityManager.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/String/concat/WithSecurityManager.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/lang/Thread/ThreadStateController.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/Thread/ThreadStateController.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015 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
--- a/jdk/test/java/lang/annotation/typeAnnotations/GetAnnotatedReceiverType.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/annotation/typeAnnotations/GetAnnotatedReceiverType.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/lang/instrument/NMTHelper.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/instrument/NMTHelper.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/lang/instrument/NativeMethodPrefixAgent.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/instrument/NativeMethodPrefixAgent.java	Thu Sep 01 12:22:59 2016 -0700
@@ -24,6 +24,7 @@
 /**
  * @test
  * @bug 6263319
+ * @requires ((vm.opt.StartFlightRecording == null) | (vm.opt.StartFlightRecording == false)) & ((vm.opt.FlightRecorder == null) | (vm.opt.FlightRecorder == false))
  * @summary test setNativeMethodPrefix
  * @author Robert Field, Sun Microsystems
  *
--- a/jdk/test/java/lang/instrument/RedefineBigClass.sh	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/instrument/RedefineBigClass.sh	Thu Sep 01 12:22:59 2016 -0700
@@ -70,7 +70,7 @@
 fi
 
 "${JAVA}" ${TESTVMOPTS} \
-    -XX:TraceRedefineClasses=3 ${NMT} \
+    -Xlog:redefine+class+load=debug,redefine+class+load+exceptions=info ${NMT} \
     -javaagent:RedefineBigClassAgent.jar=BigClass.class \
     -classpath "${TESTCLASSES}" RedefineBigClassApp \
     > output.log 2>&1 
--- a/jdk/test/java/lang/instrument/RedefineSubclassWithTwoInterfaces.sh	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/instrument/RedefineSubclassWithTwoInterfaces.sh	Thu Sep 01 12:22:59 2016 -0700
@@ -87,23 +87,8 @@
 
 echo "INFO: launching RedefineSubclassWithTwoInterfacesApp"
 
-# TraceRedefineClasses options:
-#
-#    0x00000001 |          1 - name each target class before loading, after
-#                              loading and after redefinition is completed
-#    0x00000002 |          2 - print info if parsing, linking or
-#                              verification throws an exception
-#    0x00000004 |          4 - print timer info for the VM operation
-#    0x00001000 |       4096 - detect calls to obsolete methods
-#    0x00002000 |       8192 - fail a guarantee() in addition to detection
-#    0x00004000 |      16384 - detect old/obsolete methods in metadata
-#    0x00100000 |    1048576 - impl details: vtable updates
-#    0x00200000 |    2097152 - impl details: itable updates
-#
-#    1+2+4+4096+8192+16384+1048576+2097152 == 3174407
-
 "${JAVA}" ${TESTVMOPTS} \
-    -XX:TraceRedefineClasses=3174407 \
+    -Xlog:redefine+class+load=trace,redefine+class+load+exceptions=trace,redefine+class+timer=trace,redefine+class+obsolete=trace,redefine+class+obsolete+metadata=trace,redefine+class+constantpool=trace \
     -javaagent:RedefineSubclassWithTwoInterfacesAgent.jar \
     -classpath "${TESTCLASSES}" \
     RedefineSubclassWithTwoInterfacesApp > output.log 2>&1
--- a/jdk/test/java/lang/instrument/RetransformBigClass.sh	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/instrument/RetransformBigClass.sh	Thu Sep 01 12:22:59 2016 -0700
@@ -70,7 +70,7 @@
 fi
 
 "${JAVA}" ${TESTVMOPTS} \
-    -XX:TraceRedefineClasses=3 ${NMT} \
+    -Xlog:redefine+class+load=debug,redefine+class+load+exceptions=info ${NMT} \
     -javaagent:RetransformBigClassAgent.jar=BigClass.class \
     -classpath "${TESTCLASSES}" RetransformBigClassApp \
     > output.log 2>&1
--- a/jdk/test/java/lang/invoke/6987555/Test6987555.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/6987555/Test6987555.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /**
--- a/jdk/test/java/lang/invoke/6991596/Test6991596.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/6991596/Test6991596.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /**
--- a/jdk/test/java/lang/invoke/6998541/Test6998541.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/6998541/Test6998541.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /**
--- a/jdk/test/java/lang/invoke/7087570/Test7087570.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/7087570/Test7087570.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,7 +19,6 @@
  * 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
--- a/jdk/test/java/lang/invoke/7157574/Test7157574.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/7157574/Test7157574.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /*
--- a/jdk/test/java/lang/invoke/7196190/ClassForNameTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/7196190/ClassForNameTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /**
--- a/jdk/test/java/lang/invoke/7196190/GetUnsafeTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/7196190/GetUnsafeTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /**
--- a/jdk/test/java/lang/invoke/8009222/Test8009222.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/8009222/Test8009222.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /**
--- a/jdk/test/java/lang/invoke/8022701/BogoLoader.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/8022701/BogoLoader.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,7 +19,6 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
 import java.io.BufferedInputStream;
--- a/jdk/test/java/lang/invoke/8022701/InvokeSeveralWays.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/8022701/InvokeSeveralWays.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,7 +19,6 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
 import java.lang.reflect.InvocationTargetException;
--- a/jdk/test/java/lang/invoke/8022701/Invoker.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/8022701/Invoker.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 public class Invoker {
--- a/jdk/test/java/lang/invoke/8022701/MHIllegalAccess.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/8022701/MHIllegalAccess.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /**
--- a/jdk/test/java/lang/invoke/8022701/MethodSupplier.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/8022701/MethodSupplier.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /*
--- a/jdk/test/java/lang/invoke/CallSiteTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/CallSiteTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /**
--- a/jdk/test/java/lang/invoke/CallStaticInitOrder.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/CallStaticInitOrder.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /**
--- a/jdk/test/java/lang/invoke/ProtectedMemberDifferentPackage/Test.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/ProtectedMemberDifferentPackage/Test.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /**
--- a/jdk/test/java/lang/invoke/ProtectedMemberDifferentPackage/p1/T2.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/ProtectedMemberDifferentPackage/p1/T2.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,8 +19,8 @@
  * 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 p1;
 
 import p2.T3;
--- a/jdk/test/java/lang/invoke/ProtectedMemberDifferentPackage/p2/T3.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/ProtectedMemberDifferentPackage/p2/T3.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,8 +19,8 @@
  * 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 p2;
 
 import p1.T2;
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeBoolean.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeBoolean.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeByte.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeByte.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeChar.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeChar.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeDouble.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeDouble.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeFloat.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeFloat.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeInt.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeInt.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeLong.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeLong.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeShort.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeShort.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeString.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeString.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/lang/invoke/accessProtectedSuper/BogoLoader.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/accessProtectedSuper/BogoLoader.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,7 +19,6 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
 import java.io.BufferedInputStream;
--- a/jdk/test/java/lang/invoke/accessProtectedSuper/MethodInvoker.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/accessProtectedSuper/MethodInvoker.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,7 +19,6 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
 import anotherpkg.MethodSupplierOuter;
--- a/jdk/test/java/lang/invoke/accessProtectedSuper/Test.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/accessProtectedSuper/Test.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /**
--- a/jdk/test/java/lang/invoke/accessProtectedSuper/anotherpkg/MethodSupplierOuter.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/invoke/accessProtectedSuper/anotherpkg/MethodSupplierOuter.java	Thu Sep 01 12:22:59 2016 -0700
@@ -19,7 +19,6 @@
  * 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 anotherpkg;
--- a/jdk/test/java/lang/management/GarbageCollectorMXBean/GcInfoCompositeType.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/management/GarbageCollectorMXBean/GcInfoCompositeType.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/lang/ref/CleanerTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/lang/ref/CleanerTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -49,7 +49,7 @@
 
 /*
  * @test
- * @library /test/lib/share/classes /lib/testlibrary /test/lib
+ * @library /lib/testlibrary /test/lib
  * @build sun.hotspot.WhiteBox
  * @build jdk.test.lib.Utils
  * @modules java.base/jdk.internal
--- a/jdk/test/java/net/Inet4Address/textToNumericFormat.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/net/Inet4Address/textToNumericFormat.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/net/ProxySelector/B8035158.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/net/ProxySelector/B8035158.java	Thu Sep 01 12:22:59 2016 -0700
@@ -20,6 +20,7 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
+
 /*
  * @test
  * @bug 8035158 8145732
--- a/jdk/test/java/net/URLClassLoader/definePackage/SplitPackage.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/net/URLClassLoader/definePackage/SplitPackage.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
--- a/jdk/test/java/net/URLPermission/nstest/LookupTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/net/URLPermission/nstest/LookupTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/net/httpclient/BasicAuthTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/net/httpclient/BasicAuthTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -20,6 +20,7 @@
  *
  * 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.
  */
 
 /**
--- a/jdk/test/java/net/httpclient/HeadersTest1.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/net/httpclient/HeadersTest1.java	Thu Sep 01 12:22:59 2016 -0700
@@ -20,6 +20,7 @@
  *
  * 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.
  */
 
 /**
--- a/jdk/test/java/net/httpclient/ImmutableHeaders.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/net/httpclient/ImmutableHeaders.java	Thu Sep 01 12:22:59 2016 -0700
@@ -20,6 +20,7 @@
  *
  * 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.
  */
 
 /**
--- a/jdk/test/java/net/httpclient/security/Driver.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/net/httpclient/security/Driver.java	Thu Sep 01 12:22:59 2016 -0700
@@ -20,6 +20,7 @@
  *
  * 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.
  */
 
 /**
--- a/jdk/test/java/net/httpclient/security/Security.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/net/httpclient/security/Security.java	Thu Sep 01 12:22:59 2016 -0700
@@ -20,6 +20,7 @@
  *
  * 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.
  */
 
 /**
--- a/jdk/test/java/security/SecureRandom/DrbgParametersSpec.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/security/SecureRandom/DrbgParametersSpec.java	Thu Sep 01 12:22:59 2016 -0700
@@ -24,7 +24,7 @@
 /* @test
  * @bug 8051408 8158534
  * @summary Make sure DrbgParameters coded as specified
- * @library /test/lib/share/classes
+ * @library /test/lib
  */
 
 import jdk.test.lib.Asserts;
--- a/jdk/test/java/text/Bidi/BidiConformance.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Bidi/BidiConformance.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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 6850113 8032446
  * @summary confirm the behavior of new Bidi implementation. (Backward compatibility)
+ * @modules java.desktop
  */
 
 import java.awt.font.NumericShaper;
--- a/jdk/test/java/text/Bidi/BidiEmbeddingTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Bidi/BidiEmbeddingTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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 @@
  * indicate overrides, rather than using bit 7.  Also tests Bidi without loading awt classes to
  * confirm that Bidi can be used without awt. Verify that embedding level 0 is properly mapped
  * to the base embedding level.
+ * @modules java.desktop
  */
 
 import java.awt.Color;
--- a/jdk/test/java/text/Bidi/Bug7042148.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Bidi/Bug7042148.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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 7042148
  * @summary verify that Bidi.baseIsLeftToRight() returns the correct value even if an incorrect position is set in the given AttributedCharacterIterator.
+ * @modules java.desktop
  */
 import java.awt.font.*;
 import java.text.*;
--- a/jdk/test/java/text/Bidi/Bug7051769.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Bidi/Bug7051769.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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 7051769 8038092
  * @summary verify that Bidi.toString() returns the corect result.
  *     The second run is intended to test lazy SharedSectets init for 8038092
+ * @modules java.desktop
  * @run main Bug7051769
  * @run main/othervm -DpreloadBidi=true Bug7051769
  */
--- a/jdk/test/java/text/BreakIterator/NewVSOld_th_TH.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/BreakIterator/NewVSOld_th_TH.java	Thu Sep 01 12:22:59 2016 -0700
@@ -22,9 +22,10 @@
  */
 
 /*
-    @test
-    @summary test Comparison of New Collators against Old Collators in the en_US locale
-*/
+ * @test
+ * @summary test Comparison of New Collators against Old Collators in the en_US locale
+ * @modules jdk.localedata
+ */
 
 import java.io.*;
 import java.util.Enumeration;
--- a/jdk/test/java/text/Collator/APITest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Collator/APITest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -25,6 +25,7 @@
  * @test
  * @library /java/text/testlib
  * @summary test Collation API
+ * @modules jdk.localedata
  */
 /*
 (C) Copyright Taligent, Inc. 1996 - All Rights Reserved
--- a/jdk/test/java/text/Collator/CollationKeyTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Collator/CollationKeyTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -29,6 +29,7 @@
  *          RuleBasedCollationKey. This test basically tests on the two features:
  *          1. Existing code using CollationKey works (backward compatiblility)
  *          2. CollationKey can be extended by its subclass.
+ * @modules jdk.localedata
  */
 
 
--- a/jdk/test/java/text/Collator/DanishTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Collator/DanishTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -26,6 +26,7 @@
  * @bug 4930708 4174436 5008498
  * @library /java/text/testlib
  * @summary test Danish Collation
+ * @modules jdk.localedata
  */
 /*
 (C) Copyright Taligent, Inc. 1996 - All Rights Reserved
--- a/jdk/test/java/text/Collator/FinnishTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Collator/FinnishTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -25,6 +25,7 @@
  * @test
  * @library /java/text/testlib
  * @summary test Finnish Collation
+ * @modules jdk.localedata
  */
 /*
 (C) Copyright Taligent, Inc. 1996 - All Rights Reserved
--- a/jdk/test/java/text/Collator/FrenchTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Collator/FrenchTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -25,6 +25,7 @@
  * @test
  * @library /java/text/testlib
  * @summary test French Collation
+ * @modules jdk.localedata
  */
 /*
 (C) Copyright Taligent, Inc. 1996 - All Rights Reserved
--- a/jdk/test/java/text/Collator/G7Test.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Collator/G7Test.java	Thu Sep 01 12:22:59 2016 -0700
@@ -25,6 +25,7 @@
  * @test
  * @library /java/text/testlib
  * @summary test G7 Collation
+ * @modules jdk.localedata
  */
 /*
  *
--- a/jdk/test/java/text/Collator/JapaneseTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Collator/JapaneseTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -25,6 +25,7 @@
  * @test 1.1 02/09/11
  * @bug 4176141 4655819
  * @summary Regression tests for Japanese Collation
+ * @modules jdk.localedata
  */
 
 import java.text.*;
--- a/jdk/test/java/text/Collator/KoreanTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Collator/KoreanTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -25,6 +25,7 @@
  * @test 1.1 02/09/12
  * @bug 4176141 4655819
  * @summary Regression tests for Korean Collation
+ * @modules jdk.localedata
  */
 
 import java.text.*;
--- a/jdk/test/java/text/Collator/Regression.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Collator/Regression.java	Thu Sep 01 12:22:59 2016 -0700
@@ -29,6 +29,7 @@
  *      4133509 4139572 4141640 4179126 4179686 4244884 4663220
  * @library /java/text/testlib
  * @summary Regression tests for Collation and associated classes
+ * @modules jdk.localedata
  */
 /*
 (C) Copyright Taligent, Inc. 1996 - All Rights Reserved
--- a/jdk/test/java/text/Collator/ThaiTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Collator/ThaiTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -25,6 +25,7 @@
  * @test
  * @library /java/text/testlib
  * @summary test Thai Collation
+ * @modules jdk.localedata
  */
 /*
  * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
--- a/jdk/test/java/text/Collator/TurkishTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Collator/TurkishTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -25,6 +25,7 @@
  * @test
  * @library /java/text/testlib
  * @summary test Turkish Collation
+ * @modules jdk.localedata
  */
 /*
 (C) Copyright Taligent, Inc. 1996 - All Rights Reserved
--- a/jdk/test/java/text/Collator/VietnameseTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Collator/VietnameseTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -26,6 +26,7 @@
  * @bug 4932968 5015215
  * @library /java/text/testlib
  * @summary test Vietnamese Collation
+ * @modules jdk.localedata
  */
 
 /*
--- a/jdk/test/java/text/Format/DateFormat/Bug4823811.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Format/DateFormat/Bug4823811.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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 4823811 8008577
  * @summary Confirm that text which includes numbers with a trailing minus sign is parsed correctly.
+ * @modules jdk.localedata
  * @run main/othervm -Duser.timezone=GMT+09:00 -Djava.locale.providers=JRE,SPI Bug4823811
  */
 
--- a/jdk/test/java/text/Format/DateFormat/Bug6683975.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Format/DateFormat/Bug6683975.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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 6683975 8008577
  * @summary Make sure that date is formatted correctlyin th locale.
+ * @modules jdk.localedata
  * @run main/othervm -Djava.locale.providers=JRE,SPI Bug6683975
  */
 import java.text.*;
--- a/jdk/test/java/text/Format/DateFormat/Bug8139572.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Format/DateFormat/Bug8139572.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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 8139572
  * @summary SimpleDateFormat parse month stand-alone format bug
  * @compile -encoding utf-8 Bug8139572.java
+ * @modules jdk.localedata
  * @run main Bug8139572
  */
 import java.text.ParseException;
--- a/jdk/test/java/text/Format/DateFormat/ContextMonthNamesTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Format/DateFormat/ContextMonthNamesTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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 7079560 8008577
  * @summary Unit test for context-sensitive month names
+ * @modules jdk.localedata
  * @run main/othervm -Djava.locale.providers=JRE,SPI ContextMonthNamesTest
  */
 
--- a/jdk/test/java/text/Format/DateFormat/DateFormatTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Format/DateFormat/DateFormatTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -26,6 +26,7 @@
  * @bug 4052223 4089987 4469904 4326988 4486735 8008577 8045998 8140571
  * @summary test DateFormat and SimpleDateFormat.
  * @library /java/text/testlib
+ * @modules jdk.localedata
  * @run main/othervm -Djava.locale.providers=COMPAT,SPI DateFormatTest
  */
 
--- a/jdk/test/java/text/Format/DateFormat/LocaleDateFormats.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Format/DateFormat/LocaleDateFormats.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
 /**
  * @test
  * @bug 8080774
+ * @modules jdk.localedata
  * @run testng/othervm -Djava.locale.providers=JRE,CLDR LocaleDateFormats
  * @summary This file contains tests for JRE locales date formats
  */
--- a/jdk/test/java/text/Format/DateFormat/NonGregorianFormatTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Format/DateFormat/NonGregorianFormatTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -25,6 +25,7 @@
  * @test
  * @bug 4833268 6253991 8008577
  * @summary Test formatting and parsing with non-Gregorian calendars
+ * @modules jdk.localedata
  * @run main/othervm -Djava.locale.providers=COMPAT,SPI NonGregorianFormatTest
  */
 
--- a/jdk/test/java/text/Format/DateFormat/bug4117335.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Format/DateFormat/bug4117335.java	Thu Sep 01 12:22:59 2016 -0700
@@ -25,6 +25,7 @@
  * @test
  *
  * @bug 4117335 4432617
+ * @modules jdk.localedata
  */
 
 import java.text.DateFormatSymbols ;
--- a/jdk/test/java/text/Format/MessageFormat/LargeMessageFormat.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Format/MessageFormat/LargeMessageFormat.java	Thu Sep 01 12:22:59 2016 -0700
@@ -25,6 +25,7 @@
  * @test
  * @bug 4112090 8008577
  * @summary verify that MessageFormat can handle large numbers of arguments
+ * @modules jdk.localedata
  * @run main/othervm -Djava.locale.providers=COMPAT,SPI LargeMessageFormat
  */
 
--- a/jdk/test/java/text/Format/NumberFormat/Bug8132125.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Format/NumberFormat/Bug8132125.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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 8132125
  * @summary Checks Swiss' number elements
+ * @modules jdk.localedata
  */
 
 import java.text.*;
--- a/jdk/test/java/text/Format/NumberFormat/CurrencyFormat.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Format/NumberFormat/CurrencyFormat.java	Thu Sep 01 12:22:59 2016 -0700
@@ -25,6 +25,7 @@
  * @test
  * @bug 4290801 4942982 5102005 8008577 8021121
  * @summary Basic tests for currency formatting.
+ * @modules jdk.localedata
  * @run main/othervm -Djava.locale.providers=JRE,SPI CurrencyFormat
  */
 
--- a/jdk/test/java/text/Format/NumberFormat/IntlTestNumberFormatAPI.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Format/NumberFormat/IntlTestNumberFormatAPI.java	Thu Sep 01 12:22:59 2016 -0700
@@ -25,6 +25,7 @@
  * @test
  * @library /java/text/testlib
  * @summary test International Number Format API
+ * @modules jdk.localedata
  */
 /*
 (C) Copyright Taligent, Inc. 1996, 1997 - All Rights Reserved
--- a/jdk/test/java/text/Format/NumberFormat/NumberRegression.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Format/NumberFormat/NumberRegression.java	Thu Sep 01 12:22:59 2016 -0700
@@ -34,6 +34,7 @@
  * @library /java/text/testlib
  * @build IntlTest HexDumpReader TestUtils
  * @modules java.base/sun.util.resources
+ *          jdk.localedata
  * @compile -XDignore.symbol.file NumberRegression.java
  * @run main/othervm -Djava.locale.providers=COMPAT,SPI NumberRegression
  */
--- a/jdk/test/java/text/Format/NumberFormat/NumberTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/text/Format/NumberFormat/NumberTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -27,6 +27,7 @@
  * @summary test NumberFormat
  * @library /java/text/testlib
  * @modules java.base/sun.util.resources
+ *          jdk.localedata
  * @compile -XDignore.symbol.file NumberTest.java
  * @run main/othervm -Djava.locale.providers=COMPAT,SPI NumberTest
  */
--- a/jdk/test/java/util/Arrays/Correct.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/util/Arrays/Correct.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/util/Map/FunctionalCMEs.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/util/Map/FunctionalCMEs.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 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
@@ -22,6 +22,7 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
+
 import java.util.Arrays;
 import java.util.ConcurrentModificationException;
 import java.util.HashMap;
--- a/jdk/test/java/util/Objects/CheckIndex.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/util/Objects/CheckIndex.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/util/concurrent/FutureTask/NegativeTimeout.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/util/concurrent/FutureTask/NegativeTimeout.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/jdk/test/java/util/logging/Logger/entering/LoggerEnteringWithParams.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/util/logging/Logger/entering/LoggerEnteringWithParams.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,4 +1,3 @@
-
 /*
  * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
--- a/jdk/test/java/util/logging/XMLFormatterDate.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/util/logging/XMLFormatterDate.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,4 +1,3 @@
-
 /*
  * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -21,6 +20,7 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
--- a/jdk/test/java/util/regex/PatternStreamTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/util/regex/PatternStreamTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015 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
--- a/jdk/test/java/util/zip/TestCRC32.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/util/zip/TestCRC32.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,6 +1,3 @@
-
-import java.util.zip.CRC32;
-
 /*
  * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,6 +21,8 @@
  * questions.
  */
 
+import java.util.zip.CRC32;
+
 /**
  * @test @summary Check that CRC-32 returns the expected CRC value for the
  * string 123456789
--- a/jdk/test/java/util/zip/TestCRC32C.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/util/zip/TestCRC32C.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,6 +1,3 @@
-
-import java.util.zip.CRC32C;
-
 /*
  * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,6 +21,8 @@
  * questions.
  */
 
+import java.util.zip.CRC32C;
+
 /**
  * @test @summary Check that CRC-32C returns the expected CRC value for the
  * string 123456789
--- a/jdk/test/java/util/zip/ZipFile/TestZipFile.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/java/util/zip/ZipFile/TestZipFile.java	Thu Sep 01 12:22:59 2016 -0700
@@ -8,7 +8,7 @@
  *
  * 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
+ * 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).
  *
--- a/jdk/test/javax/management/remote/mandatory/notif/DeadListenerTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/javax/management/remote/mandatory/notif/DeadListenerTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -115,9 +115,8 @@
         mbean.sendNotification(notif);
 
         // Make sure notifs are working normally.
-        long deadline = System.currentTimeMillis() + 2000;
-        while ((count1Val.get() != 1 || count2Val.get() != 1) && System.currentTimeMillis() < deadline) {
-            Thread.sleep(10);
+        while ((count1Val.get() != 1 || count2Val.get() != 1) ) {
+            Thread.sleep(20);
         }
         assertTrue("New value of count1 == 1", count1Val.get() == 1);
         assertTrue("Initial value of count2 == 1", count2Val.get() == 1);
--- a/jdk/test/jdk/internal/ref/Cleaner/ExitOnThrow.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/jdk/internal/ref/Cleaner/ExitOnThrow.java	Thu Sep 01 12:22:59 2016 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 4954921 8009259
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @modules java.base/jdk.internal.ref
  *          java.base/jdk.internal.misc
  * @build jdk.test.lib.*
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/Asserts.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/Asserts.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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,7 +44,7 @@
  * </pre>
  *
  * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib}
+ *             {@code <root>/test/lib/jdk/test/lib}
  */
 @Deprecated
 public class Asserts {
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/JDKToolFinder.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/JDKToolFinder.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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,7 +29,7 @@
 
 /**
  * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib}
+ *             {@code <root>/test/lib/jdk/test/lib}
  */
 @Deprecated
 public final class JDKToolFinder {
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/JDKToolLauncher.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/JDKToolLauncher.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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,7 +46,7 @@
  * }
  * </pre>
  * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib}
+ *             {@code <root>/test/lib/jdk/test/lib}
  */
 @Deprecated
 public class JDKToolLauncher {
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/OutputAnalyzer.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/OutputAnalyzer.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,7 @@
  * Utility class for verifying output and exit value from a {@code Process}.
  *
  * @deprecated  This class is deprecated. Use the one from
- *              {@code <root>/test/lib/share/classes/jdk/test/lib/process}
+ *              {@code <root>/test/lib/jdk/test/lib/process}
  *
  */
 @Deprecated
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/OutputBuffer.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/OutputBuffer.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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,7 +30,7 @@
 
 /**
  * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib/process}
+ *             {@code <root>/test/lib/jdk/test/lib/process}
  */
 @Deprecated
 class OutputBuffer {
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/Platform.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/Platform.java	Thu Sep 01 12:22:59 2016 -0700
@@ -29,7 +29,7 @@
 
 /**
  * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib}
+ *             {@code <root>/test/lib/jdk/test/lib}
  */
 @Deprecated
 public class Platform {
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,7 @@
 
 /**
  * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib/process}
+ *             {@code <root>/test/lib/jdk/test/lib/process}
  */
 @Deprecated
 public final class ProcessTools {
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/StreamPumper.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/StreamPumper.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,7 @@
 
 /**
  * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib/process}
+ *             {@code <root>/test/lib/jdk/test/lib/process}
  */
 @Deprecated
 public final class StreamPumper implements Runnable {
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,7 @@
  * Common library for various test helper functions.
  *
  * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib}
+ *             {@code <root>/test/lib/jdk/test/lib}
  */
 @Deprecated
 public final class Utils {
--- a/jdk/test/sun/jvmstat/monitor/MonitoredVm/TestPollingInterval.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/sun/jvmstat/monitor/MonitoredVm/TestPollingInterval.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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,7 +42,7 @@
  * @summary setInterval() for local MonitoredHost and local MonitoredVm
  * @modules jdk.jvmstat/sun.jvmstat.monitor
  * @library /lib/testlibrary
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @build jdk.testlibrary.*
  * @build jdk.test.lib.apps.*
  * @run main TestPollingInterval
--- a/jdk/test/sun/misc/SunMiscSignalTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/sun/misc/SunMiscSignalTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -43,7 +43,7 @@
 
 /*
  * @test
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @modules jdk.unsupported
  *          java.base/jdk.internal.misc
  * @build jdk.test.lib.Platform jdk.test.lib.Utils
--- a/jdk/test/sun/security/krb5/auto/Unreachable.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/sun/security/krb5/auto/Unreachable.java	Thu Sep 01 12:22:59 2016 -0700
@@ -23,31 +23,108 @@
 
 /*
  * @test
- * @bug 7162687
+ * @bug 7162687 8015595
  * @key intermittent
  * @summary enhance KDC server availability detection
  * @compile -XDignore.symbol.file Unreachable.java
- * @run main/othervm/timeout=10 Unreachable
+ * @run main/othervm Unreachable
  */
-
-import java.io.File;
+import java.net.PortUnreachableException;
+import java.net.SocketTimeoutException;
+import java.net.DatagramPacket;
+import java.net.DatagramSocket;
+import java.net.InetSocketAddress;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.concurrent.Executors;
 import javax.security.auth.login.LoginException;
 import sun.security.krb5.Config;
 
 public class Unreachable {
 
+    // Wait for 20 second until unreachable KDC throws PortUnreachableException.
+    private static final int TIMEOUT = 20;
+    private static final String REALM = "RABBIT.HOLE";
+    private static final String HOST = "127.0.0.1";
+    private static final int PORT = 13434;
+    private static final String KRB_CONF = "unreachable.krb5.conf";
+
     public static void main(String[] args) throws Exception {
-        File f = new File(
-                System.getProperty("test.src", "."), "unreachable.krb5.conf");
-        System.setProperty("java.security.krb5.conf", f.getPath());
-        Config.refresh();
 
-        // If PortUnreachableException is not received, the login will consume
-        // about 3*3*30 seconds and the test will timeout.
+        // - Only PortUnreachableException will allow to continue execution.
+        // - SocketTimeoutException may occur on Mac because it will not throw
+        // PortUnreachableException for unreachable port in which case the Test
+        // execution will be skipped.
+        // - For Reachable port, the Test execution will get skipped.
+        // - Any other Exception will be treated as Test failure.
+        if (!findPortUnreachableExc()) {
+            System.out.println(String.format("WARNING: Either a reachable "
+                    + "connection found to %s:%s or SocketTimeoutException "
+                    + "occured which means PortUnreachableException not thrown"
+                    + " by the platform.", HOST, PORT));
+            return;
+        }
+        KDC kdc = KDC.existing(REALM, HOST, PORT);
+        KDC.saveConfig(KRB_CONF, kdc);
+        ExecutorService executor = Executors.newSingleThreadExecutor();
+        Future<Exception> future = executor.submit(new Callable<Exception>() {
+            @Override
+            public Exception call() {
+                System.setProperty("java.security.krb5.conf", KRB_CONF);
+                try {
+                    Config.refresh();
+                    // If PortUnreachableException is not received, the login
+                    // will consume about 3*3*30 seconds and the test will
+                    // timeout.
+                    try {
+                        Context.fromUserPass("name", "pass".toCharArray(), true);
+                    } catch (LoginException le) {
+                        // This is OK
+                    }
+                    System.out.println("Execution successful.");
+                } catch (Exception e) {
+                    return e;
+                }
+                return null;
+            }
+        });
         try {
-            Context.fromUserPass("name", "pass".toCharArray(), true);
-        } catch (LoginException le) {
-            // This is OK
+            Exception ex = null;
+            if ((ex = future.get(TIMEOUT, TimeUnit.SECONDS)) != null) {
+                throw new RuntimeException(ex);
+            }
+        } catch (TimeoutException e) {
+            future.cancel(true);
+            throw new RuntimeException("PortUnreachableException not thrown.");
+        } finally {
+            executor.shutdownNow();
         }
     }
+
+    /**
+     * If the remote destination to which the socket is connected does not
+     * exist, or is otherwise unreachable, and if an ICMP destination unreachable
+     * packet has been received for that address, then a subsequent call to
+     * send or receive may throw a PortUnreachableException. Note, there is no
+     * guarantee that the exception will be thrown.
+     */
+    private static boolean findPortUnreachableExc() throws Exception {
+        try {
+            InetSocketAddress iaddr = new InetSocketAddress(HOST, PORT);
+            DatagramSocket dgSocket = new DatagramSocket();
+            dgSocket.setSoTimeout(5000);
+            dgSocket.connect(iaddr);
+            byte[] data = new byte[]{};
+            dgSocket.send(new DatagramPacket(data, data.length, iaddr));
+            dgSocket.receive(new DatagramPacket(data, data.length));
+        } catch (PortUnreachableException e) {
+            return true;
+        } catch (SocketTimeoutException e) {
+            return false;
+        }
+        return false;
+    }
 }
--- a/jdk/test/sun/security/krb5/auto/unreachable.krb5.conf	Thu Sep 01 22:17:48 2016 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-[libdefaults]
-   default_realm = RABBIT.HOLE
-[realms]
-
-RABBIT.HOLE = {
-   kdc = 127.0.0.1:13434
-   kdc = 127.0.0.1:13435
-   kdc = 127.0.0.1:13436
-}
--- a/jdk/test/sun/security/provider/SecureRandom/AutoReseed.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/sun/security/provider/SecureRandom/AutoReseed.java	Thu Sep 01 12:22:59 2016 -0700
@@ -20,6 +20,7 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
+
 import java.security.SecureRandom;
 import java.security.Security;
 
@@ -27,15 +28,15 @@
  * @test
  * @bug 8051408
  * @summary make sure nextBytes etc can be called before setSeed
+ * @run main/othervm -Djava.security.egd=file:/dev/urandom AutoReseed
  */
 public class AutoReseed {
 
     public static void main(String[] args) throws Exception {
         SecureRandom sr;
-        String old = Security.getProperty("securerandom.drbg.config");
-        try {
-            for (String mech :
-                    new String[]{"Hash_DRBG", "HMAC_DRBG", "CTR_DRBG"}) {
+        boolean pass = true;
+        for (String mech : new String[]{"Hash_DRBG", "HMAC_DRBG", "CTR_DRBG"}) {
+            try {
                 System.out.println("Testing " + mech + "...");
                 Security.setProperty("securerandom.drbg.config", mech);
 
@@ -46,9 +47,13 @@
                 sr.reseed();
                 sr = SecureRandom.getInstance("DRBG");
                 sr.generateSeed(10);
+            } catch (Exception e) {
+                pass = false;
+                e.printStackTrace(System.out);
             }
-        } finally {
-            Security.setProperty("securerandom.drbg.config", old);
+        }
+        if (!pass) {
+            throw new RuntimeException("At least one test case failed");
         }
     }
 }
--- a/jdk/test/sun/security/ssl/SSLContextImpl/TrustTrustedCert.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/sun/security/ssl/SSLContextImpl/TrustTrustedCert.java	Thu Sep 01 12:22:59 2016 -0700
@@ -30,12 +30,13 @@
 
 /*
  * @test
- * @bug 7113275
+ * @bug 7113275 8164846
  * @summary compatibility issue with MD2 trust anchor and old X509TrustManager
- * @run main/othervm TrustTrustedCert PKIX TLSv1.1
- * @run main/othervm TrustTrustedCert SunX509 TLSv1.1
- * @run main/othervm TrustTrustedCert PKIX TLSv1.2
- * @run main/othervm TrustTrustedCert SunX509 TLSv1.2
+ * @run main/othervm TrustTrustedCert PKIX TLSv1.1 true
+ * @run main/othervm TrustTrustedCert PKIX TLSv1.1 false
+ * @run main/othervm TrustTrustedCert SunX509 TLSv1.1 false
+ * @run main/othervm TrustTrustedCert PKIX TLSv1.2 false
+ * @run main/othervm TrustTrustedCert SunX509 TLSv1.2 false
  */
 
 import java.net.*;
@@ -181,23 +182,32 @@
             Thread.sleep(50);
         }
 
-        SSLContext context = generateSSLContext();
-        SSLSocketFactory sslsf = context.getSocketFactory();
+        SSLSocket sslSocket = null;
+        try {
+            SSLContext context = generateSSLContext();
+            SSLSocketFactory sslsf = context.getSocketFactory();
 
-        SSLSocket sslSocket =
-            (SSLSocket)sslsf.createSocket("localhost", serverPort);
+            sslSocket = (SSLSocket)sslsf.createSocket("localhost", serverPort);
 
-        // enable the specified TLS protocol
-        sslSocket.setEnabledProtocols(new String[] {tlsProtocol});
+            // enable the specified TLS protocol
+            sslSocket.setEnabledProtocols(new String[] {tlsProtocol});
 
-        InputStream sslIS = sslSocket.getInputStream();
-        OutputStream sslOS = sslSocket.getOutputStream();
-
-        sslOS.write('B');
-        sslOS.flush();
-        sslIS.read();
-
-        sslSocket.close();
+            InputStream sslIS = sslSocket.getInputStream();
+            OutputStream sslOS = sslSocket.getOutputStream();
+            sslOS.write('B');
+            sslOS.flush();
+            sslIS.read();
+        } catch (SSLHandshakeException e) {
+            // focus in on the CertPathValidatorException
+            Throwable t = e.getCause().getCause();
+            if ((t == null) || (expectFail &&
+                !t.toString().contains("MD5withRSA"))) {
+                throw new RuntimeException(
+                    "Expected to see MD5withRSA in exception output " + t);
+            }
+        } finally {
+            if (sslSocket != null) sslSocket.close();
+        }
     }
 
     /*
@@ -206,10 +216,13 @@
      */
     private static String tmAlgorithm;        // trust manager
     private static String tlsProtocol;        // trust manager
+    // set this flag to test context of CertificateException
+    private static boolean expectFail;
 
     private static void parseArguments(String[] args) {
         tmAlgorithm = args[0];
         tlsProtocol = args[1];
+        expectFail = Boolean.parseBoolean(args[2]);
     }
 
     private static SSLContext generateSSLContext() throws Exception {
@@ -232,7 +245,7 @@
 
         // generate the private key.
         PKCS8EncodedKeySpec priKeySpec = new PKCS8EncodedKeySpec(
-                                Base64.getMimeDecoder().decode(targetPrivateKey));
+                            Base64.getMimeDecoder().decode(targetPrivateKey));
         KeyFactory kf = KeyFactory.getInstance("RSA");
         RSAPrivateKey priKey =
                 (RSAPrivateKey)kf.generatePrivate(priKeySpec);
@@ -338,9 +351,19 @@
     volatile Exception clientException = null;
 
     public static void main(String[] args) throws Exception {
-        // MD5 is used in this test case, don't disable MD5 algorithm.
-        Security.setProperty("jdk.certpath.disabledAlgorithms",
+        /*
+         * Get the customized arguments.
+         */
+        parseArguments(args);
+
+        /*
+         * MD5 is used in this test case, don't disable MD5 algorithm.
+         * if expectFail is set, we're testing exception message
+         */
+        if (!expectFail) {
+            Security.setProperty("jdk.certpath.disabledAlgorithms",
                 "MD2, RSA keySize < 1024");
+        }
         Security.setProperty("jdk.tls.disabledAlgorithms",
                 "SSLv3, RC4, DH keySize < 768");
 
@@ -348,11 +371,6 @@
             System.setProperty("javax.net.debug", "all");
 
         /*
-         * Get the customized arguments.
-         */
-        parseArguments(args);
-
-        /*
          * Start the tests.
          */
         new TrustTrustedCert();
@@ -376,7 +394,8 @@
                 startServer(false);
             }
         } catch (Exception e) {
-            // swallow for now.  Show later
+            System.out.println("Unexpected exception: ");
+            e.printStackTrace();
         }
 
         /*
@@ -440,7 +459,11 @@
                          */
                         System.err.println("Server died...");
                         serverReady = true;
-                        serverException = e;
+                        if (!expectFail) {
+                            // only record if we weren't expecting.
+                            // client side will record exception
+                            serverException = e;
+                        }
                     }
                 }
             };
@@ -449,7 +472,11 @@
             try {
                 doServerSide();
             } catch (Exception e) {
-                serverException = e;
+                // only record if we weren't expecting.
+                // client side will record exception
+                if (!expectFail) {
+                    serverException = e;
+                }
             } finally {
                 serverReady = true;
             }
--- a/jdk/test/sun/security/tools/jarsigner/AltProvider.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/sun/security/tools/jarsigner/AltProvider.java	Thu Sep 01 12:22:59 2016 -0700
@@ -25,7 +25,7 @@
  * @test
  * @bug 4906940 8130302
  * @summary -providerPath, -providerClass, -addprovider, and -providerArg
- * @library /lib/testlibrary /test/lib/share/classes
+ * @library /lib/testlibrary /test/lib
  * @modules java.base/jdk.internal.misc
  */
 
--- a/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @summary Basic test for jhsdb launcher
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @library /lib/testlibrary
  * @build jdk.testlibrary.*
  * @build jdk.test.lib.apps.*
--- a/jdk/test/sun/tools/jhsdb/heapconfig/JMapHeapConfigTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/sun/tools/jhsdb/heapconfig/JMapHeapConfigTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,7 @@
  * @bug 8042397
  * @summary Unit test for jmap utility test heap configuration reader
  * @modules jdk.hotspot.agent/sun.jvm.hotspot
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @library /lib/testlibrary
  * @build jdk.testlibrary.*
  * @build jdk.test.lib.apps.*
--- a/jdk/test/sun/tools/jinfo/JInfoTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/sun/tools/jinfo/JInfoTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -37,7 +37,7 @@
  * @test
  * @summary Unit test for jinfo utility
  * @modules java.base/jdk.internal.misc
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @build jdk.test.lib.*
  * @build jdk.test.lib.apps.*
  * @build jdk.test.lib.process.*
--- a/jdk/test/sun/tools/jmap/BasicJMapTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/sun/tools/jmap/BasicJMapTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -37,7 +37,7 @@
  * @summary Unit test for jmap utility
  * @key intermittent
  * @library /lib/testlibrary
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @build jdk.testlibrary.*
  * @build jdk.test.lib.hprof.*
  * @build jdk.test.lib.hprof.model.*
--- a/jdk/test/sun/tools/jps/TestJpsSanity.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/sun/tools/jps/TestJpsSanity.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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,7 +29,7 @@
  * @test
  * @summary This test verifies jps usage and checks that appropriate error message is shown
  *          when running jps with illegal arguments.
- * @library /lib/testlibrary /test/lib/share/classes
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.jartool/sun.tools.jar
  *          java.management
  *          java.base/jdk.internal.misc
--- a/jdk/test/sun/tools/jstack/DeadlockDetectionTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/sun/tools/jstack/DeadlockDetectionTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,7 @@
 /*
  * @test
  * @summary Test deadlock detection
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @library /lib/testlibrary
  * @build jdk.testlibrary.*
  * @build jdk.test.lib.apps.*
--- a/jdk/test/tools/jar/multiRelease/Basic.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/tools/jar/multiRelease/Basic.java	Thu Sep 01 12:22:59 2016 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @build jdk.test.lib.JDKToolFinder jdk.test.lib.Platform
  * @run testng Basic
--- a/jdk/test/tools/jlink/plugins/GenerateJLIClassesPluginTest.java	Thu Sep 01 22:17:48 2016 +0300
+++ b/jdk/test/tools/jlink/plugins/GenerateJLIClassesPluginTest.java	Thu Sep 01 12:22:59 2016 -0700
@@ -22,6 +22,7 @@
  */
 
 import java.nio.file.Path;
+import java.util.Collection;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -75,7 +76,7 @@
 
     }
 
-    private static List<String> classFilesForSpecies(List<String> species) {
+    private static List<String> classFilesForSpecies(Collection<String> species) {
         return species.stream()
                 .map(s -> "/java.base/java/lang/invoke/BoundMethodHandle$Species_" + s + ".class")
                 .collect(Collectors.toList());