changeset 9747:f2cdf8449ee9

Merge
author henryjen
date Fri, 13 Sep 2013 18:22:45 -0700
parents 87137cd5a1e4 eea685b9ccaa
children f8f9bca58a86
files .hgtags src/share/classes/java/lang/AbstractStringBuilder.java src/share/classes/java/util/ComparableTimSort.java src/share/classes/java/util/TimSort.java src/share/classes/java/util/TreeMap.java src/share/classes/java/util/concurrent/locks/StampedLock.java src/share/classes/java/util/logging/Logger.java src/share/classes/java/util/regex/Pattern.java src/share/classes/sun/misc/Compare.java src/share/classes/sun/misc/Sort.java src/share/lib/security/java.security-linux src/share/native/common/check_code.c test/ProblemList.txt test/java/util/Random/RandomTest.java test/java/util/SplittableRandom/SplittableRandomTest.java test/java/util/concurrent/ThreadLocalRandom/ThreadLocalRandomTest.java test/java/util/regex/RegExTest.java
diffstat 108 files changed, 1765 insertions(+), 690 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Thu Sep 12 15:55:50 2013 -0700
+++ b/.hgtags	Fri Sep 13 18:22:45 2013 -0700
@@ -230,3 +230,5 @@
 8ed8e2b4b90e0ac9aa5b3efef51cd576a9db96a9 jdk8-b102
 e0f6039c0290b7381042a6fec3100a69a5a67e37 jdk8-b103
 f1d8d15bfcb5ada858a942f8a31f6598f23214d1 jdk8-b104
+1fe211ae3d2b8cc2dfc4f58d9a6eb96418679672 jdk8-b105
+c817276bd870dfe1dcc3a3dbbc092436b6907f75 jdk8-b106
--- a/make/com/sun/security/auth/FILES_java.gmk	Thu Sep 12 15:55:50 2013 -0700
+++ b/make/com/sun/security/auth/FILES_java.gmk	Fri Sep 13 18:22:45 2013 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 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
@@ -43,8 +43,6 @@
 	com/sun/security/auth/UserPrincipal.java \
 	com/sun/security/auth/LdapPrincipal.java \
 	com/sun/security/auth/PolicyFile.java \
-	com/sun/security/auth/SubjectCodeSource.java \
-	com/sun/security/auth/PolicyParser.java \
 	com/sun/security/auth/PrincipalComparator.java \
 	com/sun/security/auth/callback/TextCallbackHandler.java \
 	com/sun/security/auth/callback/DialogCallbackHandler.java
--- a/src/macosx/classes/sun/nio/ch/KQueueArrayWrapper.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/macosx/classes/sun/nio/ch/KQueueArrayWrapper.java	Fri Sep 13 18:22:45 2013 -0700
@@ -87,6 +87,7 @@
     private int incomingInterruptFD;
 
     static {
+        IOUtil.load();
         initStructSizes();
         String datamodel = java.security.AccessController.doPrivileged(
             new sun.security.action.GetPropertyAction("sun.arch.data.model")
--- a/src/macosx/classes/sun/nio/ch/KQueueSelectorImpl.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/macosx/classes/sun/nio/ch/KQueueSelectorImpl.java	Fri Sep 13 18:22:45 2013 -0700
@@ -246,9 +246,4 @@
         }
         return this;
     }
-
-
-    static {
-        Util.load();
-    }
 }
--- a/src/share/back/SDE.c	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/back/SDE.c	Fri Sep 13 18:22:45 2013 -0700
@@ -28,6 +28,12 @@
 #include "util.h"
 #include "SDE.h"
 
+#ifdef __APPLE__
+/* use setjmp/longjmp versions that do not save/restore the signal mask */
+#define setjmp _setjmp
+#define longjmp _longjmp
+#endif
+
 /**
  * This SourceDebugExtension code does not
  * allow concurrent translation - due to caching method.
--- a/src/share/classes/com/sun/tools/attach/VirtualMachine.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/com/sun/tools/attach/VirtualMachine.java	Fri Sep 13 18:22:45 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -59,7 +59,7 @@
  * {@link java.lang.instrument} for a detailed description on how these agents
  * are loaded and started). The {@link #loadAgentLibrary loadAgentLibrary} and
  * {@link #loadAgentPath loadAgentPath} methods are used to load agents that
- * are deployed in a dynamic library and make use of the <a
+ * are deployed either in a dynamic library or statically linked into the VM and make use of the <a
  * href="../../../../../../../../technotes/guides/jvmti/index.html">JVM Tools
  * Interface</a>. </p>
  *
@@ -298,25 +298,29 @@
      * <p> A <a href="../../../../../../../../technotes/guides/jvmti/index.html">JVM
      * TI</a> client is called an <i>agent</i>. It is developed in a native language.
      * A JVM TI agent is deployed in a platform specific manner but it is typically the
-     * platform equivalent of a dynamic library. This method causes the given agent
-     * library to be loaded into the target VM (if not already loaded).
+     * platform equivalent of a dynamic library. Alternatively, it may be statically linked into the VM.
+     * This method causes the given agent library to be loaded into the target
+     * VM (if not already loaded or if not statically linked into the VM).
      * It then causes the target VM to invoke the <code>Agent_OnAttach</code> function
+     * or, for a statically linked agent named 'L', the <code>Agent_OnAttach_L</code> function
      * as specified in the
      * <a href="../../../../../../../../technotes/guides/jvmti/index.html"> JVM Tools
-     * Interface</a> specification. Note that the <code>Agent_OnAttach</code>
+     * Interface</a> specification. Note that the <code>Agent_OnAttach[_L]</code>
      * function is invoked even if the agent library was loaded prior to invoking
      * this method.
      *
      * <p> The agent library provided is the name of the agent library. It is interpreted
      * in the target virtual machine in an implementation-dependent manner. Typically an
      * implementation will expand the library name into an operating system specific file
-     * name. For example, on UNIX systems, the name <tt>foo</tt> might be expanded to
-     * <tt>libfoo.so</tt>, and located using the search path specified by the
-     * <tt>LD_LIBRARY_PATH</tt> environment variable.</p>
+     * name. For example, on UNIX systems, the name <tt>L</tt> might be expanded to
+     * <tt>libL.so</tt>, and located using the search path specified by the
+     * <tt>LD_LIBRARY_PATH</tt> environment variable. If the agent named 'L' is
+     * statically linked into the VM then the VM must export a function named
+     * <code>Agent_OnAttach_L</code>.</p>
      *
-     * <p> If the <code>Agent_OnAttach</code> function in the agent library returns
+     * <p> If the <code>Agent_OnAttach[_L]</code> function in the agent library returns
      * an error then an {@link com.sun.tools.attach.AgentInitializationException} is
-     * thrown. The return value from the <code>Agent_OnAttach</code> can then be
+     * thrown. The return value from the <code>Agent_OnAttach[_L]</code> can then be
      * obtained by invoking the {@link
      * com.sun.tools.attach.AgentInitializationException#returnValue() returnValue}
      * method on the exception. </p>
@@ -325,15 +329,16 @@
      *          The name of the agent library.
      *
      * @param   options
-     *          The options to provide to the <code>Agent_OnAttach</code>
+     *          The options to provide to the <code>Agent_OnAttach[_L]</code>
      *          function (can be <code>null</code>).
      *
      * @throws  AgentLoadException
-     *          If the agent library does not exist, or cannot be loaded for
-     *          another reason.
+     *          If the agent library does not exist, the agent library is not
+     *          statically linked with the VM, or the agent library cannot be
+     *          loaded for another reason.
      *
      * @throws  AgentInitializationException
-     *          If the <code>Agent_OnAttach</code> function returns an error
+     *          If the <code>Agent_OnAttach[_L]</code> function returns an error.
      *
      * @throws  IOException
      *          If an I/O error occurs
@@ -359,11 +364,12 @@
      *          The name of the agent library.
      *
      * @throws  AgentLoadException
-     *          If the agent library does not exist, or cannot be loaded for
-     *          another reason.
+     *          If the agent library does not exist, the agent library is not
+     *          statically linked with the VM, or the agent library cannot be
+     *          loaded for another reason.
      *
      * @throws  AgentInitializationException
-     *          If the <code>Agent_OnAttach</code> function returns an error
+     *          If the <code>Agent_OnAttach[_L]</code> function returns an error.
      *
      * @throws  IOException
      *          If an I/O error occurs
@@ -383,12 +389,23 @@
      * <p> A <a href="../../../../../../../../technotes/guides/jvmti/index.html">JVM
      * TI</a> client is called an <i>agent</i>. It is developed in a native language.
      * A JVM TI agent is deployed in a platform specific manner but it is typically the
-     * platform equivalent of a dynamic library. This method causes the given agent
-     * library to be loaded into the target VM (if not already loaded).
-     * It then causes the target VM to invoke the <code>Agent_OnAttach</code> function
-     * as specified in the
+     * platform equivalent of a dynamic library. Alternatively, the native
+     * library specified by the agentPath parameter may be statically
+     * linked with the VM. The parsing of the agentPath parameter into
+     * a statically linked library name is done in a platform
+     * specific manner in the VM. For example, in UNIX, an agentPath parameter
+     * of <code>/a/b/libL.so</code> would name a library 'L'.
+     *
+     * See the JVM TI Specification for more details.
+     *
+     * This method causes the given agent library to be loaded into the target
+     * VM (if not already loaded or if not statically linked into the VM).
+     * It then causes the target VM to invoke the <code>Agent_OnAttach</code>
+     * function or, for a statically linked agent named 'L', the
+     * <code>Agent_OnAttach_L</code> function as specified in the
      * <a href="../../../../../../../../technotes/guides/jvmti/index.html"> JVM Tools
-     * Interface</a> specification. Note that the <code>Agent_OnAttach</code>
+     * Interface</a> specification.
+     * Note that the <code>Agent_OnAttach[_L]</code>
      * function is invoked even if the agent library was loaded prior to invoking
      * this method.
      *
@@ -396,9 +413,9 @@
      * agent library. Unlike {@link #loadAgentLibrary loadAgentLibrary}, the library name
      * is not expanded in the target virtual machine. </p>
      *
-     * <p> If the <code>Agent_OnAttach</code> function in the agent library returns
+     * <p> If the <code>Agent_OnAttach[_L]</code> function in the agent library returns
      * an error then an {@link com.sun.tools.attach.AgentInitializationException} is
-     * thrown. The return value from the <code>Agent_OnAttach</code> can then be
+     * thrown. The return value from the <code>Agent_OnAttach[_L]</code> can then be
      * obtained by invoking the {@link
      * com.sun.tools.attach.AgentInitializationException#returnValue() returnValue}
      * method on the exception. </p>
@@ -407,15 +424,16 @@
      *          The full path of the agent library.
      *
      * @param   options
-     *          The options to provide to the <code>Agent_OnAttach</code>
+     *          The options to provide to the <code>Agent_OnAttach[_L]</code>
      *          function (can be <code>null</code>).
      *
      * @throws  AgentLoadException
-     *          If the agent library does not exist, or cannot be loaded for
-     *          another reason.
+     *          If the agent library does not exist, the agent library is not
+     *          statically linked with the VM, or the agent library cannot be
+     *          loaded for another reason.
      *
      * @throws  AgentInitializationException
-     *          If the <code>Agent_OnAttach</code> function returns an error
+     *          If the <code>Agent_OnAttach[_L]</code> function returns an error.
      *
      * @throws  IOException
      *          If an I/O error occurs
@@ -441,11 +459,12 @@
      *          The full path to the agent library.
      *
      * @throws  AgentLoadException
-     *          If the agent library does not exist, or cannot be loaded for
-     *          another reason.
+     *          If the agent library does not exist, the agent library is not
+     *          statically linked with the VM, or the agent library cannot be
+     *          loaded for another reason.
      *
      * @throws  AgentInitializationException
-     *          If the <code>Agent_OnAttach</code> function returns an error
+     *          If the <code>Agent_OnAttach[_L]</code> function returns an error.
      *
      * @throws  IOException
      *          If an I/O error occurs
--- a/src/share/classes/java/io/BufferedInputStream.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/java/io/BufferedInputStream.java	Fri Sep 13 18:22:45 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 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
@@ -50,7 +50,15 @@
 public
 class BufferedInputStream extends FilterInputStream {
 
-    private static int defaultBufferSize = 8192;
+    private static int DEFAULT_BUFFER_SIZE = 8192;
+
+    /**
+     * The maximum size of array to allocate.
+     * Some VMs reserve some header words in an array.
+     * Attempts to allocate larger arrays may result in
+     * OutOfMemoryError: Requested array size exceeds VM limit
+     */
+    private static int MAX_BUFFER_SIZE = Integer.MAX_VALUE - 8;
 
     /**
      * The internal buffer array where the data is stored. When necessary,
@@ -172,7 +180,7 @@
      * @param   in   the underlying input stream.
      */
     public BufferedInputStream(InputStream in) {
-        this(in, defaultBufferSize);
+        this(in, DEFAULT_BUFFER_SIZE);
     }
 
     /**
@@ -215,8 +223,11 @@
             } else if (buffer.length >= marklimit) {
                 markpos = -1;   /* buffer got too big, invalidate mark */
                 pos = 0;        /* drop buffer contents */
