changeset 32468:54fbe836fcf0

Merge
author amurillo
date Tue, 08 Sep 2015 15:39:51 -0700
parents 23b29549f8d1 2050b3a0aadc
children f4a20c54ec40 c1b76d66916a
files jdk/src/java.base/unix/classes/sun/nio/fs/GnomeFileTypeDetector.java jdk/src/java.base/unix/native/libnio/fs/GnomeFileTypeDetector.c langtools/test/tools/javac/TestBootstrapMethodsCount.java langtools/test/tools/javac/lib/JavacTestingAbstractThreadedTest.java nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/AstSerializer.java nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/InvalidArrayIndexException.java
diffstat 291 files changed, 7745 insertions(+), 4713 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Sep 01 12:57:41 2015 +0300
+++ b/.hgtags	Tue Sep 08 15:39:51 2015 -0700
@@ -322,3 +322,4 @@
 c25e882cee9622ec75c4e9d60633539a2f0a8809 jdk9-b77
 c8753d0be1778944dc512ec86a459941ea1ad2c3 jdk9-b78
 3966bd3b8167419aa05c6718a4af1cf54b1e3c58 jdk9-b79
+3c9f5bd909ae7187f24622ee4b69f8a5756a9271 jdk9-b80
--- a/.hgtags-top-repo	Tue Sep 01 12:57:41 2015 +0300
+++ b/.hgtags-top-repo	Tue Sep 08 15:39:51 2015 -0700
@@ -322,3 +322,4 @@
 7972dc8f2a47f0c4cd8f02fa5662af41f028aa14 jdk9-b77
 8c40d4143ee13bdf8170c68cc384c36ab1e9fadb jdk9-b78
 ba08a9f79b9849716bae1f39f71333d47f604012 jdk9-b79
+f7c5ae2933c0b8510a420d1713a955e4ffc7ad0b jdk9-b80
--- a/common/bin/logger.sh	Tue Sep 01 12:57:41 2015 +0300
+++ b/common/bin/logger.sh	Tue Sep 08 15:39:51 2015 -0700
@@ -41,5 +41,19 @@
 trap "rm -rf \"$RCDIR\"" EXIT
 LOGFILE=$1
 shift
+
+# We need to handle command likes like "VAR1=val1 /usr/bin/cmd VAR2=val2".
+# Do this by shifting away prepended variable assignments, and export them
+# instead.
+is_prefix=true
+for opt; do
+  if [[ "$is_prefix" = true && "$opt" =~ ^.*=.*$ ]]; then
+    export $opt
+    shift
+  else
+    is_prefix=false
+  fi
+done
+
 (exec 3>&1 ; ("$@" 2>&1 1>&3; echo $? > "$RCDIR/rc") | tee -a $LOGFILE 1>&2 ; exec 3>&-) | tee -a $LOGFILE
 exit `cat "$RCDIR/rc"`
--- a/corba/.hgtags	Tue Sep 01 12:57:41 2015 +0300
+++ b/corba/.hgtags	Tue Sep 08 15:39:51 2015 -0700
@@ -322,3 +322,4 @@
 8bb2441c0fec8b28f7bf11a0ca3ec1642e7ef457 jdk9-b77
 182bb7accc5253bcfefd8edc1d4997ec8f9f8694 jdk9-b78
 4ab250b8fac66ef8cd15ee78c40f0c651c96e16a jdk9-b79
+821a0373ef2d1642a9824facb938b901ad010413 jdk9-b80
--- a/hotspot/.hgtags	Tue Sep 01 12:57:41 2015 +0300
+++ b/hotspot/.hgtags	Tue Sep 08 15:39:51 2015 -0700
@@ -482,3 +482,4 @@
 e66c3813789debfc06f206afde1bf7a84cb08451 jdk9-b77
 20dc06b04fe5ec373879414d60ef82ac70faef98 jdk9-b78
 e9e63d93bbfe2c6c23447e2c1f5cc71c98671cba jdk9-b79
+8e8377739c06b99b9011c003c77e0bef84c91e09 jdk9-b80
--- a/jaxp/.hgtags	Tue Sep 01 12:57:41 2015 +0300
+++ b/jaxp/.hgtags	Tue Sep 08 15:39:51 2015 -0700
@@ -322,3 +322,4 @@
 be357705874c4ba1a69c38fb211e5e31e35bf9cb jdk9-b77
 5b1899c9822db4a80a29cac82af492afea9f8f41 jdk9-b78
 cf809edc840ff7546677d38b13ebd8b3cae2bbda jdk9-b79
+f464f9b2fb1178f6a957e5730b4b5252c6149ed9 jdk9-b80
--- a/jaxws/.hgtags	Tue Sep 01 12:57:41 2015 +0300
+++ b/jaxws/.hgtags	Tue Sep 08 15:39:51 2015 -0700
@@ -325,3 +325,4 @@
 bd6ece68cf8aca34c8d992569892060c82cfd3f1 jdk9-b77
 ac1748bab0743137574be3451307b6a6361719eb jdk9-b78
 42ae657e0e104fa7877996b8095f2e3ab1596118 jdk9-b79
+e9940bf1c8ddaa6f1f5f1813846b080f0ccaf50b jdk9-b80
--- a/jdk/.hgtags	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/.hgtags	Tue Sep 08 15:39:51 2015 -0700
@@ -322,3 +322,4 @@
 7fd081100f48828431e7c1bff65c906ee759069b jdk9-b77
 0940ce86c614458f5bdd72278b190abbf36b7b45 jdk9-b78
 d99c2ffdd0f15753e69126583688f2f075a0a5e8 jdk9-b79
+4947810137ae53abba3028cc366af953d90fa81a jdk9-b80
--- a/jdk/README	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/README	Tue Sep 08 15:39:51 2015 -0700
@@ -25,5 +25,3 @@
   5. Construct the images:
        cd make && gnumake images
      The resulting JDK image should be found in build/*/j2sdk-image
-
-
--- a/jdk/make/lib/Awt2dLibraries.gmk	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/make/lib/Awt2dLibraries.gmk	Tue Sep 08 15:39:51 2015 -0700
@@ -887,7 +887,8 @@
                 $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS), \
       DISABLED_WARNINGS_gcc := sign-compare type-limits unused-result maybe-uninitialized, \
       DISABLED_WARNINGS_clang := incompatible-pointer-types, \
-      DISABLED_WARNINGS_solstudio := E_NEWLINE_NOT_LAST E_DECLARATION_IN_CODE, \
+      DISABLED_WARNINGS_solstudio := E_NEWLINE_NOT_LAST E_DECLARATION_IN_CODE \
+          E_STATEMENT_NOT_REACHED, \
       DISABLED_WARNINGS_microsoft := 4018 4244 4267, \
       MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \
       LDFLAGS := $(LDFLAGS_JDKLIB) \
--- a/jdk/make/lib/CoreLibraries.gmk	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/make/lib/CoreLibraries.gmk	Tue Sep 08 15:39:51 2015 -0700
@@ -146,6 +146,7 @@
     OPTIMIZATION := HIGH, \
     CFLAGS := $(CFLAGS_JDKLIB) \
         $(LIBJAVA_CFLAGS), \
+    DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
@@ -307,7 +308,9 @@
     EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
     OPTIMIZATION := HIGH, \
     CFLAGS := $(LIBJLI_CFLAGS), \
-    DISABLED_WARNINGS_solstudio := E_ASM_DISABLES_OPTIMIZATION, \
+    DISABLED_WARNINGS_solstudio := \
+        E_ASM_DISABLES_OPTIMIZATION \
+        E_STATEMENT_NOT_REACHED, \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjli/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
--- a/jdk/make/lib/NetworkingLibraries.gmk	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/make/lib/NetworkingLibraries.gmk	Tue Sep 08 15:39:51 2015 -0700
@@ -35,6 +35,7 @@
     DISABLED_WARNINGS_gcc := format-nonliteral, \
     DISABLED_WARNINGS_clang := parentheses-equality constant-logical-operand, \
     DISABLED_WARNINGS_microsoft := 4244 4047 4133 4996, \
+    DISABLED_WARNINGS_solstudio := E_ARG_INCOMPATIBLE_WITH_ARG_L, \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnet/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
--- a/jdk/make/lib/NioLibraries.gmk	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/make/lib/NioLibraries.gmk	Tue Sep 08 15:39:51 2015 -0700
@@ -47,7 +47,7 @@
 ifeq ($(OPENJDK_TARGET_OS), macosx)
   BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
   BUILD_LIBNIO_EXFILES += \
-      GnomeFileTypeDetector.c \
+      GioFileTypeDetector.c \
       #
 endif
 
--- a/jdk/make/mapfiles/libnio/mapfile-linux	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/make/mapfiles/libnio/mapfile-linux	Tue Sep 08 15:39:51 2015 -0700
@@ -135,8 +135,8 @@
 		Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_accept0;
 		Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_initIDs;
 		Java_sun_nio_ch_UnixAsynchronousSocketChannelImpl_checkConnect;
-		Java_sun_nio_fs_GnomeFileTypeDetector_initializeGio;
-		Java_sun_nio_fs_GnomeFileTypeDetector_probeGio;
+		Java_sun_nio_fs_GioFileTypeDetector_initializeGio;
+		Java_sun_nio_fs_GioFileTypeDetector_probeGio;
 		Java_sun_nio_fs_MagicFileTypeDetector_initialize0;
 		Java_sun_nio_fs_MagicFileTypeDetector_probe0;
 		Java_sun_nio_fs_LinuxWatchService_eventSize;
--- a/jdk/make/mapfiles/libnio/mapfile-solaris	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/make/mapfiles/libnio/mapfile-solaris	Tue Sep 08 15:39:51 2015 -0700
@@ -130,8 +130,8 @@
 		Java_sun_nio_ch_SolarisEventPort_port_1get;
 		Java_sun_nio_ch_SolarisEventPort_port_1getn;
 		Java_sun_nio_ch_SolarisEventPort_port_1send;
-		Java_sun_nio_fs_GnomeFileTypeDetector_initializeGio;
-		Java_sun_nio_fs_GnomeFileTypeDetector_probeGio;
+		Java_sun_nio_fs_GioFileTypeDetector_initializeGio;
+		Java_sun_nio_fs_GioFileTypeDetector_probeGio;
 		Java_sun_nio_fs_UnixNativeDispatcher_init;
 		Java_sun_nio_fs_UnixNativeDispatcher_getcwd;
 		Java_sun_nio_fs_UnixNativeDispatcher_strerror;
--- a/jdk/make/netbeans/jdbc/build.properties	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/make/netbeans/jdbc/build.properties	Tue Sep 08 15:39:51 2015 -0700
@@ -43,4 +43,4 @@
 build.number = b00
 jdbc.version = ${build.release}-${user.name}-${build.number}
 jdbc.args = -debug
-javadoc.options=-J-Xmx256m -Xdoclint:none -keywords  -quiet
\ No newline at end of file
+javadoc.options=-J-Xmx256m -Xdoclint:none -keywords  -quiet
--- a/jdk/src/demo/share/applets/Fractal/example1.html	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/demo/share/applets/Fractal/example1.html	Tue Sep 08 15:39:51 2015 -0700
@@ -23,5 +23,3 @@
       <a href="CLSFractal.java">The source</a>.
   </body>
 </html>
-
-
--- a/jdk/src/demo/share/applets/MoleculeViewer/example1.html	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/demo/share/applets/MoleculeViewer/example1.html	Tue Sep 08 15:39:51 2015 -0700
@@ -14,9 +14,3 @@
       <a href="XYZApp.java">The source</a>.
   </body>
 </html>
-
-
-
-
-
-
--- a/jdk/src/java.base/linux/classes/sun/nio/fs/LinuxFileSystemProvider.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.base/linux/classes/sun/nio/fs/LinuxFileSystemProvider.java	Tue Sep 08 15:39:51 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -106,7 +106,7 @@
             new GetPropertyAction("user.home")), ".mime.types");
         Path etcMimeTypes = Paths.get("/etc/mime.types");
 
-        return chain(new GnomeFileTypeDetector(),
+        return chain(new GioFileTypeDetector(),
                      new MimeTypesFileTypeDetector(userMimeTypes),
                      new MimeTypesFileTypeDetector(etcMimeTypes),
                      new MagicFileTypeDetector());
--- a/jdk/src/java.base/share/classes/java/security/KeyStore.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/security/KeyStore.java	Tue Sep 08 15:39:51 2015 -0700
@@ -1611,8 +1611,13 @@
      * First the keystore type is determined by probing the specified file.
      * Then a keystore object is instantiated and loaded using the data from
      * that file.
-     * A password may be supplied to unlock the keystore data or perform an
-     * integrity check.
+     *
+     * <p>
+     * A password may be given to unlock the keystore
+     * (e.g. the keystore resides on a hardware token device),
+     * or to check the integrity of the keystore data.
+     * If a password is not given for integrity checking,
+     * then integrity checking is not performed.
      *
      * <p>
      * This method traverses the list of registered security
--- a/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.base/share/classes/sun/launcher/resources/launcher.properties	Tue Sep 08 15:39:51 2015 -0700
@@ -60,8 +60,8 @@
 \    -dsa | -disablesystemassertions\n\
 \                  disable system assertions\n\
 \    -agentlib:<libname>[=<options>]\n\
-\                  load native agent library <libname>, e.g. -agentlib:hprof\n\
-\                  see also, -agentlib:jdwp=help and -agentlib:hprof=help\n\
+\                  load native agent library <libname>, e.g. -agentlib:jdwp\n\
+\                  see also -agentlib:jdwp=help\n\
 \    -agentpath:<pathname>[=<options>]\n\
 \                  load native agent library by full pathname\n\
 \    -javaagent:<jarpath>[=<options>]\n\
--- a/jdk/src/java.base/share/native/libzip/Adler32.c	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.base/share/native/libzip/Adler32.c	Tue Sep 08 15:39:51 2015 -0700
@@ -66,5 +66,3 @@
     }
     return adler;
 }
-
-
--- a/jdk/src/java.base/solaris/classes/sun/nio/fs/SolarisFileSystemProvider.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.base/solaris/classes/sun/nio/fs/SolarisFileSystemProvider.java	Tue Sep 08 15:39:51 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -89,7 +89,7 @@
             new GetPropertyAction("user.home")), ".mime.types");
         Path etcMimeTypes = Paths.get("/etc/mime.types");
 
-        return chain(new GnomeFileTypeDetector(),
+        return chain(new GioFileTypeDetector(),
                      new MimeTypesFileTypeDetector(userMimeTypes),
                      new MimeTypesFileTypeDetector(etcMimeTypes));
     }
--- a/jdk/src/java.base/unix/classes/sun/net/www/content-types.properties	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.base/unix/classes/sun/net/www/content-types.properties	Tue Sep 08 15:39:51 2015 -0700
@@ -275,6 +275,3 @@
 application/xml: \
 	description=XML document;\
 	file_extensions=.xml
-
-
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/unix/classes/sun/nio/fs/GioFileTypeDetector.java	Tue Sep 08 15:39:51 2015 -0700
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.nio.fs;
+
+import java.nio.file.Path;
+import java.io.IOException;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * File type detector that uses the GNOME I/O library to guess the
+ * MIME type of a file.
+ */
+
+public class GioFileTypeDetector
+    extends AbstractFileTypeDetector
+{
+    // true if GIO is available
+    private final boolean gioAvailable;
+
+    public GioFileTypeDetector() {
+        gioAvailable = initializeGio();
+    }
+
+    @Override
+    public String implProbeContentType(Path obj) throws IOException {
+        if (!gioAvailable)
+            return null;
+        if (!(obj instanceof UnixPath))
+            return null;
+
+        UnixPath path = (UnixPath)obj;
+        NativeBuffer buffer = NativeBuffers.asNativeBuffer(path.getByteArrayForSysCalls());
+        try {
+            // GIO may access file so need permission check
+            path.checkRead();
+            byte[] type = probeGio(buffer.address());
+            return (type == null) ? null : Util.toString(type);
+        } finally {
+            buffer.release();
+        }
+
+    }
+
+    // GIO
+    private static native boolean initializeGio();
+    //
+    // The probeGIO() method is synchronized to avert potential problems
+    // such as crashes due to a suspected lack of thread safety in GIO.
+    //
+    private static synchronized native byte[] probeGio(long pathAddress);
+
+    static {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
+            public Void run() {
+                System.loadLibrary("nio");
+                return null;
+        }});
+    }
+}
--- a/jdk/src/java.base/unix/classes/sun/nio/fs/GnomeFileTypeDetector.java	Tue Sep 01 12:57:41 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.nio.fs;
-
-import java.nio.file.Path;
-import java.io.IOException;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-/**
- * File type detector that uses the GNOME I/O library to guess the
- * MIME type of a file.
- */
-
-public class GnomeFileTypeDetector
-    extends AbstractFileTypeDetector
-{
-    // true if GIO is available
-    private final boolean gioAvailable;
-
-    public GnomeFileTypeDetector() {
-        gioAvailable = initializeGio();
-    }
-
-    @Override
-    public String implProbeContentType(Path obj) throws IOException {
-        if (!gioAvailable)
-            return null;
-        if (!(obj instanceof UnixPath))
-            return null;
-
-        UnixPath path = (UnixPath)obj;
-        NativeBuffer buffer = NativeBuffers.asNativeBuffer(path.getByteArrayForSysCalls());
-        try {
-            // GIO may access file so need permission check
-            path.checkRead();
-            byte[] type = probeGio(buffer.address());
-            return (type == null) ? null : Util.toString(type);
-        } finally {
-            buffer.release();
-        }
-
-    }
-
-    // GIO
-    private static native boolean initializeGio();
-    private static synchronized native byte[] probeGio(long pathAddress);
-
-    static {
-        AccessController.doPrivileged(new PrivilegedAction<>() {
-            public Void run() {
-                System.loadLibrary("nio");
-                return null;
-        }});
-    }
-}
--- a/jdk/src/java.base/unix/native/libjava/FileDescriptor_md.c	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.base/unix/native/libjava/FileDescriptor_md.c	Tue Sep 08 15:39:51 2015 -0700
@@ -26,9 +26,11 @@
 #include <unistd.h>
 #include <fcntl.h>
 
+#include "jni.h"
+#include "jni_util.h"
 #include "jvm.h"
+
 #include "io_util_md.h"
-
 #include "java_io_FileDescriptor.h"
 
 /*******************************************************************/
@@ -47,8 +49,8 @@
 
 JNIEXPORT void JNICALL
 Java_java_io_FileDescriptor_initIDs(JNIEnv *env, jclass fdClass) {
-    IO_fd_fdID = (*env)->GetFieldID(env, fdClass, "fd", "I");
-    IO_append_fdID = (*env)->GetFieldID(env, fdClass, "append", "Z");
+    CHECK_NULL(IO_fd_fdID = (*env)->GetFieldID(env, fdClass, "fd", "I"));
+    CHECK_NULL(IO_append_fdID = (*env)->GetFieldID(env, fdClass, "append", "Z"));
 }
 
 /**************************************************************
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/java.base/unix/native/libnio/fs/GioFileTypeDetector.c	Tue Sep 08 15:39:51 2015 -0700
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#include "jni.h"
+#include "jni_util.h"
+#include "jvm.h"
+#include "jlong.h"
+
+#include <stdlib.h>
+#include <dlfcn.h>
+
+#ifdef __solaris__
+#include <strings.h>
+#endif
+
+#if defined(__linux__)
+#include <string.h>
+#endif
+
+/*
+ * For reference see for example the GFileInfo section at
+ * https://developer.gnome.org/gio/unstable/.
+ */
+
+/* Definitions for GIO */
+
+#define G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE "standard::content-type"
+
+typedef void* gpointer;
+typedef struct _GFile GFile;
+typedef struct _GFileInfo GFileInfo;
+typedef struct _GCancellable GCancellable;
+typedef struct _GError GError;
+
+typedef enum {
+  G_FILE_QUERY_INFO_NONE = 0
+} GFileQueryInfoFlags;
+
+typedef void (*g_type_init_func)(void);
+typedef void (*g_object_unref_func)(gpointer object);
+typedef GFile* (*g_file_new_for_path_func)(const char* path);
+typedef GFileInfo* (*g_file_query_info_func)(GFile *file,
+    const char *attributes, GFileQueryInfoFlags flags,
+    GCancellable *cancellable, GError **error);
+typedef char* (*g_file_info_get_content_type_func)(GFileInfo *info);
+
+static g_type_init_func g_type_init;
+static g_object_unref_func g_object_unref;
+static g_file_new_for_path_func g_file_new_for_path;
+static g_file_query_info_func g_file_query_info;
+static g_file_info_get_content_type_func g_file_info_get_content_type;
+
+
+#include "sun_nio_fs_GioFileTypeDetector.h"
+
+
+JNIEXPORT jboolean JNICALL
+Java_sun_nio_fs_GioFileTypeDetector_initializeGio
+    (JNIEnv* env, jclass this)
+{
+    void* gio_handle;
+
+    gio_handle = dlopen("libgio-2.0.so", RTLD_LAZY);
+    if (gio_handle == NULL) {
+        gio_handle = dlopen("libgio-2.0.so.0", RTLD_LAZY);
+        if (gio_handle == NULL) {
+            return JNI_FALSE;
+        }
+    }
+
+    g_type_init = (g_type_init_func)dlsym(gio_handle, "g_type_init");
+    (*g_type_init)();
+
+    g_object_unref = (g_object_unref_func)dlsym(gio_handle, "g_object_unref");
+
+    g_file_new_for_path =
+        (g_file_new_for_path_func)dlsym(gio_handle, "g_file_new_for_path");
+
+    g_file_query_info =
+        (g_file_query_info_func)dlsym(gio_handle, "g_file_query_info");
+
+    g_file_info_get_content_type = (g_file_info_get_content_type_func)
+        dlsym(gio_handle, "g_file_info_get_content_type");
+
+
+    if (g_type_init == NULL ||
+        g_object_unref == NULL ||
+        g_file_new_for_path == NULL ||
+        g_file_query_info == NULL ||
+        g_file_info_get_content_type == NULL)
+    {
+        dlclose(gio_handle);
+        return JNI_FALSE;
+    }
+
+    (*g_type_init)();
+    return JNI_TRUE;
+}
+
+JNIEXPORT jbyteArray JNICALL
+Java_sun_nio_fs_GioFileTypeDetector_probeGio
+    (JNIEnv* env, jclass this, jlong pathAddress)
+{
+    char* path = (char*)jlong_to_ptr(pathAddress);
+    GFile* gfile;
+    GFileInfo* gfileinfo;
+    jbyteArray result = NULL;
+
+    gfile = (*g_file_new_for_path)(path);
+    gfileinfo = (*g_file_query_info)(gfile, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+        G_FILE_QUERY_INFO_NONE, NULL, NULL);
+    if (gfileinfo != NULL) {
+        const char* mime = (*g_file_info_get_content_type)(gfileinfo);
+        if (mime != NULL) {
+            jsize len = strlen(mime);
+            result = (*env)->NewByteArray(env, len);
+            if (result != NULL) {
+                (*env)->SetByteArrayRegion(env, result, 0, len, (jbyte*)mime);
+            }
+        }
+        (*g_object_unref)(gfileinfo);
+    }
+    (*g_object_unref)(gfile);
+
+    return result;
+}
--- a/jdk/src/java.base/unix/native/libnio/fs/GnomeFileTypeDetector.c	Tue Sep 01 12:57:41 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include "jni.h"
-#include "jni_util.h"
-#include "jvm.h"
-#include "jlong.h"
-
-#include <stdlib.h>
-#include <dlfcn.h>
-
-#ifdef __solaris__
-#include <strings.h>
-#endif
-
-#if defined(__linux__)
-#include <string.h>
-#endif
-
-/*
- * For reference see for example the GFileInfo section at
- * https://developer.gnome.org/gio/unstable/.
- */
-
-/* Definitions for GIO */
-
-#define G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE "standard::content-type"
-
-typedef void* gpointer;
-typedef struct _GFile GFile;
-typedef struct _GFileInfo GFileInfo;
-typedef struct _GCancellable GCancellable;
-typedef struct _GError GError;
-
-typedef enum {
-  G_FILE_QUERY_INFO_NONE = 0
-} GFileQueryInfoFlags;
-
-typedef void (*g_type_init_func)(void);
-typedef void (*g_object_unref_func)(gpointer object);
-typedef GFile* (*g_file_new_for_path_func)(const char* path);
-typedef GFileInfo* (*g_file_query_info_func)(GFile *file,
-    const char *attributes, GFileQueryInfoFlags flags,
-    GCancellable *cancellable, GError **error);
-typedef char* (*g_file_info_get_content_type_func)(GFileInfo *info);
-
-static g_type_init_func g_type_init;
-static g_object_unref_func g_object_unref;
-static g_file_new_for_path_func g_file_new_for_path;
-static g_file_query_info_func g_file_query_info;
-static g_file_info_get_content_type_func g_file_info_get_content_type;
-
-
-#include "sun_nio_fs_GnomeFileTypeDetector.h"
-
-
-JNIEXPORT jboolean JNICALL
-Java_sun_nio_fs_GnomeFileTypeDetector_initializeGio
-    (JNIEnv* env, jclass this)
-{
-    void* gio_handle;
-
-    gio_handle = dlopen("libgio-2.0.so", RTLD_LAZY);
-    if (gio_handle == NULL) {
-        gio_handle = dlopen("libgio-2.0.so.0", RTLD_LAZY);
-        if (gio_handle == NULL) {
-            return JNI_FALSE;
-        }
-    }
-
-    g_type_init = (g_type_init_func)dlsym(gio_handle, "g_type_init");
-    (*g_type_init)();
-
-    g_object_unref = (g_object_unref_func)dlsym(gio_handle, "g_object_unref");
-
-    g_file_new_for_path =
-        (g_file_new_for_path_func)dlsym(gio_handle, "g_file_new_for_path");
-
-    g_file_query_info =
-        (g_file_query_info_func)dlsym(gio_handle, "g_file_query_info");
-
-    g_file_info_get_content_type = (g_file_info_get_content_type_func)
-        dlsym(gio_handle, "g_file_info_get_content_type");
-
-
-    if (g_type_init == NULL ||
-        g_object_unref == NULL ||
-        g_file_new_for_path == NULL ||
-        g_file_query_info == NULL ||
-        g_file_info_get_content_type == NULL)
-    {
-        dlclose(gio_handle);
-        return JNI_FALSE;
-    }
-
-    (*g_type_init)();
-    return JNI_TRUE;
-}
-
-JNIEXPORT jbyteArray JNICALL
-Java_sun_nio_fs_GnomeFileTypeDetector_probeGio
-    (JNIEnv* env, jclass this, jlong pathAddress)
-{
-    char* path = (char*)jlong_to_ptr(pathAddress);
-    GFile* gfile;
-    GFileInfo* gfileinfo;
-    jbyteArray result = NULL;
-
-    gfile = (*g_file_new_for_path)(path);
-    gfileinfo = (*g_file_query_info)(gfile, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
-        G_FILE_QUERY_INFO_NONE, NULL, NULL);
-    if (gfileinfo != NULL) {
-        const char* mime = (*g_file_info_get_content_type)(gfileinfo);
-        if (mime != NULL) {
-            jsize len = strlen(mime);
-            result = (*env)->NewByteArray(env, len);
-            if (result != NULL) {
-                (*env)->SetByteArrayRegion(env, result, 0, len, (jbyte*)mime);
-            }
-        }
-        (*g_object_unref)(gfileinfo);
-    }
-    (*g_object_unref)(gfile);
-
-    return result;
-}
--- a/jdk/src/java.base/windows/classes/sun/net/www/content-types.properties	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.base/windows/classes/sun/net/www/content-types.properties	Tue Sep 08 15:39:51 2015 -0700
@@ -272,5 +272,3 @@
 application/xml: \
 	description=XML document;\
 	file_extensions=.xml
-
-
--- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_OpenAppHandler.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_OpenAppHandler.java	Tue Sep 08 15:39:51 2015 -0700
@@ -27,4 +27,4 @@
 
 interface _OpenAppHandler {
     void handleOpenApp();
-}
\ No newline at end of file
+}
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaLookAndFeel.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaLookAndFeel.java	Tue Sep 08 15:39:51 2015 -0700
@@ -1098,4 +1098,4 @@
         };
         table.putDefaults(uiDefaults);
     }
-}
\ No newline at end of file
+}
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDataTransferer.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDataTransferer.java	Tue Sep 08 15:39:51 2015 -0700
@@ -278,5 +278,3 @@
         return false;
     }
 }
-
-
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m	Tue Sep 08 15:39:51 2015 -0700
@@ -1406,5 +1406,3 @@
     
     return underMouse;
 }
-
-
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CClipboard.m	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CClipboard.m	Tue Sep 08 15:39:51 2015 -0700
@@ -289,4 +289,4 @@
                                                                                               
     JNF_COCOA_EXIT(env);                                                                      
     return ret;                                                                               
-}                                                                                             
\ No newline at end of file
+}                                                                                             
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/MultiResolutionCachedImage.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/MultiResolutionCachedImage.java	Tue Sep 08 15:39:51 2015 -0700
@@ -183,4 +183,4 @@
             return false;
         }
     }
-}
\ No newline at end of file
+}
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/AnchorTables.h	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/AnchorTables.h	Tue Sep 08 15:39:51 2015 -0700
@@ -80,5 +80,3 @@
 
 U_NAMESPACE_END
 #endif
-
-
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/CharSubstitutionFilter.h	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/CharSubstitutionFilter.h	Tue Sep 08 15:39:51 2015 -0700
@@ -104,5 +104,3 @@
 
 U_NAMESPACE_END
 #endif
-
-
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/CursiveAttachmentSubtables.h	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/CursiveAttachmentSubtables.h	Tue Sep 08 15:39:51 2015 -0700
@@ -63,5 +63,3 @@
 
 U_NAMESPACE_END
 #endif
-
-
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/DeviceTables.h	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/DeviceTables.h	Tue Sep 08 15:39:51 2015 -0700
@@ -61,5 +61,3 @@
 
 U_NAMESPACE_END
 #endif
-
-
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/MPreFixups.h	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/MPreFixups.h	Tue Sep 08 15:39:51 2015 -0700
@@ -63,5 +63,3 @@
 
 U_NAMESPACE_END
 #endif
-
-
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/MarkArrays.h	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/MarkArrays.h	Tue Sep 08 15:39:51 2015 -0700
@@ -62,5 +62,3 @@
 
 U_NAMESPACE_END
 #endif
-
-
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/PairPositioningSubtables.h	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/PairPositioningSubtables.h	Tue Sep 08 15:39:51 2015 -0700
@@ -109,5 +109,3 @@
 
 U_NAMESPACE_END
 #endif
-
-
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/SinglePositioningSubtables.h	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/SinglePositioningSubtables.h	Tue Sep 08 15:39:51 2015 -0700
@@ -71,5 +71,3 @@
 
 U_NAMESPACE_END
 #endif
-
-
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/SingleSubstitutionSubtables.h	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/SingleSubstitutionSubtables.h	Tue Sep 08 15:39:51 2015 -0700
@@ -68,5 +68,3 @@
 
 U_NAMESPACE_END
 #endif
-
-
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/ThaiShaping.h	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/ThaiShaping.h	Tue Sep 08 15:39:51 2015 -0700
@@ -129,5 +129,3 @@
 
 U_NAMESPACE_END
 #endif
-
-
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/ValueRecords.h	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/ValueRecords.h	Tue Sep 08 15:39:51 2015 -0700
@@ -94,5 +94,3 @@
 
 U_NAMESPACE_END
 #endif
-
-
--- a/jdk/src/java.desktop/share/native/liblcms/cmslut.c	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/share/native/liblcms/cmslut.c	Tue Sep 08 15:39:51 2015 -0700
@@ -1836,5 +1836,3 @@
 
     return TRUE;
 }
-
-
--- a/jdk/src/java.desktop/share/native/liblcms/cmsmtrx.c	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/share/native/liblcms/cmsmtrx.c	Tue Sep 08 15:39:51 2015 -0700
@@ -201,5 +201,3 @@
     r->n[VY] = a->v[1].n[VX]*v->n[VX] + a->v[1].n[VY]*v->n[VY] + a->v[1].n[VZ]*v->n[VZ];
     r->n[VZ] = a->v[2].n[VX]*v->n[VX] + a->v[2].n[VY]*v->n[VY] + a->v[2].n[VZ]*v->n[VZ];
 }
-
-
--- a/jdk/src/java.desktop/share/native/liblcms/cmsplugin.c	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/share/native/liblcms/cmsplugin.c	Tue Sep 08 15:39:51 2015 -0700
@@ -989,5 +989,3 @@
 {
     return _cmsContextGetClientChunk(ContextID, UserPtr);
 }
-
-
--- a/jdk/src/java.desktop/share/native/liblcms/cmswtpnt.c	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/share/native/liblcms/cmswtpnt.c	Tue Sep 08 15:39:51 2015 -0700
@@ -376,5 +376,3 @@
 
     return TRUE;
 }
-
-
--- a/jdk/src/java.desktop/share/native/libsplashscreen/java_awt_SplashScreen.c	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libsplashscreen/java_awt_SplashScreen.c	Tue Sep 08 15:39:51 2015 -0700
@@ -234,4 +234,4 @@
         return 1;
     }
     return splash->scaleFactor;
-}
\ No newline at end of file
+}
--- a/jdk/src/java.desktop/windows/native/libawt/windows/DllUtil.cpp	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/DllUtil.cpp	Tue Sep 08 15:39:51 2015 -0700
@@ -84,5 +84,3 @@
     }
     throw FunctionUnavailableException();
 }
-
-
--- a/jdk/src/java.desktop/windows/native/libawt/windows/README.JNI	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/README.JNI	Tue Sep 08 15:39:51 2015 -0700
@@ -131,5 +131,3 @@
 
     2. Handle exceptions properly. The current code lacks error checking
     and recovery. This leads to random runtime crashes.
-
-
--- a/jdk/src/java.logging/share/classes/java/util/logging/package.html	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.logging/share/classes/java/util/logging/package.html	Tue Sep 08 15:39:51 2015 -0700
@@ -126,8 +126,3 @@
 
 </body>
 </html>
-
-
-
-
-
--- a/jdk/src/java.management/share/classes/javax/management/ObjectName.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.management/share/classes/javax/management/ObjectName.java	Tue Sep 08 15:39:51 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -218,9 +218,19 @@
  * <p>The <b>serialVersionUID</b> of this class is <code>1081892073854801359L</code>.
  *
  * @since 1.5
+ *
+ * @implNote The maximum allowed length of the domain name in this implementation
+ *           is {@code Integer.MAX_VALUE/4}
  */
 @SuppressWarnings("serial") // don't complain serialVersionUID not constant
 public class ObjectName implements Comparable<ObjectName>, QueryExp {
+    private static final int DOMAIN_PATTERN = 0x8000_0000;
+    private static final int PROPLIST_PATTERN = 0x4000_0000;
+    private static final int PROPVAL_PATTERN = 0x2000_0000;
+
+    private static final int FLAG_MASK = DOMAIN_PATTERN | PROPLIST_PATTERN |
+                                         PROPVAL_PATTERN;
+    private static final int DOMAIN_LENGTH_MASK = ~FLAG_MASK;
 
     /**
      * A structure recording property structure and
@@ -365,33 +375,25 @@
 
 
     /**
-     * The length of the domain part of built objectname
-     */
-    private transient int _domain_length = 0;
-
-
-    /**
      * The propertyList of built object name. Initialized lazily.
      * Table that contains all the pairs (key,value) for this ObjectName.
      */
     private transient Map<String,String> _propertyList;
 
     /**
-     * boolean that declares if this ObjectName domain part is a pattern
+     * This field encodes _domain_pattern, _property_list_pattern and
+     * _property_value_pattern booleans and _domain_length integer.
+     * <p>
+     * The following masks can be used to extract the value:
+     * <ul>
+     * <li>{@linkplain ObjectName#DOMAIN_PATTERN}</li>
+     * <li>{@linkplain ObjectName#PROPLIST_PATTERN}</li>
+     * <li>{@linkplain ObjectName#PROPVAL_PATTERN}</li>
+     * <li>{@linkplain ObjectName#DOMAIN_LENGTH_MASK}</li>
+     * </ul>
+     * </p>.
      */
-    private transient boolean _domain_pattern = false;
-
-    /**
-     * boolean that declares if this ObjectName contains a pattern on the
-     * key property list
-     */
-    private transient boolean _property_list_pattern = false;
-
-    /**
-     * boolean that declares if this ObjectName contains a pattern on the
-     * value of at least one key property
-     */
-    private transient boolean _property_value_pattern = false;
+    private transient int _compressed_storage = 0x0;
 
     // Instance private fields <=======================================
 
@@ -426,11 +428,11 @@
             _canonicalName = "*:*";
             _kp_array = _Empty_property_array;
             _ca_array = _Empty_property_array;
-            _domain_length = 1;
+            setDomainLength(1);
             _propertyList = null;
-            _domain_pattern = true;
-            _property_list_pattern = true;
-            _property_value_pattern = false;
+            setDomainPattern(true);
+            setPropertyListPattern(true);
+            setPropertyValuePattern(false);
             return;
         }
 
@@ -448,7 +450,7 @@
         while (index < len) {
             switch (name_chars[index]) {
                 case ':' :
-                    _domain_length = index++;
+                    setDomainLength(index++);
                     break domain_parsing;
                 case '=' :
                     // ":" omission check.
@@ -469,7 +471,7 @@
                               "Invalid character '\\n' in domain name");
                 case '*' :
                 case '?' :
-                    _domain_pattern = true;
+                    setDomainPattern(true);
                     index++;
                     break;
                 default :
@@ -484,6 +486,7 @@
                                          "Key properties cannot be empty");
 
         // we have got the domain part, begins building of _canonicalName
+        int _domain_length = getDomainLength();
         System.arraycopy(name_chars, 0, canonical_chars, 0, _domain_length);
         canonical_chars[_domain_length] = ':';
         cname_index = _domain_length + 1;
@@ -500,20 +503,20 @@
 
         keys = new String[10];
         _kp_array = new Property[10];