+            } else if (buffer.length >= MAX_BUFFER_SIZE) {
+                throw new OutOfMemoryError("Required array size too large");
             } else {            /* grow buffer */
-                int nsz = pos * 2;
+                int nsz = (pos <= MAX_BUFFER_SIZE - pos) ?
+                        pos * 2 : MAX_BUFFER_SIZE;
                 if (nsz > marklimit)
                     nsz = marklimit;
                 byte nbuf[] = new byte[nsz];
--- a/src/share/classes/java/lang/AbstractStringBuilder.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/java/lang/AbstractStringBuilder.java	Fri Sep 13 18:22:45 2013 -0700
@@ -1307,7 +1307,7 @@
      * specified substring, starting at the specified index.  The integer
      * returned is the smallest value {@code k} for which:
      * <blockquote><pre>
-     *     k >= Math.min(fromIndex, str.length()) &&
+     *     k >= Math.min(fromIndex, this.length()) &&
      *                   this.toString().startsWith(str, k)
      * </pre></blockquote>
      * If no such value of <i>k</i> exists, then -1 is returned.
@@ -1346,7 +1346,7 @@
      * specified substring. The integer returned is the largest value <i>k</i>
      * such that:
      * <blockquote><pre>
-     *     k <= Math.min(fromIndex, str.length()) &&
+     *     k <= Math.min(fromIndex, this.length()) &&
      *                   this.toString().startsWith(str, k)
      * </pre></blockquote>
      * If no such value of <i>k</i> exists, then -1 is returned.
--- a/src/share/classes/java/lang/Class.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/java/lang/Class.java	Fri Sep 13 18:22:45 2013 -0700
@@ -3338,8 +3338,16 @@
      * @since 1.8
      */
     public AnnotatedType getAnnotatedSuperclass() {
-         return TypeAnnotationParser.buildAnnotatedSuperclass(getRawTypeAnnotations(), getConstantPool(), this);
-}
+        if (this == Object.class ||
+                isInterface() ||
+                isArray() ||
+                isPrimitive() ||
+                this == Void.TYPE) {
+            return null;
+        }
+
+        return TypeAnnotationParser.buildAnnotatedSuperclass(getRawTypeAnnotations(), getConstantPool(), this);
+    }
 
     /**
      * Returns an array of AnnotatedType objects that represent the use of types to
--- a/src/share/classes/java/lang/Math.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/java/lang/Math.java	Fri Sep 13 18:22:45 2013 -0700
@@ -698,11 +698,8 @@
             return 0;
     }
 
-    private static Random randomNumberGenerator;
-
-    private static synchronized Random initRNG() {
-        Random rnd = randomNumberGenerator;
-        return (rnd == null) ? (randomNumberGenerator = new Random()) : rnd;
+    private static final class RandomNumberGeneratorHolder {
+        static final Random randomNumberGenerator = new Random();
     }
 
     /**
@@ -729,9 +726,7 @@
      * @see Random#nextDouble()
      */
     public static double random() {
-        Random rnd = randomNumberGenerator;
-        if (rnd == null) rnd = initRNG();
-        return rnd.nextDouble();
+        return RandomNumberGeneratorHolder.randomNumberGenerator.nextDouble();
     }
 
     /**
--- a/src/share/classes/java/lang/ProcessBuilder.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/java/lang/ProcessBuilder.java	Fri Sep 13 18:22:45 2013 -0700
@@ -29,7 +29,6 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.security.AccessControlException;
 import java.util.Arrays;
 import java.util.ArrayList;
 import java.util.List;
@@ -1033,9 +1032,9 @@
                 // Can not disclose the fail reason for read-protected files.
                 try {
                     security.checkRead(prog);
-                } catch (AccessControlException ace) {
+                } catch (SecurityException se) {
                     exceptionInfo = "";
-                    cause = ace;
+                    cause = se;
                 }
             }
             // It's much easier for us to create a high-quality error
--- a/src/share/classes/java/lang/StrictMath.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/java/lang/StrictMath.java	Fri Sep 13 18:22:45 2013 -0700
@@ -678,11 +678,8 @@
         return Math.round(a);
     }
 
-    private static Random randomNumberGenerator;
-
-    private static synchronized Random initRNG() {
-        Random rnd = randomNumberGenerator;
-        return (rnd == null) ? (randomNumberGenerator = new Random()) : rnd;
+    private static final class RandomNumberGeneratorHolder {
+        static final Random randomNumberGenerator = new Random();
     }
 
     /**
@@ -709,9 +706,7 @@
      * @see Random#nextDouble()
      */
     public static double random() {
-        Random rnd = randomNumberGenerator;
-        if (rnd == null) rnd = initRNG();
-        return rnd.nextDouble();
+        return RandomNumberGeneratorHolder.randomNumberGenerator.nextDouble();
     }
 
     /**
--- a/src/share/classes/java/math/BigDecimal.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/java/math/BigDecimal.java	Fri Sep 13 18:22:45 2013 -0700
@@ -2659,28 +2659,32 @@
         if (ys == 0)
             return 1;
 
-        int sdiff = this.scale - val.scale;
+        long sdiff = (long)this.scale - val.scale;
         if (sdiff != 0) {
             // Avoid matching scales if the (adjusted) exponents differ
-            int xae = this.precision() - this.scale;   // [-1]
-            int yae = val.precision() - val.scale;     // [-1]
+            long xae = (long)this.precision() - this.scale;   // [-1]
+            long yae = (long)val.precision() - val.scale;     // [-1]
             if (xae < yae)
                 return -1;
             if (xae > yae)
                 return 1;
             BigInteger rb = null;
             if (sdiff < 0) {
-                if ( (xs == INFLATED ||
-                      (xs = longMultiplyPowerTen(xs, -sdiff)) == INFLATED) &&
+                // The cases sdiff <= Integer.MIN_VALUE intentionally fall through.
+                if ( sdiff > Integer.MIN_VALUE &&
+                      (xs == INFLATED ||
+                      (xs = longMultiplyPowerTen(xs, (int)-sdiff)) == INFLATED) &&
                      ys == INFLATED) {
-                    rb = bigMultiplyPowerTen(-sdiff);
+                    rb = bigMultiplyPowerTen((int)-sdiff);
                     return rb.compareMagnitude(val.intVal);
                 }
             } else { // sdiff > 0
-                if ( (ys == INFLATED ||
-                      (ys = longMultiplyPowerTen(ys, sdiff)) == INFLATED) &&
+                // The cases sdiff > Integer.MAX_VALUE intentionally fall through.
+                if ( sdiff <= Integer.MAX_VALUE &&
+                      (ys == INFLATED ||
+                      (ys = longMultiplyPowerTen(ys, (int)sdiff)) == INFLATED) &&
                      xs == INFLATED) {
-                    rb = val.bigMultiplyPowerTen(sdiff);
+                    rb = val.bigMultiplyPowerTen((int)sdiff);
                     return this.intVal.compareMagnitude(rb);
                 }
             }
@@ -4545,7 +4549,7 @@
         if(cmp > 0) { // satisfy constraint (b)
             yscale -= 1; // [that is, divisor *= 10]
             int scl = checkScaleNonZero(preferredScale + yscale - xscale + mcp);
-            if (checkScaleNonZero((long) mcp + yscale) > xscale) {
+            if (checkScaleNonZero((long) mcp + yscale - xscale) > 0) {
                 // assert newScale >= xscale
                 int raise = checkScaleNonZero((long) mcp + yscale - xscale);
                 long scaledXs;
@@ -4626,7 +4630,7 @@
         // return BigDecimal object whose scale will be set to 'scl'.
         int scl = checkScaleNonZero(preferredScale + yscale - xscale + mcp);
         BigDecimal quotient;
-        if (checkScaleNonZero((long) mcp + yscale) > xscale) {
+        if (checkScaleNonZero((long) mcp + yscale - xscale) > 0) {
             int raise = checkScaleNonZero((long) mcp + yscale - xscale);
             long scaledXs;
             if ((scaledXs = longMultiplyPowerTen(xs, raise)) == INFLATED) {
@@ -4673,7 +4677,7 @@
         // return BigDecimal object whose scale will be set to 'scl'.
         BigDecimal quotient;
         int scl = checkScaleNonZero(preferredScale + yscale - xscale + mcp);
-        if (checkScaleNonZero((long) mcp + yscale) > xscale) {
+        if (checkScaleNonZero((long) mcp + yscale - xscale) > 0) {
             int raise = checkScaleNonZero((long) mcp + yscale - xscale);
             BigInteger rb = bigMultiplyPowerTen(xs,raise);
             quotient = divideAndRound(rb, ys, scl, roundingMode, checkScaleNonZero(preferredScale));
@@ -4714,7 +4718,7 @@
         // return BigDecimal object whose scale will be set to 'scl'.
         BigDecimal quotient;
         int scl = checkScaleNonZero(preferredScale + yscale - xscale + mcp);
-        if (checkScaleNonZero((long) mcp + yscale) > xscale) {
+        if (checkScaleNonZero((long) mcp + yscale - xscale) > 0) {
             int raise = checkScaleNonZero((long) mcp + yscale - xscale);
             BigInteger rb = bigMultiplyPowerTen(xs,raise);
             quotient = divideAndRound(rb, ys, scl, roundingMode, checkScaleNonZero(preferredScale));
@@ -4745,7 +4749,7 @@
         // return BigDecimal object whose scale will be set to 'scl'.
         BigDecimal quotient;
         int scl = checkScaleNonZero(preferredScale + yscale - xscale + mcp);
-        if (checkScaleNonZero((long) mcp + yscale) > xscale) {
+        if (checkScaleNonZero((long) mcp + yscale - xscale) > 0) {
             int raise = checkScaleNonZero((long) mcp + yscale - xscale);
             BigInteger rb = bigMultiplyPowerTen(xs,raise);
             quotient = divideAndRound(rb, ys, scl, roundingMode, checkScaleNonZero(preferredScale));
--- a/src/share/classes/java/math/BigInteger.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/java/math/BigInteger.java	Fri Sep 13 18:22:45 2013 -0700
@@ -2109,7 +2109,7 @@
         // This is a quick way to approximate the size of the result,
         // similar to doing log2[n] * exponent.  This will give an upper bound
         // of how big the result can be, and which algorithm to use.
-        int scaleFactor = remainingBits * exponent;
+        long scaleFactor = (long)remainingBits * exponent;
 
         // Use slightly different algorithms for small and large operands.
         // See if the result will safely fit into a long. (Largest 2^63-1)
--- a/src/share/classes/java/rmi/server/RMISocketFactory.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/java/rmi/server/RMISocketFactory.java	Fri Sep 13 18:22:45 2013 -0700
@@ -50,13 +50,13 @@
  * @implNote
  * <p>You can use the {@code RMISocketFactory} class to create a server socket that
  * is bound to a specific address, restricting the origin of requests. For example,
- * the following code implements a socket factory that binds server sockets to the
+ * the following code implements a socket factory that binds server sockets to an IPv4
  * loopback address. This restricts RMI to processing requests only from the local host.
  *
  * <pre>{@code
  *     class LoopbackSocketFactory extends RMISocketFactory {
  *         public ServerSocket createServerSocket(int port) throws IOException {
- *             return new ServerSocket(port, 5, InetAddress.getLoopbackAddress());
+ *             return new ServerSocket(port, 5, InetAddress.getByName("127.0.0.1"));
  *         }
  *
  *         public Socket createSocket(String host, int port) throws IOException {
@@ -72,8 +72,8 @@
  * }</pre>
  *
  * Set the {@code java.rmi.server.hostname} system property
- * to a host name (typically {@code localhost}) that resolves to the loopback
- * interface to ensure that the generated stubs use the right network interface.
+ * to {@code 127.0.0.1} to ensure that the generated stubs connect to the right
+ * network interface.
  *
  * @author  Ann Wollrath
  * @author  Peter Jones
--- a/src/share/classes/java/util/ComparableTimSort.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/java/util/ComparableTimSort.java	Fri Sep 13 18:22:45 2013 -0700
@@ -1,4 +1,5 @@
 /*
+ * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2009 Google Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -146,7 +147,7 @@
          */
         int stackLen = (len <    120  ?  5 :
                         len <   1542  ? 10 :
-                        len < 119151  ? 19 : 40);
+                        len < 119151  ? 24 : 40);
         runBase = new int[stackLen];
         runLen = new int[stackLen];
     }
--- a/src/share/classes/java/util/TimSort.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/java/util/TimSort.java	Fri Sep 13 18:22:45 2013 -0700
@@ -1,4 +1,5 @@
 /*
+ * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2009 Google Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -176,7 +177,7 @@
          */
         int stackLen = (len <    120  ?  5 :
                         len <   1542  ? 10 :
-                        len < 119151  ? 19 : 40);
+                        len < 119151  ? 24 : 40);
         runBase = new int[stackLen];
         runLen = new int[stackLen];
     }
--- a/src/share/classes/java/util/TreeMap.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/java/util/TreeMap.java	Fri Sep 13 18:22:45 2013 -0700
@@ -973,6 +973,27 @@
     }
 
     @Override
+    public boolean replace(K key, V oldValue, V newValue) {
+        Entry<K,V> p = getEntry(key);
+        if (p!=null && Objects.equals(oldValue, p.value)) {
+            p.value = newValue;
+            return true;
+        }
+        return false;
+    }
+
+    @Override
+    public V replace(K key, V value) {
+        Entry<K,V> p = getEntry(key);
+        if (p!=null) {
+            V oldValue = p.value;
+            p.value = value;
+            return oldValue;
+        }
+        return null;
+    }
+
+    @Override
     public void forEach(BiConsumer<? super K, ? super V> action) {
         Objects.requireNonNull(action);
         int expectedModCount = modCount;
--- a/src/share/classes/java/util/concurrent/locks/StampedLock.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/java/util/concurrent/locks/StampedLock.java	Fri Sep 13 18:22:45 2013 -0700
@@ -226,7 +226,11 @@
      * incoming reader arrives while read lock is held but there is a
      * queued writer, this incoming reader is queued.  (This rule is
      * responsible for some of the complexity of method acquireRead,
-     * but without it, the lock becomes highly unfair.)
+     * but without it, the lock becomes highly unfair.) Method release
+     * does not (and sometimes cannot) itself wake up cowaiters. This
+     * is done by the primary thread, but helped by any other threads
+     * with nothing better to do in methods acquireRead and
+     * acquireWrite.
      *
      * These rules apply to threads actually queued. All tryLock forms
      * opportunistically try to acquire locks regardless of preference
@@ -267,11 +271,14 @@
     /** Number of processors, for spin control */
     private static final int NCPU = Runtime.getRuntime().availableProcessors();
 
-    /** Maximum number of retries before blocking on acquisition */
+    /** Maximum number of retries before enqueuing on acquisition */
     private static final int SPINS = (NCPU > 1) ? 1 << 6 : 0;
 
+    /** Maximum number of retries before blocking at head on acquisition */
+    private static final int HEAD_SPINS = (NCPU > 1) ? 1 << 10 : 0;
+
     /** Maximum number of retries before re-blocking */
-    private static final int MAX_HEAD_SPINS = (NCPU > 1) ? 1 << 12 : 0;
+    private static final int MAX_HEAD_SPINS = (NCPU > 1) ? 1 << 16 : 0;
 
     /** The period for yielding when waiting for overflow spinlock */
     private static final int OVERFLOW_YIELD_RATE = 7; // must be power 2 - 1
@@ -415,8 +422,8 @@
      * @return a stamp that can be used to unlock or convert mode
      */
     public long readLock() {
-        long s, next;  // bypass acquireRead on fully unlocked case only
-        return ((((s = state) & ABITS) == 0L &&
+        long s = state, next;  // bypass acquireRead on common uncontended case
+        return ((whead == wtail && (s & ABITS) < RFULL &&
                  U.compareAndSwapLong(this, STATE, s, next = s + RUNIT)) ?
                 next : acquireRead(false, 0L));
     }
@@ -1012,17 +1019,8 @@
                     if (t.status <= 0)
                         q = t;
             }
-            if (q != null) {
-                for (WNode r = q;;) {  // release co-waiters too
-                    if ((w = r.thread) != null) {
-                        r.thread = null;
-                        U.unpark(w);
-                    }
-                    if ((r = q.cowait) == null)
-                        break;
-                    U.compareAndSwapObject(q, WCOWAIT, r, r.cowait);
-                }
-            }
+            if (q != null && (w = q.thread) != null)
+                U.unpark(w);
         }
     }
 