-        _property_list_pattern = false;
-        _property_value_pattern = false;
+        setPropertyListPattern(false);
+        setPropertyValuePattern(false);
 
         while (index < len) {
             c = name_chars[index];
 
             // case of pattern properties
             if (c == '*') {
-                if (_property_list_pattern)
+                if (isPropertyListPattern())
                     throw new MalformedObjectNameException(
                               "Cannot have several '*' characters in pattern " +
                               "property list");
                 else {
-                    _property_list_pattern = true;
+                    setPropertyListPattern(true);
                     if ((++index < len ) && (name_chars[index] != ','))
                         throw new MalformedObjectNameException(
                                   "Invalid character found after '*': end of " +
@@ -639,7 +642,7 @@
             if (!value_pattern) {
                 prop = new Property(key_index, key_length, value_length);
             } else {
-                _property_value_pattern = true;
+                setPropertyValuePattern(true);
                 prop = new PatternProperty(key_index, key_length, value_length);
             }
             key_name = name.substring(key_index, key_index + key_length);
@@ -670,7 +673,8 @@
      * @exception MalformedObjectNameException The <code>domain</code>
      * contains an illegal character, or one of the keys or values in
      * <code>table</code> contains an illegal character, or one of the
-     * values in <code>table</code> does not follow the rules for quoting.
+     * values in <code>table</code> does not follow the rules for quoting,
+     * or the domain's length exceeds the maximum allowed length.
      * @exception NullPointerException One of the parameters is null.
      */
     private void construct(String domain, Map<String,String> props)
@@ -696,7 +700,7 @@
         // init canonicalname
         final StringBuilder sb = new StringBuilder();
         sb.append(domain).append(':');
-        _domain_length = domain.length();
+        setDomainLength(domain.length());
 
         // allocates the property array
         int nb_props = props.size();
@@ -729,7 +733,7 @@
                                     key.length(),
                                     value.length());
             } else {
-                _property_value_pattern = true;
+                setPropertyValuePattern(true);
                 prop = new PatternProperty(key_index,
                                            key.length(),
                                            value.length());
@@ -743,10 +747,10 @@
         char[] initial_chars = new char[len];
         sb.getChars(0, len, initial_chars, 0);
         char[] canonical_chars = new char[len];
-        System.arraycopy(initial_chars, 0, canonical_chars, 0,
-                         _domain_length + 1);
+        int copyLen = getDomainLength() + 1;
+        System.arraycopy(initial_chars, 0, canonical_chars, 0, copyLen);
         setCanonicalName(initial_chars, canonical_chars, keys, keys_map,
-                         _domain_length + 1, _kp_array.length);
+                         copyLen, _kp_array.length);
     }
     // Category : Instance construction <==============================
 
@@ -822,7 +826,7 @@
         }
 
         // terminate canonicalname with '*' in case of pattern
-        if (_property_list_pattern) {
+        if (isPropertyListPattern()) {
             if (_kp_array != _Empty_property_array)
                 canonical_chars[prop_index++] = ',';
             canonical_chars[prop_index++] = '*';
@@ -1051,13 +1055,32 @@
                     return false;
                 case '*' :
                 case '?' :
-                    _domain_pattern = true;
+                    setDomainPattern(true);
                     break;
             }
         }
         return true;
     }
 
+    private int getDomainLength() {
+        return _compressed_storage & DOMAIN_LENGTH_MASK;
+    }
+
+    /**
+     * Validates and sets the domain length
+     * @param length The domain length
+     * @throws MalformedObjectNameException
+     *    When the given domain length exceeds the maximum allowed length
+     */
+    private void setDomainLength(int length) throws MalformedObjectNameException {
+        if ((length & FLAG_MASK) != 0 ) {
+            throw new MalformedObjectNameException(
+                "Domain name too long. Maximum allowed domain name length is:" +
+                DOMAIN_LENGTH_MASK);
+        }
+        _compressed_storage = (_compressed_storage & FLAG_MASK) | length;
+    }
+
     // Category : Internal accessors <==============================
 
     // Category : Serialization ----------------------------------->
@@ -1225,12 +1248,12 @@
         // Serializes this instance in the old serial form
         // Read CR 6441274 before making any changes to this code
         ObjectOutputStream.PutField fields = out.putFields();
-        fields.put("domain", _canonicalName.substring(0, _domain_length));
+        fields.put("domain", _canonicalName.substring(0, getDomainLength()));
         fields.put("propertyList", getKeyPropertyList());
         fields.put("propertyListString", getKeyPropertyListString());
         fields.put("canonicalName", _canonicalName);
-        fields.put("pattern", (_domain_pattern || _property_list_pattern));
-        fields.put("propertyPattern", _property_list_pattern);
+        fields.put("pattern", (_compressed_storage & (DOMAIN_PATTERN | PROPLIST_PATTERN)) != 0);
+        fields.put("propertyPattern", isPropertyListPattern());
         out.writeFields();
       }
       else
@@ -1291,7 +1314,8 @@
      * @exception MalformedObjectNameException The
      * <code>domain</code>, <code>key</code>, or <code>value</code>
      * contains an illegal character, or <code>value</code> does not
-     * follow the rules for quoting.
+     * follow the rules for quoting, or the domain's length exceeds
+     * the maximum allowed length.
      * @exception NullPointerException One of the parameters is null.
      *
      */
@@ -1322,7 +1346,7 @@
      * contains an illegal character, or one of the keys or values in
      * <code>table</code> contains an illegal character, or one of the
      * values in <code>table</code> does not follow the rules for
-     * quoting.
+     * quoting, or the domain's length exceeds the maximum allowed length.
      * @exception NullPointerException One of the parameters is null.
      *
      */
@@ -1392,7 +1416,8 @@
      * @exception MalformedObjectNameException The
      * <code>domain</code>, <code>key</code>, or <code>value</code>
      * contains an illegal character, or <code>value</code> does not
-     * follow the rules for quoting.
+     * follow the rules for quoting, or the domain's length exceeds
+     * the maximum allowed length.
      * @exception NullPointerException One of the parameters is null.
      */
     public ObjectName(String domain, String key, String value)
@@ -1417,7 +1442,7 @@
      * contains an illegal character, or one of the keys or values in
      * <code>table</code> contains an illegal character, or one of the
      * values in <code>table</code> does not follow the rules for
-     * quoting.
+     * quoting, or the domain's length exceeds the maximum allowed length.
      * @exception NullPointerException One of the parameters is null.
      */
     public ObjectName(String domain, Hashtable<String,String> table)
@@ -1443,9 +1468,7 @@
      * @return  True if the name is a pattern, otherwise false.
      */
     public boolean isPattern() {
-        return (_domain_pattern ||
-                _property_list_pattern ||
-                _property_value_pattern);
+        return (_compressed_storage & FLAG_MASK) != 0;
     }
 
     /**
@@ -1455,7 +1478,20 @@
      *
      */
     public boolean isDomainPattern() {
-        return _domain_pattern;
+        return (_compressed_storage & DOMAIN_PATTERN) != 0;
+    }
+
+    /**
+     * Marks the object name as representing a pattern on the domain part.
+     * @param value {@code true} if the domain name is a pattern,
+     *              {@code false} otherwise
+     */
+    private void setDomainPattern(boolean value) {
+        if (value) {
+            _compressed_storage |= DOMAIN_PATTERN;
+        } else {
+            _compressed_storage &= ~DOMAIN_PATTERN;
+        }
     }
 
     /**
@@ -1468,7 +1504,7 @@
      * @return  True if the name is a property pattern, otherwise false.
      */
     public boolean isPropertyPattern() {
-        return _property_list_pattern || _property_value_pattern;
+        return (_compressed_storage & (PROPVAL_PATTERN | PROPLIST_PATTERN)) != 0;
     }
 
     /**
@@ -1482,7 +1518,20 @@
      * @since 1.6
      */
     public boolean isPropertyListPattern() {
-        return _property_list_pattern;
+        return (_compressed_storage & PROPLIST_PATTERN) != 0;
+    }
+
+    /**
+     * Marks the object name as representing a pattern on the key property list.
+     * @param value {@code true} if the key property list is a pattern,
+     *              {@code false} otherwise
+     */
+    private void setPropertyListPattern(boolean value) {
+        if (value) {
+            _compressed_storage |= PROPLIST_PATTERN;
+        } else {
+            _compressed_storage &= ~PROPLIST_PATTERN;
+        }
     }
 
     /**
@@ -1497,7 +1546,20 @@
      * @since 1.6
      */
     public boolean isPropertyValuePattern() {
-        return _property_value_pattern;
+        return (_compressed_storage & PROPVAL_PATTERN) != 0;
+    }
+
+    /**
+     * Marks the object name as representing a pattern on the value part.
+     * @param value {@code true} if the value part of at least one of the
+     *              key properties is a pattern, {@code false} otherwise
+     */
+    private void setPropertyValuePattern(boolean value) {
+        if (value) {
+            _compressed_storage |= PROPVAL_PATTERN;
+        } else {
+            _compressed_storage &= ~PROPVAL_PATTERN;
+        }
     }
 
     /**
@@ -1563,7 +1625,7 @@
      * @return The domain.
      */
     public String getDomain()  {
-        return _canonicalName.substring(0, _domain_length);
+        return _canonicalName.substring(0, getDomainLength());
     }
 
     /**
@@ -1640,8 +1702,8 @@
 
         // the size of the string is the canonical one minus domain
         // part and pattern part
-        final int total_size = _canonicalName.length() - _domain_length - 1
-            - (_property_list_pattern?2:0);
+        final int total_size = _canonicalName.length() - getDomainLength() - 1
+            - (isPropertyListPattern()?2:0);
 
         final char[] dest_chars = new char[total_size];
         final char[] value = _canonicalName.toCharArray();
@@ -1665,7 +1727,7 @@
         final int total_size = _canonicalName.length();
         final char[] dest_chars = new char[total_size];
         final char[] value = _canonicalName.toCharArray();
-        final int offset = _domain_length+1;
+        final int offset = getDomainLength() + 1;
 
         // copy "domain:" into dest_chars
         //
@@ -1675,7 +1737,7 @@
         final int end = writeKeyPropertyListString(value,dest_chars,offset);
 
         // Add ",*" if necessary
-        if (_property_list_pattern) {
+        if (isPropertyListPattern()) {
             if (end == offset)  {
                 // Property list string is empty.
                 dest_chars[end] = '*';
@@ -1737,8 +1799,8 @@
         if (_ca_array.length == 0) return "";
 
         int len = _canonicalName.length();
-        if (_property_list_pattern) len -= 2;
-        return _canonicalName.substring(_domain_length +1, len);
+        if (isPropertyListPattern()) len -= 2;
+        return _canonicalName.substring(getDomainLength() + 1, len);
     }
     // Category : Getter methods <===================================
 
@@ -1944,22 +2006,18 @@
 
         if (name == null) throw new NullPointerException();
 
-        if (name._domain_pattern ||
-            name._property_list_pattern ||
-            name._property_value_pattern)
+        if (name.isPattern())
             return false;
 
         // No pattern
-        if (!_domain_pattern &&
-            !_property_list_pattern &&
-            !_property_value_pattern)
+        if (!isPattern())
             return _canonicalName.equals(name._canonicalName);
 
         return matchDomains(name) && matchKeys(name);
     }
 
     private final boolean matchDomains(ObjectName name) {
-        if (_domain_pattern) {
+        if (isDomainPattern()) {
             // wildmatch domains
             // This ObjectName is the pattern
             // The other ObjectName is the string.
@@ -1972,15 +2030,15 @@
         // If key property value pattern but not key property list
         // pattern, then the number of key properties must be equal
         //
-        if (_property_value_pattern &&
-            !_property_list_pattern &&
+        if (isPropertyValuePattern() &&
+            !isPropertyListPattern() &&
             (name._ca_array.length != _ca_array.length))
                 return false;
 
         // If key property value pattern or key property list pattern,
         // then every property inside pattern should exist in name
         //
-        if (_property_value_pattern || _property_list_pattern) {
+        if (isPropertyPattern()) {
             final Map<String,String> nameProps = name._getKeyPropertyList();
             final Property[] props = _ca_array;
             final String cn = _canonicalName;
@@ -1996,7 +2054,7 @@
                 if (v == null) return false;
                 // If this property is ok (same key, same value), go to next
                 //
-                if (_property_value_pattern && (p instanceof PatternProperty)) {
+                if (isPropertyValuePattern() && (p instanceof PatternProperty)) {
                     // wildmatch key property values
                     // p is the property pattern, v is the string
                     if (Util.wildmatch(v,p.getValueString(cn)))
--- a/jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/DelegationPermission.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/DelegationPermission.java	Tue Sep 08 15:39:51 2015 -0700
@@ -132,7 +132,9 @@
      * Checks if this Kerberos delegation permission object "implies" the
      * specified permission.
      * <P>
-     * If none of the above are true, {@code implies} returns false.
+     * This method returns true if this {@code DelegationPermission}
+     * is equal to {@code p}, and returns false otherwise.
+     *
      * @param p the permission to check against.
      *
      * @return true if the specified permission is implied by this object,
--- a/jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/ServicePermission.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.security.jgss/share/classes/javax/security/auth/kerberos/ServicePermission.java	Tue Sep 08 15:39:51 2015 -0700
@@ -179,7 +179,16 @@
      * Checks if this Kerberos service permission object "implies" the
      * specified permission.
      * <P>
-     * If none of the above are true, {@code implies} returns false.
+     * More specifically, this method returns true if all of the following
+     * are true (and returns false if any of them are not):
+     * <ul>
+     * <li> <i>p</i> is an instanceof {@code ServicePermission},
+     * <li> <i>p</i>'s actions are a proper subset of this
+     * {@code ServicePermission}'s actions,
+     * <li> <i>p</i>'s name is equal to this {@code ServicePermission}'s name
+     * or this {@code ServicePermission}'s name is "*".
+     * </ul>
+     *
      * @param p the permission to check against.
      *
      * @return true if the specified permission is implied by this object,
--- a/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/BaseRowSet.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/BaseRowSet.java	Tue Sep 08 15:39:51 2015 -0700
@@ -4467,4 +4467,4 @@
 
    static final long serialVersionUID = 4886719666485113312L;
 
-} //end class
\ No newline at end of file
+} //end class
--- a/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/RowSetFactory.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.sql.rowset/share/classes/javax/sql/rowset/RowSetFactory.java	Tue Sep 08 15:39:51 2015 -0700
@@ -96,4 +96,4 @@
      */
     public  WebRowSet createWebRowSet() throws SQLException;
 
-}
\ No newline at end of file
+}
--- a/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/package.html	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/algorithms/package.html	Tue Sep 08 15:39:51 2015 -0700
@@ -1,3 +1,3 @@
 <HTML><HEAD></HEAD><BODY><P>
 algorithm factories.
-</P></BODY></HTML>
\ No newline at end of file
+</P></BODY></HTML>
--- a/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/package.html	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/keyvalues/package.html	Tue Sep 08 15:39:51 2015 -0700
@@ -1,3 +1,3 @@
 <HTML><HEAD></HEAD><BODY><P>
 basic handlers for elements that can occur inside <CODE>ds:KeyValue</CODE>.
-</P></BODY></HTML>
\ No newline at end of file
+</P></BODY></HTML>
--- a/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/package.html	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/package.html	Tue Sep 08 15:39:51 2015 -0700
@@ -1,3 +1,3 @@
 <HTML><HEAD></HEAD><BODY><P>
 basic handlers for elements that can occur inside <CODE>ds:KeyInfo</CODE>.
-</P></BODY></HTML>
\ No newline at end of file
+</P></BODY></HTML>
--- a/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/package.html	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/content/x509/package.html	Tue Sep 08 15:39:51 2015 -0700
@@ -1,3 +1,3 @@
 <HTML><HEAD></HEAD><BODY><P>
 basic handlers for elements that can occur inside <CODE>ds:X509Data</CODE>.
-</P></BODY></HTML>
\ No newline at end of file
+</P></BODY></HTML>
--- a/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/package.html	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/implementations/package.html	Tue Sep 08 15:39:51 2015 -0700
@@ -1,3 +1,3 @@
 <HTML><HEAD></HEAD><BODY><P>
 implementations for retrieval of certificates and public keys from elements.
-</P></BODY></HTML>
\ No newline at end of file
+</P></BODY></HTML>
--- a/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/package.html	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/package.html	Tue Sep 08 15:39:51 2015 -0700
@@ -1,3 +1,3 @@
 <HTML><HEAD></HEAD><BODY><P>
 the resolver framework for retrieval of certificates and public keys from elements.
-</P></BODY></HTML>
\ No newline at end of file
+</P></BODY></HTML>
--- a/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/implementations/package.html	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/implementations/package.html	Tue Sep 08 15:39:51 2015 -0700
@@ -1,3 +1,3 @@
 <HTML><HEAD></HEAD><BODY><P>
 implementations of resolvers for retrieval for certificates and public keys from user-specified locations.
-</P></BODY></HTML>
\ No newline at end of file
+</P></BODY></HTML>
--- a/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/package.html	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/keys/storage/package.html	Tue Sep 08 15:39:51 2015 -0700
@@ -1,3 +1,3 @@
 <HTML><HEAD></HEAD><BODY><P>
 a resolver framework for certificates and public keys from user-specified locations.
-</P></BODY></HTML>
\ No newline at end of file
+</P></BODY></HTML>
--- a/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/transforms/TransformParam.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/transforms/TransformParam.java	Tue Sep 08 15:39:51 2015 -0700
@@ -24,4 +24,4 @@
 package com.sun.org.apache.xml.internal.security.transforms;
 
 public interface TransformParam {
-}
\ No newline at end of file
+}
--- a/jdk/src/jdk.management/linux/native/libmanagement_ext/UnixOperatingSystem.c	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/jdk.management/linux/native/libmanagement_ext/UnixOperatingSystem.c	Tue Sep 08 15:39:51 2015 -0700
@@ -77,14 +77,17 @@
 static int get_totalticks(int which, ticks *pticks) {
     FILE         *fh;
     uint64_t        userTicks, niceTicks, systemTicks, idleTicks;
+    uint64_t        iowTicks = 0, irqTicks = 0, sirqTicks= 0;
     int             n;
 
     if((fh = fopen("/proc/stat", "r")) == NULL) {
         return -1;
     }
 
-    n = fscanf(fh, "cpu " DEC_64 " " DEC_64 " " DEC_64 " " DEC_64,
-           &userTicks, &niceTicks, &systemTicks, &idleTicks);
+    n = fscanf(fh, "cpu " DEC_64 " " DEC_64 " " DEC_64 " " DEC_64 " " DEC_64 " "
+                   DEC_64 " " DEC_64,
+           &userTicks, &niceTicks, &systemTicks, &idleTicks,
+           &iowTicks, &irqTicks, &sirqTicks);
 
     // Move to next line
     next_line(fh);
@@ -93,24 +96,30 @@
     if (which != -1) {
         int i;
         for (i = 0; i < which; i++) {
-            if (fscanf(fh, "cpu%*d " DEC_64 " " DEC_64 " " DEC_64 " " DEC_64, &userTicks, &niceTicks, &systemTicks, &idleTicks) != 4) {
+            if (fscanf(fh, "cpu%*d " DEC_64 " " DEC_64 " " DEC_64 " " DEC_64 " "
+                            DEC_64 " " DEC_64 " " DEC_64,
+                   &userTicks, &niceTicks, &systemTicks, &idleTicks,
+                   &iowTicks, &irqTicks, &sirqTicks) < 4) {
                 fclose(fh);
                 return -2;
             }
             next_line(fh);
         }
-        n = fscanf(fh, "cpu%*d " DEC_64 " " DEC_64 " " DEC_64 " " DEC_64 "\n",
-           &userTicks, &niceTicks, &systemTicks, &idleTicks);
+        n = fscanf(fh, "cpu%*d " DEC_64 " " DEC_64 " " DEC_64 " " DEC_64 " "
+                       DEC_64 " " DEC_64 " " DEC_64 "\n",
+           &userTicks, &niceTicks, &systemTicks, &idleTicks,
+           &iowTicks, &irqTicks, &sirqTicks);
     }
 
     fclose(fh);
-    if (n != 4) {
+    if (n < 4) {
         return -2;
     }
 
     pticks->used       = userTicks + niceTicks;
-    pticks->usedKernel = systemTicks;
-    pticks->total      = userTicks + niceTicks + systemTicks + idleTicks;
+    pticks->usedKernel = systemTicks + irqTicks + sirqTicks;
+    pticks->total      = userTicks + niceTicks + systemTicks + idleTicks +
+                         iowTicks + irqTicks + sirqTicks;
 
     return 0;
 }
--- a/jdk/src/sample/share/annotations/DependencyChecker/PluginChecker/src/checker/Kettle.xml	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/sample/share/annotations/DependencyChecker/PluginChecker/src/checker/Kettle.xml	Tue Sep 08 15:39:51 2015 -0700
@@ -54,4 +54,4 @@
             <value>4</value>
         </entry>
     </supportedModules>
-</device>
\ No newline at end of file
+</device>
--- a/jdk/src/sample/share/annotations/index.html	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/sample/share/annotations/index.html	Tue Sep 08 15:39:51 2015 -0700
@@ -64,4 +64,4 @@
         Sources: <a href="Validator/src/">Validator/src/</a>
 </ul>
 </body>
-</html>
\ No newline at end of file
+</html>
--- a/jdk/src/sample/share/lambda/BulkDataOperations/index.html	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/sample/share/lambda/BulkDataOperations/index.html	Tue Sep 08 15:39:51 2015 -0700
@@ -46,4 +46,4 @@
         Source: <a href="src/WC.java">src/WC.java</a>
 </ul>
 </body>
-</html>
\ No newline at end of file
+</html>
--- a/jdk/src/sample/share/try-with-resources/index.html	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/src/sample/share/try-with-resources/index.html	Tue Sep 08 15:39:51 2015 -0700
@@ -33,4 +33,4 @@
 
 </ul>
 </body>
-</html>
\ No newline at end of file
+</html>
--- a/jdk/test/ProblemList.txt	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/ProblemList.txt	Tue Sep 08 15:39:51 2015 -0700
@@ -319,6 +319,9 @@
 
 # jdk_time
 
+# 8134979
+java/time/tck/java/time/chrono/TCKJapaneseChronology.java       generic-all
+
 ############################################################################
 
 # jdk_tools
@@ -384,6 +387,11 @@
 # 6456333
 sun/tools/jps/TestJpsJarRelative.java				generic-all
 
+# 8134420
+sun/tools/jps/TestJpsClass.java				generic-all
+sun/tools/jps/TestJpsJar.java					generic-all
+sun/tools/jps/TestJpsSanity.java				generic-all
+
 # 6734748
 sun/tools/jinfo/JInfoRunningProcessFlagTest.java		generic-all
 
--- a/jdk/test/TEST.ROOT	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/TEST.ROOT	Tue Sep 08 15:39:51 2015 -0700
@@ -18,7 +18,7 @@
 othervm.dirs=java/awt java/beans javax/accessibility javax/imageio javax/sound javax/print javax/management com/sun/awt sun/awt sun/java2d sun/pisces javax/xml/jaxp/testng/validation java/lang/ProcessHandle
 
 # Tests that cannot run concurrently
-exclusiveAccess.dirs=java/rmi/Naming java/util/prefs sun/management/jmxremote sun/tools/jstatd sun/security/mscapi java/util/stream javax/rmi sun/tools/jps
+exclusiveAccess.dirs=java/rmi/Naming java/util/prefs sun/management/jmxremote sun/tools/jstatd sun/security/mscapi java/util/stream javax/rmi
 
 # Group definitions
 groups=TEST.groups [closed/TEST.groups]
--- a/jdk/test/com/sun/awt/SecurityWarning/GetSizeShouldNotReturnZero.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/com/sun/awt/SecurityWarning/GetSizeShouldNotReturnZero.java	Tue Sep 08 15:39:51 2015 -0700
@@ -374,5 +374,3 @@
     }
 
 }// TestDialog  class
-
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/crypto/provider/Cipher/Blowfish/TestCipherBlowfish.java	Tue Sep 08 15:39:51 2015 -0700
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.security.NoSuchAlgorithmException;
+
+/*
+ * @test
+ * @bug 8048601
+ * @library ../
+ * @summary Test Blowfish cipher with different MODES and padding
+ */
+
+public class TestCipherBlowfish extends TestCipher {
+
+    TestCipherBlowfish() throws NoSuchAlgorithmException {
+        super("Blowfish",
+                new String[]{"CBC", "CTR", "CTS", "ECB", "PCBC",
+                    //CFBx
+                    "CFB", "CFB8", "CFB16", "CFB24", "CFB32", "CFB40", "CFB48", "CFB56",
+                    "CFB64",
+                    //OFBx
+                    "OFB", "OFB8", "OFB16", "OFB24", "OFB32", "OFB40", "OFB48", "OFB56",
+                    "OFB64"},
+                new String[]{"NoPaDDing", "PKCS5Padding"},
+                true);
+    }
+
+    public static void main(String[] args) throws Exception {
+        new TestCipherBlowfish().runAll();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/crypto/provider/Cipher/DES/TestCipherDES.java	Tue Sep 08 15:39:51 2015 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8048601
+ * @library ../
+ * @summary Test DES/DESede cipher with different MODES and padding
+ */
+
+public class TestCipherDES extends TestCipher {
+
+    TestCipherDES() {
+        super("DES",
+                new String[]{"CBC", "CTR", "CTS", "ECB", "PCBC",
+                    //CFBx
+                    "CFB", "CFB8", "CFB16", "CFB24", "CFB32", "CFB40", "CFB48", "CFB56",
+                    "CFB64",
+                    //OFBx
+                    "OFB", "OFB8", "OFB16", "OFB24", "OFB32", "OFB40", "OFB48", "OFB56",
+                    "OFB64"},
+                new String[]{"NoPaDDing", "PKCS5Padding"});
+    }
+
+    public static void main(String[] args) throws Exception {
+        new TestCipherDES().runAll();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/crypto/provider/Cipher/DES/TestCipherDESede.java	Tue Sep 08 15:39:51 2015 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8048601
+ * @library ../
+ * @summary Test DES/DESede cipher with different MODES and padding
+ */
+
+public class TestCipherDESede extends TestCipher {
+
+    TestCipherDESede() {
+        super("DESede",
+                new String[]{"CBC", "CTR", "CTS", "ECB", "PCBC",
+                    //CFBx
+                    "CFB", "CFB8", "CFB16", "CFB24", "CFB32", "CFB40", "CFB48", "CFB56",
+                    "CFB64",
+                    //OFBx
+                    "OFB", "OFB8", "OFB16", "OFB24", "OFB32", "OFB40", "OFB48", "OFB56",
+                    "OFB64"},
+                new String[]{"NoPaDDing", "PKCS5Padding"});
+    }
+
+    public static void main(String[] args) throws Exception {
+        new TestCipherDESede().runAll();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/crypto/provider/Cipher/PBE/TestCipherPBE.java	Tue Sep 08 15:39:51 2015 -0700
@@ -0,0 +1,128 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import static java.lang.System.out;
+
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.spec.AlgorithmParameterSpec;
+import java.security.spec.InvalidKeySpecException;
+import java.util.Arrays;
+
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.ShortBufferException;
+import javax.crypto.spec.PBEKeySpec;
+import javax.crypto.spec.PBEParameterSpec;
+
+/*
+ * @test
+ * @bug 8048601
+ * @summary Tests for PBE ciphers
+ */
+public class TestCipherPBE {
+
+    private static final String[] ALGORITHMS = {"PBEWithMD5AndDES",
+        "PBEWithMD5AndDES/CBC/PKCS5Padding", "PBEWithMD5AndTripleDES",
+        "PBEWithMD5AndTripleDES/CBC/PKCS5Padding"};
+
+    private static final String KEY_ALGO = "pbeWithMD5ANDdes";
+    private final byte[] SALT;
+    private final byte[] PLAIN_TEXT;
+
+    public TestCipherPBE() {
+        SALT = generateBytes(8);
+        PLAIN_TEXT = generateBytes(200);
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        new TestCipherPBE().runAll();
+    }
+
+    private void runAll() throws Exception {
+        for (String algorithm : ALGORITHMS) {
+            runTest(algorithm);
+        }
+    }
+
+    private void runTest(String algorithm)
+            throws InvalidKeySpecException, NoSuchAlgorithmException,
+            InvalidAlgorithmParameterException, ShortBufferException,
+            NoSuchPaddingException, IllegalBlockSizeException,
+            BadPaddingException, InvalidKeyException {
+
+        out.println("=> Testing: " + algorithm);
+
+        try {
+            // Initialization
+            AlgorithmParameterSpec algoParamSpec
+                    = new PBEParameterSpec(SALT, 6);
+
+            SecretKey secretKey
+                    = SecretKeyFactory.getInstance(KEY_ALGO).generateSecret(
+                    new PBEKeySpec(("Secret Key Value").toCharArray()));
+
+            Cipher ci = Cipher.getInstance(algorithm);
+            ci.init(Cipher.ENCRYPT_MODE, secretKey, algoParamSpec);
+
+            // Encryption
+            byte[] cipherText = ci.doFinal(PLAIN_TEXT);
+
+            // Decryption
+            ci.init(Cipher.DECRYPT_MODE, secretKey, algoParamSpec);
+            byte[] recoveredText = ci.doFinal(cipherText);
+
+            if (algorithm.contains("TripleDES")) {
+                throw new RuntimeException(
+                        "Expected InvalidKeyException exception uncaugh");
+            }
+
+            // Comparison
+            if (!Arrays.equals(PLAIN_TEXT, recoveredText)) {
+                throw new RuntimeException(
+                        "Test failed: plainText is not equal to recoveredText");
+            }
+            out.println("Test Passed.");
+        } catch (InvalidKeyException ex) {
+            if (algorithm.contains("TripleDES")) {
+                out.println("Expected InvalidKeyException raised");
+            } else {
+                throw new RuntimeException(ex);
+            }
+        }
+    }
+
+    public static byte[] generateBytes(int length) {
+        byte[] bytes = new byte[length];
+        for (int i = 0; i < length; i++) {
+            bytes[i] = (byte) (i & 0xff);
+        }
+        return bytes;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/crypto/provider/Cipher/TestCipher.java	Tue Sep 08 15:39:51 2015 -0700
@@ -0,0 +1,220 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import static java.lang.System.out;
+
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.spec.AlgorithmParameterSpec;
+
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.KeyGenerator;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+import javax.crypto.ShortBufferException;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+
+/**
+ * This is a abstract class used to test various ciphers
+ */
+public abstract class TestCipher {
+
+    private final String SUNJCE = "SunJCE";
+    private final String ALGORITHM;
+    private final String[] MODES;
+    private final String[] PADDINGS;
+
+    /* Used to test cipher with different key strengths
+       Key size tested is increment of KEYCUTTER from MINIMUM_KEY_SIZE to
+       maximum allowed keysize.
+       DES/DESede/Blowfish work with currently selected key sizes.
+    */
+    private final int variousKeySize;
+    private final int KEYCUTTER = 8;
+    private final int MINIMUM_KEY_SIZE = 32;
+
+    // Used to assert that Encryption/Decryption works with same buffer
+    // TEXT_LEN is multiple of blocks in order to work against ciphers w/ NoPadding
+    private final int TEXT_LEN = 800;
+    private final int ENC_OFFSET = 6;
+    private final int STORAGE_OFFSET = 3;
+    private final int PAD_BYTES = 16;
+
+    private final byte[] IV;
+    private final byte[] INPUT_TEXT;
+
+    TestCipher(String algo, String[] modes, String[] paddings,
+            boolean keyStrength) throws NoSuchAlgorithmException {
+        ALGORITHM = algo;
+        MODES = modes;
+        PADDINGS = paddings;
+        this.variousKeySize
+                = keyStrength ? Cipher.getMaxAllowedKeyLength(ALGORITHM) : 0;
+
+        IV = generateBytes(8);
+        INPUT_TEXT = generateBytes(TEXT_LEN + PAD_BYTES + ENC_OFFSET);
+    }
+
+    TestCipher(String algo, String[] modes, String[] paddings) {
+        ALGORITHM = algo;
+        MODES = modes;
+        PADDINGS = paddings;
+        variousKeySize = 0;
+
+        IV = generateBytes(8);
+        INPUT_TEXT = generateBytes(TEXT_LEN + PAD_BYTES + ENC_OFFSET);
+    }
+
+    private static byte[] generateBytes(int length) {
+        byte[] bytes = new byte[length];
+        for (int i = 0; i < length; i++) {
+            bytes[i] = (byte) (i & 0xff);
+        }
+        return bytes;
+    }
+
+    private boolean isKeyStrenthSupported() {
+        return (variousKeySize != 0);
+    }
+
+    public void runAll() throws InvalidKeyException,
+            NoSuchPaddingException, InvalidAlgorithmParameterException,
+            ShortBufferException, IllegalBlockSizeException,
+            BadPaddingException, NoSuchAlgorithmException,
+            NoSuchProviderException {
+
+        for (String mode : MODES) {
+            for (String padding : PADDINGS) {
+                if (!isKeyStrenthSupported()) {
+                    runTest(mode, padding, 0);
+                } else {
+                    int keySize = variousKeySize;
+                    while (keySize >= MINIMUM_KEY_SIZE) {
+                        out.println("With Key Strength: " + keySize);
+                        runTest(mode, padding, keySize);
+                        keySize -= KEYCUTTER;
+                    }
+                }
+            }
+        }
+    }
+
+    private void runTest(String mo, String pad, int keySize)
+            throws NoSuchPaddingException, BadPaddingException,
+            ShortBufferException, IllegalBlockSizeException,
+            InvalidAlgorithmParameterException, InvalidKeyException,
+            NoSuchAlgorithmException, NoSuchProviderException {
+
+        String TRANSFORMATION = ALGORITHM + "/" + mo + "/" + pad;
+        out.println("Testing: " + TRANSFORMATION);
+
+        // Initialization
+        Cipher ci = Cipher.getInstance(TRANSFORMATION, SUNJCE);
+        KeyGenerator kg = KeyGenerator.getInstance(ALGORITHM, SUNJCE);
+        if (keySize != 0) {
+            kg.init(keySize);
+        }
+        SecretKey key = kg.generateKey();
+        SecretKeySpec skeySpec = new SecretKeySpec(key.getEncoded(), ALGORITHM);
+
+        AlgorithmParameterSpec aps = new IvParameterSpec(IV);
+        if (mo.equalsIgnoreCase("ECB")) {
+            ci.init(Cipher.ENCRYPT_MODE, key);
+        } else {
+            ci.init(Cipher.ENCRYPT_MODE, key, aps);
+        }
+
+        // Encryption
+        int PAD_LEN = 0;
+        if (pad.equalsIgnoreCase("PKCS5Padding")) {
+            // Need to consider pad bytes
+            PAD_LEN = 8;
+        }
+
+        byte[] plainText = INPUT_TEXT.clone();
+
+        // Generate cipher and save to separate buffer
+        byte[] cipherText = ci.doFinal(INPUT_TEXT, ENC_OFFSET, TEXT_LEN);
+
+        // Generate cipher and save to same buffer
+        int offset = ci.update(
+                INPUT_TEXT, ENC_OFFSET, TEXT_LEN, INPUT_TEXT, STORAGE_OFFSET);
+        ci.doFinal(INPUT_TEXT, offset + STORAGE_OFFSET);
+
+        if (!equalsBlock(
+                INPUT_TEXT, STORAGE_OFFSET, cipherText, 0, cipherText.length)) {
+            throw new RuntimeException(
+                    "Different ciphers generated with same buffer");
+        }
+
+        // Decryption
+        if (mo.equalsIgnoreCase("ECB")) {
+            ci.init(Cipher.DECRYPT_MODE, skeySpec);
+        } else {
+            ci.init(Cipher.DECRYPT_MODE, skeySpec, aps);
+        }
+
+        // Recover text from cipher and save to separate buffer
+        byte[] recoveredText = ci.doFinal(cipherText, 0, cipherText.length);
+
+        if (!equalsBlock(
+                plainText, ENC_OFFSET, recoveredText, 0,
+                recoveredText.length)) {
+            throw new RuntimeException(
+                    "Recovered text not same as plain text");
+        } else {
+            out.println("Recovered and plain text are same");
+        }
+
+        // Recover text from cipher and save to same buffer
+        ci.update(INPUT_TEXT, STORAGE_OFFSET, TEXT_LEN + PAD_LEN, INPUT_TEXT,
+                ENC_OFFSET);
+        ci.doFinal(INPUT_TEXT, ENC_OFFSET);
+
+        if (!equalsBlock(
+                plainText, ENC_OFFSET, recoveredText, 0,
+                recoveredText.length)) {
+            throw new RuntimeException(
+                    "Recovered text not same as plain text with same buffer");
+        } else {
+            out.println("Recovered and plain text are same with same buffer");
+        }
+
+        out.println("Test Passed.");
+    }
+
+    private static boolean equalsBlock(byte[] b1, int off1, byte[] b2, int off2,
+            int len) {
+        for (int i = off1, j = off2, k = 0; k < len; i++, j++, k++) {
+            if (b1[i] != b2[j]) {
+                return false;
+            }
+        }
+        return true;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/crypto/provider/Cipher/TextLength/DESCipherWrapper.java	Tue Sep 08 15:39:51 2015 -0700
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import static java.lang.System.out;
+
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.spec.AlgorithmParameterSpec;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import javax.crypto.BadPaddingException;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.SecretKey;
+import javax.crypto.ShortBufferException;
+import javax.crypto.Cipher;
+import javax.crypto.KeyGenerator;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.spec.IvParameterSpec;
+
+/**
+ * Wrapper class to test a given DES algorithm.
+ */
+public class DESCipherWrapper {
+
+    private final Cipher ci;
+    private final byte[] iv;
+    private final SecretKey key;
+    private final String algo;
+    private final String mode;
+    private final String pad;
+    private final int keyStrength;
+    private byte[] resultText = null;
+
+    public DESCipherWrapper(String algo, String mode, String pad)
+            throws NoSuchAlgorithmException, NoSuchPaddingException {
+        ci = Cipher.getInstance(algo + "/" + mode + "/" + pad);
+
+        iv = new byte[8];
+        for (int i = 0; i < 8; i++) {
+            iv[i] = (byte) (i & 0xff);
+        }
+
+        KeyGenerator kg = KeyGenerator.getInstance(algo);
+        key = kg.generateKey();
+        keyStrength = algo.equalsIgnoreCase("DESede") ? 112
+                : key.getEncoded().length * 8;
+
+        this.algo = algo;
+        this.mode = mode;
+        this.pad = pad;
+    }
+
+    public byte[] getResult() {
+        return resultText.clone();
+    }
+
+    public void execute(int edMode, byte[] inputText)
+            throws InvalidKeyException, InvalidAlgorithmParameterException,
+            IllegalBlockSizeException, BadPaddingException,
+            ShortBufferException, NoSuchAlgorithmException {
+        AlgorithmParameterSpec aps = null;
+
+        try {
+            if (!mode.equalsIgnoreCase("ECB")) {
+                aps = new IvParameterSpec(iv);
+            }
+            ci.init(edMode, key, aps);
+
+            // Generate a resultText using a single-part enc/dec
+            resultText = ci.doFinal(inputText);
+
+            // Generate outputText for each multi-part en/de-cryption
+            /* Combination #1:
+            update(byte[], int, int)
+            doFinal(byte[], int, int)
+             */
+            byte[] part11 = ci.update(inputText, 0, inputText.length);
+            byte[] part12 = ci.doFinal();
+            byte[] outputText1 = new byte[part11.length + part12.length];
+            System.arraycopy(part11, 0, outputText1, 0, part11.length);
+            System.arraycopy(part12, 0, outputText1, part11.length,
+                    part12.length);
+
+            List<byte[]> outputTexts = new ArrayList<>(4);
+            outputTexts.add(outputText1);
+
+            /* Combination #2:
+            update(byte[], int, int)
+            doFinal(byte[], int, int, byte[], int)
+             */
+            byte[] part21 = ci.update(inputText, 0, inputText.length - 5);
+            byte[] part22 = new byte[ci.getOutputSize(inputText.length)];
+            int len2 = ci
+                    .doFinal(inputText, inputText.length - 5, 5, part22, 0);
+            byte[] outputText2 = new byte[part21.length + len2];
+            System.arraycopy(part21, 0, outputText2, 0, part21.length);
+            System.arraycopy(part22, 0, outputText2, part21.length, len2);
+
+            outputTexts.add(outputText2);
+
+            /* Combination #3:
+            update(byte[], int, int, byte[], int)
+            doFinal(byte[], int, int)
+             */
+            byte[] part31 = new byte[ci.getOutputSize(inputText.length)];
+            int len3 = ci.update(inputText, 0, inputText.length - 8, part31, 0);
+            byte[] part32 = ci.doFinal(inputText, inputText.length - 8, 8);
+            byte[] outputText3 = new byte[len3 + part32.length];
+            System.arraycopy(part31, 0, outputText3, 0, len3);
+            System.arraycopy(part32, 0, outputText3, len3, part32.length);
+
+            outputTexts.add(outputText3);
+
+            /* Combination #4:
+            update(byte[], int, int, byte[], int)
+            doFinal(byte[], int, int, byte[], int)
+             */
+            byte[] part41 = new byte[ci.getOutputSize(inputText.length)];
+            int len4 = ci.update(inputText, 0, inputText.length - 8, part41, 0);
+            int rest4 = ci.doFinal(inputText, inputText.length - 8, 8, part41,
+                    len4);
+            byte[] outputText4 = new byte[len4 + rest4];
+            System.arraycopy(part41, 0, outputText4, 0, outputText4.length);
+
+            outputTexts.add(outputText4);
+
+            // Compare results
+            for (int k = 0; k < outputTexts.size(); k++) {
+                if (!Arrays.equals(resultText, outputTexts.get(k))) {
+                    out.println(" Testing: " + algo + "/" + mode + "/" + pad);
+                    throw new RuntimeException(
+                            "Compare value of resultText and combination " + k
+                            + " are not same. Test failed.");
+                }
+            }
+            if (keyStrength > Cipher.getMaxAllowedKeyLength(algo)) {
+                throw new RuntimeException(
+                        "Expected exception uncaught, keyStrength "
+                        + keyStrength);
+            }
+        } catch (InvalidKeyException ex) {
+            if (keyStrength <= Cipher.getMaxAllowedKeyLength(algo)) {
+                out.println("Unexpected exception in " + algo + "/" + mode
+                        + "/" + pad + " ,  KeySize " + keyStrength);
+                throw ex;
+            }
+            out.println("Caught InvalidKeyException as expected");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/crypto/provider/Cipher/TextLength/PBECipherWrapper.java	Tue Sep 08 15:39:51 2015 -0700
@@ -0,0 +1,258 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.security.AlgorithmParameters;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.spec.AlgorithmParameterSpec;
+import java.security.spec.InvalidKeySpecException;
+import java.security.spec.InvalidParameterSpecException;
+import java.util.Arrays;
+import java.util.List;
+import java.util.ArrayList;
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.ShortBufferException;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.PBEKeySpec;
+import javax.crypto.spec.PBEParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+
+/**
+ * PBECipherWrapper is the abstract class for all concrete PBE Cipher wrappers.
+ */
+public abstract class PBECipherWrapper {
+
+    public static final int ITERATION_COUNT = 1000;
+    private final String algorithm;
+    private final byte[] salt;
+    protected SecretKey key;
+    protected Cipher ci;
+    protected String baseAlgo;
+    protected byte[] resultText = null;
+    protected AlgorithmParameterSpec aps = null;
+
+    public PBECipherWrapper(String algorithm, int saltSize) {
+        this.algorithm = algorithm;
+        baseAlgo = algorithm.split("/")[0].toUpperCase();
+        salt = generateSalt(saltSize);
+    }
+
+    protected abstract void initCipher(int mode) throws InvalidKeyException,
+            InvalidAlgorithmParameterException, InvalidParameterSpecException;
+
+    public void execute(int edMode, byte[] inputText)
+            throws InvalidAlgorithmParameterException,
+            InvalidParameterSpecException, IllegalBlockSizeException,
+            BadPaddingException, ShortBufferException, InvalidKeyException {
+        // Initialize
+        initCipher(edMode);
+
+        // Generate a resultText using a single-part enc/dec
+        resultText = ci.doFinal(inputText);
+
+        // Generate outputText for each multi-part en/de-cryption
+        /* Combination #1:
+        update(byte[], int, int)
+        doFinal(byte[], int, int)
+         */
+        byte[] part11 = ci.update(inputText, 0, inputText.length);
+        byte[] part12 = ci.doFinal();
+        byte[] outputText1 = new byte[part11.length + part12.length];
+        System.arraycopy(part11, 0, outputText1, 0, part11.length);
+        System.arraycopy(part12, 0, outputText1, part11.length, part12.length);
+
+        List<byte[]> outputTexts = new ArrayList<>(4);
+        outputTexts.add(outputText1);
+
+        /* Combination #2:
+        update(byte[], int, int)
+        doFinal(byte[], int, int, byte[], int)
+         */
+        byte[] part21 = ci.update(inputText, 0, inputText.length - 5);
+        byte[] part22 = new byte[ci.getOutputSize(inputText.length)];
+        int len2 = ci.doFinal(inputText, inputText.length - 5, 5, part22, 0);
+        byte[] outputText2 = new byte[part21.length + len2];
+        System.arraycopy(part21, 0, outputText2, 0, part21.length);
+        System.arraycopy(part22, 0, outputText2, part21.length, len2);
+
+        outputTexts.add(outputText2);
+
+        /* Combination #3:
+        update(byte[], int, int, byte[], int)
+        doFinal(byte[], int, int)
+         */
+        byte[] part31 = new byte[ci.getOutputSize(inputText.length)];
+        int len3 = ci.update(inputText, 0, inputText.length - 8, part31, 0);
+        byte[] part32 = ci.doFinal(inputText, inputText.length - 8, 8);
+        byte[] outputText3 = new byte[len3 + part32.length];
+        System.arraycopy(part31, 0, outputText3, 0, len3);
+        System.arraycopy(part32, 0, outputText3, len3, part32.length);
+
+        outputTexts.add(outputText3);
+
+        /* Combination #4:
+        update(byte[], int, int, byte[], int)
+        doFinal(byte[], int, int, byte[], int)
+         */
+        byte[] part41 = new byte[ci.getOutputSize(inputText.length)];
+        int len4 = ci.update(inputText, 0, inputText.length - 8, part41, 0);
+        int rest4 = ci
+                .doFinal(inputText, inputText.length - 8, 8, part41, len4);
+        byte[] outputText4 = new byte[len4 + rest4];
+        System.arraycopy(part41, 0, outputText4, 0, outputText4.length);
+
+        outputTexts.add(outputText4);
+
+        // Compare results
+        for (int k = 0; k < outputTexts.size(); k++) {
+            if (!Arrays.equals(resultText, outputTexts.get(k))) {
+                throw new RuntimeException(
+                        "Compare value of resultText and combination " + k
+                        + " are not same. Test failed.");
+            }
+        }
+
+    }
+
+    public final byte[] generateSalt(int numberOfBytes) {
+        byte[] aSalt = new byte[numberOfBytes];
+        for (int i = 0; i < numberOfBytes; i++) {
+            aSalt[i] = (byte) (i & 0xff);
+        }
+        return aSalt;
+    }
+
+    public byte[] getResult() {
+        return resultText;
+    }
+
+    public String getAlgorithm() {
+        return algorithm;
+    }
+
+    public byte[] getSalt() {
+        return salt;
+    }
+
+    /**
+     * Wrapper class to test a given SecretKeyFactory.PBKDF2 algorithm.
+     */
+    public static class PBKDF2 extends PBECipherWrapper {
+
+        private static final int PBKDF2_SALT_SIZE = 64;
+        private static final int CIPHER_KEY_SIZE = 128;
+        private static final String CIPHER_TRANSFORMATION = "AES/CBC/PKCS5Padding";
+        private static final String KEY_ALGORITHM = "AES";
+        private byte[] iv = null;
+
+        public PBKDF2(String algo, String passwd)
+                throws InvalidKeySpecException, NoSuchAlgorithmException,
+                NoSuchPaddingException {
+            super(algo, PBKDF2_SALT_SIZE);
+
+            ci = Cipher.getInstance(CIPHER_TRANSFORMATION);
+
+            PBEKeySpec pbeKeySpec = new PBEKeySpec(passwd.toCharArray(), getSalt(),
+                    ITERATION_COUNT, CIPHER_KEY_SIZE);
+            SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(algo);
+            key = keyFactory.generateSecret(pbeKeySpec);
+        }
+
+        @Override
+        protected void initCipher(int mode) throws InvalidKeyException,
+                InvalidAlgorithmParameterException, InvalidParameterSpecException {
+            if (Cipher.ENCRYPT_MODE == mode) {
+                ci.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key.getEncoded(),
+                        KEY_ALGORITHM));
+                iv = ci.getParameters().getParameterSpec(IvParameterSpec.class)
+                        .getIV();
+            } else {
+                ci.init(Cipher.DECRYPT_MODE, new SecretKeySpec(key.getEncoded(),
+                        KEY_ALGORITHM), new IvParameterSpec(iv));
+            }
+        }
+    }
+
+    /**
+     * Wrapper class to test a given AES-based PBE algorithm.
+     */
+    public static class AES extends PBECipherWrapper {
+
+        private AlgorithmParameters pbeParams;
+
+        public AES(String algo, String passwd)
+                throws NoSuchAlgorithmException, NoSuchPaddingException,
+                InvalidKeySpecException {
+            super(algo, 0);
+
+            ci = Cipher.getInstance(algo);
+
+            SecretKeyFactory skf = SecretKeyFactory.getInstance(algo);
+            key = skf.generateSecret(new PBEKeySpec(passwd.toCharArray()));
+        }
+
+        @Override
+        protected void initCipher(int mode) throws InvalidKeyException,
+                InvalidAlgorithmParameterException, InvalidParameterSpecException {
+            if (Cipher.ENCRYPT_MODE == mode) {
+                ci.init(Cipher.ENCRYPT_MODE, key);
+                pbeParams = ci.getParameters();
+            } else {
+                ci.init(Cipher.DECRYPT_MODE, key, pbeParams);
+            }
+        }
+    }
+
+    /**
+     * Wrapper class to test a given PBE algorithm.
+     */
+    public static class Legacy extends PBECipherWrapper {
+
+        private static final int PBE_SALT_SIZE = 8;
+
+        public Legacy(String algo, String passwd)
+                throws NoSuchAlgorithmException, NoSuchPaddingException,
+                InvalidKeySpecException {
+            super(algo, PBE_SALT_SIZE);
+
+            SecretKeyFactory skf = SecretKeyFactory.getInstance(algo.split("/")[0]);
+            key = skf.generateSecret(new PBEKeySpec(passwd.toCharArray()));
+
+            aps = new PBEParameterSpec(getSalt(), ITERATION_COUNT);
+
+            ci = Cipher.getInstance(algo);
+        }
+
+        @Override
+        protected void initCipher(int mode) throws InvalidKeyException,
+                InvalidAlgorithmParameterException, InvalidParameterSpecException {
+            ci.init(mode, key, aps);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/com/sun/crypto/provider/Cipher/TextLength/TestCipherTextLength.java	Tue Sep 08 15:39:51 2015 -0700
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import static java.lang.System.out;
+
+import java.security.NoSuchAlgorithmException;
+import java.security.spec.InvalidKeySpecException;
+import java.util.Arrays;
+import javax.crypto.Cipher;
+import javax.crypto.NoSuchPaddingException;
+
+/*
+ * @test
+ * @bug 8048601
+ * @summary Performs multiple-part encryption/decryption depending on the
+ *  specified encryption mode and check if the results obtained by
+ *  different ways are the same.
+ */
+public class TestCipherTextLength {
+
+    /* Algorithms tested by DESCipherWrapper */
+    private static final String[] DES_ALGORITHMS = {"DES", "DESede",
+        "Blowfish"};
+    private static final String[] DES_MODES = {"ECB", "CBC", "PCBC"};
+    private static final String[] DES_PADDING = {"PKCS5Padding"};
+
+    /* Algorithms tested by PBECipherWrapper */
+    private static final String[] PBE_ALGORITHMS = {"PBEWithMD5AndDES",
+        "PBEWithMD5AndDES/CBC/PKCS5Padding", "PBEWithMD5ANDTripleDES",
+        "PBEWithMD5AndTripleDES/CBC/PKCS5Padding", "PBEwithSHA1AndDESede",
+        "PBEwithSHA1AndDESede/CBC/PKCS5Padding", "PBEwithSHA1AndRC2_40",
+        "PBEwithSHA1Andrc2_40/CBC/PKCS5Padding", "PBEWithSHA1AndRC2_128",
+        "PBEWithSHA1andRC2_128/CBC/PKCS5Padding", "PBEWithSHA1AndRC4_40",
+        "PBEWithsha1AndRC4_40/ECB/NoPadding", "PBEWithSHA1AndRC4_128",
+        "PBEWithSHA1AndRC4_128/ECB/NoPadding", "PBEWithHmacSHA1AndAES_128",
+        "PBEWithHmacSHA224AndAES_128", "PBEWithHmacSHA256AndAES_128",
+        "PBEWithHmacSHA384AndAES_128", "PBEWithHmacSHA512AndAES_128",
+        "PBEWithHmacSHA1AndAES_256", "PBEWithHmacSHA224AndAES_256",
+        "PBEWithHmacSHA256AndAES_256", "PBEWithHmacSHA384AndAES_256",
+        "PBEWithHmacSHA512AndAES_256", "PBKDF2WithHmacSHA1",
+        "PBKDF2WithHmacSHA224", "PBKDF2WithHmacSHA256",
+        "PBKDF2WithHmacSHA384", "PBKDF2WithHmacSHA512"};
+    private static final String PBE_PASSWORD = "Hush, it's a secret!!";
+
+    // Algorithm tested by PBKDF2Wrappter
+    private static final String PBKDF2 = "PBKDF2";
+
+    // Algorithm tested by AESPBEWrapper
+    private static final String AES = "AES";
+
+    public static void main(String[] args) throws Exception {
+        byte[] plainText = new byte[64];
+        for (int i = 0; i < 64; i++) {
+            plainText[i] = (byte) (i & 0xff);
+        }
+
+        new TestCipherTextLength().runAll(plainText);
+    }
+
+    public void runAll(byte[] plainText) throws Exception {
+
+        // Testing DES/Blowfish Cipher
+        for (String algorithm : DES_ALGORITHMS) {
+            for (String desMode : DES_MODES) {
+                for (String padding : DES_PADDING) {
+                    out.println("=>Testing: " + algorithm + "/" + desMode
+                            + "/" + padding);
+                    DESCipherWrapper desCi = new DESCipherWrapper(algorithm,
+                            desMode, padding);
+                    desCi.execute(Cipher.ENCRYPT_MODE, plainText);
+                    desCi.execute(Cipher.DECRYPT_MODE, desCi.getResult());
+                    if (!Arrays.equals(plainText, desCi.getResult())) {
+                        throw new RuntimeException(
+                                "Plain and recovered texts are not same for:"
+                                + algorithm + "/" + desMode + "/"
+                                + padding);
+                    }
+                }
+            }
+        }
+
+        // Testing PBE Cipher
+        for (String algorithm : PBE_ALGORITHMS) {
+            int maxKeyLen = Cipher.getMaxAllowedKeyLength(algorithm);
+            boolean isUnlimited = maxKeyLen == Integer.MAX_VALUE;
+            if (!isUnlimited
+                    && (algorithm.contains("TripleDES") || algorithm
+                    .contains("AES_256"))) {
+                out.println("Test " + algorithm + " will be ignored");
+                continue;
+            }
+
+            out.println("=>Testing: " + algorithm);
+            PBECipherWrapper pbeCi = createWrapper(algorithm, PBE_PASSWORD);
+            pbeCi.execute(Cipher.ENCRYPT_MODE, plainText);
+            pbeCi.execute(Cipher.DECRYPT_MODE, pbeCi.getResult());
+            if (!Arrays.equals(plainText, pbeCi.getResult())) {
+                throw new RuntimeException(
+                        "Plain and recovered texts are not same for:"
+                        + algorithm);
+            }
+        }
+    }
+
+    private PBECipherWrapper createWrapper(String algo, String passwd)
+            throws InvalidKeySpecException, NoSuchAlgorithmException,
+            NoSuchPaddingException {
+        if (algo.contains(PBKDF2)) {
+            return new PBECipherWrapper.PBKDF2(algo, passwd);
+        } else if (algo.contains(AES)) {
+            return new PBECipherWrapper.AES(algo, passwd);
+        } else {
+            return new PBECipherWrapper.Legacy(algo, passwd);
+        }
+    }
+}
--- a/jdk/test/com/sun/crypto/provider/Mac/Utils.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/com/sun/crypto/provider/Mac/Utils.java	Tue Sep 08 15:39:51 2015 -0700
@@ -76,4 +76,4 @@
 
 interface MacTest {
     void doTest(String alg) throws Exception;
-}
\ No newline at end of file
+}
--- a/jdk/test/com/sun/jdi/InterfaceMethodsTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/com/sun/jdi/InterfaceMethodsTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -442,6 +442,3 @@
         }
     }
 }
-
-
-
--- a/jdk/test/com/sun/jdi/ShellScaffold.sh	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/com/sun/jdi/ShellScaffold.sh	Tue Sep 08 15:39:51 2015 -0700
@@ -1215,5 +1215,3 @@
     # Don't know how this arises
     debuggeeFailIfPresent "Internal exception"
 }
-
-
--- a/jdk/test/com/sun/jmx/remote/NotificationMarshalVersions/Client/ConfigKey.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/com/sun/jmx/remote/NotificationMarshalVersions/Client/ConfigKey.java	Tue Sep 08 15:39:51 2015 -0700
@@ -23,4 +23,4 @@
 
 public enum ConfigKey {
     CONSTANT3, CONSTANT2;
-}
\ No newline at end of file
+}
--- a/jdk/test/com/sun/jmx/remote/NotificationMarshalVersions/Server/ConfigKey.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/com/sun/jmx/remote/NotificationMarshalVersions/Server/ConfigKey.java	Tue Sep 08 15:39:51 2015 -0700
@@ -23,4 +23,4 @@
 
 public enum ConfigKey {
     CONSTANT1, CONSTANT2;
-}
\ No newline at end of file
+}
--- a/jdk/test/com/sun/jmx/remote/NotificationMarshalVersions/Server/Ste.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/com/sun/jmx/remote/NotificationMarshalVersions/Server/Ste.java	Tue Sep 08 15:39:51 2015 -0700
@@ -29,4 +29,4 @@
     public void foo() {
         sendNotification(new TestNotification("test", this, count++));
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/com/sun/jmx/remote/NotificationMarshalVersions/Server/SteMBean.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/com/sun/jmx/remote/NotificationMarshalVersions/Server/SteMBean.java	Tue Sep 08 15:39:51 2015 -0700
@@ -23,4 +23,4 @@
 
 public interface SteMBean {
     public void foo();
-}
\ No newline at end of file
+}
--- a/jdk/test/com/sun/security/auth/module/LdapLoginModule/CheckConfigs.policy	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/com/sun/security/auth/module/LdapLoginModule/CheckConfigs.policy	Tue Sep 08 15:39:51 2015 -0700
@@ -7,5 +7,3 @@
     //permission java.net.SocketPermission "*:636", "connect";
     //permission javax.security.auth.AuthPermission "modifyPrincipals";
 };
-
-
--- a/jdk/test/java/awt/Component/DimensionEncapsulation/DimensionEncapsulation.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/Component/DimensionEncapsulation/DimensionEncapsulation.java	Tue Sep 08 15:39:51 2015 -0700
@@ -212,4 +212,4 @@
             throw new RuntimeException(e);
         }
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/java/awt/Component/InsetsEncapsulation/InsetsEncapsulation.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/Component/InsetsEncapsulation/InsetsEncapsulation.java	Tue Sep 08 15:39:51 2015 -0700
@@ -163,4 +163,4 @@
             throw new RuntimeException(e);
         }
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/java/awt/Component/SetEnabledPerformance/SetEnabledPerformance.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/Component/SetEnabledPerformance/SetEnabledPerformance.java	Tue Sep 08 15:39:51 2015 -0700
@@ -69,4 +69,4 @@
             }
         });
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/java/awt/Cursor/MultiResolutionCursorTest/MultiResolutionCursorTest.html	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/Cursor/MultiResolutionCursorTest/MultiResolutionCursorTest.html	Tue Sep 08 15:39:51 2015 -0700
@@ -29,4 +29,4 @@
     <applet CODE="MultiResolutionCursorTest.class" WIDTH=300 HEIGHT=100></applet>
     <p> See the dialog box (usually in upper left corner) for instructions</p>
 </body>
-</html>
\ No newline at end of file
+</html>
--- a/jdk/test/java/awt/FileDialog/ModalFocus/FileDialogModalFocusTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/FileDialog/ModalFocus/FileDialogModalFocusTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -134,4 +134,4 @@
             throw new RuntimeException("file chooser is underneath");
         }
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/java/awt/Focus/6981400/Test3.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/Focus/6981400/Test3.java	Tue Sep 08 15:39:51 2015 -0700
@@ -135,5 +135,3 @@
         }
     }
 }
-
-
--- a/jdk/test/java/awt/FontClass/LCDScale.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/FontClass/LCDScale.java	Tue Sep 08 15:39:51 2015 -0700
@@ -79,5 +79,3 @@
         }
     }
 }
-
-
--- a/jdk/test/java/awt/Frame/FramesGC/FramesGC.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/Frame/FramesGC/FramesGC.java	Tue Sep 08 15:39:51 2015 -0700
@@ -156,4 +156,4 @@
         refs.add(new PhantomReference<Frame>(frame, que));
     }
 
-}
\ No newline at end of file
+}
--- a/jdk/test/java/awt/Frame/MaximizedToUnmaximized/MaximizedToUnmaximized.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/Frame/MaximizedToUnmaximized/MaximizedToUnmaximized.java	Tue Sep 08 15:39:51 2015 -0700
@@ -76,4 +76,4 @@
             frame.dispose();
         }
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/java/awt/MenuBar/RemoveHelpMenu/RemoveHelpMenu.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/MenuBar/RemoveHelpMenu/RemoveHelpMenu.java	Tue Sep 08 15:39:51 2015 -0700
@@ -129,4 +129,4 @@
         checkMenuCount(menuBar, 0);
         checkHelpMenu(helpMenu, false);
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/java/awt/Mixing/JButtonInGlassPane.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/Mixing/JButtonInGlassPane.java	Tue Sep 08 15:39:51 2015 -0700
@@ -426,5 +426,3 @@
     }
 
 }// TestDialog  class
-
-
--- a/jdk/test/java/awt/Mixing/LWComboBox.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/Mixing/LWComboBox.java	Tue Sep 08 15:39:51 2015 -0700
@@ -421,5 +421,3 @@
     }
 
 }// TestDialog  class
-
-
--- a/jdk/test/java/awt/Mixing/MixingInHwPanel.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/Mixing/MixingInHwPanel.java	Tue Sep 08 15:39:51 2015 -0700
@@ -424,5 +424,3 @@
     }
 
 }// TestDialog  class
-
-
--- a/jdk/test/java/awt/Mixing/MixingOnShrinkingHWButton.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/Mixing/MixingOnShrinkingHWButton.java	Tue Sep 08 15:39:51 2015 -0700
@@ -425,5 +425,3 @@
     }
 
 }// TestDialog  class
-
-
--- a/jdk/test/java/awt/Mixing/NonOpaqueInternalFrame.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/Mixing/NonOpaqueInternalFrame.java	Tue Sep 08 15:39:51 2015 -0700
@@ -430,5 +430,3 @@
     }
 
 }// TestDialog  class
-
-
--- a/jdk/test/java/awt/Mouse/MouseDragEvent/MouseDraggedTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/Mouse/MouseDragEvent/MouseDraggedTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -100,4 +100,4 @@
         frame.add(panel, BorderLayout.CENTER);
         frame.setVisible(true);
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/java/awt/MouseInfo/JContainerMousePositionTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/MouseInfo/JContainerMousePositionTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -144,5 +144,3 @@
         frame1.setVisible(true);
     }
 }
-
-
--- a/jdk/test/java/awt/Robot/RobotWheelTest/RobotWheelTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/Robot/RobotWheelTest/RobotWheelTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -80,4 +80,4 @@
             }
         }
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/java/awt/ScrollPane/bug8077409Test.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/ScrollPane/bug8077409Test.java	Tue Sep 08 15:39:51 2015 -0700
@@ -112,4 +112,4 @@
       }
   }
 
-}
\ No newline at end of file
+}
--- a/jdk/test/java/awt/TrayIcon/TrayIconPopup/TrayIconPopupTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/TrayIcon/TrayIconPopup/TrayIconPopupTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -148,4 +148,4 @@
                     "JPopupMenu shown and menu item selected using keyboard");
 
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/java/awt/Window/AlwaysOnTop/SyncAlwaysOnTopFieldTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/Window/AlwaysOnTop/SyncAlwaysOnTopFieldTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -59,4 +59,4 @@
         window.setVisible(true);
         return window;
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/java/awt/applet/Applet/AppletFlipBuffer.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/applet/Applet/AppletFlipBuffer.java	Tue Sep 08 15:39:51 2015 -0700
@@ -52,4 +52,4 @@
             frame.dispose();
         }
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/java/awt/appletviewer/IOExceptionIfEncodedURLTest/test.html	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/appletviewer/IOExceptionIfEncodedURLTest/test.html	Tue Sep 08 15:39:51 2015 -0700
@@ -41,4 +41,4 @@
 
 <APPLET CODE="IOExceptionIfEncodedURLTest.class" WIDTH=200 HEIGHT=200></APPLET>
 </body>
-</html>
\ No newline at end of file
+</html>
--- a/jdk/test/java/awt/datatransfer/ClipboardInterVMTest/ClipboardInterVMTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/datatransfer/ClipboardInterVMTest/ClipboardInterVMTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -168,4 +168,4 @@
             }
         }
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/java/awt/datatransfer/DataFlavor/XJavaUrlDataFlavorTest/XJavaUrlDataFlavorTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/datatransfer/DataFlavor/XJavaUrlDataFlavorTest/XJavaUrlDataFlavorTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -342,4 +342,4 @@
         }
     }
 
-}// TestDialog  class
\ No newline at end of file
+}// TestDialog  class
--- a/jdk/test/java/awt/datatransfer/MissedHtmlAndRtfBug/MyTransferable.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/datatransfer/MissedHtmlAndRtfBug/MyTransferable.java	Tue Sep 08 15:39:51 2015 -0700
@@ -59,4 +59,4 @@
             throw new UnsupportedFlavorException(flavor);
         }
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/java/awt/event/MouseEvent/CTORRestrictions/CTORRestrictions_Disable.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/event/MouseEvent/CTORRestrictions/CTORRestrictions_Disable.java	Tue Sep 08 15:39:51 2015 -0700
@@ -120,5 +120,3 @@
         frame.dispatchEvent( ( AWTEvent )meOld );
     }
 }
-
-
--- a/jdk/test/java/awt/im/4490692/bug4490692.html	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/im/4490692/bug4490692.html	Tue Sep 08 15:39:51 2015 -0700
@@ -59,5 +59,3 @@
 <APPLET CODE="bug4490692.class" WIDTH=0 HEIGHT=0></APPLET>
 </body>
 </html>
-
-
--- a/jdk/test/java/awt/im/4959409/bug4959409.html	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/awt/im/4959409/bug4959409.html	Tue Sep 08 15:39:51 2015 -0700
@@ -45,5 +45,3 @@
 <APPLET CODE="bug4959409.class" WIDTH=0 HEIGHT=0></APPLET>
 </body>
 </html>
-
-
--- a/jdk/test/java/beans/README	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/beans/README	Tue Sep 08 15:39:51 2015 -0700
@@ -73,4 +73,4 @@
    If this object is not null it will be encoded and decoded.
    Also the object updating will be tested in this case.
 The test() method has a boolean parameter,
-which indicates that the test should be started in secure context.
\ No newline at end of file
+which indicates that the test should be started in secure context.
--- a/jdk/test/java/beans/SimpleBeanInfo/LoadingStandardIcons/java.policy	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/beans/SimpleBeanInfo/LoadingStandardIcons/java.policy	Tue Sep 08 15:39:51 2015 -0700
@@ -1,1 +1,1 @@
-;
\ No newline at end of file
+;
--- a/jdk/test/java/io/Serializable/evolution/AddedSuperClass/README	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/io/Serializable/evolution/AddedSuperClass/README	Tue Sep 08 15:39:51 2015 -0700
@@ -12,6 +12,3 @@
 rm A.class AddedSuperClass.class
 javac ReadAddedSuperClass2.java
 java ReadAddedSuperClass2
-
-
-
--- a/jdk/test/java/lang/ClassLoader/getdotresource.sh	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/lang/ClassLoader/getdotresource.sh	Tue Sep 08 15:39:51 2015 -0700
@@ -44,5 +44,3 @@
 
 # now start the test
 ${TESTJAVA}/bin/java ${TESTVMOPTS} -cp ${TESTSRC}${FS}resource.jar${PS}${TESTCLASSES} GetDotResource
-
-
--- a/jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest2.sh	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/lang/management/MemoryMXBean/LowMemoryTest2.sh	Tue Sep 08 15:39:51 2015 -0700
@@ -69,5 +69,3 @@
   then echo "$failures test(s) failed";
   else echo "All test(s) passed"; fi
 exit $failures
-
-
--- a/jdk/test/java/net/SocketPermission/policy	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/net/SocketPermission/policy	Tue Sep 08 15:39:51 2015 -0700
@@ -1,3 +1,3 @@
 grant {
  permission java.security.AllPermission;
-};
\ No newline at end of file
+};
--- a/jdk/test/java/nio/channels/SocketChannel/Open.sh	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/nio/channels/SocketChannel/Open.sh	Tue Sep 08 15:39:51 2015 -0700
@@ -33,6 +33,3 @@
         * )
             echo "unrecognized system: $OS" ;;
     esac
-
-
-
--- a/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/README	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/README	Tue Sep 08 15:39:51 2015 -0700
@@ -31,5 +31,3 @@
 (c) Execute the make script :-
 	Solaris:	gnumake all
 	Linux:		gmake all
-
-
--- a/jdk/test/java/nio/file/Files/probeContentType/ParallelProbes.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/nio/file/Files/probeContentType/ParallelProbes.java	Tue Sep 08 15:39:51 2015 -0700
@@ -21,17 +21,18 @@
  * questions.
  */
 
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.util.ArrayList;
-
 /* @test
  * @summary Test probing content type simultaneously from multiple threads.
  * @requires (os.family == "linux") | (os.family == "solaris")
  * @build ParallelProbes SimpleFileTypeDetector
  * @run main/othervm ParallelProbes 10
  */
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.ArrayList;
+
 public class ParallelProbes {
 
     private static final int REPEATS = 1000;
--- a/jdk/test/java/rmi/registry/readTest/readTest.sh	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/rmi/registry/readTest/readTest.sh	Tue Sep 08 15:39:51 2015 -0700
@@ -125,5 +125,3 @@
 fi
 rm -rf OUT.TXT ${RMIREG_OUT} rmi_tmp
 exit ${exitCode}
-
-
--- a/jdk/test/java/security/KeyStore/PKCS12/README	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/security/KeyStore/PKCS12/README	Tue Sep 08 15:39:51 2015 -0700
@@ -25,4 +25,4 @@
 
 3. Import certificate
 <JAVA-HOME>/bin/keytool -import -alias pkcs12test -keystore ks-pkcs.data 
--storepass storepass -file pkcs12testCA.cer.data
\ No newline at end of file
+-storepass storepass -file pkcs12testCA.cer.data
--- a/jdk/test/java/security/SignedObject/Copy.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/security/SignedObject/Copy.java	Tue Sep 08 15:39:51 2015 -0700
@@ -119,5 +119,3 @@
         }
     }
 }
-
-
--- a/jdk/test/java/util/AbstractCollection/ToArrayTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/util/AbstractCollection/ToArrayTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -211,5 +211,3 @@
         else {System.out.println(x + " not equal to " + y); fail(); }
     }
 }
-
-
--- a/jdk/test/java/util/Arrays/SetAllTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/util/Arrays/SetAllTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -278,4 +278,4 @@
             // expected
         }
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/java/util/Locale/bug4123285.html	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/util/Locale/bug4123285.html	Tue Sep 08 15:39:51 2015 -0700
@@ -1,1 +1,1 @@
-<APPLET CODE="bug4123285.class" CODEBASE="./" WIDTH="250" HEIGHT="325" ALIGN="TOP"></APPLET>
\ No newline at end of file
+<APPLET CODE="bug4123285.class" CODEBASE="./" WIDTH="250" HEIGHT="325" ALIGN="TOP"></APPLET>
--- a/jdk/test/java/util/concurrent/CompletableFuture/ThenComposeExceptionTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/util/concurrent/CompletableFuture/ThenComposeExceptionTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -120,4 +120,4 @@
         Assert.assertTrue(eOnWhenComplete.get() instanceof CompletionException,
                           "Incorrect exception passed to whenComplete: " + eOnWhenComplete.get());
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/java/util/logging/LogManager/Configuration/TestConfigurationLock.properties	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/util/logging/LogManager/Configuration/TestConfigurationLock.properties	Tue Sep 08 15:39:51 2015 -0700
@@ -18,5 +18,3 @@
 foo.bar.l10.level = INFO
 foo.bar.l100.level = INFO
 foo.bar.l1000.level = INFO
-
-
--- a/jdk/test/java/util/stream/bootlib/java/util/stream/DefaultMethodStreams.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/java/util/stream/bootlib/java/util/stream/DefaultMethodStreams.java	Tue Sep 08 15:39:51 2015 -0700
@@ -981,4 +981,4 @@
             s.close();
         }
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/javax/crypto/SecretKeyFactory/PBKDF2TranslateTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/crypto/SecretKeyFactory/PBKDF2TranslateTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -267,4 +267,4 @@
         }
 
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/javax/imageio/plugins/shared/CanWriteSequence.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/imageio/plugins/shared/CanWriteSequence.java	Tue Sep 08 15:39:51 2015 -0700
@@ -75,4 +75,4 @@
         writer.dispose();
         ios.close();
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/javax/management/MustBeValidMBeanInfo/logging.properties	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/management/MustBeValidMBeanInfo/logging.properties	Tue Sep 08 15:39:51 2015 -0700
@@ -11,4 +11,4 @@
 java.util.logging.ConsoleHandler.level = FINEST
 java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
 