@@ -1038,22 +1036,22 @@
     private long acquireWrite(boolean interruptible, long deadline) {
         WNode node = null, p;
         for (int spins = -1;;) { // spin while enqueuing
-            long s, ns;
-            if (((s = state) & ABITS) == 0L) {
+            long m, s, ns;
+            if ((m = (s = state) & ABITS) == 0L) {
                 if (U.compareAndSwapLong(this, STATE, s, ns = s + WBIT))
                     return ns;
             }
+            else if (spins < 0)
+                spins = (m == WBIT && wtail == whead) ? SPINS : 0;
             else if (spins > 0) {
                 if (LockSupport.nextSecondarySeed() >= 0)
                     --spins;
             }
             else if ((p = wtail) == null) { // initialize queue
-                WNode h = new WNode(WMODE, null);
-                if (U.compareAndSwapObject(this, WHEAD, null, h))
-                    wtail = h;
+                WNode hd = new WNode(WMODE, null);
+                if (U.compareAndSwapObject(this, WHEAD, null, hd))
+                    wtail = hd;
             }
-            else if (spins < 0)
-                spins = (p == whead) ? SPINS : 0;
             else if (node == null)
                 node = new WNode(WMODE, p);
             else if (node.prev != p)
@@ -1064,14 +1062,18 @@
             }
         }
 
-        for (int spins = SPINS;;) {
-            WNode np, pp; int ps; long s, ns; Thread w;
-            while ((np = node.prev) != p && np != null)
-                (p = np).next = node;   // stale
-            if (whead == p) {
+        for (int spins = -1;;) {
+            WNode h, np, pp; int ps;
+            if ((h = whead) == p) {
+                if (spins < 0)
+                    spins = HEAD_SPINS;
+                else if (spins < MAX_HEAD_SPINS)
+                    spins <<= 1;
                 for (int k = spins;;) { // spin at head
+                    long s, ns;
                     if (((s = state) & ABITS) == 0L) {
-                        if (U.compareAndSwapLong(this, STATE, s, ns = s+WBIT)) {
+                        if (U.compareAndSwapLong(this, STATE, s,
+                                                 ns = s + WBIT)) {
                             whead = node;
                             node.prev = null;
                             return ns;
@@ -1081,33 +1083,45 @@
                              --k <= 0)
                         break;
                 }
-                if (spins < MAX_HEAD_SPINS)
-                    spins <<= 1;
             }
-            if ((ps = p.status) == 0)
-                U.compareAndSwapInt(p, WSTATUS, 0, WAITING);
-            else if (ps == CANCELLED) {
-                if ((pp = p.prev) != null) {
-                    node.prev = pp;
-                    pp.next = node;
+            else if (h != null) { // help release stale waiters
+                WNode c; Thread w;
+                while ((c = h.cowait) != null) {
+                    if (U.compareAndSwapObject(h, WCOWAIT, c, c.cowait) &&
+                        (w = c.thread) != null)
+                        U.unpark(w);
                 }
             }
-            else {
-                long time; // 0 argument to park means no timeout
-                if (deadline == 0L)
-                    time = 0L;
-                else if ((time = deadline - System.nanoTime()) <= 0L)
-                    return cancelWaiter(node, node, false);
-                Thread wt = Thread.currentThread();
-                U.putObject(wt, PARKBLOCKER, this); // emulate LockSupport.park
-                node.thread = wt;
-                if (node.prev == p && p.status == WAITING && // recheck
-                    (p != whead || (state & ABITS) != 0L))
-                    U.park(false, time);
-                node.thread = null;
-                U.putObject(wt, PARKBLOCKER, null);
-                if (interruptible && Thread.interrupted())
-                    return cancelWaiter(node, node, true);
+            if (whead == h) {
+                if ((np = node.prev) != p) {
+                    if (np != null)
+                        (p = np).next = node;   // stale
+                }
+                else if ((ps = p.status) == 0)
+                    U.compareAndSwapInt(p, WSTATUS, 0, WAITING);
+                else if (ps == CANCELLED) {
+                    if ((pp = p.prev) != null) {
+                        node.prev = pp;
+                        pp.next = node;
+                    }
+                }
+                else {
+                    long time; // 0 argument to park means no timeout
+                    if (deadline == 0L)
+                        time = 0L;
+                    else if ((time = deadline - System.nanoTime()) <= 0L)
+                        return cancelWaiter(node, node, false);
+                    Thread wt = Thread.currentThread();
+                    U.putObject(wt, PARKBLOCKER, this);
+                    node.thread = wt;
+                    if (p.status < 0 && (p != h || (state & ABITS) != 0L) &&
+                        whead == h && node.prev == p)
+                        U.park(false, time);  // emulate LockSupport.park
+                    node.thread = null;
+                    U.putObject(wt, PARKBLOCKER, null);
+                    if (interruptible && Thread.interrupted())
+                        return cancelWaiter(node, node, true);
+                }
             }
         }
     }
@@ -1122,138 +1136,159 @@
      * @return next state, or INTERRUPTED
      */
     private long acquireRead(boolean interruptible, long deadline) {
-        WNode node = null, group = null, p;
+        WNode node = null, p;
         for (int spins = -1;;) {
-            for (;;) {
-                long s, m, ns; WNode h, q; Thread w; // anti-barging guard
-                if (group == null && (h = whead) != null &&
-                    (q = h.next) != null && q.mode != RMODE)
-                    break;
-                if ((m = (s = state) & ABITS) < RFULL ?
-                    U.compareAndSwapLong(this, STATE, s, ns = s + RUNIT) :
-                    (m < WBIT && (ns = tryIncReaderOverflow(s)) != 0L)) {
-                    if (group != null) {  // help release others
-                        for (WNode r = group;;) {
-                            if ((w = r.thread) != null) {
-                                r.thread = null;
-                                U.unpark(w);
+            WNode h;
+            if ((h = whead) == (p = wtail)) {
+                for (long m, s, ns;;) {
+                    if ((m = (s = state) & ABITS) < RFULL ?
+                        U.compareAndSwapLong(this, STATE, s, ns = s + RUNIT) :
+                        (m < WBIT && (ns = tryIncReaderOverflow(s)) != 0L))
+                        return ns;
+                    else if (m >= WBIT) {
+                        if (spins > 0) {
+                            if (LockSupport.nextSecondarySeed() >= 0)
+                                --spins;
+                        }
+                        else {
+                            if (spins == 0) {
+                                WNode nh = whead, np = wtail;
+                                if ((nh == h && np == p) || (h = nh) != (p = np))
+                                    break;
                             }
-                            if ((r = group.cowait) == null)
-                                break;
-                            U.compareAndSwapObject(group, WCOWAIT, r, r.cowait);
+                            spins = SPINS;
                         }
                     }
-                    return ns;
                 }
-                if (m >= WBIT)
+            }
+            if (p == null) { // initialize queue
+                WNode hd = new WNode(WMODE, null);
+                if (U.compareAndSwapObject(this, WHEAD, null, hd))
+                    wtail = hd;
+            }
+            else if (node == null)
+                node = new WNode(RMODE, p);
+            else if (h == p || p.mode != RMODE) {
+                if (node.prev != p)
+                    node.prev = p;
+                else if (U.compareAndSwapObject(this, WTAIL, p, node)) {
+                    p.next = node;
                     break;
+                }
             }
-            if (spins > 0) {
-                if (LockSupport.nextSecondarySeed() >= 0)
-                    --spins;
-            }
-            else if ((p = wtail) == null) {
-                WNode h = new WNode(WMODE, null);
-                if (U.compareAndSwapObject(this, WHEAD, null, h))
-                    wtail = h;
-            }
-            else if (spins < 0)
-                spins = (p == whead) ? SPINS : 0;
-            else if (node == null)
-                node = new WNode(WMODE, p);
-            else if (node.prev != p)
-                node.prev = p;
-            else if (p.mode == RMODE && p != whead) {
-                WNode pp = p.prev;  // become co-waiter with group p
-                if (pp != null && p == wtail &&
-                    U.compareAndSwapObject(p, WCOWAIT,
-                                           node.cowait = p.cowait, node)) {
-                    node.thread = Thread.currentThread();
-                    for (long time;;) {
+            else if (!U.compareAndSwapObject(p, WCOWAIT,
+                                             node.cowait = p.cowait, node))
+                node.cowait = null;
+            else {
+                for (;;) {
+                    WNode pp, c; Thread w;
+                    if ((h = whead) != null && (c = h.cowait) != null &&
+                        U.compareAndSwapObject(h, WCOWAIT, c, c.cowait) &&
+                        (w = c.thread) != null) // help release
+                        U.unpark(w);
+                    if (h == (pp = p.prev) || h == p || pp == null) {
+                        long m, s, ns;
+                        do {
+                            if ((m = (s = state) & ABITS) < RFULL ?
+                                U.compareAndSwapLong(this, STATE, s,
+                                                     ns = s + RUNIT) :
+                                (m < WBIT &&
+                                 (ns = tryIncReaderOverflow(s)) != 0L))
+                                return ns;
+                        } while (m < WBIT);
+                    }
+                    if (whead == h && p.prev == pp) {
+                        long time;
+                        if (pp == null || h == p || p.status > 0) {
+                            node = null; // throw away
+                            break;
+                        }
                         if (deadline == 0L)
                             time = 0L;
                         else if ((time = deadline - System.nanoTime()) <= 0L)
                             return cancelWaiter(node, p, false);
-                        if (node.thread == null)
-                            break;
-                        if (p.prev != pp || p.status == CANCELLED ||
-                            p == whead || p.prev != pp) {
-                            node.thread = null;
-                            break;
-                        }
                         Thread wt = Thread.currentThread();
                         U.putObject(wt, PARKBLOCKER, this);
-                        if (node.thread == null) // must recheck
-                            break;
-                        U.park(false, time);
+                        node.thread = wt;
+                        if ((h != pp || (state & ABITS) == WBIT) &&
+                            whead == h && p.prev == pp)
+                            U.park(false, time);
+                        node.thread = null;
                         U.putObject(wt, PARKBLOCKER, null);
                         if (interruptible && Thread.interrupted())
                             return cancelWaiter(node, p, true);
                     }
-                    group = p;
                 }
-                node = null; // throw away
-            }
-            else if (U.compareAndSwapObject(this, WTAIL, p, node)) {
-                p.next = node;
-                break;
             }
         }
 
-        for (int spins = SPINS;;) {
-            WNode np, pp, r; int ps; long m, s, ns; Thread w;
-            while ((np = node.prev) != p && np != null)
-                (p = np).next = node;
-            if (whead == p) {
-                for (int k = spins;;) {
-                    if ((m = (s = state) & ABITS) != WBIT) {
-                        if (m < RFULL ?
-                            U.compareAndSwapLong(this, STATE, s, ns = s + RUNIT):
-                            (ns = tryIncReaderOverflow(s)) != 0L) {
-                            whead = node;
-                            node.prev = null;
-                            while ((r = node.cowait) != null) {
-                                if (U.compareAndSwapObject(node, WCOWAIT,
-                                                           r, r.cowait) &&
-                                    (w = r.thread) != null) {
-                                    r.thread = null;
-                                    U.unpark(w); // release co-waiter
-                                }
-                            }
-                            return ns;
+        for (int spins = -1;;) {
+            WNode h, np, pp; int ps;
+            if ((h = whead) == p) {
+                if (spins < 0)
+                    spins = HEAD_SPINS;
+                else if (spins < MAX_HEAD_SPINS)
+                    spins <<= 1;
+                for (int k = spins;;) { // spin at head
+                    long m, s, ns;
+                    if ((m = (s = state) & ABITS) < RFULL ?
+                        U.compareAndSwapLong(this, STATE, s, ns = s + RUNIT) :
+                        (m < WBIT && (ns = tryIncReaderOverflow(s)) != 0L)) {
+                        WNode c; Thread w;
+                        whead = node;
+                        node.prev = null;
+                        while ((c = node.cowait) != null) {
+                            if (U.compareAndSwapObject(node, WCOWAIT,
+                                                       c, c.cowait) &&
+                                (w = c.thread) != null)
+                                U.unpark(w);
                         }
+                        return ns;
                     }
-                    else if (LockSupport.nextSecondarySeed() >= 0 &&
-                             --k <= 0)
+                    else if (m >= WBIT &&
+                             LockSupport.nextSecondarySeed() >= 0 && --k <= 0)
                         break;
                 }
-                if (spins < MAX_HEAD_SPINS)
-                    spins <<= 1;
             }
-            if ((ps = p.status) == 0)
-                U.compareAndSwapInt(p, WSTATUS, 0, WAITING);
-            else if (ps == CANCELLED) {
-                if ((pp = p.prev) != null) {
-                    node.prev = pp;
-                    pp.next = node;
+            else if (h != null) {
+                WNode c; Thread w;
+                while ((c = h.cowait) != null) {
+                    if (U.compareAndSwapObject(h, WCOWAIT, c, c.cowait) &&
+                        (w = c.thread) != null)
+                        U.unpark(w);
                 }
             }
-            else {
-                long time;
-                if (deadline == 0L)
-                    time = 0L;
-                else if ((time = deadline - System.nanoTime()) <= 0L)
-                    return cancelWaiter(node, node, false);
-                Thread wt = Thread.currentThread();
-                U.putObject(wt, PARKBLOCKER, this);
-                node.thread = wt;
-                if (node.prev == p && p.status == WAITING &&
-                    (p != whead || (state & ABITS) != WBIT))
-                    U.park(false, time);
-                node.thread = null;
-                U.putObject(wt, PARKBLOCKER, null);
-                if (interruptible && Thread.interrupted())
-                    return cancelWaiter(node, node, true);
+            if (whead == h) {
+                if ((np = node.prev) != p) {
+                    if (np != null)
+                        (p = np).next = node;   // stale
+                }
+                else if ((ps = p.status) == 0)
+                    U.compareAndSwapInt(p, WSTATUS, 0, WAITING);
+                else if (ps == CANCELLED) {
+                    if ((pp = p.prev) != null) {
+                        node.prev = pp;
+                        pp.next = node;
+                    }
+                }
+                else {
+                    long time;
+                    if (deadline == 0L)
+                        time = 0L;
+                    else if ((time = deadline - System.nanoTime()) <= 0L)
+                        return cancelWaiter(node, node, false);
+                    Thread wt = Thread.currentThread();
+                    U.putObject(wt, PARKBLOCKER, this);
+                    node.thread = wt;
+                    if (p.status < 0 &&
+                        (p != h || (state & ABITS) == WBIT) &&
+                        whead == h && node.prev == p)
+                        U.park(false, time);
+                    node.thread = null;
+                    U.putObject(wt, PARKBLOCKER, null);
+                    if (interruptible && Thread.interrupted())
+                        return cancelWaiter(node, node, true);
+                }
             }
         }
     }
@@ -1278,22 +1313,19 @@
         if (node != null && group != null) {
             Thread w;
             node.status = CANCELLED;
-            node.thread = null;
             // unsplice cancelled nodes from group
             for (WNode p = group, q; (q = p.cowait) != null;) {
-                if (q.status == CANCELLED)
-                    U.compareAndSwapObject(p, WNEXT, q, q.next);
+                if (q.status == CANCELLED) {
+                    U.compareAndSwapObject(p, WCOWAIT, q, q.cowait);
+                    p = group; // restart
+                }
                 else
                     p = q;
             }
             if (group == node) {
-                WNode r; // detach and wake up uncancelled co-waiters
-                while ((r = node.cowait) != null) {
-                    if (U.compareAndSwapObject(node, WCOWAIT, r, r.cowait) &&
-                        (w = r.thread) != null) {
-                        r.thread = null;
-                        U.unpark(w);
-                    }
+                for (WNode r = group.cowait; r != null; r = r.cowait) {
+                    if ((w = r.thread) != null)
+                        U.unpark(w);       // wake up uncancelled co-waiters
                 }
                 for (WNode pred = node.prev; pred != null; ) { // unsplice
                     WNode succ, pp;        // find valid successor
--- a/src/share/classes/java/util/jar/JarVerifier.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/java/util/jar/JarVerifier.java	Fri Sep 13 18:22:45 2013 -0700
@@ -32,6 +32,7 @@
 import java.security.cert.CertificateException;
 import java.util.zip.ZipEntry;
 
+import sun.misc.JarIndex;
 import sun.security.util.ManifestDigester;
 import sun.security.util.ManifestEntryVerifier;
 import sun.security.util.SignatureFileVerifier;
@@ -139,7 +140,8 @@
                     return;
                 }
 
-                if (uname.equals(JarFile.MANIFEST_NAME)) {
+                if (uname.equals(JarFile.MANIFEST_NAME) ||
+                        uname.equals(JarIndex.INDEX_NAME)) {
                     return;
                 }
 
--- a/src/share/classes/java/util/logging/Logger.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/java/util/logging/Logger.java	Fri Sep 13 18:22:45 2013 -0700
@@ -457,13 +457,15 @@
      *                          of the subsystem, such as java.net
      *                          or javax.swing
      * @param   resourceBundleName  name of ResourceBundle to be used for localizing
-     *                          messages for this logger. May be <CODE>null</CODE> if none of
-     *                          the messages require localization.
+     *                          messages for this logger. May be {@code null}
+     *                          if none of the messages require localization.
      * @return a suitable Logger
      * @throws MissingResourceException if the resourceBundleName is non-null and
      *             no corresponding resource can be found.
      * @throws IllegalArgumentException if the Logger already exists and uses
-     *             a different resource bundle name.
+     *             a different resource bundle name; or if
+     *             {@code resourceBundleName} is {@code null} but the named
+     *             logger has a resource bundle set.
      * @throws NullPointerException if the name is null.
      */
 
@@ -1731,10 +1733,6 @@
     // Synchronized to prevent races in setting the fields.
     private synchronized void setupResourceInfo(String name,
                                                 Class<?> callersClass) {
-        if (name == null) {
-            return;
-        }
-
         if (resourceBundleName != null) {
             // this Logger already has a ResourceBundle
 
@@ -1748,6 +1746,10 @@
                 resourceBundleName + " != " + name);
         }
 
+        if (name == null) {
+            return;
+        }
+
         setCallersClassLoaderRef(callersClass);
         if (findResourceBundle(name, true) == null) {
             // We've failed to find an expected ResourceBundle.
--- a/src/share/classes/java/util/regex/Pattern.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/java/util/regex/Pattern.java	Fri Sep 13 18:22:45 2013 -0700
@@ -219,7 +219,7 @@
  *
  * <tr><th>&nbsp;</th></tr>
  * <tr align="left"><th colspan="2" id="unicode">Classes for Unicode scripts, blocks, categories and binary properties</th></tr>
- * * <tr><td valign="top" headers="construct unicode">{@code \p{IsLatin}}</td>
+ * <tr><td valign="top" headers="construct unicode">{@code \p{IsLatin}}</td>
  *     <td headers="matches">A Latin&nbsp;script character (<a href="#usc">script</a>)</td></tr>
  * <tr><td valign="top" headers="construct unicode">{@code \p{InGreek}}</td>
  *     <td headers="matches">A character in the Greek&nbsp;block (<a href="#ubc">block</a>)</td></tr>
@@ -4456,16 +4456,16 @@
                             groups[groupIndex+1] = i;
                             groups[groupIndex] = i - k;
                         }
-                        i = i - k;
                         return true;
                     }
                     // backing off
+                    i = i - k;
                     if (capture) {
                         groups[groupIndex+1] = i;
                         groups[groupIndex] = i - k;
                     }
-                    i = i - k;
                     j--;
+
                 }
                 break;
             }
@@ -4883,7 +4883,6 @@
             int k = matcher.groups[groupIndex+1];
 
             int groupSize = k - j;
-
             // If the referenced group didn't match, neither can this
             if (j < 0)
                 return false;
@@ -4893,7 +4892,6 @@
                 matcher.hitEnd = true;
                 return false;
             }
-
             // Check each new char to make sure it matches what the group
             // referenced matched last time around
             for (int index=0; index<groupSize; index++)
--- a/src/share/classes/java/util/zip/ZipOutputStream.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/java/util/zip/ZipOutputStream.java	Fri Sep 13 18:22:45 2013 -0700
@@ -663,6 +663,9 @@
         while (off + 4 <= len) {
             int tag = get16(extra, off);
             int sz = get16(extra, off + 2);
+            if (sz < 0 || (off + 4 + sz) > len) {
+                break;
+            }
             if (tag == EXTID_EXTT || tag == EXTID_ZIP64) {
                 skipped += (sz + 4);
             }
@@ -684,11 +687,18 @@
             while (off + 4 <= len) {
                 int tag = get16(extra, off);
                 int sz = get16(extra, off + 2);
+                if (sz < 0 || (off + 4 + sz) > len) {
+                    writeBytes(extra, off, len - off);
+                    return;
+                }
                 if (tag != EXTID_EXTT && tag != EXTID_ZIP64) {
                     writeBytes(extra, off, sz + 4);
                 }
                 off += (sz + 4);
             }
+            if (off < len) {
+                writeBytes(extra, off, len - off);
+            }
         }
     }
 
--- a/src/share/classes/javax/net/ssl/SNIHostName.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/javax/net/ssl/SNIHostName.java	Fri Sep 13 18:22:45 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -293,6 +293,7 @@
      *         the <a href="{@docRoot}/java/util/regex/Pattern.html#sum">
      *         regular expression pattern</a>
      *         representing the hostname(s) to match
+     * @return a {@code SNIMatcher} object for {@code SNIHostName}s
      * @throws NullPointerException if {@code regex} is
      *         {@code null}
      * @throws java.util.regex.PatternSyntaxException if the regular expression's
--- a/src/share/classes/javax/net/ssl/X509KeyManager.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/javax/net/ssl/X509KeyManager.java	Fri Sep 13 18:22:45 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -40,7 +40,7 @@
  * <UL>
  * <LI> determine the set of aliases that are available for negotiations
  *      based on the criteria presented,
- * <LI> select the <ITALIC> best alias </ITALIC> based on
+ * <LI> select the <i> best alias</i> based on
  *      the criteria presented, and
  * <LI> obtain the corresponding key material for given aliases.
  * </UL>
--- a/src/share/classes/javax/security/auth/kerberos/KerberosPrincipal.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/javax/security/auth/kerberos/KerberosPrincipal.java	Fri Sep 13 18:22:45 2013 -0700
@@ -197,8 +197,7 @@
      * {@code KerberosPrincipal} and the two
      * {@code KerberosPrincipal} instances are equivalent.
      * More formally two {@code KerberosPrincipal} instances are equal
-     * if the values returned by {@code getName()} are equal and the
-     * values returned by {@code getNameType()} are equal.
+     * if the values returned by {@code getName()} are equal.
      *
      * @param other the Object to compare to
      * @return true if the Object passed in represents the same principal
@@ -211,15 +210,10 @@
 
         if (! (other instanceof KerberosPrincipal)) {
             return false;
-        } else {
-            String myFullName = getName();
-            String otherFullName = ((KerberosPrincipal) other).getName();
-            if (nameType == ((KerberosPrincipal)other).nameType &&
-                myFullName.equals(otherFullName)) {
-                 return true;
-            }
         }
-        return false;
+        String myFullName = getName();
+        String otherFullName = ((KerberosPrincipal) other).getName();
+        return myFullName.equals(otherFullName);
     }
 
     /**
--- a/src/share/classes/sun/misc/Compare.java	Thu Sep 12 15:55:50 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 1996, 1997, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-/**
- * Compare: an interface to enable users to define the result of
- *          a comparison of two objects.
- *
- * @author Sunita Mani
- */
-
-package sun.misc;
-
-public interface Compare {
-
-    /**
-     * doCompare
-     *
-     * @param  obj1 first object to compare.
-     * @param  obj2 second object to compare.
-     * @return -1 if obj1 < obj2, 0 if obj1 == obj2, 1 if obj1 > obj2.
-     */
-    public int doCompare(Object obj1, Object obj2);
-
-}
--- a/src/share/classes/sun/misc/Sort.java	Thu Sep 12 15:55:50 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 1996, Oracle and/or its affiliates. All rights reserved.
- * 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.
- */
-
-/**
- * Sort: a class that uses the quicksort algorithm to sort an
- *       array of objects.
- *
- * @author Sunita Mani
- */
-
-package sun.misc;
-
-public class Sort {
-
-    private static void swap(Object arr[], int i, int j) {
-        Object tmp;
-
-        tmp = arr[i];
-        arr[i] = arr[j];
-        arr[j] = tmp;
-    }
-
-    /**
-     * quicksort the array of objects.
-     *
-     * @param arr[] - an array of objects
-     * @param left - the start index - from where to begin sorting
-     * @param right - the last index.
-     * @param comp - an object that implemnts the Compare interface to resolve thecomparison.
-     */
-    public static void quicksort(Object arr[], int left, int right, Compare comp) {
-        int i, last;
-
-        if (left >= right) { /* do nothing if array contains fewer than two */
-            return;          /* two elements */
-        }
-        swap(arr, left, (left+right) / 2);
-        last = left;
-        for (i = left+1; i <= right; i++) {
-            if (comp.doCompare(arr[i], arr[left]) < 0) {
-                swap(arr, ++last, i);
-            }
-        }
-        swap(arr, left, last);
-        quicksort(arr, left, last-1, comp);
-        quicksort(arr, last+1, right, comp);
-    }
-
-    public static void quicksort(Object arr[], Compare comp) {
-        quicksort(arr, 0, arr.length-1, comp);
-    }
-}
--- a/src/share/classes/sun/nio/ch/AbstractPollSelectorImpl.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/sun/nio/ch/AbstractPollSelectorImpl.java	Fri Sep 13 18:22:45 2013 -0700
@@ -193,9 +193,4 @@
         if (!selch.isOpen() && !selch.isRegistered())
             ((SelChImpl)selch).kill();
     }
-
-    static {
-        Util.load();
-    }
-
 }
--- a/src/share/classes/sun/nio/ch/DatagramChannelImpl.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/sun/nio/ch/DatagramChannelImpl.java	Fri Sep 13 18:22:45 2013 -0700
@@ -1138,7 +1138,7 @@
         throws IOException;
 
     static {
-        Util.load();
+        IOUtil.load();
         initIDs();
     }
 
--- a/src/share/classes/sun/nio/ch/FileChannelImpl.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/sun/nio/ch/FileChannelImpl.java	Fri Sep 13 18:22:45 2013 -0700
@@ -1162,7 +1162,7 @@
     private static native long initIDs();
 
     static {
-        Util.load();
+        IOUtil.load();
         allocationGranularity = initIDs();
     }
 
--- a/src/share/classes/sun/nio/ch/IOUtil.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/sun/nio/ch/IOUtil.java	Fri Sep 13 18:22:45 2013 -0700
@@ -347,9 +347,23 @@
 
     static native void initIDs();
 
+    /**
+     * Used to trigger loading of native libraries
+     */
+    public static void load() { }
+
     static {
-        // Note that IOUtil.initIDs is called from within Util.load.
-        Util.load();
+        java.security.AccessController.doPrivileged(
+                new java.security.PrivilegedAction<Void>() {
+                    public Void run() {
+                        System.loadLibrary("net");
+                        System.loadLibrary("nio");
+                        return null;
+                    }
+                });
+
+        initIDs();
+
         IOV_MAX = iovMax();
     }
 
--- a/src/share/classes/sun/nio/ch/Net.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/sun/nio/ch/Net.java	Fri Sep 13 18:22:45 2013 -0700
@@ -582,7 +582,7 @@
     private static native void initIDs();
 
     static {
-        Util.load();
+        IOUtil.load();
         initIDs();
     }
 
--- a/src/share/classes/sun/nio/ch/ServerSocketChannelImpl.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/sun/nio/ch/ServerSocketChannelImpl.java	Fri Sep 13 18:22:45 2013 -0700
@@ -416,7 +416,7 @@
     private static native void initIDs();
 
     static {
-        Util.load();
+        IOUtil.load();
         initIDs();
         nd = new SocketDispatcher();
     }
--- a/src/share/classes/sun/nio/ch/SocketChannelImpl.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/sun/nio/ch/SocketChannelImpl.java	Fri Sep 13 18:22:45 2013 -0700
@@ -1024,7 +1024,7 @@
         throws IOException;
 
     static {
-        Util.load();
+        IOUtil.load();
         nd = new SocketDispatcher();
     }
 
--- a/src/share/classes/sun/nio/ch/Util.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/sun/nio/ch/Util.java	Fri Sep 13 18:22:45 2013 -0700
@@ -401,30 +401,4 @@
         return bugLevel.equals(bl);
     }
 
-
-
-    // -- Initialization --
-
-    private static boolean loaded = false;
-
-    public static void load() {
-        synchronized (Util.class) {
-            if (loaded)
-                return;
-            loaded = true;
-            java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction<Void>() {
-                    public Void run() {
-                        System.loadLibrary("net");
-                        System.loadLibrary("nio");
-                        return null;
-                    }
-                });
-
-            // IOUtil must be initialized; Its native methods are called from
-            // other places in native nio code so they must be set up.
-            IOUtil.initIDs();
-        }
-    }
-
 }
--- a/src/share/classes/sun/tools/jconsole/ConnectDialog.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/sun/tools/jconsole/ConnectDialog.java	Fri Sep 13 18:22:45 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -268,8 +268,13 @@
 
     public void revalidate() {
         // Adjust some colors
+        Color disabledForeground = UIManager.getColor("Label.disabledForeground");
+        if (disabledForeground == null) {
+            // fall back for Nimbus that doesn't support 'Label.disabledForeground'
+            disabledForeground = UIManager.getColor("Label.disabledText");
+        }
         hintTextColor =
-            ensureContrast(UIManager.getColor("Label.disabledForeground"),
+            ensureContrast(disabledForeground,
                            UIManager.getColor("Panel.background"));
         disabledTableCellColor =
             ensureContrast(new Color(0x808080),
--- a/src/share/classes/sun/tools/jconsole/JConsole.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/sun/tools/jconsole/JConsole.java	Fri Sep 13 18:22:45 2013 -0700
@@ -858,6 +858,10 @@
                 try {
                     updateInterval = Integer.parseInt(arg.substring(10)) *
                         1000;
+                    if (updateInterval <= 0) {
+                        usage();
+                        return;
+                    }
                 } catch (NumberFormatException ex) {
                     usage();
                     return;
--- a/src/share/classes/sun/tools/jconsole/Messages.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/sun/tools/jconsole/Messages.java	Fri Sep 13 18:22:45 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 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
@@ -146,7 +146,6 @@
     public static String HELP_ABOUT_DIALOG_MASTHEAD_ACCESSIBLE_NAME;
     public static String HELP_ABOUT_DIALOG_MASTHEAD_TITLE;
     public static String HELP_ABOUT_DIALOG_TITLE;
-    public static String HELP_ABOUT_DIALOG_USER_GUIDE_LINK;
     public static String HELP_ABOUT_DIALOG_USER_GUIDE_LINK_URL;
     public static String HELP_MENU_ABOUT_TITLE;
     public static String HELP_MENU_USER_GUIDE_TITLE;
@@ -272,6 +271,7 @@
     public static String THREADS;
     public static String THREAD_TAB_THREAD_INFO_ACCESSIBLE_NAME;
     public static String THREAD_TAB_THREAD_PLOTTER_ACCESSIBLE_NAME;
+    public static String THREAD_TAB_INITIAL_STACK_TRACE_MESSAGE;
     public static String THRESHOLD;
     public static String TILE;
     public static String TIME_RANGE_COLON;
--- a/src/share/classes/sun/tools/jconsole/Plotter.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/sun/tools/jconsole/Plotter.java	Fri Sep 13 18:22:45 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -337,6 +337,13 @@
     public void paintComponent(Graphics g) {
         super.paintComponent(g);
 
+        int width = getWidth()-rightMargin-leftMargin-10;
+        int height = getHeight()-topMargin-bottomMargin;
+        if (width <= 0 || height <= 0) {
+            // not enough room to paint anything
+            return;
+        }
+
         Color oldColor = g.getColor();
         Font  oldFont  = g.getFont();
         Color fg = getForeground();
--- a/src/share/classes/sun/tools/jconsole/ThreadTab.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/sun/tools/jconsole/ThreadTab.java	Fri Sep 13 18:22:45 2013 -0700
@@ -595,6 +595,8 @@
 
             setBorder(thinEmptyBorder);
 
+            setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+            textArea.setText(Messages.THREAD_TAB_INITIAL_STACK_TRACE_MESSAGE);
             addListSelectionListener(ThreadTab.this);
             setCellRenderer(new DefaultListCellRenderer() {
                 public Component getListCellRendererComponent(JList<?> list, Object value, int index,
--- a/src/share/classes/sun/tools/jconsole/VMPanel.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/sun/tools/jconsole/VMPanel.java	Fri Sep 13 18:22:45 2013 -0700
@@ -153,9 +153,11 @@
     // in order to reserve space for the connect toggle.
     public void setUI(TabbedPaneUI ui) {
         Insets insets = (Insets) UIManager.getLookAndFeelDefaults().get("TabbedPane.tabAreaInsets");
-        insets = (Insets) insets.clone();
-        insets.right += connectedIcon24.getIconWidth() + 8;
-        UIManager.put("TabbedPane.tabAreaInsets", insets);
+        if (insets != null) {
+            insets = (Insets) insets.clone();
+            insets.right += connectedIcon24.getIconWidth() + 8;
+            UIManager.put("TabbedPane.tabAreaInsets", insets);
+        }
         super.setUI(ui);
     }
 
--- a/src/share/classes/sun/tools/jconsole/resources/messages.properties	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/sun/tools/jconsole/resources/messages.properties	Fri Sep 13 18:22:45 2013 -0700
@@ -104,7 +104,6 @@
 HELP_ABOUT_DIALOG_MASTHEAD_ACCESSIBLE_NAME=Masthead Graphic
 HELP_ABOUT_DIALOG_MASTHEAD_TITLE=About JConsole
 HELP_ABOUT_DIALOG_TITLE=JConsole: About
-HELP_ABOUT_DIALOG_USER_GUIDE_LINK=JConsole &User Guide:<br>{0}
 HELP_ABOUT_DIALOG_USER_GUIDE_LINK_URL=http://docs.oracle.com/javase/{0}/docs/technotes/guides/management/jconsole.html
 HELP_MENU_ABOUT_TITLE=&About JConsole
 HELP_MENU_USER_GUIDE_TITLE=Online &User Guide
@@ -230,6 +229,7 @@
 THREADS=Threads
 THREAD_TAB_THREAD_INFO_ACCESSIBLE_NAME=Thread Information
 THREAD_TAB_THREAD_PLOTTER_ACCESSIBLE_NAME=Chart for number of threads.
+THREAD_TAB_INITIAL_STACK_TRACE_MESSAGE=[No thread selected]
 THRESHOLD=Threshold
 TILE=&Tile
 TIME_RANGE_COLON=&Time Range:
--- a/src/share/classes/sun/tools/jconsole/resources/messages_ja.properties	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/sun/tools/jconsole/resources/messages_ja.properties	Fri Sep 13 18:22:45 2013 -0700
@@ -104,7 +104,6 @@
 HELP_ABOUT_DIALOG_MASTHEAD_ACCESSIBLE_NAME=\u30DE\u30B9\u30C8\u30D8\u30C3\u30C9\u56F3\u5F62
 HELP_ABOUT_DIALOG_MASTHEAD_TITLE=JConsole\u306B\u3064\u3044\u3066
 HELP_ABOUT_DIALOG_TITLE=JConsole: \u8A73\u7D30
-HELP_ABOUT_DIALOG_USER_GUIDE_LINK=JConsole\u30E6\u30FC\u30B6\u30FC\u30FB\u30AC\u30A4\u30C9(&U):<br>{0}
 HELP_ABOUT_DIALOG_USER_GUIDE_LINK_URL=http://docs.oracle.com/javase/{0}/docs/technotes/guides/management/jconsole.html
 HELP_MENU_ABOUT_TITLE=JConsole\u306B\u3064\u3044\u3066(&A)
 HELP_MENU_USER_GUIDE_TITLE=\u30AA\u30F3\u30E9\u30A4\u30F3\u30FB\u30E6\u30FC\u30B6\u30FC\u30FB\u30AC\u30A4\u30C9(&U)
--- a/src/share/classes/sun/tools/jconsole/resources/messages_zh_CN.properties	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/classes/sun/tools/jconsole/resources/messages_zh_CN.properties	Fri Sep 13 18:22:45 2013 -0700
@@ -104,7 +104,6 @@
 HELP_ABOUT_DIALOG_MASTHEAD_ACCESSIBLE_NAME=\u62A5\u5934\u56FE
 HELP_ABOUT_DIALOG_MASTHEAD_TITLE=\u5173\u4E8E JConsole
 HELP_ABOUT_DIALOG_TITLE=JConsole: \u5173\u4E8E
-HELP_ABOUT_DIALOG_USER_GUIDE_LINK=JConsole \u7528\u6237\u6307\u5357(&U):<br>{0}
 HELP_ABOUT_DIALOG_USER_GUIDE_LINK_URL=http://docs.oracle.com/javase/{0}/docs/technotes/guides/management/jconsole.html
 HELP_MENU_ABOUT_TITLE=\u5173\u4E8E JConsole(&A)
 HELP_MENU_USER_GUIDE_TITLE=\u8054\u673A\u7528\u6237\u6307\u5357(&U)
--- a/src/share/lib/security/java.security-linux	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/lib/security/java.security-linux	Fri Sep 13 18:22:45 2013 -0700
@@ -181,6 +181,7 @@
                com.sun.imageio.,\
                com.sun.istack.internal.,\
                com.sun.jmx.,\
+               com.sun.media.sound.,\
                com.sun.proxy.,\
                com.sun.org.apache.bcel.internal.,\
                com.sun.org.apache.regexp.internal.,\
@@ -223,6 +224,7 @@
                    com.sun.imageio.,\
                    com.sun.istack.internal.,\
                    com.sun.jmx.,\
+                   com.sun.media.sound.,\
                    com.sun.proxy.,\
                    com.sun.org.apache.bcel.internal.,\
                    com.sun.org.apache.regexp.internal.,\
--- a/src/share/lib/security/java.security-macosx	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/lib/security/java.security-macosx	Fri Sep 13 18:22:45 2013 -0700
@@ -182,6 +182,7 @@
                com.sun.imageio.,\
                com.sun.istack.internal.,\
                com.sun.jmx.,\
+               com.sun.media.sound.,\
                com.sun.proxy.,\
                com.sun.org.apache.bcel.internal.,\
                com.sun.org.apache.regexp.internal.,\
@@ -226,6 +227,7 @@
                    com.sun.imageio.,\
                    com.sun.istack.internal.,\
                    com.sun.jmx.,\
+                   com.sun.media.sound.,\
                    com.sun.proxy.,\
                    com.sun.org.apache.bcel.internal.,\
                    com.sun.org.apache.regexp.internal.,\
--- a/src/share/lib/security/java.security-solaris	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/lib/security/java.security-solaris	Fri Sep 13 18:22:45 2013 -0700
@@ -183,6 +183,7 @@
                com.sun.imageio.,\
                com.sun.istack.internal.,\
                com.sun.jmx.,\
+               com.sun.media.sound.,\
                com.sun.proxy.,\
                com.sun.org.apache.bcel.internal.,\
                com.sun.org.apache.regexp.internal.,\
@@ -226,6 +227,7 @@
                    com.sun.imageio.,\
                    com.sun.istack.internal.,\
                    com.sun.jmx.,\
+                   com.sun.media.sound.,\
                    com.sun.proxy.,\
                    com.sun.org.apache.bcel.internal.,\
                    com.sun.org.apache.regexp.internal.,\
--- a/src/share/lib/security/java.security-windows	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/lib/security/java.security-windows	Fri Sep 13 18:22:45 2013 -0700
@@ -182,6 +182,7 @@
                com.sun.imageio.,\
                com.sun.istack.internal.,\
                com.sun.jmx.,\
+               com.sun.media.sound.,\
                com.sun.proxy.,\
                com.sun.org.apache.bcel.internal.,\
                com.sun.org.apache.regexp.internal.,\
@@ -226,6 +227,7 @@
                    com.sun.imageio.,\
                    com.sun.istack.internal.,\
                    com.sun.jmx.,\
+                   com.sun.media.sound.,\
                    com.sun.proxy.,\
                    com.sun.org.apache.bcel.internal.,\
                    com.sun.org.apache.regexp.internal.,\
--- a/src/share/native/common/check_code.c	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/share/native/common/check_code.c	Fri Sep 13 18:22:45 2013 -0700
@@ -90,6 +90,12 @@
 #include "classfile_constants.h"
 #include "opcodes.in_out"
 
+#ifdef __APPLE__
+/* use setjmp/longjmp versions that do not save/restore the signal mask */
+#define setjmp _setjmp
+#define longjmp _longjmp
+#endif
+
 #define MAX_ARRAY_DIMENSIONS 255
 /* align byte code */
 #ifndef ALIGN_UP
--- a/src/solaris/classes/sun/nio/ch/DatagramDispatcher.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/DatagramDispatcher.java	Fri Sep 13 18:22:45 2013 -0700
@@ -36,7 +36,7 @@
 class DatagramDispatcher extends NativeDispatcher
 {
     static {
-        Util.load();
+        IOUtil.load();
     }
 
     int read(FileDescriptor fd, long address, int len) throws IOException {
--- a/src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java	Fri Sep 13 18:22:45 2013 -0700
@@ -316,4 +316,8 @@
     private native int poll0(long pollAddress, int numfds, long timeout,
                              int wfd);
     private static native void interrupt(int fd);
+
+    static {
+        IOUtil.load();
+    }
 }
--- a/src/solaris/classes/sun/nio/ch/DevPollSelectorImpl.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/DevPollSelectorImpl.java	Fri Sep 13 18:22:45 2013 -0700
@@ -196,9 +196,4 @@
         }
         return this;
     }
-
-    static {
-        Util.load();
-    }
-
 }
--- a/src/solaris/classes/sun/nio/ch/EPoll.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/EPoll.java	Fri Sep 13 18:22:45 2013 -0700
@@ -113,6 +113,6 @@
         throws IOException;
 
     static {
-        Util.load();
+        IOUtil.load();
     }
 }
--- a/src/solaris/classes/sun/nio/ch/EPollArrayWrapper.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/EPollArrayWrapper.java	Fri Sep 13 18:22:45 2013 -0700
@@ -318,6 +318,7 @@
     }
 
     static {
+        IOUtil.load();
         init();
     }
 
--- a/src/solaris/classes/sun/nio/ch/EPollPort.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/EPollPort.java	Fri Sep 13 18:22:45 2013 -0700
@@ -318,6 +318,6 @@
     private static native void close0(int fd);
 
     static {
-        Util.load();
+        IOUtil.load();
     }
 }
--- a/src/solaris/classes/sun/nio/ch/EPollSelectorImpl.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/EPollSelectorImpl.java	Fri Sep 13 18:22:45 2013 -0700
@@ -196,8 +196,4 @@
         }
         return this;
     }
-
-    static {
-        Util.load();
-    }
 }
--- a/src/solaris/classes/sun/nio/ch/FileDispatcherImpl.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/FileDispatcherImpl.java	Fri Sep 13 18:22:45 2013 -0700
@@ -31,7 +31,7 @@
 {
 
     static {
-        Util.load();
+        IOUtil.load();
         init();
     }
 
--- a/src/solaris/classes/sun/nio/ch/InheritedChannel.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/InheritedChannel.java	Fri Sep 13 18:22:45 2013 -0700
@@ -235,6 +235,6 @@
     private static native int peerPort0(int fd);
 
     static {
-        Util.load();
+        IOUtil.load();
     }
 }
--- a/src/solaris/classes/sun/nio/ch/KQueue.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/KQueue.java	Fri Sep 13 18:22:45 2013 -0700
@@ -115,6 +115,6 @@
         throws IOException;
 
     static {
-        Util.load();
+        IOUtil.load();
     }
 }
--- a/src/solaris/classes/sun/nio/ch/KQueuePort.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/KQueuePort.java	Fri Sep 13 18:22:45 2013 -0700
@@ -326,6 +326,6 @@
     private static native void close0(int fd);
 
     static {
-        Util.load();
+        IOUtil.load();
     }
 }
--- a/src/solaris/classes/sun/nio/ch/NativeThread.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/NativeThread.java	Fri Sep 13 18:22:45 2013 -0700
@@ -54,7 +54,7 @@
     private static native void init();
 
     static {
-        Util.load();
+        IOUtil.load();
         init();
     }
 
--- a/src/solaris/classes/sun/nio/ch/PollArrayWrapper.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/PollArrayWrapper.java	Fri Sep 13 18:22:45 2013 -0700
@@ -126,4 +126,7 @@
 
     private static native void interrupt(int fd);
 
+    static {
+        IOUtil.load();
+    }
 }
--- a/src/solaris/classes/sun/nio/ch/SinkChannelImpl.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/SinkChannelImpl.java	Fri Sep 13 18:22:45 2013 -0700
@@ -37,7 +37,7 @@
 {
 
     // Used to make native read and write calls
-    private static NativeDispatcher nd;
+    private static final NativeDispatcher nd = new FileDispatcherImpl();
 
     // The file descriptor associated with this channel
     FileDescriptor fd;
@@ -206,10 +206,4 @@
            throw new IndexOutOfBoundsException();
         return write(Util.subsequence(srcs, offset, length));
     }
-
-    static {
-        Util.load();
-        nd = new FileDispatcherImpl();
-    }
-
 }
--- a/src/solaris/classes/sun/nio/ch/SolarisEventPort.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/SolarisEventPort.java	Fri Sep 13 18:22:45 2013 -0700
@@ -260,6 +260,6 @@
 
 
     static {
-        Util.load();
+        IOUtil.load();
     }
 }
--- a/src/solaris/classes/sun/nio/ch/SourceChannelImpl.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/SourceChannelImpl.java	Fri Sep 13 18:22:45 2013 -0700
@@ -37,7 +37,7 @@
 {
 
     // Used to make native read and write calls
-    private static NativeDispatcher nd;
+    private static final NativeDispatcher nd = new FileDispatcherImpl();
 
     // The file descriptor associated with this channel
     FileDescriptor fd;
@@ -206,10 +206,4 @@
             }
         }
     }
-
-    static {
-        Util.load();
-        nd = new FileDispatcherImpl();
-    }
-
 }
--- a/src/solaris/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java	Fri Sep 13 18:22:45 2013 -0700
@@ -345,7 +345,7 @@
         throws IOException;
 
     static {
-        Util.load();
+        IOUtil.load();
         initIDs();
     }
 }
--- a/src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java	Fri Sep 13 18:22:45 2013 -0700
@@ -748,6 +748,6 @@
     private static native void checkConnect(int fdVal) throws IOException;
 
     static {
-        Util.load();
+        IOUtil.load();
     }
 }
--- a/src/solaris/classes/sun/nio/ch/sctp/SctpChannelImpl.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/sctp/SctpChannelImpl.java	Fri Sep 13 18:22:45 2013 -0700
@@ -1106,7 +1106,7 @@
             boolean ready) throws IOException;
 
     static {
-        Util.load();   /* loads nio & net native libraries */
+        IOUtil.load();   /* loads nio & net native libraries */
         java.security.AccessController.doPrivileged(
             new java.security.PrivilegedAction<Void>() {
                 public Void run() {
--- a/src/solaris/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java	Fri Sep 13 18:22:45 2013 -0700
@@ -995,7 +995,7 @@
     }
 
     static {
-        Util.load();   /* loads nio & net native libraries */
+        IOUtil.load();   /* loads nio & net native libraries */
         java.security.AccessController.doPrivileged(
             new java.security.PrivilegedAction<Void>() {
                 public Void run() {
--- a/src/solaris/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/solaris/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java	Fri Sep 13 18:22:45 2013 -0700
@@ -426,7 +426,7 @@
         FileDescriptor newfd, InetSocketAddress[] isaa) throws IOException;
 
     static {
-        Util.load();   // loads nio & net native libraries
+        IOUtil.load();   // loads nio & net native libraries
         java.security.AccessController.doPrivileged(
             new java.security.PrivilegedAction<Void>() {
                 public Void run() {
--- a/src/windows/classes/sun/nio/ch/DatagramDispatcher.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/windows/classes/sun/nio/ch/DatagramDispatcher.java	Fri Sep 13 18:22:45 2013 -0700
@@ -36,7 +36,7 @@
 class DatagramDispatcher extends NativeDispatcher
 {
     static {
-        Util.load();
+        IOUtil.load();
     }
 
     int read(FileDescriptor fd, long address, int len) throws IOException {
--- a/src/windows/classes/sun/nio/ch/FileDispatcherImpl.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/windows/classes/sun/nio/ch/FileDispatcherImpl.java	Fri Sep 13 18:22:45 2013 -0700
@@ -32,7 +32,7 @@
 class FileDispatcherImpl extends FileDispatcher
 {
     static {
-        Util.load();
+        IOUtil.load();
     }
 
     /**
--- a/src/windows/classes/sun/nio/ch/FileKey.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/windows/classes/sun/nio/ch/FileKey.java	Fri Sep 13 18:22:45 2013 -0700
@@ -73,6 +73,7 @@
     private static native void initIDs();
 
     static {
+        IOUtil.load();
         initIDs();
     }
 }
--- a/src/windows/classes/sun/nio/ch/Iocp.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/windows/classes/sun/nio/ch/Iocp.java	Fri Sep 13 18:22:45 2013 -0700
@@ -443,7 +443,7 @@
     private static native String getErrorMessage(int error);
 
     static {
-        Util.load();
+        IOUtil.load();
         initIDs();
 
         // thread agnostic I/O on Vista/2008 or newer
--- a/src/windows/classes/sun/nio/ch/PipeImpl.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/windows/classes/sun/nio/ch/PipeImpl.java	Fri Sep 13 18:22:45 2013 -0700
@@ -56,7 +56,6 @@
     private static final Random rnd;
 
     static {
-        Util.load();
         byte[] someBytes = new byte[8];
         boolean resultOK = IOUtil.randomBytes(someBytes);
         if (resultOK) {
--- a/src/windows/classes/sun/nio/ch/SocketDispatcher.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/windows/classes/sun/nio/ch/SocketDispatcher.java	Fri Sep 13 18:22:45 2013 -0700
@@ -36,7 +36,7 @@
 {
 
     static {
-        Util.load();
+        IOUtil.load();
     }
 
     int read(FileDescriptor fd, long address, int len) throws IOException {
--- a/src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java	Fri Sep 13 18:22:45 2013 -0700
@@ -750,6 +750,6 @@
     private static native void close0(long handle);
 
     static {
-        Util.load();
+        IOUtil.load();
     }
 }
--- a/src/windows/classes/sun/nio/ch/WindowsAsynchronousServerSocketChannelImpl.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/windows/classes/sun/nio/ch/WindowsAsynchronousServerSocketChannelImpl.java	Fri Sep 13 18:22:45 2013 -0700
@@ -363,7 +363,7 @@
     private static native void closesocket0(long socket) throws IOException;
 
     static {
-        Util.load();
+        IOUtil.load();
         initIDs();
     }
 }
--- a/src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/windows/classes/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.java	Fri Sep 13 18:22:45 2013 -0700
@@ -919,7 +919,7 @@
     private static native void closesocket0(long socket) throws IOException;
 
     static {
-        Util.load();
+        IOUtil.load();
         initIDs();
     }
 }
--- a/src/windows/classes/sun/nio/ch/WindowsSelectorImpl.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/src/windows/classes/sun/nio/ch/WindowsSelectorImpl.java	Fri Sep 13 18:22:45 2013 -0700
@@ -611,6 +611,6 @@
     }
 
     static {
-        Util.load();
+        IOUtil.load();
     }
 }
--- a/test/ProblemList.txt	Thu Sep 12 15:55:50 2013 -0700
+++ b/test/ProblemList.txt	Fri Sep 13 18:22:45 2013 -0700
@@ -166,6 +166,13 @@
 # 8021186
 jdk/lambda/vm/DefaultMethodsTest.java                           generic-all 
 
+# 8024423 - JVMTI: GetLoadedClasses doesn't enumerate anonymous classes 
+demo/jvmti/hprof/HeapAllTest.java                               generic-all
+demo/jvmti/hprof/HeapBinaryFormatTest.java                      generic-all
+demo/jvmti/hprof/HeapDumpTest.java                              generic-all
+demo/jvmti/hprof/OptionsTest.java                               generic-all
+demo/jvmti/hprof/StackMapTableTest.java                         generic-all
+
 ############################################################################
 
 # jdk_net
@@ -212,7 +219,7 @@
 # jdk_io
 
 # 7160013
-java/io/File/MaxPathLength.java                                 windows-all
+#java/io/File/MaxPathLength.java                                 windows-all
 
 ############################################################################
 
@@ -340,12 +347,6 @@
 # Filed 6653793
 com/sun/jdi/RedefineCrossEvent.java                             generic-all
 
-# Filed 6987312
-com/sun/jdi/DoubleAgentTest.java                                generic-all
-
-# Filed 7020857
-com/sun/jdi/FieldWatchpoints.java                               generic-all
-
 # Filed 6402201
 com/sun/jdi/ProcessAttachTest.sh                                generic-all
 
--- a/test/TEST.ROOT	Thu Sep 12 15:55:50 2013 -0700
+++ b/test/TEST.ROOT	Fri Sep 13 18:22:45 2013 -0700
@@ -9,3 +9,6 @@
 
 # Tests that cannot run concurrently
 exclusiveAccess.dirs=java/rmi/Naming java/util/Currency java/util/prefs sun/management/jmxremote sun/tools/jstatd sun/security/mscapi
+
+# Group definitions
+groups=TEST.groups [closed/TEST.groups]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/TEST.groups	Fri Sep 13 18:22:45 2013 -0700
@@ -0,0 +1,214 @@
+#  Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+#  This code is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU General Public License version 2 only, as
+#  published by the Free Software Foundation.
+#
+#  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.
+#
+
+jdk_lang = \
+    java/lang \
+    -java/lang/management \
+    -java/lang/instrument \
+    sun/invoke \
+    sun/misc \
+    sun/reflect \
+    vm
+
+jdk_util = \
+    java/util \
+    sun/util
+
+jdk_math = \
+    java/math
+
+jdk_io = \
+    java/io
+
+jdk_nio = \
+    java/nio \
+    sun/nio
+
+jdk_net = \
+    java/net \
+    com/sun/net \
+    com/oracle/net \
+    sun/net
+
+jdk_time = \
+    java/time
+
+jdk_rmi = \
+    java/rmi \
+    javax/rmi/ssl \
+    sun/rmi
+
+jdk_security1 = \
+    java/security
+
+jdk_security2 = \
+    javax/crypto \
+    javax/xml/crypto \
+    com/sun/crypto
+
+jdk_security3 = \
+    javax/security  \
+    com/sun/security \
+    com/sun/org/apache/xml/internal/security \
+    com/oracle/security \
+    sun/security \
+    lib/security
+
+jdk_security = \
+    :jdk_security1 \
+    :jdk_security2 \
+    :jdk_security3
+
+jdk_text = \
+    java/text \
+    sun/text
+
+jdk_management = \
+    java/lang/management \
+    com/sun/management \
+    sun/management
+
+jdk_instrument = \
+    java/lang/instrument
+
+jdk_jmx = \
+    javax/management \
+    com/sun/jmx
+
+jdk_jdi = \
+    com/sun/jdi
+
+#
+# Tool (and tool API) tests are split into core and svc groups
+#
+core_tools = \
+    tools \
+    com/sun/tools/extcheck \
+    sun/tools/java \
+    sun/tools/native2ascii \
+    sun/tools/jrunscript
+
+svc_tools = \
+    com/sun/tools/attach \
+    com/sun/tracing \
+    sun/tools \
+    -sun/tools/java \
+    -sun/tools/native2ascii \
+    -sun/tools/jrunscript \
+    sun/jvmstat \
+    demo/jvmti
+
+jdk_tools = \
+    :core_tools \
+    :svc_tools
+
+#
+# Catch-all for other areas with a small number of tests
+#
+jdk_other = \
+    java/sql \
+    javax/sql \
+    javax/naming \
+    javax/script \
+    javax/smartcardio \
+    javax/xml \
+    -javax/xml/crypto \
+    jdk/asm \
+    jdk/lambda \
+    com/sun/jndi \
+    com/sun/corba \
+    lib/testlibrary \
+    demo/zipfs \
+    sample
+
+#
+# SCTP is its own group as it is highly sensitive to kernel/network config
+#
+jdk_sctp = \
+    com/sun/nio/sctp
+
+
+#
+# core group to run all core area tests
+#
+jdk_core = \
+    :jdk_lang \
+    :jdk_util \
+    :jdk_math \
+    :jdk_io \
+    :jdk_nio \
+    :jdk_net \
+    :jdk_rmi \
+    :jdk_time \
+    :jdk_security \
+    :jdk_text \
+    :core_tools \
+    :jdk_other
+
+#
+# svc group to run all serviceability area tests
+#
+jdk_svc = \
+    :jdk_management \
+    :jdk_instrument \
+    :jdk_jmx \
+    :jdk_jdi \
+    :svc_tools
+
+#############################
+
+#
+# Client area groups
+#
+
+jdk_awt = \
+    java/awt \
+    com/sun/awt \
+    com/apple/eawt \
+    sun/awt
+
+jdk_2d = \
+    javax/print \
+    sun/pisces  \
+    sun/java2d
+
+jdk_beans = \
+    java/beans
+
+jdk_swing = \
+    javax/accessibility \
+    javax/swing \
+    com/sun/java/swing
+
+jdk_sound = \
+    javax/sound
+
+jdk_imageio = \
+    javax/imageio
+
+jdk_desktop = \
+    :jdk_awt \
+    :jdk_2d \
+    :jdk_beans \
+    :jdk_swing \
+    :jdk_sound \
+    :jdk_imageio
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/io/BufferedInputStream/LargeCopyWithMark.java	Fri Sep 13 18:22:45 2013 -0700
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ * @bug 7129312
+ * @summary BufferedInputStream calculates negative array size with large
+ *          streams and mark
+ * @library /lib/testlibrary
+ * @run main/othervm LargeCopyWithMark
+ */
+
+import java.io.BufferedInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import static jdk.testlibrary.ProcessTools.*;
+
+
+public class LargeCopyWithMark {
+
+    public static void main(String[] args) throws Exception {
+        if (! System.getProperty("os.arch").contains("64")) {
+            System.out.println("Test runs on 64 bit platforms");
+            return;
+        }
+        ProcessBuilder pb = createJavaProcessBuilder("-Xmx4G",
+                "-ea:LargeCopyWithMark$Child",
+                "LargeCopyWithMark$Child");
+        int res = pb.inheritIO().start().waitFor();
+        if (res != 0) {
+            throw new AssertionError("Test failed: exit code = " + res);
+        }
+    }
+
+    public static class Child {
+        static final int BUFF_SIZE = 8192;
+        static final int BIS_BUFF_SIZE = Integer.MAX_VALUE / 2 + 100;
+        static final long BYTES_TO_COPY = 2L * Integer.MAX_VALUE;
+
+        static {
+            assert BIS_BUFF_SIZE * 2 < 0 : "doubling must overflow";
+        }
+
+        public static void main(String[] args) throws Exception {
+            byte[] buff = new byte[BUFF_SIZE];
+
+            try (InputStream myis = new MyInputStream(BYTES_TO_COPY);
+                 InputStream bis = new BufferedInputStream(myis, BIS_BUFF_SIZE);
+                 OutputStream myos = new MyOutputStream()) {
+
+                // will require a buffer bigger than BIS_BUFF_SIZE
+                bis.mark(BIS_BUFF_SIZE + 100);
+
+                for (;;) {
+                    int count = bis.read(buff, 0, BUFF_SIZE);
+                    if (count == -1)
+                        break;
+                    myos.write(buff, 0, count);
+                }
+            } catch (java.lang.NegativeArraySizeException e) {
+                e.printStackTrace();
+                System.exit(11);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+}
+
+class MyInputStream extends InputStream {
+    private long bytesLeft;
+    public MyInputStream(long bytesLeft) {
+        this.bytesLeft = bytesLeft;
+    }
+    @Override public int read() throws IOException {
+        return 0;
+    }
+    @Override public int read(byte[] b) throws IOException {
+        return read(b, 0, b.length);
+    }
+    @Override public int read(byte[] b, int off, int len) throws IOException {
+        if (bytesLeft <= 0)
+            return -1;
+        long result = Math.min(bytesLeft, (long)len);
+        bytesLeft -= result;
+        return (int)result;
+    }
+    @Override public int available() throws IOException {
+        return (bytesLeft > 0) ? 1 : 0;
+    }
+}
+
+class MyOutputStream extends OutputStream {
+    @Override public void write(int b) throws IOException {}
+    @Override public void write(byte[] b) throws IOException {}
+    @Override public void write(byte[] b, int off, int len) throws IOException {}
+}
--- a/test/java/io/File/MaxPathLength.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/test/java/io/File/MaxPathLength.java	Fri Sep 13 18:22:45 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -27,6 +27,7 @@
  */
 
 import java.io.*;
+import java.nio.file.Files;
 
 public class MaxPathLength {
     private static String sep = File.separator;
@@ -87,10 +88,8 @@
             System.err.println("Warning: Test directory structure exists already!");
             return;
         }
-        boolean couldMakeTestDirectory = dirFile.mkdirs();
-        if (!couldMakeTestDirectory) {
-            throw new RuntimeException ("Could not create test directory structure");
-        }
+        Files.createDirectories(dirFile.toPath());
+
         try {
             if (tryAbsolute)
                 dirFile = new File(dirFile.getCanonicalPath());
--- a/test/java/io/pathNames/General.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/test/java/io/pathNames/General.java	Fri Sep 13 18:22:45 2013 -0700
@@ -28,6 +28,7 @@
 
 import java.io.*;
 import java.util.*;
+import java.nio.file.*;
 
 
 public class General {
@@ -57,7 +58,7 @@
         for (int i = 0; i < dl.length; i++) {
             File f = new File(subdir, dl[i]);
             File df = new File(dir, f.getPath());
-            if (df.exists() && df.isFile()) {
+            if (Files.isRegularFile(df.toPath(), LinkOption.NOFOLLOW_LINKS)) {
                 return f.getPath();
             }
         }
@@ -65,7 +66,7 @@
             File f = (subdir.length() == 0) ? new File(dl[i])
                                             : new File(subdir, dl[i]);
             File df = new File(dir, f.getPath());
-            if (df.exists() && df.isDirectory()) {
+            if (Files.isDirectory(df.toPath(), LinkOption.NOFOLLOW_LINKS)) {
                 String[] dl2 = df.list();
                 if (dl2 != null) {
                     String ff = findSomeFile(dir, f.getPath(), dl2);
@@ -90,7 +91,7 @@
         }
         for (int i = 0; i < dl.length; i++) {
             File f = new File(dir, dl[i]);
-            if (f.isFile()) {
+            if (Files.isRegularFile(f.toPath(), LinkOption.NOFOLLOW_LINKS)) {
                 return dl[i];
             }
         }
@@ -127,7 +128,7 @@
         }
         for (int i = 0; i < dl.length; i++) {
             File f = new File(d, dl[i]);
-            if (f.isDirectory()) {
+            if (Files.isDirectory(f.toPath(), LinkOption.NOFOLLOW_LINKS)) {
                 String[] dl2 = f.list();
                 if (dl2 == null || dl2.length >= 250) {
                     /* Heuristic to avoid scanning huge directories */
@@ -314,7 +315,7 @@
 
         /* Normal name */
         if (f.exists()) {
-            if (f.isDirectory() && f.list() != null) {
+            if (Files.isDirectory(f.toPath(), LinkOption.NOFOLLOW_LINKS) && f.list() != null) {
                 if ((n = findSomeFile(ans, create)) != null)
                     checkSlashes(d, create, ans + n, ask + n);
                 if ((n = findSomeDir(ans, create)) != null)
--- a/test/java/lang/SecurityManager/CheckPackageAccess.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/test/java/lang/SecurityManager/CheckPackageAccess.java	Fri Sep 13 18:22:45 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  *  @test
- *  @bug 6741606 7146431 8000450
+ *  @bug 6741606 7146431 8000450 8019830
  *  @summary Make sure all restricted packages listed in the package.access
  *           property in the java.security file are blocked
  *  @run main/othervm CheckPackageAccess
@@ -54,6 +54,7 @@
         "com.sun.imageio.",
         "com.sun.istack.internal.",
         "com.sun.jmx.",
+        "com.sun.media.sound.",
         "com.sun.proxy.",
         "com.sun.org.apache.bcel.internal.",
         "com.sun.org.apache.regexp.internal.",
--- a/test/java/lang/annotation/AnnotationType/AnnotationTypeDeadlockTest.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/test/java/lang/annotation/AnnotationType/AnnotationTypeDeadlockTest.java	Fri Sep 13 18:22:45 2013 -0700
@@ -28,6 +28,9 @@
  */
 
 import java.lang.annotation.Retention;
+import java.lang.management.ManagementFactory;
+import java.lang.management.ThreadInfo;
+import java.lang.management.ThreadMXBean;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.atomic.AtomicInteger;
 
@@ -66,17 +69,6 @@
         }
     }
 
-    static void dumpState(Task task) {
-        System.err.println(
-            "Task[" + task.getName() + "].state: " +
-            task.getState() + " ..."
-        );
-        for (StackTraceElement ste : task.getStackTrace()) {
-            System.err.println("\tat " + ste);
-        }
-        System.err.println();
-    }
-
     public static void main(String[] args) throws Exception {
         CountDownLatch prepareLatch = new CountDownLatch(2);
         AtomicInteger goLatch = new AtomicInteger(1);
@@ -88,18 +80,22 @@
         prepareLatch.await();
         // let them go
         goLatch.set(0);
-        // attempt to join them
-        taskA.join(5000L);
-        taskB.join(5000L);
-
-        if (taskA.isAlive() || taskB.isAlive()) {
-            dumpState(taskA);
-            dumpState(taskB);
-            throw new IllegalStateException(
-                taskA.getState() == Thread.State.BLOCKED &&
-                taskB.getState() == Thread.State.BLOCKED
-                ? "deadlock detected"
-                : "unexpected condition");
+        // obtain ThreadMXBean
+        ThreadMXBean threadBean = ManagementFactory.getThreadMXBean();
+        // wait for threads to finish or dead-lock
+        while (taskA.isAlive() || taskB.isAlive()) {
+            // attempt to join threads
+            taskA.join(500L);
+            taskB.join(500L);
+            // detect dead-lock
+            long[] deadlockedIds = threadBean.findMonitorDeadlockedThreads();
+            if (deadlockedIds != null && deadlockedIds.length > 0) {
+                StringBuilder sb = new StringBuilder("deadlock detected:\n\n");
+                for (ThreadInfo ti : threadBean.getThreadInfo(deadlockedIds, Integer.MAX_VALUE)) {
+                    sb.append(ti);
+                }
+                throw new IllegalStateException(sb.toString());
+            }
         }
     }
 }
--- a/test/java/lang/annotation/TypeAnnotationReflection.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/test/java/lang/annotation/TypeAnnotationReflection.java	Fri Sep 13 18:22:45 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8004698 8007073
+ * @bug 8004698 8007073 8022343
  * @summary Unit test for type annotations
  */
 
@@ -58,7 +58,7 @@
     }
 
     private static void testSuper() throws Exception {
-        check(Object.class.getAnnotatedSuperclass().getAnnotations().length == 0);
+        check(Object.class.getAnnotatedSuperclass() == null);
         check(Class.class.getAnnotatedSuperclass().getAnnotations().length == 0);
 
         AnnotatedType a;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/annotation/typeAnnotations/GetAnnotatedSuperclass.java	Fri Sep 13 18:22:45 2013 -0700
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8022343
+ * @summary make sure Class.getAnnotatedSuperclass() returns null when specified to do so
+ */
+
+public class GetAnnotatedSuperclass {
+    private static final Class<?>[] testData = {
+        Object.class,
+        If.class,
+        Object[].class,
+        void.class,
+        int.class,
+    };
+
+    public static void main(String[] args) throws Exception {
+        int failed = 0;
+        for (Class<?> toTest : testData) {
+            Object res = toTest.getAnnotatedSuperclass();
+
+            if (res != null) {
+                failed++;
+                System.out.println(toTest + ".getAnnotatedSuperclass() returns: "
+                        + res + ", should be null");
+            }
+        }
+
+        if (failed != 0)
+            throw new RuntimeException("Test failed, check log for details");
+    }
+
+    interface If {}
+}
--- a/test/java/lang/management/MemoryMXBean/ResetPeakMemoryUsage.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/test/java/lang/management/MemoryMXBean/ResetPeakMemoryUsage.java	Fri Sep 13 18:22:45 2013 -0700
@@ -33,10 +33,10 @@
  * @author  Mandy Chung
  *
  * @build ResetPeakMemoryUsage MemoryUtil
- * @run main/othervm -XX:+UseSerialGC -XX:MarkSweepAlwaysCompactCount=1 -Xmn8m ResetPeakMemoryUsage
- * @run main/othervm -XX:+UseConcMarkSweepGC -Xmn8m ResetPeakMemoryUsage
- * @run main/othervm -XX:+UseParallelGC -Xmn8m ResetPeakMemoryUsage
- * @run main/othervm -XX:+UseG1GC -Xmn8m -XX:G1HeapRegionSize=1m ResetPeakMemoryUsage
+ * @run main/othervm -XX:+PrintGCDetails -XX:+UseSerialGC -Xms256m -XX:MarkSweepAlwaysCompactCount=1 -Xmn8m ResetPeakMemoryUsage
+ * @run main/othervm -XX:+PrintGCDetails -XX:+UseConcMarkSweepGC -Xms256m -Xmn8m ResetPeakMemoryUsage
+ * @run main/othervm -XX:+PrintGCDetails -XX:+UseParallelGC -Xms256m -Xmn8m ResetPeakMemoryUsage
+ * @run main/othervm -XX:+PrintGCDetails -XX:+UseG1GC -Xms256m -Xmn8m -XX:G1HeapRegionSize=1m ResetPeakMemoryUsage
  */
 
 import java.lang.management.*;
--- a/test/java/math/BigDecimal/IntegralDivisionTests.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/test/java/math/BigDecimal/IntegralDivisionTests.java	Fri Sep 13 18:22:45 2013 -0700
@@ -22,7 +22,7 @@
  */
 /*
  * @test
- * @bug 4904082 4917089 6337226
+ * @bug 4904082 4917089 6337226 6378503
  * @summary Tests that integral division and related methods return the proper result and scale.
  * @author Joseph D. Darcy
  */
@@ -47,6 +47,9 @@
             {new BigDecimal("400e1"),   new BigDecimal("5"),    new BigDecimal("80e1")},
             {new BigDecimal("400e1"),   new BigDecimal("4.999999999"),  new BigDecimal("8e2")},
             {new BigDecimal("40e2"),    new BigDecimal("5"),    new BigDecimal("8e2")},
+            {BigDecimal.valueOf(1, Integer.MIN_VALUE),
+                BigDecimal.valueOf(1, -(Integer.MAX_VALUE & 0x7fffff00)),
+                BigDecimal.valueOf(1, -256)},
         };
 
         for(BigDecimal [] testCase: moreTestCases) {
--- a/test/java/nio/file/WatchService/SensitivityModifier.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/test/java/nio/file/WatchService/SensitivityModifier.java	Fri Sep 13 18:22:45 2013 -0700
@@ -54,60 +54,66 @@
     @SuppressWarnings("unchecked")
     static void doTest(Path top) throws Exception {
         FileSystem fs = top.getFileSystem();
-        WatchService watcher = fs.newWatchService();
+        try (WatchService watcher = fs.newWatchService()) {
 
-        // create directories and files
-        int nDirs = 5 + rand.nextInt(20);
-        int nFiles = 50 + rand.nextInt(50);
-        Path[] dirs = new Path[nDirs];
-        Path[] files = new Path[nFiles];
-        for (int i=0; i<nDirs; i++) {
-            dirs[i] = Files.createDirectory(top.resolve("dir" + i));
+            // create directories and files
+            int nDirs = 5 + rand.nextInt(20);
+            int nFiles = 50 + rand.nextInt(50);
+            Path[] dirs = new Path[nDirs];
+            Path[] files = new Path[nFiles];
+            for (int i=0; i<nDirs; i++) {
+                dirs[i] = Files.createDirectory(top.resolve("dir" + i));
+            }
+            for (int i=0; i<nFiles; i++) {
+                Path dir = dirs[rand.nextInt(nDirs)];
+                files[i] = Files.createFile(dir.resolve("file" + i));
+            }
+
+            // register the directories (random sensitivity)
+            register(dirs, watcher);
+
+            // sleep a bit here to ensure that modification to the first file
+            // can be detected by polling implementations (ie: last modified time
+            // may not change otherwise).
+            try { Thread.sleep(1000); } catch (InterruptedException e) { }
+
+            // modify files and check that events are received
+            for (int i=0; i<10; i++) {
+                Path file = files[rand.nextInt(nFiles)];
+                System.out.println("Modify: " + file);
+                try (OutputStream out = Files.newOutputStream(file)) {
+                    out.write(new byte[100]);
+                }
+
+                System.out.println("Waiting for event(s)...");
+                boolean eventReceived = false;
+                WatchKey key = watcher.take();
+                do {
+                    for (WatchEvent<?> event: key.pollEvents()) {
+                        if (event.kind() != ENTRY_MODIFY)
+                            throw new RuntimeException("Unexpected event: " + event);
+                        Path name = ((WatchEvent<Path>)event).context();
+                        if (name.equals(file.getFileName())) {
+                            eventReceived = true;
+                            break;
+                        }
+                    }
+                    key.reset();
+                    key = watcher.poll(1, TimeUnit.SECONDS);
+                } while (key != null && !eventReceived);
+
+                // we should have received at least one ENTRY_MODIFY event
+                if (eventReceived) {
+                    System.out.println("Event OK");
+                } else {
+                    throw new RuntimeException("No ENTRY_MODIFY event received for " + file);
+                }
+
+                // re-register the directories to force changing their sensitivity
+                // level
+                register(dirs, watcher);
+            }
         }
-        for (int i=0; i<nFiles; i++) {
-            Path dir = dirs[rand.nextInt(nDirs)];
-            files[i] = Files.createFile(dir.resolve("file" + i));
-        }
-
-        // register the directories (random sensitivity)
-        register(dirs, watcher);
-
-        // sleep a bit here to ensure that modification to the first file
-        // can be detected by polling implementations (ie: last modified time
-        // may not change otherwise).
-        try { Thread.sleep(1000); } catch (InterruptedException e) { }
-
-        // modify files and check that events are received
-        for (int i=0; i<10; i++) {
-            Path file = files[rand.nextInt(nFiles)];
-            System.out.println("Modify: " + file);
-            try (OutputStream out = Files.newOutputStream(file)) {
-                out.write(new byte[100]);
-            }
-            System.out.println("Waiting for event...");
-            WatchKey key = watcher.take();
-            WatchEvent<?> event = key.pollEvents().iterator().next();
-            if (event.kind() != ENTRY_MODIFY)
-                throw new RuntimeException("Unexpected event: " + event);
-            Path name = ((WatchEvent<Path>)event).context();
-            if (!name.equals(file.getFileName()))
-                throw new RuntimeException("Unexpected context: " + name);
-            System.out.println("Event OK");
-
-            // drain events (to avoid interference)
-            do {
-                key.pollEvents();
-                key.reset();
-                key = watcher.poll(1, TimeUnit.SECONDS);
-            } while (key != null);
-
-            // re-register the directories to force changing their sensitivity
-            // level
-            register(dirs, watcher);
-        }
-
-        // done
-        watcher.close();
     }
 
     public static void main(String[] args) throws Exception {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/Arrays/TimSortStackSize.java	Fri Sep 13 18:22:45 2013 -0700
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8011944
+ * @summary Test TimSort stack size
+ */
+import java.util.Arrays;
+import java.util.ArrayDeque;
+
+public class TimSortStackSize {
+
+    public static void main(String[] args) {
+        testComparableTimSort();
+        testTimSort();
+    }
+
+    static void testComparableTimSort() {
+        System.out.printf("testComparableTimSort()%n");
+        Arrays.sort(genData());
+    }
+
+    static void testTimSort() {
+        System.out.printf("testTimSort()%n");
+        Arrays.sort(genData(), Integer::compare);
+    }
+
+    private static final int MIN = 16;
+
+    private static final int BOUND1 = 2 * MIN + 1;
+    private static final int BOUND2 = BOUND1 + MIN + 2;
+    private static final int BOUND3 = BOUND1 + 1 + BOUND2;
+    private static final int BOUND4 = BOUND2 + 1 + BOUND3;
+    private static final int BOUND5 = BOUND3 + 1 + BOUND4;
+
+    static int build(int size, int B, ArrayDeque<Integer> chunks) {
+        chunks.addFirst(B);
+        if (size < BOUND1) {
+            chunks.addFirst(size);
+            return size;
+        }
+
+        int asize = (size + 2) / 2;
+        if (size >= BOUND2 && asize < BOUND1) {
+            asize = BOUND1;
+        } else if (size >= BOUND3 && asize < BOUND2) {
+            asize = BOUND2;
+        } else if (size >= BOUND4 && asize < BOUND3) {
+            asize = BOUND3;
+        } else if (size >= BOUND5 && asize < BOUND4) {
+            asize = BOUND4;
+        }
+        if (size - asize >= B) {
+            throw new AssertionError(" " + size + " , " + asize + " , " + B);
+        }
+        return build(asize, size - asize, chunks);
+    }
+
+    static Integer[] genData() {
+        ArrayDeque<Integer> chunks = new ArrayDeque<Integer>();
+        chunks.addFirst(MIN);
+
+        int B = MIN + 4;
+        int A = B + MIN + 1;
+
+        for (int i = 0; i < 8; i++) {
+            int eps = build(A, B, chunks);
+            B = B + A + 1;
+            A = B + eps + 1;
+        }
+        chunks.addFirst(B);
+        chunks.addFirst(A);
+        int total = 0;
+        for (Integer len : chunks) {
+            total += len;
+        }
+        int pow = MIN;
+        while (pow < total) {
+            pow += pow;
+        }
+        chunks.addLast(pow - total);
+        System.out.println(" Total: " + total);
+        Integer[] array = new Integer[pow];
+        int off = 0;
+        int pos = 0;
+        for (Integer len : chunks) {
+            for (int i = 0; i < len; i++) {
+                array[pos++] = Integer.valueOf(i == 0 ? 0 : 1);
+            }
+            off++;
+        }
+        return array;
+    }
+
+}
--- a/test/java/util/Random/RandomTest.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/test/java/util/Random/RandomTest.java	Fri Sep 13 18:22:45 2013 -0700
@@ -188,8 +188,32 @@
         executeAndCatchIAE(() -> r.ints(10, 42, 42));
         executeAndCatchIAE(() -> r.longs(-1L, -1L));
         executeAndCatchIAE(() -> r.longs(10, 1L, -2L));
-        executeAndCatchIAE(() -> r.doubles(0.0, 0.0));
-        executeAndCatchIAE(() -> r.doubles(10, .5, .4));
+
+        testDoubleBadOriginBound((o, b) -> r.doubles(10, o, b));
+    }
+
+    // An arbitrary finite double value
+    static final double FINITE = Math.PI;
+
+    void testDoubleBadOriginBound(BiConsumer<Double, Double> bi) {
+        executeAndCatchIAE(() -> bi.accept(17.0, 2.0));
+        executeAndCatchIAE(() -> bi.accept(0.0, 0.0));
+        executeAndCatchIAE(() -> bi.accept(Double.NaN, FINITE));
+        executeAndCatchIAE(() -> bi.accept(FINITE, Double.NaN));
+        executeAndCatchIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY));
+
+        // Returns NaN
+//        executeAndCatchIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, FINITE));
+//        executeAndCatchIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY));
+
+        executeAndCatchIAE(() -> bi.accept(FINITE, Double.NEGATIVE_INFINITY));
+
+        // Returns Double.MAX_VALUE
+//        executeAndCatchIAE(() -> bi.accept(FINITE, Double.POSITIVE_INFINITY));
+
+        executeAndCatchIAE(() -> bi.accept(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY));
+        executeAndCatchIAE(() -> bi.accept(Double.POSITIVE_INFINITY, FINITE));
+        executeAndCatchIAE(() -> bi.accept(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY));
     }
 
     private void executeAndCatchIAE(Runnable r) {
--- a/test/java/util/SplittableRandom/SplittableRandomTest.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/test/java/util/SplittableRandom/SplittableRandomTest.java	Fri Sep 13 18:22:45 2013 -0700
@@ -25,8 +25,10 @@
 import org.testng.annotations.Test;
 
 import java.util.SplittableRandom;
+import java.util.concurrent.ThreadLocalRandom;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.LongAdder;
+import java.util.function.BiConsumer;
 
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertNotNull;
@@ -273,6 +275,53 @@
     }
 
     /**
+     * nextDouble(bound) throws IllegalArgumentException
+     */
+    public void testNextDoubleBadBound() {
+        SplittableRandom sr = new SplittableRandom();
+        executeAndCatchIAE(() -> sr.nextDouble(0.0));
+        executeAndCatchIAE(() -> sr.nextDouble(-0.0));
+        executeAndCatchIAE(() -> sr.nextDouble(+0.0));
+        executeAndCatchIAE(() -> sr.nextDouble(-1.0));
+        executeAndCatchIAE(() -> sr.nextDouble(Double.NaN));
+        executeAndCatchIAE(() -> sr.nextDouble(Double.NEGATIVE_INFINITY));
+
+        // Returns Double.MAX_VALUE
+//        executeAndCatchIAE(() -> r.nextDouble(Double.POSITIVE_INFINITY));
+    }
+
+    /**
+     * nextDouble(origin, bound) throws IllegalArgumentException
+     */
+    public void testNextDoubleBadOriginBound() {
+        testDoubleBadOriginBound(new SplittableRandom()::nextDouble);
+    }
+
+    // An arbitrary finite double value
+    static final double FINITE = Math.PI;
+
+    void testDoubleBadOriginBound(BiConsumer<Double, Double> bi) {
+        executeAndCatchIAE(() -> bi.accept(17.0, 2.0));
+        executeAndCatchIAE(() -> bi.accept(0.0, 0.0));
+        executeAndCatchIAE(() -> bi.accept(Double.NaN, FINITE));
+        executeAndCatchIAE(() -> bi.accept(FINITE, Double.NaN));
+        executeAndCatchIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY));
+
+        // Returns NaN
+//        executeAndCatchIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, FINITE));
+//        executeAndCatchIAE(() -> bi.accept(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY));
+
+        executeAndCatchIAE(() -> bi.accept(FINITE, Double.NEGATIVE_INFINITY));
+
+        // Returns Double.MAX_VALUE
+//        executeAndCatchIAE(() -> bi.accept(FINITE, Double.POSITIVE_INFINITY));
+
+        executeAndCatchIAE(() -> bi.accept(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY));
+        executeAndCatchIAE(() -> bi.accept(Double.POSITIVE_INFINITY, FINITE));
+        executeAndCatchIAE(() -> bi.accept(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY));
+    }
+
+    /**
      * nextDouble(least, bound) returns least <= value < bound;
      * repeated calls produce at least two distinct results
      */
@@ -318,8 +367,8 @@
         executeAndCatchIAE(() -> r.ints(10, 42, 42));
         executeAndCatchIAE(() -> r.longs(-1L, -1L));
         executeAndCatchIAE(() -> r.longs(10, 1L, -2L));
-        executeAndCatchIAE(() -> r.doubles(0.0, 0.0));
-        executeAndCatchIAE(() -> r.doubles(10, .5, .4));
+
+        testDoubleBadOriginBound((o, b) -> r.doubles(10, o, b));
     }
 
     private void executeAndCatchIAE(Runnable r) {
--- a/test/java/util/concurrent/ThreadLocalRandom/ThreadLocalRandomTest.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/test/java/util/concurrent/ThreadLocalRandom/ThreadLocalRandomTest.java	Fri Sep 13 18:22:45 2013 -0700
@@ -251,7 +251,7 @@
     }
 
     /**
-     * nextLong(negative) throws IllegalArgumentException
+     * nextDouble(bound) throws IllegalArgumentException
      */
     public void testNextDoubleBadBound() {
         ThreadLocalRandom r = ThreadLocalRandom.current();
@@ -266,6 +266,9 @@
 //        executeAndCatchIAE(() -> r.nextDouble(Double.POSITIVE_INFINITY));
     }
 
+    /**
+     * nextDouble(origin, bound) throws IllegalArgumentException
+     */
     public void testNextDoubleBadOriginBound() {
         testDoubleBadOriginBound(ThreadLocalRandom.current()::nextDouble);
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/concurrent/locks/StampedLock/ReadersUnlockAfterWriteUnlock.java	Fri Sep 13 18:22:45 2013 -0700
@@ -0,0 +1,88 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @run main/othervm/timeout=60 ReadersUnlockAfterWriteUnlock
+ * @bug 8023234
+ * @summary StampedLock serializes readers on writer unlock
+ * @author Dmitry Chyuko
+ * @author Aleksey Shipilev
+ */
+
+import java.util.concurrent.CyclicBarrier;
+import java.util.concurrent.locks.StampedLock;
+
+public class ReadersUnlockAfterWriteUnlock {
+    static final int RNUM = 2;
+    static final StampedLock sl = new StampedLock();
+    static volatile boolean isDone;
+
+    static CyclicBarrier iterationStart = new CyclicBarrier(RNUM + 1);
+    static CyclicBarrier readersHaveLocks = new CyclicBarrier(RNUM);
+    static CyclicBarrier writerHasLock = new CyclicBarrier(RNUM + 1);
+
+    static class Reader extends Thread {
+        final String name;
+        Reader(String name) {
+            super();
+            this.name = name;
+        }
+        public void run() {
+            while (!isDone && !isInterrupted()) {
+                try {
+                    iterationStart.await();
+                    writerHasLock.await();
+                    long rs = sl.readLock();
+
+                    // single reader blocks here indefinitely if readers
+                    // are serialized
+                    readersHaveLocks.await();
+
+                    sl.unlockRead(rs);
+                } catch (Exception e) {
+                    throw new IllegalStateException(e);
+                }
+            }
+        }
+    }
+
+    public static void main(String[] args) throws InterruptedException {
+        for (int r = 0 ; r < RNUM; ++r) {
+            new Reader("r" + r).start();
+        }
+        int i;
+        for (i = 0; i < 1024; ++i) {
+            try {
+                iterationStart.await();
+                long ws = sl.writeLock();
+                writerHasLock.await();
+                Thread.sleep(10);
+                sl.unlockWrite(ws);
+            } catch (Exception e) {
+                throw new IllegalStateException(e);
+            }
+        }
+        isDone = true;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/logging/Logger/getLogger/TestLogger.java	Fri Sep 13 18:22:45 2013 -0700
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Logger;
+
+/**
+ * @test
+ * @bug 8005899
+ * @build TestLogger testlogger.MyResource
+ * @run main/othervm TestLogger
+ * @run main/othervm -Dsecurity=on TestLogger
+ **/
+public class TestLogger {
+
+    public static final String RESOURCE_BUNDLE = "testlogger.MyResource";
+    public static final String ORG_LOGGER = "org";
+    public static final String FOO_LOGGER = ORG_LOGGER + ".foo.Foo";
+    public static final String BAR_LOGGER = ORG_LOGGER + ".bar.Bar";
+    public static final String GEE_LOGGER = ORG_LOGGER + ".gee.Gee";
+    public static final String GEE_GEE_LOGGER = GEE_LOGGER+".Gee";
+
+    public static void main(String[] args) {
+        final String security = System.getProperty("security", "off");
+        System.out.println("Security is " + security);
+        if ("on".equals(security)) {
+           System.setSecurityManager(new SecurityManager());
+        }
+
+        newLogger(FOO_LOGGER, RESOURCE_BUNDLE);
+        newLogger(FOO_LOGGER);
+        newLogger(BAR_LOGGER);
+        newLogger(BAR_LOGGER, RESOURCE_BUNDLE);
+        newLogger(GEE_LOGGER, null);
+        newLogger(GEE_LOGGER, RESOURCE_BUNDLE);
+        newLogger(ORG_LOGGER);
+        newLogger(GEE_GEE_LOGGER);
+
+        for (String log : new String[] { FOO_LOGGER, BAR_LOGGER, GEE_LOGGER }) {
+            if (!RESOURCE_BUNDLE.equals(Logger.getLogger(log).getResourceBundleName())) {
+                throw new RuntimeException("Shouldn't allow to reset the resource bundle for " + log);
+            }
+            try {
+                Logger logger = Logger.getLogger(log, null);
+                if (!RESOURCE_BUNDLE.equals(logger.getResourceBundleName())) {
+                    throw new RuntimeException("Shouldn't allow to reset the resource bundle for " + log);
+                }
+                throw new RuntimeException("Expected IllegalArgumentException not thrown for " + log);
+            } catch (IllegalArgumentException e) {
+                System.out.println("Got expected exception for " + log +": " + e);
+            }
+        }
+        for (String log : new String[] { ORG_LOGGER, GEE_GEE_LOGGER }) {
+            if (Logger.getLogger(log).getResourceBundleName() != null) {
+                throw new RuntimeException("Resource bundle is not null for log: "
+                           + Logger.getLogger(log).getResourceBundleName());
+            }
+            try {
+                Logger logger = Logger.getLogger(log, null);
+                if (logger.getResourceBundleName() != null) {
+                    throw new RuntimeException("Resource bundle is not null for log: "
+                               + logger.getResourceBundleName());
+                }
+                System.out.println("Success calling Logger.getLogger(\""+log+"\", null)");
+            } catch (IllegalArgumentException e) {
+                throw new RuntimeException("Unexpected exception for " + log +": " + e, e);
+            }
+        }
+    }
+
+    private static List<Logger> strongRefs = new ArrayList<>();
+    private static void newLogger(String name) {
+        strongRefs.add(Logger.getLogger(name));
+    }
+    private static void newLogger(String name, String resourceBundleName) {
+        strongRefs.add(Logger.getLogger(name, resourceBundleName));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/logging/Logger/getLogger/testlogger/MyResource.java	Fri Sep 13 18:22:45 2013 -0700
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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 testlogger;
+
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.Properties;
+import java.util.ResourceBundle;
+
+/**
+ * A dummy resource bundle for testing purposes.
+ * @author danielfuchs
+ */
+public class MyResource extends ResourceBundle {
+    Map<String, Object> bundle = new HashMap<>();
+
+    @Override
+    protected Object handleGetObject(String key) {
+         bundle.put(key,"Localized: " + key);
+         return bundle.get(key);
+    }
+
+    @Override
+    public Enumeration<String> getKeys() {
+        final Hashtable<String, Object> h = new Hashtable<>(bundle);
+        return h.keys();
+    }
+
+}
--- a/test/java/util/regex/RegExTest.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/test/java/util/regex/RegExTest.java	Fri Sep 13 18:22:45 2013 -0700
@@ -33,7 +33,7 @@
  * 5013885 5003322 4988891 5098443 5110268 6173522 4829857 5027748 6376940
  * 6358731 6178785 6284152 6231989 6497148 6486934 6233084 6504326 6635133
  * 6350801 6676425 6878475 6919132 6931676 6948903 6990617 7014645 7039066
- * 7067045 7014640 7189363 8007395 8013252 8013254 8012646
+ * 7067045 7014640 7189363 8007395 8013252 8013254 8012646 8023647
  */
 
 import java.util.regex.*;
@@ -147,6 +147,7 @@
         linebreakTest();
         branchTest();
         groupCurlyNotFoundSuppTest();
+        groupCurlyBackoffTest();
         patternAsPredicate();
         if (failure) {
             throw new
@@ -4000,6 +4001,15 @@
         report("GroupCurly NotFoundSupp");
     }
 
+    // This test is for 8023647
+    private static void groupCurlyBackoffTest() throws Exception {
+        if (!"abc1c".matches("(\\w)+1\\1") ||
+            "abc11".matches("(\\w)+1\\1")) {
+            failCount++;
+        }
+        report("GroupCurly backoff");
+    }
+
     // This test is for 8012646
     private static void patternAsPredicate() throws Exception {
         Predicate<String> p = Pattern.compile("[a-z]+").asPredicate();
--- a/test/java/util/zip/TestExtraTime.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/test/java/util/zip/TestExtraTime.java	Fri Sep 13 18:22:45 2013 -0700
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @bug 4759491 6303183 7012868 8015666
+ * @bug 4759491 6303183 7012868 8015666 8023713
  * @summary Test ZOS and ZIS timestamp in extra field correctly
  */
 
@@ -32,6 +32,7 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.nio.file.attribute.FileTime;
+import java.util.Arrays;
 import java.util.TimeZone;
 import java.util.concurrent.TimeUnit;
 import java.util.zip.ZipEntry;
@@ -52,24 +53,26 @@
             FileTime ctime = FileTime.from(time - 300000, TimeUnit.MILLISECONDS);
             TimeZone tz = TimeZone.getTimeZone("Asia/Shanghai");
 
-            test(mtime, null, null, null);
-            // ms-dos 1980 epoch problem
-            test(FileTime.from(10, TimeUnit.MILLISECONDS), null, null, null);
-            // non-default tz
-            test(mtime, null, null, tz);
+            for (byte[] extra : new byte[][] { null, new byte[] {1, 2, 3}}) {
+                test(mtime, null, null, null, extra);
+                // ms-dos 1980 epoch problem
+                test(FileTime.from(10, TimeUnit.MILLISECONDS), null, null, null, extra);
+                // non-default tz
+                test(mtime, null, null, tz, extra);
 
-            test(mtime, atime, null, null);
-            test(mtime, null, ctime, null);
-            test(mtime, atime, ctime, null);
+                test(mtime, atime, null, null, extra);
+                test(mtime, null, ctime, null, extra);
+                test(mtime, atime, ctime, null, extra);
 
-            test(mtime, atime, null, tz);
-            test(mtime, null, ctime, tz);
-            test(mtime, atime, ctime, tz);
+                test(mtime, atime, null, tz, extra);
+                test(mtime, null, ctime, tz, extra);
+                test(mtime, atime, ctime, tz, extra);
+            }
         }
     }
 
     static void test(FileTime mtime, FileTime atime, FileTime ctime,
-                     TimeZone tz) throws Throwable {
+                     TimeZone tz, byte[] extra) throws Throwable {
         System.out.printf("--------------------%nTesting: [%s]/[%s]/[%s]%n",
                           mtime, atime, ctime);
         TimeZone tz0 = TimeZone.getDefault();
@@ -78,8 +81,8 @@
         }
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ZipOutputStream zos = new ZipOutputStream(baos);
-        ZipEntry ze = new ZipEntry("TestExtreTime.java");
-
+        ZipEntry ze = new ZipEntry("TestExtraTime.java");
+        ze.setExtra(extra);
         ze.setLastModifiedTime(mtime);
         if (atime != null)
             ze.setLastAccessTime(atime);
@@ -87,6 +90,14 @@
             ze.setCreationTime(ctime);
         zos.putNextEntry(ze);
         zos.write(new byte[] { 1,2 ,3, 4});
+
+        // append an extra entry to help check if the length and data
+        // of the extra field are being correctly written (in previous
+        // entry).
+        if (extra != null) {
+            ze = new ZipEntry("TestExtraEntry");
+            zos.putNextEntry(ze);
+        }
         zos.close();
         if (tz != null) {
             TimeZone.setDefault(tz0);
@@ -96,23 +107,23 @@
                                  new ByteArrayInputStream(baos.toByteArray()));
         ze = zis.getNextEntry();
         zis.close();
-        check(mtime, atime, ctime, ze);
+        check(mtime, atime, ctime, ze, extra);
 
         // ZipFile
         Path zpath = Paths.get(System.getProperty("test.dir", "."),
-                               "TestExtraTimp.zip");
+                               "TestExtraTime.zip");
         Files.copy(new ByteArrayInputStream(baos.toByteArray()), zpath);
         ZipFile zf = new ZipFile(zpath.toFile());
-        ze = zf.getEntry("TestExtreTime.java");
+        ze = zf.getEntry("TestExtraTime.java");
         // ZipFile read entry from cen, which does not have a/ctime,
         // for now.
-        check(mtime, null, null, ze);
+        check(mtime, null, null, ze, extra);
         zf.close();
         Files.delete(zpath);
     }
 
     static void check(FileTime mtime, FileTime atime, FileTime ctime,
-                      ZipEntry ze) {
+                      ZipEntry ze, byte[] extra) {
         /*
         System.out.printf("    mtime [%tc]: [%tc]/[%tc]%n",
                           mtime.to(TimeUnit.MILLISECONDS),
@@ -130,5 +141,17 @@
             ctime.to(TimeUnit.SECONDS) !=
             ze.getCreationTime().to(TimeUnit.SECONDS))
             throw new RuntimeException("Timestamp: storing ctime failed!");
+        if (extra != null) {
+            // if extra data exists, the current implementation put it at
+            // the end of the extra data array (implementation detail)
+            byte[] extra1 = ze.getExtra();
+            if (extra1 == null || extra1.length < extra.length ||
+                !Arrays.equals(Arrays.copyOfRange(extra1,
+                                                  extra1.length - extra.length,
+                                                  extra1.length),
+                               extra)) {
+                throw new RuntimeException("Timestamp: storing extra field failed!");
+            }
+        }
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/security/krb5/auto/KPEquals.java	Fri Sep 13 18:22:45 2013 -0700
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8015669
+ * @summary KerberosPrincipal::equals should ignore name-type
+ * @compile -XDignore.symbol.file KPEquals.java
+ * @run main/othervm KPEquals
+ */
+
+import sun.security.jgss.GSSUtil;
+
+import javax.security.auth.kerberos.KerberosKey;
+import javax.security.auth.kerberos.KerberosPrincipal;
+import javax.security.auth.kerberos.KeyTab;
+
+public class KPEquals {
+
+    public static void main(String[] args) throws Exception {
+        new OneKDC(null).writeJAASConf();
+        Context c = Context.fromJAAS("client");
+        Context s = Context.fromThinAir();
+        KerberosPrincipal kp = new KerberosPrincipal(
+                OneKDC.SERVER + "@" + OneKDC.REALM,
+                KerberosPrincipal.KRB_NT_SRV_INST);
+        s.s().getPrincipals().add(kp);
+        for (KerberosKey k: KeyTab.getInstance(kp).getKeys(kp)) {
+            s.s().getPrivateCredentials().add(k);
+        }
+        c.startAsClient(OneKDC.SERVER, GSSUtil.GSS_KRB5_MECH_OID);
+        s.startAsServer(OneKDC.SERVER, GSSUtil.GSS_KRB5_MECH_OID);
+        Context.handshake(c, s);
+    }
+}
--- a/test/sun/security/ssl/javax/net/ssl/NewAPIs/SessionCacheSizeTests.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/test/sun/security/ssl/javax/net/ssl/NewAPIs/SessionCacheSizeTests.java	Fri Sep 13 18:22:45 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -21,14 +21,16 @@
  * questions.
  */
 
+//
+// SunJSSE does not support dynamic system properties, no way to re-use
+// system properties in samevm/agentvm mode.
+//
+
 /*
  * @test
  * @bug   4366807
  * @summary Need new APIs to get/set session timeout and session cache size.
  * @run main/othervm SessionCacheSizeTests
- *
- *     SunJSSE does not support dynamic system properties, no way to re-use
- *     system properties in samevm/agentvm mode.
  */
 
 import java.io.*;
@@ -113,7 +115,9 @@
         /*
          * Signal Client, we're ready for his connect.
          */
-        serverReady = true;
+        if (createdPorts == serverPorts.length) {
+            serverReady = true;
+        }
         int read = 0;
         int nConnections = 0;
         /*
@@ -310,7 +314,6 @@
      * Fork off the other side, then do your work.
      */
     SessionCacheSizeTests() throws Exception {
-
         /*
          * create the SSLServerSocket and SSLSocket factories
          */
@@ -323,46 +326,87 @@
         int serverConns = MAX_ACTIVE_CONNECTIONS / (serverPorts.length);
         int remainingConns = MAX_ACTIVE_CONNECTIONS % (serverPorts.length);
 
-        if (separateServerThread) {
-            for (int i = 0; i < serverPorts.length; i++) {
-
-                // distribute remaining connections among the available ports
-                if (i < remainingConns)
-                    startServer(serverPorts[i], (serverConns + 1), true);
-                else
-                    startServer(serverPorts[i], serverConns, true);
+        Exception startException = null;
+        try {
+            if (separateServerThread) {
+                for (int i = 0; i < serverPorts.length; i++) {
+                    // distribute remaining connections among the
+                    // available ports
+                    if (i < remainingConns)
+                        startServer(serverPorts[i], (serverConns + 1), true);
+                    else
+                        startServer(serverPorts[i], serverConns, true);
+                }
+                startClient(false);
+            } else {
+                startClient(true);
+                for (int i = 0; i < serverPorts.length; i++) {
+                    if (i < remainingConns)
+                        startServer(serverPorts[i], (serverConns + 1), false);
+                    else
+                        startServer(serverPorts[i], serverConns, false);
+                }
             }
-            startClient(false);
-        } else {
-            startClient(true);
-            for (int i = 0; i < serverPorts.length; i++) {
-                if (i < remainingConns)
-                    startServer(serverPorts[i], (serverConns + 1), false);
-                else
-                    startServer(serverPorts[i], serverConns, false);
-            }
+        } catch (Exception e) {
+            startException = e;
         }
 
         /*
          * Wait for other side to close down.
          */
         if (separateServerThread) {
-            serverThread.join();
+            if (serverThread != null) {
+                serverThread.join();
+            }
         } else {
-            clientThread.join();
+            if (clientThread != null) {
+                clientThread.join();
+            }
         }
 
         /*
          * When we get here, the test is pretty much over.
-         *
-         * If the main thread excepted, that propagates back
-         * immediately.  If the other thread threw an exception, we
-         * should report back.
          */
-        if (serverException != null)
-            throw serverException;
-        if (clientException != null)
-            throw clientException;
+        Exception local;
+        Exception remote;
+
+        if (separateServerThread) {
+            remote = serverException;
+            local = clientException;
+        } else {
+            remote = clientException;
+            local = serverException;
+        }
+
+        Exception exception = null;
+
+        /*
+         * Check various exception conditions.
+         */
+        if ((local != null) && (remote != null)) {
+            // If both failed, return the curthread's exception.
+            local.initCause(remote);
+            exception = local;
+        } else if (local != null) {
+            exception = local;
+        } else if (remote != null) {
+            exception = remote;
+        } else if (startException != null) {
+            exception = startException;
+        }
+
+        /*
+         * If there was an exception *AND* a startException,
+         * output it.
+         */
+        if (exception != null) {
+            if (exception != startException && startException != null) {
+                exception.addSuppressed(startException);
+            }
+            throw exception;
+        }
+
+        // Fall-through: no exception to throw!
     }
 
     void startServer(final int port, final int nConns,
@@ -387,7 +431,13 @@
             };
             serverThread.start();
         } else {
-            doServerSide(port, nConns);
+            try {
+                doServerSide(port, nConns);
+            } catch (Exception e) {
+                serverException = e;
+            } finally {
+                serverReady = true;
+            }
         }
     }
 
@@ -409,7 +459,11 @@
             };
             clientThread.start();
         } else {
-            doClientSide();
+            try {
+                doClientSide();
+            } catch (Exception e) {
+                clientException = e;
+            }
         }
     }
 }
--- a/test/sun/security/ssl/javax/net/ssl/NewAPIs/SessionTimeOutTests.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/test/sun/security/ssl/javax/net/ssl/NewAPIs/SessionTimeOutTests.java	Fri Sep 13 18:22:45 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -21,14 +21,14 @@
  * questions.
  */
 
+// SunJSSE does not support dynamic system properties, no way to re-use
+// system properties in samevm/agentvm mode.
+
 /*
  * @test
  * @bug   4366807
  * @summary Need new APIs to get/set session timeout and session cache size.
  * @run main/othervm SessionTimeOutTests
- *
- *     SunJSSE does not support dynamic system properties, no way to re-use
- *     system properties in samevm/agentvm mode.
  */
 
 import java.io.*;
@@ -263,7 +263,7 @@
         for (int i = 0; i < nConnections; i++) {
             sslSockets[i].close();
         }
-         System.out.println("----------------------------------------"
+        System.out.println("----------------------------------------"
                                  + "-----------------------");
         System.out.println("Session timeout test passed");
     }
@@ -348,45 +348,88 @@
         int serverConns = MAX_ACTIVE_CONNECTIONS / (serverPorts.length);
         int remainingConns = MAX_ACTIVE_CONNECTIONS % (serverPorts.length);
 
-        if (separateServerThread) {
-            for (int i = 0; i < serverPorts.length; i++) {
-                // distribute remaining connections among the available ports
-                if (i < remainingConns)
-                    startServer(serverPorts[i], (serverConns + 1), true);
-                else
-                    startServer(serverPorts[i], serverConns, true);
+        Exception startException = null;
+        try {
+            if (separateServerThread) {
+                for (int i = 0; i < serverPorts.length; i++) {
+                    // distribute remaining connections among the
+                    // vailable ports
+                    if (i < remainingConns)
+                        startServer(serverPorts[i], (serverConns + 1), true);
+                    else
+                        startServer(serverPorts[i], serverConns, true);
+                }
+                startClient(false);
+            } else {
+                startClient(true);
+                for (int i = 0; i < serverPorts.length; i++) {
+                    if (i < remainingConns)
+                        startServer(serverPorts[i], (serverConns + 1), false);
+                    else
+                        startServer(serverPorts[i], serverConns, false);
+                }
             }
-            startClient(false);
-        } else {
-            startClient(true);
-            for (int i = 0; i < serverPorts.length; i++) {
-                if (i < remainingConns)
-                    startServer(serverPorts[i], (serverConns + 1), false);
-                else
-                    startServer(serverPorts[i], serverConns, false);
-            }
+        } catch (Exception e) {
+            startException = e;
         }
 
         /*
          * Wait for other side to close down.
          */
         if (separateServerThread) {
-            serverThread.join();
+            if (serverThread != null) {
+                serverThread.join();
+            }
         } else {
-            clientThread.join();
+            if (clientThread != null) {
+                clientThread.join();
+            }
         }
 
         /*
          * When we get here, the test is pretty much over.
-         *
-         * If the main thread excepted, that propagates back
-         * immediately.  If the other thread threw an exception, we
-         * should report back.
+         * Which side threw the error?
          */
-        if (serverException != null)
-            throw serverException;
-        if (clientException != null)
-            throw clientException;
+        Exception local;
+        Exception remote;
+
+        if (separateServerThread) {
+            remote = serverException;
+            local = clientException;
+        } else {
+            remote = clientException;
+            local = serverException;
+        }
+
+        Exception exception = null;
+
+        /*
+         * Check various exception conditions.
+         */
+        if ((local != null) && (remote != null)) {
+            // If both failed, return the curthread's exception.
+            local.initCause(remote);
+            exception = local;
+        } else if (local != null) {
+            exception = local;
+        } else if (remote != null) {
+            exception = remote;
+        } else if (startException != null) {
+            exception = startException;
+        }
+
+        /*
+         * If there was an exception *AND* a startException,
+         * output it.
+         */
+        if (exception != null) {
+            if (exception != startException && startException != null) {
+                exception.addSuppressed(startException);
+            }
+            throw exception;
+        }
+
+        // Fall-through: no exception to throw!
     }
 
     void startServer(final int port, final int nConns,
@@ -411,7 +454,13 @@
             };
             serverThread.start();
         } else {
-            doServerSide(port, nConns);
+            try {
+                doServerSide(port, nConns);
+            } catch (Exception e) {
+                serverException = e;
+            } finally {
+                serverReady = 0;
+            }
         }
     }
 
@@ -433,7 +482,11 @@
             };
             clientThread.start();
         } else {
-            doClientSide();
+            try {
+                doClientSide();
+            } catch (Exception e) {
+                clientException = e;
+            }
         }
     }
 }
--- a/test/sun/security/ssl/templates/SSLSocketTemplate.java	Thu Sep 12 15:55:50 2013 -0700
+++ b/test/sun/security/ssl/templates/SSLSocketTemplate.java	Fri Sep 13 18:22:45 2013 -0700
@@ -243,7 +243,7 @@
          * output it.
          */
         if (exception != null) {
-            if (exception != startException) {
+            if (exception != startException && startException != null) {
                 exception.addSuppressed(startException);
             }
             throw exception;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/security/tools/jarsigner/jvindex.sh	Fri Sep 13 18:22:45 2013 -0700
@@ -0,0 +1,76 @@
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# @test
+# @bug 8022761
+# @summary regression: SecurityException is NOT thrown while trying to pack a wrongly signed Indexed Jar file
+#
+
+if [ "${TESTJAVA}" = "" ] ; then
+  JAVAC_CMD=`which javac`
+  TESTJAVA=`dirname $JAVAC_CMD`/..
+fi
+
+# set platform-dependent variables
+OS=`uname -s`
+case "$OS" in
+  Windows_* )
+    FS="\\"
+    ;;
+  * )
+    FS="/"
+    ;;
+esac
+
+F=abcde
+KS=jvindex.jks
+JFILE=jvindex.jar
+
+KT="$TESTJAVA${FS}bin${FS}keytool -storepass changeit -keypass changeit \
+        -keystore $KS"
+JAR=$TESTJAVA${FS}bin${FS}jar
+JARSIGNER="$TESTJAVA${FS}bin${FS}jarsigner -keystore $KS -storepass changeit"
+
+rm $F $KS $JFILE 2> /dev/null
+
+echo 12345 > $F
+$JAR cvf $JFILE $F
+
+ERR=""
+
+$KT -alias a -dname CN=a -genkey -validity 300 || ERR="$ERR 1"
+
+$JARSIGNER $JFILE a || ERR="$ERR 2"
+$JAR i $JFILE
+
+# Make sure the $F line has "sm" (signed and in manifest)
+$JARSIGNER -verify -verbose $JFILE | grep $F | grep sm || ERR="$ERR 3"
+
+if [ "$ERR" = "" ]; then
+    exit 0
+else
+    echo "ERR is $ERR"
+    exit 1
+fi
+
+