-javax.management.misc.level = FINEST
\ No newline at end of file
+javax.management.misc.level = FINEST
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/management/ObjectName/CompressedStorageTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -0,0 +1,231 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8041565
+ * @summary Tests the limits imposed on the domain name part of an
+ *          ObjectName instance
+ * @author Jaroslav Bachorik
+ * @modules java.management
+ * @run main CompressedStorageTest
+ */
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.function.Consumer;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+
+public class CompressedStorageTest {
+    private static Method setDomainLengthM;
+    private static Field compressedStorageFld;
+
+    private static int DOMAIN_PATTERN;
+    private static int PROPLIST_PATTERN;
+    private static int PROPVAL_PATTERN;
+
+    private static Method setDomainPattern;
+    private static Method setPropertyListPattern;
+    private static Method setPropertyValuePattern;
+
+
+    static {
+        try {
+            Class<?> clz = ObjectName.class;
+            setDomainLengthM = clz.getDeclaredMethod("setDomainLength", int.class);
+            setDomainLengthM.setAccessible(true);
+
+            compressedStorageFld = clz.getDeclaredField("_compressed_storage");
+            compressedStorageFld.setAccessible(true);
+
+            setDomainPattern = clz.getDeclaredMethod("setDomainPattern", boolean.class);
+            setDomainPattern.setAccessible(true);
+            setPropertyListPattern = clz.getDeclaredMethod("setPropertyListPattern", boolean.class);
+            setPropertyListPattern.setAccessible(true);
+            setPropertyValuePattern = clz.getDeclaredMethod("setPropertyValuePattern", boolean.class);
+            setPropertyValuePattern.setAccessible(true);
+
+            DOMAIN_PATTERN = getStaticIntFld("DOMAIN_PATTERN");
+            PROPLIST_PATTERN = getStaticIntFld("PROPLIST_PATTERN");
+            PROPVAL_PATTERN = getStaticIntFld("PROPVAL_PATTERN");
+
+        } catch (Exception e) {
+            throw new Error(e);
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        testZeroLength();
+        testNegativeLength();
+        testMaxLength();
+
+        testSetDomainPattern();
+        testSetPropertyListPattern();
+        testSetPropertyValuePattern();
+    }
+
+    private static ObjectName getObjectName()
+    throws MalformedObjectNameException {
+        return new ObjectName("domain", "key", "value");
+    }
+
+    /**
+     * Test for accepting 0 being passed as argument to
+     * {@linkplain ObjectName#setDomainLength(int)}.
+     *
+     */
+    private static void testZeroLength() throws Exception {
+        setDomainNameLength(0);
+    }
+
+    /**
+     * Test for rejecting negative value being passed as argument to
+     * {@linkplain ObjectName#setDomainLength(int)}.
+     */
+    private static void testNegativeLength() throws Exception {
+        try {
+            setDomainNameLength(-1);
+        } catch (MalformedObjectNameException e) {
+            return;
+        }
+        fail("Allowing negative domain name length");
+    }
+
+    /**
+     * Test for rejecting value exceeding the maximum allowed length
+     * being passed as argument to {@linkplain ObjectName#setDomainLength(int)}.
+     */
+    private static void testMaxLength() throws Exception {
+        try {
+            setDomainNameLength(Integer.MAX_VALUE / 4 + 1);
+        } catch (MalformedObjectNameException e) {
+            return;
+        }
+        fail("Maximum domain name length is not respected");
+    }
+
+    /**
+     * Tests that calling {@linkplain ObjectName#setDomainPattern(boolean)}
+     * results in setting correct bits in {@linkplain ObjectName#_compressed_storage}.
+     */
+    private static void testSetDomainPattern() throws Exception {
+        ObjectName on = getObjectName();
+
+        checkMask(DOMAIN_PATTERN, setDomainPattern, on);
+    }
+
+    /**
+     * Tests that calling {@linkplain ObjectName#setPropertyListPattern(boolean)}
+     * results in setting correct bits in {@linkplain ObjectName#_compressed_storage}.
+     */
+    private static void testSetPropertyListPattern() throws Exception {
+        ObjectName on = getObjectName();
+
+        checkMask(PROPLIST_PATTERN, setPropertyListPattern, on);
+    }
+
+    /**
+     * Tests that calling {@linkplain ObjectName#setPropertyValuePattern(boolean)}
+     * results in setting correct bits in {@linkplain ObjectName#_compressed_storage}.
+     */
+    private static void testSetPropertyValuePattern() throws Exception {
+        ObjectName on = getObjectName();
+
+        checkMask(PROPVAL_PATTERN, setPropertyValuePattern, on);
+    }
+
+    /**
+     * Helper method to call {@linkplain ObjectName#setDomainLength(int)}
+     * method via reflection.
+     * @param len The domain name length
+     * @throws MalformedObjectNameException Propagated from
+     *           {@linkplain ObjectName#setDomainLength(int)} invocation.
+     */
+    private static void setDomainNameLength(int len)
+    throws MalformedObjectNameException {
+        try {
+            setDomainLengthM.invoke(getObjectName(), len);
+        } catch (InvocationTargetException e) {
+            Throwable cause = e.getCause();
+            if (cause instanceof MalformedObjectNameException) {
+                throw (MalformedObjectNameException)cause;
+            }
+            throw new Error(cause);
+        } catch (IllegalAccessException | IllegalArgumentException e) {
+            throw new Error(e);
+        }
+    }
+
+    /**
+     * Helper method to assert that a particular boolean setter affects only
+     * a particular bit in the {@linkplain ObjectName#_compressed_storage} field.
+     * @param mask bitmask for storing the boolean value
+     * @param setter setter method reference
+     * @param on {@linkplain ObjectName} instance
+     */
+    private static void checkMask(int mask, Method setter, ObjectName on)
+    throws Exception {
+        int valBefore = compressedStorageFld.getInt(on);
+        setter.invoke(on, true);
+        int valAfter = compressedStorageFld.getInt(on);
+
+        checkMask(mask, valAfter ^ valBefore);
+
+        valBefore = valAfter;
+        setter.invoke(on, false);
+        valAfter = compressedStorageFld.getInt(on);
+
+        checkMask(mask, valAfter ^ valBefore);
+    }
+
+    /**
+     * Compare the changed bits with the given mask.
+     * @param mask bitmask
+     * @param val the changed bits; may be 0 if there was no change
+     */
+    private static void checkMask(int mask, int val) {
+        if (val != 0 && val != mask) {
+            fail("Invalid mask: expecting '" +
+                    Integer.toBinaryString(mask) + "' , received '" +
+                    Integer.toBinaryString(val) + "'");
+        }
+    }
+
+    /**
+     * Helper method to obtain the value of a static field via reflection.
+     * @param name static field name
+     * @return static field value
+     */
+    private static int getStaticIntFld(String name) throws Exception {
+        Field fld = ObjectName.class.getDeclaredField(name);
+        fld.setAccessible(true);
+
+        return fld.getInt(null);
+    }
+
+    private static void fail(String msg) {
+        throw new Error(msg);
+    }
+}
--- a/jdk/test/javax/management/modelmbean/SimpleModelMBean/logging.properties	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/management/modelmbean/SimpleModelMBean/logging.properties	Tue Sep 08 15:39:51 2015 -0700
@@ -11,4 +11,4 @@
 java.util.logging.ConsoleHandler.level = FINEST
 java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
 
-javax.management.misc.level = FINEST
\ No newline at end of file
+javax.management.misc.level = FINEST
--- a/jdk/test/javax/security/auth/Subject/doAs/policy.expect.ace	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/security/auth/Subject/doAs/policy.expect.ace	Tue Sep 08 15:39:51 2015 -0700
@@ -24,4 +24,4 @@
 grant codeBase "file:ReadPropertyNegativeAction.jar"
         Principal javax.security.auth.x500.X500Principal "cn=Duke" {
     permission java.security.AllPermission;
-};
\ No newline at end of file
+};
--- a/jdk/test/javax/security/auth/Subject/doAs/policy.one.principal	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/security/auth/Subject/doAs/policy.one.principal	Tue Sep 08 15:39:51 2015 -0700
@@ -33,4 +33,4 @@
     permission javax.security.auth.AuthPermission "getSubject";
     permission javax.security.auth.AuthPermission "doAs";
     permission java.util.PropertyPermission "java.class.path", "read";
-};
\ No newline at end of file
+};
--- a/jdk/test/javax/security/auth/Subject/doAs/policy.two.principals	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/security/auth/Subject/doAs/policy.two.principals	Tue Sep 08 15:39:51 2015 -0700
@@ -34,4 +34,4 @@
     permission javax.security.auth.AuthPermission "getSubject";
     permission javax.security.auth.AuthPermission "doAs";
     permission java.util.PropertyPermission "java.class.path", "read";
-};
\ No newline at end of file
+};
--- a/jdk/test/javax/security/auth/login/LoginContext/shared.config	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/security/auth/login/LoginContext/shared.config	Tue Sep 08 15:39:51 2015 -0700
@@ -1,4 +1,4 @@
 SharedState {
     SharedState$FirstModule required;
     SharedState$SecondModule required;
-};
\ No newline at end of file
+};
--- a/jdk/test/javax/sound/midi/Gervill/ModelStandardIndexedDirector/ModelStandardIndexedDirectorTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/sound/midi/Gervill/ModelStandardIndexedDirector/ModelStandardIndexedDirectorTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -184,5 +184,3 @@
 
     }
 }
-
-
--- a/jdk/test/javax/swing/JColorChooser/8065098/bug8065098.html	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/swing/JColorChooser/8065098/bug8065098.html	Tue Sep 08 15:39:51 2015 -0700
@@ -37,4 +37,4 @@
     <applet width="500" height="1" code="bug8065098.class">
     </applet>        
 </body>
-</html>
\ No newline at end of file
+</html>
--- a/jdk/test/javax/swing/JFileChooser/8062561/security2.policy	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/swing/JFileChooser/8062561/security2.policy	Tue Sep 08 15:39:51 2015 -0700
@@ -1,1 +1,1 @@
-// Autogenerated file
\ No newline at end of file
+// Autogenerated file
--- a/jdk/test/javax/swing/JFileChooser/FileFilterDescription/FileFilterDescription.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/swing/JFileChooser/FileFilterDescription/FileFilterDescription.java	Tue Sep 08 15:39:51 2015 -0700
@@ -82,4 +82,4 @@
             return "CustomFileFilter";
         }
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/javax/swing/JMenu/8072900/WrongSelectionOnMouseOver.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/swing/JMenu/8072900/WrongSelectionOnMouseOver.java	Tue Sep 08 15:39:51 2015 -0700
@@ -195,4 +195,4 @@
         }
         System.out.println("Test passed");
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/javax/swing/JMenuBar/MisplacedBorder/MisplacedBorder.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/swing/JMenuBar/MisplacedBorder/MisplacedBorder.java	Tue Sep 08 15:39:51 2015 -0700
@@ -132,4 +132,4 @@
             throw new RuntimeException(e);
         }
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/javax/swing/JOptionPane/8081019/bug8081019.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/swing/JOptionPane/8081019/bug8081019.java	Tue Sep 08 15:39:51 2015 -0700
@@ -103,4 +103,4 @@
             throw new RuntimeException("Exception in the output!");
         }
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/javax/swing/JTextArea/4697612/bug4697612.txt	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/swing/JTextArea/4697612/bug4697612.txt	Tue Sep 08 15:39:51 2015 -0700
@@ -219,5 +219,3 @@
 
 Copyright 2003 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 
 California 95054, U.S.A.  All rights reserved.
-
-
--- a/jdk/test/javax/swing/JTree/8072676/TreeClipTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/swing/JTree/8072676/TreeClipTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -94,4 +94,4 @@
             System.out.println("Passed.");
         }
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/javax/swing/JTree/DnD/LastNodeLowerHalfDrop.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/swing/JTree/DnD/LastNodeLowerHalfDrop.java	Tue Sep 08 15:39:51 2015 -0700
@@ -381,4 +381,4 @@
             return nodesFlavor.equals(flavor);
         }
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/javax/swing/UIDefaults/7180976/Pending.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/swing/UIDefaults/7180976/Pending.java	Tue Sep 08 15:39:51 2015 -0700
@@ -47,4 +47,4 @@
         UIManager.get("foobar");
         passed = true;
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/javax/swing/plaf/basic/BasicLabelUI/bug7172652.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/swing/plaf/basic/BasicLabelUI/bug7172652.java	Tue Sep 08 15:39:51 2015 -0700
@@ -169,4 +169,4 @@
         frame.setVisible(true);
     }
 
-}
\ No newline at end of file
+}
--- a/jdk/test/javax/swing/text/View/8015853/bug8015853.txt	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/swing/text/View/8015853/bug8015853.txt	Tue Sep 08 15:39:51 2015 -0700
@@ -64,4 +64,4 @@
         frame.add(editorPane);
         frame.setVisible(<b>true</b>);
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/javax/swing/text/html/8005391/bug8005391.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/swing/text/html/8005391/bug8005391.java	Tue Sep 08 15:39:51 2015 -0700
@@ -58,4 +58,4 @@
             }
         }
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/javax/swing/text/html/HTMLDocument/8058120/bug8058120.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/swing/text/html/HTMLDocument/8058120/bug8058120.java	Tue Sep 08 15:39:51 2015 -0700
@@ -109,5 +109,3 @@
         frame.setVisible(true);
     }
 }
-
-
--- a/jdk/test/javax/xml/bind/xjc/8032884/optional-property-schema.xsd	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/xml/bind/xjc/8032884/optional-property-schema.xsd	Tue Sep 08 15:39:51 2015 -0700
@@ -11,4 +11,4 @@
             <xs:element name="foo" type="xs:int" minOccurs="0"/>
         </xs:sequence>
     </xs:complexType>
-</xs:schema>
\ No newline at end of file
+</xs:schema>
--- a/jdk/test/javax/xml/jaxp/testng/validation/jdk8036951/idc.xml	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/xml/jaxp/testng/validation/jdk8036951/idc.xml	Tue Sep 08 15:39:51 2015 -0700
@@ -4,4 +4,4 @@
    <item uniqueAttr="ONE">2</item>
    <item uniqueAttr="TWO">2</item>
    <itemRef>3</itemRef>
-</itemList>
\ No newline at end of file
+</itemList>
--- a/jdk/test/javax/xml/jaxp/testng/validation/jdk8036951/idc.xsd	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/xml/jaxp/testng/validation/jdk8036951/idc.xsd	Tue Sep 08 15:39:51 2015 -0700
@@ -38,4 +38,4 @@
     </xsd:simpleContent>
   </xsd:complexType>
 
-</xsd:schema>
\ No newline at end of file
+</xsd:schema>
--- a/jdk/test/javax/xml/jaxp/testng/validation/jdk8036951/simpleType.xml	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/xml/jaxp/testng/validation/jdk8036951/simpleType.xml	Tue Sep 08 15:39:51 2015 -0700
@@ -1,2 +1,2 @@
 <?xml version="1.0"?>
-<S>-12345</S>
\ No newline at end of file
+<S>-12345</S>
--- a/jdk/test/javax/xml/jaxp/testng/validation/jdk8036951/xerces1128_1.xml	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/xml/jaxp/testng/validation/jdk8036951/xerces1128_1.xml	Tue Sep 08 15:39:51 2015 -0700
@@ -2,4 +2,4 @@
 <A xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <B />
 <C xsi:type="X" />
-</A>
\ No newline at end of file
+</A>
--- a/jdk/test/javax/xml/jaxp/testng/validation/jdk8036951/xerces1128_2.xml	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/xml/jaxp/testng/validation/jdk8036951/xerces1128_2.xml	Tue Sep 08 15:39:51 2015 -0700
@@ -2,4 +2,4 @@
 <A xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <B xsi:type="X" />
 <C />
-</A>
\ No newline at end of file
+</A>
--- a/jdk/test/javax/xml/jaxp/testng/validation/jdk8037819/unparsedEntity.dtd	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/xml/jaxp/testng/validation/jdk8037819/unparsedEntity.dtd	Tue Sep 08 15:39:51 2015 -0700
@@ -1,2 +1,2 @@
 <!NOTATION myNotation SYSTEM "somethingElse" >
-<!ENTITY myUnparsedEntity SYSTEM "something" NDATA myNotation >
\ No newline at end of file
+<!ENTITY myUnparsedEntity SYSTEM "something" NDATA myNotation >
--- a/jdk/test/javax/xml/jaxp/transform/8004476/tokenize.xml	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/javax/xml/jaxp/transform/8004476/tokenize.xml	Tue Sep 08 15:39:51 2015 -0700
@@ -4,4 +4,4 @@
    <b>Is this EXSLT? No. no</b>
    <c>Is this EXSLT? No. no</c>
 </a>
-</html>
\ No newline at end of file
+</html>
--- a/jdk/test/sun/jvmstat/testlibrary/utils.sh	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/jvmstat/testlibrary/utils.sh	Tue Sep 08 15:39:51 2015 -0700
@@ -221,5 +221,3 @@
   fi
   echo "${port1}"
 }
-
-
--- a/jdk/test/sun/management/jmxremote/bootstrap/PasswordFilePermissionTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/management/jmxremote/bootstrap/PasswordFilePermissionTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -57,5 +57,3 @@
     }
 
 }
-
-
--- a/jdk/test/sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -61,5 +61,3 @@
         test.runTest(args);
     }
 }
-
-
--- a/jdk/test/sun/management/jmxremote/startstop/JMXStatusPerfCountersTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/management/jmxremote/startstop/JMXStatusPerfCountersTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -186,4 +186,4 @@
     private Properties getCounters() throws IOException, InterruptedException {
         return jcmd.perfCounters("sun\\.management\\.JMXConnectorServer\\..*");
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/sun/management/jmxremote/startstop/REMOTE_TESTING.txt	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/management/jmxremote/startstop/REMOTE_TESTING.txt	Tue Sep 08 15:39:51 2015 -0700
@@ -15,5 +15,3 @@
 6. connect jconsole to host2:50234
    Make sure jconsole works
    Make sure only host2.50234 and host2.50235 appears in tcpdump output.
-
-
--- a/jdk/test/sun/management/windows/README	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/management/windows/README	Tue Sep 08 15:39:51 2015 -0700
@@ -26,5 +26,3 @@
 Note that a 32-bit version of revokeall.exe is checked into SCCS
 - this 32-bit application is also used when running on 64-bit
 versions of Windows (AMD64 and IA64).
-
-
--- a/jdk/test/sun/net/www/http/HttpClient/IsKeepingAlive.policy	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/net/www/http/HttpClient/IsKeepingAlive.policy	Tue Sep 08 15:39:51 2015 -0700
@@ -45,5 +45,3 @@
 	permission java.util.PropertyPermission "java.vm.vendor", "read";
 	permission java.util.PropertyPermission "java.vm.name", "read";
 };
-
-
--- a/jdk/test/sun/net/www/http/HttpClient/OpenServer.policy	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/net/www/http/HttpClient/OpenServer.policy	Tue Sep 08 15:39:51 2015 -0700
@@ -45,5 +45,3 @@
 	permission java.util.PropertyPermission "java.vm.vendor", "read";
 	permission java.util.PropertyPermission "java.vm.name", "read";
 };
-
-
--- a/jdk/test/sun/net/www/protocol/http/spnegoTest	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/net/www/protocol/http/spnegoTest	Tue Sep 08 15:39:51 2015 -0700
@@ -205,4 +205,4 @@
 rm err.log
 rm out.log
 
-exit 0
\ No newline at end of file
+exit 0
--- a/jdk/test/sun/security/ec/SignatureOffsets.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/security/ec/SignatureOffsets.java	Tue Sep 08 15:39:51 2015 -0700
@@ -49,4 +49,4 @@
             InvalidKeyException, SignatureException {
         Offsets.main(args);
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/sun/security/krb5/IPv6.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/security/krb5/IPv6.java	Tue Sep 08 15:39:51 2015 -0700
@@ -127,5 +127,3 @@
         }
     }
 }
-
-
--- a/jdk/test/sun/security/mscapi/KeytoolChangeAlias.sh	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/security/mscapi/KeytoolChangeAlias.sh	Tue Sep 08 15:39:51 2015 -0700
@@ -132,6 +132,3 @@
         exit 0
         ;;
 esac
-
-
-
--- a/jdk/test/sun/security/mscapi/SignatureOffsets.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/security/mscapi/SignatureOffsets.java	Tue Sep 08 15:39:51 2015 -0700
@@ -50,4 +50,4 @@
             InvalidKeyException, SignatureException {
         Offsets.main(args);
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/sun/security/pkcs11/Provider/Absolute.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/security/pkcs11/Provider/Absolute.java	Tue Sep 08 15:39:51 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,40 +22,31 @@
  */
 /**
  * @test
- * @bug 7003952
+ * @bug 7003952 7191662
+ * @library ..
  * @summary load DLLs and launch executables using fully qualified path
  */
 import java.security.*;
-import java.lang.reflect.*;
 
 public class Absolute {
 
     public static void main(String[] args) throws Exception {
-        Constructor cons;
-        try {
-            Class clazz = Class.forName("sun.security.pkcs11.SunPKCS11");
-            cons = clazz.getConstructor(new Class[] {String.class});
-        } catch (Exception ex) {
-            System.out.println("Skipping test - no PKCS11 provider available");
-            return;
-        }
-
         String config =
             System.getProperty("test.src", ".") + "/Absolute.cfg";
 
         try {
-            Object obj = cons.newInstance(new Object[] {config});
-        } catch (InvocationTargetException ite) {
-            Throwable cause = ite.getCause();
-            if (cause instanceof ProviderException) {
-                Throwable cause2 = cause.getCause();
-                if ((cause2 == null) ||
-                    !cause2.getMessage().startsWith(
-                         "Absolute path required for library value:")) {
-                    // rethrow
-                    throw (ProviderException) cause;
-                }
-                System.out.println("Caught expected Exception: \n" + cause2);
+            Provider p = PKCS11Test.getSunPKCS11(config);
+            if (p == null) {
+                System.out.println("Skipping test - no PKCS11 provider available");
+            }
+        } catch (InvalidParameterException ipe) {
+            Throwable ex = ipe.getCause();
+            if (ex.getMessage().indexOf(
+                    "Absolute path required for library value:") != -1) {
+                System.out.println("Test Passed: expected exception thrown");
+            } else {
+                // rethrow
+                throw ipe;
             }
         }
     }
--- a/jdk/test/sun/security/pkcs11/Provider/ConfigShortPath.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/security/pkcs11/Provider/ConfigShortPath.java	Tue Sep 08 15:39:51 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,44 +33,52 @@
 
 public class ConfigShortPath {
 
-    private static final String[] configNames = {
-        "csp.cfg", "cspPlus.cfg", "cspSpace.cfg", "cspQuotedPath.cfg"
+    private static final String[] winConfigNames = {
+        "csp.cfg", "cspSpace.cfg", "cspQuotedPath.cfg"
+    };
+    private static final String[] solConfigNames = {
+        "cspPlus.cfg"
     };
 
     public static void main(String[] args) throws Exception {
-        Constructor cons = null;
-        try {
-            Class clazz = Class.forName("sun.security.pkcs11.SunPKCS11");
-            cons = clazz.getConstructor(String.class);
-        } catch (Exception ex) {
-            System.out.println("Skipping test - no PKCS11 provider available");
-            return;
+        Provider p = Security.getProvider("SunPKCS11");
+        if (p == null) {
+            // re-try w/ SunPKCS11-Solaris
+            p = Security.getProvider("SunPKCS11-Solaris");
+            if (p == null) {
+                System.out.println("Skipping test - no PKCS11 provider available");
+                return;
+            }
         }
+
+        String osInfo = System.getProperty("os.name", "");
+        String[] configNames = (osInfo.contains("Windows")?
+            winConfigNames : solConfigNames);
+
         String testSrc = System.getProperty("test.src", ".");
         for (int i = 0; i < configNames.length; i++) {
             String configFile = testSrc + File.separator + configNames[i];
 
             System.out.println("Testing against " + configFile);
             try {
-                Object obj = cons.newInstance(configFile);
-            } catch (InvocationTargetException ite) {
-                Throwable cause = ite.getCause();
-                System.out.println(cause);
-                if (cause instanceof ProviderException) {
-                    while ((cause = cause.getCause()) != null) {
-                        System.out.println(cause);
-                        String causeMsg = cause.getMessage();
-                        // Indicate failure if due to parsing config
-                        if (causeMsg.indexOf("Unexpected") != -1) {
-                            throw (ProviderException) cause;
-                        }
+                p.configure(configFile);
+            } catch (InvalidParameterException ipe) {
+                ipe.printStackTrace();
+                Throwable cause = ipe.getCause();
+                // Indicate failure if due to parsing config
+                if (cause.getClass().getName().equals
+                        ("sun.security.pkcs11.ConfigurationException")) {
+                    // Error occurred during parsing
+                    if (cause.getMessage().indexOf("Unexpected") != -1) {
+                        throw (ProviderException) cause;
                     }
-                    // Consider the test passes if the exception is
-                    // thrown after parsing, i.e. due to the absolute
-                    // path requirement or the non-existent path.
-                } else {
-                    // unexpected exception
-                    throw new RuntimeException("Unexpected Exception", cause);
+                }
+            } catch (ProviderException pe) {
+                pe.printStackTrace();
+                if (pe.getCause() instanceof IOException) {
+                    // Thrown when the directory does not exist which is ok
+                    System.out.println("Pass: config parsed ok");
+                    continue;
                 }
             }
         }
--- a/jdk/test/sun/security/pkcs11/Provider/cspSpace.cfg	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/security/pkcs11/Provider/cspSpace.cfg	Tue Sep 08 15:39:51 2015 -0700
@@ -1,5 +1,3 @@
 showInfo = false
 name = test
 library = C:\pki DLL\x64\acpkcs211.dll
-
-
--- a/jdk/test/sun/security/rsa/SignatureOffsets.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/security/rsa/SignatureOffsets.java	Tue Sep 08 15:39:51 2015 -0700
@@ -50,4 +50,4 @@
             InvalidKeyException, SignatureException {
         Offsets.main(args);
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/sun/security/ssl/StatusStapling/TestCase.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/security/ssl/StatusStapling/TestCase.java	Tue Sep 08 15:39:51 2015 -0700
@@ -28,5 +28,3 @@
 public interface TestCase {
     Map.Entry<Boolean, String> runTest();
 }
-
-
--- a/jdk/test/sun/security/ssl/StatusStapling/TestUtils.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/security/ssl/StatusStapling/TestUtils.java	Tue Sep 08 15:39:51 2015 -0700
@@ -122,5 +122,3 @@
         return resultBuf;
     }
 }
-
-
--- a/jdk/test/sun/security/ssl/rsa/SignatureOffsets.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/security/ssl/rsa/SignatureOffsets.java	Tue Sep 08 15:39:51 2015 -0700
@@ -47,4 +47,4 @@
             InvalidKeyException, SignatureException {
         Offsets.main(args);
     }
-}
\ No newline at end of file
+}
--- a/jdk/test/sun/security/tools/jarsigner/collator.sh	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/security/tools/jarsigner/collator.sh	Tue Sep 08 15:39:51 2015 -0700
@@ -72,5 +72,3 @@
     echo "ERR is $ERR"
     exit 1
 fi
-
-
--- a/jdk/test/sun/security/tools/jarsigner/jvindex.sh	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/security/tools/jarsigner/jvindex.sh	Tue Sep 08 15:39:51 2015 -0700
@@ -72,5 +72,3 @@
     echo "ERR is $ERR"
     exit 1
 fi
-
-
--- a/jdk/test/sun/security/tools/jarsigner/warnings.sh	Tue Sep 01 12:57:41 2015 +0300
+++ b/jdk/test/sun/security/tools/jarsigner/warnings.sh	Tue Sep 08 15:39:51 2015 -0700
@@ -115,5 +115,3 @@
     echo "ERR is $ERR"
     exit 1
 fi
-
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/sun/security/x509/X509CertImpl/V3Certificate.java	Tue Sep 08 15:39:51 2015 -0700
@@ -0,0 +1,262 @@
+/*
+ * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import static java.lang.System.out;
+import java.security.InvalidKeyException;
+import java.security.KeyPair;
+import java.security.KeyPairGenerator;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.PrivateKey;
+import java.security.PublicKey;
+import java.security.Signature;
+import java.security.SignatureException;
+import java.security.cert.CertificateException;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.TimeZone;
+import sun.misc.BASE64Encoder;
+import sun.security.util.BitArray;
+import sun.security.util.ObjectIdentifier;
+import sun.security.x509.*;
+
+/**
+ * @test
+ * @bug 8049237
+ * @modules java.base/sun.security.x509
+ *          java.base/sun.security.util
+ *          java.base/sun.misc
+ * @summary This test generates V3 certificate with all the supported
+ * extensions. Writes back the generated certificate in to a file and checks for
+ * equality with the original certificate.
+ */
+public class V3Certificate {
+
+    public static final String V3_FILE = "certV3";
+    public static final String V3_B64_FILE = "certV3.b64";
+
+    public static void main(String[] args) throws IOException,
+            NoSuchAlgorithmException, InvalidKeyException, CertificateException,
+            NoSuchProviderException, SignatureException {
+
+        boolean success = true;
+
+        success &= test("RSA", "SHA256withRSA", 2048);
+        success &= test("DSA", "SHA256withDSA", 2048);
+        success &= test("EC", "SHA256withECDSA", 384);
+
+        if (!success) {
+            throw new RuntimeException("At least one test case failed");
+        }
+    }
+
+    public static boolean test(String algorithm, String sigAlg, int keyLength)
+            throws IOException,
+            NoSuchAlgorithmException,
+            InvalidKeyException,
+            CertificateException,
+            NoSuchProviderException,
+            SignatureException {
+
+        byte[] issuerId = {1, 2, 3, 4, 5};
+        byte[] subjectId = {6, 7, 8, 9, 10};
+        boolean testResult = true;
+
+        // Subject and Issuer
+        X500Name subject = new X500Name("test", "Oracle", "Santa Clara",
+                "US");
+        X500Name issuer = subject;
+
+        // Generate keys and sign
+        KeyPairGenerator keyGen = KeyPairGenerator.getInstance(algorithm);
+        keyGen.initialize(keyLength);
+        KeyPair pair = keyGen.generateKeyPair();
+        PublicKey publicKey = pair.getPublic();
+        PrivateKey privateKey = pair.getPrivate();
+        MessageDigest md = MessageDigest.getInstance("SHA");
+        byte[] keyId = md.digest(publicKey.getEncoded());
+
+        Signature signature = Signature.getInstance(sigAlg);
+        signature.initSign(privateKey);
+
+        // Validity interval
+        Date firstDate = new Date();
+        Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("PST"));
+        cal.set(2014, 03, 10, 12, 30, 30);
+        Date lastDate = cal.getTime();
+        CertificateValidity interval = new CertificateValidity(firstDate,
+                lastDate);
+
+        // Certificate Info
+        X509CertInfo cert = new X509CertInfo();
+
+        cert.set(X509CertInfo.VERSION,
+                new CertificateVersion(CertificateVersion.V3));
+        cert.set(X509CertInfo.SERIAL_NUMBER,
+                new CertificateSerialNumber((int) (firstDate.getTime() / 1000)));
+        cert.set(X509CertInfo.ALGORITHM_ID,
+                new CertificateAlgorithmId(AlgorithmId.get(sigAlg)));
+        cert.set(X509CertInfo.SUBJECT, subject);
+        cert.set(X509CertInfo.KEY, new CertificateX509Key(publicKey));
+        cert.set(X509CertInfo.VALIDITY, interval);
+        cert.set(X509CertInfo.ISSUER, issuer);
+
+        cert.set(X509CertInfo.ISSUER_ID,
+                new UniqueIdentity(
+                        new BitArray(issuerId.length * 8 - 2, issuerId)));
+        cert.set(X509CertInfo.SUBJECT_ID, new UniqueIdentity(subjectId));
+
+        // Create Extensions
+        CertificateExtensions exts = new CertificateExtensions();
+
+        GeneralNameInterface mailInf = new RFC822Name("test@Oracle.com");
+        GeneralName mail = new GeneralName(mailInf);
+        GeneralNameInterface dnsInf = new DNSName("Oracle.com");
+        GeneralName dns = new GeneralName(dnsInf);
+        GeneralNameInterface uriInf = new URIName("http://www.Oracle.com");
+        GeneralName uri = new GeneralName(uriInf);
+
+        // localhost
+        byte[] address = new byte[]{127, 0, 0, 1};
+
+        GeneralNameInterface ipInf = new IPAddressName(address);
+        GeneralName ip = new GeneralName(ipInf);
+        int[] oidData = new int[]{1, 2, 3, 4};
+
+        GeneralNameInterface oidInf = new OIDName(new ObjectIdentifier(oidData));
+        GeneralName oid = new GeneralName(oidInf);
+
+        SubjectAlternativeNameExtension subjectName
+                = new SubjectAlternativeNameExtension();
+        IssuerAlternativeNameExtension issuerName
+                = new IssuerAlternativeNameExtension();
+
+        GeneralNames subjectNames
+                = (GeneralNames) subjectName.
+                get(SubjectAlternativeNameExtension.SUBJECT_NAME);
+
+        GeneralNames issuerNames
+                = (GeneralNames) issuerName.
+                get(IssuerAlternativeNameExtension.ISSUER_NAME);
+
+        subjectNames.add(mail);
+        subjectNames.add(dns);
+        subjectNames.add(uri);
+
+        issuerNames.add(ip);
+        issuerNames.add(oid);
+
+        cal.set(2000, 11, 15, 12, 30, 30);
+        lastDate = cal.getTime();
+        PrivateKeyUsageExtension pkusage
+                = new PrivateKeyUsageExtension(firstDate, lastDate);
+
+        KeyUsageExtension usage = new KeyUsageExtension();
+        usage.set(KeyUsageExtension.CRL_SIGN, true);
+        usage.set(KeyUsageExtension.DIGITAL_SIGNATURE, true);
+        usage.set(KeyUsageExtension.NON_REPUDIATION, true);
+
+        KeyIdentifier kid = new KeyIdentifier(keyId);
+        SerialNumber sn = new SerialNumber(42);
+        AuthorityKeyIdentifierExtension aki
+                = new AuthorityKeyIdentifierExtension(kid, subjectNames, sn);
+
+        SubjectKeyIdentifierExtension ski
+                = new SubjectKeyIdentifierExtension(keyId);
+
+        BasicConstraintsExtension cons
+                = new BasicConstraintsExtension(true, 10);
+
+        PolicyConstraintsExtension pce = new PolicyConstraintsExtension(2, 4);
+
+        exts.set(SubjectAlternativeNameExtension.NAME, subjectName);
+        exts.set(IssuerAlternativeNameExtension.NAME, issuerName);
+        exts.set(PrivateKeyUsageExtension.NAME, pkusage);
+        exts.set(KeyUsageExtension.NAME, usage);
+        exts.set(AuthorityKeyIdentifierExtension.NAME, aki);
+        exts.set(SubjectKeyIdentifierExtension.NAME, ski);
+        exts.set(BasicConstraintsExtension.NAME, cons);
+        exts.set(PolicyConstraintsExtension.NAME, pce);
+        cert.set(X509CertInfo.EXTENSIONS, exts);
+
+        // Generate and sign X509CertImpl
+        X509CertImpl crt = new X509CertImpl(cert);
+        crt.sign(privateKey, sigAlg);
+        crt.verify(publicKey);
+
+        try (FileOutputStream fos = new FileOutputStream(new File(V3_FILE));
+                FileOutputStream fos_b64
+                = new FileOutputStream(new File(V3_B64_FILE));
+                PrintWriter pw = new PrintWriter(fos_b64)) {
+            crt.encode((OutputStream) fos);
+            fos.flush();
+
+            // Certificate boundaries/
+            pw.println("-----BEGIN CERTIFICATE-----");
+            pw.flush();
+            new BASE64Encoder().encodeBuffer(crt.getEncoded(), fos_b64);
+            fos_b64.flush();
+            pw.println("-----END CERTIFICATE-----");
+        }
+
+        out.println("*** Certificate ***");
+        out.println(crt);
+        out.println("*** End Certificate ***");
+
+        X509Certificate x2 = generateCertificate(V3_FILE);
+        if (!x2.equals(crt)) {
+            out.println("*** Certificate mismatch ***");
+            testResult = false;
+        }
+
+        X509Certificate x3 = generateCertificate(V3_B64_FILE);
+        if (!x3.equals(crt)) {
+            out.println("*** Certificate mismatch ***");
+            testResult = false;
+        }
+
+        return testResult;
+    }
+
+    static X509Certificate generateCertificate(String certFile) {
+        try (InputStream inStrm = new FileInputStream(certFile)) {
+            CertificateFactory cf = CertificateFactory.getInstance("X509");
+            X509Certificate x2
+                    = (X509Certificate) cf.generateCertificate(inStrm);
+            return x2;
+        } catch (CertificateException | IOException e) {
+            throw new RuntimeException("Exception while "
+                    + "genrating certificate for " + certFile, e);
+        }
+    }
+}
--- a/langtools/.hgtags	Tue Sep 01 12:57:41 2015 +0300
+++ b/langtools/.hgtags	Tue Sep 08 15:39:51 2015 -0700
@@ -322,3 +322,4 @@
 6ec3d5cb1bfcfba135c8d18866e567f1b1ada861 jdk9-b77
 7fd155b7041c8aba7084f03e2fd1d6f74cceda75 jdk9-b78
 eaab8a16dcfb807acacdb6d133f3ecd502667a8c jdk9-b79
+c5671e662392df372b2005b75afa6cfdc0eebce7 jdk9-b80
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java	Tue Sep 08 15:39:51 2015 -0700
@@ -76,7 +76,7 @@
     private final AtomicBoolean used = new AtomicBoolean();
     private Iterable<? extends Processor> processors;
 
-    JavacTaskImpl(Context context) {
+    protected JavacTaskImpl(Context context) {
         super(context, true);
         args = Arguments.instance(context);
         fileManager = context.get(JavaFileManager.class);
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/MultiTaskListener.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/api/MultiTaskListener.java	Tue Sep 08 15:39:51 2015 -0700
@@ -47,6 +47,9 @@
     /** The context key for the MultiTaskListener. */
     public static final Context.Key<MultiTaskListener> taskListenerKey = new Context.Key<>();
 
+    /** Empty array of task listeners */
+    private static final TaskListener[] EMPTY_LISTENERS = new TaskListener[0];
+
     /** Get the MultiTaskListener instance for this context. */
     public static MultiTaskListener instance(Context context) {
         MultiTaskListener instance = context.get(taskListenerKey);
@@ -64,7 +67,7 @@
      * The current set of registered listeners.
      * This is a mutable reference to an immutable array.
      */
-    TaskListener[] listeners = { };
+    TaskListener[] listeners = EMPTY_LISTENERS;
 
     ClientCodeWrapper ccw;
 
@@ -73,7 +76,7 @@
     }
 
     public boolean isEmpty() {
-        return (listeners.length == 0);
+        return listeners == EMPTY_LISTENERS;
     }
 
     public void add(TaskListener listener) {
@@ -88,10 +91,14 @@
     public void remove(TaskListener listener) {
         for (int i = 0; i < listeners.length; i++) {
             if (ccw.unwrap(listeners[i]) == listener) {
-                TaskListener[] newListeners = new TaskListener[listeners.length - 1];
-                System.arraycopy(listeners, 0, newListeners, 0, i);
-                System.arraycopy(listeners, i + 1, newListeners, i, newListeners.length - i);
-                listeners = newListeners;
+                if (listeners.length == 1) {
+                    listeners = EMPTY_LISTENERS;
+                } else {
+                    TaskListener[] newListeners = new TaskListener[listeners.length - 1];
+                    System.arraycopy(listeners, 0, newListeners, 0, i);
+                    System.arraycopy(listeners, i + 1, newListeners, i, newListeners.length - i);
+                    listeners = newListeners;
+                }
                 break;
             }
         }
@@ -117,4 +124,8 @@
     public String toString() {
         return Arrays.toString(listeners);
     }
+
+    public void clear() {
+        listeners = EMPTY_LISTENERS;
+    }
 }
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Scope.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Scope.java	Tue Sep 08 15:39:51 2015 -0700
@@ -26,6 +26,7 @@
 package com.sun.tools.javac.code;
 
 import com.sun.tools.javac.code.Kinds.Kind;
+import java.lang.ref.WeakReference;
 import java.util.*;
 import java.util.function.BiConsumer;
 import java.util.stream.Stream;
@@ -162,15 +163,49 @@
 
     /** A list of scopes to be notified if items are to be removed from this scope.
      */
-    List<ScopeListener> listeners = List.nil();
+    ScopeListenerList listeners = new ScopeListenerList();
 
-    public void addScopeListener(ScopeListener sl) {
-        listeners = listeners.prepend(sl);
+    public interface ScopeListener {
+        void symbolAdded(Symbol sym, Scope s);
+        void symbolRemoved(Symbol sym, Scope s);
     }
 
-    public interface ScopeListener {
-        public void symbolAdded(Symbol sym, Scope s);
-        public void symbolRemoved(Symbol sym, Scope s);
+    /**
+     * A list of scope listeners; listeners are stored in weak references, to avoid memory leaks.
+     * When the listener list is scanned (upon notification), elements corresponding to GC-ed
+     * listeners are removed so that the listener list size is kept in check.
+     */
+    public static class ScopeListenerList {
+
+        List<WeakReference<ScopeListener>> listeners = List.nil();
+
+        void add(ScopeListener sl) {
+            listeners = listeners.prepend(new WeakReference<>(sl));
+        }
+
+        void symbolAdded(Symbol sym, Scope scope) {
+            walkReferences(sym, scope, false);
+        }
+
+        void symbolRemoved(Symbol sym, Scope scope) {
+            walkReferences(sym, scope, true);
+        }
+
+        private void walkReferences(Symbol sym, Scope scope, boolean isRemove) {
+            ListBuffer<WeakReference<ScopeListener>> newListeners = new ListBuffer<>();
+            for (WeakReference<ScopeListener> wsl : listeners) {
+                ScopeListener sl = wsl.get();
+                if (sl != null) {
+                    if (isRemove) {
+                        sl.symbolRemoved(sym, scope);
+                    } else {
+                        sl.symbolAdded(sym, scope);
+                    }
+                    newListeners.add(wsl);
+                }
+            }
+            listeners = newListeners.toList();
+        }
     }
 
     public enum LookupKind {
@@ -404,9 +439,7 @@
             elems = e;
 
             //notify listeners
-            for (List<ScopeListener> l = listeners; l.nonEmpty(); l = l.tail) {
-                l.head.symbolAdded(sym, this);
-            }
+            listeners.symbolAdded(sym, this);
         }
 
         /** Remove symbol from this scope.
@@ -442,9 +475,7 @@
             }
 
             //notify listeners
-            for (List<ScopeListener> l = listeners; l.nonEmpty(); l = l.tail) {
-                l.head.symbolRemoved(sym, this);
-            }
+            listeners.symbolRemoved(sym, this);
         }
 
         /** Enter symbol sym in this scope if not already there.
@@ -698,11 +729,12 @@
                         finalized.enter(sym);
                     }
 
-                    finalized.addScopeListener(new ScopeListener() {
+                    finalized.listeners.add(new ScopeListener() {
                         @Override
                         public void symbolAdded(Symbol sym, Scope s) {
                             Assert.error("The scope is sealed.");
                         }
+
                         @Override
                         public void symbolRemoved(Symbol sym, Scope s) {
                             Assert.error("The scope is sealed.");
@@ -929,26 +961,20 @@
         public void prependSubScope(Scope that) {
            if (that != null) {
                 subScopes = subScopes.prepend(that);
-                that.addScopeListener(this);
+                that.listeners.add(this);
                 mark++;
-                for (ScopeListener sl : listeners) {
-                    sl.symbolAdded(null, this); //propagate upwards in case of nested CompoundScopes
-                }
+                listeners.symbolAdded(null, this);
            }
         }
 
         public void symbolAdded(Symbol sym, Scope s) {
             mark++;
-            for (ScopeListener sl : listeners) {
-                sl.symbolAdded(sym, s);
-            }
+            listeners.symbolAdded(sym, s);
         }
 
         public void symbolRemoved(Symbol sym, Scope s) {
             mark++;
-            for (ScopeListener sl : listeners) {
-                sl.symbolRemoved(sym, s);
-            }
+            listeners.symbolRemoved(sym, s);
         }
 
         public int getMark() {
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Arguments.java	Tue Sep 08 15:39:51 2015 -0700
@@ -68,7 +68,7 @@
     /**
      * The context key for the arguments.
      */
-    protected static final Context.Key<Arguments> argsKey = new Context.Key<>();
+    public static final Context.Key<Arguments> argsKey = new Context.Key<>();
 
     private String ownName;
     private Set<String> classNames;
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Tue Sep 08 15:39:51 2015 -0700
@@ -87,7 +87,7 @@
  */
 public class JavaCompiler {
     /** The context key for the compiler. */
-    protected static final Context.Key<JavaCompiler> compilerKey = new Context.Key<>();
+    public static final Context.Key<JavaCompiler> compilerKey = new Context.Key<>();
 
     /** Get the JavaCompiler instance for this context. */
     public static JavaCompiler instance(Context context) {
@@ -821,7 +821,7 @@
         // as a JavaCompiler can only be used once, throw an exception if
         // it has been used before.
         if (hasBeenUsed)
-            throw new AssertionError("attempt to reuse JavaCompiler");
+            checkReusable();
         hasBeenUsed = true;
 
         // forcibly set the equivalent of -Xlint:-options, so that no further
@@ -898,6 +898,10 @@
         }
     }
 
+    protected void checkReusable() {
+        throw new AssertionError("attempt to reuse JavaCompiler");
+    }
+
     /**
      * Set needRootClasses to true, in JavaCompiler subclass constructor
      * that want to collect public apis of classes supplied on the command line.
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java	Tue Sep 08 15:39:51 2015 -0700
@@ -26,6 +26,7 @@
 package com.sun.tools.javac.parser;
 
 import java.util.*;
+import java.util.stream.Collectors;
 
 import com.sun.source.tree.MemberReferenceTree.ReferenceMode;
 
@@ -510,7 +511,7 @@
         if (mods != 0) {
             long lowestMod = mods & -mods;
             error(token.pos, "mod.not.allowed.here",
-                      Flags.asFlagSet(lowestMod));
+                    Flags.asFlagSet(lowestMod));
         }
     }
 
@@ -946,10 +947,7 @@
         t = odStack[0];
 
         if (t.hasTag(JCTree.Tag.PLUS)) {
-            StringBuilder buf = foldStrings(t);
-            if (buf != null) {
-                t = toP(F.at(startPos).Literal(TypeTag.CLASS, buf.toString()));
-            }
+            t = foldStrings(t);
         }
 
         odStackSupply.add(odStack);
@@ -973,37 +971,76 @@
         /** If tree is a concatenation of string literals, replace it
          *  by a single literal representing the concatenated string.
          */
-        protected StringBuilder foldStrings(JCTree tree) {
+        protected JCExpression foldStrings(JCExpression tree) {
             if (!allowStringFolding)
                 return null;
-            List<String> buf = List.nil();
+            ListBuffer<JCExpression> opStack = new ListBuffer<>();
+            ListBuffer<JCLiteral> litBuf = new ListBuffer<>();
+            boolean needsFolding = false;
+            JCExpression curr = tree;
             while (true) {
-                if (tree.hasTag(LITERAL)) {
-                    JCLiteral lit = (JCLiteral) tree;
-                    if (lit.typetag == TypeTag.CLASS) {
-                        StringBuilder sbuf =
-                            new StringBuilder((String)lit.value);
-                        while (buf.nonEmpty()) {
-                            sbuf.append(buf.head);
-                            buf = buf.tail;
-                        }
-                        return sbuf;
-                    }
-                } else if (tree.hasTag(JCTree.Tag.PLUS)) {
-                    JCBinary op = (JCBinary)tree;
-                    if (op.rhs.hasTag(LITERAL)) {
-                        JCLiteral lit = (JCLiteral) op.rhs;
-                        if (lit.typetag == TypeTag.CLASS) {
-                            buf = buf.prepend((String) lit.value);
-                            tree = op.lhs;
-                            continue;
-                        }
-                    }
+                if (curr.hasTag(JCTree.Tag.PLUS)) {
+                    JCBinary op = (JCBinary)curr;
+                    needsFolding |= foldIfNeeded(op.rhs, litBuf, opStack, false);
+                    curr = op.lhs;
+                } else {
+                    needsFolding |= foldIfNeeded(curr, litBuf, opStack, true);
+                    break; //last one!
                 }
-                return null;
+            }
+            if (needsFolding) {
+                List<JCExpression> ops = opStack.toList();
+                JCExpression res = ops.head;
+                for (JCExpression op : ops.tail) {
+                    res = F.at(op.getStartPosition()).Binary(optag(TokenKind.PLUS), res, op);
+                    storeEnd(res, getEndPos(op));
+                }
+                return res;
+            } else {
+                return tree;
             }
         }
 
+        private boolean foldIfNeeded(JCExpression tree, ListBuffer<JCLiteral> litBuf,
+                                                ListBuffer<JCExpression> opStack, boolean last) {
+            JCLiteral str = stringLiteral(tree);
+            if (str != null) {
+                litBuf.prepend(str);
+                return last && merge(litBuf, opStack);
+            } else {
+                boolean res = merge(litBuf, opStack);
+                litBuf.clear();
+                opStack.prepend(tree);
+                return res;
+            }
+        }
+
+        boolean merge(ListBuffer<JCLiteral> litBuf, ListBuffer<JCExpression> opStack) {
+            if (litBuf.isEmpty()) {
+                return false;
+            } else if (litBuf.size() == 1) {
+                opStack.prepend(litBuf.first());
+                return false;
+            } else {
+                JCExpression t = F.at(litBuf.first().getStartPosition()).Literal(TypeTag.CLASS,
+                        litBuf.stream().map(lit -> (String)lit.getValue()).collect(Collectors.joining()));
+                storeEnd(t, litBuf.last().getEndPosition(endPosTable));
+                opStack.prepend(t);
+                return true;
+            }
+        }
+
+        private JCLiteral stringLiteral(JCTree tree) {
+            if (tree.hasTag(LITERAL)) {
+                JCLiteral lit = (JCLiteral)tree;
+                if (lit.typetag == TypeTag.CLASS) {
+                    return lit;
+                }
+            }
+            return null;
+        }
+
+
         /** optimization: To save allocating a new operand/operator stack
          *  for every binary operation, we use supplys.
          */
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Context.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Context.java	Tue Sep 08 15:39:51 2015 -0700
@@ -119,7 +119,7 @@
      * or
      * {@literal Key<T> -> Factory<T> }
      */
-    private final Map<Key<?>,Object> ht = new HashMap<>();
+    protected final Map<Key<?>,Object> ht = new HashMap<>();
 
     /** Set the factory for the key in this context. */
     public <T> void put(Key<T> key, Factory<T> fac) {
@@ -173,7 +173,7 @@
      */
     private final Map<Class<?>, Key<?>> kt = new HashMap<>();
 
-    private <T> Key<T> key(Class<T> clss) {
+    protected <T> Key<T> key(Class<T> clss) {
         checkState(kt);
         Key<T> k = uncheckedCast(kt.get(clss));
         if (k == null) {
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Log.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Log.java	Tue Sep 08 15:39:51 2015 -0700
@@ -334,7 +334,7 @@
      *  error message more than once. For each error, a pair consisting of the
      *  source file name and source code position of the error is added to the set.
      */
-    private Set<Pair<JavaFileObject, Integer>> recorded = new HashSet<>();
+    protected Set<Pair<JavaFileObject, Integer>> recorded = new HashSet<>();
 
     public boolean hasDiagnosticListener() {
         return diagListener != null;
--- a/langtools/test/tools/javac/Diagnostics/6769027/T6769027.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/langtools/test/tools/javac/Diagnostics/6769027/T6769027.java	Tue Sep 08 15:39:51 2015 -0700
@@ -25,26 +25,19 @@
  * @test
  * @bug     6769027 8006694
  * @summary Source line should be displayed immediately after the first diagnostic line
- *  temporarily workaround combo tests are causing time out in several platforms
- * @author  Maurizio Cimadamore
- * @library ../../lib
  * @modules jdk.compiler/com.sun.tools.javac.api
  *          jdk.compiler/com.sun.tools.javac.util
- * @build JavacTestingAbstractThreadedTest
  * @run main/othervm T6769027
  */
 
-// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
-// see JDK-8006746
+// use /othervm to avoid locale issues
 
 import java.net.URI;
 import java.util.regex.Matcher;
 import javax.tools.*;
 import com.sun.tools.javac.util.*;
 
-public class T6769027
-    extends JavacTestingAbstractThreadedTest
-    implements Runnable {
+public class T6769027 {
 
     enum OutputKind {
         RAW("rawDiagnostics","rawDiagnostics"),
@@ -324,11 +317,6 @@
         }
 
         @Override
-        protected java.io.PrintWriter getWriterForDiagnosticType(JCDiagnostic.DiagnosticType dt) {
-            return outWriter;
-        }
-
-        @Override
         protected boolean shouldReport(JavaFileObject jfo, int pos) {
             return true;
         }
@@ -368,7 +356,6 @@
         this.subdiagsIndent = subdiagsIndent;
     }
 
-    @Override
     public void run() {
         Context ctx = new Context();
         Options options = Options.instance(ctx);
@@ -419,7 +406,7 @@
                                                 for (IndentKind detailsIndent : IndentKind.values()) {
                                                     for (IndentKind sourceIndent : IndentKind.values()) {
                                                         for (IndentKind subdiagsIndent : IndentKind.values()) {
-                                                            pool.execute(new T6769027(outputKind,
+                                                            new T6769027(outputKind,
                                                                 errKind,
                                                                 multiKind,
                                                                 multiPolicy,
@@ -431,7 +418,7 @@
                                                                 summaryIndent,
                                                                 detailsIndent,
                                                                 sourceIndent,
-                                                                subdiagsIndent));
+                                                                subdiagsIndent).run();
                                                         }
                                                     }
                                                 }
@@ -445,8 +432,6 @@
                 }
             }
         }
-
-        checkAfterExec(false);
     }
 
     void printInfo(String msg, String errorLine) {
@@ -457,11 +442,11 @@
                 " caret=" + caretKind + " sourcePosition=" + sourceLineKind +
                 " summaryIndent=" + summaryIndent + " detailsIndent=" + detailsIndent +
                 " sourceIndent=" + sourceIndent + " subdiagsIndent=" + subdiagsIndent;
-        errWriter.println(sep);
-        errWriter.println(desc);
-        errWriter.println(sep);
-        errWriter.println(msg);
-        errWriter.println("Diagnostic formatting problem - expected diagnostic...\n" + errorLine);
+        System.err.println(sep);
+        System.err.println(desc);
+        System.err.println(sep);
+        System.err.println(msg);
+        System.err.println("Diagnostic formatting problem - expected diagnostic...\n" + errorLine);
     }
 
     void checkOutput(String msg) {
@@ -494,8 +479,8 @@
         }
 
         if (!msg.equals(errorLine)) {
-//            printInfo(msg, errorLine);
-            errCount.incrementAndGet();
+            printInfo(msg, errorLine);
+            throw new AssertionError("errors were found");
         }
     }
 
--- a/langtools/test/tools/javac/T7093325.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/langtools/test/tools/javac/T7093325.java	Tue Sep 08 15:39:51 2015 -0700
@@ -23,38 +23,41 @@
 
 /*
  * @test
- * @bug 7093325 8006694
+ * @bug 7093325 8006694 8129962
  * @summary Redundant entry in bytecode exception table
  *  temporarily workaround combo tests are causing time out in several platforms
- * @library lib
+ * @library /tools/javac/lib
  * @modules jdk.jdeps/com.sun.tools.classfile
- * @build JavacTestingAbstractThreadedTest
- * @run main/othervm T7093325
+ *          jdk.compiler/com.sun.tools.javac.api
+ *          jdk.compiler/com.sun.tools.javac.code
+ *          jdk.compiler/com.sun.tools.javac.comp
+ *          jdk.compiler/com.sun.tools.javac.main
+ *          jdk.compiler/com.sun.tools.javac.tree
+ *          jdk.compiler/com.sun.tools.javac.util
+ * @build combo.ComboTestHelper
+ * @run main T7093325
  */
 
-// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
-// see JDK-8006746
+import java.io.IOException;
+import java.io.InputStream;
 
-import java.io.File;
-import java.net.URI;
-import java.util.Arrays;
-import javax.tools.JavaCompiler;
-import javax.tools.JavaFileObject;
-import javax.tools.SimpleJavaFileObject;
-import javax.tools.ToolProvider;
-
-import com.sun.source.util.JavacTask;
 import com.sun.tools.classfile.Attribute;
 import com.sun.tools.classfile.ClassFile;
 import com.sun.tools.classfile.Code_attribute;
-import com.sun.tools.classfile.ConstantPool.*;
+import com.sun.tools.classfile.ConstantPoolException;
 import com.sun.tools.classfile.Method;
 
-public class T7093325
-    extends JavacTestingAbstractThreadedTest
-    implements Runnable {
+import javax.tools.JavaFileObject;
 
-    enum StatementKind {
+import combo.ComboInstance;
+import combo.ComboParameter;
+import combo.ComboTask.Result;
+import combo.ComboTestHelper;
+
+public class T7093325 extends ComboInstance<T7093325> {
+
+    enum StatementKind implements ComboParameter {
+        NONE(null, false, false),
         THROW("throw new RuntimeException();", false, false),
         RETURN_NONEMPTY("System.out.println(); return;", true, false),
         RETURN_EMPTY("return;", true, true),
@@ -64,107 +67,79 @@
         boolean canInline;
         boolean empty;
 
-        private StatementKind(String stmt, boolean canInline, boolean empty) {
+        StatementKind(String stmt, boolean canInline, boolean empty) {
             this.stmt = stmt;
             this.canInline = canInline;
             this.empty = empty;
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return stmt;
+        }
     }
 
-    enum CatchArity {
+    enum CatchArity implements ComboParameter {
         NONE(""),
-        ONE("catch (A a) { #S1 }"),
-        TWO("catch (B b) { #S2 }"),
-        THREE("catch (C c) { #S3 }"),
-        FOUR("catch (D d) { #S4 }");
+        ONE("catch (A a) { #{STMT[1]} }"),
+        TWO("catch (B b) { #{STMT[2]} }"),
+        THREE("catch (C c) { #{STMT[3]} }"),
+        FOUR("catch (D d) { #{STMT[4]} }");
 
         String catchStr;
 
-        private CatchArity(String catchStr) {
+        CatchArity(String catchStr) {
             this.catchStr = catchStr;
         }
 
-        String catchers() {
+        @Override
+        public String expand(String optParameter) {
             if (this.ordinal() == 0) {
                 return catchStr;
             } else {
-                return CatchArity.values()[this.ordinal() - 1].catchers() +
+                return CatchArity.values()[this.ordinal() - 1].expand(optParameter) +
                         catchStr;
             }
         }
     }
 
     public static void main(String... args) throws Exception {
-        for (CatchArity ca : CatchArity.values()) {
-            for (StatementKind stmt0 : StatementKind.values()) {
-                if (ca.ordinal() == 0) {
-                    pool.execute(new T7093325(ca, stmt0));
-                    continue;
-                }
-                for (StatementKind stmt1 : StatementKind.values()) {
-                    if (ca.ordinal() == 1) {
-                        pool.execute(new T7093325(ca, stmt0, stmt1));
-                        continue;
-                    }
-                    for (StatementKind stmt2 : StatementKind.values()) {
-                        if (ca.ordinal() == 2) {
-                            pool.execute(new T7093325(ca, stmt0, stmt1, stmt2));
-                            continue;
-                        }
-                        for (StatementKind stmt3 : StatementKind.values()) {
-                            if (ca.ordinal() == 3) {
-                                pool.execute(
-                                    new T7093325(ca, stmt0, stmt1, stmt2, stmt3));
-                                continue;
-                            }
-                            for (StatementKind stmt4 : StatementKind.values()) {
-                                if (ca.ordinal() == 4) {
-                                    pool.execute(
-                                        new T7093325(ca, stmt0, stmt1,
-                                                     stmt2, stmt3, stmt4));
-                                    continue;
-                                }
-                                for (StatementKind stmt5 : StatementKind.values()) {
-                                    pool.execute(
-                                        new T7093325(ca, stmt0, stmt1, stmt2,
-                                                     stmt3, stmt4, stmt5));
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-
-        checkAfterExec();
+        new ComboTestHelper<T7093325>()
+                .withFilter(T7093325::testFilter)
+                .withDimension("CATCH", (x, ca) -> x.ca = ca, CatchArity.values())
+                .withArrayDimension("STMT", (x, stmt, idx) -> x.stmts[idx] = stmt, 5, StatementKind.values())
+                .run(T7093325::new);
     }
 
     /** instance decls **/
 
     CatchArity ca;
-    StatementKind[] stmts;
+    StatementKind[] stmts = new StatementKind[5];
 
-    public T7093325(CatchArity ca, StatementKind... stmts) {
-        this.ca = ca;
-        this.stmts = stmts;
+    boolean testFilter() {
+        int lastPos = ca.ordinal() + 1;
+        for (int i = 0; i < stmts.length ; i++) {
+            boolean shouldBeSet = i < lastPos;
+            boolean isSet = stmts[i] != StatementKind.NONE;
+            if (shouldBeSet != isSet) {
+                return false;
+            }
+        }
+        return true;
     }
 
     @Override
-    public void run() {
-        int id = checkCount.incrementAndGet();
-        final JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
-        JavaSource source = new JavaSource(id);
-        JavacTask ct = (JavacTask)tool.getTask(null, fm.get(), null,
-                null, null, Arrays.asList(source));
-        ct.call();
-        verifyBytecode(source, id);
+    public void doWork() throws IOException {
+        verifyBytecode(newCompilationTask()
+                .withSourceFromTemplate(source_template)
+                .generate());
     }
 
-    void verifyBytecode(JavaSource source, int id) {
+    void verifyBytecode(Result<Iterable<? extends JavaFileObject>> result) {
         boolean lastInlined = false;
         boolean hasCode = false;
         int gapsCount = 0;
-        for (int i = 0; i < stmts.length ; i++) {
+        for (int i = 0; i < ca.ordinal() + 1 ; i++) {
             lastInlined = stmts[i].canInline;
             hasCode = hasCode || !stmts[i].empty;
             if (lastInlined && hasCode) {
@@ -176,12 +151,11 @@
             gapsCount++;
         }
 
-        File compiledTest = new File(String.format("Test%s.class", id));
-        try {
-            ClassFile cf = ClassFile.read(compiledTest);
+        try (InputStream is = result.get().iterator().next().openInputStream()) {
+            ClassFile cf = ClassFile.read(is);
             if (cf == null) {
-                throw new Error("Classfile not found: " +
-                                compiledTest.getName());
+                fail("Classfile not found: " + result.compilationInfo());
+                return;
             }
 
             Method test_method = null;
@@ -193,7 +167,8 @@
             }
 
             if (test_method == null) {
-                throw new Error("Method test() not found in class Test");
+                fail("Method test() not found in class Test" + result.compilationInfo());
+                return;
             }
 
             Code_attribute code = null;
@@ -205,7 +180,8 @@
             }
 
             if (code == null) {
-                throw new Error("Code attribute not found in method test()");
+                fail("Code attribute not found in method test()");
+                return;
             }
 
             int actualGapsCount = 0;
@@ -217,54 +193,28 @@
             }
 
             if (actualGapsCount != gapsCount) {
-                throw new Error("Bad exception table for test()\n" +
+                fail("Bad exception table for test()\n" +
                             "expected gaps: " + gapsCount + "\n" +
                             "found gaps: " + actualGapsCount + "\n" +
-                            source);
+                        result.compilationInfo());
+                return;
             }
-        } catch (Exception e) {
+        } catch (IOException | ConstantPoolException e) {
             e.printStackTrace();
-            throw new Error("error reading " + compiledTest +": " + e);
+            fail("error reading classfile: " + e);
         }
 
     }
 
-    class JavaSource extends SimpleJavaFileObject {
-
-        static final String source_template =
+    static final String source_template =
+                "class Test {\n" +
+                "   void test() {\n" +
+                "   try { #{STMT[0]} } #{CATCH} finally { System.out.println(); }\n" +
+                "   }\n" +
+                "}\n" +
                 "class A extends RuntimeException {} \n" +
                 "class B extends RuntimeException {} \n" +
                 "class C extends RuntimeException {} \n" +
                 "class D extends RuntimeException {} \n" +
-                "class E extends RuntimeException {} \n" +
-                "class Test#ID {\n" +
-                "   void test() {\n" +
-                "   try { #S0 } #C finally { System.out.println(); }\n" +
-                "   }\n" +
-                "}";
-
-        String source;
-
-        public JavaSource(int id) {
-            super(URI.create(String.format("myfo:/Test%s.java", id)),
-                  JavaFileObject.Kind.SOURCE);
-            source = source_template.replace("#C", ca.catchers());
-            source = source.replace("#S0", stmts[0].stmt);
-            source = source.replace("#ID", String.valueOf(id));
-            for (int i = 1; i < ca.ordinal() + 1; i++) {
-                source = source.replace("#S" + i, stmts[i].stmt);
-            }
-        }
-
-        @Override
-        public String toString() {
-            return source;
-        }
-
-        @Override
-        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
-            return source;
-        }
-    }
-
+                "class E extends RuntimeException {}";
 }
--- a/langtools/test/tools/javac/TestBootstrapMethodsCount.java	Tue Sep 01 12:57:41 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,236 +0,0 @@
-/*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 8129547
- * @summary Excess entries in BootstrapMethods with the same (bsm, bsmKind, bsmStaticArgs), but different dynamicArgs
- * @library lib
- * @modules jdk.jdeps/com.sun.tools.classfile
- *          jdk.compiler/com.sun.tools.javac.api
- *          jdk.compiler/com.sun.tools.javac.code
- *          jdk.compiler/com.sun.tools.javac.jvm
- *          jdk.compiler/com.sun.tools.javac.tree
- *          jdk.compiler/com.sun.tools.javac.util
- * @build JavacTestingAbstractThreadedTest
- * @run main/othervm TestBootstrapMethodsCount
- */
-
-import java.io.File;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Locale;
-
-import javax.tools.Diagnostic;
-import javax.tools.JavaFileObject;
-import javax.tools.SimpleJavaFileObject;
-
-import com.sun.source.tree.MethodInvocationTree;
-import com.sun.source.tree.MethodTree;
-import com.sun.source.util.TaskEvent;
-import com.sun.source.util.TaskListener;
-import com.sun.source.util.TreeScanner;
-
-import com.sun.tools.classfile.Attribute;
-import com.sun.tools.classfile.BootstrapMethods_attribute;
-import com.sun.tools.classfile.ClassFile;
-
-import com.sun.tools.javac.api.JavacTaskImpl;
-import com.sun.tools.javac.code.Symbol;
-import com.sun.tools.javac.code.Symbol.MethodSymbol;
-import com.sun.tools.javac.code.Symtab;
-import com.sun.tools.javac.code.Types;
-import com.sun.tools.javac.tree.JCTree.JCMethodInvocation;
-import com.sun.tools.javac.tree.JCTree.JCMethodDecl;
-import com.sun.tools.javac.tree.JCTree.JCIdent;
-import com.sun.tools.javac.util.Context;
-import com.sun.tools.javac.util.Names;
-
-import static com.sun.tools.javac.jvm.ClassFile.*;
-
-public class TestBootstrapMethodsCount
-        extends JavacTestingAbstractThreadedTest
-        implements Runnable {
-
-
-    public static void main(String... args) throws Exception {
-        pool.execute(new TestBootstrapMethodsCount());
-        checkAfterExec();
-    }
-
-    DiagChecker dc;
-
-    TestBootstrapMethodsCount() {
-        dc = new DiagChecker();
-    }
-
-    public void run() {
-        int id = checkCount.incrementAndGet();
-        JavaSource source = new JavaSource(id);
-        JavacTaskImpl ct = (JavacTaskImpl)comp.getTask(null, fm.get(), dc,
-                Arrays.asList("-g"), null, Arrays.asList(source));
-        Context context = ct.getContext();
-        Symtab syms = Symtab.instance(context);
-        Names names = Names.instance(context);
-        Types types = Types.instance(context);
-        ct.addTaskListener(new Indifier(syms, names, types));
-        try {
-            ct.generate();
-        } catch (Throwable t) {
-            t.printStackTrace();
-            throw new AssertionError(
-                    String.format("Error thrown when compiling following code\n%s",
-                            source.source));
-        }
-        if (dc.diagFound) {
-            throw new AssertionError(
-                    String.format("Diags found when compiling following code\n%s\n\n%s",
-                            source.source, dc.printDiags()));
-        }
-        verifyBytecode(id);
-    }
-
-    void verifyBytecode(int id) {
-        File compiledTest = new File(String.format("Test%d.class", id));
-        try {
-            ClassFile cf = ClassFile.read(compiledTest);
-            BootstrapMethods_attribute bsm_attr =
-                    (BootstrapMethods_attribute)cf
-                            .getAttribute(Attribute.BootstrapMethods);
-            int length = bsm_attr.bootstrap_method_specifiers.length;
-            if (length != 1) {
-                throw new Error("Bad number of method specifiers " +
-                        "in BootstrapMethods attribute: " + length);
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-            throw new Error("error reading " + compiledTest +": " + e);
-        }
-    }
-
-    class JavaSource extends SimpleJavaFileObject {
-
-        static final String source_template = "import java.lang.invoke.*;\n" +
-                "class Bootstrap {\n" +
-                "   public static CallSite bsm(MethodHandles.Lookup lookup, " +
-                "String name, MethodType methodType) {\n" +
-                "       return null;\n" +
-                "   }\n" +
-                "}\n" +
-                "class Test#ID {\n" +
-                "   void m1() { }\n" +
-                "   void m2(Object arg1) { }\n" +
-                "   void test1() {\n" +
-                "      Object o = this; // marker statement \n" +
-                "      m1();\n" +
-                "   }\n" +
-                "   void test2(Object arg1) {\n" +
-                "      Object o = this; // marker statement \n" +
-                "      m2(arg1);\n" +
-                "   }\n" +
-                "}";
-
-        String source;
-
-        JavaSource(int id) {
-            super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
-            source = source_template.replace("#ID", String.valueOf(id));
-        }
-
-        @Override
-        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
-            return source;
-        }
-    }
-
-    class Indifier extends TreeScanner<Void, Void> implements TaskListener {
-
-        MethodSymbol bsm;
-        Symtab syms;
-        Names names;
-        Types types;
-
-        Indifier(Symtab syms, Names names, Types types) {
-            this.syms = syms;
-            this.names = names;
-            this.types = types;
-        }
-
-        @Override
-        public void started(TaskEvent e) {
-            //do nothing
-        }
-
-        @Override
-        public void finished(TaskEvent e) {
-            if (e.getKind() == TaskEvent.Kind.ANALYZE) {
-                scan(e.getCompilationUnit(), null);
-            }
-        }
-
-        @Override
-        public Void visitMethodInvocation(MethodInvocationTree node, Void p) {
-            super.visitMethodInvocation(node, p);
-            JCMethodInvocation apply = (JCMethodInvocation)node;
-            JCIdent ident = (JCIdent)apply.meth;
-            Symbol oldSym = ident.sym;
-            if (!oldSym.isConstructor()) {
-                ident.sym = new Symbol.DynamicMethodSymbol(oldSym.name,
-                        oldSym.owner, REF_invokeStatic, bsm, oldSym.type, new Object[0]);
-            }
-            return null;
-        }
-
-        @Override
-        public Void visitMethod(MethodTree node, Void p) {
-            super.visitMethod(node, p);
-            if (node.getName().toString().equals("bsm")) {
-                bsm = ((JCMethodDecl)node).sym;
-            }
-            return null;
-        }
-    }
-
-    static class DiagChecker
-            implements javax.tools.DiagnosticListener<JavaFileObject> {
-
-        boolean diagFound;
-        ArrayList<String> diags = new ArrayList<>();
-
-        public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
-            diags.add(diagnostic.getMessage(Locale.getDefault()));
-            diagFound = true;
-        }
-
-        String printDiags() {
-            StringBuilder buf = new StringBuilder();
-            for (String s : diags) {
-                buf.append(s);
-                buf.append("\n");
-            }
-            return buf.toString();
-        }
-    }
-
-}
--- a/langtools/test/tools/javac/cast/intersection/IntersectionTypeCastTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/langtools/test/tools/javac/cast/intersection/IntersectionTypeCastTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -23,53 +23,47 @@
 
 /*
  * @test
- * @bug 8002099 8006694
+ * @bug 8002099 8006694 8129962
  * @summary Add support for intersection types in cast expression
  *  temporarily workaround combo tests are causing time out in several platforms
- * @library ../../lib
- * @modules jdk.compiler/com.sun.tools.javac.util
- * @build JavacTestingAbstractThreadedTest
- * @run main/othervm/timeout=360 IntersectionTypeCastTest
+ * @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ *          jdk.compiler/com.sun.tools.javac.code
+ *          jdk.compiler/com.sun.tools.javac.comp
+ *          jdk.compiler/com.sun.tools.javac.main
+ *          jdk.compiler/com.sun.tools.javac.tree
+ *          jdk.compiler/com.sun.tools.javac.util
+ * @build combo.ComboTestHelper
+
+ * @run main IntersectionTypeCastTest
  */
 
-// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
-// see JDK-8006746
+import com.sun.tools.javac.util.List;
 
-import java.net.URI;
-import java.util.Arrays;
-import javax.tools.Diagnostic;
-import javax.tools.JavaCompiler;
-import javax.tools.JavaFileObject;
-import javax.tools.SimpleJavaFileObject;
-import javax.tools.ToolProvider;
+import combo.ComboInstance;
+import combo.ComboParameter;
+import combo.ComboTask.Result;
+import combo.ComboTestHelper;
 
-import com.sun.source.util.JavacTask;
-import com.sun.tools.javac.util.List;
-import com.sun.tools.javac.util.ListBuffer;
+import java.io.IOException;
 
-public class IntersectionTypeCastTest
-    extends JavacTestingAbstractThreadedTest
-    implements Runnable {
+public class IntersectionTypeCastTest extends ComboInstance<IntersectionTypeCastTest> {
 
-    interface Type {
+    interface Type extends ComboParameter {
         boolean subtypeOf(Type that);
-        String asString();
         boolean isClass();
         boolean isInterface();
     }
 
     enum InterfaceKind implements Type {
-        A("interface A { }\n", "A", null),
-        B("interface B { }\n", "B", null),
-        C("interface C extends A { }\n", "C", A);
+        A("A", null),
+        B("B", null),
+        C("C", A);
 
-        String declStr;
         String typeStr;
         InterfaceKind superInterface;
 
-        InterfaceKind(String declStr, String typeStr,
-                InterfaceKind superInterface) {
-            this.declStr = declStr;
+        InterfaceKind(String typeStr, InterfaceKind superInterface) {
             this.typeStr = typeStr;
             this.superInterface = superInterface;
         }
@@ -81,11 +75,6 @@
         }
 
         @Override
-        public String asString() {
-            return typeStr;
-        }
-
-        @Override
         public boolean isClass() {
             return false;
         }
@@ -94,42 +83,31 @@
         public boolean isInterface() {
             return true;
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return typeStr;
+        }
     }
 
     enum ClassKind implements Type {
-        OBJECT(null, "Object"),
-        CA("#M class CA implements A { }\n", "CA",
-           InterfaceKind.A),
-        CB("#M class CB implements B { }\n", "CB",
-           InterfaceKind.B),
-        CAB("#M class CAB implements A, B { }\n", "CAB",
-            InterfaceKind.A, InterfaceKind.B),
-        CC("#M class CC implements C { }\n", "CC",
-           InterfaceKind.C, InterfaceKind.A),
-        CCA("#M class CCA implements C, A { }\n", "CCA",
-            InterfaceKind.C, InterfaceKind.A),
-        CCB("#M class CCB implements C, B { }\n", "CCB",
-            InterfaceKind.C, InterfaceKind.A, InterfaceKind.B),
-        CCAB("#M class CCAB implements C, A, B { }\n", "CCAB",
-             InterfaceKind.C, InterfaceKind.A, InterfaceKind.B);
+        OBJECT("Object"),
+        CA("CA", InterfaceKind.A),
+        CB("CB", InterfaceKind.B),
+        CAB("CAB", InterfaceKind.A, InterfaceKind.B),
+        CC("CC", InterfaceKind.C, InterfaceKind.A),
+        CCA("CCA", InterfaceKind.C, InterfaceKind.A),
+        CCB("CCB", InterfaceKind.C, InterfaceKind.A, InterfaceKind.B),
+        CCAB("CCAB", InterfaceKind.C, InterfaceKind.A, InterfaceKind.B);
 
-        String declTemplate;
         String typeStr;
         List<InterfaceKind> superInterfaces;
 
-        ClassKind(String declTemplate, String typeStr,
-                InterfaceKind... superInterfaces) {
-            this.declTemplate = declTemplate;
+        ClassKind(String typeStr, InterfaceKind... superInterfaces) {
             this.typeStr = typeStr;
             this.superInterfaces = List.from(superInterfaces);
         }
 
-        String getDecl(ModifierKind mod) {
-            return declTemplate != null ?
-                    declTemplate.replaceAll("#M", mod.modStr) :
-                    "";
-        }
-
         @Override
         public boolean subtypeOf(Type that) {
             return this == that || superInterfaces.contains(that) ||
@@ -137,11 +115,6 @@
         }
 
         @Override
-        public String asString() {
-            return typeStr;
-        }
-
-        @Override
         public boolean isClass() {
             return true;
         }
@@ -150,9 +123,14 @@
         public boolean isInterface() {
             return false;
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return typeStr;
+        }
     }
 
-    enum ModifierKind {
+    enum ModifierKind implements ComboParameter {
         NONE(""),
         FINAL("final");
 
@@ -161,14 +139,18 @@
         ModifierKind(String modStr) {
             this.modStr = modStr;
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return modStr;
+        }
     }
 
-    enum CastKind {
-        CLASS("(#C)", 0),
-        INTERFACE("(#I0)", 1),
-        INTERSECTION2("(#C & #I0)", 1),
-        INTERSECTION3("(#C & #I0 & #I1)", 2);
-        //INTERSECTION4("(#C & #I0 & #I1 & #I2)", 3);
+    enum CastKind implements ComboParameter {
+        CLASS("(#{CLAZZ#IDX})", 0),
+        INTERFACE("(#{INTF1#IDX})", 1),
+        INTERSECTION2("(#{CLAZZ#IDX} & #{INTF1#IDX})", 1),
+        INTERSECTION3("(#{CLAZZ#IDX} & #{INTF1#IDX} & #{INTF2#IDX})", 2);
 
         String castTemplate;
         int interfaceBounds;
@@ -177,6 +159,11 @@
             this.castTemplate = castTemplate;
             this.interfaceBounds = interfaceBounds;
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return castTemplate.replaceAll("#IDX", optParameter);
+        }
     }
 
     static class CastInfo {
@@ -188,19 +175,9 @@
             this.types = types;
         }
 
-        String getCast() {
-            String temp = kind.castTemplate.replaceAll("#C",
-                    types[0].asString());
-            for (int i = 0; i < kind.interfaceBounds ; i++) {
-                temp = temp.replace(String.format("#I%d", i),
-                                    types[i + 1].asString());
-            }
-            return temp;
-        }
-
         boolean hasDuplicateTypes() {
-            for (int i = 0 ; i < types.length ; i++) {
-                for (int j = 0 ; j < types.length ; j++) {
+            for (int i = 0 ; i < arity() ; i++) {
+                for (int j = 0 ; j < arity() ; j++) {
                     if (i != j && types[i] == types[j]) {
                         return true;
                     }
@@ -210,8 +187,10 @@
         }
 
         boolean compatibleWith(ModifierKind mod, CastInfo that) {
-            for (Type t1 : types) {
-                for (Type t2 : that.types) {
+            for (int i = 0 ; i < arity() ; i++) {
+                Type t1 = types[i];
+                for (int j = 0 ; j < that.arity() ; j++) {
+                    Type t2 = that.types[j];
                     boolean compat =
                             t1.subtypeOf(t2) ||
                             t2.subtypeOf(t1) ||
@@ -223,138 +202,92 @@
             }
             return true;
         }
+
+        private int arity() {
+            return kind.interfaceBounds + 1;
+        }
     }
 
     public static void main(String... args) throws Exception {
-        for (ModifierKind mod : ModifierKind.values()) {
-            for (CastInfo cast1 : allCastInfo()) {
-                for (CastInfo cast2 : allCastInfo()) {
-                    pool.execute(
-                        new IntersectionTypeCastTest(mod, cast1, cast2));
+        new ComboTestHelper<IntersectionTypeCastTest>()
+                .withFilter(IntersectionTypeCastTest::isRedundantCast)
+                .withFilter(IntersectionTypeCastTest::arityFilter)
+                .withArrayDimension("CAST", (x, ck, idx) -> x.castKinds[idx] = ck, 2, CastKind.values())
+                .withDimension("CLAZZ1", (x, ty) -> x.types1[0] = ty, ClassKind.values())
+                .withDimension("INTF11", (x, ty) -> x.types1[1] = ty, InterfaceKind.values())
+                .withDimension("INTF21", (x, ty) -> x.types1[2] = ty, InterfaceKind.values())
+                .withDimension("CLAZZ2", (x, ty) -> x.types2[0] = ty, ClassKind.values())
+                .withDimension("INTF12", (x, ty) -> x.types2[1] = ty, InterfaceKind.values())
+                .withDimension("INTF22", (x, ty) -> x.types2[2] = ty, InterfaceKind.values())
+                .withDimension("MOD", (x, mod) -> x.mod = mod, ModifierKind.values())
+                .run(IntersectionTypeCastTest::new);
+    }
+
+    boolean isRedundantCast() {
+        for (int i = 0 ; i < 2 ; i++) {
+            Type[] types = i == 0 ? types1 : types2;
+            if (castKinds[i] == CastKind.INTERFACE && types[0] != ClassKind.OBJECT) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    boolean arityFilter() {
+        for (int i = 0 ; i < 2 ; i++) {
+            int lastPos = castKinds[i].interfaceBounds + 1;
+            Type[] types = i == 0 ? types1 : types2;
+            for (int j = 1; j < types.length; j++) {
+                boolean shouldBeSet = j < lastPos;
+                if (!shouldBeSet && (types[j] != InterfaceKind.A)) {
+                    return false;
                 }
             }
         }
-        checkAfterExec();
-    }
-
-    static List<CastInfo> allCastInfo() {
-        ListBuffer<CastInfo> buf = new ListBuffer<>();
-        for (CastKind kind : CastKind.values()) {
-            for (ClassKind clazz : ClassKind.values()) {
-                if (kind == CastKind.INTERFACE && clazz != ClassKind.OBJECT) {
-                    continue;
-                } else if (kind.interfaceBounds == 0) {
-                    buf.append(new CastInfo(kind, clazz));
-                    continue;
-                } else {
-                    for (InterfaceKind intf1 : InterfaceKind.values()) {
-                        if (kind.interfaceBounds == 1) {
-                            buf.append(new CastInfo(kind, clazz, intf1));
-                            continue;
-                        } else {
-                            for (InterfaceKind intf2 : InterfaceKind.values()) {
-                                if (kind.interfaceBounds == 2) {
-                                    buf.append(
-                                            new CastInfo(kind, clazz, intf1, intf2));
-                                    continue;
-                                } else {
-                                    for (InterfaceKind intf3 : InterfaceKind.values()) {
-                                        buf.append(
-                                                new CastInfo(kind, clazz, intf1,
-                                                             intf2, intf3));
-                                        continue;
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        return buf.toList();
+        return true;
     }
 
     ModifierKind mod;
-    CastInfo cast1, cast2;
-    JavaSource source;
-    DiagnosticChecker diagChecker;
+    CastKind[] castKinds = new CastKind[2];
+    Type[] types1 = new Type[3];
+    Type[] types2 = new Type[3];
 
-    IntersectionTypeCastTest(ModifierKind mod, CastInfo cast1, CastInfo cast2) {
-        this.mod = mod;
-        this.cast1 = cast1;
-        this.cast2 = cast2;
-        this.source = new JavaSource();
-        this.diagChecker = new DiagnosticChecker();
+    @Override
+    public void doWork() throws IOException {
+        check(newCompilationTask()
+                .withSourceFromTemplate(bodyTemplate)
+                .analyze());
     }
 
-    @Override
-    public void run() {
-        final JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
+    String bodyTemplate = "class Test {\n" +
+                          "   void test() {\n" +
+                          "      Object o = #{CAST[0].1}#{CAST[1].2}null;\n" +
+                          "   } }\n" +
+                          "interface A { }\n" +
+                          "interface B { }\n" +
+                          "interface C extends A { }\n" +
+                          "#{MOD} class CA implements A { }\n" +
+                          "#{MOD} class CB implements B { }\n" +
+                          "#{MOD} class CAB implements A, B { }\n" +
+                          "#{MOD} class CC implements C { }\n" +
+                          "#{MOD} class CCA implements C, A { }\n" +
+                          "#{MOD} class CCB implements C, B { }\n" +
+                          "#{MOD} class CCAB implements C, A, B { }";
 
-        JavacTask ct = (JavacTask)tool.getTask(null, fm.get(), diagChecker,
-                null, null, Arrays.asList(source));
-        try {
-            ct.analyze();
-        } catch (Throwable ex) {
-            throw new AssertionError("Error thrown when compiling the following code:\n" +
-                    source.getCharContent(true));
-        }
-        check();
-    }
-
-    class JavaSource extends SimpleJavaFileObject {
-
-        String bodyTemplate = "class Test {\n" +
-                              "   void test() {\n" +
-                              "      Object o = #C1#C2null;\n" +
-                              "   } }";
-
-        String source = "";
-
-        public JavaSource() {
-            super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
-            for (ClassKind ck : ClassKind.values()) {
-                source += ck.getDecl(mod);
-            }
-            for (InterfaceKind ik : InterfaceKind.values()) {
-                source += ik.declStr;
-            }
-            source += bodyTemplate.replaceAll("#C1", cast1.getCast()).
-                    replaceAll("#C2", cast2.getCast());
-        }
-
-        @Override
-        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
-            return source;
-        }
-    }
-
-    void check() {
-        checkCount.incrementAndGet();
-
+    void check(Result<?> res) {
+        CastInfo cast1 = new CastInfo(castKinds[0], types1);
+        CastInfo cast2 = new CastInfo(castKinds[1], types2);
         boolean errorExpected = cast1.hasDuplicateTypes() ||
                 cast2.hasDuplicateTypes();
 
         errorExpected |= !cast2.compatibleWith(mod, cast1);
 
-        if (errorExpected != diagChecker.errorFound) {
-            throw new Error("invalid diagnostics for source:\n" +
-                source.getCharContent(true) +
-                "\nFound error: " + diagChecker.errorFound +
+        boolean errorsFound = res.hasErrors();
+        if (errorExpected != errorsFound) {
+            fail("invalid diagnostics for source:\n" +
+                res.compilationInfo() +
+                "\nFound error: " + errorsFound +
                 "\nExpected error: " + errorExpected);
         }
     }
-
-    static class DiagnosticChecker
-        implements javax.tools.DiagnosticListener<JavaFileObject> {
-
-        boolean errorFound;
-
-        public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
-            if (diagnostic.getKind() == Diagnostic.Kind.ERROR) {
-                errorFound = true;
-            }
-        }
-    }
-
 }
--- a/langtools/test/tools/javac/defaultMethods/static/hiding/InterfaceMethodHidingTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/langtools/test/tools/javac/defaultMethods/static/hiding/InterfaceMethodHidingTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -23,40 +23,41 @@
 
 /*
  * @test
- * @bug 8005166
+ * @bug 8005166 8129962
  * @summary Add support for static interface methods
  *          Smoke test for static interface method hiding
- * @modules jdk.compiler
- * @run main/timeout=600 InterfaceMethodHidingTest
+ * @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ *          jdk.compiler/com.sun.tools.javac.code
+ *          jdk.compiler/com.sun.tools.javac.comp
+ *          jdk.compiler/com.sun.tools.javac.main
+ *          jdk.compiler/com.sun.tools.javac.tree
+ *          jdk.compiler/com.sun.tools.javac.util
+ * @build combo.ComboTestHelper
+ * @run main InterfaceMethodHidingTest
  */
 
-import com.sun.source.util.JavacTask;
-import java.net.URI;
-import java.util.Arrays;
-import javax.tools.Diagnostic;
-import javax.tools.JavaCompiler;
-import javax.tools.JavaFileObject;
-import javax.tools.SimpleJavaFileObject;
-import javax.tools.StandardJavaFileManager;
-import javax.tools.ToolProvider;
+import java.io.IOException;
 
+import combo.ComboInstance;
+import combo.ComboParameter;
+import combo.ComboTask.Result;
+import combo.ComboTestHelper;
 
-public class InterfaceMethodHidingTest {
+public class InterfaceMethodHidingTest extends ComboInstance<InterfaceMethodHidingTest> {
 
-    static int checkCount = 0;
-
-    enum SignatureKind {
-        VOID_INTEGER("void m(Integer s)", "return;"),
-        STRING_INTEGER("String m(Integer s)", "return null;"),
-        VOID_STRING("void m(String s)", "return;"),
-        STRING_STRING("String m(String s)", "return null;");
+    enum SignatureKind implements ComboParameter {
+        VOID_INTEGER("void m(Integer s)", false),
+        STRING_INTEGER("String m(Integer s)", true),
+        VOID_STRING("void m(String s)", false),
+        STRING_STRING("String m(String s)", true);
 
         String sigStr;
-        String retStr;
+        boolean needsReturn;
 
-        SignatureKind(String sigStr, String retStr) {
+        SignatureKind(String sigStr, boolean needsReturn) {
             this.sigStr = sigStr;
-            this.retStr = retStr;
+            this.needsReturn = needsReturn;
         }
 
         boolean overrideEquivalentWith(SignatureKind s2) {
@@ -71,18 +72,21 @@
                     throw new AssertionError("bad signature kind");
             }
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return sigStr;
+        }
     }
 
-    enum MethodKind {
-        VIRTUAL("", "#M #S;"),
-        STATIC("static", "#M #S { #BE; #R }"),
-        DEFAULT("default", "#M #S { #BE; #R }");
+    enum MethodKind implements ComboParameter {
+        VIRTUAL("#{SIG[#IDX]};"),
+        STATIC("static #{SIG[#IDX]} { #{BODY[#IDX]}; #{RET.#IDX} }"),
+        DEFAULT("default #{SIG[#IDX]} { #{BODY[#IDX]}; #{RET.#IDX} }");
 
-        String modStr;
         String methTemplate;
 
-        MethodKind(String modStr, String methTemplate) {
-            this.modStr = modStr;
+        MethodKind(String methTemplate) {
             this.methTemplate = methTemplate;
         }
 
@@ -96,15 +100,13 @@
                     mk1 != STATIC;
         }
 
-        String getBody(BodyExpr be, SignatureKind sk) {
-            return methTemplate.replaceAll("#BE", be.bodyExprStr)
-                    .replaceAll("#R", sk.retStr)
-                    .replaceAll("#M", modStr)
-                    .replaceAll("#S", sk.sigStr);
+        @Override
+        public String expand(String optParameter) {
+            return methTemplate.replaceAll("#IDX", optParameter);
         }
     }
 
-    enum BodyExpr {
+    enum BodyExpr implements ComboParameter {
         NONE(""),
         THIS("Object o = this");
 
@@ -118,129 +120,78 @@
             return this == NONE ||
                     mk != MethodKind.STATIC;
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return bodyExprStr;
+        }
     }
 
     public static void main(String... args) throws Exception {
+        new ComboTestHelper<InterfaceMethodHidingTest>()
+                .withArrayDimension("SIG", (x, sig, idx) -> x.signatureKinds[idx] = sig, 3, SignatureKind.values())
+                .withArrayDimension("BODY", (x, body, idx) -> x.bodyExprs[idx] = body, 3, BodyExpr.values())
+                .withArrayDimension("MET", (x, meth, idx) -> x.methodKinds[idx] = meth, 3, MethodKind.values())
+                .run(InterfaceMethodHidingTest::new);
+    }
 
-        //create default shared JavaCompiler - reused across multiple compilations
-        JavaCompiler comp = ToolProvider.getSystemJavaCompiler();
-        try (StandardJavaFileManager fm = comp.getStandardFileManager(null, null, null)) {
+    MethodKind[] methodKinds = new MethodKind[3];
+    SignatureKind[] signatureKinds = new SignatureKind[3];
+    BodyExpr[] bodyExprs = new BodyExpr[3];
 
-            for (MethodKind mk1 : MethodKind.values()) {
-                for (SignatureKind sk1 : SignatureKind.values()) {
-                    for (BodyExpr be1 : BodyExpr.values()) {
-                        for (MethodKind mk2 : MethodKind.values()) {
-                            for (SignatureKind sk2 : SignatureKind.values()) {
-                                for (BodyExpr be2 : BodyExpr.values()) {
-                                    for (MethodKind mk3 : MethodKind.values()) {
-                                        for (SignatureKind sk3 : SignatureKind.values()) {
-                                            for (BodyExpr be3 : BodyExpr.values()) {
-                                                new InterfaceMethodHidingTest(mk1, mk2, mk3, sk1, sk2, sk3, be1, be2, be3).run(comp, fm);
-                                            }
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-            System.out.println("Total check executed: " + checkCount);
+    String template = "interface Sup {\n" +
+                          "   default void sup() { }\n" +
+                          "}\n" +
+                          "interface A extends Sup {\n" +
+                          "   #{MET[0].0}\n" +
+                          "}\n" +
+                          "interface B extends A, Sup {\n" +
+                          "   #{MET[1].1}\n" +
+                          "}\n" +
+                          "interface C extends B, Sup {\n" +
+                          "   #{MET[2].2}\n" +
+                          "}\n";
+
+    @Override
+    public void doWork() throws IOException {
+        check(newCompilationTask()
+                .withOption("-XDallowStaticInterfaceMethods")
+                .withSourceFromTemplate(template, this::returnExpr)
+                .analyze());
+    }
+
+    ComboParameter returnExpr(String name) {
+        switch (name) {
+            case "RET":
+                return optParameter -> {
+                    int idx = new Integer(optParameter);
+                    return signatureKinds[idx].needsReturn ? "return null;" : "return;";
+                };
+            default:
+                return null;
         }
     }
 
-    MethodKind mk1, mk2, mk3;
-    SignatureKind sk1, sk2, sk3;
-    BodyExpr be1, be2, be3;
-    JavaSource source;
-    DiagnosticChecker diagChecker;
+    void check(Result<?> res) {
+        boolean errorExpected = !bodyExprs[0].allowed(methodKinds[0]) ||
+                !bodyExprs[1].allowed(methodKinds[1]) ||
+                !bodyExprs[2].allowed(methodKinds[2]);
 
-    InterfaceMethodHidingTest(MethodKind mk1, MethodKind mk2, MethodKind mk3,
-            SignatureKind sk1, SignatureKind sk2, SignatureKind sk3, BodyExpr be1, BodyExpr be2, BodyExpr be3) {
-        this.mk1 = mk1;
-        this.mk2 = mk2;
-        this.mk3 = mk3;
-        this.sk1 = sk1;
-        this.sk2 = sk2;
-        this.sk3 = sk3;
-        this.be1 = be1;
-        this.be2 = be2;
-        this.be3 = be3;
-        this.source = new JavaSource();
-        this.diagChecker = new DiagnosticChecker();
-    }
-
-    class JavaSource extends SimpleJavaFileObject {
-
-        String template = "interface Sup {\n" +
-                          "   default void sup() { }\n" +
-                          "}\n" +
-                          "interface A extends Sup {\n" +
-                          "   #M1\n" +
-                          "}\n" +
-                          "interface B extends A, Sup {\n" +
-                          "   #M2\n" +
-                          "}\n" +
-                          "interface C extends B, Sup {\n" +
-                          "   #M3\n" +
-                          "}\n";
-
-        String source;
-
-        public JavaSource() {
-            super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
-            source = template.replaceAll("#M1", mk1.getBody(be1, sk1))
-                    .replaceAll("#M2", mk2.getBody(be2, sk2))
-                    .replaceAll("#M3", mk3.getBody(be3, sk3));
+        if (methodKinds[0].inherithed()) {
+            errorExpected |= signatureKinds[1].overrideEquivalentWith(signatureKinds[0]) &&
+                    !MethodKind.overrides(methodKinds[1], signatureKinds[1], methodKinds[0], signatureKinds[0]) ||
+                    signatureKinds[2].overrideEquivalentWith(signatureKinds[0]) &&
+                    !MethodKind.overrides(methodKinds[2], signatureKinds[2], methodKinds[0], signatureKinds[0]);
         }
 
-        @Override
-        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
-            return source;
-        }
-    }
-
-    void run(JavaCompiler tool, StandardJavaFileManager fm) throws Exception {
-        JavacTask ct = (JavacTask)tool.getTask(null, fm, diagChecker,
-                Arrays.asList("-XDallowStaticInterfaceMethods"), null, Arrays.asList(source));
-        try {
-            ct.analyze();
-        } catch (Throwable ex) {
-            throw new AssertionError("Error thrown when analyzing the following source:\n" + source.getCharContent(true));
-        }
-        check();
-    }
-
-    void check() {
-        boolean errorExpected =
-                !be1.allowed(mk1) || !be2.allowed(mk2) || !be3.allowed(mk3);
-
-        if (mk1.inherithed()) {
-            errorExpected |=
-                    sk2.overrideEquivalentWith(sk1) && !MethodKind.overrides(mk2, sk2, mk1, sk1) ||
-                    sk3.overrideEquivalentWith(sk1) && !MethodKind.overrides(mk3, sk3, mk1, sk1);
+        if (methodKinds[1].inherithed()) {
+            errorExpected |= signatureKinds[2].overrideEquivalentWith(signatureKinds[1]) &&
+                    !MethodKind.overrides(methodKinds[2], signatureKinds[2], methodKinds[1], signatureKinds[1]);
         }
 
-        if (mk2.inherithed()) {
-            errorExpected |=
-                    sk3.overrideEquivalentWith(sk2) && !MethodKind.overrides(mk3, sk3, mk2, sk2);
-        }
-
-        checkCount++;
-        if (diagChecker.errorFound != errorExpected) {
-            throw new AssertionError("Problem when compiling source:\n" + source.getCharContent(true) +
-                    "\nfound error: " + diagChecker.errorFound);
-        }
-    }
-
-    static class DiagnosticChecker implements javax.tools.DiagnosticListener<JavaFileObject> {
-
-        boolean errorFound;
-
-        public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
-            if (diagnostic.getKind() == Diagnostic.Kind.ERROR) {
-                errorFound = true;
-            }
+        if (res.hasErrors() != errorExpected) {
+            fail("Problem when compiling source:\n" + res.compilationInfo() +
+                    "\nfound error: " + res.hasErrors());
         }
     }
 }
--- a/langtools/test/tools/javac/defaultMethods/super/TestDefaultSuperCall.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/langtools/test/tools/javac/defaultMethods/super/TestDefaultSuperCall.java	Tue Sep 08 15:39:51 2015 -0700
@@ -23,33 +23,32 @@
 
 /*
  * @test
- * @bug 7192246 8006694
+ * @bug 7192246 8006694 8129962
  * @summary Automatic test for checking correctness of default super/this resolution
  *  temporarily workaround combo tests are causing time out in several platforms
- * @library ../../lib
- * @modules jdk.compiler
- * @build JavacTestingAbstractThreadedTest
- * @run main/othervm TestDefaultSuperCall
+ * @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ *          jdk.compiler/com.sun.tools.javac.code
+ *          jdk.compiler/com.sun.tools.javac.comp
+ *          jdk.compiler/com.sun.tools.javac.main
+ *          jdk.compiler/com.sun.tools.javac.tree
+ *          jdk.compiler/com.sun.tools.javac.util
+ * @build combo.ComboTestHelper
+ * @run main TestDefaultSuperCall
  */
 
-// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
-// see JDK-8006746
-
-import java.net.URI;
-import java.util.Arrays;
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
-import javax.tools.Diagnostic;
-import javax.tools.JavaFileObject;
-import javax.tools.SimpleJavaFileObject;
 
-import com.sun.source.util.JavacTask;
+import combo.ComboInstance;
+import combo.ComboParameter;
+import combo.ComboTask.Result;
+import combo.ComboTestHelper;
 
-public class TestDefaultSuperCall
-    extends JavacTestingAbstractThreadedTest
-    implements Runnable {
+public class TestDefaultSuperCall extends ComboInstance<TestDefaultSuperCall> {
 
-    enum InterfaceKind {
+    enum InterfaceKind implements ComboParameter {
         DEFAULT("interface A extends B { default void m() { } }"),
         ABSTRACT("interface A extends B { void m(); }"),
         NONE("interface A extends B { }");
@@ -63,9 +62,14 @@
         boolean methodDefined() {
             return this == DEFAULT;
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return interfaceStr;
+        }
     }
 
-    enum PruneKind {
+    enum PruneKind implements ComboParameter {
         NO_PRUNE("interface C { }"),
         PRUNE("interface C extends A { }");
 
@@ -79,15 +83,20 @@
         PruneKind(String interfaceStr) {
             this.interfaceStr = interfaceStr;
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return interfaceStr;
+        }
     }
 
-    enum QualifierKind {
+    enum QualifierKind implements ComboParameter {
         DIRECT_1("C"),
         DIRECT_2("A"),
         INDIRECT("B"),
         UNRELATED("E"),
-        ENCLOSING_1(null),
-        ENCLOSING_2(null);
+        ENCLOSING_1("name0"),
+        ENCLOSING_2("name1");
 
         String qualifierStr;
 
@@ -95,15 +104,6 @@
             this.qualifierStr = qualifierStr;
         }
 
-        String getQualifier(Shape sh) {
-            switch (this) {
-                case ENCLOSING_1: return sh.enclosingAt(0);
-                case ENCLOSING_2: return sh.enclosingAt(1);
-                default:
-                    return qualifierStr;
-            }
-        }
-
         boolean isEnclosing() {
             return this == ENCLOSING_1 ||
                     this == ENCLOSING_2;
@@ -119,9 +119,14 @@
                     return false;
             }
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return qualifierStr;
+        }
     }
 
-    enum ExprKind {
+    enum ExprKind implements ComboParameter {
         THIS("this"),
         SUPER("super");
 
@@ -130,19 +135,24 @@
         ExprKind(String exprStr) {
             this.exprStr = exprStr;
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return exprStr;
+        }
     }
 
-    enum ElementKind {
-        INTERFACE("interface #N { #B }", true),
-        INTERFACE_EXTENDS("interface #N extends A, C { #B }", true),
-        CLASS("class #N { #B }", false),
-        CLASS_EXTENDS("abstract class #N implements A, C { #B }", false),
-        STATIC_CLASS("static class #N { #B }", true),
-        STATIC_CLASS_EXTENDS("abstract static class #N implements A, C { #B }", true),
-        ANON_CLASS("new Object() { #B };", false),
-        METHOD("void test() { #B }", false),
-        STATIC_METHOD("static void test() { #B }", true),
-        DEFAULT_METHOD("default void test() { #B }", false);
+    enum ElementKind implements ComboParameter {
+        INTERFACE("interface name#CURR { #BODY }", true),
+        INTERFACE_EXTENDS("interface name#CURR extends A, C { #BODY }", true),
+        CLASS("class name#CURR { #BODY }", false),
+        CLASS_EXTENDS("abstract class name#CURR implements A, C { #BODY }", false),
+        STATIC_CLASS("static class name#CURR { #BODY }", true),
+        STATIC_CLASS_EXTENDS("abstract static class name#CURR implements A, C { #BODY }", true),
+        ANON_CLASS("new Object() { #BODY };", false),
+        METHOD("void test() { #BODY }", false),
+        STATIC_METHOD("static void test() { #BODY }", true),
+        DEFAULT_METHOD("default void test() { #BODY }", false);
 
         String templateDecl;
         boolean isStatic;
@@ -207,11 +217,21 @@
                     this == STATIC_CLASS_EXTENDS ||
                     this == CLASS_EXTENDS;
         }
+
+        @Override
+        public String expand(String optParameter) {
+            int nextDepth = new Integer(optParameter) + 1;
+            String replStr = (nextDepth <= 4) ?
+                    String.format("#{ELEM[%d].%d}", nextDepth, nextDepth) :
+                    "#{QUAL}.#{EXPR}.#{METH}();";
+            return templateDecl
+                    .replaceAll("#CURR", optParameter)
+                    .replaceAll("#BODY", replStr);
+        }
     }
 
     static class Shape {
 
-        String shapeStr;
         List<ElementKind> enclosingElements;
         List<String> enclosingNames;
         List<String> elementsWithMethod;
@@ -234,114 +254,73 @@
                 } else {
                     elementsWithMethod.add(prevName);
                 }
-                String element = ek.templateDecl.replaceAll("#N", name);
-                shapeStr = shapeStr ==
-                        null ? element : shapeStr.replaceAll("#B", element);
                 prevName = name;
             }
         }
-
-        String getShape(QualifierKind qk, ExprKind ek) {
-            String methName = ek == ExprKind.THIS ? "test" : "m";
-            String call = qk.getQualifier(this) + "." +
-                    ek.exprStr + "." + methName + "();";
-            return shapeStr.replaceAll("#B", call);
-        }
-
-        String enclosingAt(int index) {
-            return index < enclosingNames.size() ?
-                    enclosingNames.get(index) : "BAD";
-        }
     }
 
     public static void main(String... args) throws Exception {
-        for (InterfaceKind ik : InterfaceKind.values()) {
-            for (PruneKind pk : PruneKind.values()) {
-                for (ElementKind ek1 : ElementKind.values()) {
-                    if (!ek1.isAllowedTop()) continue;
-                    for (ElementKind ek2 : ElementKind.values()) {
-                        if (!ek2.isAllowedEnclosing(ek1, true)) continue;
-                        for (ElementKind ek3 : ElementKind.values()) {
-                            if (!ek3.isAllowedEnclosing(ek2, false)) continue;
-                            for (ElementKind ek4 : ElementKind.values()) {
-                                if (!ek4.isAllowedEnclosing(ek3, false)) continue;
-                                for (ElementKind ek5 : ElementKind.values()) {
-                                    if (!ek5.isAllowedEnclosing(ek4, false) ||
-                                            ek5.isClassDecl()) continue;
-                                    for (QualifierKind qk : QualifierKind.values()) {
-                                        for (ExprKind ek : ExprKind.values()) {
-                                            pool.execute(
-                                                    new TestDefaultSuperCall(ik, pk,
-                                                    new Shape(ek1, ek2, ek3,
-                                                    ek4, ek5), qk, ek));
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-
-        checkAfterExec();
+        new ComboTestHelper<TestDefaultSuperCall>()
+                .withFilter(TestDefaultSuperCall::filterBadTopElement)
+                .withFilter(TestDefaultSuperCall::filterBadIntermediateElement)
+                .withFilter(TestDefaultSuperCall::filterBadTerminalElement)
+                .withDimension("INTF1", (x, ik) -> x.ik = ik, InterfaceKind.values())
+                .withDimension("INTF2", (x, pk) -> x.pk = pk, PruneKind.values())
+                .withArrayDimension("ELEM", (x, elem, idx) -> x.elements[idx] = elem, 5, ElementKind.values())
+                .withDimension("QUAL", (x, qk) -> x.qk = qk, QualifierKind.values())
+                .withDimension("EXPR", (x, ek) -> x.ek = ek, ExprKind.values())
+                .run(TestDefaultSuperCall::new);
     }
 
     InterfaceKind ik;
     PruneKind pk;
-    Shape sh;
+    ElementKind[] elements = new ElementKind[5];
     QualifierKind qk;
     ExprKind ek;
-    JavaSource source;
-    DiagnosticChecker diagChecker;
 
-    TestDefaultSuperCall(InterfaceKind ik, PruneKind pk, Shape sh,
-            QualifierKind qk, ExprKind ek) {
-        this.ik = ik;
-        this.pk = pk;
-        this.sh = sh;
-        this.qk = qk;
-        this.ek = ek;
-        this.source = new JavaSource();
-        this.diagChecker = new DiagnosticChecker();
+    boolean filterBadTopElement() {
+        return elements[0].isAllowedTop();
     }
 
-    class JavaSource extends SimpleJavaFileObject {
+    boolean filterBadIntermediateElement() {
+        for (int i = 1 ; i < 4 ; i++) {
+            if (!elements[i].isAllowedEnclosing(elements[i - 1], i == 1)) {
+                return false;
+            }
+        }
+        return true;
+    }
 
-        String template = "interface E {}\n" +
-                          "interface B { }\n" +
-                          "#I\n" +
-                          "#P\n" +
-                          "#C";
+    boolean filterBadTerminalElement() {
+        return elements[4].isAllowedEnclosing(elements[3], false) && !elements[4].isClassDecl();
+    }
 
-        String source;
+    String template = "interface E {}\n" +
+                      "interface B { }\n" +
+                      "#{INTF1}\n" +
+                      "#{INTF2}\n" +
+                      "#{ELEM[0].0}";
 
-        public JavaSource() {
-            super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
-            source = template.replaceAll("#I", ik.interfaceStr)
-                    .replaceAll("#P", pk.interfaceStr)
-                    .replaceAll("#C", sh.getShape(qk, ek));
-        }
+    @Override
+    public void doWork() throws IOException {
+        check(newCompilationTask()
+                .withSourceFromTemplate(template, this::methodName)
+                .analyze());
+    }
 
-        @Override
-        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
-            return source;
+    ComboParameter methodName(String parameterName) {
+        switch (parameterName) {
+            case "METH":
+                String methodName = ek == ExprKind.THIS ? "test" : "m";
+                return new ComboParameter.Constant<String>(methodName);
+            default:
+                return null;
         }
     }
 
-    public void run() {
-        JavacTask ct = (JavacTask)comp.getTask(null, fm.get(), diagChecker,
-                null, null, Arrays.asList(source));
-        try {
-            ct.analyze();
-        } catch (Throwable ex) {
-            processException(ex);
-            return;
-        }
-        check();
-    }
+    void check(Result<?> res) {
+        Shape sh = new Shape(elements);
 
-    void check() {
         boolean errorExpected = false;
 
         boolean badEnclosing = false;
@@ -364,7 +343,7 @@
             boolean found = false;
             for (int i = 0; i < sh.enclosingElements.size(); i++) {
                 if (sh.enclosingElements.get(i) == ElementKind.ANON_CLASS) continue;
-                if (sh.enclosingNames.get(i).equals(qk.getQualifier(sh))) {
+                if (sh.enclosingNames.get(i).equals(qk.qualifierStr)) {
                     found = sh.elementsWithMethod.contains(sh.enclosingNames.get(i));
                     break;
                 }
@@ -388,10 +367,9 @@
             }
         }
 
-        checkCount.incrementAndGet();
-        if (diagChecker.errorFound != errorExpected) {
-            throw new AssertionError("Problem when compiling source:\n" +
-                    source.getCharContent(true) +
+        if (res.hasErrors() != errorExpected) {
+            fail("Problem when compiling source:\n" +
+                    res.compilationInfo() +
                     "\nenclosingElems: " + sh.enclosingElements +
                     "\nenclosingNames: " + sh.enclosingNames +
                     "\nelementsWithMethod: " + sh.elementsWithMethod +
@@ -399,20 +377,7 @@
                     "\nbad this: " + badThis +
                     "\nbad super: " + badSuper +
                     "\nqual kind: " + qk +
-                    "\nfound error: " + diagChecker.errorFound);
+                    "\nfound error: " + res.hasErrors());
         }
     }
-
-    static class DiagnosticChecker
-        implements javax.tools.DiagnosticListener<JavaFileObject> {
-
-        boolean errorFound;
-
-        public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
-            if (diagnostic.getKind() == Diagnostic.Kind.ERROR) {
-                errorFound = true;
-            }
-        }
-    }
-
 }
--- a/langtools/test/tools/javac/failover/CheckAttributedTree.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/langtools/test/tools/javac/failover/CheckAttributedTree.java	Tue Sep 08 15:39:51 2015 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 6970584 8006694 8062373
+ * @bug 6970584 8006694 8062373 8129962
  * @summary assorted position errors in compiler syntax trees
  *  temporarily workaround combo tests are causing time out in several platforms
  * @library ../lib
@@ -31,13 +31,10 @@
  *          jdk.compiler/com.sun.tools.javac.code
  *          jdk.compiler/com.sun.tools.javac.tree
  *          jdk.compiler/com.sun.tools.javac.util
- * @build JavacTestingAbstractThreadedTest
- * @run main/othervm CheckAttributedTree -q -r -et ERRONEOUS .
+ * @build combo.ComboTestHelper
+ * @run main CheckAttributedTree -q -r -et ERRONEOUS .
  */
 
-// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
-// see JDK-8006746
-
 import java.awt.BorderLayout;
 import java.awt.Color;
 import java.awt.Dimension;
@@ -56,6 +53,11 @@
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.lang.reflect.Field;
+import java.nio.file.FileVisitResult;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.SimpleFileVisitor;
+import java.nio.file.attribute.BasicFileAttributes;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashSet;
@@ -79,18 +81,14 @@
 import javax.swing.text.BadLocationException;
 import javax.swing.text.DefaultHighlighter;
 import javax.swing.text.Highlighter;
-import javax.tools.Diagnostic;
-import javax.tools.DiagnosticListener;
 import javax.tools.JavaFileObject;
 
 import com.sun.source.tree.CompilationUnitTree;
-import com.sun.source.util.JavacTask;
 import com.sun.source.util.TaskEvent;
+import com.sun.source.util.TaskEvent.Kind;
 import com.sun.source.util.TaskListener;
-import com.sun.tools.javac.api.JavacTaskImpl;
 import com.sun.tools.javac.code.Symbol;
 import com.sun.tools.javac.code.Type;
-import com.sun.tools.javac.main.JavaCompiler;
 import com.sun.tools.javac.tree.EndPosTable;
 import com.sun.tools.javac.tree.JCTree;
 import com.sun.tools.javac.tree.JCTree.JCCompilationUnit;
@@ -101,6 +99,10 @@
 
 import static com.sun.tools.javac.tree.JCTree.Tag.*;
 
+import combo.ComboTestHelper;
+import combo.ComboInstance;
+import combo.ComboTestHelper.IgnoreMode;
+
 /**
  * Utility and test program to check validity of tree positions for tree nodes.
  * The program can be run standalone, or as a jtreg test.  In standalone mode,
@@ -113,7 +115,7 @@
  * covering any new language features that may be tested in this test suite.
  */
 
-public class CheckAttributedTree extends JavacTestingAbstractThreadedTest {
+public class CheckAttributedTree {
     /**
      * Main entry point.
      * If test.src is set, program runs in jtreg mode, and will throw an Error
@@ -125,7 +127,6 @@
     public static void main(String... args) throws Exception {
         String testSrc = System.getProperty("test.src");
         File baseDir = (testSrc == null) ? null : new File(testSrc);
-        throwAssertionOnError = false;
         boolean ok = new CheckAttributedTree().run(baseDir, args);
         if (!ok) {
             if (testSrc != null)  // jtreg mode
@@ -160,7 +161,6 @@
                 quiet = true;
             else if (arg.equals("-v")) {
                 verbose = true;
-                printAll = true;
             }
             else if (arg.equals("-t") && i + 1 < args.length)
                 tags.add(args[++i]);
@@ -187,18 +187,37 @@
             }
         }
 
-        for (File file: files) {
-            if (file.exists())
-                test(file);
-            else
-                error("File not found: " + file);
-        }
+        ComboTestHelper<FileChecker> cth = new ComboTestHelper<>();
+        cth.withIgnoreMode(IgnoreMode.IGNORE_ALL)
+                .withFilter(FileChecker::checkFile)
+                .withDimension("FILE", (x, file) -> x.file = file, getAllFiles(files))
+                .run(FileChecker::new);
 
         if (fileCount.get() != 1)
             errWriter.println(fileCount + " files read");
-        checkAfterExec(false);
 
-        return (gui || errCount.get() == 0);
+        if (verbose) {
+            System.out.println(errSWriter.toString());
+        }
+
+        return (gui || !cth.info().hasFailures());
+    }
+
+    File[] getAllFiles(List<File> roots) throws IOException {
+        long now = System.currentTimeMillis();
+        ArrayList<File> buf = new ArrayList<>();
+        for (File file : roots) {
+            Files.walkFileTree(file.toPath(), new SimpleFileVisitor<Path>() {
+                @Override
+                public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+                    buf.add(file.toFile());
+                    return FileVisitResult.CONTINUE;
+                }
+            });
+        }
+        long delta = System.currentTimeMillis() - now;
+        System.err.println("All files = " + buf.size() + " " + delta);
+        return buf.toArray(new File[buf.size()]);
     }
 
     /**
@@ -224,116 +243,217 @@
         out.println("");
     }
 
-    /**
-     * Test a file. If the file is a directory, it will be recursively scanned
-     * for java files.
-     * @param file the file or directory to test
-     */
-    void test(final File file) {
-        if (excludeFiles.contains(file)) {
-            if (!quiet)
-                error("File " + file + " excluded");
-            return;
+    class FileChecker extends ComboInstance<FileChecker> {
+
+        File file;
+
+        boolean checkFile() {
+            if (!file.exists()) {
+                error("File not found: " + file);
+                return false;
+            }
+            if (excludeFiles.contains(file)) {
+                if (!quiet)
+                    error("File " + file + " excluded");
+                return false;
+            }
+            if (!file.getName().endsWith(".java")) {
+                if (!quiet)
+                    error("File " + file + " ignored");
+                return false;
+            }
+
+            return true;
         }
 
-        if (file.isDirectory()) {
-            for (File f: file.listFiles()) {
-                test(f);
+        public void doWork() {
+            if (!file.exists()) {
+                error("File not found: " + file);
             }
-            return;
+            if (excludeFiles.contains(file)) {
+                if (!quiet)
+                    error("File " + file + " excluded");
+                return;
+            }
+            if (!file.getName().endsWith(".java")) {
+                if (!quiet)
+                    error("File " + file + " ignored");
+            }
+            try {
+                if (verbose)
+                    errWriter.println(file);
+                fileCount.incrementAndGet();
+                NPETester p = new NPETester();
+                p.test(read(file));
+            } catch (AttributionException e) {
+                if (!quiet) {
+                    error("Error attributing " + file + "\n" + e.getMessage());
+                }
+            } catch (IOException e) {
+                error("Error reading " + file + ": " + e);
+            }
         }
 
-        if (file.isFile() && file.getName().endsWith(".java")) {
-            pool.execute(new Runnable() {
-                @Override
-                public void run() {
+        /**
+         * Read a file.
+         * @param file the file to be read
+         * @return the tree for the content of the file
+         * @throws IOException if any IO errors occur
+         * @throws AttributionException if any errors occur while analyzing the file
+         */
+        List<Pair<JCCompilationUnit, JCTree>> read(File file) throws IOException, AttributionException {
+            try {
+                Iterable<? extends JavaFileObject> files = fileManager().getJavaFileObjects(file);
+                final List<Element> analyzedElems = new ArrayList<>();
+                final List<CompilationUnitTree> trees = new ArrayList<>();
+                Iterable<? extends Element> elems = newCompilationTask()
+                    .withWriter(pw)
+                        .withOption("-XDshouldStopPolicy=ATTR")
+                        .withOption("-XDverboseCompilePolicy")
+                        .withSource(files.iterator().next())
+                        .withListener(new TaskListener() {
+                            public void started(TaskEvent e) {
+                                if (e.getKind() == TaskEvent.Kind.ANALYZE)
+                                analyzedElems.add(e.getTypeElement());
+                        }
+
+                        public void finished(TaskEvent e) {
+                            if (e.getKind() == Kind.PARSE)
+                                trees.add(e.getCompilationUnit());
+                        }
+                    }).analyze().get();
+                if (!elems.iterator().hasNext())
+                    throw new AttributionException("No results from analyze");
+                List<Pair<JCCompilationUnit, JCTree>> res = new ArrayList<>();
+                for (CompilationUnitTree t : trees) {
+                   JCCompilationUnit cu = (JCCompilationUnit)t;
+                   for (JCTree def : cu.defs) {
+                       if (def.hasTag(CLASSDEF) &&
+                               analyzedElems.contains(((JCTree.JCClassDecl)def).sym)) {
+                           res.add(new Pair<>(cu, def));
+                       }
+                   }
+                }
+                return res;
+            }
+            catch (Throwable t) {
+                throw new AttributionException("Exception while attributing file: " + file);
+            }
+        }
+
+        /**
+         * Report an error. When the program is complete, the program will either
+         * exit or throw an Error if any errors have been reported.
+         * @param msg the error message
+         */
+        void error(String msg) {
+            System.err.println();
+            System.err.println(msg);
+            System.err.println();
+            fail(msg);
+        }
+
+        /**
+         * Main class for testing assertions concerning types/symbol
+         * left uninitialized after attribution
+         */
+        private class NPETester extends TreeScanner {
+            void test(List<Pair<JCCompilationUnit, JCTree>> trees) {
+                for (Pair<JCCompilationUnit, JCTree> p : trees) {
+                    sourcefile = p.fst.sourcefile;
+                    endPosTable = p.fst.endPositions;
+                    encl = new Info(p.snd, endPosTable);
+                    p.snd.accept(this);
+                }
+            }
+
+            @Override
+            public void scan(JCTree tree) {
+                if (tree == null ||
+                        excludeTags.contains(treeUtil.nameFromTag(tree.getTag()))) {
+                    return;
+                }
+
+                Info self = new Info(tree, endPosTable);
+                if (mandatoryType(tree)) {
+                    check(tree.type != null,
+                            "'null' field 'type' found in tree ", self);
+                    if (tree.type==null)
+                        Thread.dumpStack();
+                }
+
+                Field errField = checkFields(tree);
+                if (errField!=null) {
+                    check(false,
+                            "'null' field '" + errField.getName() + "' found in tree ", self);
+                }
+
+                Info prevEncl = encl;
+                encl = self;
+                tree.accept(this);
+                encl = prevEncl;
+            }
+
+            private boolean mandatoryType(JCTree that) {
+                return that instanceof JCTree.JCExpression ||
+                        that.hasTag(VARDEF) ||
+                        that.hasTag(METHODDEF) ||
+                        that.hasTag(CLASSDEF);
+            }
+
+            private final List<String> excludedFields = Arrays.asList("varargsElement", "targetType");
+
+            void check(boolean ok, String label, Info self) {
+                if (!ok) {
+                    if (gui) {
+                        if (viewer == null)
+                            viewer = new Viewer();
+                        viewer.addEntry(sourcefile, label, encl, self);
+                    }
+                    error(label + self.toString() + " encl: " + encl.toString() +
+                            " in file: " + sourcefile + "  " + self.tree);
+                }
+            }
+
+            Field checkFields(JCTree t) {
+                List<Field> fieldsToCheck = treeUtil.getFieldsOfType(t,
+                        excludedFields,
+                        Symbol.class,
+                        Type.class);
+                for (Field f : fieldsToCheck) {
                     try {
-                        if (verbose)
-                            errWriter.println(file);
-                        fileCount.incrementAndGet();
-                        NPETester p = new NPETester();
-                        p.test(read(file));
-                    } catch (AttributionException e) {
-                        if (!quiet) {
-                            error("Error attributing " + file + "\n" + e.getMessage());
+                        if (f.get(t) == null) {
+                            return f;
                         }
-                    } catch (IOException e) {
-                        error("Error reading " + file + ": " + e);
+                    }
+                    catch (IllegalAccessException e) {
+                        System.err.println("Cannot read field: " + f);
+                        //swallow it
                     }
                 }
-            });
-            return;
+                return null;
+            }
+
+            @Override
+            public void visitImport(JCImport tree) { }
+
+            @Override
+            public void visitTopLevel(JCCompilationUnit tree) {
+                scan(tree.defs);
+            }
+
+            JavaFileObject sourcefile;
+            EndPosTable endPosTable;
+            Info encl;
         }
-
-        if (!quiet)
-            error("File " + file + " ignored");
     }
 
     // See CR:  6982992 Tests CheckAttributedTree.java, JavacTreeScannerTest.java, and SourceTreeeScannerTest.java timeout
     StringWriter sw = new StringWriter();
     PrintWriter pw = new PrintWriter(sw);
-    Reporter r = new Reporter(pw);
 
-    /**
-     * Read a file.
-     * @param file the file to be read
-     * @return the tree for the content of the file
-     * @throws IOException if any IO errors occur
-     * @throws AttributionException if any errors occur while analyzing the file
-     */
-    List<Pair<JCCompilationUnit, JCTree>> read(File file) throws IOException, AttributionException {
-        r.errors = 0;
-        Iterable<? extends JavaFileObject> files = fm.get().getJavaFileObjects(file);
-        String[] opts = { "-XDshouldStopPolicy=ATTR", "-XDverboseCompilePolicy" };
-        JavacTask task = (JavacTask)comp.getTask(pw, fm.get(), r, Arrays.asList(opts), null, files);
-        final List<Element> analyzedElems = new ArrayList<>();
-        task.setTaskListener(new TaskListener() {
-            public void started(TaskEvent e) {
-                if (e.getKind() == TaskEvent.Kind.ANALYZE)
-                    analyzedElems.add(e.getTypeElement());
-            }
-            public void finished(TaskEvent e) { }
-        });
-        int i = 0;
-        try {
-            Iterable<? extends CompilationUnitTree> trees = task.parse();
-//            JavaCompiler c = JavaCompiler.instance(((JavacTaskImpl) task).getContext());
-//            System.err.println("verboseCompilePolicy: " + c.verboseCompilePolicy);
-//            System.err.println("shouldStopIfError: " + c.shouldStopPolicyIfError);
-//            System.err.println("shouldStopIfNoError: " + c.shouldStopPolicyIfNoError);
-            Iterable<? extends Element> elems = task.analyze();
-            if (!elems.iterator().hasNext())
-                throw new AttributionException("No results from analyze");
-            List<Pair<JCCompilationUnit, JCTree>> res = new ArrayList<>();
-            //System.err.println("Try to add pairs. Elems are " + analyzedElems);
-            for (CompilationUnitTree t : trees) {
-               JCCompilationUnit cu = (JCCompilationUnit)t;
-               for (JCTree def : cu.defs) {
-                   if (def.hasTag(CLASSDEF) &&
-                           analyzedElems.contains(((JCTree.JCClassDecl)def).sym)) {
-                       //System.err.println("Adding pair..." + cu.sourcefile + " " + ((JCTree.JCClassDecl) def).name);
-                       res.add((i++ % 2) == 0 ? new Pair<>(cu, def) {} : new Pair<>(cu, def));
-                   }
-               }
-            }
-            return res;
-        }
-        catch (Throwable t) {
-            throw new AttributionException("Exception while attributing file: " + file);
-        }
-    }
-
-    /**
-     * Report an error. When the program is complete, the program will either
-     * exit or throw an Error if any errors have been reported.
-     * @param msg the error message
-     */
-    void error(String msg) {
-        System.err.println();
-        System.err.println(msg);
-        System.err.println();
-        errCount.incrementAndGet();
-    }
+    StringWriter errSWriter = new StringWriter();
+    PrintWriter errWriter = new PrintWriter(errSWriter);
 
     /** Flag: don't report irrelevant files. */
     boolean quiet;
@@ -356,101 +476,6 @@
     TreeUtil treeUtil = new TreeUtil();
 
     /**
-     * Main class for testing assertions concerning types/symbol
-     * left uninitialized after attribution
-     */
-    private class NPETester extends TreeScanner {
-        void test(List<Pair<JCCompilationUnit, JCTree>> trees) {
-            for (Pair<JCCompilationUnit, JCTree> p : trees) {
-//              System.err.println("checking " + p.fst.sourcefile);
-                sourcefile = p.fst.sourcefile;
-                endPosTable = p.fst.endPositions;
-                encl = new Info(p.snd, endPosTable);
-                p.snd.accept(this);
-            }
-        }
-
-        @Override
-        public void scan(JCTree tree) {
-            if (tree == null ||
-                    excludeTags.contains(treeUtil.nameFromTag(tree.getTag()))) {
-                return;
-            }
-
-            Info self = new Info(tree, endPosTable);
-            if (mandatoryType(tree)) {
-                check(tree.type != null,
-                        "'null' field 'type' found in tree ", self);
-                if (tree.type==null)
-                    Thread.dumpStack();
-            }
-
-            Field errField = checkFields(tree);
-            if (errField!=null) {
-                check(false,
-                        "'null' field '" + errField.getName() + "' found in tree ", self);
-            }
-
-            Info prevEncl = encl;
-            encl = self;
-            tree.accept(this);
-            encl = prevEncl;
-        }
-
-        private boolean mandatoryType(JCTree that) {
-            return that instanceof JCTree.JCExpression ||
-                    that.hasTag(VARDEF) ||
-                    that.hasTag(METHODDEF) ||
-                    that.hasTag(CLASSDEF);
-        }
-
-        private final List<String> excludedFields = Arrays.asList("varargsElement", "targetType");
-
-        void check(boolean ok, String label, Info self) {
-            if (!ok) {
-                if (gui) {
-                    if (viewer == null)
-                        viewer = new Viewer();
-                    viewer.addEntry(sourcefile, label, encl, self);
-                }
-                error(label + self.toString() + " encl: " + encl.toString() +
-                        " in file: " + sourcefile + "  " + self.tree);
-            }
-        }
-
-        Field checkFields(JCTree t) {
-            List<Field> fieldsToCheck = treeUtil.getFieldsOfType(t,
-                    excludedFields,
-                    Symbol.class,
-                    Type.class);
-            for (Field f : fieldsToCheck) {
-                try {
-                    if (f.get(t) == null) {
-                        return f;
-                    }
-                }
-                catch (IllegalAccessException e) {
-                    System.err.println("Cannot read field: " + f);
-                    //swallow it
-                }
-            }
-            return null;
-        }
-
-        @Override
-        public void visitImport(JCImport tree) { }
-
-        @Override
-        public void visitTopLevel(JCCompilationUnit tree) {
-            scan(tree.defs);
-        }
-
-        JavaFileObject sourcefile;
-        EndPosTable endPosTable;
-        Info encl;
-    }
-
-    /**
      * Utility class providing easy access to position and other info for a tree node.
      */
     private class Info {
@@ -524,25 +549,6 @@
     }
 
     /**
-     * DiagnosticListener to report diagnostics and count any errors that occur.
-     */
-    private static class Reporter implements DiagnosticListener<JavaFileObject> {
-        Reporter(PrintWriter out) {
-            this.out = out;
-        }
-
-        public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
-            //out.println(diagnostic);
-            switch (diagnostic.getKind()) {
-                case ERROR:
-                    errors++;
-            }
-        }
-        int errors;
-        PrintWriter out;
-    }
-
-    /**
      * GUI viewer for issues found by TreePosTester. The viewer provides a drop
      * down list for selecting error conditions, a header area providing details
      * about an error, and a text area with the ranges of text highlighted as
--- a/langtools/test/tools/javac/generics/diamond/7046778/DiamondAndInnerClassTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/langtools/test/tools/javac/generics/diamond/7046778/DiamondAndInnerClassTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -23,30 +23,32 @@
 
 /*
  * @test
- * @bug 7046778 8006694
+ * @bug 7046778 8006694 8129962
  * @summary Project Coin: problem with diamond and member inner classes
  *  temporarily workaround combo tests are causing time out in several platforms
- * @library ../../../lib
- * @modules jdk.compiler
- * @build JavacTestingAbstractThreadedTest
- * @run main/othervm DiamondAndInnerClassTest
+ * @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ *          jdk.compiler/com.sun.tools.javac.code
+ *          jdk.compiler/com.sun.tools.javac.comp
+ *          jdk.compiler/com.sun.tools.javac.main
+ *          jdk.compiler/com.sun.tools.javac.tree
+ *          jdk.compiler/com.sun.tools.javac.util
+ * @build combo.ComboTestHelper
+ * @compile -Xlint:all DiamondAndInnerClassTest.java
+ * @run main DiamondAndInnerClassTest
  */
 
-// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
-// see JDK-8006746
+import java.io.IOException;
+import java.util.Arrays;
 
-import com.sun.source.util.JavacTask;
-import java.net.URI;
-import java.util.Arrays;
-import javax.tools.Diagnostic;
-import javax.tools.JavaFileObject;
-import javax.tools.SimpleJavaFileObject;
+import combo.ComboTestHelper;
+import combo.ComboInstance;
+import combo.ComboParameter;
+import combo.ComboTask.Result;
 
-public class DiamondAndInnerClassTest
-    extends JavacTestingAbstractThreadedTest
-    implements Runnable {
+public class DiamondAndInnerClassTest extends ComboInstance<DiamondAndInnerClassTest> {
 
-    enum TypeArgumentKind {
+    enum TypeArgumentKind implements ComboParameter {
         NONE(""),
         STRING("<String>"),
         INTEGER("<Integer>"),
@@ -54,7 +56,7 @@
 
         String typeargStr;
 
-        private TypeArgumentKind(String typeargStr) {
+        TypeArgumentKind(String typeargStr) {
             this.typeargStr = typeargStr;
         }
 
@@ -75,252 +77,173 @@
                 default: throw new AssertionError("Unexpected decl kind: " + this);
             }
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return typeargStr;
+        }
     }
 
-    enum ArgumentKind {
+    enum ArgumentKind implements ComboParameter {
         OBJECT("(Object)null"),
         STRING("(String)null"),
         INTEGER("(Integer)null");
 
         String argStr;
 
-        private ArgumentKind(String argStr) {
+        ArgumentKind(String argStr) {
             this.argStr = argStr;
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return argStr;
+        }
     }
 
-    enum TypeQualifierArity {
-        ONE(1, "A1#TA1"),
-        TWO(2, "A1#TA1.A2#TA2"),
-        THREE(3, "A1#TA1.A2#TA2.A3#TA3");
+    enum TypeQualifierArity implements ComboParameter {
+        ONE(1, "A1#{TA#IDX[0]}"),
+        TWO(2, "A1#{TA#IDX[0]}.A2#{TA#IDX[1]}"),
+        THREE(3, "A1#{TA#IDX[0]}.A2#{TA#IDX[1]}.A3#{TA#IDX[2]}");
 
         int n;
         String qualifierStr;
 
-        private TypeQualifierArity(int n, String qualifierStr) {
+        TypeQualifierArity(int n, String qualifierStr) {
             this.n = n;
             this.qualifierStr = qualifierStr;
         }
 
-        String getType(TypeArgumentKind... typeArgumentKinds) {
-            String res = qualifierStr;
-            for (int i = 1 ; i <= typeArgumentKinds.length ; i++) {
-                res = res.replace("#TA" + i, typeArgumentKinds[i-1].typeargStr);
-            }
-            return res;
-        }
-
-        boolean matches(InnerClassDeclArity innerClassDeclArity) {
-            return n ==innerClassDeclArity.n;
+        @Override
+        public String expand(String optParameter) {
+            return qualifierStr.replaceAll("#IDX", optParameter);
         }
     }
 
-    enum InnerClassDeclArity {
-        ONE(1, "class A1<X> { A1(X x1) { } #B }"),
-        TWO(2, "class A1<X1> { class A2<X2> { A2(X1 x1, X2 x2) { }  #B } }"),
-        THREE(3, "class A1<X1> { class A2<X2> { class A3<X3> { A3(X1 x1, X2 x2, X3 x3) { } #B } } }");
+    enum InnerClassDeclArity implements ComboParameter {
+        ONE(1, "class A1<X> { A1(X x1) { } #{BODY} }"),
+        TWO(2, "class A1<X1> { class A2<X2> { A2(X1 x1, X2 x2) { }  #{BODY} } }"),
+        THREE(3, "class A1<X1> { class A2<X2> { class A3<X3> { A3(X1 x1, X2 x2, X3 x3) { } #{BODY} } } }");
 
         int n;
         String classDeclStr;
 
-        private InnerClassDeclArity(int n, String classDeclStr) {
+        InnerClassDeclArity(int n, String classDeclStr) {
             this.n = n;
             this.classDeclStr = classDeclStr;
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return classDeclStr;
+        }
     }
 
-    enum ArgumentListArity {
-        ONE(1, "(#A1)"),
-        TWO(2, "(#A1,#A2)"),
-        THREE(3, "(#A1,#A2,#A3)");
+    enum ArgumentListArity implements ComboParameter {
+        ONE(1, "(#{A[0]})"),
+        TWO(2, "(#{A[0]},#{A[1]})"),
+        THREE(3, "(#{A[0]},#{A[1]},#{A[2]})");
 
         int n;
         String argListStr;
 
-        private ArgumentListArity(int n, String argListStr) {
+        ArgumentListArity(int n, String argListStr) {
             this.n = n;
             this.argListStr = argListStr;
         }
 
-        String getArgs(ArgumentKind... argumentKinds) {
-            String res = argListStr;
-            for (int i = 1 ; i <= argumentKinds.length ; i++) {
-                res = res.replace("#A" + i, argumentKinds[i-1].argStr);
-            }
-            return res;
-        }
-
-        boolean matches(InnerClassDeclArity innerClassDeclArity) {
-            return n ==innerClassDeclArity.n;
+        @Override
+        public String expand(String optParameter) {
+            return argListStr.replaceAll("#IDX", optParameter);
         }
     }
 
     public static void main(String... args) throws Exception {
-        for (InnerClassDeclArity innerClassDeclArity : InnerClassDeclArity.values()) {
-            for (TypeQualifierArity declType : TypeQualifierArity.values()) {
-                if (!declType.matches(innerClassDeclArity)) continue;
-                for (TypeQualifierArity newClassType : TypeQualifierArity.values()) {
-                    if (!newClassType.matches(innerClassDeclArity)) continue;
-                    for (ArgumentListArity argList : ArgumentListArity.values()) {
-                        if (!argList.matches(innerClassDeclArity)) continue;
-                        for (TypeArgumentKind taDecl1 : TypeArgumentKind.values()) {
-                            boolean isDeclRaw = taDecl1 == TypeArgumentKind.NONE;
-                            //no diamond on decl site
-                            if (taDecl1 == TypeArgumentKind.DIAMOND) continue;
-                            for (TypeArgumentKind taSite1 : TypeArgumentKind.values()) {
-                                boolean isSiteRaw =
-                                        taSite1 == TypeArgumentKind.NONE;
-                                //diamond only allowed on the last type qualifier
-                                if (taSite1 == TypeArgumentKind.DIAMOND &&
-                                        innerClassDeclArity !=
-                                        InnerClassDeclArity.ONE)
-                                    continue;
-                                for (ArgumentKind arg1 : ArgumentKind.values()) {
-                                    if (innerClassDeclArity == innerClassDeclArity.ONE) {
-                                        pool.execute(
-                                                new DiamondAndInnerClassTest(
-                                                innerClassDeclArity, declType,
-                                                newClassType, argList,
-                                                new TypeArgumentKind[] {taDecl1},
-                                                new TypeArgumentKind[] {taSite1},
-                                                new ArgumentKind[] {arg1}));
-                                        continue;
-                                    }
-                                    for (TypeArgumentKind taDecl2 : TypeArgumentKind.values()) {
-                                        //no rare types
-                                        if (isDeclRaw != (taDecl2 == TypeArgumentKind.NONE))
-                                            continue;
-                                        //no diamond on decl site
-                                        if (taDecl2 == TypeArgumentKind.DIAMOND)
-                                            continue;
-                                        for (TypeArgumentKind taSite2 : TypeArgumentKind.values()) {
-                                            //no rare types
-                                            if (isSiteRaw != (taSite2 == TypeArgumentKind.NONE))
-                                                continue;
-                                            //diamond only allowed on the last type qualifier
-                                            if (taSite2 == TypeArgumentKind.DIAMOND &&
-                                                    innerClassDeclArity != InnerClassDeclArity.TWO)
-                                                continue;
-                                            for (ArgumentKind arg2 : ArgumentKind.values()) {
-                                                if (innerClassDeclArity == innerClassDeclArity.TWO) {
-                                                    pool.execute(
-                                                            new DiamondAndInnerClassTest(
-                                                            innerClassDeclArity,
-                                                            declType,
-                                                            newClassType,
-                                                            argList,
-                                                            new TypeArgumentKind[] {taDecl1, taDecl2},
-                                                            new TypeArgumentKind[] {taSite1, taSite2},
-                                                            new ArgumentKind[] {arg1, arg2}));
-                                                    continue;
-                                                }
-                                                for (TypeArgumentKind taDecl3 : TypeArgumentKind.values()) {
-                                                    //no rare types
-                                                    if (isDeclRaw != (taDecl3 == TypeArgumentKind.NONE))
-                                                        continue;
-                                                    //no diamond on decl site
-                                                    if (taDecl3 == TypeArgumentKind.DIAMOND)
-                                                        continue;
-                                                    for (TypeArgumentKind taSite3 : TypeArgumentKind.values()) {
-                                                        //no rare types
-                                                        if (isSiteRaw != (taSite3 == TypeArgumentKind.NONE))
-                                                            continue;
-                                                        //diamond only allowed on the last type qualifier
-                                                        if (taSite3 == TypeArgumentKind.DIAMOND &&
-                                                            innerClassDeclArity != InnerClassDeclArity.THREE)
-                                                            continue;
-                                                        for (ArgumentKind arg3 : ArgumentKind.values()) {
-                                                            if (innerClassDeclArity ==
-                                                                    innerClassDeclArity.THREE) {
-                                                                pool.execute(
-                                                                        new DiamondAndInnerClassTest(
-                                                                        innerClassDeclArity,
-                                                                        declType,
-                                                                        newClassType,
-                                                                        argList,
-                                                                        new TypeArgumentKind[] {taDecl1, taDecl2, taDecl3},
-                                                                        new TypeArgumentKind[] {taSite1, taSite2, taSite3},
-                                                                        new ArgumentKind[] {arg1, arg2, arg3}));
-                                                                continue;
-                                                            }
-                                                        }
-                                                    }
-                                                }
-                                            }
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
+        new ComboTestHelper<DiamondAndInnerClassTest>()
+                .withFilter(DiamondAndInnerClassTest::rareTypesFilter)
+                .withFilter(DiamondAndInnerClassTest::noDiamondOnDecl)
+                .withFilter(DiamondAndInnerClassTest::noDiamondOnIntermediateTypes)
+                .withFilter(DiamondAndInnerClassTest::arityMismatch)
+                .withFilter(DiamondAndInnerClassTest::redundantFilter)
+                .withDimension("BODY", new ComboParameter.Constant<>("#{D.1} res = new #{S.2}#{AL};"))
+                .withDimension("DECL", (x, arity) -> x.innerClassDeclArity = arity, InnerClassDeclArity.values())
+                .withDimension("D", (x, arity) -> x.declArity = arity, TypeQualifierArity.values())
+                .withDimension("S", (x, arity) -> x.siteArity = arity, TypeQualifierArity.values())
+                .withDimension("AL", (x, alist) -> x.argumentListArity = alist, ArgumentListArity.values())
+                .withArrayDimension("TA1", (x, targs, idx) -> x.declTypeArgumentKinds[idx] = targs, 3, TypeArgumentKind.values())
+                .withArrayDimension("TA2", (x, targs, idx) -> x.siteTypeArgumentKinds[idx] = targs, 3, TypeArgumentKind.values())
+                .withArrayDimension("A", (x, argsk, idx) -> x.argumentKinds[idx] = argsk, 3, ArgumentKind.values())
+                .run(DiamondAndInnerClassTest::new);
+    }
+
+    InnerClassDeclArity innerClassDeclArity;
+    TypeQualifierArity declArity;
+    TypeQualifierArity siteArity;
+    TypeArgumentKind[] declTypeArgumentKinds = new TypeArgumentKind[3];
+    TypeArgumentKind[] siteTypeArgumentKinds = new TypeArgumentKind[3];
+    ArgumentKind[] argumentKinds = new ArgumentKind[3];
+    ArgumentListArity argumentListArity;
+
+    boolean rareTypesFilter() {
+        for (TypeArgumentKind[] types : Arrays.asList(declTypeArgumentKinds, siteTypeArgumentKinds)) {
+            boolean isRaw = types[0] == TypeArgumentKind.NONE;
+            for (int i = 1; i < innerClassDeclArity.n; i++) {
+                if (isRaw != (types[i] == TypeArgumentKind.NONE)) {
+                    return false;
                 }
             }
         }
-
-        checkAfterExec();
+        return true;
     }
 
-    InnerClassDeclArity innerClassDeclArity;
-    TypeQualifierArity declType;
-    TypeQualifierArity siteType;
-    ArgumentListArity argList;
-    TypeArgumentKind[] declTypeArgumentKinds;
-    TypeArgumentKind[] siteTypeArgumentKinds;
-    ArgumentKind[] argumentKinds;
-    JavaSource source;
-    DiagnosticChecker diagChecker;
-
-    DiamondAndInnerClassTest(InnerClassDeclArity innerClassDeclArity,
-            TypeQualifierArity declType, TypeQualifierArity siteType,
-            ArgumentListArity argList, TypeArgumentKind[] declTypeArgumentKinds,
-            TypeArgumentKind[] siteTypeArgumentKinds, ArgumentKind[] argumentKinds) {
-        this.innerClassDeclArity = innerClassDeclArity;
-        this.declType = declType;
-        this.siteType = siteType;
-        this.argList = argList;
-        this.declTypeArgumentKinds = declTypeArgumentKinds;
-        this.siteTypeArgumentKinds = siteTypeArgumentKinds;
-        this.argumentKinds = argumentKinds;
-        this.source = new JavaSource();
-        this.diagChecker = new DiagnosticChecker();
+    boolean noDiamondOnDecl() {
+        for (int i = 0; i < innerClassDeclArity.n; i++) {
+            if (declTypeArgumentKinds[i] == TypeArgumentKind.DIAMOND) {
+                return false;
+            }
+        }
+        return true;
     }
 
-    class JavaSource extends SimpleJavaFileObject {
+    boolean noDiamondOnIntermediateTypes() {
+        for (int i = 0; i < (innerClassDeclArity.n - 1); i++) {
+            if (siteTypeArgumentKinds[i] == TypeArgumentKind.DIAMOND) {
+                return false;
+            }
+        }
+        return true;
+    }
 
-        String bodyTemplate = "#D res = new #S#AL;";
+    boolean redundantFilter() {
+        for (TypeArgumentKind[] types : Arrays.asList(declTypeArgumentKinds, siteTypeArgumentKinds)) {
+            for (int i = innerClassDeclArity.n; i < types.length; i++) {
+                if (types[i].ordinal() != 0) {
+                    return false;
+                }
+            }
+        }
+        for (int i = innerClassDeclArity.n; i < argumentKinds.length; i++) {
+            if (argumentKinds[i].ordinal() != 0) {
+                return false;
+            }
+        }
+        return true;
+    }
 
-        String source;
-
-        public JavaSource() {
-            super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
-            source = innerClassDeclArity.classDeclStr.replace("#B", bodyTemplate)
-                    .replace("#D", declType.getType(declTypeArgumentKinds))
-                    .replace("#S", siteType.getType(siteTypeArgumentKinds))
-                    .replace("#AL", argList.getArgs(argumentKinds));
-        }
-
-        @Override
-        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
-            return source;
-        }
+    boolean arityMismatch() {
+        return argumentListArity.n == innerClassDeclArity.n &&
+                siteArity.n == innerClassDeclArity.n &&
+                declArity.n == innerClassDeclArity.n;
     }
 
     @Override
-    public void run() {
-        JavacTask ct = (JavacTask)comp.getTask(null, fm.get(), diagChecker,
-                null, null, Arrays.asList(source));
-        try {
-            ct.analyze();
-        } catch (Throwable ex) {
-            throw new AssertionError("Error thrown when compiling the following code:\n" +
-                    source.getCharContent(true));
-        }
-        check();
+    public void doWork() throws IOException {
+        check(newCompilationTask()
+                .withSourceFromTemplate("#{DECL}")
+                .analyze());
     }
 
-    void check() {
-        checkCount.incrementAndGet();
-
+    void check(Result<?> res) {
         boolean errorExpected = false;
 
         TypeArgumentKind[] expectedArgKinds =
@@ -345,24 +268,11 @@
             }
         }
 
-        if (errorExpected != diagChecker.errorFound) {
-            throw new Error("invalid diagnostics for source:\n" +
-                source.getCharContent(true) +
-                "\nFound error: " + diagChecker.errorFound +
+        if (errorExpected != res.hasErrors()) {
+            fail("invalid diagnostics for source:\n" +
+                res.compilationInfo() +
+                "\nFound error: " + res.hasErrors() +
                 "\nExpected error: " + errorExpected);
         }
     }
-
-    static class DiagnosticChecker
-        implements javax.tools.DiagnosticListener<JavaFileObject> {
-
-        boolean errorFound;
-
-        public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
-            if (diagnostic.getKind() == Diagnostic.Kind.ERROR) {
-                errorFound = true;
-            }
-        }
-    }
-
 }
--- a/langtools/test/tools/javac/generics/rawOverride/7062745/GenericOverrideTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/langtools/test/tools/javac/generics/rawOverride/7062745/GenericOverrideTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -23,29 +23,29 @@
 
 /*
  * @test
- * @bug 7062745 8006694
+ * @bug 7062745 8006694 8129962
  * @summary  Regression: difference in overload resolution when two methods
  *  are maximally specific
  *  temporarily workaround combo tests are causing time out in several platforms
- * @library ../../../lib
- * @modules jdk.compiler
- * @build JavacTestingAbstractThreadedTest
- * @run main/othervm GenericOverrideTest
+ * @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ *          jdk.compiler/com.sun.tools.javac.code
+ *          jdk.compiler/com.sun.tools.javac.comp
+ *          jdk.compiler/com.sun.tools.javac.main
+ *          jdk.compiler/com.sun.tools.javac.tree
+ *          jdk.compiler/com.sun.tools.javac.util
+ * @build combo.ComboTestHelper
+ * @run main GenericOverrideTest
  */
 
-// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
-// see JDK-8006746
+import java.io.IOException;
 
-import java.net.URI;
-import java.util.Arrays;
-import javax.tools.Diagnostic;
-import javax.tools.JavaFileObject;
-import javax.tools.SimpleJavaFileObject;
-import com.sun.source.util.JavacTask;
+import combo.ComboInstance;
+import combo.ComboParameter;
+import combo.ComboTask.Result;
+import combo.ComboTestHelper;
 
-public class GenericOverrideTest
-    extends JavacTestingAbstractThreadedTest
-    implements Runnable {
+public class GenericOverrideTest extends ComboInstance<GenericOverrideTest> {
 
     enum SourceLevel {
         SOURCE_7("-source", "7"),
@@ -58,24 +58,29 @@
         }
     }
 
-    enum SignatureKind {
+    enum SignatureKind implements ComboParameter {
         NON_GENERIC(""),
         GENERIC("<X>");
 
         String paramStr;
 
-        private SignatureKind(String paramStr) {
+        SignatureKind(String paramStr) {
             this.paramStr = paramStr;
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return paramStr;
+        }
     }
 
-    enum ReturnTypeKind {
+    enum ReturnTypeKind implements ComboParameter {
         LIST("List"),
         ARRAYLIST("ArrayList");
 
         String retStr;
 
-        private ReturnTypeKind(String retStr) {
+        ReturnTypeKind(String retStr) {
             this.retStr = retStr;
         }
 
@@ -88,9 +93,14 @@
                 default: throw new AssertionError("Unexpected ret kind: " + this);
             }
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return retStr;
+        }
     }
 
-    enum TypeArgumentKind {
+    enum TypeArgumentKind implements ComboParameter {
         NONE(""),
         UNBOUND("<?>"),
         INTEGER("<Number>"),
@@ -99,7 +109,7 @@
 
         String typeargStr;
 
-        private TypeArgumentKind(String typeargStr) {
+        TypeArgumentKind(String typeargStr) {
             this.typeargStr = typeargStr;
         }
 
@@ -141,136 +151,79 @@
                 default: throw new AssertionError("Unexpected typearg kind: " + this);
             }
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return typeargStr;
+        }
     }
 
     public static void main(String... args) throws Exception {
-        for (SignatureKind sig1 : SignatureKind.values()) {
-            for (ReturnTypeKind rt1 : ReturnTypeKind.values()) {
-                for (TypeArgumentKind ta1 : TypeArgumentKind.values()) {
-                    if (!ta1.compatibleWith(sig1)) continue;
-                    for (SignatureKind sig2 : SignatureKind.values()) {
-                        for (ReturnTypeKind rt2 : ReturnTypeKind.values()) {
-                            for (TypeArgumentKind ta2 : TypeArgumentKind.values()) {
-                                if (!ta2.compatibleWith(sig2)) continue;
-                                for (ReturnTypeKind rt3 : ReturnTypeKind.values()) {
-                                    for (TypeArgumentKind ta3 : TypeArgumentKind.values()) {
-                                        if (!ta3.compatibleWith(SignatureKind.NON_GENERIC))
-                                            continue;
-                                        for (SourceLevel level : SourceLevel.values()) {
-                                            pool.execute(
-                                                    new GenericOverrideTest(sig1,
-                                                    rt1, ta1, sig2, rt2,
-                                                    ta2, rt3, ta3, level));
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-
-        checkAfterExec();
+        new ComboTestHelper<GenericOverrideTest>()
+                .withFilter(GenericOverrideTest::argMismatchFilter)
+                .withDimension("SOURCE", (x, level) -> x.level = level, SourceLevel.values())
+                .withArrayDimension("SIG", (x, sig, idx) -> x.sigs[idx] = sig, 2, SignatureKind.values())
+                .withArrayDimension("TARG", (x, targ, idx) -> x.targs[idx] = targ, 3, TypeArgumentKind.values())
+                .withArrayDimension("RET", (x, ret, idx) -> x.rets[idx] = ret, 3, ReturnTypeKind.values())
+                .run(GenericOverrideTest::new);
     }
 
-    SignatureKind sig1, sig2;
-    ReturnTypeKind rt1, rt2, rt3;
-    TypeArgumentKind ta1, ta2, ta3;
+    SignatureKind[] sigs = new SignatureKind[2];
+    ReturnTypeKind[] rets = new ReturnTypeKind[3];
+    TypeArgumentKind[] targs = new TypeArgumentKind[3];
     SourceLevel level;
-    JavaSource source;
-    DiagnosticChecker diagChecker;
 
-    GenericOverrideTest(SignatureKind sig1, ReturnTypeKind rt1, TypeArgumentKind ta1,
-            SignatureKind sig2, ReturnTypeKind rt2, TypeArgumentKind ta2,
-            ReturnTypeKind rt3, TypeArgumentKind ta3, SourceLevel level) {
-        this.sig1 = sig1;
-        this.sig2 = sig2;
-        this.rt1 = rt1;
-        this.rt2 = rt2;
-        this.rt3 = rt3;
-        this.ta1 = ta1;
-        this.ta2 = ta2;
-        this.ta3 = ta3;
-        this.level = level;
-        this.source = new JavaSource();
-        this.diagChecker = new DiagnosticChecker();
+    boolean argMismatchFilter() {
+        return targs[0].compatibleWith(sigs[0]) &&
+                targs[1].compatibleWith(sigs[1]) &&
+                targs[2].compatibleWith(SignatureKind.NON_GENERIC);
     }
 
-    class JavaSource extends SimpleJavaFileObject {
+    String template = "import java.util.*;\n" +
+                      "interface A { #{SIG[0]} #{RET[0]}#{TARG[0]} m(); }\n" +
+                      "interface B { #{SIG[1]} #{RET[1]}#{TARG[1]} m(); }\n" +
+                      "interface AB extends A, B {}\n" +
+                      "class Test {\n" +
+                      "  void test(AB ab) { #{RET[2]}#{TARG[2]} n = ab.m(); }\n" +
+                      "}";
 
-        String template = "import java.util.*;\n" +
-                          "interface A { #S1 #R1#TA1 m(); }\n" +
-                          "interface B { #S2 #R2#TA2 m(); }\n" +
-                          "interface AB extends A, B {}\n" +
-                          "class Test {\n" +
-                          "  void test(AB ab) { #R3#TA3 n = ab.m(); }\n" +
-                          "}";
-
-        String source;
-
-        public JavaSource() {
-            super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
-            source = template.replace("#S1", sig1.paramStr).
-                    replace("#S2", sig2.paramStr).
-                    replace("#R1", rt1.retStr).
-                    replace("#R2", rt2.retStr).
-                    replace("#R3", rt3.retStr).
-                    replace("#TA1", ta1.typeargStr).
-                    replace("#TA2", ta2.typeargStr).
-                    replace("#TA3", ta3.typeargStr);
-        }
-
-        @Override
-        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
-            return source;
-        }
+    @Override
+    public void doWork() throws IOException {
+        check(newCompilationTask()
+                .withOption("-XDuseUnsharedTable") //this test relies on predictable name indexes!
+                .withOptions(level.opts)
+                .withSourceFromTemplate(template)
+                .analyze());
     }
 
-    @Override
-    public void run() {
-        JavacTask ct = (JavacTask)comp.getTask(null, fm.get(), diagChecker,
-                level.opts != null ? Arrays.asList(level.opts) : null,
-                null, Arrays.asList(source));
-        try {
-            ct.analyze();
-        } catch (Throwable ex) {
-            throw new AssertionError("Error thrown when compiling the following code:\n" +
-                    source.getCharContent(true));
-        }
-        check();
-    }
-
-    void check() {
-        checkCount.incrementAndGet();
-
+    void check(Result<?> res) {
         boolean errorExpected = false;
         int mostSpecific = 0;
 
         //first check that either |R1| <: |R2| or |R2| <: |R1|
-        if (rt1 != rt2) {
-            if (!rt1.moreSpecificThan(rt2) &&
-                    !rt2.moreSpecificThan(rt1)) {
+        if (rets[0] != rets[1]) {
+            if (!rets[0].moreSpecificThan(rets[1]) &&
+                    !rets[1].moreSpecificThan(rets[0])) {
                 errorExpected = true;
             } else {
-                mostSpecific = rt1.moreSpecificThan(rt2) ? 1 : 2;
+                mostSpecific = rets[0].moreSpecificThan(rets[1]) ? 1 : 2;
             }
         }
 
         //check that either TA1 <= TA2 or TA2 <= TA1 (unless most specific return found above is raw)
         if (!errorExpected) {
-            if (ta1 != ta2) {
-                boolean useStrictCheck = ta1.moreSpecificThan(ta2, true) ||
-                        ta2.moreSpecificThan(ta1, true);
-                if (!ta1.moreSpecificThan(ta2, useStrictCheck) &&
-                        !ta2.moreSpecificThan(ta1, useStrictCheck)) {
+            if (targs[0] != targs[1]) {
+                boolean useStrictCheck = targs[0].moreSpecificThan(targs[1], true) ||
+                        targs[1].moreSpecificThan(targs[0], true);
+                if (!targs[0].moreSpecificThan(targs[1], useStrictCheck) &&
+                        !targs[1].moreSpecificThan(targs[0], useStrictCheck)) {
                     errorExpected = true;
                 } else {
-                    int mostSpecific2 = ta1.moreSpecificThan(ta2, useStrictCheck) ? 1 : 2;
+                    int mostSpecific2 = targs[0].moreSpecificThan(targs[1], useStrictCheck) ? 1 : 2;
                     if (mostSpecific != 0 && mostSpecific2 != mostSpecific) {
                         errorExpected = mostSpecific == 1 ?
-                                ta1 != TypeArgumentKind.NONE :
-                                ta2 != TypeArgumentKind.NONE;
+                                targs[0] != TypeArgumentKind.NONE :
+                                targs[1] != TypeArgumentKind.NONE;
                     } else {
                         mostSpecific = mostSpecific2;
                     }
@@ -284,34 +237,21 @@
 
         //finally, check that most specific return type is compatible with expected type
         if (!errorExpected) {
-            ReturnTypeKind msrt = mostSpecific == 1 ? rt1 : rt2;
-            TypeArgumentKind msta = mostSpecific == 1 ? ta1 : ta2;
-            SignatureKind mssig = mostSpecific == 1 ? sig1 : sig2;
+            ReturnTypeKind msrt = mostSpecific == 1 ? rets[0] : rets[1];
+            TypeArgumentKind msta = mostSpecific == 1 ? targs[0] : targs[1];
+            SignatureKind mssig = mostSpecific == 1 ? sigs[0] : sigs[1];
 
-            if (!msrt.moreSpecificThan(rt3) ||
-                    !msta.assignableTo(ta3, mssig, level)) {
+            if (!msrt.moreSpecificThan(rets[2]) ||
+                    !msta.assignableTo(targs[2], mssig, level)) {
                 errorExpected = true;
             }
         }
 
-        if (errorExpected != diagChecker.errorFound) {
-            throw new Error("invalid diagnostics for source:\n" +
-                source.getCharContent(true) +
-                "\nFound error: " + diagChecker.errorFound +
+        if (errorExpected != res.hasErrors()) {
+            fail("invalid diagnostics for source:\n" +
+                res.compilationInfo() +
+                "\nFound error: " + res.hasErrors() +
                 "\nExpected error: " + errorExpected);
         }
     }
-
-    static class DiagnosticChecker
-        implements javax.tools.DiagnosticListener<JavaFileObject> {
-
-        boolean errorFound;
-
-        public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
-            if (diagnostic.getKind() == Diagnostic.Kind.ERROR) {
-                errorFound = true;
-            }
-        }
-    }
-
 }
--- a/langtools/test/tools/javac/lambda/FunctionalInterfaceConversionTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/langtools/test/tools/javac/lambda/FunctionalInterfaceConversionTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -23,35 +23,32 @@
 
 /**
  * @test
- * @bug 8003280 8004102 8006694
+ * @bug 8003280 8004102 8006694 8129962
  * @summary Add lambda tests
  *  perform several automated checks in lambda conversion, esp. around accessibility
  *  temporarily workaround combo tests are causing time out in several platforms
- * @author  Maurizio Cimadamore
- * @library ../lib
- * @modules jdk.compiler
- * @build JavacTestingAbstractThreadedTest
- * @run main/timeout=600/othervm FunctionalInterfaceConversionTest
+ * @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ *          jdk.compiler/com.sun.tools.javac.code
+ *          jdk.compiler/com.sun.tools.javac.comp
+ *          jdk.compiler/com.sun.tools.javac.main
+ *          jdk.compiler/com.sun.tools.javac.tree
+ *          jdk.compiler/com.sun.tools.javac.util
+ * @build combo.ComboTestHelper
+ * @run main FunctionalInterfaceConversionTest
  */
 
-// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
-// see JDK-8006746
+import java.io.IOException;
 
-import java.io.IOException;
-import java.net.URI;
-import java.util.Arrays;
-import javax.tools.Diagnostic;
-import javax.tools.JavaCompiler;
-import javax.tools.JavaFileObject;
-import javax.tools.SimpleJavaFileObject;
-import javax.tools.ToolProvider;
-import com.sun.source.util.JavacTask;
+import combo.ComboInstance;
+import combo.ComboParameter;
+import combo.ComboTask.Result;
+import combo.ComboTestHelper;
 
-public class FunctionalInterfaceConversionTest
-    extends JavacTestingAbstractThreadedTest
-    implements Runnable {
 
-    enum PackageKind {
+public class FunctionalInterfaceConversionTest extends ComboInstance<FunctionalInterfaceConversionTest> {
+
+    enum PackageKind implements ComboParameter {
         NO_PKG(""),
         PKG_A("a");
 
@@ -61,7 +58,8 @@
             this.pkg = pkg;
         }
 
-        String getPkgDecl() {
+        @Override
+        public String expand(String optParameter) {
             return this == NO_PKG ?
                 "" :
                 "package " + pkg + ";";
@@ -74,12 +72,12 @@
         }
     }
 
-    enum SamKind {
+    enum SamKind implements ComboParameter {
         CLASS("public class Sam {  }"),
         ABSTACT_CLASS("public abstract class Sam {  }"),
         ANNOTATION("public @interface Sam {  }"),
         ENUM("public enum Sam { }"),
-        INTERFACE("public interface Sam { \n #METH; \n }");
+        INTERFACE("public interface Sam { \n #{METH1}; \n }");
 
         String sam_str;
 
@@ -87,12 +85,13 @@
             this.sam_str = sam_str;
         }
 
-        String getSam(String methStr) {
-            return sam_str.replaceAll("#METH", methStr);
+        @Override
+        public String expand(String optParameter) {
+            return sam_str;
         }
     }
 
-    enum ModifierKind {
+    enum ModifierKind implements ComboParameter {
         PUBLIC("public"),
         PACKAGE("");
 
@@ -102,77 +101,73 @@
             this.modifier_str = modifier_str;
         }
 
-        boolean stricterThan(ModifierKind that) {
-            return this.ordinal() > that.ordinal();
+        @Override
+        public String expand(String optParameter) {
+            return modifier_str;
         }
     }
 
-    enum TypeKind {
+    enum TypeKind implements ComboParameter {
         EXCEPTION("Exception"),
         PKG_CLASS("PackageClass");
 
         String typeStr;
 
-        private TypeKind(String typeStr) {
+        TypeKind(String typeStr) {
             this.typeStr = typeStr;
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return typeStr;
+        }
     }
 
-    enum ExprKind {
+    enum ExprKind implements ComboParameter {
         LAMBDA("x -> null"),
         MREF("this::m");
 
         String exprStr;
 
-        private ExprKind(String exprStr) {
+        ExprKind(String exprStr) {
             this.exprStr = exprStr;
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return exprStr;
+        }
     }
 
-    enum MethodKind {
+    enum MethodKind implements ComboParameter {
         NONE(""),
-        NON_GENERIC("public abstract #R m(#ARG s) throws #T;"),
-        GENERIC("public abstract <X> #R m(#ARG s) throws #T;");
+        NON_GENERIC("public abstract #{RET} m(#{ARG} s) throws #{THROWN};"),
+        GENERIC("public abstract <X> #{RET} m(#{ARG} s) throws #{THROWN};");
 
         String methodTemplate;
 
-        private MethodKind(String methodTemplate) {
+        MethodKind(String methodTemplate) {
             this.methodTemplate = methodTemplate;
         }
 
-        String getMethod(TypeKind retType, TypeKind argType, TypeKind thrownType) {
-            return methodTemplate.replaceAll("#R", retType.typeStr).
-                    replaceAll("#ARG", argType.typeStr).
-                    replaceAll("#T", thrownType.typeStr);
+        @Override
+        public String expand(String optParameter) {
+            return methodTemplate;
         }
     }
 
     public static void main(String[] args) throws Exception {
-        for (PackageKind samPkg : PackageKind.values()) {
-            for (ModifierKind modKind : ModifierKind.values()) {
-                for (SamKind samKind : SamKind.values()) {
-                    for (MethodKind samMeth : MethodKind.values()) {
-                        for (MethodKind clientMeth : MethodKind.values()) {
-                            for (TypeKind retType : TypeKind.values()) {
-                                for (TypeKind argType : TypeKind.values()) {
-                                    for (TypeKind thrownType : TypeKind.values()) {
-                                        for (ExprKind exprKind : ExprKind.values()) {
-                                            pool.execute(
-                                                new FunctionalInterfaceConversionTest(
-                                                    samPkg, modKind, samKind,
-                                                    samMeth, clientMeth, retType,
-                                                    argType, thrownType, exprKind));
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-
-        checkAfterExec(false);
+        new ComboTestHelper<FunctionalInterfaceConversionTest>()
+                .withDimension("PKG", (x, pkg) -> x.samPkg = pkg, PackageKind.values())
+                .withDimension("MOD", (x, mod) -> x.modKind = mod, ModifierKind.values())
+                .withDimension("CLAZZ", (x, sam) -> x.samKind = sam, SamKind.values())
+                .withDimension("METH1", (x, meth) -> x.samMeth = meth, MethodKind.values())
+                .withDimension("METH2", (x, meth) -> x.clientMeth = meth, MethodKind.values())
+                .withDimension("RET", (x, ret) -> x.retType = ret, TypeKind.values())
+                .withDimension("ARG", (x, arg) -> x.argType = arg, TypeKind.values())
+                .withDimension("THROWN", (x, thrown) -> x.thrownType = thrown, TypeKind.values())
+                .withDimension("EXPR", (x, expr) -> x.exprKind = expr, ExprKind.values())
+                .run(FunctionalInterfaceConversionTest::new);
     }
 
     PackageKind samPkg;
@@ -184,70 +179,32 @@
     TypeKind argType;
     TypeKind thrownType;
     ExprKind exprKind;
-    DiagnosticChecker dc;
 
-    SourceFile samSourceFile = new SourceFile("Sam.java", "#P \n #C") {
-        @Override
-        public String toString() {
-            return template.replaceAll("#P", samPkg.getPkgDecl()).
-                    replaceAll("#C", samKind.getSam(
-                    samMeth.getMethod(retType, argType, thrownType)));
-        }
-    };
+    String samSource = "#{PKG} \n #{CLAZZ}";
+    String pkgClassSource = "#{PKG}\n #{MOD} class PackageClass extends Exception { }";
+    String clientSource = "#{IMP}\n abstract class Client { \n" +
+                           "  Sam s = #{EXPR};\n" +
+                           "  #{METH2} \n }";
 
-    SourceFile pkgClassSourceFile =
-            new SourceFile("PackageClass.java",
-                           "#P\n #M class PackageClass extends Exception { }") {
-        @Override
-        public String toString() {
-            return template.replaceAll("#P", samPkg.getPkgDecl()).
-                    replaceAll("#M", modKind.modifier_str);
-        }
-    };
-
-    SourceFile clientSourceFile =
-            new SourceFile("Client.java",
-                           "#I\n abstract class Client { \n" +
-                           "  Sam s = #E;\n" +
-                           "  #M \n }") {
-        @Override
-        public String toString() {
-            return template.replaceAll("#I", samPkg.getImportStat())
-                    .replaceAll("#E", exprKind.exprStr)
-                    .replaceAll("#M", clientMeth.getMethod(retType, argType, thrownType));
-        }
-    };
-
-    FunctionalInterfaceConversionTest(PackageKind samPkg, ModifierKind modKind,
-            SamKind samKind, MethodKind samMeth, MethodKind clientMeth,
-            TypeKind retType, TypeKind argType, TypeKind thrownType,
-            ExprKind exprKind) {
-        this.samPkg = samPkg;
-        this.modKind = modKind;
-        this.samKind = samKind;
-        this.samMeth = samMeth;
-        this.clientMeth = clientMeth;
-        this.retType = retType;
-        this.argType = argType;
-        this.thrownType = thrownType;
-        this.exprKind = exprKind;
-        this.dc = new DiagnosticChecker();
+    @Override
+    public void doWork() throws IOException {
+        check(newCompilationTask()
+                .withSourceFromTemplate("Sam", samSource)
+                .withSourceFromTemplate("PackageClass", pkgClassSource)
+                .withSourceFromTemplate("Client", clientSource, this::importStmt)
+                .analyze());
     }
 
-    @Override
-    public void run() {
-        final JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
+    ComboParameter importStmt(String name) {
+        switch (name) {
+            case "IMP": return new ComboParameter.Constant<>(samPkg.getImportStat());
+            default: return null;
+        }
+    }
 
-        JavacTask ct = (JavacTask)tool.getTask(null, fm.get(), dc, null, null,
-                Arrays.asList(samSourceFile, pkgClassSourceFile, clientSourceFile));
-        try {
-            ct.analyze();
-        } catch (IOException ex) {
-            throw new AssertionError("Test failing with cause", ex.getCause());
-        }
-        if (dc.errorFound == checkSamConversion()) {
-            throw new AssertionError(samSourceFile + "\n\n" +
-                pkgClassSourceFile + "\n\n" + clientSourceFile);
+    void check(Result<?> res) {
+        if (res.hasErrors() == checkSamConversion()) {
+            fail("Unexpected compilation result; " + res.compilationInfo());
         }
     }
 
@@ -276,35 +233,4 @@
             return true;
         }
     }
-
-    abstract class SourceFile extends SimpleJavaFileObject {
-
-        protected String template;
-
-        public SourceFile(String filename, String template) {
-            super(URI.create("myfo:/" + filename), JavaFileObject.Kind.SOURCE);
-            this.template = template;
-        }
-
-        @Override
-        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
-            return toString();
-        }
-
-        @Override
-        public abstract String toString();
-    }
-
-    static class DiagnosticChecker
-        implements javax.tools.DiagnosticListener<JavaFileObject> {
-
-        boolean errorFound = false;
-
-        @Override
-        public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
-            if (diagnostic.getKind() == Diagnostic.Kind.ERROR) {
-                errorFound = true;
-            }
-        }
-    }
 }
--- a/langtools/test/tools/javac/lambda/LambdaParserTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/langtools/test/tools/javac/lambda/LambdaParserTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -23,39 +23,40 @@
 
 /*
  * @test
- * @bug 7115050 8003280 8005852 8006694
+ * @bug 7115050 8003280 8005852 8006694 8129962
  * @summary Add lambda tests
  *  Add parser support for lambda expressions
  *  temporarily workaround combo tests are causing time out in several platforms
- * @library ../lib
- * @modules jdk.compiler
- * @build JavacTestingAbstractThreadedTest
- * @run main/othervm LambdaParserTest
+ * @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ *          jdk.compiler/com.sun.tools.javac.code
+ *          jdk.compiler/com.sun.tools.javac.comp
+ *          jdk.compiler/com.sun.tools.javac.main
+ *          jdk.compiler/com.sun.tools.javac.tree
+ *          jdk.compiler/com.sun.tools.javac.util
+ * @build combo.ComboTestHelper
+
+ * @run main LambdaParserTest
  */
 
-// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
-// see JDK-8006746
+import java.io.IOException;
 
-import java.net.URI;
-import java.util.Arrays;
-import javax.tools.Diagnostic;
-import javax.tools.JavaFileObject;
-import javax.tools.SimpleJavaFileObject;
-import com.sun.source.util.JavacTask;
+import combo.ComboInstance;
+import combo.ComboParameter;
+import combo.ComboTask.Result;
+import combo.ComboTestHelper;
 
-public class LambdaParserTest
-    extends JavacTestingAbstractThreadedTest
-    implements Runnable {
+public class LambdaParserTest extends ComboInstance<LambdaParserTest> {
 
-    enum LambdaKind {
+    enum LambdaKind implements ComboParameter {
         NILARY_EXPR("()->x"),
         NILARY_STMT("()->{ return x; }"),
-        ONEARY_SHORT_EXPR("#PN->x"),
-        ONEARY_SHORT_STMT("#PN->{ return x; }"),
-        ONEARY_EXPR("(#M1 #T1 #PN)->x"),
-        ONEARY_STMT("(#M1 #T1 #PN)->{ return x; }"),
-        TWOARY_EXPR("(#M1 #T1 #PN, #M2 #T2 y)->x"),
-        TWOARY_STMT("(#M1 #T1 #PN, #M2 #T2 y)->{ return x; }");
+        ONEARY_SHORT_EXPR("#{NAME}->x"),
+        ONEARY_SHORT_STMT("#{NAME}->{ return x; }"),
+        ONEARY_EXPR("(#{MOD[0]} #{TYPE[0]} #{NAME})->x"),
+        ONEARY_STMT("(#{MOD[0]} #{TYPE[0]} #{NAME})->{ return x; }"),
+        TWOARY_EXPR("(#{MOD[0]} #{TYPE[0]} #{NAME}, #{MOD[1]} #{TYPE[1]} y)->x"),
+        TWOARY_STMT("(#{MOD[0]} #{TYPE[0]} #{NAME}, #{MOD[1]} #{TYPE[1]} y)->{ return x; }");
 
         String lambdaTemplate;
 
@@ -63,13 +64,9 @@
             this.lambdaTemplate = lambdaTemplate;
         }
 
-        String getLambdaString(LambdaParameterKind pk1, LambdaParameterKind pk2,
-                ModifierKind mk1, ModifierKind mk2, LambdaParameterName pn) {
-            return lambdaTemplate.replaceAll("#M1", mk1.modifier)
-                    .replaceAll("#M2", mk2.modifier)
-                    .replaceAll("#T1", pk1.parameterType)
-                    .replaceAll("#T2", pk2.parameterType)
-                    .replaceAll("#PN", pn.nameStr);
+        @Override
+        public String expand(String optParameter) {
+            return lambdaTemplate;
         }
 
         int arity() {
@@ -92,7 +89,7 @@
         }
     }
 
-    enum LambdaParameterName {
+    enum LambdaParameterName implements ComboParameter {
         IDENT("x"),
         UNDERSCORE("_");
 
@@ -101,9 +98,14 @@
         LambdaParameterName(String nameStr) {
             this.nameStr = nameStr;
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return nameStr;
+        }
     }
 
-    enum LambdaParameterKind {
+    enum LambdaParameterKind implements ComboParameter {
         IMPLICIT(""),
         EXPLIICT_SIMPLE("A"),
         EXPLIICT_SIMPLE_ARR1("A[]"),
@@ -129,9 +131,14 @@
             return this == EXPLICIT_VARARGS ||
                     this == EXPLICIT_GENERIC2_VARARGS;
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return parameterType;
+        }
     }
 
-    enum ModifierKind {
+    enum ModifierKind implements ComboParameter {
         NONE(""),
         FINAL("final"),
         PUBLIC("public");
@@ -150,15 +157,20 @@
                 default: throw new AssertionError("Invalid modifier kind " + this);
             }
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return modifier;
+        }
     }
 
-    enum ExprKind {
-        NONE("#L#S"),
-        SINGLE_PAREN1("(#L#S)"),
-        SINGLE_PAREN2("(#L)#S"),
-        DOUBLE_PAREN1("((#L#S))"),
-        DOUBLE_PAREN2("((#L)#S)"),
-        DOUBLE_PAREN3("((#L))#S");
+    enum ExprKind implements ComboParameter {
+        NONE("#{LAMBDA}#{SUBEXPR}"),
+        SINGLE_PAREN1("(#{LAMBDA}#{SUBEXPR})"),
+        SINGLE_PAREN2("(#{LAMBDA})#{SUBEXPR}"),
+        DOUBLE_PAREN1("((#{LAMBDA}#{SUBEXPR}))"),
+        DOUBLE_PAREN2("((#{LAMBDA})#{SUBEXPR})"),
+        DOUBLE_PAREN3("((#{LAMBDA}))#{SUBEXPR}");
 
         String expressionTemplate;
 
@@ -166,14 +178,13 @@
             this.expressionTemplate = expressionTemplate;
         }
 
-        String expressionString(LambdaParameterKind pk1, LambdaParameterKind pk2,
-                ModifierKind mk1, ModifierKind mk2, LambdaKind lk, LambdaParameterName pn, SubExprKind sk) {
-            return expressionTemplate.replaceAll("#L", lk.getLambdaString(pk1, pk2, mk1, mk2, pn))
-                    .replaceAll("#S", sk.subExpression);
+        @Override
+        public String expand(String optParameter) {
+            return expressionTemplate;
         }
     }
 
-    enum SubExprKind {
+    enum SubExprKind implements ComboParameter {
         NONE(""),
         SELECT_FIELD(".f"),
         SELECT_METHOD(".f()"),
@@ -186,133 +197,78 @@
         SubExprKind(String subExpression) {
             this.subExpression = subExpression;
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return subExpression;
+        }
     }
 
     public static void main(String... args) throws Exception {
-        for (LambdaKind lk : LambdaKind.values()) {
-            for (LambdaParameterName pn : LambdaParameterName.values()) {
-                for (LambdaParameterKind pk1 : LambdaParameterKind.values()) {
-                    if (lk.arity() < 1 && pk1 != LambdaParameterKind.IMPLICIT)
-                        continue;
-                    for (LambdaParameterKind pk2 : LambdaParameterKind.values()) {
-                        if (lk.arity() < 2 && pk2 != LambdaParameterKind.IMPLICIT)
-                            continue;
-                        for (ModifierKind mk1 : ModifierKind.values()) {
-                            if (mk1 != ModifierKind.NONE && lk.isShort())
-                                continue;
-                            if (lk.arity() < 1 && mk1 != ModifierKind.NONE)
-                                continue;
-                            for (ModifierKind mk2 : ModifierKind.values()) {
-                                if (lk.arity() < 2 && mk2 != ModifierKind.NONE)
-                                    continue;
-                                for (SubExprKind sk : SubExprKind.values()) {
-                                    for (ExprKind ek : ExprKind.values()) {
-                                        pool.execute(
-                                            new LambdaParserTest(pk1, pk2, mk1,
-                                                                 mk2, lk, sk, ek, pn));
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
+        new ComboTestHelper<LambdaParserTest>()
+                .withFilter(LambdaParserTest::redundantTestFilter)
+                .withFilter(LambdaParserTest::badImplicitFilter)
+                .withDimension("LAMBDA", (x, lk) -> x.lk = lk, LambdaKind.values())
+                .withDimension("NAME", (x, name) -> x.pn = name, LambdaParameterName.values())
+                .withArrayDimension("TYPE", (x, type, idx) -> x.pks[idx] = type, 2, LambdaParameterKind.values())
+                .withArrayDimension("MOD", (x, mod, idx) -> x.mks[idx] = mod, 2, ModifierKind.values())
+                .withDimension("EXPR", ExprKind.values())
+                .withDimension("SUBEXPR", SubExprKind.values())
+                .run(LambdaParserTest::new);
+    }
+
+    LambdaParameterKind[] pks = new LambdaParameterKind[2];
+    ModifierKind[] mks = new ModifierKind[2];
+    LambdaKind lk;
+    LambdaParameterName pn;
+
+    boolean badImplicitFilter() {
+        return !(mks[0] != ModifierKind.NONE && lk.isShort());
+    }
+
+    boolean redundantTestFilter() {
+        for (int i = lk.arity(); i < mks.length ; i++) {
+            if (mks[i].ordinal() != 0) {
+                return false;
             }
         }
-
-        checkAfterExec();
+        for (int i = lk.arity(); i < pks.length ; i++) {
+            if (pks[i].ordinal() != 0) {
+                return false;
+            }
+        }
+        return true;
     }
 
-    LambdaParameterKind pk1;
-    LambdaParameterKind pk2;
-    ModifierKind mk1;
-    ModifierKind mk2;
-    LambdaKind lk;
-    LambdaParameterName pn;
-    SubExprKind sk;
-    ExprKind ek;
-    JavaSource source;
-    DiagnosticChecker diagChecker;
+    String template = "class Test {\n" +
+                      "   SAM s = #{EXPR};\n" +
+                      "}";
 
-    LambdaParserTest(LambdaParameterKind pk1, LambdaParameterKind pk2,
-            ModifierKind mk1, ModifierKind mk2, LambdaKind lk,
-            SubExprKind sk, ExprKind ek, LambdaParameterName pn) {
-        this.pk1 = pk1;
-        this.pk2 = pk2;
-        this.mk1 = mk1;
-        this.mk2 = mk2;
-        this.lk = lk;
-        this.pn = pn;
-        this.sk = sk;
-        this.ek = ek;
-        this.source = new JavaSource();
-        this.diagChecker = new DiagnosticChecker();
+    @Override
+    public void doWork() throws IOException {
+        check(newCompilationTask()
+                .withSourceFromTemplate(template)
+                .parse());
     }
 
-    class JavaSource extends SimpleJavaFileObject {
-
-        String template = "class Test {\n" +
-                          "   SAM s = #E;\n" +
-                          "}";
-
-        String source;
-
-        public JavaSource() {
-            super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
-            source = template.replaceAll("#E",
-                    ek.expressionString(pk1, pk2, mk1, mk2, lk, pn, sk));
-        }
-
-        @Override
-        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
-            return source;
-        }
-    }
-
-    public void run() {
-        JavacTask ct = (JavacTask)comp.getTask(null, fm.get(), diagChecker,
-                null, null, Arrays.asList(source));
-        try {
-            ct.parse();
-        } catch (Throwable ex) {
-            processException(ex);
-            return;
-        }
-        check();
-    }
-
-    void check() {
-        checkCount.incrementAndGet();
-
-        boolean errorExpected = (lk.arity() > 0 && !mk1.compatibleWith(pk1)) ||
-                (lk.arity() > 1 && !mk2.compatibleWith(pk2));
+    void check(Result<?> res) {
+        boolean errorExpected = (lk.arity() > 0 && !mks[0].compatibleWith(pks[0])) ||
+                (lk.arity() > 1 && !mks[1].compatibleWith(pks[1]));
 
         if (lk.arity() == 2 &&
-                (pk1.explicit() != pk2.explicit() ||
-                pk1.isVarargs())) {
+                (pks[0].explicit() != pks[1].explicit() ||
+                pks[0].isVarargs())) {
             errorExpected = true;
         }
 
         errorExpected |= pn == LambdaParameterName.UNDERSCORE &&
                 lk.arity() > 0;
 
-        if (errorExpected != diagChecker.errorFound) {
-            throw new Error("invalid diagnostics for source:\n" +
-                source.getCharContent(true) +
-                "\nFound error: " + diagChecker.errorFound +
+        if (errorExpected != res.hasErrors()) {
+            fail("invalid diagnostics for source:\n" +
+                res.compilationInfo() +
+                "\nFound error: " + res.hasErrors() +
                 "\nExpected error: " + errorExpected);
         }
     }
-
-    static class DiagnosticChecker
-        implements javax.tools.DiagnosticListener<JavaFileObject> {
-
-        boolean errorFound;
-
-        public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
-            if (diagnostic.getKind() == Diagnostic.Kind.ERROR) {
-                errorFound = true;
-            }
-        }
-    }
-
 }
--- a/langtools/test/tools/javac/lambda/MethodReferenceParserTest.java	Tue Sep 01 12:57:41 2015 +0300
+++ b/langtools/test/tools/javac/lambda/MethodReferenceParserTest.java	Tue Sep 08 15:39:51 2015 -0700
@@ -23,39 +23,39 @@
 
 /*
  * @test
- * @bug 7115052 8003280 8006694
+ * @bug 7115052 8003280 8006694 8129962
  * @summary Add lambda tests
  *  Add parser support for method references
  *  temporarily workaround combo tests are causing time out in several platforms
- * @library ../lib
- * @modules jdk.compiler
- * @build JavacTestingAbstractThreadedTest
- * @run main/othervm MethodReferenceParserTest
+ * @library /tools/javac/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ *          jdk.compiler/com.sun.tools.javac.code
+ *          jdk.compiler/com.sun.tools.javac.comp
+ *          jdk.compiler/com.sun.tools.javac.main
+ *          jdk.compiler/com.sun.tools.javac.tree
+ *          jdk.compiler/com.sun.tools.javac.util
+ * @build combo.ComboTestHelper
+ * @run main MethodReferenceParserTest
  */
 
-// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
-// see JDK-8006746
+import java.io.IOException;
 
-import java.net.URI;
-import java.util.Arrays;
-import javax.tools.Diagnostic;
-import javax.tools.JavaFileObject;
-import javax.tools.SimpleJavaFileObject;
-import com.sun.source.util.JavacTask;
+import combo.ComboInstance;
+import combo.ComboParameter;
+import combo.ComboTask.Result;
+import combo.ComboTestHelper;
 
-public class MethodReferenceParserTest
-    extends JavacTestingAbstractThreadedTest
-    implements Runnable {
+public class MethodReferenceParserTest extends ComboInstance<MethodReferenceParserTest> {
 
-    enum ReferenceKind {
-        METHOD_REF("#Q::#Gm"),
-        CONSTRUCTOR_REF("#Q::#Gnew"),
+    enum ReferenceKind implements ComboParameter {
+        METHOD_REF("#{QUAL}::#{TARGS}m"),
+        CONSTRUCTOR_REF("#{QUAL}::#{TARGS}new"),
         FALSE_REF("min < max"),
-        ERR_SUPER("#Q::#Gsuper"),
-        ERR_METH0("#Q::#Gm()"),
-        ERR_METH1("#Q::#Gm(X)"),
-        ERR_CONSTR0("#Q::#Gnew()"),
-        ERR_CONSTR1("#Q::#Gnew(X)");
+        ERR_SUPER("#{QUAL}::#{TARGS}super"),
+        ERR_METH0("#{QUAL}::#{TARGS}m()"),
+        ERR_METH1("#{QUAL}::#{TARGS}m(X)"),
+        ERR_CONSTR0("#{QUAL}::#{TARGS}new()"),
+        ERR_CONSTR1("#{QUAL}::#{TARGS}new(X)");
 
         String referenceTemplate;
 
@@ -63,12 +63,6 @@
             this.referenceTemplate = referenceTemplate;
         }
 
-        String getReferenceString(QualifierKind qk, GenericKind gk) {
-            return referenceTemplate
-                    .replaceAll("#Q", qk.qualifier)
-                    .replaceAll("#G", gk.typeParameters);
-        }
-
         boolean erroneous() {
             switch (this) {
                 case ERR_SUPER:
@@ -80,11 +74,16 @@
                 default: return false;
             }
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return referenceTemplate;
+        }
     }
 
-    enum ContextKind {
-        ASSIGN("SAM s = #E;"),
-        METHOD("m(#E, i);");
+    enum ContextKind implements ComboParameter {
+        ASSIGN("SAM s = #{EXPR};"),
+        METHOD("m(#{EXPR}, i);");
 
         String contextTemplate;
 
@@ -92,13 +91,13 @@
             this.contextTemplate = contextTemplate;
         }
 
-        String contextString(ExprKind ek, ReferenceKind rk, QualifierKind qk,
-                GenericKind gk, SubExprKind sk) {
-            return contextTemplate.replaceAll("#E", ek.expressionString(rk, qk, gk, sk));
+        @Override
+        public String expand(String optParameter) {
+            return contextTemplate;
         }
     }
 
-    enum GenericKind {
+    enum GenericKind implements ComboParameter {
         NONE(""),
         ONE("<X>"),
         TWO("<X,Y>");
@@ -108,9 +107,14 @@
         GenericKind(String typeParameters) {
             this.typeParameters = typeParameters;
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return typeParameters;
+        }
     }
 
-    enum QualifierKind {
+    enum QualifierKind implements ComboParameter {
         THIS("this"),
         SUPER("super"),
         NEW("new Foo()"),
@@ -131,15 +135,20 @@
         QualifierKind(String qualifier) {
             this.qualifier = qualifier;
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return qualifier;
+        }
     }
 
-    enum ExprKind {
-        NONE("#R::S"),
-        SINGLE_PAREN1("(#R#S)"),
-        SINGLE_PAREN2("(#R)#S"),
-        DOUBLE_PAREN1("((#R#S))"),
-        DOUBLE_PAREN2("((#R)#S)"),
-        DOUBLE_PAREN3("((#R))#S");
+    enum ExprKind implements ComboParameter {
+        NONE("#{MREF}"),
+        SINGLE_PAREN1("(#{MREF}#{SUBEXPR})"),
+        SINGLE_PAREN2("(#{MREF})#{SUBEXPR}"),
+        DOUBLE_PAREN1("((#{MREF}#{SUBEXPR}))"),
+        DOUBLE_PAREN2("((#{MREF})#{SUBEXPR})"),
+        DOUBLE_PAREN3("((#{MREF}))#{SUBEXPR}");
 
         String expressionTemplate;
 
@@ -147,14 +156,13 @@
             this.expressionTemplate = expressionTemplate;
         }
 
-        String expressionString(ReferenceKind rk, QualifierKind qk, GenericKind gk, SubExprKind sk) {
-            return expressionTemplate
-                    .replaceAll("#R", rk.getReferenceString(qk, gk))
-                    .replaceAll("#S", sk.subExpression);
+        @Override
+        public String expand(String optParameter) {
+            return expressionTemplate;
         }
     }
 
-    enum SubExprKind {
+    enum SubExprKind implements ComboParameter {
         NONE(""),
         SELECT_FIELD(".f"),
         SELECT_METHOD(".f()"),
@@ -167,100 +175,45 @@
         SubExprKind(String subExpression) {
             this.subExpression = subExpression;
         }
+
+        @Override
+        public String expand(String optParameter) {
+            return subExpression;
+        }
     }
 
     public static void main(String... args) throws Exception {
-        for (ReferenceKind rk : ReferenceKind.values()) {
-            for (QualifierKind qk : QualifierKind.values()) {
-                for (GenericKind gk : GenericKind.values()) {
-                    for (SubExprKind sk : SubExprKind.values()) {
-                        for (ExprKind ek : ExprKind.values()) {
-                            for (ContextKind ck : ContextKind.values()) {
-                                pool.execute(new MethodReferenceParserTest(rk, qk, gk, sk, ek, ck));
-                            }
-                        }
-                    }
-                }
-            }
-        }
-
-        checkAfterExec();
+        new ComboTestHelper<MethodReferenceParserTest>()
+                .withDimension("MREF", (x, ref) -> x.rk = ref, ReferenceKind.values())
+                .withDimension("QUAL", QualifierKind.values())
+                .withDimension("TARGS", GenericKind.values())
+                .withDimension("EXPR", ExprKind.values())
+                .withDimension("SUBEXPR", SubExprKind.values())
+                .withDimension("CTX", ContextKind.values())
+                .run(MethodReferenceParserTest::new);
     }
 
     ReferenceKind rk;
-    QualifierKind qk;
-    GenericKind gk;
-    SubExprKind sk;
-    ExprKind ek;
-    ContextKind ck;
-    JavaSource source;
-    DiagnosticChecker diagChecker;
 
-    MethodReferenceParserTest(ReferenceKind rk, QualifierKind qk, GenericKind gk, SubExprKind sk, ExprKind ek, ContextKind ck) {
-        this.rk = rk;
-        this.qk = qk;
-        this.gk = gk;
-        this.sk = sk;
-        this.ek = ek;
-        this.ck = ck;
-        this.source = new JavaSource();
-        this.diagChecker = new DiagnosticChecker();
+    String template = "class Test {\n" +
+                      "   void test() {\n" +
+                      "      #{CTX}\n" +
+                      "   }" +
+                      "}";
+
+    @Override
+    public void doWork() throws IOException {
+        check(newCompilationTask()
+                .withSourceFromTemplate(template)
+                .parse());
     }
 
-    class JavaSource extends SimpleJavaFileObject {
-
-        String template = "class Test {\n" +
-                          "   void test() {\n" +
-                          "      #C\n" +
-                          "   }" +
-                          "}";
-
-        String source;
-
-        public JavaSource() {
-            super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
-            source = template.replaceAll("#C", ck.contextString(ek, rk, qk, gk, sk));
-        }
-
-        @Override
-        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
-            return source;
-        }
-    }
-
-    @Override
-    public void run() {
-        JavacTask ct = (JavacTask)comp.getTask(null, fm.get(), diagChecker,
-                null, null, Arrays.asList(source));
-        try {
-            ct.parse();
-        } catch (Throwable ex) {
-            processException(ex);
-            return;
-        }
-        check();
-    }
-
-    void check() {
-        checkCount.incrementAndGet();
-
-        if (diagChecker.errorFound != rk.erroneous()) {
-            throw new Error("invalid diagnostics for source:\n" +