Merge
authorprr
Tue, 05 Aug 2014 12:14:11 -0700
changeset 26026 8d7f6c44eff4
parent 26025 7b31d014cae6 (current diff)
parent 25814 040219b86923 (diff)
child 26027 f42f02a8666d
Merge
hotspot/test/compiler/uncommontrap/TestSpecTrapClassUnloading.java
jdk/src/share/classes/com/sun/jndi/ldap/VersionHelper12.java
jdk/src/share/classes/com/sun/naming/internal/VersionHelper12.java
--- a/.hgtags	Tue Aug 05 15:39:05 2014 +0400
+++ b/.hgtags	Tue Aug 05 12:14:11 2014 -0700
@@ -266,3 +266,4 @@
 28dd0c7beb3cad9cf95f17b4b5ad87eb447a4084 jdk9-b21
 9678e0db8ff6ed845d4c2ee4a3baf7f386a777e5 jdk9-b22
 39cfdc2dcaf3f195c55398e4e677ab053b07e3d2 jdk9-b23
+d9ce05f36ffec3e5e8af62a92455c1c66a63c320 jdk9-b24
--- a/.hgtags-top-repo	Tue Aug 05 15:39:05 2014 +0400
+++ b/.hgtags-top-repo	Tue Aug 05 12:14:11 2014 -0700
@@ -266,3 +266,4 @@
 9052803f4d01feda28b3d65f2b64dd457d21c7b6 jdk9-b21
 8e4bdab4c362aadde2d321f968cd503a2f779e2f jdk9-b22
 88567461a2cd9b7fb431fee6440005a694df1f47 jdk9-b23
+1d4a293fbec19dc2d5790bbb2c7dd0ed8f265484 jdk9-b24
--- a/common/autoconf/generated-configure.sh	Tue Aug 05 15:39:05 2014 +0400
+++ b/common/autoconf/generated-configure.sh	Tue Aug 05 12:14:11 2014 -0700
@@ -4311,7 +4311,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1404942241
+DATE_WHEN_GENERATED=1405336663
 
 ###############################################################################
 #
@@ -14548,7 +14548,7 @@
   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
     INCLUDE_SA=false
   fi
-  if test "x$VAR_CPU" = xppc64 ; then
+  if test "x$OPENJDK_TARGET_OS" = xaix ; then
     INCLUDE_SA=false
   fi
 
--- a/common/autoconf/jdk-options.m4	Tue Aug 05 15:39:05 2014 +0400
+++ b/common/autoconf/jdk-options.m4	Tue Aug 05 12:14:11 2014 -0700
@@ -158,7 +158,7 @@
   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
     INCLUDE_SA=false
   fi
-  if test "x$VAR_CPU" = xppc64 ; then
+  if test "x$OPENJDK_TARGET_OS" = xaix ; then
     INCLUDE_SA=false
   fi
   AC_SUBST(INCLUDE_SA)
--- a/corba/.hgtags	Tue Aug 05 15:39:05 2014 +0400
+++ b/corba/.hgtags	Tue Aug 05 12:14:11 2014 -0700
@@ -266,3 +266,4 @@
 3615a4e7f0542ca7552ad6454b742c73ee211d8e jdk9-b21
 ddc07abf4307855c0dc904cc5c96cc764023a930 jdk9-b22
 57735d66face054440a63ce99789eac5a5ee1dfd jdk9-b23
+8a44142bb7fc8118f70f91a1b97c12dfc50563ee jdk9-b24
--- a/hotspot/.hgtags	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/.hgtags	Tue Aug 05 12:14:11 2014 -0700
@@ -426,3 +426,4 @@
 17b4a5e831b398738feedb0afe75245744510153 jdk9-b21
 518d1fcc0799494f013e00e0a94a91b6f212d54f jdk9-b22
 dd472cdacc32e3afc7c5bfa7ef16ea0e0befb7fa jdk9-b23
+dde2d03b0ea46a27650839e3a1d212c7c1f7b4c8 jdk9-b24
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
 import sun.jvm.hotspot.debugger.JVMDebugger;
 import sun.jvm.hotspot.debugger.MachineDescription;
 import sun.jvm.hotspot.debugger.MachineDescriptionAMD64;
+import sun.jvm.hotspot.debugger.MachineDescriptionPPC64;
 import sun.jvm.hotspot.debugger.MachineDescriptionIA64;
 import sun.jvm.hotspot.debugger.MachineDescriptionIntelX86;
 import sun.jvm.hotspot.debugger.MachineDescriptionSPARC32Bit;
@@ -588,6 +589,8 @@
             machDesc = new MachineDescriptionIA64();
         } else if (cpu.equals("amd64")) {
             machDesc = new MachineDescriptionAMD64();
+        } else if (cpu.equals("ppc64")) {
+            machDesc = new MachineDescriptionPPC64();
         } else if (cpu.equals("sparc")) {
             if (LinuxDebuggerLocal.getAddressSize()==8) {
                     machDesc = new MachineDescriptionSPARC64Bit();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionPPC64.java	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package sun.jvm.hotspot.debugger;
+
+public class MachineDescriptionPPC64 extends MachineDescriptionTwosComplement implements MachineDescription {
+  public long getAddressSize() {
+    return 8;
+  }
+
+  public boolean isLP64() {
+    return true;
+  }
+
+  public boolean isBigEndian() {
+    return true;
+  }
+}
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -61,7 +61,7 @@
       return "x86";
     } else if (cpu.equals("sparc") || cpu.equals("sparcv9")) {
       return "sparc";
-    } else if (cpu.equals("ia64") || cpu.equals("amd64") || cpu.equals("x86_64")) {
+    } else if (cpu.equals("ia64") || cpu.equals("amd64") || cpu.equals("x86_64") || cpu.equals("ppc64")) {
       return cpu;
     } else {
       try {
--- a/hotspot/make/aix/makefiles/buildtree.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/aix/makefiles/buildtree.make	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
 # Copyright 2012, 2013 SAP AG. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
@@ -274,6 +274,8 @@
 	echo; \
 	[ -n "$(SPEC)" ] && \
 	    echo "include $(SPEC)"; \
+	echo "CP ?= cp"; \
+	echo "MV ?= mv"; \
 	echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(VARIANT).make"; \
 	echo "include \$$(GAMMADIR)/make/excludeSrc.make"; \
 	echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(COMPILER).make"; \
--- a/hotspot/make/aix/makefiles/jsig.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/aix/makefiles/jsig.make	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
 # Copyright 2012, 2013 SAP AG. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
@@ -20,7 +20,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 # Rules to build signal interposition library, used by vm.make
@@ -40,8 +40,8 @@
 
 LIBJSIG_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jsig
 
-# On Linux we really dont want a mapfile, as this library is small 
-# and preloaded using LD_PRELOAD, making functions private will 
+# On Linux we really dont want a mapfile, as this library is small
+# and preloaded using LD_PRELOAD, making functions private will
 # cause problems with interposing. See CR: 6466665
 # LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE))
 
@@ -79,9 +79,9 @@
 install_jsig: $(LIBJSIG)
 	@echo "Copying $(LIBJSIG) to $(DEST_JSIG)"
 	$(QUIETLY) test -f $(LIBJSIG_DEBUGINFO) && \
-	    cp -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO)
+	    $(CP) -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO)
 	$(QUIETLY) test -f $(LIBJSIG_DIZ) && \
-	    cp -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ)
-	$(QUIETLY) cp -f $(LIBJSIG) $(DEST_JSIG) && echo "Done"
+	    $(CP) -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ)
+	$(QUIETLY) $(CP) -f $(LIBJSIG) $(DEST_JSIG) && echo "Done"
 
 .PHONY: install_jsig
--- a/hotspot/make/aix/makefiles/rules.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/aix/makefiles/rules.make	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 # Common rules/macros for the vm, adlc.
@@ -28,7 +28,7 @@
 .SUFFIXES: .cpp $(SUFFIXES)
 
 DEMANGLER       = c++filt
-DEMANGLE        = $(DEMANGLER) < $@ > .$@ && mv -f .$@ $@
+DEMANGLE        = $(DEMANGLER) < $@ > .$@ && $(MV) -f .$@ $@
 
 # $(CC) is the c compiler (cc/gcc), $(CXX) is the c++ compiler (CC/g++).
 CC_COMPILE       = $(CC) $(CXXFLAGS) $(CFLAGS)
--- a/hotspot/make/aix/makefiles/sa.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/aix/makefiles/sa.make	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
 # Copyright 2012, 2013 SAP AG. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
@@ -98,11 +98,11 @@
 	$(QUIETLY) $(REMOTE) $(COMPILE.RMIC)  -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
 	$(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
 	$(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql/sa.js
-	$(QUIETLY) cp $(AGENT_SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql
+	$(QUIETLY) $(CP) $(AGENT_SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql
 	$(QUIETLY) mkdir -p $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources
 	$(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources/*
-	$(QUIETLY) cp $(AGENT_SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources/
-	$(QUIETLY) cp -r $(AGENT_SRC_DIR)/images/* $(SA_CLASSDIR)/
+	$(QUIETLY) $(CP) $(AGENT_SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources/
+	$(QUIETLY) $(CP) -r $(AGENT_SRC_DIR)/images/* $(SA_CLASSDIR)/
 	$(QUIETLY) $(REMOTE) $(RUN.JAR) cf $@ -C $(SA_CLASSDIR)/ .
 	$(QUIETLY) $(REMOTE) $(RUN.JAR) uf $@ -C $(AGENT_SRC_DIR) META-INF/services/com.sun.jdi.connect.Connector
 	$(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.x86.X86ThreadContext
--- a/hotspot/make/aix/makefiles/saproc.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/aix/makefiles/saproc.make	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
 # Copyright 2012, 2013 SAP AG. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
@@ -20,7 +20,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 include $(GAMMADIR)/make/defs.make
 
@@ -108,10 +108,10 @@
 	$(QUIETLY) if [ -e $(LIBSAPROC) ] ; then             \
 	  echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)";     \
 	  test -f $(LIBSAPROC_DEBUGINFO) &&                  \
-	    cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \
+	    $(CP) -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \
 	  test -f $(LIBSAPROC_DIZ) &&                  \
-	    cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ); \
-	  cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done";  \
+	    $(CP) -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ); \
+	  $(CP) -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done";  \
 	fi
 
 .PHONY: install_saproc
--- a/hotspot/make/aix/makefiles/top.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/aix/makefiles/top.make	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 # top.make is included in the Makefile in the build directories.
@@ -45,10 +45,10 @@
 GENERATED   = $(TOPDIR)/../generated
 VM          = $(GAMMADIR)/src/share/vm
 Plat_File   = $(Platform_file)
-CDG         = cd $(GENERATED); 
+CDG         = cd $(GENERATED);
 
 ifneq ($(USE_PRECOMPILED_HEADER),0)
-UpdatePCH = $(MAKE) -f vm.make $(PRECOMPILED_HEADER) $(MFLAGS) 
+UpdatePCH = $(MAKE) -f vm.make $(PRECOMPILED_HEADER) $(MFLAGS)
 else
 UpdatePCH = \# precompiled header is not used
 endif
@@ -84,7 +84,7 @@
 	@# We need a null action here, so implicit rules don't get consulted.
 
 $(Cached_plat): $(Plat_File)
-	$(CDG) cp $(Plat_File) $(Cached_plat)
+	$(CDG) $(CP) $(Plat_File) $(Cached_plat)
 
 # make AD files as necessary
 ad_stuff: $(Cached_plat) $(adjust-mflags)
@@ -125,12 +125,12 @@
 # next rules support "make foo.[ois]"
 
 %.o %.i %.s:
-	$(UpdatePCH) 
+	$(UpdatePCH)
 	$(MAKE) -f vm.make $(MFLAGS) $@
 	#$(MAKE) -f vm.make $@
 
 # this should force everything to be rebuilt
-clean: 
+clean:
 	rm -f $(GENERATED)/*.class
 	$(MAKE) -f vm.make $(MFLAGS) clean
 
--- a/hotspot/make/aix/makefiles/vm.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/aix/makefiles/vm.make	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
 # Copyright 2012, 2013 SAP AG. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
@@ -346,10 +346,10 @@
 install_jvm: $(LIBJVM)
 	@echo "Copying $(LIBJVM) to $(DEST_JVM)"
 	$(QUIETLY) test -f $(LIBJVM_DEBUGINFO) && \
-	    cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
+	    $(CP) -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
 	$(QUIETLY) test -f $(LIBJVM_DIZ) && \
-	    cp -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ)
-	$(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done"
+	    $(CP) -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ)
+	$(QUIETLY) $(CP) -f $(LIBJVM) $(DEST_JVM) && echo "Done"
 
 #----------------------------------------------------------------------
 # Other files
--- a/hotspot/make/bsd/makefiles/buildtree.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/bsd/makefiles/buildtree.make	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -278,6 +278,8 @@
 	echo; \
 	[ -n "$(SPEC)" ] && \
 	    echo "include $(SPEC)"; \
+	echo "CP ?= cp"; \
+	echo "MV ?= mv"; \
 	echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(VARIANT).make"; \
 	echo "include \$$(GAMMADIR)/make/excludeSrc.make"; \
 	echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(COMPILER).make"; \
--- a/hotspot/make/bsd/makefiles/jsig.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/bsd/makefiles/jsig.make	Tue Aug 05 12:14:11 2014 -0700
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 # Rules to build signal interposition library, used by vm.make
@@ -47,8 +47,8 @@
 
 LIBJSIG_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jsig
 
-# On Bsd we really dont want a mapfile, as this library is small 
-# and preloaded using LD_PRELOAD, making functions private will 
+# On Bsd we really dont want a mapfile, as this library is small
+# and preloaded using LD_PRELOAD, making functions private will
 # cause problems with interposing. See CR: 6466665
 # LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE))
 
@@ -92,13 +92,13 @@
 	@echo "Copying $(LIBJSIG) to $(DEST_JSIG)"
 ifeq ($(OS_VENDOR), Darwin)
 	$(QUIETLY) test ! -d $(LIBJSIG_DEBUGINFO) || \
-	    cp -f -r $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO)
+	    $(CP) -f -r $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO)
 else
 	$(QUIETLY) test ! -f $(LIBJSIG_DEBUGINFO) || \
-	    cp -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO)
+	    $(CP) -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO)
 endif
 	$(QUIETLY) test ! -f $(LIBJSIG_DIZ) || \
-	    cp -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ)
-	$(QUIETLY) cp -f $(LIBJSIG) $(DEST_JSIG) && echo "Done"
+	    $(CP) -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ)
+	$(QUIETLY) $(CP) -f $(LIBJSIG) $(DEST_JSIG) && echo "Done"
 
 .PHONY: install_jsig
--- a/hotspot/make/bsd/makefiles/rules.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/bsd/makefiles/rules.make	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 # Common rules/macros for the vm, adlc.
@@ -28,7 +28,7 @@
 .SUFFIXES: .cpp $(SUFFIXES)
 
 DEMANGLER       = c++filt
-DEMANGLE        = $(DEMANGLER) < $@ > .$@ && mv -f .$@ $@
+DEMANGLE        = $(DEMANGLER) < $@ > .$@ && $(MV) -f .$@ $@
 
 # $(CC) is the c compiler (cc/gcc), $(CXX) is the c++ compiler (CC/g++).
 CC_COMPILE       = $(CC) $(CXXFLAGS) $(CFLAGS)
--- a/hotspot/make/bsd/makefiles/sa.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/bsd/makefiles/sa.make	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 # This makefile (sa.make) is included from the sa.make in the
@@ -71,7 +71,7 @@
 # if $(AGENT_DIR) does not exist, we don't build SA
 # also, we don't build SA on Itanium, PowerPC, ARM or zero.
 
-all: 
+all:
 	if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" \
              -a "$(SRCARCH)" != "arm" \
              -a "$(SRCARCH)" != "ppc" \
@@ -112,11 +112,11 @@
 	$(QUIETLY) $(REMOTE) $(COMPILE.RMIC)  -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
 	$(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
 	$(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql/sa.js
-	$(QUIETLY) cp $(AGENT_SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql
+	$(QUIETLY) $(CP) $(AGENT_SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql
 	$(QUIETLY) mkdir -p $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources
 	$(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources/*
-	$(QUIETLY) cp $(AGENT_SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources/
-	$(QUIETLY) cp -r $(AGENT_SRC_DIR)/images/* $(SA_CLASSDIR)/
+	$(QUIETLY) $(CP) $(AGENT_SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources/
+	$(QUIETLY) $(CP) -r $(AGENT_SRC_DIR)/images/* $(SA_CLASSDIR)/
 	$(QUIETLY) $(REMOTE) $(RUN.JAR) cf $@ -C $(SA_CLASSDIR)/ .
 	$(QUIETLY) $(REMOTE) $(RUN.JAR) uf $@ -C $(AGENT_SRC_DIR) META-INF/services/com.sun.jdi.connect.Connector
 	$(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.x86.X86ThreadContext
--- a/hotspot/make/bsd/makefiles/saproc.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/bsd/makefiles/saproc.make	Tue Aug 05 12:14:11 2014 -0700
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 # Rules to build serviceability agent library, used by vm.make
@@ -83,7 +83,7 @@
     endif
   else
     SASRCFILES = $(SASRCDIR)/StubDebuggerLocal.c
-    SALIBS = 
+    SALIBS =
     SAARCH = $(ARCHFLAG)
   endif
 endif
@@ -163,13 +163,13 @@
 	@echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"
 ifeq ($(OS_VENDOR), Darwin)
 	$(QUIETLY) test ! -d $(LIBSAPROC_DEBUGINFO) || \
-	    cp -f -r $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO)
+	    $(CP) -f -r $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO)
 else
 	$(QUIETLY) test ! -f $(LIBSAPROC_DEBUGINFO) || \
-	    cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO)
+	    $(CP) -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO)
 endif
 	$(QUIETLY) test ! -f $(LIBSAPROC_DIZ) || \
-	    cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ)
-	$(QUIETLY) cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"
+	    $(CP) -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ)
+	$(QUIETLY) $(CP) -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"
 
 .PHONY: install_saproc
--- a/hotspot/make/bsd/makefiles/top.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/bsd/makefiles/top.make	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 # top.make is included in the Makefile in the build directories.
@@ -45,10 +45,10 @@
 GENERATED   = $(TOPDIR)/../generated
 VM          = $(GAMMADIR)/src/share/vm
 Plat_File   = $(Platform_file)
-CDG         = cd $(GENERATED); 
+CDG         = cd $(GENERATED);
 
 ifneq ($(USE_PRECOMPILED_HEADER),0)
-UpdatePCH = $(MAKE) -f vm.make $(PRECOMPILED_HEADER) $(MFLAGS) 
+UpdatePCH = $(MAKE) -f vm.make $(PRECOMPILED_HEADER) $(MFLAGS)
 else
 UpdatePCH = \# precompiled header is not used
 endif
@@ -84,7 +84,7 @@
 	@# We need a null action here, so implicit rules don't get consulted.
 
 $(Cached_plat): $(Plat_File)
-	$(CDG) cp $(Plat_File) $(Cached_plat)
+	$(CDG) $(CP) $(Plat_File) $(Cached_plat)
 
 # make AD files as necessary
 ad_stuff: $(Cached_plat) $(adjust-mflags)
@@ -134,12 +134,12 @@
 # next rules support "make foo.[ois]"
 
 %.o %.i %.s:
-	$(UpdatePCH) 
+	$(UpdatePCH)
 	$(MAKE) -f vm.make $(MFLAGS) $@
 	#$(MAKE) -f vm.make $@
 
 # this should force everything to be rebuilt
-clean: 
+clean:
 	rm -f $(GENERATED)/*.class
 	$(MAKE) -f vm.make $(MFLAGS) clean
 
--- a/hotspot/make/bsd/makefiles/vm.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/bsd/makefiles/vm.make	Tue Aug 05 12:14:11 2014 -0700
@@ -360,14 +360,14 @@
 	@echo "Copying $(LIBJVM) to $(DEST_JVM)"
 ifeq ($(OS_VENDOR), Darwin)
 	$(QUIETLY) test ! -d $(LIBJVM_DEBUGINFO) || \
-	    cp -f -r $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
+	    $(CP) -f -r $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
 else
 	$(QUIETLY) test ! -f $(LIBJVM_DEBUGINFO) || \
-	    cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
+	    $(CP) -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
 endif
 	$(QUIETLY) test ! -f $(LIBJVM_DIZ) || \
-	    cp -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ)
-	$(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done"
+	    $(CP) -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ)
+	$(QUIETLY) $(CP) -f $(LIBJVM) $(DEST_JVM) && echo "Done"
 
 #----------------------------------------------------------------------
 # Other files
--- a/hotspot/make/jprt.properties	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/jprt.properties	Tue Aug 05 12:14:11 2014 -0700
@@ -350,21 +350,25 @@
   ${jprt.my.windows.i586}-fastdebug-c2-internalvmtests, \
   ${jprt.my.windows.x64}-fastdebug-c2-internalvmtests
 
-jprt.make.rule.test.targets.standard.wbapi = \
-  ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-wbapitest, \
-  ${jprt.my.solaris.x64}-{product|fastdebug}-c2-wbapitest, \
-  ${jprt.my.linux.i586}-{product|fastdebug}-c2-wbapitest, \
-  ${jprt.my.linux.x64}-{product|fastdebug}-c2-wbapitest, \
-  ${jprt.my.windows.i586}-{product|fastdebug}-c2-wbapitest, \
-  ${jprt.my.windows.x64}-{product|fastdebug}-c2-wbapitest, \
-  ${jprt.my.linux.i586}-{product|fastdebug}-c1-wbapitest, \
-  ${jprt.my.windows.i586}-{product|fastdebug}-c1-wbapitest
+jprt.make.rule.test.targets.standard.reg.group = \
+  ${jprt.my.solaris.sparcv9}-{product|fastdebug}-c2-GROUP, \
+  ${jprt.my.solaris.x64}-{product|fastdebug}-c2-GROUP, \
+  ${jprt.my.linux.i586}-{product|fastdebug}-c2-GROUP, \
+  ${jprt.my.linux.x64}-{product|fastdebug}-c2-GROUP, \
+  ${jprt.my.windows.i586}-{product|fastdebug}-c2-GROUP, \
+  ${jprt.my.windows.x64}-{product|fastdebug}-c2-GROUP, \
+  ${jprt.my.linux.i586}-{product|fastdebug}-c1-GROUP, \
+  ${jprt.my.windows.i586}-{product|fastdebug}-c1-GROUP
 
 jprt.make.rule.test.targets.standard = \
   ${jprt.make.rule.test.targets.standard.client}, \
   ${jprt.make.rule.test.targets.standard.server}, \
   ${jprt.make.rule.test.targets.standard.internalvmtests}, \
-  ${jprt.make.rule.test.targets.standard.wbapi}
+  ${jprt.make.rule.test.targets.standard.reg.group:GROUP=hotspot_wbapitest}, \
+  ${jprt.make.rule.test.targets.standard.reg.group:GROUP=hotspot_compiler}, \
+  ${jprt.make.rule.test.targets.standard.reg.group:GROUP=hotspot_gc}, \
+  ${jprt.make.rule.test.targets.standard.reg.group:GROUP=hotspot_runtime}, \
+  ${jprt.make.rule.test.targets.standard.reg.group:GROUP=hotspot_serviceability}
 
 jprt.make.rule.test.targets.embedded = \
   ${jprt.make.rule.test.targets.standard.client}
--- a/hotspot/make/linux/makefiles/buildtree.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/linux/makefiles/buildtree.make	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -277,6 +277,8 @@
 	echo; \
 	[ -n "$(SPEC)" ] && \
 	    echo "include $(SPEC)"; \
+	echo "CP ?= cp"; \
+	echo "MV ?= mv"; \
 	echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(VARIANT).make"; \
 	echo "include \$$(GAMMADIR)/make/excludeSrc.make"; \
 	echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(COMPILER).make"; \
--- a/hotspot/make/linux/makefiles/defs.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/linux/makefiles/defs.make	Tue Aug 05 12:14:11 2014 -0700
@@ -297,27 +297,23 @@
 endif
 
 # Serviceability Binaries
-# No SA Support for PPC, IA64, ARM or zero
-ADD_SA_BINARIES/x86   = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
-                        $(EXPORT_LIB_DIR)/sa-jdi.jar
-ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
-                        $(EXPORT_LIB_DIR)/sa-jdi.jar
+
+ADD_SA_BINARIES/DEFAULT = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
+                          $(EXPORT_LIB_DIR)/sa-jdi.jar
+
 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
   ifeq ($(ZIP_DEBUGINFO_FILES),1)
-    ADD_SA_BINARIES/x86   += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
-    ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
+    ADD_SA_BINARIES/DEFAULT += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
   else
-    ADD_SA_BINARIES/x86   += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
-    ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
+    ADD_SA_BINARIES/DEFAULT += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
   endif
 endif
-ADD_SA_BINARIES/ppc   =
-ADD_SA_BINARIES/ia64  =
-ADD_SA_BINARIES/arm   =
+
+ADD_SA_BINARIES/$(HS_ARCH) = $(ADD_SA_BINARIES/DEFAULT)
+
+# No SA Support for zero
 ADD_SA_BINARIES/zero  =
 
 -include $(HS_ALT_MAKE)/linux/makefiles/defs.make
 
 EXPORT_LIST += $(ADD_SA_BINARIES/$(HS_ARCH))
-
-
--- a/hotspot/make/linux/makefiles/jsig.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/linux/makefiles/jsig.make	Tue Aug 05 12:14:11 2014 -0700
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 # Rules to build signal interposition library, used by vm.make
@@ -39,8 +39,8 @@
 
 LIBJSIG_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jsig
 
-# On Linux we really dont want a mapfile, as this library is small 
-# and preloaded using LD_PRELOAD, making functions private will 
+# On Linux we really dont want a mapfile, as this library is small
+# and preloaded using LD_PRELOAD, making functions private will
 # cause problems with interposing. See CR: 6466665
 # LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE))
 
@@ -75,9 +75,9 @@
 install_jsig: $(LIBJSIG)
 	@echo "Copying $(LIBJSIG) to $(DEST_JSIG)"
 	$(QUIETLY) test ! -f $(LIBJSIG_DEBUGINFO) || \
-	    cp -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO)
+	    $(CP) -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO)
 	$(QUIETLY) test ! -f $(LIBJSIG_DIZ) || \
-	    cp -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ)
-	$(QUIETLY) cp -f $(LIBJSIG) $(DEST_JSIG) && echo "Done"
+	    $(CP) -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ)
+	$(QUIETLY) $(CP) -f $(LIBJSIG) $(DEST_JSIG) && echo "Done"
 
 .PHONY: install_jsig
--- a/hotspot/make/linux/makefiles/rules.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/linux/makefiles/rules.make	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 # Common rules/macros for the vm, adlc.
@@ -28,7 +28,7 @@
 .SUFFIXES: .cpp $(SUFFIXES)
 
 DEMANGLER       = c++filt
-DEMANGLE        = $(DEMANGLER) < $@ > .$@ && mv -f .$@ $@
+DEMANGLE        = $(DEMANGLER) < $@ > .$@ && $(MV) -f .$@ $@
 
 # $(CC) is the c compiler (cc/gcc), $(CXX) is the c++ compiler (CC/g++).
 CC_COMPILE       = $(CC) $(CXXFLAGS) $(CFLAGS)
--- a/hotspot/make/linux/makefiles/sa.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/linux/makefiles/sa.make	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 # This makefile (sa.make) is included from the sa.make in the
@@ -60,7 +60,7 @@
 # if $(AGENT_DIR) does not exist, we don't build SA
 # also, we don't build SA on Itanium or zero.
 
-all: 
+all:
 	if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" \
              -a "$(SRCARCH)" != "zero" ] ; then \
 	   $(MAKE) -f sa.make $(GENERATED)/sa-jdi.jar; \
@@ -99,11 +99,11 @@
 	$(QUIETLY) $(REMOTE) $(COMPILE.RMIC)  -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
 	$(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
 	$(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql/sa.js
-	$(QUIETLY) cp $(AGENT_SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql
+	$(QUIETLY) $(CP) $(AGENT_SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql
 	$(QUIETLY) mkdir -p $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources
 	$(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources/*
-	$(QUIETLY) cp $(AGENT_SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources/
-	$(QUIETLY) cp -r $(AGENT_SRC_DIR)/images/* $(SA_CLASSDIR)/
+	$(QUIETLY) $(CP) $(AGENT_SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources/
+	$(QUIETLY) $(CP) -r $(AGENT_SRC_DIR)/images/* $(SA_CLASSDIR)/
 	$(QUIETLY) $(REMOTE) $(RUN.JAR) cf $@ -C $(SA_CLASSDIR)/ .
 	$(QUIETLY) $(REMOTE) $(RUN.JAR) uf $@ -C $(AGENT_SRC_DIR) META-INF/services/com.sun.jdi.connect.Connector
 	$(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.x86.X86ThreadContext
--- a/hotspot/make/linux/makefiles/saproc.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/linux/makefiles/saproc.make	Tue Aug 05 12:14:11 2014 -0700
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 include $(GAMMADIR)/make/defs.make
 include $(GAMMADIR)/make/altsrc.make
@@ -116,10 +116,10 @@
 	$(QUIETLY) if [ -e $(LIBSAPROC) ] ; then                   \
 	  echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)";           \
 	  test ! -f $(LIBSAPROC_DEBUGINFO) ||                      \
-	    cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \
+	    $(CP) -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \
 	  test ! -f $(LIBSAPROC_DIZ) ||                            \
-	    cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ);             \
-	  cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done";        \
+	    $(CP) -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ);             \
+	  $(CP) -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done";        \
 	fi
 
 .PHONY: install_saproc
--- a/hotspot/make/linux/makefiles/top.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/linux/makefiles/top.make	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 # top.make is included in the Makefile in the build directories.
@@ -45,10 +45,10 @@
 GENERATED   = $(TOPDIR)/../generated
 VM          = $(GAMMADIR)/src/share/vm
 Plat_File   = $(Platform_file)
-CDG         = cd $(GENERATED); 
+CDG         = cd $(GENERATED);
 
 ifneq ($(USE_PRECOMPILED_HEADER),0)
-UpdatePCH = $(MAKE) -f vm.make $(PRECOMPILED_HEADER) $(MFLAGS) 
+UpdatePCH = $(MAKE) -f vm.make $(PRECOMPILED_HEADER) $(MFLAGS)
 else
 UpdatePCH = \# precompiled header is not used
 endif
@@ -84,7 +84,7 @@
 	@# We need a null action here, so implicit rules don't get consulted.
 
 $(Cached_plat): $(Plat_File)
-	$(CDG) cp $(Plat_File) $(Cached_plat)
+	$(CDG) $(CP) $(Plat_File) $(Cached_plat)
 
 # make AD files as necessary
 ad_stuff: $(Cached_plat) $(adjust-mflags)
@@ -128,12 +128,12 @@
 # next rules support "make foo.[ois]"
 
 %.o %.i %.s:
-	$(UpdatePCH) 
+	$(UpdatePCH)
 	$(MAKE) -f vm.make $(MFLAGS) $@
 	#$(MAKE) -f vm.make $@
 
 # this should force everything to be rebuilt
-clean: 
+clean:
 	rm -f $(GENERATED)/*.class
 	$(MAKE) -f vm.make $(MFLAGS) clean
 
--- a/hotspot/make/linux/makefiles/vm.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/linux/makefiles/vm.make	Tue Aug 05 12:14:11 2014 -0700
@@ -362,10 +362,10 @@
 install_jvm: $(LIBJVM)
 	@echo "Copying $(LIBJVM) to $(DEST_JVM)"
 	$(QUIETLY) test ! -f $(LIBJVM_DEBUGINFO) || \
-	    cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
+	    $(CP) -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
 	$(QUIETLY) test ! -f $(LIBJVM_DIZ) || \
-	    cp -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ)
-	$(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done"
+	    $(CP) -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ)
+	$(QUIETLY) $(CP) -f $(LIBJVM) $(DEST_JVM) && echo "Done"
 
 #----------------------------------------------------------------------
 # Other files
--- a/hotspot/make/solaris/makefiles/buildtree.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/solaris/makefiles/buildtree.make	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -265,6 +265,8 @@
 	echo; \
 	[ -n "$(SPEC)" ] && \
 	    echo "include $(SPEC)"; \
+	echo "CP ?= cp"; \
+	echo "MV ?= mv"; \
 	echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(VARIANT).make"; \
 	echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(COMPILER).make"; \
 	) > $@
--- a/hotspot/make/solaris/makefiles/jsig.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/solaris/makefiles/jsig.make	Tue Aug 05 12:14:11 2014 -0700
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 # Rules to build signal interposition library, used by vm.make
@@ -80,9 +80,9 @@
 install_jsig: $(LIBJSIG)
 	@echo "Copying $(LIBJSIG) to $(DEST_JSIG)"
 	$(QUIETLY) test ! -f $(LIBJSIG_DEBUGINFO) || \
-	    cp -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO)
+	    $(CP) -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO)
 	$(QUIETLY) test ! -f $(LIBJSIG_DIZ) || \
-	    cp -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ)
-	$(QUIETLY) cp -f $(LIBJSIG) $(DEST_JSIG) && echo "Done"
+	    $(CP) -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ)
+	$(QUIETLY) $(CP) -f $(LIBJSIG) $(DEST_JSIG) && echo "Done"
 
 .PHONY: install_jsig
--- a/hotspot/make/solaris/makefiles/rules.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/solaris/makefiles/rules.make	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 # Common rules/macros for the vm, adlc.
@@ -28,7 +28,7 @@
 .SUFFIXES: .cpp $(SUFFIXES)
 
 DEMANGLER       = c++filt
-DEMANGLE        = $(DEMANGLER) < $@ > .$@ && mv -f .$@ $@
+DEMANGLE        = $(DEMANGLER) < $@ > .$@ && $(MV) -f .$@ $@
 
 # $(CC) is the c compiler (cc/gcc), $(CXX) is the c++ compiler (CC/g++).
 CC_COMPILE       = $(CC) $(CXXFLAGS) $(CFLAGS)
--- a/hotspot/make/solaris/makefiles/sa.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/solaris/makefiles/sa.make	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 # This makefile (sa.make) is included from the sa.make in the
@@ -52,7 +52,7 @@
 SA_PROPERTIES = $(SA_CLASSDIR)/sa.properties
 
 # if $(AGENT_DIR) does not exist, we don't build SA.
-all: 
+all:
 	$(QUIETLY) if [ -d $(AGENT_DIR) ] ; then \
 	   $(MAKE) -f sa.make $(GENERATED)/sa-jdi.jar; \
 	fi
@@ -90,11 +90,11 @@
 	$(QUIETLY) $(COMPILE.RMIC)  -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
 	$(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
 	$(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql/sa.js
-	$(QUIETLY) cp $(AGENT_SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql
+	$(QUIETLY) $(CP) $(AGENT_SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql
 	$(QUIETLY) mkdir -p $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources
 	$(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources/*
-	$(QUIETLY) cp $(AGENT_SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources/
-	$(QUIETLY) cp -r $(AGENT_SRC_DIR)/images/* $(SA_CLASSDIR)/
+	$(QUIETLY) $(CP) $(AGENT_SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources/
+	$(QUIETLY) $(CP) -r $(AGENT_SRC_DIR)/images/* $(SA_CLASSDIR)/
 	$(QUIETLY) $(RUN.JAR) cf $@ -C $(SA_CLASSDIR)/ .
 	$(QUIETLY) $(RUN.JAR) uf $@ -C $(AGENT_SRC_DIR) META-INF/services/com.sun.jdi.connect.Connector
 	$(QUIETLY) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal
--- a/hotspot/make/solaris/makefiles/saproc.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/solaris/makefiles/saproc.make	Tue Aug 05 12:14:11 2014 -0700
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 # Rules to build serviceability agent library, used by vm.make
@@ -119,7 +119,7 @@
 	           $(SOLARIS_11_B159_OR_LATER)                          \
 	           $(SADISSRCFILES)                                     \
 	           -c -o $(SADISOBJ)
-	
+
 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
 # Clear the SHF_ALLOC flag (if set) from empty section headers.
@@ -150,10 +150,10 @@
 	$(QUIETLY) if [ -f $(LIBSAPROC) ] ; then                   \
 	  echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)";           \
 	  test ! -f $(LIBSAPROC_DEBUGINFO) ||                      \
-	    cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \
+	    $(CP) -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \
 	  test ! -f $(LIBSAPROC_DIZ) ||                            \
-	    cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ);             \
-	  cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done";        \
+	    $(CP) -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ);             \
+	  $(CP) -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done";        \
 	fi
 
 .PHONY: install_saproc
--- a/hotspot/make/solaris/makefiles/top.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/solaris/makefiles/top.make	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 # top.make is included in the Makefile in the build directories.
@@ -44,7 +44,7 @@
 GENERATED   = ../generated
 VM          = $(GAMMADIR)/src/share/vm
 Plat_File   = $(Platform_file)
-CDG         = cd $(GENERATED); 
+CDG         = cd $(GENERATED);
 
 Cached_plat = $(GENERATED)/platform.current
 
@@ -77,7 +77,7 @@
 	@# We need a null action here, so implicit rules don't get consulted.
 
 $(Cached_plat): $(Plat_File)
-	$(CDG) cp $(Plat_File) $(Cached_plat)
+	$(CDG) $(CP) $(Plat_File) $(Cached_plat)
 
 # make AD files as necessary
 ad_stuff: $(Cached_plat) $(adjust-mflags)
@@ -87,7 +87,7 @@
 jvmti_stuff: $(Cached_plat) $(adjust-mflags)
 	@$(MAKE) -f jvmti.make $(MFLAGS-adjusted)
 
-# generate trace files 
+# generate trace files
 trace_stuff: jvmti_stuff $(Cached_plat) $(adjust-mflags)
 	@$(MAKE) -f trace.make $(MFLAGS-adjusted)
 
@@ -124,7 +124,7 @@
 	#$(MAKE) -f vm.make $@
 
 # this should force everything to be rebuilt
-clean: 
+clean:
 	rm -f $(GENERATED)/*.class
 	$(MAKE) -f vm.make $(MFLAGS) clean
 
--- a/hotspot/make/solaris/makefiles/vm.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/solaris/makefiles/vm.make	Tue Aug 05 12:14:11 2014 -0700
@@ -336,10 +336,10 @@
 install_jvm: $(LIBJVM)
 	@echo "Copying $(LIBJVM) to $(DEST_JVM)"
 	$(QUIETLY) test ! -f $(LIBJVM_DEBUGINFO) || \
-	    cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
+	    $(CP) -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
 	$(QUIETLY) test ! -f $(LIBJVM_DIZ) || \
-	    cp -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ)
-	$(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done"
+	    $(CP) -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ)
+	$(QUIETLY) $(CP) -f $(LIBJVM) $(DEST_JVM) && echo "Done"
 
 #----------------------------------------------------------------------
 # Other files
--- a/hotspot/make/windows/build.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/windows/build.make	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -300,6 +300,8 @@
 	@ if "$(ENABLE_FULL_DEBUG_SYMBOLS)" NEQ "" echo ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) >> $@
 	@ if "$(ZIP_DEBUGINFO_FILES)" NEQ "" echo ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) >> $@
 	@ if "$(RM)" NEQ "" echo RM=$(RM)                       >> $@
+	@ if "$(CP)" NEQ "" echo CP=$(CP)                       >> $@
+	@ if "$(MV)" NEQ "" echo MV=$(MV)                       >> $@
 	@ if "$(ZIPEXE)" NEQ "" echo ZIPEXE=$(ZIPEXE)           >> $@
 
 checks: checkVariant checkWorkSpace checkSA
--- a/hotspot/make/windows/makefiles/defs.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/windows/makefiles/defs.make	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -156,6 +156,9 @@
 
 MAKE_ARGS += RM="$(RM)"
 MAKE_ARGS += ZIPEXE=$(ZIPEXE)
+MAKE_ARGS += CP="${CP}"
+MAKE_ARGS += MV="${MV}"
+
 
 # On 32 bit windows we build server and client, on 64 bit just server.
 ifeq ($(JVM_VARIANTS),)
--- a/hotspot/make/windows/makefiles/sa.make	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/make/windows/makefiles/sa.make	Tue Aug 05 12:14:11 2014 -0700
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 # This makefile is used to build Serviceability Agent code
@@ -76,16 +76,16 @@
 	$(COMPILE_RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
 	$(QUIETLY) echo $(SA_BUILD_VERSION_PROP)> $(SA_PROPERTIES)
 	$(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql/sa.js
-	$(QUIETLY) cp $(AGENT_SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql
+	$(QUIETLY) $(CP) $(AGENT_SRC_DIR)/sun/jvm/hotspot/utilities/soql/sa.js $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql
 	$(QUIETLY) rm -rf $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources
 	$(QUIETLY) mkdir $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources
-	$(QUIETLY) cp $(AGENT_SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources
-	$(QUIETLY) cp -r $(AGENT_SRC_DIR)/images/* $(SA_CLASSDIR)
+	$(QUIETLY) $(CP) $(AGENT_SRC_DIR)/sun/jvm/hotspot/ui/resources/*.png $(SA_CLASSDIR)/sun/jvm/hotspot/ui/resources
+	$(QUIETLY) $(CP) -r $(AGENT_SRC_DIR)/images/* $(SA_CLASSDIR)
 	$(RUN_JAR) cf $@ -C $(SA_CLASSDIR) .
 	$(RUN_JAR) uf $@ -C $(AGENT_SRC_DIR) META-INF/services/com.sun.jdi.connect.Connector
 	$(RUN_JAVAH) -classpath $(SA_CLASSDIR) -jni sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal
-	$(RUN_JAVAH) -classpath $(SA_CLASSDIR) -jni sun.jvm.hotspot.debugger.x86.X86ThreadContext 
-	$(RUN_JAVAH) -classpath $(SA_CLASSDIR) -jni sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext 
+	$(RUN_JAVAH) -classpath $(SA_CLASSDIR) -jni sun.jvm.hotspot.debugger.x86.X86ThreadContext
+	$(RUN_JAVAH) -classpath $(SA_CLASSDIR) -jni sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext
 	$(RUN_JAVAH) -classpath $(SA_CLASSDIR) -jni sun.jvm.hotspot.asm.Disassembler
 
 
@@ -105,7 +105,7 @@
 !elseif "$(BUILDARCH)" == "amd64"
 SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 $(GX_OPTION) -Od -D "WIN32" -D "WIN64" -D "_WINDOWS" -D "_DEBUG" -D "_CONSOLE" -D "_MBCS" -FD -c
 !else
-SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 $(GX_OPTION) -Od -D "WIN32" -D "_WINDOWS" -D "_DEBUG" -D "_CONSOLE" -D "_MBCS" -FD -RTC1 -c 
+SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 $(GX_OPTION) -Od -D "WIN32" -D "_WINDOWS" -D "_DEBUG" -D "_CONSOLE" -D "_MBCS" -FD -RTC1 -c
 !if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1"
 SA_CFLAGS = $(SA_CFLAGS) -ZI
 !endif
@@ -116,7 +116,7 @@
 
 SASRCFILES = $(AGENT_DIR)/src/os/win32/windbg/sawindbg.cpp \
 		$(AGENT_DIR)/src/share/native/sadis.c
-		            
+
 SA_LFLAGS = $(SA_LD_FLAGS) -nologo -subsystem:console -machine:$(MACHINE)
 !if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1"
 SA_LFLAGS = $(SA_LFLAGS) -map -debug
@@ -136,7 +136,7 @@
 $(SAWINDBG): $(SASRCFILES)
 	set INCLUDE=$(SA_INCLUDE)$(INCLUDE)
 	$(CXX) @<<
-	  -I"$(BootStrapDir)/include" -I"$(BootStrapDir)/include/win32" 
+	  -I"$(BootStrapDir)/include" -I"$(BootStrapDir)/include/win32"
 	  -I"$(GENERATED)" $(SA_CFLAGS)
 	  $(SASRCFILES)
 	  -out:$*.obj
--- a/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -251,6 +251,49 @@
   // buf is started with ", " or is empty
   _features_str = strdup(strlen(buf) > 2 ? buf + 2 : buf);
 
+  // There are three 64-bit SPARC families that do not overlap, e.g.,
+  // both is_ultra3() and is_sparc64() cannot be true at the same time.
+  // Within these families, there can be more than one chip, e.g.,
+  // is_T4() and is_T7() machines are also is_niagara().
+  if (is_ultra3()) {
+    assert(_L1_data_cache_line_size == 0, "overlap with Ultra3 family");
+    // Ref: UltraSPARC III Cu Processor
+    _L1_data_cache_line_size = 64;
+  }
+  if (is_niagara()) {
+    assert(_L1_data_cache_line_size == 0, "overlap with niagara family");
+    // All Niagara's are sun4v's, but not all sun4v's are Niagaras, e.g.,
+    // Fujitsu SPARC64 is sun4v, but we don't want it in this block.
+    //
+    // Ref: UltraSPARC T1 Supplement to the UltraSPARC Architecture 2005
+    // Appendix F.1.3.1 Cacheable Accesses
+    // -> 16-byte L1 cache line size
+    //
+    // Ref: UltraSPARC T2: A Highly-Threaded, Power-Efficient, SPARC SOC
+    // Section III: SPARC Processor Core
+    // -> 16-byte L1 cache line size
+    //
+    // Ref: Oracle's SPARC T4-1, SPARC T4-2, SPARC T4-4, and SPARC T4-1B Server Architecture
+    // Section SPARC T4 Processor Cache Architecture
+    // -> 32-byte L1 cache line size (no longer see that info on this ref)
+    //
+    // XXX - still need a T7 reference here
+    //
+    if (is_T7()) {  // T7 or newer
+      _L1_data_cache_line_size = 64;
+    } else if (is_T4()) {  // T4 or newer (until T7)
+      _L1_data_cache_line_size = 32;
+    } else {  // T1 or newer (until T4)
+      _L1_data_cache_line_size = 16;
+    }
+  }
+  if (is_sparc64()) {
+    guarantee(_L1_data_cache_line_size == 0, "overlap with SPARC64 family");
+    // Ref: Fujitsu SPARC64 VII Processor
+    // Section 4 Cache System
+    _L1_data_cache_line_size = 64;
+  }
+
   // UseVIS is set to the smallest of what hardware supports and what
   // the command line requires.  I.e., you cannot set UseVIS to 3 on
   // older UltraSparc which do not support it.
@@ -356,6 +399,7 @@
 
 #ifndef PRODUCT
   if (PrintMiscellaneous && Verbose) {
+    tty->print_cr("L1 data cache line size: %u", L1_data_cache_line_size());
     tty->print("Allocation");
     if (AllocatePrefetchStyle <= 0) {
       tty->print_cr(": no prefetching");
--- a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -394,6 +394,8 @@
   _stepping = 0;
   _cpuFeatures = 0;
   _logical_processors_per_package = 1;
+  // i486 internal cache is both I&D and has a 16-byte line size
+  _L1_data_cache_line_size = 16;
 
   if (!Use486InstrsOnly) {
     // Get raw processor info
@@ -412,6 +414,7 @@
       // Logical processors are only available on P4s and above,
       // and only if hyperthreading is available.
       _logical_processors_per_package = logical_processor_count();
+      _L1_data_cache_line_size = L1_line_size();
     }
   }
 
@@ -924,6 +927,7 @@
   if (PrintMiscellaneous && Verbose) {
     tty->print_cr("Logical CPUs per core: %u",
                   logical_processors_per_package());
+    tty->print_cr("L1 data cache line size: %u", L1_data_cache_line_size());
     tty->print("UseSSE=%d", (int) UseSSE);
     if (UseAVX > 0) {
       tty->print("  UseAVX=%d", (int) UseAVX);
--- a/hotspot/src/cpu/x86/vm/vm_version_x86.hpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86.hpp	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -581,7 +581,7 @@
     return result;
   }
 
-  static intx prefetch_data_size()  {
+  static intx L1_line_size()  {
     intx result = 0;
     if (is_intel()) {
       result = (_cpuid_info.dcp_cpuid4_ebx.bits.L1_line_size + 1);
@@ -593,6 +593,10 @@
     return result;
   }
 
+  static intx prefetch_data_size()  {
+    return L1_line_size();
+  }
+
   //
   // Feature identification
   //
--- a/hotspot/src/share/tools/LogCompilation/src/com/sun/hotspot/tools/compiler/LogParser.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/tools/LogCompilation/src/com/sun/hotspot/tools/compiler/LogParser.java	Tue Aug 05 12:14:11 2014 -0700
@@ -478,9 +478,17 @@
                 } else if (scopes.peek().getCalls().size() > 2 && m == scopes.peek().last(-2).getMethod()) {
                     scopes.push(scopes.peek().last(-2));
                 } else {
-                    System.out.println(site.getMethod());
-                    System.out.println(m);
-                    throw new InternalError("call site and parse don't match");
+                    // C1 prints multiple method tags during inlining when it narrows method being inlinied.
+                    // Example:
+                    //   ...
+                    //   <method id="813" holder="694" name="toString" return="695" flags="1" bytes="36" iicount="1"/>
+                    //   <call method="813" instr="invokevirtual"/>
+                    //   <inline_success reason="receiver is statically known"/>
+                    //   <method id="814" holder="792" name="toString" return="695" flags="1" bytes="5" iicount="3"/>
+                    //   <parse method="814">
+                    //   ...
+                    site.setMethod(m);
+                    scopes.push(site);
                 }
             }
         } else if (qname.equals("parse_done")) {
--- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -1573,6 +1573,7 @@
         default:
           constant = new Constant(as_ValueType(field_val));
         }
+        // Stable static fields are checked for non-default values in ciField::initialize_from().
       }
       if (constant != NULL) {
         push(type, append(constant));
@@ -1614,6 +1615,10 @@
             default:
               constant = new Constant(as_ValueType(field_val));
             }
+            if (FoldStableValues && field->is_stable() && field_val.is_null_or_zero()) {
+              // Stable field with default value can't be constant.
+              constant = NULL;
+            }
           } else {
             // For CallSite objects treat the target field as a compile time constant.
             if (const_oop->is_call_site()) {
@@ -3959,10 +3964,15 @@
   // Clear out bytecode stream
   scope_data()->set_stream(NULL);
 
+  CompileLog* log = compilation()->log();
+  if (log != NULL) log->head("parse method='%d'", log->identify(callee));
+
   // Ready to resume parsing in callee (either in the same block we
   // were in before or in the callee's start block)
   iterate_all_blocks(callee_start_block == NULL);
 
+  if (log != NULL) log->done("parse");
+
   // If we bailed out during parsing, return immediately (this is bad news)
   if (bailed_out())
       return false;
--- a/hotspot/src/share/vm/ci/ciEnv.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/ci/ciEnv.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -1125,9 +1125,6 @@
 // ------------------------------------------------------------------
 // ciEnv::record_failure()
 void ciEnv::record_failure(const char* reason) {
-  if (log() != NULL) {
-    log()->elem("failure reason='%s'", reason);
-  }
   if (_failure_reason == NULL) {
     // Record the first failure reason.
     _failure_reason = reason;
--- a/hotspot/src/share/vm/classfile/classLoaderData.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/classfile/classLoaderData.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -777,11 +777,22 @@
   // unneeded entries.
   bool has_redefined_a_class = JvmtiExport::has_redefined_a_class();
   MetadataOnStackMark md_on_stack;
+  if (has_redefined_a_class) {
+    // purge_previous_versions also cleans weak method links. Because
+    // one method's MDO can reference another method from another
+    // class loader, we need to first clean weak method links for all
+    // class loaders here. Below, we can then free redefined methods
+    // for all class loaders.
+    while (data != NULL) {
+      if (data->is_alive(is_alive_closure)) {
+        data->classes_do(InstanceKlass::purge_previous_versions);
+      }
+      data = data->next();
+    }
+  }
+  data = _head;
   while (data != NULL) {
     if (data->is_alive(is_alive_closure)) {
-      if (has_redefined_a_class) {
-        data->classes_do(InstanceKlass::purge_previous_versions);
-      }
       data->free_deallocate_list();
       prev = data;
       data = data->next();
--- a/hotspot/src/share/vm/classfile/javaClasses.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/classfile/javaClasses.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -1239,6 +1239,16 @@
 }
 
 
+// Return Symbol for detailed_message or NULL
+Symbol* java_lang_Throwable::detail_message(oop throwable) {
+  PRESERVE_EXCEPTION_MARK;  // Keep original exception
+  oop detailed_message = java_lang_Throwable::message(throwable);
+  if (detailed_message != NULL) {
+    return java_lang_String::as_symbol(detailed_message, THREAD);
+  }
+  return NULL;
+}
+
 void java_lang_Throwable::set_message(oop throwable, oop value) {
   throwable->obj_field_put(detailMessage_offset, value);
 }
--- a/hotspot/src/share/vm/classfile/javaClasses.hpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/classfile/javaClasses.hpp	Tue Aug 05 12:14:11 2014 -0700
@@ -520,6 +520,7 @@
   static oop message(oop throwable);
   static oop message(Handle throwable);
   static void set_message(oop throwable, oop value);
+  static Symbol* detail_message(oop throwable);
   static void print_stack_element(outputStream *st, Handle mirror, int method,
                                   int version, int bci);
   static void print_stack_element(outputStream *st, methodHandle method, int bci);
--- a/hotspot/src/share/vm/compiler/compileBroker.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/compiler/compileBroker.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -297,6 +297,7 @@
   _hot_count = hot_count;
   _time_queued = 0;  // tidy
   _comment = comment;
+  _failure_reason = NULL;
 
   if (LogCompilation) {
     _time_queued = os::elapsed_counter();
@@ -566,6 +567,11 @@
   methodHandle method(thread, this->method());
   ResourceMark rm(thread);
 
+  if (!_is_success) {
+    const char* reason = _failure_reason != NULL ? _failure_reason : "unknown";
+    log->elem("failure reason='%s'", reason);
+  }
+
   // <task_done ... stamp='1.234'>  </task>
   nmethod* nm = code();
   log->begin_elem("task_done success='%d' nmsize='%d' count='%d'",
@@ -733,6 +739,7 @@
       for (CompileTask* task = head; task != NULL; ) {
         CompileTask* next_task = task->next();
         CompileTaskWrapper ctw(task); // Frees the task
+        task->set_failure_reason("stale task");
         task = next_task;
       }
     }
@@ -1786,6 +1793,7 @@
       } else {
         // After compilation is disabled, remove remaining methods from queue
         method->clear_queued_for_compilation();
+        task->set_failure_reason("compilation is disabled");
       }
     }
   }
@@ -1973,6 +1981,7 @@
     compilable = ci_env.compilable();
 
     if (ci_env.failing()) {
+      task->set_failure_reason(ci_env.failure_reason());
       const char* retry_message = ci_env.retry_message();
       if (_compilation_log != NULL) {
         _compilation_log->log_failure(thread, task, ci_env.failure_reason(), retry_message);
--- a/hotspot/src/share/vm/compiler/compileBroker.hpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/compiler/compileBroker.hpp	Tue Aug 05 12:14:11 2014 -0700
@@ -64,6 +64,7 @@
   jobject      _hot_method_holder;
   int          _hot_count;    // information about its invocation counter
   const char*  _comment;      // more info about the task
+  const char*  _failure_reason;
 
  public:
   CompileTask() {
@@ -138,6 +139,10 @@
   void         log_task_queued();
   void         log_task_start(CompileLog* log);
   void         log_task_done(CompileLog* log);
+
+  void         set_failure_reason(const char* reason) {
+    _failure_reason = reason;
+  }
 };
 
 // CompilerCounters
--- a/hotspot/src/share/vm/gc_implementation/shared/vmGCOperations.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/gc_implementation/shared/vmGCOperations.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -197,28 +197,29 @@
 
 bool VM_CollectForMetadataAllocation::initiate_concurrent_GC() {
 #if INCLUDE_ALL_GCS
-  if (UseConcMarkSweepGC || UseG1GC) {
-    if (UseConcMarkSweepGC && CMSClassUnloadingEnabled) {
-      MetaspaceGC::set_should_concurrent_collect(true);
-    } else if (UseG1GC) {
-      G1CollectedHeap* g1h = G1CollectedHeap::heap();
-      g1h->g1_policy()->set_initiate_conc_mark_if_possible();
+  if (UseConcMarkSweepGC && CMSClassUnloadingEnabled) {
+    MetaspaceGC::set_should_concurrent_collect(true);
+    return true;
+  }
 
-      GCCauseSetter x(g1h, _gc_cause);
+  if (UseG1GC) {
+    G1CollectedHeap* g1h = G1CollectedHeap::heap();
+    g1h->g1_policy()->set_initiate_conc_mark_if_possible();
 
-      // At this point we are supposed to start a concurrent cycle. We
-      // will do so if one is not already in progress.
-      bool should_start = g1h->g1_policy()->force_initial_mark_if_outside_cycle(_gc_cause);
+    GCCauseSetter x(g1h, _gc_cause);
 
-      if (should_start) {
-        double pause_target = g1h->g1_policy()->max_pause_time_ms();
-        g1h->do_collection_pause_at_safepoint(pause_target);
-      }
+    // At this point we are supposed to start a concurrent cycle. We
+    // will do so if one is not already in progress.
+    bool should_start = g1h->g1_policy()->force_initial_mark_if_outside_cycle(_gc_cause);
+
+    if (should_start) {
+      double pause_target = g1h->g1_policy()->max_pause_time_ms();
+      g1h->do_collection_pause_at_safepoint(pause_target);
     }
-
     return true;
   }
 #endif
+
   return false;
 }
 
--- a/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -430,9 +430,18 @@
 
     // tracing
     if (TraceExceptions) {
-      ttyLocker ttyl;
       ResourceMark rm(thread);
-      tty->print_cr("Exception <%s> (" INTPTR_FORMAT ")", h_exception->print_value_string(), (address)h_exception());
+      Symbol* message = java_lang_Throwable::detail_message(h_exception());
+      ttyLocker ttyl;  // Lock after getting the detail message
+      if (message != NULL) {
+        tty->print_cr("Exception <%s: %s> (" INTPTR_FORMAT ")",
+                      h_exception->print_value_string(), message->as_C_string(),
+                      (address)h_exception());
+      } else {
+        tty->print_cr("Exception <%s> (" INTPTR_FORMAT ")",
+                      h_exception->print_value_string(),
+                      (address)h_exception());
+      }
       tty->print_cr(" thrown in interpreter method <%s>", h_method->print_value_string());
       tty->print_cr(" at bci %d for thread " INTPTR_FORMAT, current_bci, thread);
     }
--- a/hotspot/src/share/vm/interpreter/oopMapCache.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/interpreter/oopMapCache.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -244,10 +244,8 @@
   method()->print_value();
   tty->print(" @ %d = [%d] { ", bci(), n);
   for (int i = 0; i < n; i++) {
-#ifdef ENABLE_ZAP_DEAD_LOCALS
     if (is_dead(i)) tty->print("%d+ ", i);
     else
-#endif
     if (is_oop(i)) tty->print("%d ", i);
   }
   tty->print_cr("}");
@@ -402,13 +400,11 @@
       value |= (mask << oop_bit_number );
     }
 
-  #ifdef ENABLE_ZAP_DEAD_LOCALS
     // set dead bit
     if (!cell->is_live()) {
       value |= (mask << dead_bit_number);
       assert(!cell->is_reference(), "dead value marked as oop");
     }
-  #endif
   }
 
   // make sure last word is stored
--- a/hotspot/src/share/vm/interpreter/oopMapCache.hpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/interpreter/oopMapCache.hpp	Tue Aug 05 12:14:11 2014 -0700
@@ -66,19 +66,15 @@
 
  public:
   enum {
-    N                = 2,                // the number of words reserved
+    N                = 4,                // the number of words reserved
                                          // for inlined mask storage
     small_mask_limit = N * BitsPerWord,  // the maximum number of bits
                                          // available for small masks,
                                          // small_mask_limit can be set to 0
                                          // for testing bit_mask allocation
 
-#ifdef ENABLE_ZAP_DEAD_LOCALS
     bits_per_entry   = 2,
     dead_bit_number  = 1,
-#else
-    bits_per_entry   = 1,
-#endif
     oop_bit_number   = 0
   };
 
@@ -119,10 +115,6 @@
 
   void set_expression_stack_size(int sz)         { _expression_stack_size = sz; }
 
-#ifdef ENABLE_ZAP_DEAD_LOCALS
-  bool is_dead(int offset) const                 { return (entry_at(offset) & (1 << dead_bit_number)) != 0; }
-#endif
-
   // Lookup
   bool match(methodHandle method, int bci) const { return _method == method() && _bci == bci; }
   bool is_empty() const;
@@ -144,6 +136,7 @@
   void print() const;
 
   int number_of_entries() const                  { return mask_size() / bits_per_entry; }
+  bool is_dead(int offset) const                 { return (entry_at(offset) & (1 << dead_bit_number)) != 0; }
   bool is_oop (int offset) const                 { return (entry_at(offset) & (1 << oop_bit_number )) != 0; }
 
   int expression_stack_size() const              { return _expression_stack_size; }
--- a/hotspot/src/share/vm/oops/constantPool.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/oops/constantPool.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -520,13 +520,9 @@
 
 Symbol* ConstantPool::exception_message(constantPoolHandle this_cp, int which, constantTag tag, oop pending_exception) {
   // Dig out the detailed message to reuse if possible
-  Symbol* message = NULL;
-  oop detailed_message = java_lang_Throwable::message(pending_exception);
-  if (detailed_message != NULL) {
-     message = java_lang_String::as_symbol_or_null(detailed_message);
-     if (message != NULL) {
-       return message;
-     }
+  Symbol* message = java_lang_Throwable::detail_message(pending_exception);
+  if (message != NULL) {
+    return message;
   }
 
   // Return specific message for the tag
--- a/hotspot/src/share/vm/oops/method.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/oops/method.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -729,8 +729,8 @@
   }
   if ((TraceDeoptimization || LogCompilation) && (xtty != NULL)) {
     ttyLocker ttyl;
-    xtty->begin_elem("make_not_%scompilable thread='" UINTX_FORMAT "'",
-                     is_osr ? "osr_" : "", os::current_thread_id());
+    xtty->begin_elem("make_not_compilable thread='" UINTX_FORMAT "' osr='%d' level='%d'",
+                     os::current_thread_id(), is_osr, comp_level);
     if (reason != NULL) {
       xtty->print(" reason=\'%s\'", reason);
     }
--- a/hotspot/src/share/vm/oops/methodData.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/oops/methodData.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -1556,7 +1556,7 @@
 public:
   CleanExtraDataMethodClosure() {}
   bool is_live(Method* m) {
-    return m->on_stack();
+    return !m->is_old() || m->on_stack();
   }
 };
 
--- a/hotspot/src/share/vm/opto/bytecodeInfo.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/opto/bytecodeInfo.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -107,7 +107,7 @@
                                int caller_bci, ciCallProfile& profile,
                                WarmCallInfo* wci_result) {
   // Allows targeted inlining
-  if(callee_method->should_inline()) {
+  if (callee_method->should_inline()) {
     *wci_result = *(WarmCallInfo::always_hot());
     if (C->print_inlining() && Verbose) {
       CompileTask::print_inline_indent(inline_level());
@@ -118,6 +118,12 @@
     return true;
   }
 
+  if (callee_method->force_inline()) {
+      set_msg("force inline by annotation");
+      _forced_inline = true;
+      return true;
+  }
+
 #ifndef PRODUCT
   int inline_depth = inline_level()+1;
   if (ciReplay::should_inline(C->replay_inline_data(), callee_method, caller_bci, inline_depth)) {
@@ -244,6 +250,11 @@
   }
 #endif
 
+  if (callee_method->force_inline()) {
+    set_msg("force inline by annotation");
+    return false;
+  }
+
   // Now perform checks which are heuristic
 
   if (is_unboxing_method(callee_method, C)) {
@@ -251,12 +262,10 @@
     return false;
   }
 
-  if (!callee_method->force_inline()) {
-    if (callee_method->has_compiled_code() &&
-        callee_method->instructions_size() > InlineSmallCode) {
-      set_msg("already compiled into a big method");
-      return true;
-    }
+  if (callee_method->has_compiled_code() &&
+      callee_method->instructions_size() > InlineSmallCode) {
+    set_msg("already compiled into a big method");
+    return true;
   }
 
   // don't inline exception code unless the top method belongs to an
@@ -349,7 +358,7 @@
       // Escape Analysis stress testing when running Xcomp or CTW:
       // inline constructors even if they are not reached.
     } else if (forced_inline()) {
-      // Inlining was forced by CompilerOracle or ciReplay
+      // Inlining was forced by CompilerOracle, ciReplay or annotation
     } else if (profile.count() == 0) {
       // don't inline unreached call sites
        set_msg("call site not reached");
--- a/hotspot/src/share/vm/opto/machnode.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/opto/machnode.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -639,7 +639,6 @@
 }
 #endif
 
-
 bool MachCallNode::return_value_is_used() const {
   if (tf()->range()->cnt() == TypeFunc::Parms) {
     // void return
@@ -657,6 +656,14 @@
   return false;
 }
 
+// Similar to cousin class CallNode::returns_pointer
+// Because this is used in deoptimization, we want the type info, not the data
+// flow info; the interpreter will "use" things that are dead to the optimizer.
+bool MachCallNode::returns_pointer() const {
+  const TypeTuple *r = tf()->range();
+  return (r->cnt() > TypeFunc::Parms &&
+          r->field_at(TypeFunc::Parms)->isa_ptr());
+}
 
 //------------------------------Registers--------------------------------------
 const RegMask &MachCallNode::in_RegMask(uint idx) const {
--- a/hotspot/src/share/vm/opto/machnode.hpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/opto/machnode.hpp	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -842,6 +842,10 @@
 
   bool returns_long() const { return tf()->return_type() == T_LONG; }
   bool return_value_is_used() const;
+
+  // Similar to cousin class CallNode::returns_pointer
+  bool returns_pointer() const;
+
 #ifndef PRODUCT
   virtual void dump_spec(outputStream *st) const;
 #endif
--- a/hotspot/src/share/vm/opto/output.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/opto/output.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -854,8 +854,7 @@
     }
 
     // Check if a call returns an object.
-    if (mcall->return_value_is_used() &&
-        mcall->tf()->range()->field_at(TypeFunc::Parms)->isa_ptr()) {
+    if (mcall->returns_pointer()) {
       return_oop = true;
     }
     safepoint_pc_offset += mcall->ret_addr_offset();
--- a/hotspot/src/share/vm/opto/parse.hpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/opto/parse.hpp	Tue Aug 05 12:14:11 2014 -0700
@@ -142,7 +142,7 @@
 
   void print_value_on(outputStream* st) const PRODUCT_RETURN;
 
-  bool        _forced_inline;     // Inlining was forced by CompilerOracle or ciReplay
+  bool        _forced_inline;     // Inlining was forced by CompilerOracle, ciReplay or annotation
   bool        forced_inline()     const { return _forced_inline; }
   // Count number of nodes in this subtree
   int         count() const;
--- a/hotspot/src/share/vm/opto/replacednodes.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/opto/replacednodes.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -185,11 +185,11 @@
 
 void ReplacedNodes::dump(outputStream *st) const {
   if (!is_empty()) {
-    tty->print("replaced nodes: ");
+    st->print("replaced nodes: ");
     for (int i = 0; i < _replaced_nodes->length(); i++) {
-      tty->print("%d->%d", _replaced_nodes->at(i).initial()->_idx, _replaced_nodes->at(i).improved()->_idx);
+      st->print("%d->%d", _replaced_nodes->at(i).initial()->_idx, _replaced_nodes->at(i).improved()->_idx);
       if (i < _replaced_nodes->length()-1) {
-        tty->print(",");
+        st->print(",");
       }
     }
   }
--- a/hotspot/src/share/vm/prims/jni.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/prims/jni.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -247,15 +247,6 @@
       "Bug in native code: jfieldID offset must address interior of object");
 }
 
-// Pick a reasonable higher bound for local capacity requested
-// for EnsureLocalCapacity and PushLocalFrame.  We don't want it too
-// high because a test (or very unusual application) may try to allocate
-// that many handles and run out of swap space.  An implementation is
-// permitted to allocate more handles than the ensured capacity, so this
-// value is set high enough to prevent compatibility problems.
-const int MAX_REASONABLE_LOCAL_CAPACITY = 4*K;
-
-
 // Wrapper to trace JNI functions
 
 #ifdef ASSERT
@@ -741,7 +732,8 @@
   HOTSPOT_JNI_PUSHLOCALFRAME_ENTRY(env, capacity);
 
   //%note jni_11
-  if (capacity < 0 || capacity > MAX_REASONABLE_LOCAL_CAPACITY) {
+  if (capacity < 0 ||
+      ((MaxJNILocalCapacity > 0) && (capacity > MaxJNILocalCapacity))) {
     HOTSPOT_JNI_PUSHLOCALFRAME_RETURN((uint32_t)JNI_ERR);
     return JNI_ERR;
   }
@@ -844,7 +836,8 @@
   HOTSPOT_JNI_ENSURELOCALCAPACITY_ENTRY(env, capacity);
 
   jint ret;
-  if (capacity >= 0 && capacity <= MAX_REASONABLE_LOCAL_CAPACITY) {
+  if (capacity >= 0 &&
+      ((MaxJNILocalCapacity <= 0) || (capacity <= MaxJNILocalCapacity))) {
     ret = JNI_OK;
   } else {
     ret = JNI_ERR;
@@ -3893,6 +3886,7 @@
     run_unit_test(TestKlass_test());
     run_unit_test(TestBitMap_test());
     run_unit_test(TestAsUtf8());
+    run_unit_test(ObjectMonitor::sanity_checks());
 #if INCLUDE_VM_STRUCTS
     run_unit_test(VMStructs::test());
 #endif
--- a/hotspot/src/share/vm/prims/jniCheck.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/prims/jniCheck.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -185,6 +185,9 @@
  * throw an ArrayIndexOutOfBoundsException or ArrayStoreException.
  *
  * In all other cases, a non-error return value guarantees that no exceptions have been thrown.
+ *
+ * Programmers often defend against ArrayIndexOutOfBoundsException, so warning
+ * for these functions would be pedantic.
  */
 static inline void
 check_pending_exception(JavaThread* thr) {
@@ -201,6 +204,16 @@
   }
 }
 
+/**
+ * Add to the planned number of handles. I.e. plus current live & warning threshold
+ */
+static inline void
+add_planned_handle_capacity(JNIHandleBlock* handles, size_t capacity) {
+  handles->set_planned_capacity(capacity +
+                                handles->get_number_of_live_handles() +
+                                CHECK_JNI_LOCAL_REF_CAP_WARN_THRESHOLD);
+}
+
 
 static inline void
 functionEnterCritical(JavaThread* thr)
@@ -243,7 +256,7 @@
       thr->print_stack();
     )
     // Complain just the once, reset to current + warn threshold
-    handles->set_planned_capacity(live_handles + CHECK_JNI_LOCAL_REF_CAP_WARN_THRESHOLD);
+    add_planned_handle_capacity(handles, 0);
   }
 }
 
@@ -720,7 +733,7 @@
       NativeReportJNIFatalError(thr, "negative capacity");
     jint result = UNCHECKED()->PushLocalFrame(env, capacity);
     if (result == JNI_OK) {
-      thr->active_handles()->set_planned_capacity(capacity + CHECK_JNI_LOCAL_REF_CAP_WARN_THRESHOLD);
+      add_planned_handle_capacity(thr->active_handles(), capacity);
     }
     functionExit(thr);
     return result;
@@ -824,7 +837,7 @@
     }
     jint result = UNCHECKED()->EnsureLocalCapacity(env, capacity);
     if (result == JNI_OK) {
-      thr->active_handles()->set_planned_capacity(capacity + CHECK_JNI_LOCAL_REF_CAP_WARN_THRESHOLD);
+      add_planned_handle_capacity(thr->active_handles(), capacity);
     }
     functionExit(thr);
     return result;
@@ -1628,7 +1641,6 @@
       check_is_obj_array(thr, array);
     )
     jobject result = UNCHECKED()->GetObjectArrayElement(env,array,index);
-    thr->set_pending_jni_exception_check("GetObjectArrayElement");
     functionExit(thr);
     return result;
 JNI_END
@@ -1643,7 +1655,6 @@
       check_is_obj_array(thr, array);
     )
     UNCHECKED()->SetObjectArrayElement(env,array,index,val);
-    thr->set_pending_jni_exception_check("SetObjectArrayElement");
     functionExit(thr);
 JNI_END
 
@@ -1733,7 +1744,6 @@
       check_primitive_array_type(thr, array, ElementTag); \
     ) \
     UNCHECKED()->Get##Result##ArrayRegion(env,array,start,len,buf); \
-    thr->set_pending_jni_exception_check("Get"#Result"ArrayRegion"); \
     functionExit(thr); \
 JNI_END
 
@@ -1758,7 +1768,6 @@
       check_primitive_array_type(thr, array, ElementTag); \
     ) \
     UNCHECKED()->Set##Result##ArrayRegion(env,array,start,len,buf); \
-    thr->set_pending_jni_exception_check("Set"#Result"ArrayRegion"); \
     functionExit(thr); \
 JNI_END
 
@@ -1835,7 +1844,6 @@
       checkString(thr, str);
     )
     UNCHECKED()->GetStringRegion(env, str, start, len, buf);
-    thr->set_pending_jni_exception_check("GetStringRegion");
     functionExit(thr);
 JNI_END
 
@@ -1850,7 +1858,6 @@
       checkString(thr, str);
     )
     UNCHECKED()->GetStringUTFRegion(env, str, start, len, buf);
-    thr->set_pending_jni_exception_check("GetStringUTFRegion");
     functionExit(thr);
 JNI_END
 
--- a/hotspot/src/share/vm/prims/jvmtiImpl.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/prims/jvmtiImpl.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "interpreter/interpreter.hpp"
+#include "interpreter/oopMapCache.hpp"
 #include "jvmtifiles/jvmtiEnv.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/instanceKlass.hpp"
@@ -744,6 +745,13 @@
 }
 
 void VM_GetOrSetLocal::doit() {
+  InterpreterOopMap oop_mask;
+  _jvf->method()->mask_for(_jvf->bci(), &oop_mask);
+  if (oop_mask.is_dead(_index)) {
+    // The local can be invalid and uninitialized in the scope of current bci
+    _result = JVMTI_ERROR_INVALID_SLOT;
+    return;
+  }
   if (_set) {
     // Force deoptimization of frame if compiled because it's
     // possible the compiler emitted some locals as constant values,
--- a/hotspot/src/share/vm/runtime/atomic.hpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/runtime/atomic.hpp	Tue Aug 05 12:14:11 2014 -0700
@@ -35,6 +35,18 @@
   // can provide an alternative action if not - see supports_cx8() for
   // a means to test availability.
 
+  // The memory operations that are mentioned with each of the atomic
+  // function families come from src/share/vm/runtime/orderAccess.hpp,
+  // e.g., <fence> is described in that file and is implemented by the
+  // OrderAccess::fence() function. See that file for the gory details
+  // on the Memory Access Ordering Model.
+
+  // All of the atomic operations that imply a read-modify-write action
+  // guarantee a two-way memory barrier across that operation. Historically
+  // these semantics reflect the strength of atomic operations that are
+  // provided on SPARC/X86. We assume that strength is necessary unless
+  // we can prove that a weaker form is sufficiently safe.
+
   // Atomically store to a location
   inline static void store    (jbyte    store_value, jbyte*    dest);
   inline static void store    (jshort   store_value, jshort*   dest);
@@ -55,7 +67,8 @@
   // See comment above about using jlong atomics on 32-bit platforms
   inline static jlong load(volatile jlong* src);
 
-  // Atomically add to a location, return updated value
+  // Atomically add to a location. Returns updated value. add*() provide:
+  // <fence> add-value-to-dest <membar StoreLoad|StoreStore>
   inline static jint     add    (jint     add_value, volatile jint*     dest);
   inline static size_t   add    (size_t   add_value, volatile size_t*   dest);
   inline static intptr_t add_ptr(intptr_t add_value, volatile intptr_t* dest);
@@ -63,30 +76,35 @@
   // See comment above about using jlong atomics on 32-bit platforms
          static jlong    add    (jlong    add_value, volatile jlong*    dest);
 
-  // Atomically increment location
+  // Atomically increment location. inc*() provide:
+  // <fence> increment-dest <membar StoreLoad|StoreStore>
   inline static void inc    (volatile jint*     dest);
          static void inc    (volatile jshort*   dest);
   inline static void inc    (volatile size_t*   dest);
   inline static void inc_ptr(volatile intptr_t* dest);
   inline static void inc_ptr(volatile void*     dest);
 
-  // Atomically decrement a location
+  // Atomically decrement a location. dec*() provide:
+  // <fence> decrement-dest <membar StoreLoad|StoreStore>
   inline static void dec    (volatile jint*     dest);
          static void dec    (volatile jshort*    dest);
   inline static void dec    (volatile size_t*   dest);
   inline static void dec_ptr(volatile intptr_t* dest);
   inline static void dec_ptr(volatile void*     dest);
 
-  // Performs atomic exchange of *dest with exchange_value.  Returns old prior value of *dest.
+  // Performs atomic exchange of *dest with exchange_value. Returns old
+  // prior value of *dest. xchg*() provide:
+  // <fence> exchange-value-with-dest <membar StoreLoad|StoreStore>
   inline static jint         xchg(jint         exchange_value, volatile jint*         dest);
          static unsigned int xchg(unsigned int exchange_value, volatile unsigned int* dest);
 
   inline static intptr_t xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest);
   inline static void*    xchg_ptr(void*    exchange_value, volatile void*   dest);
 
-  // Performs atomic compare of *dest and compare_value, and exchanges *dest with exchange_value
-  // if the comparison succeeded.  Returns prior value of *dest.  Guarantees a two-way memory
-  // barrier across the cmpxchg.  I.e., it's really a 'fence_cmpxchg_acquire'.
+  // Performs atomic compare of *dest and compare_value, and exchanges
+  // *dest with exchange_value if the comparison succeeded. Returns prior
+  // value of *dest. cmpxchg*() provide:
+  // <fence> compare-and-exchange <membar StoreLoad|StoreStore>
          static jbyte    cmpxchg    (jbyte    exchange_value, volatile jbyte*    dest, jbyte    compare_value);
   inline static jint     cmpxchg    (jint     exchange_value, volatile jint*     dest, jint     compare_value);
   // See comment above about using jlong atomics on 32-bit platforms
--- a/hotspot/src/share/vm/runtime/globals.hpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Tue Aug 05 12:14:11 2014 -0700
@@ -1216,6 +1216,11 @@
   product(bool, UseFastJNIAccessors, true,                                  \
           "Use optimized versions of Get<Primitive>Field")                  \
                                                                             \
+  product(intx, MaxJNILocalCapacity, 65536,                                 \
+          "Maximum allowable local JNI handle capacity to "                 \
+          "EnsureLocalCapacity() and PushLocalFrame(), "                    \
+          "where <= 0 is unlimited, default: 65536")                        \
+                                                                            \
   product(bool, EagerXrunInit, false,                                       \
           "Eagerly initialize -Xrun libraries; allows startup profiling, "  \
           "but not all -Xrun libraries may support the state of the VM "    \
--- a/hotspot/src/share/vm/runtime/objectMonitor.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/runtime/objectMonitor.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -2497,6 +2497,10 @@
   SETKNOB(FastHSSEC);
   #undef SETKNOB
 
+  if (Knob_Verbose) {
+    sanity_checks();
+  }
+
   if (os::is_MP()) {
      BackOffMask = (1 << Knob_SpinBackOff) - 1;
      if (Knob_ReportSettings) ::printf("BackOffMask=%X\n", BackOffMask);
@@ -2517,6 +2521,66 @@
   InitDone = 1;
 }
 
+void ObjectMonitor::sanity_checks() {
+  int error_cnt = 0;
+  int warning_cnt = 0;
+  bool verbose = Knob_Verbose != 0 NOT_PRODUCT(|| VerboseInternalVMTests);
+
+  if (verbose) {
+    tty->print_cr("INFO: sizeof(ObjectMonitor)=" SIZE_FORMAT,
+                  sizeof(ObjectMonitor));
+  }
+
+  uint cache_line_size = VM_Version::L1_data_cache_line_size();
+  if (verbose) {
+    tty->print_cr("INFO: L1_data_cache_line_size=%u", cache_line_size);
+  }
+
+  ObjectMonitor dummy;
+  u_char *addr_begin  = (u_char*)&dummy;
+  u_char *addr_header = (u_char*)&dummy._header;
+  u_char *addr_owner  = (u_char*)&dummy._owner;
+
+  uint offset_header = (uint)(addr_header - addr_begin);
+  if (verbose) tty->print_cr("INFO: offset(_header)=%u", offset_header);
+
+  uint offset_owner = (uint)(addr_owner - addr_begin);
+  if (verbose) tty->print_cr("INFO: offset(_owner)=%u", offset_owner);
+
+  if ((uint)(addr_header - addr_begin) != 0) {
+    tty->print_cr("ERROR: offset(_header) must be zero (0).");
+    error_cnt++;
+  }
+
+  if (cache_line_size != 0) {
+    // We were able to determine the L1 data cache line size so
+    // do some cache line specific sanity checks
+
+    if ((offset_owner - offset_header) < cache_line_size) {
+      tty->print_cr("WARNING: the _header and _owner fields are closer "
+                    "than a cache line which permits false sharing.");
+      warning_cnt++;
+    }
+
+    if ((sizeof(ObjectMonitor) % cache_line_size) != 0) {
+      tty->print_cr("WARNING: ObjectMonitor size is not a multiple of "
+                    "a cache line which permits false sharing.");
+      warning_cnt++;
+    }
+  }
+
+  ObjectSynchronizer::sanity_checks(verbose, cache_line_size, &error_cnt,
+                                    &warning_cnt);
+
+  if (verbose || error_cnt != 0 || warning_cnt != 0) {
+    tty->print_cr("INFO: error_cnt=%d", error_cnt);
+    tty->print_cr("INFO: warning_cnt=%d", warning_cnt);
+  }
+
+  guarantee(error_cnt == 0,
+            "Fatal error(s) found in ObjectMonitor::sanity_checks()");
+}
+
 #ifndef PRODUCT
 void ObjectMonitor::verify() {
 }
--- a/hotspot/src/share/vm/runtime/objectMonitor.hpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/runtime/objectMonitor.hpp	Tue Aug 05 12:14:11 2014 -0700
@@ -189,6 +189,8 @@
   bool      check(TRAPS);       // true if the thread owns the monitor.
   void      check_slow(TRAPS);
   void      clear();
+  static void sanity_checks();  // public for -XX:+ExecuteInternalVMTests
+                                // in PRODUCT for -XX:SyncKnobs=Verbose=1
 #ifndef PRODUCT
   void      verify();
   void      print();
@@ -234,8 +236,6 @@
 
   // WARNING: this must be the very first word of ObjectMonitor
   // This means this class can't use any virtual member functions.
-  // TODO-FIXME: assert that offsetof(_header) is 0 or get rid of the
-  // implicit 0 offset in emitted code.
 
   volatile markOop   _header;       // displaced object header word - mark
   void*     volatile _object;       // backward object pointer - strong root
--- a/hotspot/src/share/vm/runtime/synchronizer.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/runtime/synchronizer.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -392,19 +392,22 @@
 // Hash Code handling
 //
 // Performance concern:
-// OrderAccess::storestore() calls release() which STs 0 into the global volatile
-// OrderAccess::Dummy variable.  This store is unnecessary for correctness.
-// Many threads STing into a common location causes considerable cache migration
-// or "sloshing" on large SMP system.  As such, I avoid using OrderAccess::storestore()
-// until it's repaired.  In some cases OrderAccess::fence() -- which incurs local
-// latency on the executing processor -- is a better choice as it scales on SMP
-// systems.  See http://blogs.sun.com/dave/entry/biased_locking_in_hotspot for a
-// discussion of coherency costs.  Note that all our current reference platforms
-// provide strong ST-ST order, so the issue is moot on IA32, x64, and SPARC.
+// OrderAccess::storestore() calls release() which at one time stored 0
+// into the global volatile OrderAccess::dummy variable. This store was
+// unnecessary for correctness. Many threads storing into a common location
+// causes considerable cache migration or "sloshing" on large SMP systems.
+// As such, I avoided using OrderAccess::storestore(). In some cases
+// OrderAccess::fence() -- which incurs local latency on the executing
+// processor -- is a better choice as it scales on SMP systems.
+//
+// See http://blogs.oracle.com/dave/entry/biased_locking_in_hotspot for
+// a discussion of coherency costs. Note that all our current reference
+// platforms provide strong ST-ST order, so the issue is moot on IA32,
+// x64, and SPARC.
 //
 // As a general policy we use "volatile" to control compiler-based reordering
-// and explicit fences (barriers) to control for architectural reordering performed
-// by the CPU(s) or platform.
+// and explicit fences (barriers) to control for architectural reordering
+// performed by the CPU(s) or platform.
 
 struct SharedGlobals {
     // These are highly shared mostly-read variables.
@@ -1596,7 +1599,55 @@
 }
 
 //------------------------------------------------------------------------------
-// Non-product code
+// Debugging code
+
+void ObjectSynchronizer::sanity_checks(const bool verbose,
+                                       const uint cache_line_size,
+                                       int *error_cnt_ptr,
+                                       int *warning_cnt_ptr) {
+  u_char *addr_begin      = (u_char*)&GVars;
+  u_char *addr_stwRandom  = (u_char*)&GVars.stwRandom;
+  u_char *addr_hcSequence = (u_char*)&GVars.hcSequence;
+
+  if (verbose) {
+    tty->print_cr("INFO: sizeof(SharedGlobals)=" SIZE_FORMAT,
+                  sizeof(SharedGlobals));
+  }
+
+  uint offset_stwRandom = (uint)(addr_stwRandom - addr_begin);
+  if (verbose) tty->print_cr("INFO: offset(stwRandom)=%u", offset_stwRandom);
+
+  uint offset_hcSequence = (uint)(addr_hcSequence - addr_begin);
+  if (verbose) {
+    tty->print_cr("INFO: offset(_hcSequence)=%u", offset_hcSequence);
+  }
+
+  if (cache_line_size != 0) {
+    // We were able to determine the L1 data cache line size so
+    // do some cache line specific sanity checks
+
+    if (offset_stwRandom < cache_line_size) {
+      tty->print_cr("WARNING: the SharedGlobals.stwRandom field is closer "
+                    "to the struct beginning than a cache line which permits "
+                    "false sharing.");
+      (*warning_cnt_ptr)++;
+    }
+
+    if ((offset_hcSequence - offset_stwRandom) < cache_line_size) {
+      tty->print_cr("WARNING: the SharedGlobals.stwRandom and "
+                    "SharedGlobals.hcSequence fields are closer than a cache "
+                    "line which permits false sharing.");
+      (*warning_cnt_ptr)++;
+    }
+
+    if ((sizeof(SharedGlobals) - offset_hcSequence) < cache_line_size) {
+      tty->print_cr("WARNING: the SharedGlobals.hcSequence field is closer "
+                    "to the struct end than a cache line which permits false "
+                    "sharing.");
+      (*warning_cnt_ptr)++;
+    }
+  }
+}
 
 #ifndef PRODUCT
 
--- a/hotspot/src/share/vm/runtime/synchronizer.hpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/runtime/synchronizer.hpp	Tue Aug 05 12:14:11 2014 -0700
@@ -121,6 +121,9 @@
   static void oops_do(OopClosure* f);
 
   // debugging
+  static void sanity_checks(const bool verbose,
+                            const unsigned int cache_line_size,
+                            int *error_cnt_ptr, int *warning_cnt_ptr);
   static void verify() PRODUCT_RETURN;
   static int  verify_objmon_isinpool(ObjectMonitor *addr) PRODUCT_RETURN0;
 
--- a/hotspot/src/share/vm/runtime/vm_version.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/runtime/vm_version.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -50,6 +50,7 @@
 bool Abstract_VM_Version::_supports_atomic_getadd4 = false;
 bool Abstract_VM_Version::_supports_atomic_getadd8 = false;
 unsigned int Abstract_VM_Version::_logical_processors_per_package = 1U;
+unsigned int Abstract_VM_Version::_L1_data_cache_line_size = 0;
 int Abstract_VM_Version::_reserve_for_allocation_prefetch = 0;
 
 #ifndef HOTSPOT_RELEASE_VERSION
--- a/hotspot/src/share/vm/runtime/vm_version.hpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/src/share/vm/runtime/vm_version.hpp	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,6 +42,7 @@
   static bool         _supports_atomic_getadd4;
   static bool         _supports_atomic_getadd8;
   static unsigned int _logical_processors_per_package;
+  static unsigned int _L1_data_cache_line_size;
   static int          _vm_major_version;
   static int          _vm_minor_version;
   static int          _vm_micro_version;
@@ -98,6 +99,10 @@
     return _logical_processors_per_package;
   }
 
+  static unsigned int L1_data_cache_line_size() {
+    return _L1_data_cache_line_size;
+  }
+
   // Need a space at the end of TLAB for prefetch instructions
   // which may fault when accessing memory outside of heap.
   static int reserve_for_allocation_prefetch() {
--- a/hotspot/test/Makefile	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/test/Makefile	Tue Aug 05 12:14:11 2014 -0700
@@ -23,14 +23,36 @@
 #
 
 #
-# Makefile to run various jdk tests
+# Makefile to run various hotspot tests
 #
 
 GETMIXEDPATH=echo
 
-# Get OS/ARCH specifics
-OSNAME = $(shell uname -s)
-ifeq ($(OSNAME), SunOS)
+# Utilities used
+AWK       = awk
+CAT       = cat
+CD        = cd
+CHMOD     = chmod
+CP        = cp
+CUT       = cut
+DIRNAME   = dirname
+ECHO      = echo
+EGREP     = egrep
+EXPAND    = expand
+FIND      = find
+MKDIR     = mkdir
+PWD       = pwd
+SED       = sed
+SORT      = sort
+TEE       = tee
+UNAME     = uname
+UNIQ      = uniq
+WC        = wc
+ZIP       = zip
+
+# Get OS name from uname (Cygwin inexplicably adds _NT-5.1)
+UNAME_S := $(shell $(UNAME) -s | $(CUT) -f1 -d_)
+ifeq ($(UNAME_S), SunOS)
   PLATFORM = solaris
   SLASH_JAVA = /java
   ARCH = $(shell uname -p)
@@ -38,7 +60,7 @@
     ARCH=i586
   endif
 endif
-ifeq ($(OSNAME), Linux)
+ifeq ($(UNAME_S), Linux)
   PLATFORM = linux
   SLASH_JAVA = /java
   ARCH = $(shell uname -m)
@@ -46,7 +68,7 @@
     ARCH = i586
   endif
 endif
-ifeq ($(OSNAME), Darwin)
+ifeq ($(UNAME_S), Darwin)
   PLATFORM = bsd
   SLASH_JAVA = /java
   ARCH = $(shell uname -m)
@@ -54,7 +76,7 @@
     ARCH = i586
   endif
 endif
-ifeq ($(findstring BSD,$(OSNAME)), BSD)
+ifeq ($(findstring BSD,$(UNAME_S)), BSD)
   PLATFORM = bsd
   SLASH_JAVA = /java
   ARCH = $(shell uname -m)
@@ -63,12 +85,12 @@
   endif
 endif
 ifeq ($(PLATFORM),)
-  # detect wether we're running in MKS or cygwin
-  ifeq ($(OSNAME), Windows_NT) # MKS
+  # detect whether we're running in MKS or cygwin
+  ifeq ($(UNAME_S), Windows_NT) # MKS
     GETMIXEDPATH=dosname -s
   endif
-  ifeq ($(findstring CYGWIN,$(OSNAME)), CYGWIN)
-    GETMIXEDPATH=cygpath -m -s
+  ifeq ($(findstring CYGWIN,$(UNAME_S)), CYGWIN)
+    GETMIXEDPATH=cygpath -m
   endif
   PLATFORM = windows
   SLASH_JAVA = J:
@@ -92,13 +114,6 @@
   SLASH_JAVA = $(ALT_SLASH_JAVA)
 endif
 
-# Utilities used
-CD    = cd
-CP    = cp
-ECHO  = echo
-MKDIR = mkdir
-ZIP   = zip
-
 # Root of this test area (important to use full paths in some places)
 TEST_ROOT := $(shell pwd)
 
@@ -136,21 +151,82 @@
 endif
 
 # How to create the test bundle (pass or fail, we want to create this)
-BUNDLE_UP = ( $(MKDIR) -p `dirname $(ARCHIVE_BUNDLE)`     \
-	      && $(CD) $(ABS_TEST_OUTPUT_DIR)             \
-	      && $(ZIP) -q -r $(ARCHIVE_BUNDLE) . )
-BUNDLE_UP_FAILED = ( exitCode=$$? && $(BUNDLE_UP) && exit $${exitCode} )
+#   Follow command with ";$(BUNDLE_UP_AND_EXIT)", so it always gets executed.
+ZIP_UP_RESULTS = ( $(MKDIR) -p `$(DIRNAME) $(ARCHIVE_BUNDLE)`     \
+	           && $(CD) $(ABS_TEST_OUTPUT_DIR)             \
+	           && $(CHMOD) -R a+r . \
+	           && $(ZIP) -q -r $(ARCHIVE_BUNDLE) . )
+
+# important results files
+SUMMARY_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTreport/text/summary.txt")
+STATS_TXT_NAME = Stats.txt
+STATS_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/$(STATS_TXT_NAME)")
+RUNLIST   = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/runlist.txt")
+PASSLIST  = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/passlist.txt")
+FAILLIST  = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/faillist.txt")
+EXITCODE  = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/exitcode.txt")
+
+TESTEXIT = \
+  if [ ! -s $(EXITCODE) ] ; then \
+    $(ECHO) "ERROR: EXITCODE file not filled in."; \
+    $(ECHO) "1" > $(EXITCODE); \
+  fi ; \
+  testExitCode=`$(CAT) $(EXITCODE)`; \
+  $(ECHO) "EXIT CODE: $${testExitCode}"; \
+  exit $${testExitCode}
+
+BUNDLE_UP_AND_EXIT = \
+( \
+  jtregExitCode=$$? && \
+  _summary="$(SUMMARY_TXT)"; \
+  $(RM) -f $(STATS_TXT) $(RUNLIST) $(PASSLIST) $(FAILLIST) $(EXITCODE); \
+  $(ECHO) "$${jtregExitCode}" > $(EXITCODE); \
+  if [ -r "$${_summary}" ] ; then \
+    $(ECHO) "Summary: $(UNIQUE_DIR)" > $(STATS_TXT); \
+    $(EXPAND) $${_summary} | $(EGREP) -v ' Not run\.' > $(RUNLIST); \
+    $(EGREP) ' Passed\.' $(RUNLIST) \
+      | $(EGREP) -v ' Error\.' \
+      | $(EGREP) -v ' Failed\.' > $(PASSLIST); \
+    ( $(EGREP) ' Failed\.' $(RUNLIST); \
+      $(EGREP) ' Error\.' $(RUNLIST); \
+      $(EGREP) -v ' Passed\.' $(RUNLIST) ) \
+      | $(SORT) | $(UNIQ) > $(FAILLIST); \
+    if [ $${jtregExitCode} != 0 -o -s $(FAILLIST) ] ; then \
+      $(EXPAND) $(FAILLIST) \
+        | $(CUT) -d' ' -f1 \
+        | $(SED) -e 's@^@FAILED: @' >> $(STATS_TXT); \
+      if [ $${jtregExitCode} = 0 ] ; then \
+        jtregExitCode=1; \
+      fi; \
+    fi; \
+    runc="`$(CAT) $(RUNLIST)      | $(WC) -l | $(AWK) '{print $$1;}'`"; \
+    passc="`$(CAT) $(PASSLIST)    | $(WC) -l | $(AWK) '{print $$1;}'`"; \
+    failc="`$(CAT) $(FAILLIST)    | $(WC) -l | $(AWK) '{print $$1;}'`"; \
+    exclc="FIXME CODETOOLS-7900176"; \
+    $(ECHO) "TEST STATS: name=$(UNIQUE_DIR)  run=$${runc}  pass=$${passc}  fail=$${failc}" \
+      >> $(STATS_TXT); \
+  else \
+    $(ECHO) "Missing file: $${_summary}" >> $(STATS_TXT); \
+  fi; \
+  if [ -f $(STATS_TXT) ] ; then \
+    $(CAT) $(STATS_TXT); \
+  fi; \
+  $(ZIP_UP_RESULTS) ; \
+  $(TESTEXIT) \
+)
 
 ################################################################
 
 # Default make rule (runs jtreg_tests)
-all: jtreg_tests
+all: hotspot_all
 	@$(ECHO) "Testing completed successfully"
 
-# Support "hotspot_" prefixed test make targets too
-# The hotspot_% targets are for example invoked by the top level Makefile
+# Support "hotspot_" prefixed test make targets (too)
+# The hotspot_% targets are used by the top level Makefile
+# Unless explicitly defined below, hotspot_<x> is interpreted as a jtreg test group name
 hotspot_%:
-	$(MAKE) $*
+	$(ECHO) "Running tests: $@"
+	$(MAKE) -j 1 TEST_SELECTION=":$@" UNIQUE_DIR=$@ jtreg_tests;
 
 # Prep for output
 prep: clean
@@ -168,41 +244,64 @@
 
 # Expect JT_HOME to be set for jtreg tests. (home for jtreg)
 ifndef JT_HOME
-  JT_HOME = $(SLASH_JAVA)/re/jtreg/4.0/promoted/latest/binaries/jtreg
-endif
-ifdef JPRT_JTREG_HOME
-  JT_HOME = $(JPRT_JTREG_HOME)
+  JT_HOME = $(SLASH_JAVA)/re/jtreg/4.1/promoted/latest/binaries/jtreg
+  ifdef JPRT_JTREG_HOME
+    JT_HOME = $(JPRT_JTREG_HOME)
+  endif
 endif
 
-# Expect JPRT to set TESTDIRS to the jtreg test dirs
-JTREG_TESTDIRS = demo/jvmti/gctest demo/jvmti/hprof
+# When called from JPRT the TESTDIRS variable is set to the jtreg tests to run
 ifdef TESTDIRS
-  JTREG_TESTDIRS = $(TESTDIRS)
+  TEST_SELECTION = $(TESTDIRS)
+endif
+
+ifdef CONCURRENCY
+  EXTRA_JTREG_OPTIONS += -concurrency:$(CONCURRENCY)
 endif
 
 # Default JTREG to run (win32 script works for everybody)
 JTREG = $(JT_HOME)/win32/bin/jtreg
 
+# Only run automatic tests
+JTREG_BASIC_OPTIONS += -a
+# Report details on all failed or error tests, times too
+JTREG_BASIC_OPTIONS += -v:fail,error,time
+# Retain all files for failing tests
+JTREG_BASIC_OPTIONS += -retain:fail,error
+# Ignore tests are not run and completely silent about it
+JTREG_IGNORE_OPTION = -ignore:quiet
+JTREG_BASIC_OPTIONS += $(JTREG_IGNORE_OPTION)
+# Add any extra options
+JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS)
+# Set other vm and test options
+JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_OPTIONS:%=-vmoption:%) $(JAVA_VM_ARGS:%=-vmoption:%)
+
 # Option to tell jtreg to not run tests marked with "ignore"
 ifeq ($(PLATFORM), windows)
   JTREG_KEY_OPTION = -k:!ignore
 else
   JTREG_KEY_OPTION = -k:\!ignore
 endif
+JTREG_BASIC_OPTIONS += $(JTREG_KEY_OPTION)
 
-#EXTRA_JTREG_OPTIONS =
+# Make sure jtreg exists
+$(JTREG): $(JT_HOME)
 
-jtreg_tests: prep $(JT_HOME) $(PRODUCT_HOME) $(JTREG)
-	$(JTREG) -a -v:fail,error               \
-          $(JTREG_KEY_OPTION)                   \
-          $(EXTRA_JTREG_OPTIONS)                \
-          -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport    \
-          -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTwork      \
-          -jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)")                  \
-          $(JAVA_OPTIONS:%=-vmoption:%)         \
-          $(JTREG_TESTDIRS)                     \
-	  || $(BUNDLE_UP_FAILED)
-	$(BUNDLE_UP)
+jtreg_tests: prep $(PRODUCT_HOME) $(JTREG)
+	(                                                                    \
+	  ( JT_HOME=$(shell $(GETMIXEDPATH) "$(JT_HOME)");                   \
+            export JT_HOME;                                                  \
+            $(shell $(GETMIXEDPATH) "$(JTREG)")                              \
+              $(JTREG_BASIC_OPTIONS)                                         \
+              -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTreport")  \
+              -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTwork")    \
+              -jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)")                \
+              $(JTREG_EXCLUSIONS)                                            \
+              $(JTREG_TEST_OPTIONS)                                          \
+              $(TEST_SELECTION)                                              \
+	  ) ;                                                                \
+	  $(BUNDLE_UP_AND_EXIT)                                              \
+	) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt ; $(TESTEXIT)
 
 PHONY_LIST += jtreg_tests
 
@@ -210,7 +309,7 @@
 
 # clienttest (make sure various basic java client options work)
 
-clienttest: prep $(PRODUCT_HOME)
+hotspot_clienttest clienttest: prep $(PRODUCT_HOME)
 	$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -version
 	$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -help
 	$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -X
@@ -218,73 +317,27 @@
 	$(RM) $(PRODUCT_HOME)/jre/bin/client/classes.jsa
 	$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -Xshare:dump
 
-PHONY_LIST += clienttest
+PHONY_LIST += hotspot_clienttest clienttest
 
 ################################################################
 
 # servertest (make sure various basic java server options work)
 
-servertest: prep $(PRODUCT_HOME)
+hotspot_servertest servertest: prep $(PRODUCT_HOME)
 	$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -version
 	$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -help
 	$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -X
 
-PHONY_LIST += servertest
+PHONY_LIST += hotspot_servertest servertest
 
 ################################################################
 
 # internalvmtests (run internal unit tests inside the VM)
 
-internalvmtests: prep $(PRODUCT_HOME)
+hotspot_internalvmtests internalvmtests: prep $(PRODUCT_HOME)
 	$(PRODUCT_HOME)/bin/java $(JAVA_OPTIONS) -XX:+ExecuteInternalVMTests -version
 
-PHONY_LIST += internalvmtests
-
-################################################################
-
-# wbapitest (make sure the whitebox testing api classes work
-
-wbapitest: prep $(JT_HOME) $(PRODUCT_HOME) $(JTREG)
-	$(JTREG) -a -v:fail,error               \
-          $(JTREG_KEY_OPTION)                   \
-          $(EXTRA_JTREG_OPTIONS)                \
-          -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport    \
-          -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTwork      \
-          -jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)")                  \
-          $(JAVA_OPTIONS:%=-vmoption:%)         \
-          $(shell $(GETMIXEDPATH) "$(TEST_ROOT)")/sanity                   \
-	  || $(BUNDLE_UP_FAILED)
-	$(BUNDLE_UP)
-
-PHONY_LIST += wbapitest
-
-################################################################
-
-# packtest
-
-# Expect JPRT to set JPRT_PACKTEST_HOME.
-PACKTEST_HOME = /net/jprt-web.sfbay.sun.com/jprt/allproducts/packtest
-ifdef JPRT_PACKTEST_HOME
-  PACKTEST_HOME = $(JPRT_PACKTEST_HOME)
-endif
-
-#EXTRA_PACKTEST_OPTIONS =
-
-packtest: prep $(PACKTEST_HOME)/ptest $(PRODUCT_HOME)
-	( $(CD) $(PACKTEST_HOME) &&            \
-	    $(PACKTEST_HOME)/ptest             \
-		 -t "$(PRODUCT_HOME)"          \
-	         $(PACKTEST_STRESS_OPTION)     \
-		 $(EXTRA_PACKTEST_OPTIONS)     \
-		 -W $(ABS_TEST_OUTPUT_DIR)     \
-                 $(JAVA_OPTIONS:%=-J %)        \
-	 ) || $(BUNDLE_UP_FAILED)
-	$(BUNDLE_UP)
-
-packtest_stress: PACKTEST_STRESS_OPTION=-s
-packtest_stress: packtest
-
-PHONY_LIST += packtest packtest_stress
+PHONY_LIST += hotspot_internalvmtests internalvmtests
 
 ################################################################
 
@@ -292,4 +345,3 @@
 .PHONY: all clean prep $(PHONY_LIST)
 
 ################################################################
-
--- a/hotspot/test/TEST.groups	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/test/TEST.groups	Tue Aug 05 12:14:11 2014 -0700
@@ -271,6 +271,7 @@
   gc/arguments/TestCMSHeapSizeFlags.java \
   gc/arguments/TestMaxNewSize.java \
   gc/arguments/TestUseCompressedOopsErgo.java \
+  gc/class_unloading/TestCMSClassUnloadingDisabledHWM.java \
   gc/concurrentMarkSweep/ \
   gc/startup_warnings/TestCMS.java \
   gc/startup_warnings/TestCMSIncrementalMode.java \
@@ -325,3 +326,24 @@
  -:needs_parallelgc
 
 
+# When called from top level the test suites use the hotspot_ prefix
+hotspot_wbapitest = \
+  sanity/
+
+hotspot_compiler = \
+  sanity/ExecuteInternalVMTests.java
+
+hotspot_gc = \
+  sanity/ExecuteInternalVMTests.java
+
+hotspot_runtime = \
+  sanity/ExecuteInternalVMTests.java
+
+hotspot_serviceability = \
+  sanity/ExecuteInternalVMTests.java
+
+hotspot_all = \
+  :hotspot_compiler \
+  :hotspot_gc \
+  :hotspot_runtime \
+  :hotspot_serviceability
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/profiling/TestSpecTrapClassUnloading.java	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8031752
+ * @summary speculative traps need to be cleaned up at GC
+ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-TieredCompilation -XX:-UseOnStackReplacement -XX:-BackgroundCompilation -XX:+UseTypeSpeculation -XX:TypeProfileLevel=222 -XX:CompileCommand=exclude,java.lang.reflect.Method::invoke -XX:CompileCommand=exclude,sun.reflect.DelegatingMethodAccessorImpl::invoke -Xmx512M TestSpecTrapClassUnloading
+ *
+ */
+
+import java.lang.reflect.Method;
+
+public class TestSpecTrapClassUnloading {
+    static class B {
+        final public boolean m(Object o) {
+            if (o.getClass() == B.class) {
+                return true;
+            }
+            return false;
+        }
+    }
+
+    static class MemoryChunk {
+        MemoryChunk other;
+        long[] array;
+        MemoryChunk(MemoryChunk other) {
+            this.other = other;
+            array = new long[1024 * 1024 * 1024];
+        }
+    }
+
+    static void m1(B b, Object o) {
+        b.m(o);
+    }
+
+    static void m2(B b, Object o) {
+        b.m(o);
+    }
+
+    public static void main(String[] args) throws Exception {
+        Method m = B.class.getMethod("m", Object.class);
+        Object o = new Object();
+        B b = new B();
+
+        // add speculative trap in B.m() for m1
+        for (int i = 0; i < 20000; i++) {
+            m1(b, b);
+        }
+        m1(b, o);
+
+        // add speculative trap in B.m() for code generated by reflection
+        for (int i = 0; i < 20000; i++) {
+            m.invoke(b, b);
+        }
+        m.invoke(b, o);
+
+        m = null;
+
+        // add speculative trap in B.m() for m2
+        for (int i = 0; i < 20000; i++) {
+            m2(b, b);
+        }
+        m2(b, o);
+
+        // Exhaust memory which causes the code generated by
+        // reflection to be unloaded but B.m() is not.
+        MemoryChunk root = null;
+        try {
+            while (true) {
+                root = new MemoryChunk(root);
+            }
+        } catch(OutOfMemoryError e) {
+            root = null;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/profiling/spectrapredefineclass_classloaders/A.java	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,4 @@
+public class A {
+    void m() {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/profiling/spectrapredefineclass_classloaders/Agent.java	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.security.*;
+import java.lang.instrument.*;
+import java.lang.reflect.*;
+import java.lang.management.ManagementFactory;
+import com.sun.tools.attach.VirtualMachine;
+import java.lang.reflect.*;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.nio.file.Paths;
+
+public class Agent implements ClassFileTransformer {
+    public static ClassLoader newClassLoader() {
+        try {
+            return new URLClassLoader(new URL[] {
+                    Paths.get(System.getProperty("test.classes",".")).toUri().toURL(),
+            }, null);
+        } catch (MalformedURLException e){
+            throw new RuntimeException("Unexpected URL conversion failure", e);
+        }
+    }
+
+    static public Class Test_class;
+
+    static public void main(String[] args) throws Exception {
+
+        // loader2 must be first on the list so loader 1 must be used first
+        ClassLoader loader1 = newClassLoader();
+        Class dummy = loader1.loadClass("Test");
+
+        ClassLoader loader2 = newClassLoader();
+
+        Test_class = loader2.loadClass("Test");
+        Method m3 = Test_class.getMethod("m3", ClassLoader.class);
+        // Add speculative trap in m2() (loaded by loader1) that
+        // references m4() (loaded by loader2).
+        m3.invoke(Test_class.newInstance(), loader1);
+
+        String nameOfRunningVM = ManagementFactory.getRuntimeMXBean().getName();
+        int p = nameOfRunningVM.indexOf('@');
+        String pid = nameOfRunningVM.substring(0, p);
+
+        // Make the nmethod go away
+        for (int i = 0; i < 10; i++) {
+            System.gc();
+        }
+
+        // Redefine class Test loaded by loader2
+        for (int i = 0; i < 2; i++) {
+            try {
+                VirtualMachine vm = VirtualMachine.attach(pid);
+                vm.loadAgent(System.getProperty("test.classes",".") + "/agent.jar", "");
+                vm.detach();
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+        }
+        // Will process loader2 first, find m4() is redefined and
+        // needs to be freed then process loader1, check the
+        // speculative trap in m2() and try to access m4() which was
+        // freed already.
+        for (int i = 0; i < 10; i++) {
+            System.gc();
+        }
+    }
+
+    public synchronized byte[] transform(final ClassLoader classLoader,
+                                         final String className,
+                                         Class<?> classBeingRedefined,
+                                         ProtectionDomain protectionDomain,
+                                         byte[] classfileBuffer) {
+        System.out.println("Transforming class " + className + " "+ classLoader);
+        return classfileBuffer;
+    }
+
+    public static void redefine(String agentArgs, Instrumentation instrumentation, Class to_redefine) {
+
+        try {
+            instrumentation.retransformClasses(to_redefine);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+    }
+
+    public static void agentmain(String agentArgs, Instrumentation instrumentation) throws Exception {
+        Agent transformer = new Agent();
+        instrumentation.addTransformer(transformer, true);
+
+        redefine(agentArgs, instrumentation, Test_class);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/profiling/spectrapredefineclass_classloaders/B.java	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,5 @@
+public class B extends A {
+    void m() {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+import java.io.PrintWriter;
+import com.oracle.java.testlibrary.*;
+
+/*
+ * @test
+ * @bug 8040237
+ * @library /testlibrary
+ * @build Agent Test A B
+ * @run main ClassFileInstaller Agent
+ * @run main Launcher
+ * @run main/othervm -XX:-TieredCompilation -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:TypeProfileLevel=222 -XX:ReservedCodeCacheSize=3M Agent
+ */
+public class Launcher {
+    public static void main(String[] args) throws Exception  {
+
+      PrintWriter pw = new PrintWriter("MANIFEST.MF");
+      pw.println("Agent-Class: Agent");
+      pw.println("Can-Retransform-Classes: true");
+      pw.close();
+
+      ProcessBuilder pb = new ProcessBuilder();
+      pb.command(new String[] { JDKToolFinder.getJDKTool("jar"), "cmf", "MANIFEST.MF", System.getProperty("test.classes",".") + "/agent.jar", "Agent.class"});
+      pb.start().waitFor();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/profiling/spectrapredefineclass_classloaders/Test.java	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,50 @@
+import java.lang.reflect.*;
+
+public class Test {
+
+    public boolean m1(A a, Boolean early_return) {
+        if (early_return.booleanValue()) return true;
+        boolean res =  m2(a);
+        return res;
+    }
+
+    public boolean m2(A a) {
+        boolean res = false;
+        if (a.getClass() == B.class) {
+            a.m();
+        } else {
+            res = true;
+        }
+        return res;
+    }
+
+    public void m3(ClassLoader loader) throws Exception {
+        Class Test_class = loader.loadClass("Test");
+        Object test = Test_class.newInstance();
+        Class A_class = loader.loadClass("A");
+        Object a = A_class.newInstance();
+        Class B_class = loader.loadClass("B");
+        Object b = B_class.newInstance();
+        Method m1 = Test_class.getMethod("m1", A_class, Boolean.class);
+
+        // So we don't hit uncommon trap in the next loop
+        for (int i = 0; i < 4000; i++) {
+            m4(m1, test, a, Boolean.TRUE);
+            m4(m1, test, b, Boolean.TRUE);
+        }
+        for (int i = 0; i < 20000; i++) {
+            m4(m1, test, a, Boolean.FALSE);
+        }
+        for (int i = 0; i < 4; i++) {
+            m4(m1, test, b, Boolean.FALSE);
+        }
+    }
+
+    public Object m4(Method m, Object test, Object a, Object early_return) throws Exception {
+        return m.invoke(test, a, early_return);
+    }
+
+    static public A a = new A();
+    static public B b = new B();
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/compiler/stable/StableConfiguration.java	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package java.lang.invoke;
+
+import java.lang.reflect.Method;
+import java.util.Properties;
+import sun.hotspot.WhiteBox;
+
+public class StableConfiguration {
+    static final WhiteBox WB = WhiteBox.getWhiteBox();
+    static final boolean isStableEnabled;
+    static final boolean isServerWithStable;
+
+    static {
+        Boolean value = WB.getBooleanVMFlag("FoldStableValues");
+        isStableEnabled = (value == null ? false : value);
+        isServerWithStable = isStableEnabled && get();
+        System.out.println("@Stable:         " + (isStableEnabled ? "enabled" : "disabled"));
+        System.out.println("Server Compiler: " + get());
+    }
+
+    // ::get() is among immediately compiled methods.
+    static boolean get() {
+        try {
+            Method m = StableConfiguration.class.getDeclaredMethod("get");
+            int level = WB.getMethodCompilationLevel(m);
+            if (level > 0) {
+              return (level == 4);
+            } else {
+              String javaVM = System.getProperty("java.vm.name", "");
+              if (javaVM.contains("Server")) return true;
+              if (javaVM.contains("Client")) return false;
+              throw new Error("Unknown VM type: "+javaVM);
+            }
+        } catch (NoSuchMethodException e) {
+            throw new Error(e);
+        }
+    }
+
+}
--- a/hotspot/test/compiler/stable/TestStableBoolean.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/test/compiler/stable/TestStableBoolean.java	Tue Aug 05 12:14:11 2014 -0700
@@ -26,9 +26,11 @@
 /*
  * @test TestStableBoolean
  * @summary tests on stable fields and arrays
- * @library /testlibrary
- * @compile -XDignore.symbol.file TestStableBoolean.java
+ * @library /testlibrary /testlibrary/whitebox
+ * @build TestStableBoolean StableConfiguration sun.hotspot.WhiteBox
+ * @run main ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main ClassFileInstaller
+ *           java/lang/invoke/StableConfiguration
  *           java/lang/invoke/TestStableBoolean
  *           java/lang/invoke/TestStableBoolean$BooleanStable
  *           java/lang/invoke/TestStableBoolean$StaticBooleanStable
@@ -48,46 +50,60 @@
  *           java/lang/invoke/TestStableBoolean$NestedStableField3
  *           java/lang/invoke/TestStableBoolean$NestedStableField3$A
  *           java/lang/invoke/TestStableBoolean$DefaultValue
+ *           java/lang/invoke/TestStableBoolean$DefaultStaticValue
  *           java/lang/invoke/TestStableBoolean$ObjectArrayLowerDim2
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:+FoldStableValues -XX:+UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:-TieredCompilation
+ *                   -XX:+FoldStableValues
+ *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
+ *                   java.lang.invoke.TestStableBoolean
+ * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:-TieredCompilation
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableBoolean
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:+FoldStableValues -XX:-UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:+TieredCompilation -XX:TieredStopAtLevel=1
+ *                   -XX:+FoldStableValues
+ *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
+ *                   java.lang.invoke.TestStableBoolean
+ * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:+TieredCompilation -XX:TieredStopAtLevel=1
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableBoolean
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:-FoldStableValues -XX:+UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -client -XX:-TieredCompilation
+ *                   -XX:+FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableBoolean
- *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:-FoldStableValues -XX:-UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -client -XX:-TieredCompilation
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableBoolean
  */
 package java.lang.invoke;
 
-import com.sun.management.HotSpotDiagnosticMXBean;
-import com.sun.management.VMOption;
-import sun.management.ManagementFactoryHelper;
 import java.lang.reflect.InvocationTargetException;
 
 public class TestStableBoolean {
+    static final boolean isStableEnabled    = StableConfiguration.isStableEnabled;
+    static final boolean isServerWithStable = StableConfiguration.isServerWithStable;
+
     public static void main(String[] args) throws Exception {
-        System.out.println("@Stable enabled: "+isStableEnabled);
-        System.out.println();
-
         run(DefaultValue.class);
         run(BooleanStable.class);
+        run(DefaultStaticValue.class);
         run(StaticBooleanStable.class);
         run(VolatileBooleanStable.class);
 
@@ -145,6 +161,21 @@
 
     /* ==================================================== */
 
+    static class DefaultStaticValue {
+        public static @Stable boolean v;
+
+        public static final DefaultStaticValue c = new DefaultStaticValue();
+        public static boolean get() { return c.v; }
+        public static void test() throws Exception {
+                        boolean val1 = get();
+            c.v = true; boolean val2 = get();
+            assertEquals(val1, false);
+            assertEquals(val2, true);
+        }
+    }
+
+    /* ==================================================== */
+
     static class StaticBooleanStable {
         public static @Stable boolean v;
 
@@ -188,14 +219,14 @@
                 c.v = new boolean[1]; c.v[0] = true;  boolean val1 = get();
                                       c.v[0] = false; boolean val2 = get();
                 assertEquals(val1, true);
-                assertEquals(val2, (isStableEnabled ? true : false));
+                assertEquals(val2, (isServerWithStable ? true : false));
             }
 
             {
                 c.v = new boolean[20]; c.v[10] = true;  boolean val1 = get1();
                                        c.v[10] = false; boolean val2 = get1();
                 assertEquals(val1, true);
-                assertEquals(val2, (isStableEnabled ? true : false));
+                assertEquals(val2, (isServerWithStable ? true : false));
             }
 
             {
@@ -220,19 +251,19 @@
                 c.v = new boolean[1][1]; c.v[0][0] = true;  boolean val1 = get();
                                          c.v[0][0] = false; boolean val2 = get();
                 assertEquals(val1, true);
-                assertEquals(val2, (isStableEnabled ? true : false));
+                assertEquals(val2, (isServerWithStable ? true : false));
 
                 c.v = new boolean[1][1]; c.v[0][0] = false; boolean val3 = get();
-                assertEquals(val3, (isStableEnabled ? true : false));
+                assertEquals(val3, (isServerWithStable ? true : false));
 
                 c.v[0] = new boolean[1]; c.v[0][0] = false; boolean val4 = get();
-                assertEquals(val4, (isStableEnabled ? true : false));
+                assertEquals(val4, (isServerWithStable ? true : false));
             }
 
             {
                 c.v = new boolean[1][1]; boolean[] val1 = get1();
                 c.v[0] = new boolean[1]; boolean[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -258,28 +289,28 @@
                 c.v = new boolean[1][1][1]; c.v[0][0][0] = true;  boolean val1 = get();
                                             c.v[0][0][0] = false; boolean val2 = get();
                 assertEquals(val1, true);
-                assertEquals(val2, (isStableEnabled ? true : false));
+                assertEquals(val2, (isServerWithStable ? true : false));
 
                 c.v = new boolean[1][1][1]; c.v[0][0][0] = false; boolean val3 = get();
-                assertEquals(val3, (isStableEnabled ? true : false));
+                assertEquals(val3, (isServerWithStable ? true : false));
 
                 c.v[0] = new boolean[1][1]; c.v[0][0][0] = false; boolean val4 = get();
-                assertEquals(val4, (isStableEnabled ? true : false));
+                assertEquals(val4, (isServerWithStable ? true : false));
 
                 c.v[0][0] = new boolean[1]; c.v[0][0][0] = false; boolean val5 = get();
-                assertEquals(val5, (isStableEnabled ? true : false));
+                assertEquals(val5, (isServerWithStable ? true : false));
             }
 
             {
                 c.v = new boolean[1][1][1]; boolean[] val1 = get1();
                 c.v[0][0] = new boolean[1]; boolean[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new boolean[1][1][1]; boolean[][] val1 = get2();
                 c.v[0] = new boolean[1][1]; boolean[][] val2 = get2();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -306,37 +337,37 @@
                 c.v = new boolean[1][1][1][1]; c.v[0][0][0][0] = true;  boolean val1 = get();
                                                c.v[0][0][0][0] = false; boolean val2 = get();
                 assertEquals(val1, true);
-                assertEquals(val2, (isStableEnabled ? true : false));
+                assertEquals(val2, (isServerWithStable ? true : false));
 
                 c.v = new boolean[1][1][1][1]; c.v[0][0][0][0] = false; boolean val3 = get();
-                assertEquals(val3, (isStableEnabled ? true : false));
+                assertEquals(val3, (isServerWithStable ? true : false));
 
                 c.v[0] = new boolean[1][1][1]; c.v[0][0][0][0] = false; boolean val4 = get();
-                assertEquals(val4, (isStableEnabled ? true : false));
+                assertEquals(val4, (isServerWithStable ? true : false));
 
                 c.v[0][0] = new boolean[1][1]; c.v[0][0][0][0] = false; boolean val5 = get();
-                assertEquals(val5, (isStableEnabled ? true : false));
+                assertEquals(val5, (isServerWithStable ? true : false));
 
                 c.v[0][0][0] = new boolean[1]; c.v[0][0][0][0] = false; boolean val6 = get();
-                assertEquals(val6, (isStableEnabled ? true : false));
+                assertEquals(val6, (isServerWithStable ? true : false));
             }
 
             {
                 c.v = new boolean[1][1][1][1]; boolean[] val1 = get1();
                 c.v[0][0][0] = new boolean[1]; boolean[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new boolean[1][1][1][1]; boolean[][] val1 = get2();
                 c.v[0][0] = new boolean[1][1]; boolean[][] val2 = get2();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new boolean[1][1][1][1]; boolean[][][] val1 = get3();
                 c.v[0] = new boolean[1][1][1]; boolean[][][] val2 = get3();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -399,7 +430,7 @@
                 c.v = new boolean[1][1]; c.v[0] = new boolean[0]; boolean[] val1 = get1();
                                          c.v[0] = new boolean[0]; boolean[] val2 = get1();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -435,14 +466,14 @@
                 c.v = new boolean[1][1][1]; c.v[0][0] = new boolean[0]; boolean[] val1 = get1();
                                             c.v[0][0] = new boolean[0]; boolean[] val2 = get1();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new boolean[1][1][1]; c.v[0] = new boolean[0][0]; boolean[][] val1 = get2();
                                             c.v[0] = new boolean[0][0]; boolean[][] val2 = get2();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -577,7 +608,7 @@
                                elem.a = false; boolean val3 = get(); boolean val4 = get1();
 
                 assertEquals(val1, true);
-                assertEquals(val3, (isStableEnabled ? true : false));
+                assertEquals(val3, (isServerWithStable ? true : false));
 
                 assertEquals(val2, true);
                 assertEquals(val4, false);
@@ -611,17 +642,4 @@
             }
         }
     }
-
-    static final boolean isStableEnabled;
-    static {
-        HotSpotDiagnosticMXBean diagnostic
-                = ManagementFactoryHelper.getDiagnosticMXBean();
-        VMOption tmp;
-        try {
-            tmp = diagnostic.getVMOption("FoldStableValues");
-        } catch (IllegalArgumentException e) {
-            tmp = null;
-        }
-        isStableEnabled = (tmp == null ? false : Boolean.parseBoolean(tmp.getValue()));
-    }
 }
--- a/hotspot/test/compiler/stable/TestStableByte.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/test/compiler/stable/TestStableByte.java	Tue Aug 05 12:14:11 2014 -0700
@@ -26,9 +26,11 @@
 /*
  * @test TestStableByte
  * @summary tests on stable fields and arrays
- * @library /testlibrary
- * @compile -XDignore.symbol.file TestStableByte.java
+ * @library /testlibrary /testlibrary/whitebox
+ * @build TestStableByte StableConfiguration sun.hotspot.WhiteBox
+ * @run main ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main ClassFileInstaller
+ *           java/lang/invoke/StableConfiguration
  *           java/lang/invoke/TestStableByte
  *           java/lang/invoke/TestStableByte$ByteStable
  *           java/lang/invoke/TestStableByte$StaticByteStable
@@ -48,46 +50,60 @@
  *           java/lang/invoke/TestStableByte$NestedStableField3
  *           java/lang/invoke/TestStableByte$NestedStableField3$A
  *           java/lang/invoke/TestStableByte$DefaultValue
+ *           java/lang/invoke/TestStableByte$DefaultStaticValue
  *           java/lang/invoke/TestStableByte$ObjectArrayLowerDim2
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:+FoldStableValues -XX:+UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:-TieredCompilation
+ *                   -XX:+FoldStableValues
+ *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
+ *                   java.lang.invoke.TestStableByte
+ * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:-TieredCompilation
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableByte
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:+FoldStableValues -XX:-UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:+TieredCompilation -XX:TieredStopAtLevel=1
+ *                   -XX:+FoldStableValues
+ *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
+ *                   java.lang.invoke.TestStableByte
+ * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:+TieredCompilation -XX:TieredStopAtLevel=1
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableByte
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:-FoldStableValues -XX:+UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -client -XX:-TieredCompilation
+ *                   -XX:+FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableByte
- *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:-FoldStableValues -XX:-UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -client -XX:-TieredCompilation
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableByte
  */
 package java.lang.invoke;
 
-import com.sun.management.HotSpotDiagnosticMXBean;
-import com.sun.management.VMOption;
-import sun.management.ManagementFactoryHelper;
 import java.lang.reflect.InvocationTargetException;
 
 public class TestStableByte {
+    static final boolean isStableEnabled    = StableConfiguration.isStableEnabled;
+    static final boolean isServerWithStable = StableConfiguration.isServerWithStable;
+
     public static void main(String[] args) throws Exception {
-        System.out.println("@Stable enabled: "+isStableEnabled);
-        System.out.println();
-
         run(DefaultValue.class);
         run(ByteStable.class);
+        run(DefaultStaticValue.class);
         run(StaticByteStable.class);
         run(VolatileByteStable.class);
 
@@ -145,6 +161,21 @@
 
     /* ==================================================== */
 
+    static class DefaultStaticValue {
+        public static @Stable byte v;
+
+        public static final DefaultStaticValue c = new DefaultStaticValue();
+        public static byte get() { return c.v; }
+        public static void test() throws Exception {
+                     byte val1 = get();
+            c.v = 1; byte val2 = get();
+            assertEquals(val1, 0);
+            assertEquals(val2, 1);
+        }
+    }
+
+    /* ==================================================== */
+
     static class StaticByteStable {
         public static @Stable byte v;
 
@@ -188,20 +219,22 @@
                 c.v = new byte[1]; c.v[0] = 1; byte val1 = get();
                                    c.v[0] = 2; byte val2 = get();
                 assertEquals(val1, 1);
-                assertEquals(val2, (isStableEnabled ? 1 : 2));
+                assertEquals(val2, (isServerWithStable ? 1 : 2));
 
                 c.v = new byte[1]; c.v[0] = 3; byte val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1 : 3));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 3));
             }
 
             {
                 c.v = new byte[20]; c.v[10] = 1; byte val1 = get1();
                                     c.v[10] = 2; byte val2 = get1();
                 assertEquals(val1, 1);
-                assertEquals(val2, (isStableEnabled ? 1 : 2));
+                assertEquals(val2, (isServerWithStable ? 1 : 2));
 
                 c.v = new byte[20]; c.v[10] = 3; byte val3 = get1();
-                assertEquals(val3, (isStableEnabled ? 1 : 3));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 3));
             }
 
             {
@@ -226,19 +259,21 @@
                 c.v = new byte[1][1]; c.v[0][0] = 1; byte val1 = get();
                                       c.v[0][0] = 2; byte val2 = get();
                 assertEquals(val1, 1);
-                assertEquals(val2, (isStableEnabled ? 1 : 2));
+                assertEquals(val2, (isServerWithStable ? 1 : 2));
 
                 c.v = new byte[1][1]; c.v[0][0] = 3; byte val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1 : 3));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 3));
 
                 c.v[0] = new byte[1]; c.v[0][0] = 4; byte val4 = get();
-                assertEquals(val4, (isStableEnabled ? 1 : 4));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 4));
             }
 
             {
                 c.v = new byte[1][1]; byte[] val1 = get1();
                 c.v[0] = new byte[1]; byte[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -264,28 +299,31 @@
                 c.v = new byte[1][1][1]; c.v[0][0][0] = 1; byte val1 = get();
                                          c.v[0][0][0] = 2; byte val2 = get();
                 assertEquals(val1, 1);
-                assertEquals(val2, (isStableEnabled ? 1 : 2));
+                assertEquals(val2, (isServerWithStable ? 1 : 2));
 
                 c.v = new byte[1][1][1]; c.v[0][0][0] = 3; byte val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1 : 3));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 3));
 
                 c.v[0] = new byte[1][1]; c.v[0][0][0] = 4; byte val4 = get();
-                assertEquals(val4, (isStableEnabled ? 1 : 4));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 4));
 
                 c.v[0][0] = new byte[1]; c.v[0][0][0] = 5; byte val5 = get();
-                assertEquals(val5, (isStableEnabled ? 1 : 5));
+                assertEquals(val5, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 5));
             }
 
             {
                 c.v = new byte[1][1][1]; byte[] val1 = get1();
                 c.v[0][0] = new byte[1]; byte[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new byte[1][1][1]; byte[][] val1 = get2();
                 c.v[0] = new byte[1][1]; byte[][] val2 = get2();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -312,37 +350,41 @@
                 c.v = new byte[1][1][1][1]; c.v[0][0][0][0] = 1; byte val1 = get();
                                             c.v[0][0][0][0] = 2; byte val2 = get();
                 assertEquals(val1, 1);
-                assertEquals(val2, (isStableEnabled ? 1 : 2));
+                assertEquals(val2, (isServerWithStable ? 1 : 2));
 
                 c.v = new byte[1][1][1][1]; c.v[0][0][0][0] = 3; byte val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1 : 3));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 3));
 
                 c.v[0] = new byte[1][1][1]; c.v[0][0][0][0] = 4; byte val4 = get();
-                assertEquals(val4, (isStableEnabled ? 1 : 4));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 4));
 
                 c.v[0][0] = new byte[1][1]; c.v[0][0][0][0] = 5; byte val5 = get();
-                assertEquals(val5, (isStableEnabled ? 1 : 5));
+                assertEquals(val5, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 5));
 
                 c.v[0][0][0] = new byte[1]; c.v[0][0][0][0] = 6; byte val6 = get();
-                assertEquals(val6, (isStableEnabled ? 1 : 6));
+                assertEquals(val6, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 6));
             }
 
             {
                 c.v = new byte[1][1][1][1]; byte[] val1 = get1();
                 c.v[0][0][0] = new byte[1]; byte[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new byte[1][1][1][1]; byte[][] val1 = get2();
                 c.v[0][0] = new byte[1][1]; byte[][] val2 = get2();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new byte[1][1][1][1]; byte[][][] val1 = get3();
                 c.v[0] = new byte[1][1][1]; byte[][][] val2 = get3();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -404,7 +446,7 @@
                 c.v = new byte[1][1]; c.v[0] = new byte[0]; byte[] val1 = get1();
                                      c.v[0] = new byte[0]; byte[] val2 = get1();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -440,14 +482,14 @@
                 c.v = new byte[1][1][1]; c.v[0][0] = new byte[0]; byte[] val1 = get1();
                                          c.v[0][0] = new byte[0]; byte[] val2 = get1();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new byte[1][1][1]; c.v[0] = new byte[0][0]; byte[][] val1 = get2();
                                          c.v[0] = new byte[0][0]; byte[][] val2 = get2();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -582,7 +624,7 @@
                                elem.a = 2; byte val3 = get(); byte val4 = get1();
 
                 assertEquals(val1, 1);
-                assertEquals(val3, (isStableEnabled ? 1 : 2));
+                assertEquals(val3, (isServerWithStable ? 1 : 2));
 
                 assertEquals(val2, 1);
                 assertEquals(val4, 2);
@@ -616,17 +658,4 @@
             }
         }
     }
-
-    static final boolean isStableEnabled;
-    static {
-        HotSpotDiagnosticMXBean diagnostic
-                = ManagementFactoryHelper.getDiagnosticMXBean();
-        VMOption tmp;
-        try {
-            tmp = diagnostic.getVMOption("FoldStableValues");
-        } catch (IllegalArgumentException e) {
-            tmp = null;
-        }
-        isStableEnabled = (tmp == null ? false : Boolean.parseBoolean(tmp.getValue()));
-    }
 }
--- a/hotspot/test/compiler/stable/TestStableChar.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/test/compiler/stable/TestStableChar.java	Tue Aug 05 12:14:11 2014 -0700
@@ -26,9 +26,11 @@
 /*
  * @test TestStableChar
  * @summary tests on stable fields and arrays
- * @library /testlibrary
- * @compile -XDignore.symbol.file TestStableChar.java
+ * @library /testlibrary /testlibrary/whitebox
+ * @build TestStableChar StableConfiguration sun.hotspot.WhiteBox
+ * @run main ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main ClassFileInstaller
+ *           java/lang/invoke/StableConfiguration
  *           java/lang/invoke/TestStableChar
  *           java/lang/invoke/TestStableChar$CharStable
  *           java/lang/invoke/TestStableChar$StaticCharStable
@@ -48,46 +50,60 @@
  *           java/lang/invoke/TestStableChar$NestedStableField3
  *           java/lang/invoke/TestStableChar$NestedStableField3$A
  *           java/lang/invoke/TestStableChar$DefaultValue
+ *           java/lang/invoke/TestStableChar$DefaultStaticValue
  *           java/lang/invoke/TestStableChar$ObjectArrayLowerDim2
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:+FoldStableValues -XX:-UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:-TieredCompilation
+ *                   -XX:+FoldStableValues
+ *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
+ *                   java.lang.invoke.TestStableChar
+ * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:-TieredCompilation
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableChar
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:+FoldStableValues -XX:+UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:+TieredCompilation -XX:TieredStopAtLevel=1
+ *                   -XX:+FoldStableValues
+ *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
+ *                   java.lang.invoke.TestStableChar
+ * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:+TieredCompilation -XX:TieredStopAtLevel=1
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableChar
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:-FoldStableValues -XX:+UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -client -XX:-TieredCompilation
+ *                   -XX:+FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableChar
- *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:-FoldStableValues -XX:-UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -client -XX:-TieredCompilation
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableChar
  */
 package java.lang.invoke;
 
-import com.sun.management.HotSpotDiagnosticMXBean;
-import com.sun.management.VMOption;
-import sun.management.ManagementFactoryHelper;
 import java.lang.reflect.InvocationTargetException;
 
 public class TestStableChar {
+    static final boolean isStableEnabled    = StableConfiguration.isStableEnabled;
+    static final boolean isServerWithStable = StableConfiguration.isServerWithStable;
+
     public static void main(String[] args) throws Exception {
-        System.out.println("@Stable enabled: "+isStableEnabled);
-        System.out.println();
-
         run(DefaultValue.class);
         run(CharStable.class);
+        run(DefaultStaticValue.class);
         run(StaticCharStable.class);
         run(VolatileCharStable.class);
 
@@ -145,6 +161,21 @@
 
     /* ==================================================== */
 
+    static class DefaultStaticValue {
+        public static @Stable char v;
+
+        public static final DefaultStaticValue c = new DefaultStaticValue();
+        public static char get() { return c.v; }
+        public static void test() throws Exception {
+                       char val1 = get();
+            c.v = 'a'; char val2 = get();
+            assertEquals(val1, 0);
+            assertEquals(val2, 'a');
+        }
+    }
+
+    /* ==================================================== */
+
     static class StaticCharStable {
         public @Stable char v;
 
@@ -188,20 +219,22 @@
                 c.v = new char[1]; c.v[0] = 'a'; char val1 = get();
                                    c.v[0] = 'b'; char val2 = get();
                 assertEquals(val1, 'a');
-                assertEquals(val2, (isStableEnabled ? 'a' : 'b'));
+                assertEquals(val2, (isServerWithStable ? 'a' : 'b'));
 
                 c.v = new char[1]; c.v[0] = 'c'; char val3 = get();
-                assertEquals(val3, (isStableEnabled ? 'a' : 'c'));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 'a' : 'b')
+                                                    : 'c'));
             }
 
             {
                 c.v = new char[20]; c.v[10] = 'a'; char val1 = get1();
                                     c.v[10] = 'b'; char val2 = get1();
                 assertEquals(val1, 'a');
-                assertEquals(val2, (isStableEnabled ? 'a' : 'b'));
+                assertEquals(val2, (isServerWithStable ? 'a' : 'b'));
 
                 c.v = new char[20]; c.v[10] = 'c'; char val3 = get1();
-                assertEquals(val3, (isStableEnabled ? 'a' : 'c'));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 'a' : 'b')
+                                                    : 'c'));
             }
 
             {
@@ -226,19 +259,21 @@
                 c.v = new char[1][1]; c.v[0][0] = 'a'; char val1 = get();
                                       c.v[0][0] = 'b'; char val2 = get();
                 assertEquals(val1, 'a');
-                assertEquals(val2, (isStableEnabled ? 'a' : 'b'));
+                assertEquals(val2, (isServerWithStable ? 'a' : 'b'));
 
                 c.v = new char[1][1]; c.v[0][0] = 'c'; char val3 = get();
-                assertEquals(val3, (isStableEnabled ? 'a' : 'c'));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 'a' : 'b')
+                                                    : 'c'));
 
                 c.v[0] = new char[1]; c.v[0][0] = 'd'; char val4 = get();
-                assertEquals(val4, (isStableEnabled ? 'a' : 'd'));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? 'a' : 'b')
+                                                    : 'd'));
             }
 
             {
                 c.v = new char[1][1]; char[] val1 = get1();
                 c.v[0] = new char[1]; char[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -264,28 +299,31 @@
                 c.v = new char[1][1][1]; c.v[0][0][0] = 'a'; char val1 = get();
                                          c.v[0][0][0] = 'b'; char val2 = get();
                 assertEquals(val1, 'a');
-                assertEquals(val2, (isStableEnabled ? 'a' : 'b'));
+                assertEquals(val2, (isServerWithStable ? 'a' : 'b'));
 
                 c.v = new char[1][1][1]; c.v[0][0][0] = 'c'; char val3 = get();
-                assertEquals(val3, (isStableEnabled ? 'a' : 'c'));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 'a' : 'b')
+                                                    : 'c'));
 
                 c.v[0] = new char[1][1]; c.v[0][0][0] = 'd'; char val4 = get();
-                assertEquals(val4, (isStableEnabled ? 'a' : 'd'));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? 'a' : 'b')
+                                                    : 'd'));
 
                 c.v[0][0] = new char[1]; c.v[0][0][0] = 'e'; char val5 = get();
-                assertEquals(val5, (isStableEnabled ? 'a' : 'e'));
+                assertEquals(val5, (isStableEnabled ? (isServerWithStable ? 'a' : 'b')
+                                                    : 'e'));
             }
 
             {
                 c.v = new char[1][1][1]; char[] val1 = get1();
                 c.v[0][0] = new char[1]; char[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new char[1][1][1]; char[][] val1 = get2();
                 c.v[0] = new char[1][1]; char[][] val2 = get2();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -312,37 +350,41 @@
                 c.v = new char[1][1][1][1]; c.v[0][0][0][0] = 'a'; char val1 = get();
                                             c.v[0][0][0][0] = 'b'; char val2 = get();
                 assertEquals(val1, 'a');
-                assertEquals(val2, (isStableEnabled ? 'a' : 'b'));
+                assertEquals(val2, (isServerWithStable ? 'a' : 'b'));
 
                 c.v = new char[1][1][1][1]; c.v[0][0][0][0] = 'c'; char val3 = get();
-                assertEquals(val3, (isStableEnabled ? 'a' : 'c'));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 'a' : 'b')
+                                                    : 'c'));
 
                 c.v[0] = new char[1][1][1]; c.v[0][0][0][0] = 'd'; char val4 = get();
-                assertEquals(val4, (isStableEnabled ? 'a' : 'd'));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? 'a' : 'b')
+                                                    : 'd'));
 
                 c.v[0][0] = new char[1][1]; c.v[0][0][0][0] = 'e'; char val5 = get();
-                assertEquals(val5, (isStableEnabled ? 'a' : 'e'));
+                assertEquals(val5, (isStableEnabled ? (isServerWithStable ? 'a' : 'b')
+                                                    : 'e'));
 
                 c.v[0][0][0] = new char[1]; c.v[0][0][0][0] = 'f'; char val6 = get();
-                assertEquals(val6, (isStableEnabled ? 'a' : 'f'));
+                assertEquals(val6, (isStableEnabled ? (isServerWithStable ? 'a' : 'b')
+                                                    : 'f'));
             }
 
             {
                 c.v = new char[1][1][1][1]; char[] val1 = get1();
                 c.v[0][0][0] = new char[1]; char[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new char[1][1][1][1]; char[][] val1 = get2();
                 c.v[0][0] = new char[1][1]; char[][] val2 = get2();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new char[1][1][1][1]; char[][][] val1 = get3();
                 c.v[0] = new char[1][1][1]; char[][][] val2 = get3();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -350,7 +392,6 @@
                 c.v = new char[1][1][1][1]; char[][][][] val2 = get4();
                 assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
             }
-
         }
     }
 
@@ -403,7 +444,7 @@
                 c.v = new char[1][1]; c.v[0] = new char[0]; char[] val1 = get1();
                                       c.v[0] = new char[0]; char[] val2 = get1();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -439,14 +480,14 @@
                 c.v = new char[1][1][1]; c.v[0][0] = new char[0]; char[] val1 = get1();
                                          c.v[0][0] = new char[0]; char[] val2 = get1();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new char[1][1][1]; c.v[0] = new char[0][0]; char[][] val1 = get2();
                                          c.v[0] = new char[0][0]; char[][] val2 = get2();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -581,7 +622,7 @@
                                elem.a = 'b'; char val3 = get(); char val4 = get1();
 
                 assertEquals(val1, 'a');
-                assertEquals(val3, (isStableEnabled ? 'a' : 'b'));
+                assertEquals(val3, (isServerWithStable ? 'a' : 'b'));
 
                 assertEquals(val2, 'a');
                 assertEquals(val4, 'b');
@@ -615,17 +656,4 @@
             }
         }
     }
-
-    static final boolean isStableEnabled;
-    static {
-        HotSpotDiagnosticMXBean diagnostic
-                = ManagementFactoryHelper.getDiagnosticMXBean();
-        VMOption tmp;
-        try {
-            tmp = diagnostic.getVMOption("FoldStableValues");
-        } catch (IllegalArgumentException e) {
-            tmp = null;
-        }
-        isStableEnabled = (tmp == null ? false : Boolean.parseBoolean(tmp.getValue()));
-    }
 }
--- a/hotspot/test/compiler/stable/TestStableDouble.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/test/compiler/stable/TestStableDouble.java	Tue Aug 05 12:14:11 2014 -0700
@@ -26,9 +26,11 @@
 /*
  * @test TestStableDouble
  * @summary tests on stable fields and arrays
- * @library /testlibrary
- * @compile -XDignore.symbol.file TestStableDouble.java
+ * @library /testlibrary /testlibrary/whitebox
+ * @build TestStableDouble StableConfiguration sun.hotspot.WhiteBox
+ * @run main ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main ClassFileInstaller
+ *           java/lang/invoke/StableConfiguration
  *           java/lang/invoke/TestStableDouble
  *           java/lang/invoke/TestStableDouble$DoubleStable
  *           java/lang/invoke/TestStableDouble$StaticDoubleStable
@@ -48,46 +50,60 @@
  *           java/lang/invoke/TestStableDouble$NestedStableField3
  *           java/lang/invoke/TestStableDouble$NestedStableField3$A
  *           java/lang/invoke/TestStableDouble$DefaultValue
+ *           java/lang/invoke/TestStableDouble$DefaultStaticValue
  *           java/lang/invoke/TestStableDouble$ObjectArrayLowerDim2
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:+FoldStableValues -XX:+UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:-TieredCompilation
+ *                   -XX:+FoldStableValues
+ *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
+ *                   java.lang.invoke.TestStableDouble
+ * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:-TieredCompilation
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableDouble
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:+FoldStableValues -XX:-UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:+TieredCompilation -XX:TieredStopAtLevel=1
+ *                   -XX:+FoldStableValues
+ *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
+ *                   java.lang.invoke.TestStableDouble
+ * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:+TieredCompilation -XX:TieredStopAtLevel=1
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableDouble
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:-FoldStableValues -XX:+UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -client -XX:-TieredCompilation
+ *                   -XX:+FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableDouble
- *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:-FoldStableValues -XX:-UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -client -XX:-TieredCompilation
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableDouble
  */
 package java.lang.invoke;
 
-import com.sun.management.HotSpotDiagnosticMXBean;
-import com.sun.management.VMOption;
-import sun.management.ManagementFactoryHelper;
 import java.lang.reflect.InvocationTargetException;
 
 public class TestStableDouble {
+    static final boolean isStableEnabled    = StableConfiguration.isStableEnabled;
+    static final boolean isServerWithStable = StableConfiguration.isServerWithStable;
+
     public static void main(String[] args) throws Exception {
-        System.out.println("@Stable enabled: "+isStableEnabled);
-        System.out.println();
-
         run(DefaultValue.class);
         run(DoubleStable.class);
+        run(DefaultStaticValue.class);
         run(StaticDoubleStable.class);
         run(VolatileDoubleStable.class);
 
@@ -145,6 +161,21 @@
 
     /* ==================================================== */
 
+    static class DefaultStaticValue {
+        public static @Stable double v;
+
+        public static final DefaultStaticValue c = new DefaultStaticValue();
+        public static double get() { return c.v; }
+        public static void test() throws Exception {
+                       double val1 = get();
+            c.v = 1.0; double val2 = get();
+            assertEquals(val1, 0);
+            assertEquals(val2, 1.0);
+        }
+    }
+
+    /* ==================================================== */
+
     static class StaticDoubleStable {
         public static @Stable double v;
 
@@ -188,20 +219,22 @@
                 c.v = new double[1]; c.v[0] = 1.0; double val1 = get();
                                      c.v[0] = 2.0; double val2 = get();
                 assertEquals(val1, 1.0);
-                assertEquals(val2, (isStableEnabled ? 1.0 : 2.0));
+                assertEquals(val2, (isServerWithStable ? 1.0 : 2.0));
 
                 c.v = new double[1]; c.v[0] = 3.0; double val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1.0 : 3.0));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1.0 : 2.0)
+                                                    : 3.0));
             }
 
             {
                 c.v = new double[20]; c.v[10] = 1.0; double val1 = get1();
                                       c.v[10] = 2.0; double val2 = get1();
                 assertEquals(val1, 1.0);
-                assertEquals(val2, (isStableEnabled ? 1.0 : 2.0));
+                assertEquals(val2, (isServerWithStable ? 1.0 : 2.0));
 
                 c.v = new double[20]; c.v[10] = 3.0; double val3 = get1();
-                assertEquals(val3, (isStableEnabled ? 1.0 : 3.0));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1.0 : 2.0)
+                                                    : 3.0));
             }
 
             {
@@ -226,19 +259,21 @@
                 c.v = new double[1][1]; c.v[0][0] = 1.0; double val1 = get();
                                         c.v[0][0] = 2.0; double val2 = get();
                 assertEquals(val1, 1.0);
-                assertEquals(val2, (isStableEnabled ? 1.0 : 2.0));
+                assertEquals(val2, (isServerWithStable ? 1.0 : 2.0));
 
                 c.v = new double[1][1]; c.v[0][0] = 3.0; double val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1.0 : 3.0));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1.0 : 2.0)
+                                                    : 3.0));
 
                 c.v[0] = new double[1]; c.v[0][0] = 4.0; double val4 = get();
-                assertEquals(val4, (isStableEnabled ? 1.0 : 4.0));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? 1.0 : 2.0)
+                                                    : 4.0));
             }
 
             {
                 c.v = new double[1][1]; double[] val1 = get1();
                 c.v[0] = new double[1]; double[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -264,28 +299,31 @@
                 c.v = new double[1][1][1]; c.v[0][0][0] = 1.0; double val1 = get();
                                            c.v[0][0][0] = 2.0; double val2 = get();
                 assertEquals(val1, 1.0);
-                assertEquals(val2, (isStableEnabled ? 1.0 : 2.0));
+                assertEquals(val2, (isServerWithStable ? 1.0 : 2.0));
 
                 c.v = new double[1][1][1]; c.v[0][0][0] = 3.0; double val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1.0 : 3.0));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1.0 : 2.0)
+                                                    : 3.0));
 
                 c.v[0] = new double[1][1]; c.v[0][0][0] = 4.0; double val4 = get();
-                assertEquals(val4, (isStableEnabled ? 1.0 : 4.0));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? 1.0 : 2.0)
+                                                    : 4.0));
 
                 c.v[0][0] = new double[1]; c.v[0][0][0] = 5.0; double val5 = get();
-                assertEquals(val5, (isStableEnabled ? 1.0 : 5.0));
+                assertEquals(val5, (isStableEnabled ? (isServerWithStable ? 1.0 : 2.0)
+                                                    : 5.0));
             }
 
             {
                 c.v = new double[1][1][1]; double[] val1 = get1();
                 c.v[0][0] = new double[1]; double[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new double[1][1][1]; double[][] val1 = get2();
                 c.v[0] = new double[1][1]; double[][] val2 = get2();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -312,37 +350,41 @@
                 c.v = new double[1][1][1][1]; c.v[0][0][0][0] = 1.0; double val1 = get();
                                               c.v[0][0][0][0] = 2.0; double val2 = get();
                 assertEquals(val1, 1.0);
-                assertEquals(val2, (isStableEnabled ? 1.0 : 2.0));
+                assertEquals(val2, (isServerWithStable ? 1.0 : 2.0));
 
                 c.v = new double[1][1][1][1]; c.v[0][0][0][0] = 3.0; double val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1.0 : 3.0));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1.0 : 2.0)
+                                                    : 3.0));
 
                 c.v[0] = new double[1][1][1]; c.v[0][0][0][0] = 4.0; double val4 = get();
-                assertEquals(val4, (isStableEnabled ? 1.0 : 4.0));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? 1.0 : 2.0)
+                                                    : 4.0));
 
                 c.v[0][0] = new double[1][1]; c.v[0][0][0][0] = 5.0; double val5 = get();
-                assertEquals(val5, (isStableEnabled ? 1.0 : 5.0));
+                assertEquals(val5, (isStableEnabled ? (isServerWithStable ? 1.0 : 2.0)
+                                                    : 5.0));
 
                 c.v[0][0][0] = new double[1]; c.v[0][0][0][0] = 6.0; double val6 = get();
-                assertEquals(val6, (isStableEnabled ? 1.0 : 6.0));
+                assertEquals(val6, (isStableEnabled ? (isServerWithStable ? 1.0 : 2.0)
+                                                    : 6.0));
             }
 
             {
                 c.v = new double[1][1][1][1]; double[] val1 = get1();
                 c.v[0][0][0] = new double[1]; double[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new double[1][1][1][1]; double[][] val1 = get2();
                 c.v[0][0] = new double[1][1]; double[][] val2 = get2();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new double[1][1][1][1]; double[][][] val1 = get3();
                 c.v[0] = new double[1][1][1]; double[][][] val2 = get3();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -350,13 +392,11 @@
                 c.v = new double[1][1][1][1]; double[][][][] val2 = get4();
                 assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
             }
-
         }
     }
 
     /* ==================================================== */
     // Dynamic Dim is higher than static
-
     static class ObjectArrayLowerDim0 {
         public @Stable Object v;
 
@@ -404,7 +444,7 @@
                 c.v = new double[1][1]; c.v[0] = new double[0]; double[] val1 = get1();
                                         c.v[0] = new double[0]; double[] val2 = get1();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -440,14 +480,14 @@
                 c.v = new double[1][1][1]; c.v[0][0] = new double[0]; double[] val1 = get1();
                                            c.v[0][0] = new double[0]; double[] val2 = get1();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new double[1][1][1]; c.v[0] = new double[0][0]; double[][] val1 = get2();
                                            c.v[0] = new double[0][0]; double[][] val2 = get2();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -582,7 +622,7 @@
                                elem.a = 2.0; double val3 = get(); double val4 = get1();
 
                 assertEquals(val1, 1.0);
-                assertEquals(val3, (isStableEnabled ? 1.0 : 2.0));
+                assertEquals(val3, (isServerWithStable ? 1.0 : 2.0));
 
                 assertEquals(val2, 1.0);
                 assertEquals(val4, 2.0);
@@ -616,17 +656,4 @@
             }
         }
     }
-
-    static final boolean isStableEnabled;
-    static {
-        HotSpotDiagnosticMXBean diagnostic
-                = ManagementFactoryHelper.getDiagnosticMXBean();
-        VMOption tmp;
-        try {
-            tmp = diagnostic.getVMOption("FoldStableValues");
-        } catch (IllegalArgumentException e) {
-            tmp = null;
-        }
-        isStableEnabled = (tmp == null ? false : Boolean.parseBoolean(tmp.getValue()));
-    }
 }
--- a/hotspot/test/compiler/stable/TestStableFloat.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/test/compiler/stable/TestStableFloat.java	Tue Aug 05 12:14:11 2014 -0700
@@ -26,9 +26,11 @@
 /*
  * @test TestStableFloat
  * @summary tests on stable fields and arrays
- * @library /testlibrary
- * @compile -XDignore.symbol.file TestStableFloat.java
+ * @library /testlibrary /testlibrary/whitebox
+ * @build TestStableFloat StableConfiguration sun.hotspot.WhiteBox
+ * @run main ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main ClassFileInstaller
+ *           java/lang/invoke/StableConfiguration
  *           java/lang/invoke/TestStableFloat
  *           java/lang/invoke/TestStableFloat$FloatStable
  *           java/lang/invoke/TestStableFloat$StaticFloatStable
@@ -48,46 +50,60 @@
  *           java/lang/invoke/TestStableFloat$NestedStableField3
  *           java/lang/invoke/TestStableFloat$NestedStableField3$A
  *           java/lang/invoke/TestStableFloat$DefaultValue
+ *           java/lang/invoke/TestStableFloat$DefaultStaticValue
  *           java/lang/invoke/TestStableFloat$ObjectArrayLowerDim2
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:+FoldStableValues -XX:+UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:-TieredCompilation
+ *                   -XX:+FoldStableValues
+ *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
+ *                   java.lang.invoke.TestStableFloat
+ * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:-TieredCompilation
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableFloat
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:+FoldStableValues -XX:-UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:+TieredCompilation -XX:TieredStopAtLevel=1
+ *                   -XX:+FoldStableValues
+ *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
+ *                   java.lang.invoke.TestStableFloat
+ * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:+TieredCompilation -XX:TieredStopAtLevel=1
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableFloat
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:-FoldStableValues -XX:+UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -client -XX:-TieredCompilation
+ *                   -XX:+FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableFloat
- *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:-FoldStableValues -XX:-UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -client -XX:-TieredCompilation
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableFloat
  */
 package java.lang.invoke;
 
-import com.sun.management.HotSpotDiagnosticMXBean;
-import com.sun.management.VMOption;
-import sun.management.ManagementFactoryHelper;
 import java.lang.reflect.InvocationTargetException;
 
 public class TestStableFloat {
+    static final boolean isStableEnabled    = StableConfiguration.isStableEnabled;
+    static final boolean isServerWithStable = StableConfiguration.isServerWithStable;
+
     public static void main(String[] args) throws Exception {
-        System.out.println("@Stable enabled: "+isStableEnabled);
-        System.out.println();
-
         run(DefaultValue.class);
         run(FloatStable.class);
+        run(DefaultStaticValue.class);
         run(StaticFloatStable.class);
         run(VolatileFloatStable.class);
 
@@ -145,6 +161,21 @@
 
     /* ==================================================== */
 
+    static class DefaultStaticValue {
+        public static @Stable float v;
+
+        public static final DefaultStaticValue c = new DefaultStaticValue();
+        public static float get() { return c.v; }
+        public static void test() throws Exception {
+                        float val1 = get();
+            c.v = 1.0F; float val2 = get();
+            assertEquals(val1, 0F);
+            assertEquals(val2, 1.0F);
+        }
+    }
+
+    /* ==================================================== */
+
     static class StaticFloatStable {
         public static @Stable float v;
 
@@ -188,20 +219,22 @@
                 c.v = new float[1]; c.v[0] = 1.0F; float val1 = get();
                                     c.v[0] = 2.0F; float val2 = get();
                 assertEquals(val1, 1.0F);
-                assertEquals(val2, (isStableEnabled ? 1.0F : 2.0F));
+                assertEquals(val2, (isServerWithStable ? 1.0F : 2.0F));
 
                 c.v = new float[1]; c.v[0] = 3.0F; float val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1.0F : 3.0F));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1.0F : 2.0F)
+                                                    : 3.0F));
             }
 
             {
                 c.v = new float[20]; c.v[10] = 1.0F; float val1 = get1();
                                      c.v[10] = 2.0F; float val2 = get1();
                 assertEquals(val1, 1.0F);
-                assertEquals(val2, (isStableEnabled ? 1.0F : 2.0F));
+                assertEquals(val2, (isServerWithStable ? 1.0F : 2.0F));
 
                 c.v = new float[20]; c.v[10] = 3.0F; float val3 = get1();
-                assertEquals(val3, (isStableEnabled ? 1.0F : 3.0F));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1.0F : 2.0F)
+                                                    : 3.0F));
             }
 
             {
@@ -226,19 +259,21 @@
                 c.v = new float[1][1]; c.v[0][0] = 1.0F; float val1 = get();
                                        c.v[0][0] = 2.0F; float val2 = get();
                 assertEquals(val1, 1.0F);
-                assertEquals(val2, (isStableEnabled ? 1.0F : 2.0F));
+                assertEquals(val2, (isServerWithStable ? 1.0F : 2.0F));
 
                 c.v = new float[1][1]; c.v[0][0] = 3.0F; float val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1.0F : 3.0F));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1.0F : 2.0F)
+                                                    : 3.0F));
 
                 c.v[0] = new float[1]; c.v[0][0] = 4.0F; float val4 = get();
-                assertEquals(val4, (isStableEnabled ? 1.0F : 4.0F));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? 1.0F : 2.0F)
+                                                    : 4.0F));
             }
 
             {
                 c.v = new float[1][1]; float[] val1 = get1();
                 c.v[0] = new float[1]; float[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -264,28 +299,31 @@
                 c.v = new float[1][1][1]; c.v[0][0][0] = 1.0F; float val1 = get();
                                           c.v[0][0][0] = 2.0F; float val2 = get();
                 assertEquals(val1, 1.0F);
-                assertEquals(val2, (isStableEnabled ? 1.0F : 2.0F));
+                assertEquals(val2, (isServerWithStable ? 1.0F : 2.0F));
 
                 c.v = new float[1][1][1]; c.v[0][0][0] = 3.0F; float val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1.0F : 3.0F));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1.0F : 2.0F)
+                                                    : 3.0F));
 
                 c.v[0] = new float[1][1]; c.v[0][0][0] = 4.0F; float val4 = get();
-                assertEquals(val4, (isStableEnabled ? 1.0F : 4.0F));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? 1.0F : 2.0F)
+                                                    : 4.0F));
 
                 c.v[0][0] = new float[1]; c.v[0][0][0] = 5.0F; float val5 = get();
-                assertEquals(val5, (isStableEnabled ? 1.0F : 5.0F));
+                assertEquals(val5, (isStableEnabled ? (isServerWithStable ? 1.0F : 2.0F)
+                                                    : 5.0F));
             }
 
             {
                 c.v = new float[1][1][1]; float[] val1 = get1();
                 c.v[0][0] = new float[1]; float[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new float[1][1][1]; float[][] val1 = get2();
                 c.v[0] = new float[1][1]; float[][] val2 = get2();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -312,37 +350,41 @@
                 c.v = new float[1][1][1][1]; c.v[0][0][0][0] = 1.0F; float val1 = get();
                                              c.v[0][0][0][0] = 2.0F; float val2 = get();
                 assertEquals(val1, 1.0F);
-                assertEquals(val2, (isStableEnabled ? 1.0F : 2.0F));
+                assertEquals(val2, (isServerWithStable ? 1.0F : 2.0F));
 
                 c.v = new float[1][1][1][1]; c.v[0][0][0][0] = 3.0F; float val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1.0F : 3.0F));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1.0F : 2.0F)
+                                                    : 3.0F));
 
                 c.v[0] = new float[1][1][1]; c.v[0][0][0][0] = 4.0F; float val4 = get();
-                assertEquals(val4, (isStableEnabled ? 1.0F : 4.0F));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? 1.0F : 2.0F)
+                                                    : 4.0F));
 
                 c.v[0][0] = new float[1][1]; c.v[0][0][0][0] = 5.0F; float val5 = get();
-                assertEquals(val5, (isStableEnabled ? 1.0F : 5.0F));
+                assertEquals(val5, (isStableEnabled ? (isServerWithStable ? 1.0F : 2.0F)
+                                                    : 5.0F));
 
                 c.v[0][0][0] = new float[1]; c.v[0][0][0][0] = 6.0F; float val6 = get();
-                assertEquals(val6, (isStableEnabled ? 1.0F : 6.0F));
+                assertEquals(val6, (isStableEnabled ? (isServerWithStable ? 1.0F : 2.0F)
+                                                    : 6.0F));
             }
 
             {
                 c.v = new float[1][1][1][1]; float[] val1 = get1();
                 c.v[0][0][0] = new float[1]; float[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new float[1][1][1][1]; float[][] val1 = get2();
                 c.v[0][0] = new float[1][1]; float[][] val2 = get2();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new float[1][1][1][1]; float[][][] val1 = get3();
                 c.v[0] = new float[1][1][1]; float[][][] val2 = get3();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -350,13 +392,11 @@
                 c.v = new float[1][1][1][1]; float[][][][] val2 = get4();
                 assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
             }
-
         }
     }
 
     /* ==================================================== */
     // Dynamic Dim is higher than static
-
     static class ObjectArrayLowerDim0 {
         public @Stable Object v;
 
@@ -404,7 +444,7 @@
                 c.v = new float[1][1]; c.v[0] = new float[0]; float[] val1 = get1();
                                        c.v[0] = new float[0]; float[] val2 = get1();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -440,14 +480,14 @@
                 c.v = new float[1][1][1]; c.v[0][0] = new float[0]; float[] val1 = get1();
                                           c.v[0][0] = new float[0]; float[] val2 = get1();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new float[1][1][1]; c.v[0] = new float[0][0]; float[][] val1 = get2();
                                           c.v[0] = new float[0][0]; float[][] val2 = get2();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -582,7 +622,7 @@
                                elem.a = 2.0F; float val3 = get(); float val4 = get1();
 
                 assertEquals(val1, 1.0F);
-                assertEquals(val3, (isStableEnabled ? 1.0F : 2.0F));
+                assertEquals(val3, (isServerWithStable ? 1.0F : 2.0F));
 
                 assertEquals(val2, 1.0F);
                 assertEquals(val4, 2.0F);
@@ -616,17 +656,4 @@
             }
         }
     }
-
-    static final boolean isStableEnabled;
-    static {
-        HotSpotDiagnosticMXBean diagnostic
-                = ManagementFactoryHelper.getDiagnosticMXBean();
-        VMOption tmp;
-        try {
-            tmp = diagnostic.getVMOption("FoldStableValues");
-        } catch (IllegalArgumentException e) {
-            tmp = null;
-        }
-        isStableEnabled = (tmp == null ? false : Boolean.parseBoolean(tmp.getValue()));
-    }
 }
--- a/hotspot/test/compiler/stable/TestStableInt.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/test/compiler/stable/TestStableInt.java	Tue Aug 05 12:14:11 2014 -0700
@@ -26,9 +26,11 @@
 /*
  * @test TestStableInt
  * @summary tests on stable fields and arrays
- * @library /testlibrary
- * @compile -XDignore.symbol.file TestStableInt.java
+ * @library /testlibrary /testlibrary/whitebox
+ * @build TestStableInt StableConfiguration sun.hotspot.WhiteBox
+ * @run main ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main ClassFileInstaller
+ *           java/lang/invoke/StableConfiguration
  *           java/lang/invoke/TestStableInt
  *           java/lang/invoke/TestStableInt$IntStable
  *           java/lang/invoke/TestStableInt$StaticIntStable
@@ -48,46 +50,60 @@
  *           java/lang/invoke/TestStableInt$NestedStableField3
  *           java/lang/invoke/TestStableInt$NestedStableField3$A
  *           java/lang/invoke/TestStableInt$DefaultValue
+ *           java/lang/invoke/TestStableInt$DefaultStaticValue
  *           java/lang/invoke/TestStableInt$ObjectArrayLowerDim2
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:+FoldStableValues -XX:+UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:-TieredCompilation
+ *                   -XX:+FoldStableValues
+ *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
+ *                   java.lang.invoke.TestStableInt
+ * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:-TieredCompilation
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableInt
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:+FoldStableValues -XX:-UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:+TieredCompilation -XX:TieredStopAtLevel=1
+ *                   -XX:+FoldStableValues
+ *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
+ *                   java.lang.invoke.TestStableInt
+ * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:+TieredCompilation -XX:TieredStopAtLevel=1
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableInt
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:-FoldStableValues -XX:+UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -client -XX:-TieredCompilation
+ *                   -XX:+FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableInt
- *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:-FoldStableValues -XX:-UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -client -XX:-TieredCompilation
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableInt
  */
 package java.lang.invoke;
 
-import com.sun.management.HotSpotDiagnosticMXBean;
-import com.sun.management.VMOption;
-import sun.management.ManagementFactoryHelper;
 import java.lang.reflect.InvocationTargetException;
 
 public class TestStableInt {
+    static final boolean isStableEnabled    = StableConfiguration.isStableEnabled;
+    static final boolean isServerWithStable = StableConfiguration.isServerWithStable;
+
     public static void main(String[] args) throws Exception {
-        System.out.println("@Stable enabled: "+isStableEnabled);
-        System.out.println();
-
         run(DefaultValue.class);
         run(IntStable.class);
+        run(DefaultStaticValue.class);
         run(StaticIntStable.class);
         run(VolatileIntStable.class);
 
@@ -145,6 +161,21 @@
 
     /* ==================================================== */
 
+    static class DefaultStaticValue {
+        public static @Stable int v;
+
+        public static final DefaultStaticValue c = new DefaultStaticValue();
+        public static int get() { return c.v; }
+        public static void test() throws Exception {
+                        int val1 = get();
+            c.v = 1; int val2 = get();
+            assertEquals(val1, 0);
+            assertEquals(val2, 1);
+        }
+    }
+
+    /* ==================================================== */
+
     static class StaticIntStable {
         public static @Stable int v;
 
@@ -188,20 +219,22 @@
                 c.v = new int[1]; c.v[0] = 1; int val1 = get();
                                   c.v[0] = 2; int val2 = get();
                 assertEquals(val1, 1);
-                assertEquals(val2, (isStableEnabled ? 1 : 2));
+                assertEquals(val2, (isServerWithStable ? 1 : 2));
 
                 c.v = new int[1]; c.v[0] = 3; int val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1 : 3));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 3));
             }
 
             {
                 c.v = new int[20]; c.v[10] = 1; int val1 = get1();
                                    c.v[10] = 2; int val2 = get1();
                 assertEquals(val1, 1);
-                assertEquals(val2, (isStableEnabled ? 1 : 2));
+                assertEquals(val2, (isServerWithStable ? 1 : 2));
 
                 c.v = new int[20]; c.v[10] = 3; int val3 = get1();
-                assertEquals(val3, (isStableEnabled ? 1 : 3));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 3));
             }
 
             {
@@ -226,19 +259,21 @@
                 c.v = new int[1][1]; c.v[0][0] = 1; int val1 = get();
                                      c.v[0][0] = 2; int val2 = get();
                 assertEquals(val1, 1);
-                assertEquals(val2, (isStableEnabled ? 1 : 2));
+                assertEquals(val2, (isServerWithStable ? 1 : 2));
 
                 c.v = new int[1][1]; c.v[0][0] = 3; int val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1 : 3));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 3));
 
                 c.v[0] = new int[1]; c.v[0][0] = 4; int val4 = get();
-                assertEquals(val4, (isStableEnabled ? 1 : 4));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 4));
             }
 
             {
                 c.v = new int[1][1]; int[] val1 = get1();
                 c.v[0] = new int[1]; int[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -264,28 +299,31 @@
                 c.v = new int[1][1][1]; c.v[0][0][0] = 1; int val1 = get();
                                         c.v[0][0][0] = 2; int val2 = get();
                 assertEquals(val1, 1);
-                assertEquals(val2, (isStableEnabled ? 1 : 2));
+                assertEquals(val2, (isServerWithStable ? 1 : 2));
 
                 c.v = new int[1][1][1]; c.v[0][0][0] = 3; int val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1 : 3));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 3));
 
                 c.v[0] = new int[1][1]; c.v[0][0][0] = 4; int val4 = get();
-                assertEquals(val4, (isStableEnabled ? 1 : 4));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 4));
 
                 c.v[0][0] = new int[1]; c.v[0][0][0] = 5; int val5 = get();
-                assertEquals(val5, (isStableEnabled ? 1 : 5));
+                assertEquals(val5, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 5));
             }
 
             {
                 c.v = new int[1][1][1]; int[] val1 = get1();
                 c.v[0][0] = new int[1]; int[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new int[1][1][1]; int[][] val1 = get2();
                 c.v[0] = new int[1][1]; int[][] val2 = get2();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -312,37 +350,41 @@
                 c.v = new int[1][1][1][1]; c.v[0][0][0][0] = 1; int val1 = get();
                                            c.v[0][0][0][0] = 2; int val2 = get();
                 assertEquals(val1, 1);
-                assertEquals(val2, (isStableEnabled ? 1 : 2));
+                assertEquals(val2, (isServerWithStable ? 1 : 2));
 
                 c.v = new int[1][1][1][1]; c.v[0][0][0][0] = 3; int val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1 : 3));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 3));
 
                 c.v[0] = new int[1][1][1]; c.v[0][0][0][0] = 4; int val4 = get();
-                assertEquals(val4, (isStableEnabled ? 1 : 4));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 4));
 
                 c.v[0][0] = new int[1][1]; c.v[0][0][0][0] = 5; int val5 = get();
-                assertEquals(val5, (isStableEnabled ? 1 : 5));
+                assertEquals(val5, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 5));
 
                 c.v[0][0][0] = new int[1]; c.v[0][0][0][0] = 6; int val6 = get();
-                assertEquals(val6, (isStableEnabled ? 1 : 6));
+                assertEquals(val6, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 6));
             }
 
             {
                 c.v = new int[1][1][1][1]; int[] val1 = get1();
                 c.v[0][0][0] = new int[1]; int[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new int[1][1][1][1]; int[][] val1 = get2();
                 c.v[0][0] = new int[1][1]; int[][] val2 = get2();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new int[1][1][1][1]; int[][][] val1 = get3();
                 c.v[0] = new int[1][1][1]; int[][][] val2 = get3();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -350,13 +392,11 @@
                 c.v = new int[1][1][1][1]; int[][][][] val2 = get4();
                 assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
             }
-
         }
     }
 
     /* ==================================================== */
     // Dynamic Dim is higher than static
-
     static class ObjectArrayLowerDim0 {
         public @Stable Object v;
 
@@ -404,7 +444,7 @@
                 c.v = new int[1][1]; c.v[0] = new int[0]; int[] val1 = get1();
                                      c.v[0] = new int[0]; int[] val2 = get1();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -440,14 +480,14 @@
                 c.v = new int[1][1][1]; c.v[0][0] = new int[0]; int[] val1 = get1();
                                         c.v[0][0] = new int[0]; int[] val2 = get1();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new int[1][1][1]; c.v[0] = new int[0][0]; int[][] val1 = get2();
                                         c.v[0] = new int[0][0]; int[][] val2 = get2();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -582,7 +622,7 @@
                                elem.a = 2; int val3 = get(); int val4 = get1();
 
                 assertEquals(val1, 1);
-                assertEquals(val3, (isStableEnabled ? 1 : 2));
+                assertEquals(val3, (isServerWithStable ? 1 : 2));
 
                 assertEquals(val2, 1);
                 assertEquals(val4, 2);
@@ -616,17 +656,4 @@
             }
         }
     }
-
-    static final boolean isStableEnabled;
-    static {
-        HotSpotDiagnosticMXBean diagnostic
-                = ManagementFactoryHelper.getDiagnosticMXBean();
-        VMOption tmp;
-        try {
-            tmp = diagnostic.getVMOption("FoldStableValues");
-        } catch (IllegalArgumentException e) {
-            tmp = null;
-        }
-        isStableEnabled = (tmp == null ? false : Boolean.parseBoolean(tmp.getValue()));
-    }
 }
--- a/hotspot/test/compiler/stable/TestStableLong.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/test/compiler/stable/TestStableLong.java	Tue Aug 05 12:14:11 2014 -0700
@@ -26,9 +26,11 @@
 /*
  * @test TestStableLong
  * @summary tests on stable fields and arrays
- * @library /testlibrary
- * @compile -XDignore.symbol.file TestStableLong.java
+ * @library /testlibrary /testlibrary/whitebox
+ * @build TestStableLong StableConfiguration sun.hotspot.WhiteBox
+ * @run main ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main ClassFileInstaller
+ *           java/lang/invoke/StableConfiguration
  *           java/lang/invoke/TestStableLong
  *           java/lang/invoke/TestStableLong$LongStable
  *           java/lang/invoke/TestStableLong$StaticLongStable
@@ -48,46 +50,60 @@
  *           java/lang/invoke/TestStableLong$NestedStableField3
  *           java/lang/invoke/TestStableLong$NestedStableField3$A
  *           java/lang/invoke/TestStableLong$DefaultValue
+ *           java/lang/invoke/TestStableLong$DefaultStaticValue
  *           java/lang/invoke/TestStableLong$ObjectArrayLowerDim2
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:+FoldStableValues -XX:+UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:-TieredCompilation
+ *                   -XX:+FoldStableValues
+ *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
+ *                   java.lang.invoke.TestStableLong
+ * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:-TieredCompilation
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableLong
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:+FoldStableValues -XX:-UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:+TieredCompilation -XX:TieredStopAtLevel=1
+ *                   -XX:+FoldStableValues
+ *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
+ *                   java.lang.invoke.TestStableLong
+ * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:+TieredCompilation -XX:TieredStopAtLevel=1
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableLong
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:-FoldStableValues -XX:+UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -client -XX:-TieredCompilation
+ *                   -XX:+FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableLong
- *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:-FoldStableValues -XX:-UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -client -XX:-TieredCompilation
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableLong
  */
 package java.lang.invoke;
 
-import com.sun.management.HotSpotDiagnosticMXBean;
-import com.sun.management.VMOption;
-import sun.management.ManagementFactoryHelper;
 import java.lang.reflect.InvocationTargetException;
 
 public class TestStableLong {
+    static final boolean isStableEnabled    = StableConfiguration.isStableEnabled;
+    static final boolean isServerWithStable = StableConfiguration.isServerWithStable;
+
     public static void main(String[] args) throws Exception {
-        System.out.println("@Stable enabled: "+isStableEnabled);
-        System.out.println();
-
         run(DefaultValue.class);
         run(LongStable.class);
+        run(DefaultStaticValue.class);
         run(StaticLongStable.class);
         run(VolatileLongStable.class);
 
@@ -145,6 +161,21 @@
 
     /* ==================================================== */
 
+    static class DefaultStaticValue {
+        public static @Stable long v;
+
+        public static final DefaultStaticValue c = new DefaultStaticValue();
+        public static long get() { return c.v; }
+        public static void test() throws Exception {
+                      long val1 = get();
+            c.v = 1L; long val2 = get();
+            assertEquals(val1, 0);
+            assertEquals(val2, 1L);
+        }
+    }
+
+    /* ==================================================== */
+
     static class StaticLongStable {
         public static @Stable long v;
 
@@ -188,20 +219,22 @@
                 c.v = new long[1]; c.v[0] = 1; long val1 = get();
                                    c.v[0] = 2; long val2 = get();
                 assertEquals(val1, 1);
-                assertEquals(val2, (isStableEnabled ? 1 : 2));
+                assertEquals(val2, (isServerWithStable ? 1 : 2));
 
                 c.v = new long[1]; c.v[0] = 3; long val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1 : 3));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 3));
             }
 
             {
                 c.v = new long[20]; c.v[10] = 1; long val1 = get1();
                                     c.v[10] = 2; long val2 = get1();
                 assertEquals(val1, 1);
-                assertEquals(val2, (isStableEnabled ? 1 : 2));
+                assertEquals(val2, (isServerWithStable ? 1 : 2));
 
                 c.v = new long[20]; c.v[10] = 3; long val3 = get1();
-                assertEquals(val3, (isStableEnabled ? 1 : 3));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 3));
             }
 
             {
@@ -226,19 +259,21 @@
                 c.v = new long[1][1]; c.v[0][0] = 1; long val1 = get();
                                       c.v[0][0] = 2; long val2 = get();
                 assertEquals(val1, 1);
-                assertEquals(val2, (isStableEnabled ? 1 : 2));
+                assertEquals(val2, (isServerWithStable ? 1 : 2));
 
                 c.v = new long[1][1]; c.v[0][0] = 3; long val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1 : 3));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 3));
 
                 c.v[0] = new long[1]; c.v[0][0] = 4; long val4 = get();
-                assertEquals(val4, (isStableEnabled ? 1 : 4));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 4));
             }
 
             {
                 c.v = new long[1][1]; long[] val1 = get1();
                 c.v[0] = new long[1]; long[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -264,28 +299,31 @@
                 c.v = new long[1][1][1]; c.v[0][0][0] = 1; long val1 = get();
                                          c.v[0][0][0] = 2; long val2 = get();
                 assertEquals(val1, 1);
-                assertEquals(val2, (isStableEnabled ? 1 : 2));
+                assertEquals(val2, (isServerWithStable ? 1 : 2));
 
                 c.v = new long[1][1][1]; c.v[0][0][0] = 3; long val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1 : 3));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 3));
 
                 c.v[0] = new long[1][1]; c.v[0][0][0] = 4; long val4 = get();
-                assertEquals(val4, (isStableEnabled ? 1 : 4));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 4));
 
                 c.v[0][0] = new long[1]; c.v[0][0][0] = 5; long val5 = get();
-                assertEquals(val5, (isStableEnabled ? 1 : 5));
+                assertEquals(val5, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 5));
             }
 
             {
                 c.v = new long[1][1][1]; long[] val1 = get1();
                 c.v[0][0] = new long[1]; long[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new long[1][1][1]; long[][] val1 = get2();
                 c.v[0] = new long[1][1]; long[][] val2 = get2();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -312,37 +350,41 @@
                 c.v = new long[1][1][1][1]; c.v[0][0][0][0] = 1; long val1 = get();
                                             c.v[0][0][0][0] = 2; long val2 = get();
                 assertEquals(val1, 1);
-                assertEquals(val2, (isStableEnabled ? 1 : 2));
+                assertEquals(val2, (isServerWithStable ? 1 : 2));
 
                 c.v = new long[1][1][1][1]; c.v[0][0][0][0] = 3; long val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1 : 3));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 3));
 
                 c.v[0] = new long[1][1][1]; c.v[0][0][0][0] = 4; long val4 = get();
-                assertEquals(val4, (isStableEnabled ? 1 : 4));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 4));
 
                 c.v[0][0] = new long[1][1]; c.v[0][0][0][0] = 5; long val5 = get();
-                assertEquals(val5, (isStableEnabled ? 1 : 5));
+                assertEquals(val5, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 5));
 
                 c.v[0][0][0] = new long[1]; c.v[0][0][0][0] = 6; long val6 = get();
-                assertEquals(val6, (isStableEnabled ? 1 : 6));
+                assertEquals(val6, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 6));
             }
 
             {
                 c.v = new long[1][1][1][1]; long[] val1 = get1();
                 c.v[0][0][0] = new long[1]; long[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new long[1][1][1][1]; long[][] val1 = get2();
                 c.v[0][0] = new long[1][1]; long[][] val2 = get2();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new long[1][1][1][1]; long[][][] val1 = get3();
                 c.v[0] = new long[1][1][1]; long[][][] val2 = get3();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -350,13 +392,11 @@
                 c.v = new long[1][1][1][1]; long[][][][] val2 = get4();
                 assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
             }
-
         }
     }
 
     /* ==================================================== */
     // Dynamic Dim is higher than static
-
     static class ObjectArrayLowerDim0 {
         public @Stable Object v;
 
@@ -404,7 +444,7 @@
                 c.v = new long[1][1]; c.v[0] = new long[0]; long[] val1 = get1();
                                      c.v[0] = new long[0]; long[] val2 = get1();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -440,14 +480,14 @@
                 c.v = new long[1][1][1]; c.v[0][0] = new long[0]; long[] val1 = get1();
                                          c.v[0][0] = new long[0]; long[] val2 = get1();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new long[1][1][1]; c.v[0] = new long[0][0]; long[][] val1 = get2();
                                          c.v[0] = new long[0][0]; long[][] val2 = get2();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -582,7 +622,7 @@
                                elem.a = 2; long val3 = get(); long val4 = get1();
 
                 assertEquals(val1, 1);
-                assertEquals(val3, (isStableEnabled ? 1 : 2));
+                assertEquals(val3, (isServerWithStable ? 1 : 2));
 
                 assertEquals(val2, 1);
                 assertEquals(val4, 2);
@@ -616,17 +656,4 @@
             }
         }
     }
-
-    static final boolean isStableEnabled;
-    static {
-        HotSpotDiagnosticMXBean diagnostic
-                = ManagementFactoryHelper.getDiagnosticMXBean();
-        VMOption tmp;
-        try {
-            tmp = diagnostic.getVMOption("FoldStableValues");
-        } catch (IllegalArgumentException e) {
-            tmp = null;
-        }
-        isStableEnabled = (tmp == null ? false : Boolean.parseBoolean(tmp.getValue()));
-    }
 }
--- a/hotspot/test/compiler/stable/TestStableObject.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/test/compiler/stable/TestStableObject.java	Tue Aug 05 12:14:11 2014 -0700
@@ -26,9 +26,11 @@
 /*
  * @test TestStableObject
  * @summary tests on stable fields and arrays
- * @library /testlibrary
- * @compile -XDignore.symbol.file TestStableObject.java
+ * @library /testlibrary /testlibrary/whitebox
+ * @build TestStableObject StableConfiguration sun.hotspot.WhiteBox
+ * @run main ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main ClassFileInstaller
+ *           java/lang/invoke/StableConfiguration
  *           java/lang/invoke/TestStableObject
  *           java/lang/invoke/TestStableObject$ObjectStable
  *           java/lang/invoke/TestStableObject$StaticObjectStable
@@ -49,46 +51,60 @@
  *           java/lang/invoke/TestStableObject$NestedStableField3$A
  *           java/lang/invoke/TestStableObject$Values
  *           java/lang/invoke/TestStableObject$DefaultValue
+ *           java/lang/invoke/TestStableObject$DefaultStaticValue
  *           java/lang/invoke/TestStableObject$ObjectArrayLowerDim2
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:+FoldStableValues -XX:+UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:-TieredCompilation
+ *                   -XX:+FoldStableValues
+ *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
+ *                   java.lang.invoke.TestStableObject
+ * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:-TieredCompilation
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableObject
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:+FoldStableValues -XX:-UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:+TieredCompilation -XX:TieredStopAtLevel=1
+ *                   -XX:+FoldStableValues
+ *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
+ *                   java.lang.invoke.TestStableObject
+ * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:+TieredCompilation -XX:TieredStopAtLevel=1
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableObject
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:-FoldStableValues -XX:+UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -client -XX:-TieredCompilation
+ *                   -XX:+FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableObject
- *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:-FoldStableValues -XX:-UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -client -XX:-TieredCompilation
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableObject
  */
 package java.lang.invoke;
 
-import com.sun.management.HotSpotDiagnosticMXBean;
-import com.sun.management.VMOption;
-import sun.management.ManagementFactoryHelper;
 import java.lang.reflect.InvocationTargetException;
 
 public class TestStableObject {
+    static final boolean isStableEnabled    = StableConfiguration.isStableEnabled;
+    static final boolean isServerWithStable = StableConfiguration.isServerWithStable;
+
     public static void main(String[] args) throws Exception {
-        System.out.println("@Stable enabled: "+isStableEnabled);
-        System.out.println();
-
         run(DefaultValue.class);
         run(ObjectStable.class);
+        run(DefaultStaticValue.class);
         run(StaticObjectStable.class);
         run(VolatileObjectStable.class);
 
@@ -148,6 +164,21 @@
 
     /* ==================================================== */
 
+    static class DefaultStaticValue {
+        public static @Stable Object v;
+
+        public static final DefaultStaticValue c = new DefaultStaticValue();
+        public static Object get() { return c.v; }
+        public static void test() throws Exception {
+                            Object val1 = get();
+            c.v = Values.A; Object val2 = get();
+            assertEquals(val1, null);
+            assertEquals(val2, Values.A);
+        }
+    }
+
+    /* ==================================================== */
+
     static class StaticObjectStable {
         public static @Stable Values v;
 
@@ -191,20 +222,22 @@
                 c.v = new Object[1]; c.v[0] = Values.A; Object val1 = get();
                                      c.v[0] = Values.B; Object val2 = get();
                 assertEquals(val1, Values.A);
-                assertEquals(val2, (isStableEnabled ? Values.A : Values.B));
+                assertEquals(val2, (isServerWithStable ? Values.A : Values.B));
 
                 c.v = new Object[1]; c.v[0] = Values.C; Object val3 = get();
-                assertEquals(val3, (isStableEnabled ? Values.A : Values.C));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? Values.A : Values.B)
+                                                    : Values.C));
             }
 
             {
                 c.v = new Object[20]; c.v[10] = Values.A; Object val1 = get1();
                                       c.v[10] = Values.B; Object val2 = get1();
                 assertEquals(val1, Values.A);
-                assertEquals(val2, (isStableEnabled ? Values.A : Values.B));
+                assertEquals(val2, (isServerWithStable ? Values.A : Values.B));
 
                 c.v = new Object[20]; c.v[10] = Values.C; Object val3 = get1();
-                assertEquals(val3, (isStableEnabled ? Values.A : Values.C));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? Values.A : Values.B)
+                                                    : Values.C));
             }
 
             {
@@ -229,19 +262,21 @@
                 c.v = new Object[1][1]; c.v[0][0] = Values.A; Object val1 = get();
                                         c.v[0][0] = Values.B; Object val2 = get();
                 assertEquals(val1, Values.A);
-                assertEquals(val2, (isStableEnabled ? Values.A : Values.B));
+                assertEquals(val2, (isServerWithStable ? Values.A : Values.B));
 
                 c.v = new Object[1][1]; c.v[0][0] = Values.C; Object val3 = get();
-                assertEquals(val3, (isStableEnabled ? Values.A : Values.C));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? Values.A : Values.B)
+                                                    : Values.C));
 
                 c.v[0] = new Object[1]; c.v[0][0] = Values.D; Object val4 = get();
-                assertEquals(val4, (isStableEnabled ? Values.A : Values.D));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? Values.A : Values.B)
+                                                    : Values.D));
             }
 
             {
                 c.v = new Object[1][1]; Object[] val1 = get1();
                 c.v[0] = new Object[1]; Object[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -267,28 +302,31 @@
                 c.v = new Object[1][1][1]; c.v[0][0][0] = Values.A; Object val1 = get();
                                            c.v[0][0][0] = Values.B; Object val2 = get();
                 assertEquals(val1, Values.A);
-                assertEquals(val2, (isStableEnabled ? Values.A : Values.B));
+                assertEquals(val2, (isServerWithStable ? Values.A : Values.B));
 
                 c.v = new Object[1][1][1]; c.v[0][0][0] = Values.C; Object val3 = get();
-                assertEquals(val3, (isStableEnabled ? Values.A : Values.C));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? Values.A : Values.B)
+                                                    : Values.C));
 
                 c.v[0] = new Object[1][1]; c.v[0][0][0] = Values.D; Object val4 = get();
-                assertEquals(val4, (isStableEnabled ? Values.A : Values.D));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? Values.A : Values.B)
+                                                    : Values.D));
 
                 c.v[0][0] = new Object[1]; c.v[0][0][0] = Values.E; Object val5 = get();
-                assertEquals(val5, (isStableEnabled ? Values.A : Values.E));
+                assertEquals(val5, (isStableEnabled ? (isServerWithStable ? Values.A : Values.B)
+                                                    : Values.E));
             }
 
             {
                 c.v = new Object[1][1][1]; Object[] val1 = get1();
                 c.v[0][0] = new Object[1]; Object[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new Object[1][1][1]; Object[][] val1 = get2();
                 c.v[0] = new Object[1][1]; Object[][] val2 = get2();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -315,37 +353,41 @@
                 c.v = new Object[1][1][1][1]; c.v[0][0][0][0] = Values.A; Object val1 = get();
                                               c.v[0][0][0][0] = Values.B; Object val2 = get();
                 assertEquals(val1, Values.A);
-                assertEquals(val2, (isStableEnabled ? Values.A : Values.B));
+                assertEquals(val2, (isServerWithStable ? Values.A : Values.B));
 
                 c.v = new Object[1][1][1][1]; c.v[0][0][0][0] = Values.C; Object val3 = get();
-                assertEquals(val3, (isStableEnabled ? Values.A : Values.C));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? Values.A : Values.B)
+                                                    : Values.C));
 
                 c.v[0] = new Object[1][1][1]; c.v[0][0][0][0] = Values.D; Object val4 = get();
-                assertEquals(val4, (isStableEnabled ? Values.A : Values.D));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? Values.A : Values.B)
+                                                    : Values.D));
 
                 c.v[0][0] = new Object[1][1]; c.v[0][0][0][0] = Values.E; Object val5 = get();
-                assertEquals(val5, (isStableEnabled ? Values.A : Values.E));
+                assertEquals(val5, (isStableEnabled ? (isServerWithStable ? Values.A : Values.B)
+                                                    : Values.E));
 
                 c.v[0][0][0] = new Object[1]; c.v[0][0][0][0] = Values.F; Object val6 = get();
-                assertEquals(val6, (isStableEnabled ? Values.A : Values.F));
+                assertEquals(val6, (isStableEnabled ? (isServerWithStable ? Values.A : Values.B)
+                                                    : Values.F));
             }
 
             {
                 c.v = new Object[1][1][1][1]; Object[] val1 = get1();
                 c.v[0][0][0] = new Object[1]; Object[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new Object[1][1][1][1]; Object[][] val1 = get2();
                 c.v[0][0] = new Object[1][1]; Object[][] val2 = get2();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new Object[1][1][1][1]; Object[][][] val1 = get3();
                 c.v[0] = new Object[1][1][1]; Object[][][] val2 = get3();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -353,13 +395,11 @@
                 c.v = new Object[1][1][1][1]; Object[][][][] val2 = get4();
                 assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
             }
-
         }
     }
 
     /* ==================================================== */
     // Dynamic Dim is higher than static
-
     static class ObjectArrayLowerDim0 {
         public @Stable Object v;
 
@@ -407,7 +447,7 @@
                 c.v = new Object[1][1]; c.v[0] = new Object[0]; Object[] val1 = get1();
                                      c.v[0] = new Object[0]; Object[] val2 = get1();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -443,14 +483,14 @@
                 c.v = new Object[1][1][1]; c.v[0][0] = new Object[0]; Object[] val1 = get1();
                                            c.v[0][0] = new Object[0]; Object[] val2 = get1();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new Object[1][1][1]; c.v[0] = new Object[0][0]; Object[][] val1 = get2();
                                            c.v[0] = new Object[0][0]; Object[][] val2 = get2();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -585,7 +625,7 @@
                                elem.a = Values.B; Object val3 = get(); Object val4 = get1();
 
                 assertEquals(val1, Values.A);
-                assertEquals(val3, (isStableEnabled ? Values.A : Values.B));
+                assertEquals(val3, (isServerWithStable ? Values.A : Values.B));
 
                 assertEquals(val2, Values.A);
                 assertEquals(val4, Values.B);
@@ -619,17 +659,4 @@
             }
         }
     }
-
-    static final boolean isStableEnabled;
-    static {
-        HotSpotDiagnosticMXBean diagnostic
-                = ManagementFactoryHelper.getDiagnosticMXBean();
-        VMOption tmp;
-        try {
-            tmp = diagnostic.getVMOption("FoldStableValues");
-        } catch (IllegalArgumentException e) {
-            tmp = null;
-        }
-        isStableEnabled = (tmp == null ? false : Boolean.parseBoolean(tmp.getValue()));
-    }
 }
--- a/hotspot/test/compiler/stable/TestStableShort.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/hotspot/test/compiler/stable/TestStableShort.java	Tue Aug 05 12:14:11 2014 -0700
@@ -26,9 +26,11 @@
 /*
  * @test TestStableShort
  * @summary tests on stable fields and arrays
- * @library /testlibrary
- * @compile -XDignore.symbol.file TestStableShort.java
+ * @library /testlibrary /testlibrary/whitebox
+ * @build TestStableShort StableConfiguration sun.hotspot.WhiteBox
+ * @run main ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main ClassFileInstaller
+ *           java/lang/invoke/StableConfiguration
  *           java/lang/invoke/TestStableShort
  *           java/lang/invoke/TestStableShort$ShortStable
  *           java/lang/invoke/TestStableShort$StaticShortStable
@@ -48,46 +50,60 @@
  *           java/lang/invoke/TestStableShort$NestedStableField3
  *           java/lang/invoke/TestStableShort$NestedStableField3$A
  *           java/lang/invoke/TestStableShort$DefaultValue
+ *           java/lang/invoke/TestStableShort$DefaultStaticValue
  *           java/lang/invoke/TestStableShort$ObjectArrayLowerDim2
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:+FoldStableValues -XX:+UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:-TieredCompilation
+ *                   -XX:+FoldStableValues
+ *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
+ *                   java.lang.invoke.TestStableShort
+ * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:-TieredCompilation
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableShort
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:+FoldStableValues -XX:-UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:+TieredCompilation -XX:TieredStopAtLevel=1
+ *                   -XX:+FoldStableValues
+ *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
+ *                   java.lang.invoke.TestStableShort
+ * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -server -XX:+TieredCompilation -XX:TieredStopAtLevel=1
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableShort
  *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:-FoldStableValues -XX:+UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -client -XX:-TieredCompilation
+ *                   -XX:+FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableShort
- *
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions
- *                   -XX:+UnlockDiagnosticVMOptions -XX:-FoldStableValues -XX:-UseCompressedOop
- *                   -server -XX:-TieredCompilation -Xcomp
+ *                   -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
+ *                   -client -XX:-TieredCompilation
+ *                   -XX:-FoldStableValues
  *                   -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
  *                   java.lang.invoke.TestStableShort
  */
 package java.lang.invoke;
 
-import com.sun.management.HotSpotDiagnosticMXBean;
-import com.sun.management.VMOption;
-import sun.management.ManagementFactoryHelper;
 import java.lang.reflect.InvocationTargetException;
 
 public class TestStableShort {
+    static final boolean isStableEnabled    = StableConfiguration.isStableEnabled;
+    static final boolean isServerWithStable = StableConfiguration.isServerWithStable;
+
     public static void main(String[] args) throws Exception {
-        System.out.println("@Stable enabled: "+isStableEnabled);
-        System.out.println();
-
         run(DefaultValue.class);
         run(ShortStable.class);
+        run(DefaultStaticValue.class);
         run(StaticShortStable.class);
         run(VolatileShortStable.class);
 
@@ -145,6 +161,21 @@
 
     /* ==================================================== */
 
+    static class DefaultStaticValue {
+        public static @Stable short v;
+
+        public static final DefaultStaticValue c = new DefaultStaticValue();
+        public static short get() { return c.v; }
+        public static void test() throws Exception {
+                     short val1 = get();
+            c.v = 1; short val2 = get();
+            assertEquals(val1, 0);
+            assertEquals(val2, 1);
+        }
+    }
+
+    /* ==================================================== */
+
     static class StaticShortStable {
         public static @Stable short v;
 
@@ -188,20 +219,22 @@
                 c.v = new short[1]; c.v[0] = 1; short val1 = get();
                                     c.v[0] = 2; short val2 = get();
                 assertEquals(val1, 1);
-                assertEquals(val2, (isStableEnabled ? 1 : 2));
+                assertEquals(val2, (isServerWithStable ? 1 : 2));
 
                 c.v = new short[1]; c.v[0] = 3; short val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1 : 3));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 3));
             }
 
             {
                 c.v = new short[20]; c.v[10] = 1; short val1 = get1();
                                      c.v[10] = 2; short val2 = get1();
                 assertEquals(val1, 1);
-                assertEquals(val2, (isStableEnabled ? 1 : 2));
+                assertEquals(val2, (isServerWithStable ? 1 : 2));
 
                 c.v = new short[20]; c.v[10] = 3; short val3 = get1();
-                assertEquals(val3, (isStableEnabled ? 1 : 3));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 3));
             }
 
             {
@@ -226,19 +259,21 @@
                 c.v = new short[1][1]; c.v[0][0] = 1; short val1 = get();
                                        c.v[0][0] = 2; short val2 = get();
                 assertEquals(val1, 1);
-                assertEquals(val2, (isStableEnabled ? 1 : 2));
+                assertEquals(val2, (isServerWithStable ? 1 : 2));
 
                 c.v = new short[1][1]; c.v[0][0] = 3; short val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1 : 3));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 3));
 
                 c.v[0] = new short[1]; c.v[0][0] = 4; short val4 = get();
-                assertEquals(val4, (isStableEnabled ? 1 : 4));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 4));
             }
 
             {
                 c.v = new short[1][1]; short[] val1 = get1();
                 c.v[0] = new short[1]; short[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -264,28 +299,31 @@
                 c.v = new short[1][1][1]; c.v[0][0][0] = 1; short val1 = get();
                                           c.v[0][0][0] = 2; short val2 = get();
                 assertEquals(val1, 1);
-                assertEquals(val2, (isStableEnabled ? 1 : 2));
+                assertEquals(val2, (isServerWithStable ? 1 : 2));
 
                 c.v = new short[1][1][1]; c.v[0][0][0] = 3; short val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1 : 3));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 3));
 
                 c.v[0] = new short[1][1]; c.v[0][0][0] = 4; short val4 = get();
-                assertEquals(val4, (isStableEnabled ? 1 : 4));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 4));
 
                 c.v[0][0] = new short[1]; c.v[0][0][0] = 5; short val5 = get();
-                assertEquals(val5, (isStableEnabled ? 1 : 5));
+                assertEquals(val5, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 5));
             }
 
             {
                 c.v = new short[1][1][1]; short[] val1 = get1();
                 c.v[0][0] = new short[1]; short[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new short[1][1][1]; short[][] val1 = get2();
                 c.v[0] = new short[1][1]; short[][] val2 = get2();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -312,37 +350,41 @@
                 c.v = new short[1][1][1][1]; c.v[0][0][0][0] = 1; short val1 = get();
                                              c.v[0][0][0][0] = 2; short val2 = get();
                 assertEquals(val1, 1);
-                assertEquals(val2, (isStableEnabled ? 1 : 2));
+                assertEquals(val2, (isServerWithStable ? 1 : 2));
 
                 c.v = new short[1][1][1][1]; c.v[0][0][0][0] = 3; short val3 = get();
-                assertEquals(val3, (isStableEnabled ? 1 : 3));
+                assertEquals(val3, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 3));
 
                 c.v[0] = new short[1][1][1]; c.v[0][0][0][0] = 4; short val4 = get();
-                assertEquals(val4, (isStableEnabled ? 1 : 4));
+                assertEquals(val4, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 4));
 
                 c.v[0][0] = new short[1][1]; c.v[0][0][0][0] = 5; short val5 = get();
-                assertEquals(val5, (isStableEnabled ? 1 : 5));
+                assertEquals(val5, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 5));
 
                 c.v[0][0][0] = new short[1]; c.v[0][0][0][0] = 6; short val6 = get();
-                assertEquals(val6, (isStableEnabled ? 1 : 6));
+                assertEquals(val6, (isStableEnabled ? (isServerWithStable ? 1 : 2)
+                                                    : 6));
             }
 
             {
                 c.v = new short[1][1][1][1]; short[] val1 = get1();
                 c.v[0][0][0] = new short[1]; short[] val2 = get1();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new short[1][1][1][1]; short[][] val1 = get2();
                 c.v[0][0] = new short[1][1]; short[][] val2 = get2();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new short[1][1][1][1]; short[][][] val1 = get3();
                 c.v[0] = new short[1][1][1]; short[][][] val2 = get3();
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -350,13 +392,11 @@
                 c.v = new short[1][1][1][1]; short[][][][] val2 = get4();
                 assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
             }
-
         }
     }
 
     /* ==================================================== */
     // Dynamic Dim is higher than static
-
     static class ObjectArrayLowerDim0 {
         public @Stable Object v;
 
@@ -404,7 +444,7 @@
                 c.v = new short[1][1]; c.v[0] = new short[0]; short[] val1 = get1();
                                        c.v[0] = new short[0]; short[] val2 = get1();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -440,14 +480,14 @@
                 c.v = new short[1][1][1]; c.v[0][0] = new short[0]; short[] val1 = get1();
                                           c.v[0][0] = new short[0]; short[] val2 = get1();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
                 c.v = new short[1][1][1]; c.v[0] = new short[0][0]; short[][] val1 = get2();
                                           c.v[0] = new short[0][0]; short[][] val2 = get2();
 
-                assertTrue((isStableEnabled ? (val1 == val2) : (val1 != val2)));
+                assertTrue((isServerWithStable ? (val1 == val2) : (val1 != val2)));
             }
 
             {
@@ -582,7 +622,7 @@
                                elem.a = 2; short val3 = get(); short val4 = get1();
 
                 assertEquals(val1, 1);
-                assertEquals(val3, (isStableEnabled ? 1 : 2));
+                assertEquals(val3, (isServerWithStable ? 1 : 2));
 
                 assertEquals(val2, 1);
                 assertEquals(val4, 2);
@@ -616,17 +656,4 @@
             }
         }
     }
-
-    static final boolean isStableEnabled;
-    static {
-        HotSpotDiagnosticMXBean diagnostic
-                = ManagementFactoryHelper.getDiagnosticMXBean();
-        VMOption tmp;
-        try {
-            tmp = diagnostic.getVMOption("FoldStableValues");
-        } catch (IllegalArgumentException e) {
-            tmp = null;
-        }
-        isStableEnabled = (tmp == null ? false : Boolean.parseBoolean(tmp.getValue()));
-    }
 }
--- a/hotspot/test/compiler/uncommontrap/TestSpecTrapClassUnloading.java	Tue Aug 05 15:39:05 2014 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 8031752
- * @summary speculative traps need to be cleaned up at GC
- * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-TieredCompilation -XX:-UseOnStackReplacement -XX:-BackgroundCompilation -XX:+UseTypeSpeculation -XX:TypeProfileLevel=222 -XX:CompileCommand=exclude,java.lang.reflect.Method::invoke -XX:CompileCommand=exclude,sun.reflect.DelegatingMethodAccessorImpl::invoke -Xmx512M TestSpecTrapClassUnloading
- *
- */
-
-import java.lang.reflect.Method;
-
-public class TestSpecTrapClassUnloading {
-    static class B {
-        final public boolean m(Object o) {
-            if (o.getClass() == B.class) {
-                return true;
-            }
-            return false;
-        }
-    }
-
-    static class MemoryChunk {
-        MemoryChunk other;
-        long[] array;
-        MemoryChunk(MemoryChunk other) {
-            this.other = other;
-            array = new long[1024 * 1024 * 1024];
-        }
-    }
-
-    static void m1(B b, Object o) {
-        b.m(o);
-    }
-
-    static void m2(B b, Object o) {
-        b.m(o);
-    }
-
-    public static void main(String[] args) throws Exception {
-        Method m = B.class.getMethod("m", Object.class);
-        Object o = new Object();
-        B b = new B();
-
-        // add speculative trap in B.m() for m1
-        for (int i = 0; i < 20000; i++) {
-            m1(b, b);
-        }
-        m1(b, o);
-
-        // add speculative trap in B.m() for code generated by reflection
-        for (int i = 0; i < 20000; i++) {
-            m.invoke(b, b);
-        }
-        m.invoke(b, o);
-
-        m = null;
-
-        // add speculative trap in B.m() for m2
-        for (int i = 0; i < 20000; i++) {
-            m2(b, b);
-        }
-        m2(b, o);
-
-        // Exhaust memory which causes the code generated by
-        // reflection to be unloaded but B.m() is not.
-        MemoryChunk root = null;
-        try {
-            while (true) {
-                root = new MemoryChunk(root);
-            }
-        } catch(OutOfMemoryError e) {
-            root = null;
-        }
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/CommandLine/TraceExceptionsTest.java	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.    See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8048933
+ * @summary TraceExceptions output should have the exception message - useful for ClassNotFoundExceptions especially
+ * @library /testlibrary
+ */
+
+import com.oracle.java.testlibrary.*;
+
+public class TraceExceptionsTest {
+    public static void main(String[] args) throws Exception {
+
+        if (!Platform.isDebugBuild()) {
+          System.out.println("Skip the test on product builds since XX:+TraceExceptions is not available on product builds");
+          return;
+        }
+
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+            "-XX:+TraceExceptions", "NoClassFound");
+        OutputAnalyzer output = new OutputAnalyzer(pb.start());
+        output.shouldContain("<a 'java/lang/ClassNotFoundException': NoClassFound>");
+        output.shouldNotContain("<a 'java/lang/ClassNotFoundException'>");
+        output.shouldHaveExitValue(1);
+    }
+}
--- a/jaxp/.hgtags	Tue Aug 05 15:39:05 2014 +0400
+++ b/jaxp/.hgtags	Tue Aug 05 12:14:11 2014 -0700
@@ -266,3 +266,4 @@
 7eb0ab676ea75cb1dd31c613e77008a7d8cb0af7 jdk9-b21
 82b94ff002c6e007a03bf0f364ca94b381e09135 jdk9-b22
 2e5b63006187bfc64d8eace374dbc2806267a160 jdk9-b23
+345af113f57206711f75089c3ebf84a36a789122 jdk9-b24
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaLoader.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaLoader.java	Tue Aug 05 12:14:11 2014 -0700
@@ -54,6 +54,7 @@
 import com.sun.org.apache.xerces.internal.util.SymbolTable;
 import com.sun.org.apache.xerces.internal.util.XMLSymbols;
 import com.sun.org.apache.xerces.internal.utils.SecuritySupport;
+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager;
 import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager;
 import com.sun.org.apache.xerces.internal.xni.XNIException;
 import com.sun.org.apache.xerces.internal.xni.grammars.Grammar;
@@ -982,6 +983,18 @@
      */
     public void reset(XMLComponentManager componentManager) throws XMLConfigurationException {
 
+        XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager)componentManager.getProperty(XML_SECURITY_PROPERTY_MANAGER);
+        if (spm == null) {
+            spm = new XMLSecurityPropertyManager();
+            setProperty(XML_SECURITY_PROPERTY_MANAGER, spm);
+        }
+
+        XMLSecurityManager sm = (XMLSecurityManager)componentManager.getProperty(SECURITY_MANAGER);
+        if (sm == null)
+            setProperty(SECURITY_MANAGER,new XMLSecurityManager(true));
+
+        faccessExternalSchema = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_SCHEMA);
+
         fGrammarBucket.reset();
 
         fSubGroupHandler.reset();
@@ -1065,9 +1078,6 @@
         // get generate-synthetic-annotations feature
         fSchemaHandler.setGenerateSyntheticAnnotations(componentManager.getFeature(GENERATE_SYNTHETIC_ANNOTATIONS, false));
         fSchemaHandler.reset(componentManager);
-
-        XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager)componentManager.getProperty(XML_SECURITY_PROPERTY_MANAGER);
-        faccessExternalSchema = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_SCHEMA);
     }
 
     private void initGrammarBucket(){
--- a/jaxws/.hgtags	Tue Aug 05 15:39:05 2014 +0400
+++ b/jaxws/.hgtags	Tue Aug 05 12:14:11 2014 -0700
@@ -269,3 +269,4 @@
 4a099451fd7e17b6cc4772fe9547907576a45b6f jdk9-b21
 7f5e5902cde75fd9335c52f469491f061fe0239e jdk9-b22
 ce19e0403ec8a80223cc47320c905b2a4d45881d jdk9-b23
+0b35542d6bf32af23a9fc59a37c52aa091fee388 jdk9-b24
--- a/jaxws/src/share/jaf_classes/javax/activation/CommandMap.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jaxws/src/share/jaf_classes/javax/activation/CommandMap.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -93,10 +93,11 @@
                 // otherwise, we also allow it if this code and the
                 // factory come from the same (non-system) class loader (e.g.,
                 // the JAF classes were loaded with the applet classes).
-                if (CommandMap.class.getClassLoader() == null ||
-                    CommandMap.class.getClassLoader() !=
-                            commandMap.getClass().getClassLoader())
+                ClassLoader cl = CommandMap.class.getClassLoader();
+                if (cl == null || cl.getParent() == null ||
+                    cl != commandMap.getClass().getClassLoader()) {
                     throw ex;
+                }
             }
         }
         // remove any per-thread-context-class-loader CommandMap
--- a/jaxws/src/share/jaf_classes/javax/activation/FileTypeMap.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jaxws/src/share/jaf_classes/javax/activation/FileTypeMap.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -96,9 +96,9 @@
                 // otherwise, we also allow it if this code and the
                 // factory come from the same (non-system) class loader (e.g.,
                 // the JAF classes were loaded with the applet classes).
-                if (FileTypeMap.class.getClassLoader() == null ||
-                    FileTypeMap.class.getClassLoader() !=
-                        fileTypeMap.getClass().getClassLoader())
+                ClassLoader cl = FileTypeMap.class.getClassLoader();
+                if (cl == null || cl.getParent() == null ||
+                    cl != fileTypeMap.getClass().getClassLoader())
                     throw ex;
             }
         }
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java	Tue Aug 05 12:14:11 2014 -0700
@@ -35,6 +35,8 @@
 import java.lang.reflect.Type;
 import java.lang.reflect.TypeVariable;
 import java.lang.reflect.WildcardType;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.Arrays;
 import java.util.Collection;
 
@@ -264,20 +266,38 @@
         return clazz.getSimpleName();
     }
 
-    public Collection<? extends Field> getDeclaredFields(Class clazz) {
-        return Arrays.asList(clazz.getDeclaredFields());
+    public Collection<? extends Field> getDeclaredFields(final Class clazz) {
+        Field[] fields = AccessController.doPrivileged(new PrivilegedAction<Field[]>() {
+            @Override
+            public Field[] run() {
+                return clazz.getDeclaredFields();
+            }
+        });
+        return Arrays.asList(fields);
     }
 
-    public Field getDeclaredField(Class clazz, String fieldName) {
-        try {
-            return clazz.getDeclaredField(fieldName);
-        } catch (NoSuchFieldException e) {
-            return null;
-        }
+    public Field getDeclaredField(final Class clazz, final String fieldName) {
+        return AccessController.doPrivileged(new PrivilegedAction<Field>() {
+            @Override
+            public Field run() {
+                try {
+                    return clazz.getDeclaredField(fieldName);
+                } catch (NoSuchFieldException e) {
+                    return null;
+                }
+            }
+        });
     }
 
-    public Collection<? extends Method> getDeclaredMethods(Class clazz) {
-        return Arrays.asList(clazz.getDeclaredMethods());
+    public Collection<? extends Method> getDeclaredMethods(final Class clazz) {
+        Method[] methods =
+            AccessController.doPrivileged(new PrivilegedAction<Method[]>() {
+                @Override
+                public Method[] run() {
+                    return clazz.getDeclaredMethods();
+                }
+            });
+        return Arrays.asList(methods);
     }
 
     public Class getDeclaringClassForField(Field field) {
@@ -565,7 +585,7 @@
         return method.isBridge();
     }
 
-    public boolean isOverriding(Method method, Class base) {
+    public boolean isOverriding(Method method, final Class base) {
         // this isn't actually correct,
         // as the JLS considers
         // class Derived extends Base<Integer> {
@@ -576,22 +596,30 @@
         // }
         // to be overrided. Handling this correctly needs a careful implementation
 
-        String name = method.getName();
-        Class[] params = method.getParameterTypes();
+        final String name = method.getName();
+        final Class[] params = method.getParameterTypes();
+
+        return AccessController.doPrivileged(
+                new PrivilegedAction<Boolean>() {
 
-        while (base != null) {
-            try {
-                if (base.getDeclaredMethod(name, params) != null) {
-                    return true;
+                    @Override
+                    public Boolean run() {
+                        Class clazz = base;
+                        while (clazz != null) {
+                            try {
+                                Method m = clazz.getDeclaredMethod(name, params);
+                                if (m != null) {
+                                    return Boolean.TRUE;
+                                }
+                            } catch (NoSuchMethodException ignored) {
+                                // recursively go into the base class
+                            }
+                            clazz = clazz.getSuperclass();
+                        }
+                        return Boolean.FALSE;
+                    }
                 }
-            } catch (NoSuchMethodException e) {
-                // recursively go into the base class
-            }
-
-            base = base.getSuperclass();
-        }
-
-        return false;
+        );
     }
 
     public boolean isInterface(Class clazz) {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JaxBeanInfo.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JaxBeanInfo.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
 import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
@@ -415,6 +417,15 @@
     private static final Class[] unmarshalEventParams = { Unmarshaller.class, Object.class };
     private static Class[] marshalEventParams = { Marshaller.class };
 
+    private Method[] getDeclaredMethods(final Class<BeanT> c) {
+        return AccessController.doPrivileged(new PrivilegedAction<Method[]>() {
+            @Override
+            public Method[] run() {
+                return c.getDeclaredMethods();
+            }
+        });
+    }
+
     /**
      * use reflection to determine which of the 4 object lifecycle methods exist on
      * the JAXB bound type.
@@ -428,7 +439,7 @@
             }
 
             while (jt != null) {
-                for (Method m : jt.getDeclaredMethods()) {
+                for (Method m : getDeclaredMethods(jt)) {
                     String name = m.getName();
 
                     if (lcm.beforeUnmarshal == null) {
@@ -468,7 +479,7 @@
         } catch (SecurityException e) {
             // this happens when we don't have enough permission.
             logger.log(Level.WARNING, Messages.UNABLE_TO_DISCOVER_EVENTHANDLER.format(
-                    jaxbType.getName(), e));
+                    jaxbType.getName(), e), e);
         }
     }
 
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java	Tue Aug 05 12:14:11 2014 -0700
@@ -229,8 +229,7 @@
             if (!Modifier.isPublic(mod) || Modifier.isFinal(mod) || !Modifier.isPublic(f.getDeclaringClass().getModifiers())) {
                 try {
                     // attempt to make it accessible, but do so in the security context of the calling application.
-                    // don't do this in the doPrivilege block, as that would create a security hole for anyone
-                    // to make any field accessible.
+                    // don't do this in the doPrivilege block
                     f.setAccessible(true);
                 } catch (SecurityException e) {
                     if ((!accessWarned) && (!supressAccessorWarnings)) {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/opt/Injector.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -146,26 +146,31 @@
     private static final Method findLoadedClass;
 
     static {
+        Method[] m = AccessController.doPrivileged(
+                new PrivilegedAction<Method[]>() {
+                    @Override
+                    public Method[] run() {
+                        return new Method[]{
+                                getMethod(ClassLoader.class, "defineClass", String.class, byte[].class, Integer.TYPE, Integer.TYPE),
+                                getMethod(ClassLoader.class, "resolveClass", Class.class),
+                                getMethod(ClassLoader.class, "findLoadedClass", String.class)
+                        };
+                    }
+                }
+        );
+        defineClass = m[0];
+        resolveClass = m[1];
+        findLoadedClass = m[2];
+    }
+
+    private static Method getMethod(final Class<?> c, final String methodname, final Class<?>... params) {
         try {
-            defineClass = ClassLoader.class.getDeclaredMethod("defineClass", String.class, byte[].class, Integer.TYPE, Integer.TYPE);
-            resolveClass = ClassLoader.class.getDeclaredMethod("resolveClass", Class.class);
-            findLoadedClass = ClassLoader.class.getDeclaredMethod("findLoadedClass", String.class);
+            Method m = c.getDeclaredMethod(methodname, params);
+            m.setAccessible(true);
+            return m;
         } catch (NoSuchMethodException e) {
-            // impossible
             throw new NoSuchMethodError(e.getMessage());
         }
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
-
-            @Override
-            public Void run() {
-                // TODO: check security implication
-                // do these setAccessible allow anyone to call these methods freely?s
-                defineClass.setAccessible(true);
-                resolveClass.setAccessible(true);
-                findLoadedClass.setAccessible(true);
-                return null;
-            }
-        });
     }
 
     private Injector(ClassLoader parent) {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamWriterFactory.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamWriterFactory.java	Tue Aug 05 12:14:11 2014 -0700
@@ -42,6 +42,8 @@
 import java.io.StringWriter;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -91,8 +93,6 @@
                     }
                 } catch (XMLStreamException ex) {
                     Logger.getLogger(XMLStreamWriterFactory.class.getName()).log(Level.INFO, null, ex);
-                } catch (NoSuchMethodException ex) {
-                    Logger.getLogger(XMLStreamWriterFactory.class.getName()).log(Level.INFO, null, ex);
                 }
             }
 
@@ -282,17 +282,31 @@
                 return new Zephyr(xof,clazz);
             } catch (XMLStreamException e) {
                 return null;    // impossible
-            } catch (NoSuchMethodException e) {
-                return null;    // this xof wasn't Zephyr
             }
         }
 
-        private Zephyr(XMLOutputFactory xof, Class clazz) throws NoSuchMethodException {
+        private Zephyr(XMLOutputFactory xof, Class clazz) {
             this.xof = xof;
 
             zephyrClass = clazz;
-            setOutputMethod = clazz.getMethod("setOutput", StreamResult.class, String.class);
-            resetMethod = clazz.getMethod("reset");
+            setOutputMethod = getMethod(clazz, "setOutput", StreamResult.class, String.class);
+            resetMethod = getMethod(clazz, "reset");
+        }
+
+        private static Method getMethod(final Class<?> c, final String methodname, final Class<?>... params) {
+            return AccessController.doPrivileged(
+                    new PrivilegedAction<Method>() {
+                        @Override
+                        public Method run() {
+                            try {
+                                return c.getMethod(methodname, params);
+                            } catch (NoSuchMethodException e) {
+                                // impossible
+                                throw new NoSuchMethodError(e.getMessage());
+                            }
+                        }
+                    }
+            );
         }
 
         /**
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigLoader.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigLoader.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,13 +42,12 @@
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.ws.WebServiceException;
 import java.lang.reflect.Method;
-import java.lang.reflect.ReflectPermission;
 import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
-import java.security.*;
-import java.util.PropertyPermission;
+import java.security.AccessController;
+import java.security.PrivilegedExceptionAction;
 import java.util.logging.Level;
 
 /**
@@ -258,24 +257,13 @@
                         public JAXBContext run() throws Exception {
                             return JAXBContext.newInstance(MetroConfig.class.getPackage().getName());
                         }
-                    }, createSecurityContext()
-            );
+                    });
         } else {
             // usage from JAX-WS/Metro/Glassfish
             return JAXBContext.newInstance(MetroConfig.class.getPackage().getName());
         }
     }
 
-    private static AccessControlContext createSecurityContext() {
-        PermissionCollection perms = new Permissions();
-        perms.add(new RuntimePermission("accessClassInPackage.com" + ".sun.xml.internal.ws.runtime.config")); // avoid repackaging
-        perms.add(new ReflectPermission("suppressAccessChecks"));
-        return new AccessControlContext(
-                new ProtectionDomain[]{
-                        new ProtectionDomain(null, perms),
-                });
-    }
-
     private static boolean isJDKInternal() {
         // avoid "string repackaging"
         return MetroConfigLoader.class.getName().startsWith("com." + "sun.xml.internal.ws");
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubeCreator.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubeCreator.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -49,7 +49,7 @@
         try {
             Class<?> factoryClass;
             if (isJDKInternal(className)) {
-                factoryClass = Class.forName(className, true, null);
+                factoryClass = Class.forName(className, true, TubeCreator.class.getClassLoader());
             } else {
                 factoryClass = Class.forName(className, true, tubeFactoryClassLoader);
             }
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubelineAssemblyController.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubelineAssemblyController.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -109,11 +109,12 @@
     }
 
     private Collection<TubeCreator> initializeTubeCreators(TubeFactoryList tfl) {
-        final ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
+        ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+        ClassLoader classLoader = tccl != null ? tccl : TubelineAssemblyController.class.getClassLoader();
 
         LinkedList<TubeCreator> tubeCreators = new LinkedList<TubeCreator>();
         for (TubeFactoryConfig tubeFactoryConfig : tfl.getTubeFactoryConfigs()) {
-            tubeCreators.addFirst(new TubeCreator(tubeFactoryConfig, contextClassLoader));
+            tubeCreators.addFirst(new TubeCreator(tubeFactoryConfig, classLoader));
         }
         return tubeCreators;
     }
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/WSServiceDelegate.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/WSServiceDelegate.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -91,7 +91,8 @@
 import java.lang.reflect.Proxy;
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.security.*;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -715,11 +716,6 @@
         final ClassLoader loader = getDelegatingLoader(portInterface.getClassLoader(),
                 WSServiceDelegate.class.getClassLoader());
 
-        // accessClassInPackage privilege needs to be granted ...
-        RuntimePermission perm = new RuntimePermission("accessClassInPackage.com.sun." + "xml.internal.*");
-        PermissionCollection perms = perm.newPermissionCollection();
-        perms.add(perm);
-
         return AccessController.doPrivileged(
                 new PrivilegedAction<T>() {
                     @Override
@@ -728,12 +724,8 @@
                                 new Class[]{portInterface, WSBindingProvider.class, Closeable.class}, pis);
                         return portInterface.cast(proxy);
                     }
-                },
-                new AccessControlContext(
-                        new ProtectionDomain[]{
-                                new ProtectionDomain(null, perms)
-                        })
-        );
+                });
+
     }
 
     private WSDLService getWSDLModelfromSEI(final Class sei) {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -58,12 +58,8 @@
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
-import java.lang.reflect.ReflectPermission;
-import java.security.AccessControlContext;
 import java.security.AccessController;
-import java.security.Permissions;
 import java.security.PrivilegedAction;
-import java.security.ProtectionDomain;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.logging.Level;
@@ -569,9 +565,6 @@
 
         // in jdk runtime doPrivileged is necessary since JAX-WS internal classes are in restricted packages
         if (isJDKRuntime()) {
-            Permissions permissions = new Permissions();
-            permissions.add(new RuntimePermission("accessClassInPackage.com.sun." + "xml.internal.ws.fault"));
-            permissions.add(new ReflectPermission("suppressAccessChecks"));
             return AccessController.doPrivileged(
                     new PrivilegedAction<JAXBContext>() {
                         @Override
@@ -582,9 +575,7 @@
                                 throw new Error(e);
                             }
                         }
-                    },
-                    new AccessControlContext(new ProtectionDomain[]{new ProtectionDomain(null, permissions)})
-            );
+                    });
 
         } else {
             try {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Injector.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Injector.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -50,28 +50,36 @@
     private static final Method definePackage;
 
     static {
+        Method[] m = AccessController.doPrivileged(
+                new PrivilegedAction<Method[]>() {
+                    @Override
+                    public Method[] run() {
+                        return new Method[]{
+                                getMethod(ClassLoader.class, "defineClass", String.class, byte[].class, Integer.TYPE, Integer.TYPE),
+                                getMethod(ClassLoader.class, "resolveClass", Class.class),
+                                getMethod(ClassLoader.class, "getPackage", String.class),
+                                getMethod(ClassLoader.class, "definePackage",
+                                        String.class, String.class, String.class, String.class,
+                                        String.class, String.class, String.class, URL.class)
+                        };
+                    }
+                }
+        );
+        defineClass = m[0];
+        resolveClass = m[1];
+        getPackage = m[2];
+        definePackage = m[3];
+    }
+
+    private static Method getMethod(final Class<?> c, final String methodname, final Class<?>... params) {
         try {
-            defineClass = ClassLoader.class.getDeclaredMethod("defineClass",String.class,byte[].class,Integer.TYPE,Integer.TYPE);
-            resolveClass = ClassLoader.class.getDeclaredMethod("resolveClass",Class.class);
-            getPackage = ClassLoader.class.getDeclaredMethod("getPackage", String.class);
-            definePackage = ClassLoader.class.getDeclaredMethod("definePackage",
-                    String.class, String.class, String.class, String.class,
-                    String.class, String.class, String.class, URL.class);
+            Method m = c.getDeclaredMethod(methodname, params);
+            m.setAccessible(true);
+            return m;
         } catch (NoSuchMethodException e) {
             // impossible
             throw new NoSuchMethodError(e.getMessage());
         }
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
-            public Void run() {
-                // TODO: check security implication
-                // do these setAccessible allow anyone to call these methods freely?s
-                defineClass.setAccessible(true);
-                resolveClass.setAccessible(true);
-                getPackage.setAccessible(true);
-                definePackage.setAccessible(true);
-                return null;
-            }
-        });
     }
 
     static synchronized Class inject(ClassLoader cl, String className, byte[] image) {
--- a/jdk/.hgtags	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/.hgtags	Tue Aug 05 12:14:11 2014 -0700
@@ -266,3 +266,5 @@
 2df45ac1bf491278f38c12e0dfbeebadb6c54c8c jdk9-b21
 85bcf0f99edc08873614afbe5a5563e13ce13c83 jdk9-b22
 9febf9dbc0a4b15323f2dbd29931cfbf086332b4 jdk9-b23
+875450e7ef8dde8f59db662ec1351ea30b8cb35d jdk9-b24
+a31efe49556a7c12f9ea2c9ee8b4fae8aa67723a jdk9-b25
--- a/jdk/make/Setup.gmk	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/make/Setup.gmk	Tue Aug 05 12:14:11 2014 -0700
@@ -27,7 +27,7 @@
 
 # To build with all warnings enabled, do the following:
 # make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
-JAVAC_WARNINGS := -Xlint:all,-deprecation,-rawtypes,-unchecked -Werror
+JAVAC_WARNINGS := -Xlint:all,-deprecation -Werror
 
 # Any java code executed during a JDK build to build other parts of the JDK must be 
 # executed by the bootstrap JDK (probably with -Xbootclasspath/p: ) and for this 
--- a/jdk/src/share/classes/com/sun/jndi/cosnaming/CNCtx.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/cosnaming/CNCtx.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1145,7 +1145,7 @@
 
         // Never destroy an orb in CNCtx.
         // The orb we have is either the shared/default orb, or one passed in to a constructor
-        // from elsewhere, so that orb is somebody else's reponsibility.
+        // from elsewhere, so that orb is somebody else's responsibility.
     }
 
     protected void finalize() {
--- a/jdk/src/share/classes/com/sun/jndi/dns/DnsClient.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/dns/DnsClient.java	Tue Aug 05 12:14:11 2014 -0700
@@ -376,7 +376,7 @@
 
 
     /**
-     * Tries to retreive an UDP packet matching the given xid
+     * Tries to retrieve a UDP packet matching the given xid
      * received within the timeout.
      * If a packet with different xid is received, the received packet
      * is enqueued with the corresponding xid in 'resps'.
--- a/jdk/src/share/classes/com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java	Tue Aug 05 12:14:11 2014 -0700
@@ -137,7 +137,7 @@
         limit = (entries == null) ? 0 : entries.size(); // handle empty set
         posn = 0; // reset
 
-        // mimimize the number of calls to processReturnCode()
+        // minimize the number of calls to processReturnCode()
         // (expensive when batchSize is small and there are many results)
         if ((res.status != LdapClient.LDAP_SUCCESS) ||
             ((res.status == LdapClient.LDAP_SUCCESS) &&
--- a/jdk/src/share/classes/com/sun/jndi/ldap/ClientId.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/ClientId.java	Tue Aug 05 12:14:11 2014 -0700
@@ -196,7 +196,7 @@
                 System.out.println("ClientId received an exception");
                 e.printStackTrace();
             }
-            // Failed to invoke the comparator; flag unequality
+            // Failed to invoke the comparator; flag inequality
             return false;
         }
         if (((Integer) ret) == 0) {
--- a/jdk/src/share/classes/com/sun/jndi/ldap/EventQueue.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/EventQueue.java	Tue Aug 05 12:14:11 2014 -0700
@@ -75,7 +75,7 @@
      * Enqueue an event.
      * @param event Either a <tt>NamingExceptionEvent</tt> or a subclass
      *              of <tt>NamingEvent</tt> or
-     * <tt>UnsolicitedNotificatoniEvent</tt>.
+     * <tt>UnsolicitedNotificationEvent</tt>.
      * If it is a subclass of <tt>NamingEvent</tt>, all listeners must implement
      * the corresponding subinterface of <tt>NamingListener</tt>.
      * For example, for a <tt>ObjectAddedEvent</tt>, all listeners <em>must</em>
@@ -141,7 +141,7 @@
                     // it is interested in. (No need to check mask or
                     // instanceof subinterfaces.)
                     // It is the responsibility of the enqueuer to
-                    // only enqueue events with listseners of the correct type.
+                    // only enqueue events with listeners of the correct type.
 
                     if (e instanceof NamingEvent) {
                         ((NamingEvent)e).dispatch(v.elementAt(i));
--- a/jdk/src/share/classes/com/sun/jndi/ldap/EventSupport.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/EventSupport.java	Tue Aug 05 12:14:11 2014 -0700
@@ -83,7 +83,7 @@
  *a new notifier is created for the listener.
  *
  *<h4>Deregistration</h4>
- *When a deregistration request is made, this class attemps to find its
+ *When a deregistration request is made, this class attempts to find its
  *corresponding notifier. If the notifier is found, the listener is removed
  *from the notifier's list. If the listener is the last listener on the list,
  *the notifier's thread is terminated and removed from this class's hashtable.
--- a/jdk/src/share/classes/com/sun/jndi/ldap/LdapAttribute.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/LdapAttribute.java	Tue Aug 05 12:14:11 2014 -0700
@@ -34,7 +34,7 @@
 /**
   * This subclass is used by LDAP to implement the schema calls.
   * Basically, it keeps track of which context it is an attribute of
-  * so it can get the schema for that cotnext.
+  * so it can get the schema for that context.
   *
   * @author Jon Ruiz
   */
@@ -134,7 +134,7 @@
         // setup internal state
         this.setBaseCtxInfo();
 
-        // let the ObjectOutpurStream do the real work of serialization
+        // let the ObjectOutputStream do the real work of serialization
         out.defaultWriteObject();
     }
 
--- a/jdk/src/share/classes/com/sun/jndi/ldap/LdapCtx.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/LdapCtx.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1651,7 +1651,7 @@
      *
      * This function is called regardless of the server's version, since
      * an administrator may have setup the server to support client schema
-     * queries. If this function trys a serarch on a v2 server that
+     * queries. If this function tries a search on a v2 server that
      * doesn't support schema, one of these two things will happen:
      * 1) It will get an exception when querying the root DSE
      * 2) It will not find a subschemasubentry on the root DSE
@@ -2016,7 +2016,7 @@
      *    - the returning attributes list is present but empty
      */
 
-    // returns true if a search can be caried out as a compare, and sets
+    // returns true if a search can be carried out as a compare, and sets
     // tokens[0] and tokens[1] to the type and value respectively.
     // e.g. filter "cn=Jon Ruiz" becomes, type "cn" and value "Jon Ruiz"
     // This function uses the documents JNDI Compare example as a model
@@ -2083,7 +2083,7 @@
             return false; // unbalanced
         }
 
-        // make sure the left and right half are not expresions themselves
+        // make sure the left and right half are not expressions themselves
         StringTokenizer illegalCharsTokenizer =
             new StringTokenizer(tokens[0], "()&|!=~><*", true);
 
@@ -2443,7 +2443,7 @@
     }
 
     /**
-     * Set whether aliases are derefereced during resolution and searches.
+     * Set whether aliases are dereferenced during resolution and searches.
      */
     private void setDerefAliases(String deref) {
         if (deref != null) {
--- a/jdk/src/share/classes/com/sun/jndi/ldap/LdapName.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/LdapName.java	Tue Aug 05 12:14:11 2014 -0700
@@ -346,8 +346,8 @@
     }
 
     /**
-     * Given an attribute value formated according to RFC 2253,
-     * returns the unformated value.  Returns a string value as
+     * Given an attribute value formatted according to RFC 2253,
+     * returns the unformatted value.  Returns a string value as
      * a string, and a binary value as a byte array.
      */
     public static Object unescapeAttributeValue(String val) {
@@ -687,7 +687,7 @@
         private final boolean binary;
         private final boolean valueCaseSensitive;
 
-        // If non-null, a canonical represention of the value suitable
+        // If non-null, a canonical representation of the value suitable
         // for comparison using String.compareTo().
         private String comparable = null;
 
@@ -842,8 +842,8 @@
         }
 
         /*
-         * Given an attribute value formated according to RFC 2253,
-         * returns the unformated value.  Escapes and quotes are
+         * Given an attribute value formatted according to RFC 2253,
+         * returns the unformatted value.  Escapes and quotes are
          * stripped away, and hex-encoded UTF-8 is converted to 16-bit
          * Unicode chars.  Returns a string value as a String, and a
          * binary value as a byte array.
--- a/jdk/src/share/classes/com/sun/jndi/ldap/LdapReferralContext.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/LdapReferralContext.java	Tue Aug 05 12:14:11 2014 -0700
@@ -679,7 +679,7 @@
 
         } catch (LdapReferralException e) {
 
-            // %%% VR - setNameResolved(true);
+            // %%% setNameResolved(true);
 
             // append (referrals from) the exception that generated this
             // context to the new exception, so that referral processing
@@ -897,7 +897,7 @@
 
     /*
      * Use the attributes and scope components from the LDAP URL (if present)
-     * to override the corrpesonding components supplied in SearchControls.
+     * to override the corresponding components supplied in SearchControls.
      */
     private SearchControls overrideAttributesAndScope(SearchControls cons) {
         SearchControls urlCons;
--- a/jdk/src/share/classes/com/sun/jndi/ldap/LdapRequest.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/LdapRequest.java	Tue Aug 05 12:14:11 2014 -0700
@@ -62,7 +62,7 @@
         cancelled = true;
 
         // Unblock reader of pending request
-        // Should only ever have atmost one waiter
+        // Should only ever have at most one waiter
         notify();
     }
 
--- a/jdk/src/share/classes/com/sun/jndi/ldap/LdapSchemaParser.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/LdapSchemaParser.java	Tue Aug 05 12:14:11 2014 -0700
@@ -84,7 +84,7 @@
     // Object Class specific IDs
     private static final String    ABSTRACT_ID = "ABSTRACT";
     private static final String  STRUCTURAL_ID = "STRUCTURAL";
-    private static final String    AUXILARY_ID = "AUXILIARY";
+    private static final String   AUXILIARY_ID = "AUXILIARY";
     private static final String        MUST_ID = "MUST";
     private static final String         MAY_ID = "MAY";
 
@@ -300,8 +300,8 @@
         return new Object[] {currentName, attrs};
     }
 
-    // returns the index of the first whitespace char of a linear whitspace
-    // sequince ending at the given position.
+    // returns the index of the first whitespace char of a linear whitespace
+    // sequence ending at the given position.
     final private static int findTrailingWhitespace(String string, int pos) {
         for(int i = pos; i > 0; i--) {
             if(string.charAt(i) != WHSP) {
@@ -423,7 +423,7 @@
         if (tag.equals(OBSOLETE_ID) ||
             tag.equals(ABSTRACT_ID) ||
             tag.equals(STRUCTURAL_ID) ||
-            tag.equals(AUXILARY_ID) ||
+            tag.equals(AUXILIARY_ID) ||
             tag.equals(SINGLE_VAL_ID) ||
             tag.equals(COLLECTIVE_ID) ||
             tag.equals(NO_USER_MOD_ID)) {
@@ -819,7 +819,7 @@
             count++;
         }
 
-        attr = attrs.get(AUXILARY_ID);
+        attr = attrs.get(AUXILIARY_ID);
         if (attr != null) {
             objectDesc.append(writeBoolean(attr));
             count++;
@@ -856,7 +856,7 @@
                     attrId.equals(MUST_ID) ||
                     attrId.equals(STRUCTURAL_ID) ||
                     attrId.equals(DESC_ID) ||
-                    attrId.equals(AUXILARY_ID) ||
+                    attrId.equals(AUXILIARY_ID) ||
                     attrId.equals(ABSTRACT_ID) ||
                     attrId.equals(OBSOLETE_ID)) {
                     continue;
--- a/jdk/src/share/classes/com/sun/jndi/ldap/LdapSearchEnumeration.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/LdapSearchEnumeration.java	Tue Aug 05 12:14:11 2014 -0700
@@ -156,7 +156,7 @@
             String[] reqAttrs;
             if ((reqAttrs = searchArgs.reqAttrs) != null) {
                 // create an attribute set for those requested
-                Attributes rattrs = new BasicAttributes(true); // caseignore
+                Attributes rattrs = new BasicAttributes(true); // ignore case
                 for (int i = 0; i < reqAttrs.length; i++) {
                     rattrs.put(reqAttrs[i], null);
                 }
@@ -213,8 +213,6 @@
         // Update search-specific variables
         LdapSearchEnumeration se = (LdapSearchEnumeration)ne;
         startName = se.startName;
-//VR - keep original args, don't overwite with current args
-//      searchArgs = se.searchArgs;
     }
 
     void setStartName(Name nm) {
--- a/jdk/src/share/classes/com/sun/jndi/ldap/LdapURL.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/LdapURL.java	Tue Aug 05 12:14:11 2014 -0700
@@ -162,7 +162,7 @@
     }
 
     /**
-     * Derermines whether an LDAP URL has query components.
+     * Determines whether an LDAP URL has query components.
      */
     public static boolean hasQueryComponents(String url) {
         return (url.lastIndexOf('?') != -1);
--- a/jdk/src/share/classes/com/sun/jndi/ldap/ServiceLocator.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/ServiceLocator.java	Tue Aug 05 12:14:11 2014 -0700
@@ -62,7 +62,7 @@
      *
      * @param dn A string distinguished name (RFC 2253).
      * @return A domain name or null if none can be derived.
-     * @throw InvalidNameException If the distinugished name is invalid.
+     * @throw InvalidNameException If the distinguished name is invalid.
      */
     static String mapDnToDomainName(String dn) throws InvalidNameException {
         if (dn == null) {
--- a/jdk/src/share/classes/com/sun/jndi/ldap/VersionHelper.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/VersionHelper.java	Tue Aug 05 12:14:11 2014 -0700
@@ -25,32 +25,77 @@
 
 package com.sun.jndi.ldap;
 
+import sun.misc.SharedSecrets;
+
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.net.URLClassLoader;
+import java.security.AccessControlContext;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 
-abstract class VersionHelper {
+public final class VersionHelper {
+
+    private static final VersionHelper helper = new VersionHelper();
 
-    private static final VersionHelper helper = new VersionHelper12();
+    /**
+     * Determines whether classes may be loaded from an arbitrary URL code base.
+     */
+    private static final boolean trustURLCodebase;
 
-    VersionHelper() {} // Disallow anyone from creating one of these.
+    static {
+        // System property to control whether classes may be loaded from an
+        // arbitrary URL code base
+        PrivilegedAction<String> act =
+                () -> System.getProperty("com.sun.jndi.ldap.object.trustURLCodebase", "false");
+        String trust = AccessController.doPrivileged(act);
+        trustURLCodebase = "true".equalsIgnoreCase(trust);
+    }
+
+    private VersionHelper() { }
 
     static VersionHelper getVersionHelper() {
         return helper;
     }
 
-    abstract ClassLoader getURLClassLoader(String[] url)
-        throws MalformedURLException;
+    ClassLoader getURLClassLoader(String[] url) throws MalformedURLException {
+        ClassLoader parent = getContextClassLoader();
+        /*
+         * Classes may only be loaded from an arbitrary URL code base when
+         * the system property com.sun.jndi.ldap.object.trustURLCodebase
+         * has been set to "true".
+         */
+        if (url != null && trustURLCodebase) {
+            return URLClassLoader.newInstance(getUrlArray(url), parent);
+        } else {
+            return parent;
+        }
+    }
 
+    Class<?> loadClass(String className) throws ClassNotFoundException {
+        return Class.forName(className, true, getContextClassLoader());
+    }
 
-    static protected URL[] getUrlArray(String[] url) throws MalformedURLException {
+    Thread createThread(Runnable r) {
+        AccessControlContext acc = AccessController.getContext();
+        // 4290486: doPrivileged is needed to create a thread in
+        // an environment that restricts "modifyThreadGroup".
+        PrivilegedAction<Thread> act =
+                () -> SharedSecrets.getJavaLangAccess().newThreadWithAcc(r, acc);
+        return AccessController.doPrivileged(act);
+    }
+
+    private ClassLoader getContextClassLoader() {
+        PrivilegedAction<ClassLoader> act =
+                Thread.currentThread()::getContextClassLoader;
+        return AccessController.doPrivileged(act);
+    }
+
+    private static URL[] getUrlArray(String[] url) throws MalformedURLException {
         URL[] urlArray = new URL[url.length];
         for (int i = 0; i < urlArray.length; i++) {
             urlArray[i] = new URL(url[i]);
         }
         return urlArray;
     }
-
-    abstract Class<?> loadClass(String className) throws ClassNotFoundException;
-
-    abstract Thread createThread(Runnable r);
 }
--- a/jdk/src/share/classes/com/sun/jndi/ldap/VersionHelper12.java	Tue Aug 05 15:39:05 2014 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.jndi.ldap;
-
-import java.net.URLClassLoader;
-import java.net.MalformedURLException;
-import java.security.AccessControlContext;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import sun.misc.SharedSecrets;
-
-final class VersionHelper12 extends VersionHelper {
-
-    // System property to control whether classes may be loaded from an
-    // arbitrary URL code base.
-    private static final String TRUST_URL_CODEBASE_PROPERTY =
-        "com.sun.jndi.ldap.object.trustURLCodebase";
-
-    // Determine whether classes may be loaded from an arbitrary URL code base.
-    private static final String trustURLCodebase =
-        AccessController.doPrivileged(
-            new PrivilegedAction<String>() {
-                public String run() {
-                    return System.getProperty(TRUST_URL_CODEBASE_PROPERTY,
-                            "false");
-                }
-            }
-        );
-
-    VersionHelper12() {} // Disallow external from creating one of these.
-
-    ClassLoader getURLClassLoader(String[] url)
-        throws MalformedURLException {
-            ClassLoader parent = getContextClassLoader();
-            /*
-             * Classes may only be loaded from an arbitrary URL code base when
-             * the system property com.sun.jndi.ldap.object.trustURLCodebase
-             * has been set to "true".
-             */
-            if (url != null && "true".equalsIgnoreCase(trustURLCodebase)) {
-                return URLClassLoader.newInstance(getUrlArray(url), parent);
-            } else {
-                return parent;
-            }
-    }
-
-    Class<?> loadClass(String className) throws ClassNotFoundException {
-        ClassLoader cl = getContextClassLoader();
-        return Class.forName(className, true, cl);
-    }
-
-    private ClassLoader getContextClassLoader() {
-        return AccessController.doPrivileged(
-            new PrivilegedAction<ClassLoader>() {
-                public ClassLoader run() {
-                    return Thread.currentThread().getContextClassLoader();
-                }
-            }
-        );
-    }
-
-    Thread createThread(final Runnable r) {
-        final AccessControlContext acc = AccessController.getContext();
-        // 4290486: doPrivileged is needed to create a thread in
-        // an environment that restricts "modifyThreadGroup".
-        return AccessController.doPrivileged(
-                new PrivilegedAction<Thread>() {
-                    public Thread run() {
-                        return SharedSecrets.getJavaLangAccess()
-                                .newThreadWithAcc(r, acc);
-                    }
-                }
-        );
-    }
-}
--- a/jdk/src/share/classes/com/sun/jndi/ldap/pool/Connections.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/pool/Connections.java	Tue Aug 05 12:14:11 2014 -0700
@@ -254,7 +254,7 @@
     /**
      * Removes PooledConnection from list of connections.
      * The closing of the connection is separate from this method.
-     * This method is called usually when the caller encouters an error
+     * This method is called usually when the caller encounters an error
      * when using the connection and wants it removed from the pool.
      *
      * @return true if conn removed; false if it was not in pool
--- a/jdk/src/share/classes/com/sun/jndi/ldap/pool/Pool.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/ldap/pool/Pool.java	Tue Aug 05 12:14:11 2014 -0700
@@ -68,8 +68,8 @@
  * whenever a pooled connection is requested or a call to remove the expired
  * connections is made. The monitoring is done regularly when idle connection
  * timeout is set as the PoolCleaner removes expired connections periodically.
- * As determined by the experiements, cleanup of resources using the
- * ReferenceQueue mechanism is reliable and has immidiate effect than the
+ * As determined by experimentation, cleanup of resources using the
+ * ReferenceQueue mechanism is reliable and has more immediate effect than the
  * finalizer approach.
  *
  * @author Rosanna Lee
--- a/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/AtomicContext.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/AtomicContext.java	Tue Aug 05 12:14:11 2014 -0700
@@ -96,7 +96,7 @@
       * Resolves the nns for 'name' when the named context is acting
       * as an intermediate context.
       *
-      * For a system that supports junctions, this would be equilvalent to
+      * For a system that supports junctions, this would be equivalent to
       *         a_lookup(name, cont);
       * because for junctions, an intermediate slash simply signifies
       * a syntactic separator.
@@ -487,7 +487,7 @@
                 resolve_to_nns_and_continue(name, cont);
                 return null;
             } else {
-                // use COmponentContext
+                // use ComponentContext
                 return super.c_getNameParser_nns(name, cont);
             }
         }
--- a/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/ComponentContext.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/ComponentContext.java	Tue Aug 05 12:14:11 2014 -0700
@@ -137,7 +137,7 @@
       * as an intermediate context.
       *
       * For a system that supports only junctions, this would be
-      * equilvalent to
+      * equivalent to
       *         c_lookup(name, cont);
       * because for junctions, an intermediate slash simply signifies
       * a syntactic separator.
--- a/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/Continuation.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/toolkit/ctx/Continuation.java	Tue Aug 05 12:14:11 2014 -0700
@@ -172,7 +172,7 @@
      *
      * This method is typically called by _nns methods that have been
      * given a name to process. It might process part of that name but
-     * encountered some error. Consequenetly, it would call setErrorNNS()
+     * encountered some error. Consequently, it would call setErrorNNS()
      * with the remaining name. Since the _nns method was expected to
      * operate upon the "nns" of the original name, the remaining name
      * must include the "nns". That's why this method adds a trailing "/".
@@ -219,7 +219,7 @@
      *
      * This method is typically called by methods that have been
      * given a name to process. It might process part of that name but
-     * encountered some error. Consequenetly, it would call setError()
+     * encountered some error. Consequently, it would call setError()
      * with the resolved object and the remaining name.
      *<p>
      * After this method is called, isContinuing() returns false.
--- a/jdk/src/share/classes/com/sun/jndi/toolkit/dir/ContextEnumerator.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/toolkit/dir/ContextEnumerator.java	Tue Aug 05 12:14:11 2014 -0700
@@ -182,14 +182,14 @@
 
         if (!currentReturned) {
             // returning parent
-            if(debug) {System.out.println("getNextDescedant: simple case");}
+            if(debug) {System.out.println("getNextDescendant: simple case");}
 
             currentReturned = true;
             return currentChild;
 
         } else if (currentChildExpanded && currentChildEnum.hasMore()) {
 
-            if(debug) {System.out.println("getNextDescedant: expanded case");}
+            if(debug) {System.out.println("getNextDescendant: expanded case");}
 
             // if the current child is expanded, use it's enumerator
             return currentChildEnum.next();
@@ -197,7 +197,7 @@
         } else {
 
             // Ready to go onto next child
-            if(debug) {System.out.println("getNextDescedant: next case");}
+            if(debug) {System.out.println("getNextDescendant: next case");}
 
             prepNextChild();
             return getNextDescendant();
--- a/jdk/src/share/classes/com/sun/jndi/toolkit/dir/HierMemDirCtx.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/toolkit/dir/HierMemDirCtx.java	Tue Aug 05 12:14:11 2014 -0700
@@ -881,8 +881,8 @@
     }
 }
 
-    // CompundNames's HashCode() method isn't good enough for many string.
-    // The only prupose of this subclass is to have a more discerning
+    // CompoundNames's HashCode() method isn't good enough for many strings.
+    // The only purpose of this subclass is to have a more discerning
     // hash function. We'll make up for the performance hit by caching
     // the hash value.
 
--- a/jdk/src/share/classes/com/sun/jndi/toolkit/dir/LazySearchEnumerationImpl.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/toolkit/dir/LazySearchEnumerationImpl.java	Tue Aug 05 12:14:11 2014 -0700
@@ -152,7 +152,7 @@
                         } else if (useFactory) {
                             try {
                                 // Give name only if context non-null,
-                                // otherewise, name will be interpreted relative
+                                // otherwise, name will be interpreted relative
                                 // to initial context (not what we want)
                                 Name nm = (context != null ?
                                     new CompositeName(next.getName()) : null);
--- a/jdk/src/share/classes/com/sun/jndi/toolkit/dir/SearchFilter.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/toolkit/dir/SearchFilter.java	Tue Aug 05 12:14:11 2014 -0700
@@ -256,7 +256,7 @@
     static final int LESS_MATCH = 4;
 
     /**
-     * A class for dealing wtih atomic filters
+     * A class for dealing with atomic filters
      */
     final class AtomicFilter implements StringFilter {
         private String attrID;
@@ -369,7 +369,7 @@
                     }
                     break;
                 default:
-                    if (debug) {System.out.println("AtomicFilter: unkown " +
+                    if (debug) {System.out.println("AtomicFilter: unknown " +
                                                    "matchType");}
                 }
             }
@@ -434,7 +434,7 @@
 
 
     /**
-      * Creates an LDAP filter as a conjuction of the attributes supplied.
+      * Creates an LDAP filter as a conjunction of the attributes supplied.
       */
     public static String format(Attributes attrs) throws NamingException {
         if (attrs == null || attrs.size() == 0) {
--- a/jdk/src/share/classes/com/sun/jndi/toolkit/url/GenericURLContext.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/toolkit/url/GenericURLContext.java	Tue Aug 05 12:14:11 2014 -0700
@@ -168,7 +168,7 @@
             }
         }
 
-        // else 0 or 1 iniitial slashes; start is unchanged
+        // else 0 or 1 initial slashes; start is unchanged
         return url.substring(0, start);
     }
 
--- a/jdk/src/share/classes/com/sun/jndi/url/ldap/ldapURLContext.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/jndi/url/ldap/ldapURLContext.java	Tue Aug 05 12:14:11 2014 -0700
@@ -562,7 +562,7 @@
     }
 
     // Search using the LDAP URL in name.
-    // LDAP URL query components override the search argments.
+    // LDAP URL query components override the search arguments.
     private NamingEnumeration<SearchResult> searchUsingURL(String name)
         throws NamingException {
 
--- a/jdk/src/share/classes/com/sun/management/GcInfo.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/management/GcInfo.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -267,7 +267,7 @@
         return cdata.toString();
     }
 
-    public Collection values() {
+    public Collection<?> values() {
         return cdata.values();
     }
 
--- a/jdk/src/share/classes/com/sun/naming/internal/VersionHelper.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/naming/internal/VersionHelper.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,19 @@
 
 package com.sun.naming.internal;
 
+import javax.naming.NamingEnumeration;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
 import java.io.InputStream;
-import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.util.StringTokenizer;
-import java.util.Vector;
-
-import javax.naming.NamingEnumeration;
+import java.net.URLClassLoader;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+import java.util.*;
 
 /**
  * VersionHelper was used by JNDI to accommodate differences between
@@ -45,10 +50,10 @@
  * @author Scott Seligman
  */
 
-public abstract class VersionHelper {
-    private static VersionHelper helper = null;
+public final class VersionHelper {
+    private static final VersionHelper helper = new VersionHelper();
 
-    final static String[] PROPS = new String[] {
+    final static String[] PROPS = new String[]{
         javax.naming.Context.INITIAL_CONTEXT_FACTORY,
         javax.naming.Context.OBJECT_FACTORIES,
         javax.naming.Context.URL_PKG_PREFIXES,
@@ -67,31 +72,57 @@
     public final static int DNS_URL = 5;
     public final static int CONTROL_FACTORIES = 6;
 
-    VersionHelper() {} // Disallow anyone from creating one of these.
-
-    static {
-        helper = new VersionHelper12();
-    }
+    private VersionHelper() {} // Disallow anyone from creating one of these.
 
     public static VersionHelper getVersionHelper() {
         return helper;
     }
 
-    public abstract Class<?> loadClass(String className)
-        throws ClassNotFoundException;
+    public Class<?> loadClass(String className) throws ClassNotFoundException {
+        return loadClass(className, getContextClassLoader());
+    }
+
+    /**
+     * @param className A non-null fully qualified class name.
+     * @param codebase  A non-null, space-separated list of URL strings.
+     */
+    public Class<?> loadClass(String className, String codebase)
+            throws ClassNotFoundException, MalformedURLException {
+
+        ClassLoader parent = getContextClassLoader();
+        ClassLoader cl =
+                URLClassLoader.newInstance(getUrlArray(codebase), parent);
 
-    abstract Class<?> loadClass(String className, ClassLoader cl)
-        throws ClassNotFoundException;
+        return loadClass(className, cl);
+    }
 
-    public abstract Class<?> loadClass(String className, String codebase)
-        throws ClassNotFoundException, MalformedURLException;
+    /**
+     * Package private.
+     * <p>
+     * This internal method is used with Thread Context Class Loader (TCCL),
+     * please don't expose this method as public.
+     */
+    Class<?> loadClass(String className, ClassLoader cl)
+            throws ClassNotFoundException {
+        Class<?> cls = Class.forName(className, true, cl);
+        return cls;
+    }
 
     /*
-     * Returns a JNDI property from the system properties.  Returns
+     * Returns a JNDI property from the system properties. Returns
      * null if the property is not set, or if there is no permission
      * to read it.
      */
-    abstract String getJndiProperty(int i);
+    String getJndiProperty(int i) {
+        PrivilegedAction<String> act = () -> {
+            try {
+                return System.getProperty(PROPS[i]);
+            } catch (SecurityException e) {
+                return null;
+            }
+        };
+        return AccessController.doPrivileged(act);
+    }
 
     /*
      * Reads each property in PROPS from the system properties, and
@@ -99,13 +130,33 @@
      * unset property, the corresponding array element is set to null.
      * Returns null if there is no permission to call System.getProperties().
      */
-    abstract String[] getJndiProperties();
+    String[] getJndiProperties() {
+        PrivilegedAction<Properties> act = () -> {
+            try {
+                return System.getProperties();
+            } catch (SecurityException e) {
+                return null;
+            }
+        };
+        Properties sysProps = AccessController.doPrivileged(act);
+        if (sysProps == null) {
+            return null;
+        }
+        String[] jProps = new String[PROPS.length];
+        for (int i = 0; i < PROPS.length; i++) {
+            jProps[i] = sysProps.getProperty(PROPS[i]);
+        }
+        return jProps;
+    }
 
     /*
      * Returns the resource of a given name associated with a particular
      * class (never null), or null if none can be found.
      */
-    abstract InputStream getResourceAsStream(Class<?> c, String name);
+    InputStream getResourceAsStream(Class<?> c, String name) {
+        PrivilegedAction<InputStream> act = () -> c.getResourceAsStream(name);
+        return AccessController.doPrivileged(act);
+    }
 
     /*
      * Returns an input stream for a file in <java.home>/lib,
@@ -113,7 +164,22 @@
      *
      * @param filename  The file name, sans directory.
      */
-    abstract InputStream getJavaHomeLibStream(String filename);
+    InputStream getJavaHomeLibStream(String filename) {
+        PrivilegedAction<InputStream> act = () -> {
+            try {
+                String javahome = System.getProperty("java.home");
+                if (javahome == null) {
+                    return null;
+                }
+                String pathname = javahome + File.separator +
+                        "lib" + File.separator + filename;
+                return new FileInputStream(pathname);
+            } catch (Exception e) {
+                return null;
+            }
+        };
+        return AccessController.doPrivileged(act);
+    }
 
     /*
      * Returns an enumeration (never null) of InputStreams of the
@@ -121,29 +187,55 @@
      * loader.  Null represents the bootstrap class loader in some
      * Java implementations.
      */
-    abstract NamingEnumeration<InputStream> getResources(
-            ClassLoader cl, String name)
-        throws IOException;
+    NamingEnumeration<InputStream> getResources(ClassLoader cl,
+                                                String name) throws IOException {
+        Enumeration<URL> urls;
+        PrivilegedExceptionAction<Enumeration<URL>> act = () ->
+                (cl == null)
+                        ? ClassLoader.getSystemResources(name)
+                        : cl.getResources(name);
+        try {
+            urls = AccessController.doPrivileged(act);
+        } catch (PrivilegedActionException e) {
+            throw (IOException) e.getException();
+        }
+        return new InputStreamEnumeration(urls);
+    }
+
 
-    /*
-     * Returns the context class loader associated with the current thread.
-     * Null indicates the bootstrap class loader in some Java implementations.
-     *
-     * @throws SecurityException if the class loader is not accessible.
+    /**
+     * Package private.
+     * <p>
+     * This internal method returns Thread Context Class Loader (TCCL),
+     * if null, returns the system Class Loader.
+     * <p>
+     * Please don't expose this method as public.
+     * @throws SecurityException if the class loader is not accessible
      */
-    abstract ClassLoader getContextClassLoader();
+    ClassLoader getContextClassLoader() {
 
-    static protected URL[] getUrlArray(String codebase)
-        throws MalformedURLException {
+        PrivilegedAction<ClassLoader> act = () -> {
+            ClassLoader loader = Thread.currentThread().getContextClassLoader();
+            if (loader == null) {
+                // Don't use bootstrap class loader directly!
+                loader = ClassLoader.getSystemClassLoader();
+            }
+            return loader;
+        };
+        return AccessController.doPrivileged(act);
+    }
+
+    private static URL[] getUrlArray(String codebase)
+            throws MalformedURLException {
         // Parse codebase into separate URLs
         StringTokenizer parser = new StringTokenizer(codebase);
-        Vector<String> vec = new Vector<>(10);
+        List<String> list = new ArrayList<>();
         while (parser.hasMoreTokens()) {
-            vec.addElement(parser.nextToken());
+            list.add(parser.nextToken());
         }
-        String[] url = new String[vec.size()];
+        String[] url = new String[list.size()];
         for (int i = 0; i < url.length; i++) {
-            url[i] = vec.elementAt(i);
+            url[i] = list.get(i);
         }
 
         URL[] urlArray = new URL[url.length];
@@ -152,4 +244,70 @@
         }
         return urlArray;
     }
+
+    /**
+     * Given an enumeration of URLs, an instance of this class represents
+     * an enumeration of their InputStreams.  Each operation on the URL
+     * enumeration is performed within a doPrivileged block.
+     * This is used to enumerate the resources under a foreign codebase.
+     * This class is not MT-safe.
+     */
+    private class InputStreamEnumeration implements
+            NamingEnumeration<InputStream> {
+
+        private final Enumeration<URL> urls;
+
+        private InputStream nextElement;
+
+        InputStreamEnumeration(Enumeration<URL> urls) {
+            this.urls = urls;
+        }
+
+        /*
+         * Returns the next InputStream, or null if there are no more.
+         * An InputStream that cannot be opened is skipped.
+         */
+        private InputStream getNextElement() {
+            PrivilegedAction<InputStream> act = () -> {
+                while (urls.hasMoreElements()) {
+                    try {
+                        return urls.nextElement().openStream();
+                    } catch (IOException e) {
+                        // skip this URL
+                    }
+                }
+                return null;
+            };
+            return AccessController.doPrivileged(act);
+        }
+
+        public boolean hasMore() {
+            if (nextElement != null) {
+                return true;
+            }
+            nextElement = getNextElement();
+            return (nextElement != null);
+        }
+
+        public boolean hasMoreElements() {
+            return hasMore();
+        }
+
+        public InputStream next() {
+            if (hasMore()) {
+                InputStream res = nextElement;
+                nextElement = null;
+                return res;
+            } else {
+                throw new NoSuchElementException();
+            }
+        }
+
+        public InputStream nextElement() {
+            return next();
+        }
+
+        public void close() {
+        }
+    }
 }
--- a/jdk/src/share/classes/com/sun/naming/internal/VersionHelper12.java	Tue Aug 05 15:39:05 2014 +0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,268 +0,0 @@
-/*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.naming.internal;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URLClassLoader;
-import java.net.URL;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import java.util.Enumeration;
-import java.util.NoSuchElementException;
-import java.util.Properties;
-
-import javax.naming.*;
-
-/**
- * VersionHelper was used by JNDI to accommodate differences between
- * JDK 1.1.x and the Java 2 platform. As this is no longer necessary
- * since JNDI's inclusion in the platform, this class currently
- * serves as a set of utilities for performing system-level things,
- * such as class-loading and reading system properties.
- *
- * @author Rosanna Lee
- * @author Scott Seligman
- */
-
-final class VersionHelper12 extends VersionHelper {
-
-    // Disallow external from creating one of these.
-    VersionHelper12() {
-    }
-
-    public Class<?> loadClass(String className) throws ClassNotFoundException {
-        return loadClass(className, getContextClassLoader());
-    }
-
-    /**
-     * Package private.
-     *
-     * This internal method is used with Thread Context Class Loader (TCCL),
-     * please don't expose this method as public.
-     */
-    Class<?> loadClass(String className, ClassLoader cl)
-        throws ClassNotFoundException {
-        Class<?> cls = Class.forName(className, true, cl);
-        return cls;
-    }
-
-    /**
-     * @param className A non-null fully qualified class name.
-     * @param codebase A non-null, space-separated list of URL strings.
-     */
-    public Class<?> loadClass(String className, String codebase)
-            throws ClassNotFoundException, MalformedURLException {
-
-        ClassLoader parent = getContextClassLoader();
-        ClassLoader cl =
-                 URLClassLoader.newInstance(getUrlArray(codebase), parent);
-
-        return loadClass(className, cl);
-    }
-
-    String getJndiProperty(final int i) {
-        return AccessController.doPrivileged(
-            new PrivilegedAction<String>() {
-                public String run() {
-                    try {
-                        return System.getProperty(PROPS[i]);
-                    } catch (SecurityException e) {
-                        return null;
-                    }
-                }
-            }
-        );
-    }
-
-    String[] getJndiProperties() {
-        Properties sysProps = AccessController.doPrivileged(
-            new PrivilegedAction<Properties>() {
-                public Properties run() {
-                    try {
-                        return System.getProperties();
-                    } catch (SecurityException e) {
-                        return null;
-                    }
-                }
-            }
-        );
-        if (sysProps == null) {
-            return null;
-        }
-        String[] jProps = new String[PROPS.length];
-        for (int i = 0; i < PROPS.length; i++) {
-            jProps[i] = sysProps.getProperty(PROPS[i]);
-        }
-        return jProps;
-    }
-
-    InputStream getResourceAsStream(final Class<?> c, final String name) {
-        return AccessController.doPrivileged(
-            new PrivilegedAction<InputStream>() {
-                public InputStream run() {
-                    return c.getResourceAsStream(name);
-                }
-            }
-        );
-    }
-
-    InputStream getJavaHomeLibStream(final String filename) {
-        return AccessController.doPrivileged(
-            new PrivilegedAction<InputStream>() {
-                public InputStream run() {
-                    try {
-                        String javahome = System.getProperty("java.home");
-                        if (javahome == null) {
-                            return null;
-                        }
-                        String pathname = javahome + java.io.File.separator +
-                            "lib" + java.io.File.separator + filename;
-                        return new java.io.FileInputStream(pathname);
-                    } catch (Exception e) {
-                        return null;
-                    }
-                }
-            }
-        );
-    }
-
-    NamingEnumeration<InputStream> getResources(final ClassLoader cl,
-            final String name) throws IOException {
-        Enumeration<URL> urls;
-        try {
-            urls = AccessController.doPrivileged(
-                new PrivilegedExceptionAction<Enumeration<URL>>() {
-                    public Enumeration<URL> run() throws IOException {
-                        return (cl == null)
-                            ? ClassLoader.getSystemResources(name)
-                            : cl.getResources(name);
-                    }
-                }
-            );
-        } catch (PrivilegedActionException e) {
-            throw (IOException)e.getException();
-        }
-        return new InputStreamEnumeration(urls);
-    }
-
-    /**
-     * Package private.
-     *
-     * This internal method returns Thread Context Class Loader (TCCL),
-     * if null, returns the system Class Loader.
-     *
-     * Please don't expose this method as public.
-     */
-    ClassLoader getContextClassLoader() {
-
-        return AccessController.doPrivileged(
-            new PrivilegedAction<ClassLoader>() {
-                public ClassLoader run() {
-                    ClassLoader loader =
-                            Thread.currentThread().getContextClassLoader();
-                    if (loader == null) {
-                        // Don't use bootstrap class loader directly!
-                        loader = ClassLoader.getSystemClassLoader();
-                    }
-
-                    return loader;
-                }
-            }
-        );
-    }
-
-    /**
-     * Given an enumeration of URLs, an instance of this class represents
-     * an enumeration of their InputStreams.  Each operation on the URL
-     * enumeration is performed within a doPrivileged block.
-     * This is used to enumerate the resources under a foreign codebase.
-     * This class is not MT-safe.
-     */
-    class InputStreamEnumeration implements NamingEnumeration<InputStream> {
-
-        private final Enumeration<URL> urls;
-
-        private InputStream nextElement = null;
-
-        InputStreamEnumeration(Enumeration<URL> urls) {
-            this.urls = urls;
-        }
-
-        /*
-         * Returns the next InputStream, or null if there are no more.
-         * An InputStream that cannot be opened is skipped.
-         */
-        private InputStream getNextElement() {
-            return AccessController.doPrivileged(
-                new PrivilegedAction<InputStream>() {
-                    public InputStream run() {
-                        while (urls.hasMoreElements()) {
-                            try {
-                                return urls.nextElement().openStream();
-                            } catch (IOException e) {
-                                // skip this URL
-                            }
-                        }
-                        return null;
-                    }
-                }
-            );
-        }
-
-        public boolean hasMore() {
-            if (nextElement != null) {
-                return true;
-            }
-            nextElement = getNextElement();
-            return (nextElement != null);
-        }
-
-        public boolean hasMoreElements() {
-            return hasMore();
-        }
-
-        public InputStream next() {
-            if (hasMore()) {
-                InputStream res = nextElement;
-                nextElement = null;
-                return res;
-            } else {
-                throw new NoSuchElementException();
-            }
-        }
-
-        public InputStream nextElement() {
-            return next();
-        }
-
-        public void close() {
-        }
-    }
-}
--- a/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/tools/example/debug/expr/ExpressionParser.java	Tue Aug 05 12:14:11 2014 -0700
@@ -33,18 +33,18 @@
 
 public class ExpressionParser implements ExpressionParserConstants {
 
-  Stack stack = new Stack();
+  Stack<LValue> stack = new Stack<>();
   VirtualMachine vm = null;
   GetFrame frameGetter = null;
   private static GetFrame lastFrameGetter;
   private static LValue lastLValue;
 
   LValue peek() {
-    return (LValue)stack.peek();
+    return stack.peek();
   }
 
   LValue pop() {
-    return (LValue)stack.pop();
+    return stack.pop();
   }
 
   void push(LValue lval) {
@@ -915,7 +915,7 @@
   }
 
   final public void PrimarySuffix() throws ParseException {
- List argList;
+ List<Value> argList;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
     case LBRACKET:
       jj_consume_token(LBRACKET);
@@ -993,8 +993,8 @@
     jj_consume_token(NULL);
   }
 
-  final public List Arguments() throws ParseException {
- List argList = new ArrayList();
+  final public List<Value> Arguments() throws ParseException {
+ List<Value> argList = new ArrayList<>();
     jj_consume_token(LPAREN);
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
     case FALSE:
@@ -1026,7 +1026,7 @@
     throw new Error("Missing return statement in function");
   }
 
-  final public void ArgumentList(List argList) throws ParseException {
+  final public void ArgumentList(List<Value> argList) throws ParseException {
     Expression();
                 argList.add(pop().interiorGetValue());
     label_17:
@@ -1046,7 +1046,7 @@
   }
 
   final public void AllocationExpression() throws ParseException {
- List argList; String className;
+ List<Value> argList; String className;
     if (jj_2_7(2)) {
       jj_consume_token(NEW);
       PrimitiveType();
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaClass.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaClass.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -229,9 +229,9 @@
         return name.indexOf('[') != -1;
     }
 
-    public Enumeration getInstances(boolean includeSubclasses) {
+    public Enumeration<JavaHeapObject> getInstances(boolean includeSubclasses) {
         if (includeSubclasses) {
-            Enumeration res = instances.elements();
+            Enumeration<JavaHeapObject> res = instances.elements();
             for (int i = 0; i < subclasses.length; i++) {
                 res = new CompositeEnumeration(res,
                               subclasses[i].getInstances(true));
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaHeapObject.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/JavaHeapObject.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -166,11 +166,11 @@
      *
      * @return an Enumeration of JavaHeapObject instances
      */
-    public Enumeration getReferers() {
+    public Enumeration<JavaThing> getReferers() {
         if (referersLen != -1) {
             throw new RuntimeException("not resolved: " + getIdString());
         }
-        return new Enumeration() {
+        return new Enumeration<JavaThing>() {
 
             private int num = 0;
 
@@ -178,7 +178,7 @@
                 return referers != null && num < referers.length;
             }
 
-            public Object nextElement() {
+            public JavaThing nextElement() {
                 return referers[num++];
             }
         };
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/ReachableExcludesImpl.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/ReachableExcludesImpl.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -54,7 +54,7 @@
 
     private File excludesFile;
     private long lastModified;
-    private Hashtable methods;  // Hashtable<String, String>, used as a bag
+    private Hashtable<String, String> methods;  // Used as a bag
 
     /**
      * Create a new ReachableExcludesImpl over the given file.  The file will be
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/ReachableObjects.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/ReachableObjects.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -86,7 +86,7 @@
         // Now grab the elements into a vector, and sort it in decreasing size
         JavaThing[] things = new JavaThing[bag.size()];
         int i = 0;
-        for (Enumeration e = bag.elements(); e.hasMoreElements(); ) {
+        for (Enumeration<JavaHeapObject> e = bag.elements(); e.hasMoreElements(); ) {
             things[i++] = (JavaThing) e.nextElement();
         }
         ArraySorter.sort(things, new Comparer() {
@@ -131,7 +131,7 @@
         return usedFields;
     }
 
-    private String[] getElements(Hashtable ht) {
+    private String[] getElements(Hashtable<?, ?> ht) {
         Object[] keys = ht.keySet().toArray();
         int len = keys.length;
         String[] res = new String[len];
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/model/Snapshot.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/model/Snapshot.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -81,7 +81,7 @@
                  new HashMap<JavaHeapObject, Root>();
 
     // soft cache of finalizeable objects - lazily initialized
-    private SoftReference<Vector> finalizablesCache;
+    private SoftReference<Vector<?>> finalizablesCache;
 
     // represents null reference
     private JavaThing nullThing;
@@ -383,7 +383,7 @@
     /**
      * Return an Iterator of all of the classes in this snapshot.
      **/
-    public Iterator getClasses() {
+    public Iterator<JavaClass> getClasses() {
         // note that because classes is a TreeMap
         // classes are already sorted by name
         return classes.values().iterator();
@@ -395,8 +395,8 @@
         return res;
     }
 
-    public synchronized Enumeration getFinalizerObjects() {
-        Vector obj;
+    public synchronized Enumeration<?> getFinalizerObjects() {
+        Vector<?> obj;
         if (finalizablesCache != null &&
             (obj = finalizablesCache.get()) != null) {
             return obj.elements();
@@ -418,7 +418,7 @@
                 finalizables.add(referent);
             }
         }
-        finalizablesCache = new SoftReference<Vector>(finalizables);
+        finalizablesCache = new SoftReference<Vector<?>>(finalizables);
         return finalizables.elements();
     }
 
@@ -455,7 +455,7 @@
                 // Even though curr is in the rootset, we want to explore its
                 // referers, because they might be more interesting.
             }
-            Enumeration referers = curr.getReferers();
+            Enumeration<JavaThing> referers = curr.getReferers();
             while (referers.hasMoreElements()) {
                 JavaHeapObject t = (JavaHeapObject) referers.nextElement();
                 if (t != null && !visited.containsKey(t)) {
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/oql/OQLEngine.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/oql/OQLEngine.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -51,7 +51,7 @@
 
             // create JavaScript engine
             Method getEngineMethod = managerClass.getMethod("getEngineByName",
-                                new Class[] { String.class });
+                                new Class<?>[] { String.class });
             Object jse = getEngineMethod.invoke(manager, new Object[] {"js"});
             oqlSupported = (jse != null);
         } catch (Exception exp) {
@@ -205,9 +205,9 @@
             }
 
             if (q.className != null) {
-                Enumeration objects = clazz.getInstances(q.isInstanceOf);
+                Enumeration<JavaHeapObject> objects = clazz.getInstances(q.isInstanceOf);
                 while (objects.hasMoreElements()) {
-                    JavaHeapObject obj = (JavaHeapObject) objects.nextElement();
+                    JavaHeapObject obj = objects.nextElement();
                     Object[] args = new Object[] { wrapJavaObject(obj) };
                     boolean b = (whereCode == null);
                     if (!b) {
@@ -265,14 +265,14 @@
 
             // create JavaScript engine
             Method getEngineMethod = managerClass.getMethod("getEngineByName",
-                                new Class[] { String.class });
+                                new Class<?>[] { String.class });
             engine = getEngineMethod.invoke(manager, new Object[] {"js"});
 
             // initialize engine with init file (hat.js)
             InputStream strm = getInitStream();
             Class<?> engineClass = Class.forName("javax.script.ScriptEngine");
             evalMethod = engineClass.getMethod("eval",
-                                new Class[] { Reader.class });
+                                new Class<?>[] { Reader.class });
             evalMethod.invoke(engine, new Object[] {new InputStreamReader(strm)});
 
             // initialize ScriptEngine.eval(String) and
@@ -280,13 +280,13 @@
             Class<?> invocableClass = Class.forName("javax.script.Invocable");
 
             evalMethod = engineClass.getMethod("eval",
-                                  new Class[] { String.class });
+                                  new Class<?>[] { String.class });
             invokeMethod = invocableClass.getMethod("invokeFunction",
-                                  new Class[] { String.class, Object[].class });
+                                  new Class<?>[] { String.class, Object[].class });
 
             // initialize ScriptEngine.put(String, Object) method
             Method putMethod = engineClass.getMethod("put",
-                                  new Class[] { String.class, Object.class });
+                                  new Class<?>[] { String.class, Object.class });
 
             // call ScriptEngine.put to initialize built-in heap object
             putMethod.invoke(engine, new Object[] {
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/AllClassesQuery.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/AllClassesQuery.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -58,10 +58,10 @@
             startHtml("All Classes (including platform)");
         }
 
-        Iterator classes = snapshot.getClasses();
+        Iterator<JavaClass> classes = snapshot.getClasses();
         String lastPackage = null;
         while (classes.hasNext()) {
-            JavaClass clazz = (JavaClass) classes.next();
+            JavaClass clazz = classes.next();
             if (excludePlatform && PlatformClasses.isPlatformClass(clazz)) {
                 // skip this..
                 continue;
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/ClassQuery.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/ClassQuery.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -151,7 +151,7 @@
         }
         out.println("<h2>References to this object:</h2>");
         out.flush();
-        Enumeration referers = obj.getReferers();
+        Enumeration<JavaThing> referers = obj.getReferers();
         while (referers.hasMoreElements()) {
             JavaHeapObject ref = (JavaHeapObject) referers.nextElement();
             printThing(ref);
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/FinalizerObjectsQuery.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/FinalizerObjectsQuery.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,7 @@
 
 public class FinalizerObjectsQuery extends QueryHandler {
     public void run() {
-        Enumeration objs = snapshot.getFinalizerObjects();
+        Enumeration<?> objs = snapshot.getFinalizerObjects();
         startHtml("Objects pending finalization");
 
         out.println("<a href='/finalizerSummary/'>Finalizer summary</a>");
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/FinalizerSummaryQuery.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/FinalizerSummaryQuery.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,7 @@
 
 public class FinalizerSummaryQuery extends QueryHandler {
     public void run() {
-        Enumeration objs = snapshot.getFinalizerObjects();
+        Enumeration<?> objs = snapshot.getFinalizerObjects();
         startHtml("Finalizer Summary");
 
         out.println("<p align='center'>");
@@ -74,7 +74,7 @@
         private long count;
     }
 
-    private void printFinalizerSummary(Enumeration objs) {
+    private void printFinalizerSummary(Enumeration<?> objs) {
         int count = 0;
         Map<JavaClass, HistogramElement> map = new HashMap<JavaClass, HistogramElement>();
 
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/InstancesCountQuery.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/InstancesCountQuery.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -111,10 +111,10 @@
             }
             out.print("</a> ");
             if (snapshot.getHasNewSet()) {
-                Enumeration objects = clazz.getInstances(false);
+                Enumeration<JavaHeapObject> objects = clazz.getInstances(false);
                 int newInst = 0;
                 while (objects.hasMoreElements()) {
-                    JavaHeapObject obj = (JavaHeapObject)objects.nextElement();
+                    JavaHeapObject obj = objects.nextElement();
                     if (obj.isNew()) {
                         newInst++;
                     }
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/InstancesQuery.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/InstancesQuery.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -73,11 +73,11 @@
             out.print("<strong>");
             printClass(clazz);
             out.print("</strong><br><br>");
-            Enumeration objects = clazz.getInstances(includeSubclasses);
+            Enumeration<JavaHeapObject> objects = clazz.getInstances(includeSubclasses);
             long totalSize = 0;
             long instances = 0;
             while (objects.hasMoreElements()) {
-                JavaHeapObject obj = (JavaHeapObject) objects.nextElement();
+                JavaHeapObject obj = objects.nextElement();
                 if (newObjects && !obj.isNew())
                     continue;
                 printThing(obj);
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/server/RefsByTypeQuery.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/server/RefsByTypeQuery.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,15 +47,15 @@
         } else {
             Map<JavaClass, Long> referrersStat = new HashMap<JavaClass, Long>();
             final Map<JavaClass, Long> refereesStat = new HashMap<JavaClass, Long>();
-            Enumeration instances = clazz.getInstances(false);
+            Enumeration<JavaHeapObject> instances = clazz.getInstances(false);
             while (instances.hasMoreElements()) {
-                JavaHeapObject instance = (JavaHeapObject) instances.nextElement();
+                JavaHeapObject instance = instances.nextElement();
                 if (instance.getId() == -1) {
                     continue;
                 }
-                Enumeration e = instance.getReferers();
+                Enumeration<JavaThing> e = instance.getReferers();
                 while (e.hasMoreElements()) {
-                    JavaHeapObject ref = (JavaHeapObject) e.nextElement();
+                    JavaHeapObject ref = (JavaHeapObject)e.nextElement();
                     JavaClass cl = ref.getClazz();
                     if (cl == null) {
                          System.out.println("null class for " + ref);
--- a/jdk/src/share/classes/com/sun/tools/hat/internal/util/CompositeEnumeration.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/tools/hat/internal/util/CompositeEnumeration.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,12 +34,13 @@
 
 import java.util.Enumeration;
 import java.util.NoSuchElementException;
+import com.sun.tools.hat.internal.model.JavaHeapObject;
 
-public class CompositeEnumeration implements Enumeration {
-    Enumeration e1;
-    Enumeration e2;
+public class CompositeEnumeration implements Enumeration<JavaHeapObject> {
+    Enumeration<JavaHeapObject> e1;
+    Enumeration<JavaHeapObject> e2;
 
-    public CompositeEnumeration(Enumeration e1, Enumeration e2) {
+    public CompositeEnumeration(Enumeration<JavaHeapObject> e1, Enumeration<JavaHeapObject> e2) {
         this.e1 = e1;
         this.e2 = e2;
     }
@@ -48,7 +49,7 @@
         return e1.hasMoreElements() || e2.hasMoreElements();
     }
 
-    public Object nextElement() {
+    public JavaHeapObject nextElement() {
         if (e1.hasMoreElements()) {
             return e1.nextElement();
         }
--- a/jdk/src/share/classes/com/sun/tools/jdi/EventRequestManagerImpl.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/com/sun/tools/jdi/EventRequestManagerImpl.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,7 +39,7 @@
 // Warnings from List filters and List[] requestLists is  hard to fix.
 // Remove SuppressWarning when we fix the warnings from List filters
 // and List[] requestLists. The generic array is not supported.
-@SuppressWarnings("unchecked")
+@SuppressWarnings({"unchecked", "rawtypes"})
 class EventRequestManagerImpl extends MirrorImpl
                                        implements EventRequestManager
 {
--- a/jdk/src/share/classes/java/time/chrono/JapaneseEra.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/java/time/chrono/JapaneseEra.java	Tue Aug 05 12:14:11 2014 -0700
@@ -127,7 +127,7 @@
 
     // the number of defined JapaneseEra constants.
     // There could be an extra era defined in its configuration.
-    private static final int N_ERA_CONSTANTS = HEISEI.getValue() + ERA_OFFSET + 1;
+    private static final int N_ERA_CONSTANTS = HEISEI.getValue() + ERA_OFFSET;
 
     /**
      * Serialization version.
@@ -148,7 +148,7 @@
         for (int i = N_ERA_CONSTANTS; i < ERA_CONFIG.length; i++) {
             CalendarDate date = ERA_CONFIG[i].getSinceDate();
             LocalDate isoDate = LocalDate.of(date.getYear(), date.getMonth(), date.getDayOfMonth());
-            KNOWN_ERAS[i] = new JapaneseEra(i - ERA_OFFSET, isoDate);
+            KNOWN_ERAS[i] = new JapaneseEra(i - ERA_OFFSET + 1, isoDate);
         }
     };
 
@@ -195,7 +195,7 @@
      * @throws DateTimeException if the value is invalid
      */
     public static JapaneseEra of(int japaneseEra) {
-        if (japaneseEra < MEIJI.eraValue || japaneseEra + ERA_OFFSET - 1 >= KNOWN_ERAS.length) {
+        if (japaneseEra < MEIJI.eraValue || japaneseEra + ERA_OFFSET > KNOWN_ERAS.length) {
             throw new DateTimeException("Invalid era: " + japaneseEra);
         }
         return KNOWN_ERAS[ordinal(japaneseEra)];
--- a/jdk/src/share/classes/java/util/Collections.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/java/util/Collections.java	Tue Aug 05 12:14:11 2014 -0700
@@ -3486,6 +3486,7 @@
          */
         @Override
         public void replaceAll(UnaryOperator<E> operator) {
+            Objects.requireNonNull(operator);
             list.replaceAll(e -> typeCheck(operator.apply(e)));
         }
 
--- a/jdk/src/share/classes/javax/naming/directory/DirContext.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/javax/naming/directory/DirContext.java	Tue Aug 05 12:14:11 2014 -0700
@@ -723,7 +723,7 @@
      * specified set of attributes.
      * This method returns all the attributes of such objects.
      * It is equivalent to supplying null as
-     * the <tt>atributesToReturn</tt> parameter to the method
+     * the <tt>attributesToReturn</tt> parameter to the method
      * <code>search(Name, Attributes, String[])</code>.
      * <br>
      * See {@link #search(Name, Attributes, String[])} for a full description.
--- a/jdk/src/share/classes/javax/naming/ldap/Rdn.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/javax/naming/ldap/Rdn.java	Tue Aug 05 12:14:11 2014 -0700
@@ -421,7 +421,7 @@
         private String type;
         private Object value;
 
-        // If non-null, a cannonical representation of the value suitable
+        // If non-null, a canonical representation of the value suitable
         // for comparison using String.compareTo()
         private String comparable = null;
 
@@ -571,10 +571,10 @@
     }
 
     /**
-     * Given an attribute value string formated according to the rules
+     * Given an attribute value string formatted according to the rules
      * specified in
      * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>,
-     * returns the unformated value.  Escapes and quotes are
+     * returns the unformatted value.  Escapes and quotes are
      * stripped away, and hex-encoded UTF-8 is converted to equivalent
      * UTF-16 characters. Returns a string value as a String, and a
      * binary value as a byte array.
--- a/jdk/src/share/classes/javax/naming/ldap/SortControl.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/javax/naming/ldap/SortControl.java	Tue Aug 05 12:14:11 2014 -0700
@@ -188,7 +188,7 @@
     /*
      * Encodes the sort control's value using ASN.1 BER.
      * The result includes the BER tag and length for the control's value but
-     * does not include the control's object identifer and criticality setting.
+     * does not include the control's object identifier and criticality setting.
      *
      * @param   sortKeys    A non-null list of keys to sort by.
      * @return A possibly null byte array representing the ASN.1 BER encoded
--- a/jdk/src/share/classes/jdk/nio/zipfs/ZipFileAttributeView.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/jdk/nio/zipfs/ZipFileAttributeView.java	Tue Aug 05 12:14:11 2014 -0700
@@ -59,6 +59,7 @@
         this.isZipView = isZipView;
     }
 
+    @SuppressWarnings("unchecked") // Cast to V
     static <V extends FileAttributeView> V get(ZipPath path, Class<V> type) {
         if (type == null)
             throw new NullPointerException();
--- a/jdk/src/share/classes/jdk/nio/zipfs/ZipFileSystemProvider.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/jdk/nio/zipfs/ZipFileSystemProvider.java	Tue Aug 05 12:14:11 2014 -0700
@@ -271,6 +271,7 @@
     }
 
     @Override
+    @SuppressWarnings("unchecked") // Cast to A
     public <A extends BasicFileAttributes> A
         readAttributes(Path path, Class<A> type, LinkOption... options)
         throws IOException
--- a/jdk/src/share/classes/sun/net/www/protocol/ftp/FtpURLConnection.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/net/www/protocol/ftp/FtpURLConnection.java	Tue Aug 05 12:14:11 2014 -0700
@@ -301,7 +301,7 @@
             throw new IOException(fe);
         }
         try {
-            ftp.login(user, password.toCharArray());
+            ftp.login(user, password == null ? null : password.toCharArray());
         } catch (sun.net.ftp.FtpProtocolException e) {
             ftp.close();
             // Backward compatibility
--- a/jdk/src/share/classes/sun/security/ssl/DHCrypt.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/security/ssl/DHCrypt.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -188,7 +188,7 @@
      *         the same size as the Diffie-Hellman modulus.
      */
     SecretKey getAgreedSecret(BigInteger peerPublicValue,
-            boolean keyIsValidated) throws IOException {
+            boolean keyIsValidated) throws SSLHandshakeException {
         try {
             KeyFactory kf = JsseJce.getKeyFactory("DiffieHellman");
             DHPublicKeySpec spec =
@@ -211,7 +211,8 @@
             ka.doPhase(publicKey, true);
             return ka.generateSecret("TlsPremasterSecret");
         } catch (GeneralSecurityException e) {
-            throw new RuntimeException("Could not generate secret", e);
+            throw (SSLHandshakeException) new SSLHandshakeException(
+                "Could not generate secret").initCause(e);
         }
     }
 
--- a/jdk/src/share/classes/sun/security/ssl/ECDHCrypt.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/security/ssl/ECDHCrypt.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,7 @@
 
 import javax.crypto.SecretKey;
 import javax.crypto.KeyAgreement;
+import javax.net.ssl.SSLHandshakeException;
 
 /**
  * Helper class for the ECDH key exchange. It generates the appropriate
@@ -88,19 +89,20 @@
     }
 
     // called by ClientHandshaker with either the server's static or ephemeral public key
-    SecretKey getAgreedSecret(PublicKey peerPublicKey) {
+    SecretKey getAgreedSecret(PublicKey peerPublicKey) throws SSLHandshakeException {
         try {
             KeyAgreement ka = JsseJce.getKeyAgreement("ECDH");
             ka.init(privateKey);
             ka.doPhase(peerPublicKey, true);
             return ka.generateSecret("TlsPremasterSecret");
         } catch (GeneralSecurityException e) {
-            throw new RuntimeException("Could not generate secret", e);
+            throw (SSLHandshakeException) new SSLHandshakeException(
+                "Could not generate secret").initCause(e);
         }
     }
 
     // called by ServerHandshaker
-    SecretKey getAgreedSecret(byte[] encodedPoint) {
+    SecretKey getAgreedSecret(byte[] encodedPoint) throws SSLHandshakeException {
         try {
             ECParameterSpec params = publicKey.getParams();
             ECPoint point = JsseJce.decodePoint(encodedPoint, params.getCurve());
@@ -108,10 +110,9 @@
             ECPublicKeySpec spec = new ECPublicKeySpec(point, params);
             PublicKey peerPublicKey = kf.generatePublic(spec);
             return getAgreedSecret(peerPublicKey);
-        } catch (GeneralSecurityException e) {
-            throw new RuntimeException("Could not generate secret", e);
-        } catch (java.io.IOException e) {
-            throw new RuntimeException("Could not generate secret", e);
+        } catch (GeneralSecurityException | java.io.IOException e) {
+            throw (SSLHandshakeException) new SSLHandshakeException(
+                "Could not generate secret").initCause(e);
         }
     }
 
--- a/jdk/src/share/classes/sun/security/ssl/Handshaker.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/security/ssl/Handshaker.java	Tue Aug 05 12:14:11 2014 -0700
@@ -656,8 +656,15 @@
      */
     ProtocolList getActiveProtocols() {
         if (activeProtocols == null) {
+            boolean enabledSSL20Hello = false;
             ArrayList<ProtocolVersion> protocols = new ArrayList<>(4);
             for (ProtocolVersion protocol : enabledProtocols.collection()) {
+                // Need not to check the SSL20Hello protocol.
+                if (protocol.v == ProtocolVersion.SSL20Hello.v) {
+                    enabledSSL20Hello = true;
+                    continue;
+                }
+
                 boolean found = false;
                 for (CipherSuite suite : enabledCipherSuites.collection()) {
                     if (suite.isAvailable() && suite.obsoleted > protocol.v &&
@@ -684,6 +691,11 @@
                         "No available cipher suite for " + protocol);
                 }
             }
+
+            if (!protocols.isEmpty() && enabledSSL20Hello) {
+                protocols.add(ProtocolVersion.SSL20Hello);
+            }
+
             activeProtocols = new ProtocolList(protocols);
         }
 
--- a/jdk/src/share/classes/sun/tools/asm/Assembler.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/asm/Assembler.java	Tue Aug 05 12:14:11 2014 -0700
@@ -238,7 +238,7 @@
         // if a local variable table is generated
         if ((field != null) && env.debug_vars()) {
             @SuppressWarnings("unchecked")
-            Vector<MemberDefinition> v = (Vector<MemberDefinition>)field.getArguments();
+            Vector<MemberDefinition> v = field.getArguments();
             if (v != null) {
                 for (Enumeration<MemberDefinition> e = v.elements() ; e.hasMoreElements() ;) {
                     MemberDefinition f = e.nextElement();
@@ -386,7 +386,7 @@
         if ((field != null) && field.getArguments() != null) {
               int sum = 0;
               @SuppressWarnings("unchecked")
-              Vector<MemberDefinition> v = (Vector<MemberDefinition>)field.getArguments();
+              Vector<MemberDefinition> v = field.getArguments();
               for (Enumeration<MemberDefinition> e = v.elements(); e.hasMoreElements(); ) {
                   MemberDefinition f = e.nextElement();
                   sum += f.getType().stackSize();
@@ -858,7 +858,7 @@
         if ((field != null) && (field.getArguments() != null)) {
             int reg = 0;
             @SuppressWarnings("unchecked")
-            Vector<MemberDefinition> v = (Vector<MemberDefinition>)field.getArguments();
+            Vector<MemberDefinition> v = field.getArguments();
             for (Enumeration<MemberDefinition> e = v.elements(); e.hasMoreElements(); ) {
                 MemberDefinition f = e.nextElement();
                 locals[reg] = f;
@@ -875,7 +875,7 @@
         if ((field != null) && (field.getArguments() != null)) {
             int reg = 0;
             @SuppressWarnings("unchecked")
-            Vector<MemberDefinition> v = (Vector<MemberDefinition>)field.getArguments();
+            Vector<MemberDefinition> v = field.getArguments();
             for (Enumeration<MemberDefinition> e = v.elements(); e.hasMoreElements(); ) {
                 MemberDefinition f = e.nextElement();
                 locals[reg] = f;
--- a/jdk/src/share/classes/sun/tools/asm/ConstantPool.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/asm/ConstantPool.java	Tue Aug 05 12:14:11 2014 -0700
@@ -42,7 +42,7 @@
  */
 public final
 class ConstantPool implements RuntimeConstants {
-    Hashtable<Object,ConstantPoolData> hash = new Hashtable<>(101);
+    Hashtable<Object, ConstantPoolData> hash = new Hashtable<>(101);
 
     /**
      * Find an entry, may return 0
--- a/jdk/src/share/classes/sun/tools/asm/SwitchData.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/asm/SwitchData.java	Tue Aug 05 12:14:11 2014 -0700
@@ -39,9 +39,9 @@
 class SwitchData {
     int minValue, maxValue;
     Label defaultLabel = new Label();
-    Hashtable<Integer,Label> tab = new Hashtable<>();
+    Hashtable<Integer, Label> tab = new Hashtable<>();
 // JCOV
-    Hashtable<Integer,Long> whereCaseTab = null;
+    Hashtable<Integer, Long> whereCaseTab = null;
 // end JCOV
 
     /**
@@ -92,13 +92,13 @@
 
 // JCOV
     public void initTableCase() {
-        whereCaseTab = new Hashtable<Integer,Long>();
+        whereCaseTab = new Hashtable<Integer, Long>();
     }
     public void addTableCase(int index, long where) {
         if (whereCaseTab != null)
             whereCaseTab.put(Integer.valueOf(index), Long.valueOf(where));
     }
-    // this puts String key into Hashtable<Integer,Long>
+    // this puts String key into Hashtable<Integer, Long>
     @SuppressWarnings("unchecked")
     public void addTableDefault(long where) {
         if (whereCaseTab != null)
@@ -123,7 +123,7 @@
      * hash table will be an Integer, with the value being a label.  The
      * enumeration returns the keys in sorted order.
      */
-    SwitchDataEnumeration(Hashtable<Integer,Label> tab) {
+    SwitchDataEnumeration(Hashtable<Integer, Label> tab) {
         table = new Integer[tab.size()];
         int i = 0;
         for (Enumeration<Integer> e = tab.keys() ; e.hasMoreElements() ; ) {
--- a/jdk/src/share/classes/sun/tools/java/BinaryClass.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/java/BinaryClass.java	Tue Aug 05 12:14:11 2014 -0700
@@ -43,7 +43,7 @@
 class BinaryClass extends ClassDefinition implements Constants {
     BinaryConstantPool cpool;
     BinaryAttribute atts;
-    Vector dependencies;
+    Vector<ClassDeclaration> dependencies;
     private boolean haveLoadedNested = false;
 
     /**
@@ -51,7 +51,7 @@
      */
     public BinaryClass(Object source, ClassDeclaration declaration, int modifiers,
                            ClassDeclaration superClass, ClassDeclaration interfaces[],
-                           Vector dependencies) {
+                           Vector<ClassDeclaration> dependencies) {
         super(source, 0, declaration, modifiers, null, null);
         this.dependencies = dependencies;
         this.superClass = superClass;
@@ -134,7 +134,7 @@
         BinaryConstantPool cpool = new BinaryConstantPool(in);
 
         // The dependencies of this class
-        Vector dependencies = cpool.getDependencies(env);
+        Vector<ClassDeclaration> dependencies = cpool.getDependencies(env);
 
         // Read modifiers
         int classMod = in.readUnsignedShort() & ACCM_CLASS;  // JVM 4.1 ClassFile.access_flags
@@ -500,7 +500,7 @@
     /**
      * Get the dependencies
      */
-    public Enumeration getDependencies() {
+    public Enumeration<ClassDeclaration> getDependencies() {
         return dependencies.elements();
     }
 
--- a/jdk/src/share/classes/sun/tools/java/BinaryConstantPool.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/java/BinaryConstantPool.java	Tue Aug 05 12:14:11 2014 -0700
@@ -222,8 +222,8 @@
      * Get a list of dependencies, ie: all the classes referenced in this
      * constant pool.
      */
-    public Vector getDependencies(Environment env) {
-        Vector v = new Vector();
+    public Vector<ClassDeclaration> getDependencies(Environment env) {
+        Vector<ClassDeclaration> v = new Vector<>();
         for (int i = 1 ; i < cpool.length ; i++) {
             switch(types[i]) {
               case CONSTANT_CLASS:
@@ -234,8 +234,9 @@
         return v;
     }
 
-    Hashtable indexHashObject, indexHashAscii;
-    Vector MoreStuff;
+    Hashtable<Object, Integer> indexHashObject;
+    Hashtable<Object, Integer> indexHashAscii;
+    Vector<String> MoreStuff;
 
     /**
      * Find the index of an Object in the constant pool
@@ -243,7 +244,7 @@
     public int indexObject(Object obj, Environment env) {
         if (indexHashObject == null)
             createIndexHash(env);
-        Integer result = (Integer)indexHashObject.get(obj);
+        Integer result = indexHashObject.get(obj);
         if (result == null)
             throw new IndexOutOfBoundsException("Cannot find object " + obj + " of type " +
                                 obj.getClass() + " in constant pool");
@@ -257,9 +258,9 @@
     public int indexString(String string, Environment env) {
         if (indexHashObject == null)
             createIndexHash(env);
-        Integer result = (Integer)indexHashAscii.get(string);
+        Integer result = indexHashAscii.get(string);
         if (result == null) {
-            if (MoreStuff == null) MoreStuff = new Vector();
+            if (MoreStuff == null) MoreStuff = new Vector<>();
             result = cpool.length + MoreStuff.size();
             MoreStuff.addElement(string);
             indexHashAscii.put(string, result);
@@ -273,8 +274,8 @@
      */
 
     public void createIndexHash(Environment env) {
-        indexHashObject = new Hashtable();
-        indexHashAscii = new Hashtable();
+        indexHashObject = new Hashtable<>();
+        indexHashAscii = new Hashtable<>();
         for (int i = 1; i < cpool.length; i++) {
             if (types[i] == CONSTANT_UTF8) {
                 indexHashAscii.put(cpool[i], i);
@@ -342,7 +343,7 @@
             }
         }
         for (int i = cpool.length; i < length; i++) {
-            String string = (String)(MoreStuff.elementAt(i - cpool.length));
+            String string = MoreStuff.elementAt(i - cpool.length);
             out.writeByte(CONSTANT_UTF8);
             out.writeUTF(string);
         }
--- a/jdk/src/share/classes/sun/tools/java/BinaryMember.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/java/BinaryMember.java	Tue Aug 05 12:14:11 2014 -0700
@@ -82,9 +82,9 @@
     /**
      * Get arguments
      */
-    public Vector getArguments() {
+    public Vector<MemberDefinition> getArguments() {
         if (isConstructor() && (getClassDefinition().getSuperClass() == null)) {
-            Vector v = new Vector();
+            Vector<MemberDefinition> v = new Vector<>();
             v.addElement(new LocalMember(0, getClassDefinition(), 0,
                                         getClassDefinition().getType(), idThis));
             return v;
--- a/jdk/src/share/classes/sun/tools/java/ClassDefinition.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/java/ClassDefinition.java	Tue Aug 05 12:14:11 2014 -0700
@@ -64,14 +64,14 @@
     protected boolean nestError;
     protected UplevelReference references;
     protected boolean referencesFrozen;
-    private Hashtable fieldHash = new Hashtable(31);
+    private Hashtable<Identifier, MemberDefinition> fieldHash = new Hashtable<>(31);
     private int abstr;
 
     // Table of local and anonymous classes whose internal names are constructed
     // using the current class as a prefix.  This is part of a fix for
     // bugid 4054523 and 4030421.  See also 'Environment.getClassDefinition'
     // and 'BatchEnvironment.makeClassDefinition'.  Allocated on demand.
-    private Hashtable localClasses = null;
+    private Hashtable<String, ClassDefinition> localClasses = null;
     private final int LOCAL_CLASSES_SIZE = 31;
 
     // The immediately surrounding context in which the class appears.
@@ -378,7 +378,7 @@
         return firstMember;
     }
     public final MemberDefinition getFirstMatch(Identifier name) {
-        return (MemberDefinition)fieldHash.get(name);
+        return fieldHash.get(name);
     }
 
     /**
@@ -519,9 +519,9 @@
 
         // We check for any abstract methods inherited or declared
         // by this class.
-        Iterator methods = getMethods();
+        Iterator<MemberDefinition> methods = getMethods();
         while (methods.hasNext()) {
-            MemberDefinition method = (MemberDefinition) methods.next();
+            MemberDefinition method = methods.next();
 
             if (method.isAbstract()) {
                 return true;
@@ -623,12 +623,11 @@
         // general can return methods which are not visible to the
         // current package.  We need to make sure that these do not
         // prevent this class from being implemented.
-        Iterator otherMethods = intDef.getMethods();
+        Iterator<MemberDefinition> otherMethods = intDef.getMethods();
 
         while (otherMethods.hasNext()) {
             // Get one of the methods from intDef...
-            MemberDefinition method =
-                (MemberDefinition) otherMethods.next();
+            MemberDefinition method = otherMethods.next();
 
             Identifier name = method.getName();
             Type type = method.getType();
@@ -996,14 +995,14 @@
         MemberDefinition tentative = null;
 
         // A list of other methods which may be maximally specific too.
-        List candidateList = null;
+        List<MemberDefinition> candidateList = null;
 
         // Get all the methods inherited by this class which
         // have the name `methodName'.
-        Iterator methods = allMethods.lookupName(methodName);
+        Iterator<MemberDefinition> methods = allMethods.lookupName(methodName);
 
         while (methods.hasNext()) {
-            MemberDefinition method = (MemberDefinition)methods.next();
+            MemberDefinition method = methods.next();
 
             // See if this method is applicable.
             if (!env.isApplicable(method, argumentTypes)) {
@@ -1046,7 +1045,7 @@
                     // list of other candidates.
                     if (!env.isMoreSpecific(tentative,method)) {
                         if (candidateList == null) {
-                            candidateList = new ArrayList();
+                            candidateList = new ArrayList<>();
                         }
                         candidateList.add(method);
                     }
@@ -1057,9 +1056,9 @@
         if (tentative != null && candidateList != null) {
             // Find out if our `tentative' match is a uniquely
             // maximally specific.
-            Iterator candidates = candidateList.iterator();
+            Iterator<MemberDefinition> candidates = candidateList.iterator();
             while (candidates.hasNext()) {
-                MemberDefinition method = (MemberDefinition)candidates.next();
+                MemberDefinition method = candidates.next();
                 if (!env.isMoreSpecific(tentative, method)) {
                     throw new AmbiguousMember(tentative, method);
                 }
@@ -1186,13 +1185,13 @@
     // methods so that we can correctly detect that this class is
     // indeed abstract and so that we can give somewhat comprehensible
     // error messages.
-    private List permanentlyAbstractMethods = new ArrayList();
+    private List<MemberDefinition> permanentlyAbstractMethods = new ArrayList<>();
 
     /**
      * This method returns an Iterator of all abstract methods
      * in our superclasses which we are unable to implement.
      */
-    protected Iterator getPermanentlyAbstractMethods() {
+    protected Iterator<MemberDefinition> getPermanentlyAbstractMethods() {
         // This method can only be called after collectInheritedMethods.
         if (allMethods == null) {
             throw new CompilerError("isPermanentlyAbstract() called early");
@@ -1239,10 +1238,10 @@
 
         try {
             ClassDefinition pClass = parent.getClassDefinition(env);
-            Iterator methods = pClass.getMethods(env);
+            Iterator<MemberDefinition> methods = pClass.getMethods(env);
             while (methods.hasNext()) {
                 MemberDefinition method =
-                    (MemberDefinition) methods.next();
+                    methods.next();
 
                 // Private methods are not inherited.
                 //
@@ -1522,7 +1521,7 @@
             // Make sure that we add all unimplementable methods from our
             // superclass to our list of unimplementable methods.
             ClassDefinition sc = scDecl.getClassDefinition();
-            Iterator supIter = sc.getPermanentlyAbstractMethods();
+            Iterator<MemberDefinition> supIter = sc.getPermanentlyAbstractMethods();
             while (supIter.hasNext()) {
                 permanentlyAbstractMethods.add(supIter.next());
             }
@@ -1587,7 +1586,7 @@
      * Get an Iterator of all methods which could be accessed in an
      * instance of this class.
      */
-    public Iterator getMethods(Environment env) {
+    public Iterator<MemberDefinition> getMethods(Environment env) {
         if (allMethods == null) {
             collectInheritedMethods(env);
         }
@@ -1599,7 +1598,7 @@
      * instance of this class.  Throw a compiler error if we haven't
      * generated this information yet.
      */
-    public Iterator getMethods() {
+    public Iterator<MemberDefinition> getMethods() {
         if (allMethods == null) {
             throw new CompilerError("getMethods: too early");
         }
@@ -1636,7 +1635,7 @@
      * affect our compilation.
      */
     protected void addMirandaMethods(Environment env,
-                                     Iterator mirandas) {
+                                     Iterator<MemberDefinition> mirandas) {
         // do nothing.
     }
 
@@ -1921,11 +1920,11 @@
             // insert this at the front, because of initialization order
             field.nextMember = firstMember;
             firstMember = field;
-            field.nextMatch = (MemberDefinition)fieldHash.get(field.name);
+            field.nextMatch = fieldHash.get(field.name);
         } else {
             lastMember.nextMember = field;
             lastMember = field;
-            field.nextMatch = (MemberDefinition)fieldHash.get(field.name);
+            field.nextMatch = fieldHash.get(field.name);
         }
         fieldHash.put(field.name, field);
     }
@@ -2013,13 +2012,13 @@
         if (localClasses == null) {
             return null;
         } else {
-            return (ClassDefinition)localClasses.get(name);
+            return localClasses.get(name);
         }
     }
 
     public void addLocalClass(ClassDefinition c, String name) {
         if (localClasses == null) {
-            localClasses = new Hashtable(LOCAL_CLASSES_SIZE);
+            localClasses = new Hashtable<>(LOCAL_CLASSES_SIZE);
         }
         localClasses.put(name, c);
     }
--- a/jdk/src/share/classes/sun/tools/java/ClassPath.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/java/ClassPath.java	Tue Aug 05 12:14:11 2014 -0700
@@ -233,11 +233,11 @@
     /**
      * Returns list of files given a package name and extension.
      */
-    public Enumeration getFiles(String pkg, String ext) {
-        Hashtable files = new Hashtable();
+    public Enumeration<ClassFile> getFiles(String pkg, String ext) {
+        Hashtable<String, ClassFile> files = new Hashtable<>();
         for (int i = path.length; --i >= 0; ) {
             if (path[i].zip != null) {
-                Enumeration e = path[i].zip.entries();
+                Enumeration<? extends ZipEntry> e = path[i].zip.entries();
                 while (e.hasMoreElements()) {
                     ZipEntry entry = (ZipEntry)e.nextElement();
                     String name = entry.getName();
@@ -287,9 +287,9 @@
     File dir;
     ZipFile zip;
 
-    Hashtable subdirs = new Hashtable(29); // cache of sub-directory listings
+    Hashtable<String, String[]> subdirs = new Hashtable<>(29); // cache of sub-directory listings:
     String[] getFiles(String subdir) {
-        String files[] = (String[]) subdirs.get(subdir);
+        String files[] = subdirs.get(subdir);
         if (files == null) {
             // search the directory, exactly once
             File sd = new File(dir.getPath(), subdir);
--- a/jdk/src/share/classes/sun/tools/java/Identifier.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/java/Identifier.java	Tue Aug 05 12:14:11 2014 -0700
@@ -58,7 +58,7 @@
     /**
      * The hashtable of identifiers
      */
-    static Hashtable hash = new Hashtable(3001, 0.5f);
+    static Hashtable<String, Identifier> hash = new Hashtable<>(3001, 0.5f);
 
     /**
      * The name of the identifier
@@ -115,7 +115,7 @@
      */
     public static synchronized Identifier lookup(String s) {
         //System.out.println("lookup(" + s + ")");
-        Identifier id = (Identifier)hash.get(s);
+        Identifier id = hash.get(s);
         if (id == null) {
             hash.put(s, id = new Identifier(s));
         }
--- a/jdk/src/share/classes/sun/tools/java/Imports.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/java/Imports.java	Tue Aug 05 12:14:11 2014 -0700
@@ -67,20 +67,20 @@
     /**
      * The imported classes, including memoized imports from packages.
      */
-    Hashtable classes = new Hashtable();
+    Hashtable<Identifier, Identifier> classes = new Hashtable<>();
 
     /**
      * The imported package identifiers.  This will not contain duplicate
      * imports for the same package.  It will also not contain the
      * current package.
      */
-    Vector packages = new Vector();
+    Vector<IdentifierToken> packages = new Vector<>();
 
     /**
      * The (originally) imported classes.
      * A vector of IdentifierToken.
      */
-    Vector singles = new Vector();
+    Vector<IdentifierToken> singles = new Vector<>();
 
     /**
      * Are the import names checked yet?
@@ -134,9 +134,9 @@
         //     }
         // }
 
-        Vector resolvedPackages = new Vector();
-        for (Enumeration e = packages.elements() ; e.hasMoreElements() ;) {
-            IdentifierToken t = (IdentifierToken)e.nextElement();
+        Vector<IdentifierToken> resolvedPackages = new Vector<>();
+        for (Enumeration<IdentifierToken> e = packages.elements() ; e.hasMoreElements() ;) {
+            IdentifierToken t = e.nextElement();
             Identifier nm = t.getName();
             long where = t.getWhere();
 
@@ -175,8 +175,8 @@
         }
         packages = resolvedPackages;
 
-        for (Enumeration e = singles.elements() ; e.hasMoreElements() ;) {
-            IdentifierToken t = (IdentifierToken)e.nextElement();
+        for (Enumeration<IdentifierToken> e = singles.elements() ; e.hasMoreElements() ;) {
+            IdentifierToken t = e.nextElement();
             Identifier nm = t.getName();
             long where = t.getWhere();
             Identifier pkg = nm.getQualifier();
@@ -191,7 +191,7 @@
             Identifier snm = nm.getFlatName().getName();
 
             // make sure it isn't already imported explicitly
-            Identifier className = (Identifier)classes.get(snm);
+            Identifier className = classes.get(snm);
             if (className != null) {
                 Identifier f1 = Identifier.lookup(className.getQualifier(),
                                                   className.getFlatName());
@@ -280,7 +280,7 @@
         }
 
         // Check if it was imported before
-        Identifier className = (Identifier)classes.get(nm);
+        Identifier className = classes.get(nm);
         if (className != null) {
             if (tracing) env.dtExit("Imports.resolve: PREVIOUSLY IMPORTED " + nm);
             return className;
@@ -303,9 +303,9 @@
         } else {
             // If it isn't in the current package, try to find it in
             // our import-on-demands.
-            Enumeration e = packages.elements();
+            Enumeration<IdentifierToken> e = packages.elements();
             while (e.hasMoreElements()) {
-                IdentifierToken t = (IdentifierToken)e.nextElement();
+                IdentifierToken t = e.nextElement();
                 id = Identifier.lookup(t.getName(), nm);
 
                 if (importable(id, env)) {
@@ -386,7 +386,7 @@
         if (nm.isQualified())
             return nm;
 
-        Identifier className = (Identifier)classes.get(nm);
+        Identifier className = classes.get(nm);
         if (className != null) {
             return className;
         }
@@ -425,7 +425,7 @@
         // added to the list, ignore it.
         final int size = packages.size();
         for (int i = 0; i < size; i++) {
-            if (name == ((IdentifierToken)packages.elementAt(i)).getName()) {
+            if (name == (packages.elementAt(i)).getName()) {
                 return;
             }
         }
@@ -464,7 +464,7 @@
      * Return an unmodifiable list of IdentifierToken representing
      * packages specified as imports.
      */
-    public List getImportedPackages() {
+    public List<IdentifierToken> getImportedPackages() {
         return Collections.unmodifiableList(packages);
     }
 
@@ -472,7 +472,7 @@
      * Return an unmodifiable list of IdentifierToken representing
      * classes specified as imports.
      */
-    public List getImportedClasses() {
+    public List<IdentifierToken> getImportedClasses() {
         return Collections.unmodifiableList(singles);
     }
 
--- a/jdk/src/share/classes/sun/tools/java/MemberDefinition.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/java/MemberDefinition.java	Tue Aug 05 12:14:11 2014 -0700
@@ -103,7 +103,7 @@
      * uniqueness of proxy objects.  See the makeProxyMember method
      * defined below.
      */
-    static private Map proxyCache;
+    static private Map<String,MemberDefinition> proxyCache;
 
     /**
      * Create a member which is externally the same as `field' but
@@ -126,12 +126,12 @@
                                                    Environment env) {
 
         if (proxyCache == null) {
-            proxyCache = new HashMap();
+            proxyCache = new HashMap<>();
         }
 
         String key = field.toString() + "@" + classDef.toString();
         // System.out.println("Key is : " + key);
-        MemberDefinition proxy = (MemberDefinition)proxyCache.get(key);
+        MemberDefinition proxy = proxyCache.get(key);
 
         if (proxy != null)
             return proxy;
@@ -217,8 +217,8 @@
     /**
      * Get arguments (a vector of LocalMember)
      */
-    public Vector getArguments() {
-        return isMethod() ? new Vector() : null;
+    public Vector<MemberDefinition> getArguments() {
+        return isMethod() ? new Vector<>() : null;
     }
 
     /**
--- a/jdk/src/share/classes/sun/tools/java/MethodSet.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/java/MethodSet.java	Tue Aug 05 12:14:11 2014 -0700
@@ -46,7 +46,7 @@
      * A Map containing Lists of MemberDefinitions.  The Lists
      * contain methods which share the same name.
      */
-    private final Map lookupMap;
+    private final Map<Identifier,List<MemberDefinition>> lookupMap;
 
     /**
      * The number of methods stored in the MethodSet.
@@ -63,7 +63,7 @@
      */
     public MethodSet() {
         frozen = false;
-        lookupMap = new HashMap();
+        lookupMap = new HashMap<>();
         count = 0;
     }
 
@@ -89,12 +89,12 @@
             Identifier name = method.getName();
 
             // Get a List containing all methods of this name.
-            List methodList = (List) lookupMap.get(name);
+            List<MemberDefinition> methodList = lookupMap.get(name);
 
             if (methodList == null) {
                 // There is no method with this name already.
                 // Create a List, and insert it into the hash.
-                methodList = new ArrayList();
+                methodList = new ArrayList<>();
                 lookupMap.put(name, methodList);
             }
 
@@ -102,7 +102,7 @@
             // been added to the MethodSet.
             int size = methodList.size();
             for (int i = 0; i < size; i++) {
-                if (((MemberDefinition) methodList.get(i))
+                if ((methodList.get(i))
                     .getType().equalArguments(method.getType())) {
                     throw new CompilerError("duplicate addition");
                 }
@@ -128,12 +128,12 @@
             Identifier name = method.getName();
 
             // Get a List containing all methods of this name.
-            List methodList = (List) lookupMap.get(name);
+            List<MemberDefinition> methodList = lookupMap.get(name);
 
             if (methodList == null) {
                 // There is no method with this name already.
                 // Create a List, and insert it into the hash.
-                methodList = new ArrayList();
+                methodList = new ArrayList<>();
                 lookupMap.put(name, methodList);
             }
 
@@ -141,7 +141,7 @@
             // `method'.
             int size = methodList.size();
             for (int i = 0; i < size; i++) {
-                if (((MemberDefinition) methodList.get(i))
+                if ((methodList.get(i))
                     .getType().equalArguments(method.getType())) {
                     methodList.set(i, method);
                     return;
@@ -160,11 +160,11 @@
     public MemberDefinition lookupSig(Identifier name, Type type) {
         // Go through all methods of the same name and see if any
         // have the right signature.
-        Iterator matches = lookupName(name);
+        Iterator<MemberDefinition> matches = lookupName(name);
         MemberDefinition candidate;
 
         while (matches.hasNext()) {
-            candidate = (MemberDefinition) matches.next();
+            candidate = matches.next();
             if (candidate.getType().equalArguments(type)) {
                 return candidate;
             }
@@ -178,10 +178,10 @@
      * Returns an Iterator of all methods contained in the
      * MethodSet which have a given name.
      */
-    public Iterator lookupName(Identifier name) {
+    public Iterator<MemberDefinition> lookupName(Identifier name) {
         // Find the List containing all methods of this name, and
         // return that List's Iterator.
-        List methodList = (List) lookupMap.get(name);
+        List<MemberDefinition> methodList = lookupMap.get(name);
         if (methodList == null) {
             // If there is no method of this name, return a bogus, empty
             // Iterator.
@@ -193,22 +193,21 @@
     /**
      * Returns an Iterator of all methods in the MethodSet
      */
-    public Iterator iterator() {
+    public Iterator<MemberDefinition> iterator() {
 
         //----------------------------------------------------------
         // The inner class MethodIterator is used to create our
         // Iterator of all methods in the MethodSet.
-        class MethodIterator implements Iterator {
-            Iterator hashIter = lookupMap.values().iterator();
-            Iterator listIter = Collections.emptyIterator();
+        class MethodIterator implements Iterator<MemberDefinition> {
+            Iterator<List<MemberDefinition>> hashIter = lookupMap.values().iterator();
+            Iterator<MemberDefinition> listIter = Collections.emptyIterator();
 
             public boolean hasNext() {
                 if (listIter.hasNext()) {
                     return true;
                 } else {
                     if (hashIter.hasNext()) {
-                        listIter = ((List) hashIter.next())
-                            .iterator();
+                        listIter = hashIter.next().iterator();
 
                         // The following should be always true.
                         if (listIter.hasNext()) {
@@ -224,7 +223,7 @@
                 return false;
             }
 
-            public Object next() {
+            public MemberDefinition next() {
                 return listIter.next();
             }
 
@@ -262,7 +261,7 @@
     public String toString() {
         int len = size();
         StringBuilder sb = new StringBuilder();
-        Iterator all = iterator();
+        Iterator<MemberDefinition> all = iterator();
         sb.append("{");
 
         while (all.hasNext()) {
--- a/jdk/src/share/classes/sun/tools/java/Package.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/java/Package.java	Tue Aug 05 12:14:11 2014 -0700
@@ -144,11 +144,11 @@
         return null;
     }
 
-    public Enumeration getSourceFiles() {
+    public Enumeration<ClassFile> getSourceFiles() {
         return sourcePath.getFiles(pkg, ".java");
     }
 
-    public Enumeration getBinaryFiles() {
+    public Enumeration<ClassFile> getBinaryFiles() {
         return binaryPath.getFiles(pkg, ".class");
     }
 
--- a/jdk/src/share/classes/sun/tools/java/Parser.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/java/Parser.java	Tue Aug 05 12:14:11 2014 -0700
@@ -392,8 +392,8 @@
             if (superName == null) {
                 env.error(type.getWhere(), "type.expected");
             }
-            Vector ext = new Vector(1);
-            Vector impl = new Vector(0);
+            Vector<IdentifierToken> ext = new Vector<>(1);
+            Vector<IdentifierToken> impl = new Vector<>(0);
             ext.addElement(new IdentifierToken(idNull));
             if (token == IMPLEMENTS || token == EXTENDS) {
                 env.error(pos, "anonymous.extends");
@@ -1682,7 +1682,7 @@
             // Parse and ignore throws clause
             IdentifierToken exp[] = null;
             if (token == THROWS) {
-                Vector v = new Vector();
+                Vector<IdentifierToken> v = new Vector<>();
                 scan();
                 v.addElement(parseName(false));
                 while (token == COMMA) {
@@ -1890,8 +1890,8 @@
         long p = pos;
         expect(IDENT);
 
-        Vector ext = new Vector();
-        Vector impl = new Vector();
+        Vector<IdentifierToken> ext = new Vector<>();
+        Vector<IdentifierToken> impl = new Vector<>();
         parseInheritance(ext, impl);
 
         ClassDefinition tmp = parseClassBody(nm, mod, ctx, doc, ext, impl, p);
@@ -1901,7 +1901,7 @@
         return tmp;
     }
 
-    protected void parseInheritance(Vector ext, Vector impl) throws SyntaxError, IOException {
+    protected void parseInheritance(Vector<IdentifierToken> ext, Vector<IdentifierToken> impl) throws SyntaxError, IOException {
         // Parse extends clause
         if (token == EXTENDS) {
             scan();
@@ -1929,23 +1929,23 @@
      */
     protected ClassDefinition parseClassBody(IdentifierToken nm, int mod,
                                              int ctx, String doc,
-                                             Vector ext, Vector impl, long p
+                                             Vector<IdentifierToken> ext, Vector<IdentifierToken> impl, long p
                                              ) throws SyntaxError, IOException {
         // Decide which is the super class
         IdentifierToken sup = null;
         if ((mod & M_INTERFACE) != 0) {
             if (impl.size() > 0) {
-                env.error(((IdentifierToken)impl.elementAt(0)).getWhere(),
+                env.error(impl.elementAt(0).getWhere(),
                           "intf.impl.intf");
             }
             impl = ext;
         } else {
             if (ext.size() > 0) {
                 if (ext.size() > 1) {
-                    env.error(((IdentifierToken)ext.elementAt(1)).getWhere(),
+                    env.error(ext.elementAt(1).getWhere(),
                               "multiple.inherit");
                 }
-                sup = (IdentifierToken)ext.elementAt(0);
+                sup = ext.elementAt(0);
             }
         }
 
--- a/jdk/src/share/classes/sun/tools/java/Type.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/java/Type.java	Tue Aug 05 12:14:11 2014 -0700
@@ -57,7 +57,7 @@
     /**
      * This hashtable is used to cache types
      */
-    private static final Hashtable typeHash = new Hashtable(231);
+    private static final Hashtable<String, Type> typeHash = new Hashtable<>(231);
 
     /**
      * The TypeCode of this type. The value of this field is one
@@ -169,7 +169,7 @@
      */
     public static synchronized Type tArray(Type elem) {
         String sig = new String(SIG_ARRAY + elem.getTypeSignature());
-        Type t = (Type)typeHash.get(sig);
+        Type t = typeHash.get(sig);
         if (t == null) {
             t = new ArrayType(sig, elem);
         }
@@ -213,7 +213,7 @@
             new String(SIG_CLASS +
                        className.toString().replace('.', SIGC_PACKAGE) +
                        SIG_ENDCLASS);
-        Type t = (Type)typeHash.get(sig);
+        Type t = typeHash.get(sig);
         if (t == null) {
             t = new ClassType(sig, className);
         }
@@ -283,7 +283,7 @@
         sb.append(returnType.getTypeSignature());
 
         String sig = sb.toString();
-        Type t = (Type)typeHash.get(sig);
+        Type t = typeHash.get(sig);
         if (t == null) {
             t = new MethodType(sig, returnType, argTypes);
         }
@@ -309,7 +309,7 @@
      * @exception CompilerError invalid type signature.
      */
     public static synchronized Type tType(String sig) {
-        Type t = (Type)typeHash.get(sig);
+        Type t = typeHash.get(sig);
         if (t != null) {
             return t;
         }
--- a/jdk/src/share/classes/sun/tools/javac/BatchEnvironment.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/javac/BatchEnvironment.java	Tue Aug 05 12:14:11 2014 -0700
@@ -61,17 +61,17 @@
     /**
      * A hashtable of resource contexts.
      */
-    Hashtable packages = new Hashtable(31);
+    Hashtable<Identifier, Package> packages = new Hashtable<>(31);
 
     /**
      * The classes, in order of appearance.
      */
-    Vector classesOrdered = new Vector();
+    Vector<ClassDeclaration> classesOrdered = new Vector<>();
 
     /**
      * The classes, keyed by ClassDeclaration.
      */
-    Hashtable classes = new Hashtable(351);
+    Hashtable<Type, ClassDeclaration> classes = new Hashtable<>(351);
 
     /**
      * flags
@@ -106,7 +106,7 @@
     /**
      * A list of files containing deprecation warnings.
      */
-    Vector deprecationFiles = new Vector();
+    Vector<Object> deprecationFiles = new Vector<>();
 
         /**
          * writes out error messages
@@ -271,7 +271,7 @@
      * Return an enumeration of all the currently defined classes
      * in order of appearance to getClassDeclaration().
      */
-    public Enumeration getClasses() {
+    public Enumeration<ClassDeclaration> getClasses() {
         return classesOrdered.elements();
     }
 
@@ -280,7 +280,7 @@
      * check in Imports#resolve().  These are the current packages for
      * all classes being compiled as of the first call to isExemptPackage.
      */
-    private Set exemptPackages;
+    private Set<Identifier> exemptPackages;
 
     /**
      * Tells whether an Identifier refers to a package which should be
@@ -317,11 +317,11 @@
         // will be exempt from the "exists" check in
         // sun.tools.java.Imports#resolve().
 
-        exemptPackages = new HashSet(101);
+        exemptPackages = new HashSet<>(101);
 
         // Add all of the current packages and their prefixes to our set.
-        for (Enumeration e = getClasses(); e.hasMoreElements(); ) {
-            ClassDeclaration c = (ClassDeclaration) e.nextElement();
+        for (Enumeration<ClassDeclaration> e = getClasses(); e.hasMoreElements(); ) {
+            ClassDeclaration c = e.nextElement();
             if (c.getStatus() == CS_PARSED) {
                 SourceClass def = (SourceClass) c.getClassDefinition();
                 if (def.isLocal())
@@ -389,7 +389,7 @@
     }
 
     public ClassDeclaration getClassDeclaration(Type t) {
-        ClassDeclaration c = (ClassDeclaration)classes.get(t);
+        ClassDeclaration c = classes.get(t);
         if (c == null) {
             classes.put(t, c = new ClassDeclaration(t.getClassName()));
             classesOrdered.addElement(c);
@@ -407,7 +407,7 @@
         }
         Type t = Type.tClass(nm);
         try {
-            ClassDeclaration c = (ClassDeclaration)classes.get(t);
+            ClassDeclaration c = classes.get(t);
             return (c != null) ? c.getName().equals(nm) :
                 getPackage(nm.getQualifier()).classExists(nm.getName());
         } catch (IOException e) {
@@ -448,7 +448,7 @@
      * Get the package path for a package
      */
     public Package getPackage(Identifier pkg) throws IOException {
-        Package p = (Package)packages.get(pkg);
+        Package p = packages.get(pkg);
         if (p == null) {
             packages.put(pkg, p = new Package(sourcePath, binaryPath, pkg));
         }
@@ -527,10 +527,10 @@
             // (Fix for 4107960).
             //
             // The dependency code was previously in BatchParser.java.
-            Enumeration e = p.classes.elements();
+            Enumeration<SourceClass> e = p.classes.elements();
 
             // first will not be an inner class.
-            ClassDefinition first = (ClassDefinition) e.nextElement();
+            ClassDefinition first = e.nextElement();
             if (first.isInnerClass()) {
                 throw new CompilerError("BatchEnvironment, first is inner");
             }
@@ -538,7 +538,7 @@
             ClassDefinition current = first;
             ClassDefinition next;
             while (e.hasMoreElements()) {
-                next = (ClassDefinition) e.nextElement();
+                next = e.nextElement();
                 // Don't chain in inner classes.
                 if (next.isInnerClass()) {
                     continue;
@@ -607,7 +607,7 @@
     /**
      * Load a binary class
      */
-    boolean needsCompilation(Hashtable check, ClassDeclaration c) {
+    boolean needsCompilation(Hashtable<ClassDeclaration, ClassDeclaration> check, ClassDeclaration c) {
         switch (c.getStatus()) {
 
           case CS_UNDEFINED:
@@ -621,8 +621,8 @@
                 check.put(c, c);
 
                 BinaryClass bin = (BinaryClass)c.getClassDefinition();
-                for (Enumeration e = bin.getDependencies() ; e.hasMoreElements() ;) {
-                    ClassDeclaration dep = (ClassDeclaration)e.nextElement();
+                for (Enumeration<ClassDeclaration> e = bin.getDependencies() ; e.hasMoreElements() ;) {
+                    ClassDeclaration dep = e.nextElement();
                     if (needsCompilation(check, dep)) {
                         // It must be source, dependencies need compilation
                         c.setDefinition(bin, CS_SOURCE);
@@ -829,11 +829,11 @@
 
           case CS_UNDECIDED: {
             if (tracing) dtEvent("loadDefinition: STATUS IS UNDECIDED");
-            Hashtable tab = new Hashtable();
+            Hashtable<ClassDeclaration, ClassDeclaration> tab = new Hashtable<>();
             if (!needsCompilation(tab, c)) {
                 // All undecided classes that this class depends on must be binary
-                for (Enumeration e = tab.keys() ; e.hasMoreElements() ; ) {
-                    ClassDeclaration dep = (ClassDeclaration)e.nextElement();
+                for (Enumeration<ClassDeclaration> e = tab.keys() ; e.hasMoreElements() ; ) {
+                    ClassDeclaration dep = e.nextElement();
                     if (dep.getStatus() == CS_UNDECIDED) {
                         // must be binary, dependencies need compilation
                         dep.setDefinition(dep.getClassDefinition(), CS_BINARY);
@@ -1015,9 +1015,17 @@
         return sourceClass;
     }
 
+    /*
+     * makeMemberDefinition method is left with rawtypes and with lint messages suppressed.
+     * The addition of Generics to com.sun.tools.* has uncovered an inconsistency
+     * in usage though tools still work correctly as long as this function is allowed to
+     * function as is.
+     */
+
     /**
      * Create a new field.
      */
+    @SuppressWarnings({"rawtypes","unchecked"})
     public MemberDefinition makeMemberDefinition(Environment origEnv, long where,
                                                ClassDefinition clazz,
                                                String doc, int modifiers,
--- a/jdk/src/share/classes/sun/tools/javac/BatchParser.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/javac/BatchParser.java	Tue Aug 05 12:14:11 2014 -0700
@@ -56,7 +56,7 @@
     /**
      * The classes defined in this file
      */
-    protected Vector classes;
+    protected Vector<SourceClass> classes;
 
 
     /**
@@ -76,7 +76,7 @@
         super(env, in);
 
         imports = new Imports(env);
-        classes = new Vector();
+        classes = new Vector<>();
         toplevelEnv = imports.newEnvironment(env);
     }
 
--- a/jdk/src/share/classes/sun/tools/javac/CompilerMember.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/javac/CompilerMember.java	Tue Aug 05 12:14:11 2014 -0700
@@ -38,7 +38,7 @@
  */
 @Deprecated
 final
-class CompilerMember implements Comparable {
+class CompilerMember implements Comparable<Object> {
     MemberDefinition field;
     Assembler asm;
     Object value;
--- a/jdk/src/share/classes/sun/tools/javac/Main.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/javac/Main.java	Tue Aug 05 12:14:11 2014 -0700
@@ -212,7 +212,7 @@
 //end JCOV
         int flags = F_WARNINGS | F_DEBUG_LINES | F_DEBUG_SOURCE;
         long tm = System.currentTimeMillis();
-        Vector v = new Vector();
+        Vector<String> v = new Vector<>();
         boolean nowrite = false;
         String props = null;
         String encoding = null;
@@ -500,8 +500,8 @@
 
         try {
             // Parse all input files
-            for (Enumeration e = v.elements() ; e.hasMoreElements() ;) {
-                File file = new File((String)e.nextElement());
+            for (Enumeration<String> e = v.elements() ; e.hasMoreElements() ;) {
+                File file = new File(e.nextElement());
                 try {
                     env.parseFile(new ClassFile(file));
                 } catch (FileNotFoundException ee) {
@@ -512,8 +512,8 @@
 
             // Do a post-read check on all newly-parsed classes,
             // after they have all been read.
-            for (Enumeration e = env.getClasses() ; e.hasMoreElements() ; ) {
-                ClassDeclaration c = (ClassDeclaration)e.nextElement();
+            for (Enumeration<ClassDeclaration> e = env.getClasses() ; e.hasMoreElements() ; ) {
+                ClassDeclaration c = e.nextElement();
                 if (c.getStatus() == CS_PARSED) {
                     if (c.getClassDefinition().isLocal())
                         continue;
@@ -531,8 +531,8 @@
             do {
                 done = true;
                 env.flushErrors();
-                for (Enumeration e = env.getClasses() ; e.hasMoreElements() ; ) {
-                    ClassDeclaration c = (ClassDeclaration)e.nextElement();
+                for (Enumeration<ClassDeclaration> e = env.getClasses() ; e.hasMoreElements() ; ) {
+                    ClassDeclaration c = e.nextElement();
                     SourceClass src;
 
                     switch (c.getStatus()) {
--- a/jdk/src/share/classes/sun/tools/javac/SourceClass.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/javac/SourceClass.java	Tue Aug 05 12:14:11 2014 -0700
@@ -70,7 +70,7 @@
    /**
      * The list of class dependencies
      */
-    Hashtable deps = new Hashtable(11);
+    Hashtable<ClassDeclaration, ClassDeclaration> deps = new Hashtable<>(11);
 
     /**
      * The field used to represent "this" in all of my code.
@@ -357,7 +357,7 @@
                     f.addModifiers(M_ABSTRACT);
                 }
             }
-            Vector arguments = f.getArguments();
+            Vector<MemberDefinition> arguments = f.getArguments();
             if (arguments != null) {
                 // arguments can be null if this is an implicit abstract method
                 int argumentLength = arguments.size();
@@ -921,9 +921,9 @@
             // Tell the user which methods force this class to be abstract.
 
             // First list all of the "unimplementable" abstract methods.
-            Iterator iter = getPermanentlyAbstractMethods();
+            Iterator<MemberDefinition> iter = getPermanentlyAbstractMethods();
             while (iter.hasNext()) {
-                MemberDefinition method = (MemberDefinition) iter.next();
+                MemberDefinition method = iter.next();
                 // We couldn't override this method even if we
                 // wanted to.  Try to make the error message
                 // as non-confusing as possible.
@@ -937,7 +937,7 @@
             while (iter.hasNext()) {
                 // For each method, check if it is abstract.  If it is,
                 // output an appropriate error message.
-                MemberDefinition method = (MemberDefinition) iter.next();
+                MemberDefinition method = iter.next();
                 if (method.isAbstract()) {
                     env.error(where, "abstract.class",
                               getClassDeclaration(), method,
@@ -1163,11 +1163,10 @@
      * sun/tools/java/ClassDeclaration.java
      */
     protected void addMirandaMethods(Environment env,
-                                     Iterator mirandas) {
+                                     Iterator<MemberDefinition> mirandas) {
 
         while(mirandas.hasNext()) {
-            MemberDefinition method =
-                (MemberDefinition)mirandas.next();
+            MemberDefinition method = mirandas.next();
 
             addMember(method);
 
@@ -2040,7 +2039,7 @@
      * is used to stop two compilations from saving the
      * same class.
      */
-    private static Vector active = new Vector();
+    private static Vector<Object> active = new Vector<>();
 
     /**
      * Compile this class
@@ -2082,9 +2081,9 @@
 
     protected void compileClass(Environment env, OutputStream out)
                 throws IOException, ClassNotFound {
-        Vector variables = new Vector();
-        Vector methods = new Vector();
-        Vector innerClasses = new Vector();
+        Vector<CompilerMember> variables = new Vector<>();
+        Vector<CompilerMember> methods = new Vector<>();
+        Vector<ClassDefinition> innerClasses = new Vector<>();
         CompilerMember init = new CompilerMember(new MemberDefinition(getWhere(), this, M_STATIC, Type.tMethod(Type.tVoid), idClassInit, null, null), new Assembler());
         Context ctx = new Context((Context)null, init.field);
 
@@ -2243,8 +2242,8 @@
             methods.setElementAt(ordered_methods[i], i);
 
         // Optimize Code and Collect method constants
-        for (Enumeration e = methods.elements() ; e.hasMoreElements() ; ) {
-            CompilerMember f = (CompilerMember)e.nextElement();
+        for (Enumeration<CompilerMember> e = methods.elements() ; e.hasMoreElements() ; ) {
+            CompilerMember f = e.nextElement();
             try {
                 f.asm.optimize(env);
                 f.asm.collect(env, f.field, tab);
@@ -2262,8 +2261,8 @@
         }
 
         // Collect field constants
-        for (Enumeration e = variables.elements() ; e.hasMoreElements() ; ) {
-            CompilerMember f = (CompilerMember)e.nextElement();
+        for (Enumeration<CompilerMember> e = variables.elements() ; e.hasMoreElements() ; ) {
+            CompilerMember f = e.nextElement();
             tab.put(f.name);
             tab.put(f.sig);
 
@@ -2274,9 +2273,9 @@
         }
 
         // Collect inner class constants
-        for (Enumeration e = innerClasses.elements();
+        for (Enumeration<ClassDefinition> e = innerClasses.elements();
              e.hasMoreElements() ; ) {
-            ClassDefinition inner = (ClassDefinition)e.nextElement();
+            ClassDefinition inner = e.nextElement();
             tab.put(inner.getClassDeclaration());
 
             // If the inner class is local, we do not need to add its
@@ -2368,8 +2367,8 @@
         DataOutputStream databuf = new DataOutputStream(buf);
 
         data.writeShort(variables.size());
-        for (Enumeration e = variables.elements() ; e.hasMoreElements() ; ) {
-            CompilerMember f = (CompilerMember)e.nextElement();
+        for (Enumeration<CompilerMember> e = variables.elements() ; e.hasMoreElements() ; ) {
+            CompilerMember f = e.nextElement();
             Object val = f.field.getInitialValue();
 
             data.writeShort(f.field.getModifiers() & MM_FIELD);
@@ -2400,8 +2399,8 @@
         // write methods
 
         data.writeShort(methods.size());
-        for (Enumeration e = methods.elements() ; e.hasMoreElements() ; ) {
-            CompilerMember f = (CompilerMember)e.nextElement();
+        for (Enumeration<CompilerMember> e = methods.elements() ; e.hasMoreElements() ; ) {
+            CompilerMember f = e.nextElement();
 
             int xmods = f.field.getModifiers() & MM_METHOD;
             // Transform floating point modifiers.  M_STRICTFP
@@ -2530,7 +2529,7 @@
             data.writeShort(tab.index("InnerClasses"));
             data.writeInt(2 + 2*4*innerClasses.size());
             data.writeShort(innerClasses.size());
-            for (Enumeration e = innerClasses.elements() ;
+            for (Enumeration<ClassDefinition> e = innerClasses.elements() ;
                  e.hasMoreElements() ; ) {
                 // For each inner class name transformation, we have a record
                 // with the following fields:
@@ -2549,7 +2548,7 @@
                 // See also the initInnerClasses() method in BinaryClass.java.
 
                 // Generate inner_class_info_index.
-                ClassDefinition inner = (ClassDefinition)e.nextElement();
+                ClassDefinition inner = e.nextElement();
                 data.writeShort(tab.index(inner.getClassDeclaration()));
 
                 // Generate outer_class_info_index.
@@ -2662,8 +2661,8 @@
             //  where className1 is the name of the class we are in, and
             //        classname2 is the name of the class className1
             //          is dependent on.
-            for(Enumeration e = deps.elements();  e.hasMoreElements(); ) {
-                ClassDeclaration data = (ClassDeclaration) e.nextElement();
+            for(Enumeration<ClassDeclaration> e = deps.elements();  e.hasMoreElements(); ) {
+                ClassDeclaration data = e.nextElement();
                 // Mangle name of class dependend on.
                 String depName =
                     Type.mangleInnerType(data.getName()).toString();
--- a/jdk/src/share/classes/sun/tools/javac/SourceMember.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/javac/SourceMember.java	Tue Aug 05 12:14:11 2014 -0700
@@ -46,7 +46,7 @@
     /**
      * The argument names (if it is a method)
      */
-    Vector args;
+    Vector<MemberDefinition> args;
 
     // set to the MemberDefinition in the interface if we have this field because
     // it has been forced on us
@@ -64,7 +64,7 @@
     static final int INLINED    = 4;
     static final int ERROR      = 5;
 
-    public Vector getArguments() {
+    public Vector<MemberDefinition> getArguments() {
         return args;
     }
 
@@ -74,7 +74,7 @@
      */
     public SourceMember(long where, ClassDefinition clazz,
                        String doc, int modifiers, Type type,
-                       Identifier name, Vector argNames,
+                       Identifier name, Vector<MemberDefinition> argNames,
                        IdentifierToken exp[], Node value) {
         super(where, clazz, modifiers, type, name, exp, value);
         this.documentation = doc;
@@ -86,17 +86,17 @@
         }
     }
 
-    void createArgumentFields(Vector argNames) {
+    void createArgumentFields(Vector<MemberDefinition> argNames) {
         // Create a list of arguments
         if (isMethod()) {
-            args = new Vector();
+            args = new Vector<>();
 
             if (isConstructor() || !(isStatic() || isInitializer())) {
                 args.addElement(((SourceClass)clazz).getThisArgument());
             }
 
             if (argNames != null) {
-                Enumeration e = argNames.elements();
+                Enumeration<MemberDefinition> e = argNames.elements();
                 Type argTypes[] = getType().getArgumentTypes();
                 for (int i = 0 ; i < argTypes.length ; i++) {
                     Object x = e.nextElement();
@@ -359,7 +359,7 @@
             getExceptions(env);
 
             if (isMethod()) {
-                Vector argNames = args; args = null;
+                Vector<MemberDefinition> argNames = args; args = null;
                 createArgumentFields(argNames);
                 // Add outer instance argument for constructors.
                 if (isConstructor()) {
@@ -523,7 +523,7 @@
                     // initialize vset, indication that each of the arguments
                     // to the function has a value
 
-                    for (Enumeration e = args.elements(); e.hasMoreElements();){
+                    for (Enumeration<MemberDefinition> e = args.elements(); e.hasMoreElements();){
                         LocalMember f = (LocalMember)e.nextElement();
                         vset.addVar(ctx.declare(env, f));
                     }
@@ -549,7 +549,7 @@
                     //System.out.println("VSET = " + vset);
                     ClassDeclaration exp[] = getExceptions(env);
                     int htsize = (exp.length > 3) ? 17 : 7;
-                    Hashtable thrown = new Hashtable(htsize);
+                    Hashtable<Object, Object> thrown = new Hashtable<>(htsize);
 
                     vset = s.checkMethod(env, ctx, vset, thrown);
 
@@ -558,7 +558,7 @@
                     ClassDeclaration ignore2 =
                         env.getClassDeclaration(idJavaLangRuntimeException);
 
-                    for (Enumeration e = thrown.keys(); e.hasMoreElements();) {
+                    for (Enumeration<Object> e = thrown.keys(); e.hasMoreElements();) {
                         ClassDeclaration c = (ClassDeclaration)e.nextElement();
                         ClassDefinition def = c.getClassDefinition(env);
                         if (def.subClassOf(env, ignore1)
@@ -606,7 +606,7 @@
                         }
                     }
                 } else {
-                    Hashtable thrown = new Hashtable(3);  // small & throw-away
+                    Hashtable<Object, Object> thrown = new Hashtable<>(3);  // small & throw-away
                     Expression val = (Expression)getValue();
 
                     vset = val.checkInitializer(env, ctx, vset,
@@ -636,7 +636,7 @@
                     ClassDeclaration ignore2 =
                         env.getClassDeclaration(idJavaLangRuntimeException);
 
-                    for (Enumeration e = thrown.keys(); e.hasMoreElements(); ) {
+                    for (Enumeration<Object> e = thrown.keys(); e.hasMoreElements(); ) {
                         ClassDeclaration c = (ClassDeclaration)e.nextElement();
                         ClassDefinition def = c.getClassDefinition(env);
 
@@ -707,7 +707,7 @@
                 if ((!isNative()) && (!isAbstract())) {
                     Statement s = (Statement)getValue();
                     Context ctx = new Context((Context)null, this);
-                    for (Enumeration e = args.elements() ; e.hasMoreElements() ;) {
+                    for (Enumeration<MemberDefinition> e = args.elements() ; e.hasMoreElements() ;) {
                         LocalMember local = (LocalMember)e.nextElement();
                         ctx.declare(env, local);
                     }
@@ -812,7 +812,7 @@
                 Context ctx = new Context((Context)null, this);
                 Statement s = (Statement)getValue();
 
-                for (Enumeration e = args.elements() ; e.hasMoreElements() ; ) {
+                for (Enumeration<MemberDefinition> e = args.elements() ; e.hasMoreElements() ; ) {
                     LocalMember f = (LocalMember)e.nextElement();
                     ctx.declare(env, f);
                     //ctx.declare(env, (LocalMember)e.nextElement());
--- a/jdk/src/share/classes/sun/tools/tree/AndExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/AndExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -54,7 +54,7 @@
      *        either the left or right hand side is false
      */
     public void checkCondition(Environment env, Context ctx, Vset vset,
-                               Hashtable exp, ConditionVars cvars) {
+                               Hashtable<Object, Object> exp, ConditionVars cvars) {
         // Find out when the left side is true/false
         left.checkCondition(env, ctx, vset, exp, cvars);
         left = convert(env, ctx, Type.tBoolean, left);
--- a/jdk/src/share/classes/sun/tools/tree/ArrayAccessExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/ArrayAccessExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -62,7 +62,7 @@
     /**
      * Check expression type
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = right.checkValue(env, ctx, vset, exp);
         if (index == null) {
             env.error(where, "array.index.required");
@@ -83,7 +83,7 @@
     }
 
     public Vset checkAmbigName(Environment env, Context ctx,
-                               Vset vset, Hashtable exp,
+                               Vset vset, Hashtable<Object, Object> exp,
                                UnaryExpression loc) {
         if (index == null) {
             vset = right.checkAmbigName(env, ctx, vset, exp, this);
@@ -109,7 +109,7 @@
      * Check the array if it appears on the LHS of an assignment
      */
     public Vset checkLHS(Environment env, Context ctx,
-                         Vset vset, Hashtable exp) {
+                         Vset vset, Hashtable<Object, Object> exp) {
         return checkValue(env, ctx, vset, exp);
     }
 
@@ -117,7 +117,7 @@
      * Check the array if it appears on the LHS of an op= expression
      */
     public Vset checkAssignOp(Environment env, Context ctx,
-                              Vset vset, Hashtable exp, Expression outside) {
+                              Vset vset, Hashtable<Object, Object> exp, Expression outside) {
         return checkValue(env, ctx, vset, exp);
     }
 
--- a/jdk/src/share/classes/sun/tools/tree/ArrayExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/ArrayExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -47,11 +47,11 @@
     /**
      * Check expression type
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         env.error(where, "invalid.array.expr");
         return vset;
     }
-    public Vset checkInitializer(Environment env, Context ctx, Vset vset, Type t, Hashtable exp) {
+    public Vset checkInitializer(Environment env, Context ctx, Vset vset, Type t, Hashtable<Object, Object> exp) {
         if (!t.isType(TC_ARRAY)) {
             if (!t.isType(TC_ERROR)) {
                 env.error(where, "invalid.array.init", t);
--- a/jdk/src/share/classes/sun/tools/tree/AssignExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/AssignExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -50,7 +50,7 @@
     /**
      * Check an assignment expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         if (left instanceof IdentifierExpression) {
             // we don't want to mark an identifier as having a value
             // until having evaluated the right-hand side
--- a/jdk/src/share/classes/sun/tools/tree/AssignOpExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/AssignOpExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -149,7 +149,7 @@
     /**
      * Check an assignment expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = left.checkAssignOp(env, ctx, vset, exp, this);
         vset = right.checkValue(env, ctx, vset, exp);
         int tm = left.type.getTypeMask() | right.type.getTypeMask();
--- a/jdk/src/share/classes/sun/tools/tree/BinaryAssignExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/BinaryAssignExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -67,7 +67,7 @@
     /**
      * Check void expression
      */
-    public Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object,Object> exp) {
         return checkValue(env, ctx, vset, exp);
     }
 
--- a/jdk/src/share/classes/sun/tools/tree/BinaryExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/BinaryExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -64,7 +64,7 @@
     /**
      * Check a binary expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = left.checkValue(env, ctx, vset, exp);
         vset = right.checkValue(env, ctx, vset, exp);
 
--- a/jdk/src/share/classes/sun/tools/tree/BinaryLogicalExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/BinaryLogicalExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -46,7 +46,7 @@
      * Check a binary expression
      */
     public Vset checkValue(Environment env, Context ctx,
-                           Vset vset, Hashtable exp) {
+                           Vset vset, Hashtable<Object, Object> exp) {
         ConditionVars cvars = new ConditionVars();
         // evaluate the logical expression, determining which variables are
         // set if the resulting value is true or false
@@ -61,7 +61,7 @@
      */
     abstract
     public void checkCondition(Environment env, Context ctx, Vset vset,
-                               Hashtable exp, ConditionVars cvars);
+                               Hashtable<Object, Object> exp, ConditionVars cvars);
 
 
     /**
--- a/jdk/src/share/classes/sun/tools/tree/BooleanExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/BooleanExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -86,7 +86,7 @@
      */
 
     public void checkCondition(Environment env, Context ctx,
-                               Vset vset, Hashtable exp, ConditionVars cvars) {
+                               Vset vset, Hashtable<Object, Object> exp, ConditionVars cvars) {
         if (value) {
             cvars.vsFalse = Vset.DEAD_END;
             cvars.vsTrue = vset;
--- a/jdk/src/share/classes/sun/tools/tree/BreakStatement.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/BreakStatement.java	Tue Aug 05 12:14:11 2014 -0700
@@ -51,7 +51,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         reach(env, vset);
         checkLabel(env, ctx);
         CheckContext destctx = (CheckContext)new CheckContext(ctx, this).getBreakContext(lbl);
--- a/jdk/src/share/classes/sun/tools/tree/CaseStatement.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/CaseStatement.java	Tue Aug 05 12:14:11 2014 -0700
@@ -49,7 +49,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         if (expr != null) {
             expr.checkValue(env, ctx, vset, exp);
             expr = convert(env, ctx, Type.tInt, expr);
--- a/jdk/src/share/classes/sun/tools/tree/CastExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/CastExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -48,7 +48,7 @@
     /**
      * Check the expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         type = left.toType(env, ctx);
         vset = right.checkValue(env, ctx, vset, exp);
 
--- a/jdk/src/share/classes/sun/tools/tree/CatchStatement.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/CatchStatement.java	Tue Aug 05 12:14:11 2014 -0700
@@ -67,7 +67,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = reach(env, vset);
         ctx = new Context(ctx, this);
         Type type = texpr.toType(env, ctx);
--- a/jdk/src/share/classes/sun/tools/tree/CommaExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/CommaExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -46,7 +46,7 @@
     /**
      * Check void expression
      */
-    public Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = left.check(env, ctx, vset, exp);
         vset = right.check(env, ctx, vset, exp);
         return vset;
--- a/jdk/src/share/classes/sun/tools/tree/CompoundStatement.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/CompoundStatement.java	Tue Aug 05 12:14:11 2014 -0700
@@ -70,7 +70,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env, ctx);
         if (args.length > 0) {
             vset = reach(env, vset);
--- a/jdk/src/share/classes/sun/tools/tree/ConditionalExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/ConditionalExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -64,7 +64,7 @@
     /**
      * Check the expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         ConditionVars cvars = cond.checkCondition(env, ctx, vset, exp);
         vset = left.checkValue(env, ctx, cvars.vsTrue, exp).join(
                right.checkValue(env, ctx, cvars.vsFalse, exp) );
@@ -107,7 +107,7 @@
         return vset;
     }
 
-    public Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = cond.checkValue(env, ctx, vset, exp);
         cond = convert(env, ctx, Type.tBoolean, cond);
         return left.check(env, ctx, vset.copy(), exp).join(right.check(env, ctx, vset, exp));
--- a/jdk/src/share/classes/sun/tools/tree/ContinueStatement.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/ContinueStatement.java	Tue Aug 05 12:14:11 2014 -0700
@@ -52,7 +52,7 @@
      * Check statement
      */
 
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env, ctx);
         reach(env, vset);
         // A new context is established here because the 'continue' statement
--- a/jdk/src/share/classes/sun/tools/tree/ConvertExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/ConvertExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -47,7 +47,7 @@
     /**
      * Check the value
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         return right.checkValue(env, ctx, vset, exp);
     }
 
--- a/jdk/src/share/classes/sun/tools/tree/DeclarationStatement.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/DeclarationStatement.java	Tue Aug 05 12:14:11 2014 -0700
@@ -55,11 +55,11 @@
      * Check statement
      * Report an error unless the call is checkBlockStatement.
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         env.error(where, "invalid.decl");
         return checkBlockStatement(env, ctx, vset, exp);
     }
-    Vset checkBlockStatement(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset checkBlockStatement(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         if (labels != null) {
             env.error(where, "declaration.with.label", labels[0]);
         }
--- a/jdk/src/share/classes/sun/tools/tree/DoStatement.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/DoStatement.java	Tue Aug 05 12:14:11 2014 -0700
@@ -53,7 +53,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env,ctx);
         CheckContext newctx = new CheckContext(ctx, this);
         // remember what was unassigned on entry
--- a/jdk/src/share/classes/sun/tools/tree/ExprExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/ExprExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -49,7 +49,7 @@
      * Check a condition.  We must pass it on to our unparenthesised form.
      */
     public void checkCondition(Environment env, Context ctx, Vset vset,
-                               Hashtable exp, ConditionVars cvars) {
+                               Hashtable<Object, Object> exp, ConditionVars cvars) {
         right.checkCondition(env, ctx, vset, exp, cvars);
         type = right.type;
     }
@@ -60,7 +60,7 @@
      * (Part of fix for 4090372)
      */
     public Vset checkAssignOp(Environment env, Context ctx,
-                              Vset vset, Hashtable exp, Expression outside) {
+                              Vset vset, Hashtable<Object, Object> exp, Expression outside) {
         vset = right.checkAssignOp(env, ctx, vset, exp, outside);
         type = right.type;
         return vset;
@@ -80,7 +80,7 @@
     // going to clammer for this one.
     //
     // public Vset checkLHS(Environment env, Context ctx,
-    //     Vset vset, Hashtable exp) {
+    //     Vset vset, Hashtable<Object, Object> exp) {
     //     vset = right.check(env, ctx, vset, exp);
     //     type = right.type;
     //     return vset;
--- a/jdk/src/share/classes/sun/tools/tree/Expression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/Expression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -192,18 +192,18 @@
     /**
      * Check an expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         return vset;
     }
-    public Vset checkInitializer(Environment env, Context ctx, Vset vset, Type t, Hashtable exp) {
+    public Vset checkInitializer(Environment env, Context ctx, Vset vset, Type t, Hashtable<Object, Object> exp) {
         return checkValue(env, ctx, vset, exp);
     }
-    public Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         throw new CompilerError("check failed");
     }
 
     public Vset checkLHS(Environment env, Context ctx,
-                            Vset vset, Hashtable exp) {
+                            Vset vset, Hashtable<Object, Object> exp) {
         env.error(where, "invalid.lhs.assignment");
         type = Type.tError;
         return vset;
@@ -243,7 +243,7 @@
     }
 
     public Vset checkAssignOp(Environment env, Context ctx,
-                              Vset vset, Hashtable exp, Expression outside) {
+                              Vset vset, Hashtable<Object, Object> exp, Expression outside) {
         if (outside instanceof IncDecExpression)
             env.error(where, "invalid.arg", opNames[outside.op]);
         else
@@ -266,7 +266,7 @@
      * and act appropriately to verify the full package name.
      * @arg loc the expression containing the ambiguous expression
      */
-    public Vset checkAmbigName(Environment env, Context ctx, Vset vset, Hashtable exp,
+    public Vset checkAmbigName(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp,
                                UnaryExpression loc) {
         return checkValue(env, ctx, vset, exp);
     }
@@ -277,7 +277,7 @@
      * the condition is false.
      */
     public ConditionVars checkCondition(Environment env, Context ctx,
-                                        Vset vset, Hashtable exp) {
+                                        Vset vset, Hashtable<Object, Object> exp) {
         ConditionVars cvars = new ConditionVars();
         checkCondition(env, ctx, vset, exp, cvars);
         return cvars;
@@ -295,7 +295,7 @@
      */
 
     public void checkCondition(Environment env, Context ctx,
-                               Vset vset, Hashtable exp, ConditionVars cvars) {
+                               Vset vset, Hashtable<Object, Object> exp, ConditionVars cvars) {
         cvars.vsTrue = cvars.vsFalse = checkValue(env, ctx, vset, exp);
         // unshare side effects:
         cvars.vsFalse = cvars.vsFalse.copy();
--- a/jdk/src/share/classes/sun/tools/tree/ExpressionStatement.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/ExpressionStatement.java	Tue Aug 05 12:14:11 2014 -0700
@@ -50,7 +50,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env, ctx);
         return expr.check(env, ctx, reach(env, vset), exp);
     }
--- a/jdk/src/share/classes/sun/tools/tree/FieldExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/FieldExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -219,7 +219,7 @@
      */
 
     public Vset checkAmbigName(Environment env, Context ctx,
-                               Vset vset, Hashtable exp,
+                               Vset vset, Hashtable<Object, Object> exp,
                                UnaryExpression loc) {
         if (id == idThis || id == idClass) {
             loc = null;         // this cannot be a type or package
@@ -232,7 +232,7 @@
      */
 
     public Vset checkValue(Environment env, Context ctx,
-                           Vset vset, Hashtable exp) {
+                           Vset vset, Hashtable<Object, Object> exp) {
         vset = checkCommon(env, ctx, vset, exp, null, false);
         if (id == idSuper && type != Type.tError) {
             // "super" is not allowed in this context.
@@ -416,7 +416,7 @@
      */
 
     private Vset checkCommon(Environment env, Context ctx,
-                             Vset vset, Hashtable exp,
+                             Vset vset, Hashtable<Object, Object> exp,
                              UnaryExpression loc, boolean isLHS) {
 
         // Handle class literal, e.g., 'x.class'.
@@ -850,7 +850,7 @@
      * Finish checking it.
      */
     private Vset checkInnerClass(Environment env, Context ctx,
-                                 Vset vset, Hashtable exp,
+                                 Vset vset, Hashtable<Object, Object> exp,
                                  UnaryExpression loc) {
         ClassDefinition inner = field.getInnerClass();
         type = inner.getType();
@@ -903,7 +903,7 @@
      * Check the expression if it appears on the LHS of an assignment
      */
     public Vset checkLHS(Environment env, Context ctx,
-                         Vset vset, Hashtable exp) {
+                         Vset vset, Hashtable<Object, Object> exp) {
         boolean hadField = (field != null);
 
         //checkValue(env, ctx, vset, exp);
@@ -945,7 +945,7 @@
      * Check the expression if it appears on the LHS of an op= expression
      */
     public Vset checkAssignOp(Environment env, Context ctx,
-                              Vset vset, Hashtable exp, Expression outside) {
+                              Vset vset, Hashtable<Object, Object> exp, Expression outside) {
 
         //checkValue(env, ctx, vset, exp);
         checkCommon(env, ctx, vset, exp, null, true);
--- a/jdk/src/share/classes/sun/tools/tree/FinallyStatement.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/FinallyStatement.java	Tue Aug 05 12:14:11 2014 -0700
@@ -68,9 +68,9 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = reach(env, vset);
-        Hashtable newexp = new Hashtable();
+        Hashtable<Object, Object> newexp = new Hashtable<>();
 
         // Handle the proposed 'try (init) { stmts } finally { stmts }' syntax.
         // This feature has not been adopted, and support is presently disabled.
@@ -182,7 +182,7 @@
         // generated by the body into exp.
         if (finallyCanFinish) {
             // Add newexp's back into exp; cf. ThrowStatement.check().
-            for (Enumeration e = newexp.keys() ; e.hasMoreElements() ; ) {
+            for (Enumeration<?> e = newexp.keys() ; e.hasMoreElements() ; ) {
                 Object def = e.nextElement();
                 exp.put(def, newexp.get(def));
             }
--- a/jdk/src/share/classes/sun/tools/tree/ForStatement.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/ForStatement.java	Tue Aug 05 12:14:11 2014 -0700
@@ -57,7 +57,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env, ctx);
         vset = reach(env, vset);
         Context initctx = new Context(ctx, this);
--- a/jdk/src/share/classes/sun/tools/tree/IdentifierExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/IdentifierExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -231,7 +231,7 @@
     /**
      * Check expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         if (field != null) {
             // An internally pre-set field, such as an argument copying
             // an uplevel value.  Do not re-check it.
@@ -250,7 +250,7 @@
      * Check the expression if it appears on the LHS of an assignment
      */
     public Vset checkLHS(Environment env, Context ctx,
-                         Vset vset, Hashtable exp) {
+                         Vset vset, Hashtable<Object, Object> exp) {
         if (!bind(env, ctx))
             return vset;
         vset = assign(env, ctx, vset);
@@ -263,7 +263,7 @@
      * Check the expression if it appears on the LHS of an op= expression
      */
     public Vset checkAssignOp(Environment env, Context ctx,
-                              Vset vset, Hashtable exp, Expression outside) {
+                              Vset vset, Hashtable<Object, Object> exp, Expression outside) {
         if (!bind(env, ctx))
             return vset;
         vset = assign(env, ctx, get(env, ctx, vset));
@@ -293,7 +293,7 @@
     /**
      * Check if the present name is part of a scoping prefix.
      */
-    public Vset checkAmbigName(Environment env, Context ctx, Vset vset, Hashtable exp,
+    public Vset checkAmbigName(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp,
                                UnaryExpression loc) {
         try {
             if (ctx.getField(env, id) != null) {
@@ -474,4 +474,4 @@
             implementation.print(out);
         }
     }
-}
\ No newline at end of file
+}
--- a/jdk/src/share/classes/sun/tools/tree/IfStatement.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/IfStatement.java	Tue Aug 05 12:14:11 2014 -0700
@@ -55,7 +55,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env, ctx);
         CheckContext newctx = new CheckContext(ctx, this);
         // Vset vsExtra = vset.copy();  // See comment below.
--- a/jdk/src/share/classes/sun/tools/tree/IncDecExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/IncDecExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -49,7 +49,7 @@
     /**
      * Check an increment or decrement expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = right.checkAssignOp(env, ctx, vset, exp, this);
         if (right.type.inMask(TM_NUMBER)) {
             type = right.type;
@@ -66,7 +66,7 @@
     /**
      * Check void expression
      */
-    public Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         return checkValue(env, ctx, vset, exp);
     }
 
--- a/jdk/src/share/classes/sun/tools/tree/InstanceOfExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/InstanceOfExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -48,7 +48,7 @@
     /**
      * Check the expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = left.checkValue(env, ctx, vset, exp);
         right = new TypeExpression(right.where, right.toType(env, ctx));
 
--- a/jdk/src/share/classes/sun/tools/tree/LengthExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/LengthExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -46,7 +46,7 @@
     /**
      * Select the type of the expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = right.checkValue(env, ctx, vset, exp);
         if (!right.type.isType(TC_ARRAY)) {
             env.error(where, "invalid.length", right.type);
--- a/jdk/src/share/classes/sun/tools/tree/LocalMember.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/LocalMember.java	Tue Aug 05 12:14:11 2014 -0700
@@ -163,7 +163,7 @@
      * May inline copies of all the arguments of the given method.
      */
     static public LocalMember[] copyArguments(Context ctx, MemberDefinition field) {
-        Vector v = field.getArguments();
+        Vector<MemberDefinition> v = field.getArguments();
         LocalMember res[] = new LocalMember[v.size()];
         v.copyInto(res);
         for (int i = 0; i < res.length; i++) {
--- a/jdk/src/share/classes/sun/tools/tree/MethodExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/MethodExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -78,7 +78,7 @@
     /**
      * Check expression type
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         ClassDeclaration c = null;
         boolean isArray = false;
         boolean staticRef = false;
@@ -587,7 +587,7 @@
     /**
      * Check void expression
      */
-    public Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         return checkValue(env, ctx, vset, exp);
     }
 
--- a/jdk/src/share/classes/sun/tools/tree/NewArrayExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/NewArrayExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -55,7 +55,7 @@
     /**
      * Check
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         type = right.toType(env, ctx);
 
         boolean flag = (init != null);  // flag says that dims are forbidden
--- a/jdk/src/share/classes/sun/tools/tree/NewInstanceExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/NewInstanceExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -83,7 +83,7 @@
     /**
      * Check expression type
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         // What type?
         ClassDefinition def = null;
 
@@ -366,7 +366,7 @@
     /**
      * Check void expression
      */
-    public Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         return checkValue(env, ctx, vset, exp);
     }
 
--- a/jdk/src/share/classes/sun/tools/tree/NotExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/NotExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -65,7 +65,7 @@
      */
 
     public void checkCondition(Environment env, Context ctx, Vset vset,
-                               Hashtable exp, ConditionVars cvars) {
+                               Hashtable<Object, Object> exp, ConditionVars cvars) {
         right.checkCondition(env, ctx, vset, exp, cvars);
         right = convert(env, ctx, Type.tBoolean, right);
         // swap true and false
--- a/jdk/src/share/classes/sun/tools/tree/OrExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/OrExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -54,7 +54,7 @@
      *        both the left or right hand side are false
      */
     public void checkCondition(Environment env, Context ctx, Vset vset,
-                               Hashtable exp, ConditionVars cvars) {
+                               Hashtable<Object, Object> exp, ConditionVars cvars) {
         // Find out when the left side is true/false
         left.checkCondition(env, ctx, vset, exp, cvars);
         left = convert(env, ctx, Type.tBoolean, left);
--- a/jdk/src/share/classes/sun/tools/tree/ReturnStatement.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/ReturnStatement.java	Tue Aug 05 12:14:11 2014 -0700
@@ -51,7 +51,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env, ctx);
         vset = reach(env, vset);
         if (expr != null) {
--- a/jdk/src/share/classes/sun/tools/tree/Statement.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/Statement.java	Tue Aug 05 12:14:11 2014 -0700
@@ -100,7 +100,7 @@
     /**
      * Check a statement
      */
-    public Vset checkMethod(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkMethod(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         // Set up ctx.getReturnContext() for the sake of ReturnStatement.check().
         CheckContext mctx = new CheckContext(ctx, new Statement(METHOD, 0));
         ctx = mctx;
@@ -130,7 +130,7 @@
 
         return vset;
     }
-    Vset checkDeclaration(Environment env, Context ctx, Vset vset, int mod, Type t, Hashtable exp) {
+    Vset checkDeclaration(Environment env, Context ctx, Vset vset, int mod, Type t, Hashtable<Object, Object> exp) {
         throw new CompilerError("checkDeclaration");
     }
 
@@ -164,12 +164,12 @@
         }
     }
 
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         throw new CompilerError("check");
     }
 
     /** This is called in contexts where declarations are valid. */
-    Vset checkBlockStatement(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset checkBlockStatement(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         return check(env, ctx, vset, exp);
     }
 
--- a/jdk/src/share/classes/sun/tools/tree/SuperExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/SuperExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -61,7 +61,7 @@
     /**
      * Check expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = checkCommon(env, ctx, vset, exp);
         if (type != Type.tError) {
             // "super" is not allowed in this context:
@@ -74,13 +74,13 @@
      * Check if the present name is part of a scoping prefix.
      */
     public Vset checkAmbigName(Environment env, Context ctx,
-                               Vset vset, Hashtable exp,
+                               Vset vset, Hashtable<Object, Object> exp,
                                UnaryExpression loc) {
         return checkCommon(env, ctx, vset, exp);
     }
 
     /** Common code for checkValue and checkAmbigName */
-    private Vset checkCommon(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    private Vset checkCommon(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         ClassDeclaration superClass = ctx.field.getClassDefinition().getSuperClass();
         if (superClass == null) {
             env.error(where, "undef.var", idSuper);
--- a/jdk/src/share/classes/sun/tools/tree/SwitchStatement.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/SwitchStatement.java	Tue Aug 05 12:14:11 2014 -0700
@@ -54,7 +54,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env, ctx);
         CheckContext newctx = new CheckContext(ctx, this);
         vset = expr.checkValue(env, newctx, reach(env, vset), exp);
@@ -62,7 +62,7 @@
 
         expr = convert(env, newctx, Type.tInt, expr);
 
-        Hashtable tab = new Hashtable();
+        Hashtable<Expression, Statement> tab = new Hashtable<>();
         boolean hasDefault = false;
         // Note that vs is reset to vset.copy() on every case label.
         // If the first substatement is not a case label, it is unreached.
--- a/jdk/src/share/classes/sun/tools/tree/SynchronizedStatement.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/SynchronizedStatement.java	Tue Aug 05 12:14:11 2014 -0700
@@ -56,7 +56,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env, ctx);
         CheckContext newctx = new CheckContext(ctx, this);
         vset = reach(env, vset);
--- a/jdk/src/share/classes/sun/tools/tree/ThisExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/ThisExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -87,7 +87,7 @@
     /**
      * Check expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         if (ctx.field.isStatic()) {
             env.error(where, "undef.var", opNames[op]);
             type = Type.tError;
--- a/jdk/src/share/classes/sun/tools/tree/ThrowStatement.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/ThrowStatement.java	Tue Aug 05 12:14:11 2014 -0700
@@ -50,7 +50,7 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env, ctx);
         try {
             vset = reach(env, vset);
--- a/jdk/src/share/classes/sun/tools/tree/TryStatement.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/TryStatement.java	Tue Aug 05 12:14:11 2014 -0700
@@ -57,11 +57,11 @@
     /**
      * Check statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env, ctx);
         try {
             vset = reach(env, vset);
-            Hashtable newexp = new Hashtable();
+            Hashtable<Object, Object> newexp = new Hashtable<>();
             CheckContext newctx =  new CheckContext(ctx, this);
 
             // Check 'try' block.  A variable is DA (DU) before the try
@@ -131,7 +131,7 @@
 
                 // Make sure the exception is actually throw in that part of the code
                 boolean ok = false;
-                for (Enumeration e = newexp.keys() ; e.hasMoreElements() ; ) {
+                for (Enumeration<?> e = newexp.keys() ; e.hasMoreElements() ; ) {
                     ClassDeclaration c = (ClassDeclaration)e.nextElement();
                     if (def.superClassOf(env, c) || def.subClassOf(env, c)) {
                         ok = true;
@@ -149,7 +149,7 @@
             }
 
             // Only carry over exceptions that are not caught
-            for (Enumeration e = newexp.keys() ; e.hasMoreElements() ; ) {
+            for (Enumeration<?> e = newexp.keys() ; e.hasMoreElements() ; ) {
                 ClassDeclaration c = (ClassDeclaration)e.nextElement();
                 ClassDefinition def = c.getClassDefinition(env);
                 boolean add = true;
--- a/jdk/src/share/classes/sun/tools/tree/TypeExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/TypeExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -53,13 +53,13 @@
     /**
      * Check an expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         env.error(where, "invalid.term");
         type = Type.tError;
         return vset;
     }
 
-    public Vset checkAmbigName(Environment env, Context ctx, Vset vset, Hashtable exp,
+    public Vset checkAmbigName(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp,
                                UnaryExpression loc) {
         return vset;
     }
--- a/jdk/src/share/classes/sun/tools/tree/UnaryExpression.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/UnaryExpression.java	Tue Aug 05 12:14:11 2014 -0700
@@ -69,7 +69,7 @@
     /**
      * Check a unary expression
      */
-    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    public Vset checkValue(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         vset = right.checkValue(env, ctx, vset, exp);
 
         int tm = right.type.getTypeMask();
--- a/jdk/src/share/classes/sun/tools/tree/VarDeclarationStatement.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/VarDeclarationStatement.java	Tue Aug 05 12:14:11 2014 -0700
@@ -57,7 +57,7 @@
     /**
      * Check statement
      */
-    Vset checkDeclaration(Environment env, Context ctx, Vset vset, int mod, Type t, Hashtable exp) {
+    Vset checkDeclaration(Environment env, Context ctx, Vset vset, int mod, Type t, Hashtable<Object, Object> exp) {
         if (labels != null) {
             env.error(where, "declaration.with.label", labels[0]);
         }
--- a/jdk/src/share/classes/sun/tools/tree/WhileStatement.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/tree/WhileStatement.java	Tue Aug 05 12:14:11 2014 -0700
@@ -53,7 +53,7 @@
     /**
      * Check a while statement
      */
-    Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
+    Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
         checkLabel(env, ctx);
         CheckContext newctx = new CheckContext(ctx, this);
         // remember what was unassigned on entry
--- a/jdk/src/share/classes/sun/tools/util/CommandLine.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/share/classes/sun/tools/util/CommandLine.java	Tue Aug 05 12:14:11 2014 -0700
@@ -54,7 +54,7 @@
     public static String[] parse(String[] args)
         throws IOException
     {
-        ArrayList newArgs = new ArrayList(args.length);
+        ArrayList<String> newArgs = new ArrayList<>(args.length);
         for (int i = 0; i < args.length; i++) {
             String arg = args[i];
             if (arg.length() > 1 && arg.charAt(0) == '@') {
@@ -68,10 +68,10 @@
                 newArgs.add(arg);
             }
         }
-        return (String[])newArgs.toArray(new String[newArgs.size()]);
+        return newArgs.toArray(new String[newArgs.size()]);
     }
 
-    private static void loadCmdFile(String name, List args)
+    private static void loadCmdFile(String name, List<String> args)
         throws IOException
     {
         Reader r = new BufferedReader(new FileReader(name));
--- a/jdk/src/solaris/classes/sun/nio/ch/InheritedChannel.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/solaris/classes/sun/nio/ch/InheritedChannel.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -165,7 +165,7 @@
         // Have to use reflection and also make assumption on how FD
         // is implemented.
 
-        Class paramTypes[] = { int.class };
+        Class<?> paramTypes[] = { int.class };
         Constructor<?> ctr = Reflect.lookupConstructor("java.io.FileDescriptor",
                                                        paramTypes);
         Object args[] = { new Integer(fdVal) };
--- a/jdk/src/windows/native/sun/nio/ch/FileDispatcherImpl.c	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/windows/native/sun/nio/ch/FileDispatcherImpl.c	Tue Aug 05 12:14:11 2014 -0700
@@ -406,6 +406,14 @@
     result = LockFileEx(h, flags, 0, lowNumBytes, highNumBytes, &o);
     if (result == 0) {
         int error = GetLastError();
+        if (error == ERROR_IO_PENDING) {
+            LPDWORD dwBytes;
+            result = GetOverlappedResult(h, &o, &dwBytes, TRUE);
+            if (result != 0) {
+                return sun_nio_ch_FileDispatcherImpl_LOCKED;
+            }
+            error = GetLastError();
+        }
         if (error != ERROR_LOCK_VIOLATION) {
             JNU_ThrowIOExceptionWithLastError(env, "Lock failed");
             return sun_nio_ch_FileDispatcherImpl_NO_LOCK;
--- a/jdk/src/windows/native/sun/security/mscapi/security.cpp	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/src/windows/native/sun/security/mscapi/security.cpp	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -74,7 +74,10 @@
     const char* pszHashAlgorithm = NULL;
     ALG_ID algId = 0;
 
-    pszHashAlgorithm = env->GetStringUTFChars(jHashAlgorithm, NULL);
+    if ((pszHashAlgorithm = env->GetStringUTFChars(jHashAlgorithm, NULL))
+        == NULL) {
+        return algId;
+    }
 
     if ((strcmp("SHA", pszHashAlgorithm) == 0) ||
         (strcmp("SHA1", pszHashAlgorithm) == 0) ||
@@ -179,7 +182,9 @@
          */
         if (length < 0) {
             length = env->GetArrayLength(seed);
-            reseedBytes = env->GetByteArrayElements(seed, 0);
+            if ((reseedBytes = env->GetByteArrayElements(seed, 0)) == NULL) {
+                __leave;
+            }
 
             if (::CryptGenRandom(
                 hCryptProv,
@@ -211,7 +216,9 @@
         } else { // length == 0
 
             length = env->GetArrayLength(seed);
-            seedBytes = env->GetByteArrayElements(seed, 0);
+            if ((seedBytes = env->GetByteArrayElements(seed, 0)) == NULL) {
+                __leave;
+            }
 
             if (::CryptGenRandom(
                 hCryptProv,
@@ -275,7 +282,10 @@
     __try
     {
         // Open a system certificate store.
-        pszCertStoreName = env->GetStringUTFChars(jCertStoreName, NULL);
+        if ((pszCertStoreName = env->GetStringUTFChars(jCertStoreName, NULL))
+            == NULL) {
+            __leave;
+        }
         if ((hCertStore = ::CertOpenSystemStore(NULL, pszCertStoreName))
             == NULL) {
 
@@ -710,7 +720,10 @@
 
     __try
     {
-        pszKeyContainerName = env->GetStringUTFChars(keyContainerName, NULL);
+        if ((pszKeyContainerName =
+            env->GetStringUTFChars(keyContainerName, NULL)) == NULL) {
+            __leave;
+        }
 
         // Acquire a CSP context (create a new key container).
         // Prefer a PROV_RSA_AES CSP, when available, due to its support
@@ -847,7 +860,10 @@
     __try
     {
         // Open a system certificate store.
-        pszCertStoreName = env->GetStringUTFChars(jCertStoreName, NULL);
+        if ((pszCertStoreName = env->GetStringUTFChars(jCertStoreName, NULL))
+            == NULL) {
+            __leave;
+        }
         if ((hCertStore = ::CertOpenSystemStore(NULL, pszCertStoreName)) == NULL) {
             ThrowException(env, KEYSTORE_EXCEPTION, GetLastError());
             __leave;
@@ -1086,7 +1102,10 @@
     __try
     {
         // Open a system certificate store.
-        pszCertStoreName = env->GetStringUTFChars(jCertStoreName, NULL);
+        if ((pszCertStoreName = env->GetStringUTFChars(jCertStoreName, NULL))
+            == NULL) {
+            __leave;
+        }
         if ((hCertStore = ::CertOpenSystemStore(NULL, pszCertStoreName)) == NULL) {
             ThrowException(env, KEYSTORE_EXCEPTION, GetLastError());
             __leave;
@@ -1123,7 +1142,10 @@
                 cchNameString);
 
             // Compare the certificate's friendly name with supplied alias name
-            pszCertAliasName = env->GetStringUTFChars(jCertAliasName, NULL);
+            if ((pszCertAliasName = env->GetStringUTFChars(jCertAliasName, NULL))
+                == NULL) {
+                __leave;
+            }
             if (strcmp(pszCertAliasName, pszNameString) == 0) {
 
                 // Only delete the certificate if the alias names matches
@@ -1181,7 +1203,10 @@
 
     __try
     {
-        pszKeyContainerName = env->GetStringUTFChars(keyContainerName, NULL);
+        if ((pszKeyContainerName =
+            env->GetStringUTFChars(keyContainerName, NULL)) == NULL) {
+            __leave;
+        }
 
         // Destroying the default key container is not permitted
         // (because it may contain more one keypair).
@@ -1234,8 +1259,14 @@
 
     __try
     {
-        pszCertStoreName = env->GetStringUTFChars(jCertStoreName, NULL);
-        pszCertAliasName = env->GetStringUTFChars(jCertAliasName, NULL);
+        if ((pszCertStoreName = env->GetStringUTFChars(jCertStoreName, NULL))
+            == NULL) {
+            __leave;
+        }
+        if ((pszCertAliasName = env->GetStringUTFChars(jCertAliasName, NULL))
+            == NULL) {
+            __leave;
+        }
 
         // Open a system certificate store.
         if ((hCertStore = ::CertOpenSystemStore(NULL, pszCertStoreName)) == NULL) {
@@ -1530,7 +1561,9 @@
     __try {
 
         jsize length = env->GetArrayLength(jKeyBlob);
-        keyBlob = env->GetByteArrayElements(jKeyBlob, 0);
+        if ((keyBlob = env->GetByteArrayElements(jKeyBlob, 0)) == NULL) {
+            __leave;
+        }
 
         PUBLICKEYSTRUC* pPublicKeyStruc = (PUBLICKEYSTRUC *) keyBlob;
 
@@ -1580,7 +1613,9 @@
     __try {
 
         jsize length = env->GetArrayLength(jKeyBlob);
-        keyBlob = env->GetByteArrayElements(jKeyBlob, 0);
+        if ((keyBlob = env->GetByteArrayElements(jKeyBlob, 0)) == NULL) {
+            __leave;
+        }
 
         PUBLICKEYSTRUC* pPublicKeyStruc = (PUBLICKEYSTRUC *) keyBlob;
 
@@ -1632,6 +1667,9 @@
     }
 
     jbyte* sourceBytes = env->GetByteArrayElements(source, 0);
+    if (sourceBytes == NULL) {
+        return -1;
+    }
 
     // Copy bytes from the end of the source array to the beginning of the
     // destination array (until the destination array is full).
@@ -1740,45 +1778,61 @@
         }
         // The length argument must be the smaller of jPublicExponentLength
         // and sizeof(pRsaPubKey->pubkey)
-        convertToLittleEndian(env, jPublicExponent,
-            (jbyte *) &(pRsaPubKey->pubexp), jPublicExponentLength);
+        if ((jElementLength = convertToLittleEndian(env, jPublicExponent,
+            (jbyte *) &(pRsaPubKey->pubexp), jPublicExponentLength)) < 0) {
+            __leave;
+        }
 
         // Modulus n
         jBlobElement =
             (jbyte *) (jBlobBytes + sizeof(PUBLICKEYSTRUC) + sizeof(RSAPUBKEY));
-        jElementLength = convertToLittleEndian(env, jModulus, jBlobElement,
-            jKeyByteLength);
+        if ((jElementLength = convertToLittleEndian(env, jModulus, jBlobElement,
+            jKeyByteLength)) < 0) {
+            __leave;
+        }
 
         if (bGeneratePrivateKeyBlob) {
             // Prime p
             jBlobElement += jElementLength;
-            jElementLength = convertToLittleEndian(env, jPrimeP, jBlobElement,
-                jKeyByteLength / 2);
+            if ((jElementLength = convertToLittleEndian(env, jPrimeP,
+                jBlobElement, jKeyByteLength / 2)) < 0) {
+                __leave;
+            }
 
             // Prime q
             jBlobElement += jElementLength;
-            jElementLength = convertToLittleEndian(env, jPrimeQ, jBlobElement,
-                jKeyByteLength / 2);
+            if ((jElementLength = convertToLittleEndian(env, jPrimeQ,
+                jBlobElement, jKeyByteLength / 2)) < 0) {
+                __leave;
+            }
 
             // Prime exponent p
             jBlobElement += jElementLength;
-            jElementLength = convertToLittleEndian(env, jExponentP,
-                jBlobElement, jKeyByteLength / 2);
+            if ((jElementLength = convertToLittleEndian(env, jExponentP,
+                jBlobElement, jKeyByteLength / 2)) < 0) {
+                __leave;
+            }
 
             // Prime exponent q
             jBlobElement += jElementLength;
-            jElementLength = convertToLittleEndian(env, jExponentQ,
-                jBlobElement, jKeyByteLength / 2);
+            if ((jElementLength = convertToLittleEndian(env, jExponentQ,
+                jBlobElement, jKeyByteLength / 2)) < 0) {
+                __leave;
+            }
 
             // CRT coefficient
             jBlobElement += jElementLength;
-            jElementLength = convertToLittleEndian(env, jCrtCoefficient,
-                jBlobElement, jKeyByteLength / 2);
+            if ((jElementLength = convertToLittleEndian(env, jCrtCoefficient,
+                jBlobElement, jKeyByteLength / 2)) < 0) {
+                __leave;
+            }
 
             // Private exponent
             jBlobElement += jElementLength;
-            convertToLittleEndian(env, jPrivateExponent, jBlobElement,
-                jKeyByteLength);
+            if ((jElementLength = convertToLittleEndian(env, jPrivateExponent,
+                jBlobElement, jKeyByteLength)) < 0) {
+                __leave;
+            }
         }
 
         jBlob = env->NewByteArray(jBlobLength);
@@ -1849,9 +1903,15 @@
 
     __try
     {
-        pszKeyContainerName = env->GetStringUTFChars(keyContainerName, NULL);
+        if ((pszKeyContainerName =
+            env->GetStringUTFChars(keyContainerName, NULL)) == NULL) {
+            __leave;
+        }
         dwBlobLen = env->GetArrayLength(keyBlob);
-        pbKeyBlob = (BYTE *) env->GetByteArrayElements(keyBlob, 0);
+        if ((pbKeyBlob = (BYTE *) env->GetByteArrayElements(keyBlob, 0))
+            == NULL) {
+            __leave;
+        }
 
         // Acquire a CSP context (create a new key container).
         if (::CryptAcquireContext(
@@ -1923,7 +1983,10 @@
     __try
     {
         dwBlobLen = env->GetArrayLength(keyBlob);
-        pbKeyBlob = (BYTE *) env->GetByteArrayElements(keyBlob, 0);
+        if ((pbKeyBlob = (BYTE *) env->GetByteArrayElements(keyBlob, 0))
+            == NULL) {
+            __leave;
+        }
 
         // Acquire a CSP context (create a new key container).
         // Prefer a PROV_RSA_AES CSP, when available, due to its support
--- a/jdk/test/ProblemList.txt	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/test/ProblemList.txt	Tue Aug 05 12:14:11 2014 -0700
@@ -204,10 +204,8 @@
 sun/security/pkcs11/ec/TestKeyFactory.java                      generic-all
 
 # 7164518: no PortUnreachableException on Mac
-sun/security/krb5/auto/Unreachable.java                         macosx-all
-
-# 7147060
-com/sun/org/apache/xml/internal/security/transforms/ClassLoaderTest.java	generic-all
+# 8051952: Unreachable.java test failing on Windows
+sun/security/krb5/auto/Unreachable.java                         windows-all,macosx-all
 
 # 6988842: 4 tests failing on Solaris 5.10
 sun/security/pkcs11/Secmod/AddPrivateKey.java                   solaris-all
@@ -219,9 +217,6 @@
 java/security/KeyPairGenerator/SolarisShortDSA.java             solaris-all
 sun/security/tools/keytool/standard.sh                          solaris-all
 
-# 8051952: Unreachable.java test failing on Windows
-sun/security/krb5/auto/Unreachable.java                         windows-all
-
 ############################################################################
 
 # jdk_sound
@@ -243,8 +238,8 @@
 # jdk_tools
 
 # Tests take too long, on sparcs see 7143279
-tools/pack200/CommandLineTests.java                             solaris-all, macosx-all
-tools/pack200/Pack200Test.java                                  solaris-all, macosx-all
+tools/pack200/CommandLineTests.java                             solaris-all,macosx-all
+tools/pack200/Pack200Test.java                                  solaris-all,macosx-all
 
 # 8007410
 tools/launcher/FXLauncherTest.java                              linux-all
@@ -254,7 +249,7 @@
 # jdk_jdi
 
 # 6983531
-com/sun/jdi/BadHandshakeTest.java                               linux-all, windows-all
+com/sun/jdi/BadHandshakeTest.java                               linux-all,windows-all
 
 # 8004127
 com/sun/jdi/RedefineImplementor.sh                              generic-all
--- a/jdk/test/com/sun/org/apache/xml/internal/security/transforms/ClassLoaderTest.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/test/com/sun/org/apache/xml/internal/security/transforms/ClassLoaderTest.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,9 +24,9 @@
 /**
  * @test
  * @author Sean Mullan
- * @bug 6461674 8009217
+ * @bug 6461674 8009217 7147060
  * @compile -XDignore.symbol.file ClassLoaderTest.java MyTransform.java
- * @run main ClassLoaderTest
+ * @run main/othervm ClassLoaderTest
  * @summary Ensure Transform.register works with transform implementations
  *   loaded by class loader other than system/boot class loader
  */
--- a/jdk/test/java/lang/ProcessBuilder/Basic.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/test/java/lang/ProcessBuilder/Basic.java	Tue Aug 05 12:14:11 2014 -0700
@@ -2269,9 +2269,9 @@
                 fail("Test failed: Process exited prematurely");
             }
             long end = System.nanoTime();
-            // give waitFor(timeout) a wide berth (100ms)
+            // give waitFor(timeout) a wide berth (200ms)
             // Old AIX machines my need a little longer.
-            if ((end - start) > 100000000L * (AIX.is() ? 4 : 1))
+            if ((end - start) > 200000000L * (AIX.is() ? 2 : 1))
                 fail("Test failed: waitFor took too long (" + (end - start) + "ns)");
 
             p.destroy();
--- a/jdk/test/java/util/Collections/CheckedListReplaceAll.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/test/java/util/Collections/CheckedListReplaceAll.java	Tue Aug 05 12:14:11 2014 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug     8047795
+ * @bug     8047795 8053938
  * @summary Ensure that replaceAll operator cannot add bad elements
  * @author  Mike Duigou
  */
@@ -46,5 +46,16 @@
             thwarted.printStackTrace(System.out);
             System.out.println("Curses! Foiled again!");
         }
+
+        unwrapped = Arrays.asList(new Object[]{});  // Empty list
+        wrapped = Collections.checkedList(unwrapped, Integer.class);
+        try {
+            wrapped.replaceAll((UnaryOperator)null);
+            System.out.printf("Bwahaha! I have defeated you! %s\n", wrapped);
+            throw new RuntimeException("NPE not thrown when passed a null operator");
+        } catch (NullPointerException thwarted) {
+            thwarted.printStackTrace(System.out);
+            System.out.println("Curses! Foiled again!");
+        }
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/net/ssl/TLSv12/ProtocolFilter.java	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,315 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// SunJSSE does not support dynamic system properties, no way to re-use
+// system properties in samevm/agentvm mode.
+
+/*
+ * @test
+ * @bug 8052406
+ * @summary SSLv2Hello protocol may be filter out unexpectedly
+ * @run main/othervm ProtocolFilter
+ */
+
+import java.io.*;
+import java.net.*;
+import javax.net.ssl.*;
+
+public class ProtocolFilter {
+
+    /*
+     * =============================================================
+     * Set the various variables needed for the tests, then
+     * specify what tests to run on each side.
+     */
+
+    /*
+     * Should we run the client or server in a separate thread?
+     * Both sides can throw exceptions, but do you have a preference
+     * as to which side should be the main thread.
+     */
+    static boolean separateServerThread = false;
+
+    /*
+     * Where do we find the keystores?
+     */
+    static String pathToStores = "../etc";
+    static String keyStoreFile = "keystore";
+    static String trustStoreFile = "truststore";
+    static String passwd = "passphrase";
+
+    /*
+     * Is the server ready to serve?
+     */
+    volatile static boolean serverReady = false;
+
+    /*
+     * Turn on SSL debugging?
+     */
+    static boolean debug = false;
+
+    /*
+     * If the client or server is doing some kind of object creation
+     * that the other side depends on, and that thread prematurely
+     * exits, you may experience a hang.  The test harness will
+     * terminate all hung threads after its timeout has expired,
+     * currently 3 minutes by default, but you might try to be
+     * smart about it....
+     */
+
+    /*
+     * Define the server side of the test.
+     *
+     * If the server prematurely exits, serverReady will be set to true
+     * to avoid infinite hangs.
+     */
+    void doServerSide() throws Exception {
+        SSLServerSocketFactory sslssf =
+            (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
+        SSLServerSocket sslServerSocket =
+            (SSLServerSocket) sslssf.createServerSocket(serverPort);
+
+        // Only enable cipher suites for TLS v1.2.
+        sslServerSocket.setEnabledCipherSuites(
+            new String[]{"TLS_RSA_WITH_AES_128_CBC_SHA256"});
+
+        serverPort = sslServerSocket.getLocalPort();
+
+        /*
+         * Signal Client, we're ready for his connect.
+         */
+        serverReady = true;
+
+        SSLSocket sslSocket = (SSLSocket) sslServerSocket.accept();
+        InputStream sslIS = sslSocket.getInputStream();
+        OutputStream sslOS = sslSocket.getOutputStream();
+
+        sslIS.read();
+        sslOS.write(85);
+        sslOS.flush();
+
+        sslSocket.close();
+    }
+
+    /*
+     * Define the client side of the test.
+     *
+     * If the server prematurely exits, serverReady will be set to true
+     * to avoid infinite hangs.
+     */
+    void doClientSide() throws Exception {
+
+        /*
+         * Wait for server to get started.
+         */
+        while (!serverReady) {
+            Thread.sleep(50);
+        }
+
+        SSLSocketFactory sslsf =
+            (SSLSocketFactory) SSLSocketFactory.getDefault();
+        SSLSocket sslSocket = (SSLSocket)
+            sslsf.createSocket("localhost", serverPort);
+
+        // Enable all supported protocols, including SSLv2Hello.
+        sslSocket.setEnabledProtocols(sslSocket.getSupportedProtocols());
+
+        InputStream sslIS = sslSocket.getInputStream();
+        OutputStream sslOS = sslSocket.getOutputStream();
+
+        sslOS.write(280);
+        sslOS.flush();
+        sslIS.read();
+
+        sslSocket.close();
+    }
+
+    /*
+     * =============================================================
+     * The remainder is just support stuff
+     */
+
+    // use any free port by default
+    volatile int serverPort = 0;
+
+    volatile Exception serverException = null;
+    volatile Exception clientException = null;
+
+    public static void main(String[] args) throws Exception {
+        String keyFilename =
+            System.getProperty("test.src", ".") + "/" + pathToStores +
+                "/" + keyStoreFile;
+        String trustFilename =
+            System.getProperty("test.src", ".") + "/" + pathToStores +
+                "/" + trustStoreFile;
+
+        System.setProperty("javax.net.ssl.keyStore", keyFilename);
+        System.setProperty("javax.net.ssl.keyStorePassword", passwd);
+        System.setProperty("javax.net.ssl.trustStore", trustFilename);
+        System.setProperty("javax.net.ssl.trustStorePassword", passwd);
+
+        if (debug)
+            System.setProperty("javax.net.debug", "all");
+
+        /*
+         * Start the tests.
+         */
+        new ProtocolFilter();
+    }
+
+    Thread clientThread = null;
+    Thread serverThread = null;
+
+    /*
+     * Primary constructor, used to drive remainder of the test.
+     *
+     * Fork off the other side, then do your work.
+     */
+    ProtocolFilter() throws Exception {
+        Exception startException = null;
+        try {
+            if (separateServerThread) {
+                startServer(true);
+                startClient(false);
+            } else {
+                startClient(true);
+                startServer(false);
+            }
+        } catch (Exception e) {
+            startException = e;
+        }
+
+        /*
+         * Wait for other side to close down.
+         */
+        if (separateServerThread) {
+            if (serverThread != null) {
+                serverThread.join();
+            }
+        } else {
+            if (clientThread != null) {
+                clientThread.join();
+            }
+        }
+
+        /*
+         * When we get here, the test is pretty much over.
+         * Which side threw the error?
+         */
+        Exception local;
+        Exception remote;
+
+        if (separateServerThread) {
+            remote = serverException;
+            local = clientException;
+        } else {
+            remote = clientException;
+            local = serverException;
+        }
+
+        Exception exception = null;
+
+        /*
+         * Check various exception conditions.
+         */
+        if ((local != null) && (remote != null)) {
+            // If both failed, return the curthread's exception.
+            local.initCause(remote);
+            exception = local;
+        } else if (local != null) {
+            exception = local;
+        } else if (remote != null) {
+            exception = remote;
+        } else if (startException != null) {
+            exception = startException;
+        }
+
+        /*
+         * If there was an exception *AND* a startException,
+         * output it.
+         */
+        if (exception != null) {
+            if (exception != startException && startException != null) {
+                exception.addSuppressed(startException);
+            }
+            throw exception;
+        }
+
+        // Fall-through: no exception to throw!
+    }
+
+    void startServer(boolean newThread) throws Exception {
+        if (newThread) {
+            serverThread = new Thread() {
+                public void run() {
+                    try {
+                        doServerSide();
+                    } catch (Exception e) {
+                        /*
+                         * Our server thread just died.
+                         *
+                         * Release the client, if not active already...
+                         */
+                        System.err.println("Server died...");
+                        serverReady = true;
+                        serverException = e;
+                    }
+                }
+            };
+            serverThread.start();
+        } else {
+            try {
+                doServerSide();
+            } catch (Exception e) {
+                serverException = e;
+            } finally {
+                serverReady = true;
+            }
+        }
+    }
+
+    void startClient(boolean newThread) throws Exception {
+        if (newThread) {
+            clientThread = new Thread() {
+                public void run() {
+                    try {
+                        doClientSide();
+                    } catch (Exception e) {
+                        /*
+                         * Our client thread just died.
+                         */
+                        System.err.println("Client died...");
+                        clientException = e;
+                    }
+                }
+            };
+            clientThread.start();
+        } else {
+            try {
+                doClientSide();
+            } catch (Exception e) {
+                clientException = e;
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/jaxp/common/8032908/TestFunc.java	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import org.w3c.dom.Node;
+
+public class TestFunc {
+
+    public static String test(Node node) {
+        String s = node.getTextContent();
+        return s;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/jaxp/common/8032908/XSLT.java	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8032908
+ * @summary Test if Node.getTextContent() function correctly returns children
+ * content
+ * @compile TestFunc.java XSLT.java
+ * @run main/othervm XSLT
+ */
+import java.io.ByteArrayOutputStream;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+public class XSLT {
+
+    static final String XMLTOTRANSFORM = "/in.xml";
+    static final String XSLTRANSFORMER = "/test.xsl";
+    static final String EXPECTEDRESULT = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>ABCDEFG";
+
+    public static void main(String[] args) throws TransformerException {
+        ByteArrayOutputStream resStream = new ByteArrayOutputStream();
+        TransformerFactory trf = TransformerFactory.newInstance();
+        Transformer tr = trf.newTransformer(new StreamSource(System.getProperty("test.src", ".") + XSLTRANSFORMER));
+        tr.transform(new StreamSource(System.getProperty("test.src", ".") + XMLTOTRANSFORM), new StreamResult(resStream));
+        System.out.println("Transformation completed. Result:" + resStream.toString());
+        if (!resStream.toString().equals(EXPECTEDRESULT)) {
+            throw new RuntimeException("Incorrect transformation result");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/jaxp/common/8032908/in.xml	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root><elem><level2_0>ABCD</level2_0><level2_1>EFG</level2_1></elem></root>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/xml/jaxp/common/8032908/test.xsl	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:transform exclude-result-prefixes="cscdt_ufunc" version="1.0"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:cscdt_ufunc="http://xml.apache.org/xalan/java">
+    <xsl:template match="elem">
+        <xsl:value-of select="cscdt_ufunc:TestFunc.test(.)" />
+    </xsl:template>
+</xsl:transform>
--- a/jdk/test/sun/net/ftp/FtpURL.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/test/sun/net/ftp/FtpURL.java	Tue Aug 05 12:14:11 2014 -0700
@@ -483,7 +483,7 @@
 
             // Now let's check the URL handler
 
-            url = new URL("ftp://user2:@localhost:" + port + "/%2Fusr/bin;type=d");
+            url = new URL("ftp://user2@localhost:" + port + "/%2Fusr/bin;type=d");
             con = url.openConnection();
             in = new BufferedReader(new InputStreamReader(con.getInputStream()));
             do {
--- a/jdk/test/sun/security/pkcs11/ec/ReadCertificates.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/jdk/test/sun/security/pkcs11/ec/ReadCertificates.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @bug 6405536 6414980
+ * @bug 6405536 6414980 8051972
  * @summary Make sure that we can parse certificates using various named curves
  *   and verify their signatures
  * @author Andreas Sterbenz
@@ -153,8 +153,14 @@
                 signer = getRandomCert(certList);
             } while (cert.getIssuerX500Principal().equals(signer.getSubjectX500Principal()));
             try {
-                cert.verify(signer.getPublicKey());
-                throw new Exception("Verified invalid signature");
+                PublicKey signerPublicKey = signer.getPublicKey();
+                cert.verify(signerPublicKey);
+                // Ignore false positives
+                if (cert.getPublicKey().equals(signerPublicKey)) {
+                    System.out.println("OK: self-signed certificate detected");
+                } else {
+                    throw new Exception("Verified invalid signature");
+                }
             } catch (SignatureException e) {
                 System.out.println("OK: " + e);
             } catch (InvalidKeyException e) {
--- a/langtools/.hgtags	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/.hgtags	Tue Aug 05 12:14:11 2014 -0700
@@ -266,3 +266,4 @@
 fa0d1059a26f82f95620b7dc8bbfbe302bce8883 jdk9-b21
 aca19c52b24627a6b085cfeb433051a3e420cd81 jdk9-b22
 0402a91cd14b530b6e98452341ff853717948239 jdk9-b23
+980b18627fd3f4936be2d9e2b013abb461cb2ddb jdk9-b24
--- a/langtools/make/build.xml	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/make/build.xml	Tue Aug 05 12:14:11 2014 -0700
@@ -799,9 +799,15 @@
     <target name="idea">
         <mkdir dir=".idea"/>
         <copy todir=".idea" >
-            <fileset dir="make/intellij" includes="**"/>
+            <fileset dir="make/intellij" excludes="**/src/**"/>
         </copy>
-        <replace file=".idea/ant.xml" token="@@@" value="${jtreg.home}"/>
+        <condition property="jtreg.idea.home" value="${jtreg.home}" else = "[jtreg.home]">
+            <isset property="jtreg.home"/>
+        </condition>
+        <replace file=".idea/ant.xml" token="@@@" value="${jtreg.idea.home}"/>
+        <mkdir dir=".idea/classes"/>
+        <javac srcdir="make/intellij/src"
+               destdir=".idea/classes"/>
     </target>
 
     <!--
--- a/langtools/make/intellij/ant.xml	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/make/intellij/ant.xml	Tue Aug 05 12:14:11 2014 -0700
@@ -10,7 +10,7 @@
         <property name="javac.debuglevel" value="source,lines,vars" />
         <property name="jtreg.jpda.jvmargs" value="-agentlib:jdwp=transport=dt_socket,server=n,address=localhost:5900,suspend=y" />
       </properties>
-      <executeOn event="afterCompilation" target="build-all-classes" />
+      <executeOn event="afterCompilation" target="post-make" />
     </buildFile>
   </component>
 </project>
--- a/langtools/make/intellij/build.xml	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/make/intellij/build.xml	Tue Aug 05 12:14:11 2014 -0700
@@ -1,17 +1,14 @@
 <!-- importing.xml -->
 <project name="langtools" basedir="..">
-    <import file="../make/build.xml"/>
-
-    <target name="jtreg-debug" depends="build-all-tools,-def-jtreg">
-        <exec-target target="jtreg-debug-internal"/>
-    </target>
 
-    <target name="jtreg-debug-internal" depends="build-all-tools,-def-jtreg">
-        <sequential>
-            <sleep seconds="2"/>
-            <jtreg-tool name="all" tests="${jtreg.tests}" jpda.jvmargs="${jtreg.jpda.jvmargs}"/>
-        </sequential>
-    </target>
+    <script language="javascript" classpath=".idea/classes">
+        var ideaListener = project.getBuildListeners().firstElement();            
+        var LangtoolsLogger = Java.type("idea.LangtoolsIdeaAntLogger");
+        project.removeBuildListener(ideaListener)
+        project.addBuildListener(new LangtoolsLogger(ideaListener))
+    </script>
+
+    <import file="../make/build.xml"/>
 
     <macrodef name="exec-target">
         <attribute name="antfile" default="${ant.file}" />
@@ -32,5 +29,15 @@
             </java>
         </sequential>
     </macrodef>
+
+    <target name="post-make" depends="build-all-tools"/>
+
+    <target name="jtreg-debug" depends="build-all-tools,-def-jtreg">
+        <exec-target target="jtreg-debug-internal"/>
+    </target>
+
+    <target name="jtreg-debug-internal" depends="-def-jtreg">
+        <jtreg-tool name="all" tests="${jtreg.tests}" jpda.jvmargs="${jtreg.jpda.jvmargs}"/>
+    </target>
 </project>
 
--- a/langtools/make/intellij/codeStyleSettings.xml	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/make/intellij/codeStyleSettings.xml	Tue Aug 05 12:14:11 2014 -0700
@@ -5,10 +5,14 @@
       <value>
         <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
         <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
-        <option name="RIGHT_MARGIN" value="80" />
+        <option name="RIGHT_MARGIN" value="100" />
+        <option name="JD_DO_NOT_WRAP_ONE_LINE_COMMENTS" value="true" />
         <XML>
           <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
         </XML>
+        <codeStyleSettings language="JAVA">
+          <option name="SPACE_AFTER_TYPE_CAST" value="false" />
+        </codeStyleSettings>
       </value>
     </option>
     <option name="USE_PER_PROJECT_SETTINGS" value="true" />
--- a/langtools/make/intellij/compiler.xml	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/make/intellij/compiler.xml	Tue Aug 05 12:14:11 2014 -0700
@@ -3,28 +3,16 @@
   <component name="CompilerConfiguration">
     <option name="DEFAULT_COMPILER" value="Javac" />
     <excludeFromCompile>
+      <directory url="file://$PROJECT_DIR$/src" includeSubdirectories="true" />
       <directory url="file://$PROJECT_DIR$/test" includeSubdirectories="true" />
     </excludeFromCompile>
     <resourceExtensions />
-    <wildcardResourcePatterns>
-      <entry name="!?*.java" />
-      <entry name="!?*.form" />
-      <entry name="!?*.class" />
-      <entry name="!?*.groovy" />
-      <entry name="!?*.scala" />
-      <entry name="!?*.flex" />
-      <entry name="!?*.kt" />
-      <entry name="!?*.clj" />
-    </wildcardResourcePatterns>
+    <wildcardResourcePatterns />
     <annotationProcessing>
       <profile default="true" name="Default" enabled="false">
         <processorPath useClasspath="true" />
       </profile>
     </annotationProcessing>
-  </component>
-  <component name="JavacSettings">
-    <option name="DEBUGGING_INFO" value="false" />
-    <option name="ADDITIONAL_OPTIONS_STRING" value="-Xlint:all -Werror" />
-  </component>
+  </component>  
 </project>
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/intellij/copyright/langtools.xml	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,9 @@
+<component name="CopyrightManager">
+  <copyright>
+    <option name="notice" value="Copyright (c) &amp;#36;today.year, Oracle and/or its affiliates. All rights reserved.&#10;DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.&#10;&#10;This code is free software; you can redistribute it and/or modify it&#10;under the terms of the GNU General Public License version 2 only, as&#10;published by the Free Software Foundation.  Oracle designates this&#10;particular file as subject to the &quot;Classpath&quot; exception as provided&#10;by Oracle in the LICENSE file that accompanied this code.&#10;&#10;This code is distributed in the hope that it will be useful, but WITHOUT&#10;ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or&#10;FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License&#10;version 2 for more details (a copy is included in the LICENSE file that&#10;accompanied this code).&#10;&#10;You should have received a copy of the GNU General Public License version&#10;2 along with this work; if not, write to the Free Software Foundation,&#10;Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.&#10;&#10;Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA&#10;or visit www.oracle.com if you need additional information or have any&#10;questions." />
+    <option name="keyword" value="Copyright" />
+    <option name="allowReplaceKeyword" value="" />
+    <option name="myName" value="langtools" />
+    <option name="myLocal" value="true" />
+  </copyright>
+</component>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/intellij/copyright/profiles_settings.xml	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,3 @@
+<component name="CopyrightManager">
+  <settings default="langtools" />
+</component>
\ No newline at end of file
--- a/langtools/make/intellij/inspectionProfiles/langtools.xml	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/make/intellij/inspectionProfiles/langtools.xml	Tue Aug 05 12:14:11 2014 -0700
@@ -14,6 +14,10 @@
         <value />
       </option>
     </inspection_tool>
+    <inspection_tool class="RawUseOfParameterizedType" enabled="true" level="WARNING" enabled_by_default="true">
+      <option name="ignoreObjectConstruction" value="false" />
+      <option name="ignoreUncompilable" value="true" />
+    </inspection_tool>
     <inspection_tool class="SpellCheckingInspection" enabled="true" level="TYPO" enabled_by_default="true">
       <option name="processCode" value="false" />
       <option name="processLiterals" value="false" />
--- a/langtools/make/intellij/langtools.iml	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/make/intellij/langtools.iml	Tue Aug 05 12:14:11 2014 -0700
@@ -1,10 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <module type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" inherit-compiler-output="true">
+  <component name="NewModuleRootManager" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/build" />
+    <output-test url="file://$MODULE_DIR$/build" />
     <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/build/gensrc" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/build/bootstrap/gensrc" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/build/genstubs" isTestSource="false" />
       <sourceFolder url="file://$MODULE_DIR$/src/share/classes" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/test" type="java-test-resource" />
     </content>
     <orderEntry type="sourceFolder" forTests="false" />    
     <orderEntry type="inheritedJdk" />
--- a/langtools/make/intellij/misc.xml	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/make/intellij/misc.xml	Tue Aug 05 12:14:11 2014 -0700
@@ -4,7 +4,7 @@
     <entry_points version="2.0" />
   </component>
   <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" assert-keyword="true" jdk-15="true">
-    <output url="file://$PROJECT_DIR$/build/intellij" />
+    <output url="file://$PROJECT_DIR$/build" />
   </component>
 </project>
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/intellij/src/idea/LangtoolsIdeaAntLogger.java	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,355 @@
+/*
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package idea;
+
+import org.apache.tools.ant.BuildEvent;
+import org.apache.tools.ant.DefaultLogger;
+
+import java.util.EnumSet;
+import java.util.Stack;
+
+import static org.apache.tools.ant.Project.*;
+
+/**
+ * This class is used to wrap the IntelliJ ant logger in order to provide more meaningful
+ * output when building langtools. The basic ant output in IntelliJ can be quite cumbersome to
+ * work with, as it provides two separate views: (i) a tree view, which is good to display build task
+ * in a hierarchical fashion as they are processed; and a (ii) plain text view, which gives you
+ * the full ant output. The main problem is that javac-related messages are buried into the
+ * ant output (which is made very verbose by IntelliJ in order to support the tree view). It is
+ * not easy to figure out which node to expand in order to see the error message; switching
+ * to plain text doesn't help either, as now the output is totally flat.
+ *
+ * This logger class removes a lot of verbosity from the IntelliJ ant logger by not propagating
+ * all the events to the IntelliJ's logger. In addition, certain events are handled in a custom
+ * fashion, to generate better output during the build.
+ */
+public final class LangtoolsIdeaAntLogger extends DefaultLogger {
+
+    /**
+     * This is just a way to pass in customized binary string predicates;
+     *
+     * TODO: replace with @code{BiPredicate<String, String>} and method reference when moving to 8
+     */
+    enum StringBinaryPredicate {
+        CONTAINS() {
+            @Override
+            boolean apply(String s1, String s2) {
+                return s1.contains(s2);
+            }
+        },
+        STARTS_WITH {
+            @Override
+            boolean apply(String s1, String s2) {
+                return s1.startsWith(s2);
+            }
+        };
+
+        abstract boolean apply(String s1, String s2);
+    }
+
+    /**
+     * Various kinds of ant messages that we shall intercept
+     */
+    enum MessageKind {
+
+        /** a javac error */
+        JAVAC_ERROR(StringBinaryPredicate.CONTAINS, MSG_ERR, "error:", "compiler.err"),
+        /** a javac warning */
+        JAVAC_WARNING(StringBinaryPredicate.CONTAINS, MSG_WARN, "warning:", "compiler.warn"),
+        /** a javac note */
+        JAVAC_NOTE(StringBinaryPredicate.CONTAINS, MSG_INFO, "note:", "compiler.note"),
+        /** continuation of some javac error message */
+        JAVAC_NESTED_DIAG(StringBinaryPredicate.STARTS_WITH, MSG_INFO, "  "),
+        /** a javac crash */
+        JAVAC_CRASH(StringBinaryPredicate.STARTS_WITH, MSG_ERR, "An exception has occurred in the compiler"),
+        /** jtreg test success */
+        JTREG_TEST_PASSED(StringBinaryPredicate.STARTS_WITH, MSG_INFO, "Passed: "),
+        /** jtreg test failure */
+        JTREG_TEST_FAILED(StringBinaryPredicate.STARTS_WITH, MSG_ERR, "FAILED: "),
+        /** jtreg test error */
+        JTREG_TEST_ERROR(StringBinaryPredicate.STARTS_WITH, MSG_ERR, "Error: ");
+
+        StringBinaryPredicate sbp;
+        int priority;
+        String[] keys;
+
+        MessageKind(StringBinaryPredicate sbp, int priority, String... keys) {
+            this.sbp = sbp;
+            this.priority = priority;
+            this.keys = keys;
+        }
+
+        /**
+         * Does a given message string matches this kind?
+         */
+        boolean matches(String s) {
+            for (String key : keys) {
+                if (sbp.apply(s, key)) {
+                    return true;
+                }
+            }
+            return false;
+        }
+    }
+
+    /**
+     * This enum is used to represent the list of tasks we need to keep track of during logging.
+     */
+    enum Task {
+        /** javac task - invoked during compilation */
+        JAVAC("javac", MessageKind.JAVAC_ERROR, MessageKind.JAVAC_WARNING, MessageKind.JAVAC_NOTE,
+                       MessageKind.JAVAC_NESTED_DIAG, MessageKind.JAVAC_CRASH),
+        /** jtreg task - invoked during test execution */
+        JTREG("jtreg", MessageKind.JTREG_TEST_PASSED, MessageKind.JTREG_TEST_FAILED, MessageKind.JTREG_TEST_ERROR),
+        /** initial synthetic task when the logger is created */
+        ROOT("") {
+            @Override
+            boolean matches(String s) {
+                return false;
+            }
+        },
+        /** synthetic task catching any other tasks not in this list */
+        ANY("") {
+            @Override
+            boolean matches(String s) {
+                return true;
+            }
+        };
+
+        String taskName;
+        MessageKind[] msgs;
+
+        Task(String taskName, MessageKind... msgs) {
+            this.taskName = taskName;
+            this.msgs = msgs;
+        }
+
+        boolean matches(String s) {
+            return s.equals(taskName);
+        }
+    }
+
+    /**
+     * This enum is used to represent the list of targets we need to keep track of during logging.
+     * A regular expression is used to match a given target name.
+     */
+    enum Target {
+        /** jtreg target - executed when launching tests */
+        JTREG("jtreg") {
+            @Override
+            String getDisplayMessage(BuildEvent e) {
+                return "Running jtreg tests: " + e.getProject().getProperty("jtreg.tests");
+            }
+        },
+        /** build bootstrap tool target - executed when bootstrapping javac */
+        BUILD_BOOTSTRAP_TOOL("build-bootstrap-.*") {
+            @Override
+            String getDisplayMessage(BuildEvent e) {
+                String targetName = e.getTarget().getName();
+                String tool = targetName.split("-")[2];
+                return "Building bootstrap " + tool + "...";
+            }
+        },
+        /** build classes target - executed when building classes of given tool */
+        BUILD_TOOL("build-classes-.*") {
+            @Override
+            String getDisplayMessage(BuildEvent e) {
+                String targetName = e.getTarget().getName();
+                String tool = targetName.split("-")[2];
+                return "Building " + tool + "...";
+            }
+        },
+        /** synthetic target catching any other target not in this list */
+        ANY("") {
+            @Override
+            String getDisplayMessage(BuildEvent e) {
+                return "Executing Ant target(s): " + e.getProject().getProperty("ant.project.invoked-targets");
+            }
+            @Override
+            boolean matches(String msg) {
+                return true;
+            }
+        };
+
+        String targetRegex;
+
+        Target(String targetRegex) {
+            this.targetRegex = targetRegex;
+        }
+
+        boolean matches(String msg) {
+            return msg.matches(targetRegex);
+        }
+
+        abstract String getDisplayMessage(BuildEvent e);
+    }
+
+    /**
+     * A custom build event used to represent status changes which should be notified inside
+     * Intellij
+     */
+    static class StatusEvent extends BuildEvent {
+
+        /** the target to which the status update refers */
+        Target target;
+
+        StatusEvent(BuildEvent e, Target target) {
+            super(new StatusTask(e, target.getDisplayMessage(e)));
+            this.target = target;
+            setMessage(getTask().getTaskName(), 2);
+        }
+
+        /**
+         * A custom task used to channel info regarding a status change
+         */
+        static class StatusTask extends org.apache.tools.ant.Task {
+            StatusTask(BuildEvent event, String msg) {
+                setProject(event.getProject());
+                setOwningTarget(event.getTarget());
+                setTaskName(msg);
+            }
+        }
+    }
+
+    /** wrapped ant logger (IntelliJ's own logger) */
+    DefaultLogger logger;
+
+    /** flag - is this the first target we encounter? */
+    boolean firstTarget = true;
+
+    /** flag - should subsequenet failures be suppressed ? */
+    boolean suppressTaskFailures = false;
+
+    /** flag - have we ran into a javac crash ? */
+    boolean crashFound = false;
+
+    /** stack of status changes associated with pending targets */
+    Stack<StatusEvent> statusEvents = new Stack<>();
+
+    /** stack of pending tasks */
+    Stack<Task> tasks = new Stack<>();
+
+    public LangtoolsIdeaAntLogger(DefaultLogger logger) {
+        this.logger = logger;
+        tasks.push(Task.ROOT);
+    }
+
+    @Override
+    public void buildStarted(BuildEvent event) {
+        //do nothing
+    }
+
+    @Override
+    public void buildFinished(BuildEvent event) {
+        //do nothing
+    }
+
+    @Override
+    public void targetStarted(BuildEvent event) {
+        EnumSet<Target> statusKinds = firstTarget ?
+                EnumSet.allOf(Target.class) :
+                EnumSet.complementOf(EnumSet.of(Target.ANY));
+
+        String targetName = event.getTarget().getName();
+
+        for (Target statusKind : statusKinds) {
+            if (statusKind.matches(targetName)) {
+                StatusEvent statusEvent = new StatusEvent(event, statusKind);
+                statusEvents.push(statusEvent);
+                logger.taskStarted(statusEvent);
+                firstTarget = false;
+                return;
+            }
+        }
+    }
+
+    @Override
+    public void targetFinished(BuildEvent event) {
+        if (!statusEvents.isEmpty()) {
+            StatusEvent lastEvent = statusEvents.pop();
+            if (lastEvent.target.matches(event.getTarget().getName())) {
+                logger.taskFinished(lastEvent);
+            }
+        }
+    }
+
+    @Override
+    public void taskStarted(BuildEvent event) {
+        String taskName = event.getTask().getTaskName();
+        for (Task task : Task.values()) {
+            if (task.matches(taskName)) {
+                tasks.push(task);
+                return;
+            }
+        }
+    }
+
+    @Override
+    public void taskFinished(BuildEvent event) {
+        if (tasks.peek() == Task.ROOT) {
+            //we need to 'close' the root task to get nicer output
+            logger.taskFinished(event);
+        } else if (!suppressTaskFailures && event.getException() != null) {
+            //the first (innermost) task failure should always be logged
+            event.setMessage(event.getException().toString(), 0);
+            event.setException(null);
+            //note: we turn this into a plain message to avoid stack trace being logged by Idea
+            logger.messageLogged(event);
+            suppressTaskFailures = true;
+        }
+        tasks.pop();
+    }
+
+    @Override
+    public void messageLogged(BuildEvent event) {
+        String msg = event.getMessage();
+
+        boolean processed = false;
+
+        if (!tasks.isEmpty()) {
+            Task task = tasks.peek();
+            for (MessageKind messageKind : task.msgs) {
+                if (messageKind.matches(msg)) {
+                    event.setMessage(msg, messageKind.priority);
+                    processed = true;
+                    if (messageKind == MessageKind.JAVAC_CRASH) {
+                        crashFound = true;
+                    }
+                    break;
+                }
+            }
+        }
+
+        if (event.getPriority() == MSG_ERR || crashFound) {
+            //we log errors regardless of owning task
+            logger.messageLogged(event);
+            suppressTaskFailures = true;
+        } else if (processed) {
+            logger.messageLogged(event);
+        }
+    }
+}
--- a/langtools/make/intellij/workspace.xml	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/make/intellij/workspace.xml	Tue Aug 05 12:14:11 2014 -0700
@@ -7,6 +7,7 @@
     <option name="MAKE_PROJECT_ON_SAVE" value="true" />
   </component>
   <component name="RunManager" selected="Application.javac">
+    <!-- standard tools -->
     <configuration default="false" name="javac" type="Application" factoryName="Application">
       <option name="MAIN_CLASS_NAME" value="com.sun.tools.javac.Main" />
       <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build/classes" />
@@ -19,7 +20,12 @@
       <option name="PASS_PARENT_ENVS" value="true" />
       <module name="langtools" />
       <envs />
-      <method />
+      <RunnerSettings RunnerId="Run" />
+      <ConfigurationWrapper RunnerId="Run" />
+      <method>
+        <option name="Make" enabled="false" />
+        <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-classes-javac" />
+      </method>
     </configuration>
     <configuration default="false" name="javadoc" type="Application" factoryName="Application">
       <option name="MAIN_CLASS_NAME" value="com.sun.tools.javadoc.Main" />
@@ -33,7 +39,12 @@
       <option name="PASS_PARENT_ENVS" value="true" />
       <module name="langtools" />
       <envs />
-      <method />
+      <RunnerSettings RunnerId="Run" />
+      <ConfigurationWrapper RunnerId="Run" />
+      <method>
+        <option name="Make" enabled="false" />
+        <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-classes-javadoc" />
+      </method> 
     </configuration>
     <configuration default="false" name="javap" type="Application" factoryName="Application">
       <option name="MAIN_CLASS_NAME" value="com.sun.tools.javap.Main" />
@@ -47,7 +58,12 @@
       <option name="PASS_PARENT_ENVS" value="true" />
       <module name="langtools" />
       <envs />
-      <method />
+      <RunnerSettings RunnerId="Run" />
+      <ConfigurationWrapper RunnerId="Run" />
+      <method>
+        <option name="Make" enabled="false" />
+        <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-classes-javap" />
+      </method> 
     </configuration>
     <configuration default="false" name="javah" type="Application" factoryName="Application">
       <option name="MAIN_CLASS_NAME" value="com.sun.tools.javah.Main" />
@@ -61,21 +77,12 @@
       <option name="PASS_PARENT_ENVS" value="true" />
       <module name="langtools" />
       <envs />
-      <method />
-    </configuration>
-    <configuration default="false" name="jdeps" type="Application" factoryName="Application">
-      <option name="MAIN_CLASS_NAME" value="com.sun.tools.jdeps.Main" />
-      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build/classes" />
-      <option name="PROGRAM_PARAMETERS" value="" />
-      <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-      <option name="ALTERNATIVE_JRE_PATH" value="" />
-      <option name="ENABLE_SWING_INSPECTOR" value="false" />
-      <option name="ENV_VARIABLES" />
-      <option name="PASS_PARENT_ENVS" value="true" />
-      <module name="langtools" />
-      <envs />
-      <method />
+      <RunnerSettings RunnerId="Run" />
+      <ConfigurationWrapper RunnerId="Run" />
+      <method>
+        <option name="Make" enabled="false" />
+        <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-classes-javah" />
+      </method> 
     </configuration>
     <configuration default="false" name="sjavac" type="Application" factoryName="Application">
       <option name="MAIN_CLASS_NAME" value="com.sun.tools.sjavac.Main" />
@@ -89,9 +96,35 @@
       <option name="PASS_PARENT_ENVS" value="true" />
       <module name="langtools" />
       <envs />
-      <method />
+      <RunnerSettings RunnerId="Run" />
+      <ConfigurationWrapper RunnerId="Run" />
+      <method>
+        <option name="Make" enabled="false" />
+        <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-classes-sjavac" />
+      </method> 
     </configuration>
-    <configuration default="false" name="jtreg (remote)" type="Remote" factoryName="Remote" singleton="true">
+    <!-- bootstrap javac -->
+    <configuration default="false" name="javac (bootstrap)" type="Application" factoryName="Application">
+      <option name="MAIN_CLASS_NAME" value="com.sun.tools.javac.Main" />
+      <option name="VM_PARAMETERS" value="-Xbootclasspath/p:build/bootstrap/classes" />
+      <option name="PROGRAM_PARAMETERS" value="" />
+      <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" value="" />
+      <option name="ENABLE_SWING_INSPECTOR" value="false" />
+      <option name="ENV_VARIABLES" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <module name="langtools" />
+      <envs />
+      <RunnerSettings RunnerId="Run" />
+      <ConfigurationWrapper RunnerId="Run" />
+      <method>
+        <option name="Make" enabled="false" />
+        <option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-bootstrap-javac" />
+      </method> 
+    </configuration>
+    <!-- jtreg debug -->
+    <configuration default="false" name="jtreg (debug)" type="Remote" factoryName="Remote" singleton="true">
       <option name="USE_SOCKET_TRANSPORT" value="true" />
       <option name="SERVER_MODE" value="true" />
       <option name="SHMEM_ADDRESS" />
@@ -108,15 +141,6 @@
       </method>
       <method />
     </configuration>
-    <list size="7">
-      <item index="0" class="java.lang.String" itemvalue="Application.javac" />
-      <item index="1" class="java.lang.String" itemvalue="Application.javadoc" />
-      <item index="2" class="java.lang.String" itemvalue="Application.javap" />
-      <item index="3" class="java.lang.String" itemvalue="Application.javah" />
-      <item index="4" class="java.lang.String" itemvalue="Application.jdeps" />
-      <item index="5" class="java.lang.String" itemvalue="Application.sjavac" />
-      <item index="6" class="java.lang.String" itemvalue="Remote.jtreg" />
-    </list>
   </component>
   <component name="antWorkspaceConfiguration">
     <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
@@ -131,8 +155,9 @@
         <filter targetName="jtreg-debug" isVisible="true" />
         <filter targetName="checkstyle" isVisible="true" />
       </targetFilters>
-      <viewClosedWhenNoErrors value="false" />
+      <viewClosedWhenNoErrors value="true" />
       <expanded value="false" />
+      <treeView value="false" />
     </buildFile>
   </component>
 </project>
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Tue Aug 05 12:14:11 2014 -0700
@@ -749,7 +749,7 @@
      * Leave class public for external testing purposes.
      */
     public static class ComputeAnnotationSet extends
-        ElementScanner8<Set<TypeElement>, Set<TypeElement>> {
+        ElementScanner9<Set<TypeElement>, Set<TypeElement>> {
         final Elements elements;
 
         public ComputeAnnotationSet(Elements elements) {
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java	Tue Aug 05 12:14:11 2014 -0700
@@ -114,7 +114,7 @@
         if (a.getKind() != ElementKind.ANNOTATION_TYPE)
             throw new IllegalArgumentException(NOT_AN_ANNOTATION_TYPE + a);
 
-        ElementScanner8<Set<Element>, TypeElement> scanner =
+        ElementScanner9<Set<Element>, TypeElement> scanner =
             new AnnotationSetScanner(result);
 
         for (Element element : rootElements)
@@ -125,7 +125,7 @@
 
     // Could be written as a local class inside getElementsAnnotatedWith
     private class AnnotationSetScanner extends
-        ElementScanner8<Set<Element>, TypeElement> {
+        ElementScanner9<Set<Element>, TypeElement> {
         // Insertion-order preserving set
         Set<Element> annotatedElements = new LinkedHashSet<>();
 
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java	Tue Aug 05 12:14:11 2014 -0700
@@ -83,7 +83,7 @@
      * Used for the -Xprint option and called by Elements.printElements
      */
     public static class PrintingElementVisitor
-        extends SimpleElementVisitor8<PrintingElementVisitor, Boolean> {
+        extends SimpleElementVisitor9<PrintingElementVisitor, Boolean> {
         int indentation; // Indentation level;
         final PrintWriter writer;
         final Elements elementUtils;
--- a/langtools/src/share/classes/com/sun/tools/javah/JavahTask.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javah/JavahTask.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -60,7 +60,7 @@
 import javax.lang.model.type.TypeMirror;
 import javax.lang.model.type.TypeVisitor;
 import javax.lang.model.util.ElementFilter;
-import javax.lang.model.util.SimpleTypeVisitor8;
+import javax.lang.model.util.SimpleTypeVisitor9;
 import javax.lang.model.util.Types;
 
 import javax.tools.Diagnostic;
@@ -738,7 +738,7 @@
         }
 
         private TypeVisitor<Void,Types> checkMethodParametersVisitor =
-                new SimpleTypeVisitor8<Void,Types>() {
+                new SimpleTypeVisitor9<Void,Types>() {
             @Override
             public Void visitArray(ArrayType t, Types types) {
                 visit(t.getComponentType(), types);
--- a/langtools/src/share/classes/com/sun/tools/javah/LLNI.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javah/LLNI.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,7 +45,7 @@
 import javax.lang.model.type.TypeMirror;
 import javax.lang.model.type.TypeVisitor;
 import javax.lang.model.util.ElementFilter;
-import javax.lang.model.util.SimpleTypeVisitor8;
+import javax.lang.model.util.SimpleTypeVisitor9;
 
 /*
  * <p><b>This is NOT part of any supported API.
@@ -628,7 +628,7 @@
     }
 
     protected final boolean isLongOrDouble(TypeMirror t) {
-        TypeVisitor<Boolean,Void> v = new SimpleTypeVisitor8<Boolean,Void>() {
+        TypeVisitor<Boolean,Void> v = new SimpleTypeVisitor9<Boolean,Void>() {
             public Boolean defaultAction(TypeMirror t, Void p){
                 return false;
             }
--- a/langtools/src/share/classes/com/sun/tools/javah/TypeSignature.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javah/TypeSignature.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,7 +38,7 @@
 import javax.lang.model.type.TypeVariable;
 import javax.lang.model.type.TypeVisitor;
 import javax.lang.model.util.Elements;
-import javax.lang.model.util.SimpleTypeVisitor8;
+import javax.lang.model.util.SimpleTypeVisitor9;
 
 /**
  * Returns internal type signature.
@@ -248,7 +248,7 @@
 
 
     String qualifiedTypeName(TypeMirror type) {
-        TypeVisitor<Name, Void> v = new SimpleTypeVisitor8<Name, Void>() {
+        TypeVisitor<Name, Void> v = new SimpleTypeVisitor9<Name, Void>() {
             @Override
             public Name visitArray(ArrayType t, Void p) {
                 return t.getComponentType().accept(this, p);
--- a/langtools/src/share/classes/com/sun/tools/jdeps/Analyzer.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/jdeps/Analyzer.java	Tue Aug 05 12:14:11 2014 -0700
@@ -24,8 +24,6 @@
  */
 package com.sun.tools.jdeps;
 
-import com.sun.tools.classfile.Dependency.Location;
-import com.sun.tools.jdeps.PlatformClassPath.JDKArchive;
 import java.util.Comparator;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -33,6 +31,10 @@
 import java.util.Map;
 import java.util.Objects;
 import java.util.Set;
+import java.util.stream.Collectors;
+
+import com.sun.tools.classfile.Dependency.Location;
+import com.sun.tools.jdeps.PlatformClassPath.JDKArchive;
 
 /**
  * Dependency Analyzer.
@@ -110,6 +112,13 @@
         return false;
     }
 
+    public Set<String> dependences(Archive source) {
+        ArchiveDeps result = results.get(source);
+        return result.dependencies().stream()
+                     .map(Dep::target)
+                     .collect(Collectors.toSet());
+    }
+
     public interface Visitor {
         /**
          * Visits a recorded dependency from origin to target which can be
--- a/langtools/src/share/classes/com/sun/tools/jdeps/JdepsTask.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/jdeps/JdepsTask.java	Tue Aug 05 12:14:11 2014 -0700
@@ -236,6 +236,11 @@
                 task.options.showLabel = true;
             }
         },
+        new HiddenOption(false, "-q", "-quiet") {
+            void process(JdepsTask task, String opt, String arg) {
+                task.options.nowarning = true;
+            }
+        },
         new HiddenOption(true, "-depth") {
             void process(JdepsTask task, String opt, String arg) throws BadArgs {
                 try {
@@ -320,7 +325,9 @@
 
         Analyzer analyzer = new Analyzer(options.verbose, new Analyzer.Filter() {
             @Override
-            public boolean accepts(Location origin, Archive originArchive, Location target, Archive targetArchive) {
+            public boolean accepts(Location origin, Archive originArchive,
+                                   Location target, Archive targetArchive)
+            {
                 if (options.findJDKInternals) {
                     // accepts target that is JDK class but not exported
                     return isJDKArchive(targetArchive) &&
@@ -344,6 +351,10 @@
         } else {
             printRawOutput(log, analyzer);
         }
+
+        if (options.findJDKInternals && !options.nowarning) {
+            showReplacements(analyzer);
+        }
         return true;
     }
 
@@ -693,6 +704,7 @@
         boolean apiOnly;
         boolean showLabel;
         boolean findJDKInternals;
+        boolean nowarning;
         // default is to show package-level dependencies
         // and filter references from same package
         Analyzer.Type verbose = PACKAGE;
@@ -709,6 +721,7 @@
     private static class ResourceBundleHelper {
         static final ResourceBundle versionRB;
         static final ResourceBundle bundle;
+        static final ResourceBundle jdkinternals;
 
         static {
             Locale locale = Locale.getDefault();
@@ -722,6 +735,11 @@
             } catch (MissingResourceException e) {
                 throw new InternalError("version.resource.missing");
             }
+            try {
+                jdkinternals = ResourceBundle.getBundle("com.sun.tools.jdeps.resources.jdkinternals");
+            } catch (MissingResourceException e) {
+                throw new InternalError("Cannot find jdkinternals resource bundle");
+            }
         }
     }
 
@@ -928,4 +946,50 @@
         }
         return Profile.getProfile(pn);
     }
+
+    /**
+     * Returns the recommended replacement API for the given classname;
+     * or return null if replacement API is not known.
+     */
+    private String replacementFor(String cn) {
+        String name = cn;
+        String value = null;
+        while (value == null && name != null) {
+            try {
+                value = ResourceBundleHelper.jdkinternals.getString(name);
+            } catch (MissingResourceException e) {
+                // go up one subpackage level
+                int i = name.lastIndexOf('.');
+                name = i > 0 ? name.substring(0, i) : null;
+            }
+        }
+        return value;
+    };
+
+    private void showReplacements(Analyzer analyzer) {
+        Map<String,String> jdkinternals = new TreeMap<>();
+        boolean useInternals = false;
+        for (Archive source : sourceLocations) {
+            useInternals = useInternals || analyzer.hasDependences(source);
+            for (String cn : analyzer.dependences(source)) {
+                String repl = replacementFor(cn);
+                if (repl != null) {
+                    jdkinternals.putIfAbsent(cn, repl);
+                }
+            }
+        }
+        if (useInternals) {
+            log.println();
+            warning("warn.replace.useJDKInternals", getMessage("jdeps.wiki.url"));
+        }
+        if (!jdkinternals.isEmpty()) {
+            log.println();
+            log.format("%-40s %s%n", "JDK Internal API", "Suggested Replacement");
+            log.format("%-40s %s%n", "----------------", "---------------------");
+            for (Map.Entry<String,String> e : jdkinternals.entrySet()) {
+                log.format("%-40s %s%n", e.getKey(), e.getValue());
+            }
+        }
+
+    }
 }
--- a/langtools/src/share/classes/com/sun/tools/jdeps/resources/jdeps.properties	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/jdeps/resources/jdeps.properties	Tue Aug 05 12:14:11 2014 -0700
@@ -93,5 +93,12 @@
 err.invalid.path=invalid path: {0}
 warn.invalid.arg=Invalid classname or pathname not exist: {0}
 warn.split.package=package {0} defined in {1} {2}
+warn.replace.useJDKInternals=\
+JDK internal APIs are unsupported and private to JDK implementation that are\n\
+subject to be removed or changed incompatibly and could break your application.\n\
+Please modify your code to eliminate dependency on any JDK internal APIs.\n\
+For the most recent update on JDK internal API replacements, please check:\n\
+{0}
 
 artifact.not.found=not found
+jdeps.wiki.url=https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+Tool
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/com/sun/tools/jdeps/resources/jdkinternals.properties	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,22 @@
+// No translation needed
+com.sun.crypto.provider.SunJCE=Use java.security.Security.getProvider(provider-name) @since 1.3
+com.sun.image.codec=Use javax.imageio @since 1.4
+com.sun.org.apache.xml.internal.security=Use java.xml.crypto @since 1.6
+com.sun.org.apache.xml.internal.security.utils.Base64=Use java.util.Base64 @since 1.8
+com.sun.net.ssl=Use javax.net.ssl @since 1.4
+com.sun.net.ssl.internal.ssl.Provider=Use java.security.Security.getProvider(provider-name) @since 1.3
+com.sun.rowset=Use javax.sql.rowset.RowSetProvider @since 1.7
+com.sun.tools.javac.tree=Use com.sun.source @since 1.6
+com.sun.tools.javac=Use javax.tools and javax.lang.model @since 1.6
+sun.awt.image.codec=Use javax.imageio @since 1.4
+sun.misc.BASE64Encoder=Use java.util.Base64 @since 1.8
+sun.misc.BASE64Decoder=Use java.util.Base64 @since 1.8
+sun.misc.Cleaner=Use java.lang.ref.PhantomReference @since 1.2
+sun.misc.Service=Use java.util.ServiceLoader @since 1.6
+sun.security.action=Use java.security.PrivilegedAction @since 1.1
+sun.security.krb5=Use com.sun.security.jgss
+sun.security.provider.PolicyFile=Use java.security.Policy.getInstance("JavaPolicy", new URIParameter(uri)) @since 1.6
+sun.security.provider.Sun=Use java.security.Security.getProvider(provider-name) @since 1.3
+sun.security.util.SecurityConstants=Use appropriate java.security.Permission subclass @since 1.1
+sun.security.x509.X500Name=Use javax.security.auth.x500.X500Principal @since 1.4
+sun.tools.jar=Use java.util.jar or jar tool @since 1.2
--- a/langtools/src/share/classes/com/sun/tools/sjavac/comp/PubapiVisitor.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/com/sun/tools/sjavac/comp/PubapiVisitor.java	Tue Aug 05 12:14:11 2014 -0700
@@ -32,7 +32,7 @@
 import javax.lang.model.element.TypeElement;
 import javax.lang.model.element.VariableElement;
 import javax.lang.model.type.TypeMirror;
-import javax.lang.model.util.ElementScanner6;
+import javax.lang.model.util.ElementScanner9;
 
 /** Utility class that constructs a textual representation
  * of the public api of a class.
@@ -42,7 +42,7 @@
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
  */
-public class PubapiVisitor extends ElementScanner6<Void, Void> {
+public class PubapiVisitor extends ElementScanner9<Void, Void> {
 
     StringBuffer sb;
     // Important that it is 1! Part of protocol over wire, silly yes.
--- a/langtools/src/share/classes/javax/lang/model/element/ElementVisitor.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/element/ElementVisitor.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -73,8 +73,6 @@
  * @author Joseph D. Darcy
  * @author Scott Seligman
  * @author Peter von der Ah&eacute;
- * @see AbstractElementVisitor6
- * @see AbstractElementVisitor7
  * @since 1.6
  */
 public interface ElementVisitor<R, P> {
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -72,8 +72,12 @@
  *
  * @see AbstractAnnotationValueVisitor7
  * @see AbstractAnnotationValueVisitor8
+ * @see AbstractAnnotationValueVisitor9
  * @since 1.6
+ * @deprecated Release 6 is obsolete; update to a visitor for a newer
+ * release level.
  */
+@Deprecated
 @SupportedSourceVersion(RELEASE_6)
 public abstract class AbstractAnnotationValueVisitor6<R, P>
     implements AnnotationValueVisitor<R, P> {
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor7.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor7.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -65,8 +65,10 @@
  *
  * @see AbstractAnnotationValueVisitor6
  * @see AbstractAnnotationValueVisitor8
+ * @see AbstractAnnotationValueVisitor9
  * @since 1.7
  */
+@SuppressWarnings("deprecation") // Superclass deprecated
 @SupportedSourceVersion(RELEASE_7)
 public abstract class AbstractAnnotationValueVisitor7<R, P> extends AbstractAnnotationValueVisitor6<R, P> {
 
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor8.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor8.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -65,6 +65,7 @@
  *
  * @see AbstractAnnotationValueVisitor6
  * @see AbstractAnnotationValueVisitor7
+ * @see AbstractAnnotationValueVisitor9
  * @since 1.8
  */
 @SupportedSourceVersion(RELEASE_8)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor9.java	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+import javax.annotation.processing.SupportedSourceVersion;
+
+/**
+ * A skeletal visitor for annotation values with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9}
+ * source version.
+ *
+ * <p> <b>WARNING:</b> The {@code AnnotationValueVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new abstract annotation
+ * value visitor class will also be introduced to correspond to the
+ * new language level; this visitor will have different default
+ * behavior for the visit method in question.  When the new visitor is
+ * introduced, all or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods
+ * @param <P> the type of the additional parameter to this visitor's methods.
+ *
+ * @see AbstractAnnotationValueVisitor6
+ * @see AbstractAnnotationValueVisitor7
+ * @see AbstractAnnotationValueVisitor8
+ * @since 1.9
+ */
+@SupportedSourceVersion(RELEASE_9)
+public abstract class AbstractAnnotationValueVisitor9<R, P> extends AbstractAnnotationValueVisitor8<R, P> {
+
+    /**
+     * Constructor for concrete subclasses to call.
+     */
+    protected AbstractAnnotationValueVisitor9() {
+        super();
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor6.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor6.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -74,8 +74,12 @@
  *
  * @see AbstractElementVisitor7
  * @see AbstractElementVisitor8
+ * @see AbstractElementVisitor9
  * @since 1.6
+ * @deprecated Release 6 is obsolete; update to a visitor for a newer
+ * release level.
  */
+@Deprecated
 @SupportedSourceVersion(RELEASE_6)
 public abstract class AbstractElementVisitor6<R, P> implements ElementVisitor<R, P> {
     /**
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor7.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor7.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -69,8 +69,10 @@
  *
  * @see AbstractElementVisitor6
  * @see AbstractElementVisitor8
+ * @see AbstractElementVisitor9
  * @since 1.7
  */
+@SuppressWarnings("deprecation") // Superclass deprecated
 @SupportedSourceVersion(RELEASE_7)
 public abstract class AbstractElementVisitor7<R, P> extends AbstractElementVisitor6<R, P> {
     /**
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor8.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor8.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -69,6 +69,7 @@
  *
  * @see AbstractElementVisitor6
  * @see AbstractElementVisitor7
+ * @see AbstractElementVisitor9
  * @since 1.8
  */
 @SupportedSourceVersion(RELEASE_8)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor9.java	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.SourceVersion;
+import static javax.lang.model.SourceVersion.*;
+
+
+/**
+ * A skeletal visitor of program elements with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9}
+ * source version.
+ *
+ * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new abstract element visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question.  When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see AbstractElementVisitor6
+ * @see AbstractElementVisitor7
+ * @see AbstractElementVisitor8
+ * @since 1.9
+ */
+@SupportedSourceVersion(RELEASE_9)
+public abstract class AbstractElementVisitor9<R, P> extends AbstractElementVisitor8<R, P> {
+    /**
+     * Constructor for concrete subclasses to call.
+     */
+    protected AbstractElementVisitor9(){
+        super();
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,11 @@
 
 package javax.lang.model.util;
 
+import javax.annotation.processing.SupportedSourceVersion;
 import javax.lang.model.type.*;
 
+import static javax.lang.model.SourceVersion.*;
+
 /**
  * A skeletal visitor of types with default behavior appropriate for
  * the {@link javax.lang.model.SourceVersion#RELEASE_6 RELEASE_6}
@@ -70,8 +73,13 @@
  *
  * @see AbstractTypeVisitor7
  * @see AbstractTypeVisitor8
+ * @see AbstractTypeVisitor9
  * @since 1.6
+ * @deprecated Release 6 is obsolete; update to a visitor for a newer
+ * release level.
  */
+@Deprecated
+@SupportedSourceVersion(RELEASE_6)
 public abstract class AbstractTypeVisitor6<R, P> implements TypeVisitor<R, P> {
     /**
      * Constructor for concrete subclasses to call.
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor7.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor7.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,11 @@
 
 package javax.lang.model.util;
 
+import javax.annotation.processing.SupportedSourceVersion;
 import javax.lang.model.type.*;
 
+import static javax.lang.model.SourceVersion.*;
+
 /**
  * A skeletal visitor of types with default behavior appropriate for
  * the {@link javax.lang.model.SourceVersion#RELEASE_7 RELEASE_7}
@@ -66,8 +69,11 @@
  *
  * @see AbstractTypeVisitor6
  * @see AbstractTypeVisitor8
+ * @see AbstractTypeVisitor9
  * @since 1.7
  */
+@SuppressWarnings("deprecation") // Superclass deprecated
+@SupportedSourceVersion(RELEASE_7)
 public abstract class AbstractTypeVisitor7<R, P> extends AbstractTypeVisitor6<R, P> {
     /**
      * Constructor for concrete subclasses to call.
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor8.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor8.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,11 @@
 
 package javax.lang.model.util;
 
+import javax.annotation.processing.SupportedSourceVersion;
 import javax.lang.model.type.*;
 
+import static javax.lang.model.SourceVersion.*;
+
 /**
  * A skeletal visitor of types with default behavior appropriate for
  * the {@link javax.lang.model.SourceVersion#RELEASE_8 RELEASE_8}
@@ -66,8 +69,10 @@
  *
  * @see AbstractTypeVisitor6
  * @see AbstractTypeVisitor7
+ * @see AbstractTypeVisitor9
  * @since 1.8
  */
+@SupportedSourceVersion(RELEASE_8)
 public abstract class AbstractTypeVisitor8<R, P> extends AbstractTypeVisitor7<R, P> {
     /**
      * Constructor for concrete subclasses to call.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor9.java	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.type.*;
+
+import static javax.lang.model.SourceVersion.*;
+
+/**
+ * A skeletal visitor of types with default behavior appropriate for
+ * the {@link javax.lang.model.SourceVersion#RELEASE_9 RELEASE_9}
+ * source version.
+ *
+ * <p> <b>WARNING:</b> The {@code TypeVisitor} interface implemented
+ * by this class may have methods added to it in the future to
+ * accommodate new, currently unknown, language structures added to
+ * future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new abstract type visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question.  When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see AbstractTypeVisitor6
+ * @see AbstractTypeVisitor7
+ * @see AbstractTypeVisitor8
+ * @since 1.9
+ */
+@SupportedSourceVersion(RELEASE_9)
+public abstract class AbstractTypeVisitor9<R, P> extends AbstractTypeVisitor8<R, P> {
+    /**
+     * Constructor for concrete subclasses to call.
+     */
+    protected AbstractTypeVisitor9() {
+        super();
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor6.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor6.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -88,8 +88,12 @@
  *
  * @see ElementKindVisitor7
  * @see ElementKindVisitor8
+ * @see ElementKindVisitor9
  * @since 1.6
+ * @deprecated Release 6 is obsolete; update to a visitor for a newer
+ * release level.
  */
+@Deprecated
 @SupportedSourceVersion(RELEASE_6)
 public class ElementKindVisitor6<R, P>
                   extends SimpleElementVisitor6<R, P> {
--- a/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor7.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor7.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -82,8 +82,10 @@
  *
  * @see ElementKindVisitor6
  * @see ElementKindVisitor8
+ * @see ElementKindVisitor9
  * @since 1.7
  */
+@SuppressWarnings("deprecation") // Superclass deprecated
 @SupportedSourceVersion(RELEASE_7)
 public class ElementKindVisitor7<R, P> extends ElementKindVisitor6<R, P> {
     /**
--- a/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor8.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor8.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -82,6 +82,7 @@
  *
  * @see ElementKindVisitor6
  * @see ElementKindVisitor7
+ * @see ElementKindVisitor9
  * @since 1.8
  */
 @SupportedSourceVersion(RELEASE_8)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor9.java	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import javax.lang.model.element.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+
+/**
+ * A visitor of program elements based on their {@linkplain
+ * ElementKind kind} with default behavior appropriate for the {@link
+ * SourceVersion#RELEASE_9 RELEASE_9} source version.  For {@linkplain
+ * Element elements} <tt><i>XYZ</i></tt> that may have more than one
+ * kind, the <tt>visit<i>XYZ</i></tt> methods in this class delegate
+ * to the <tt>visit<i>XYZKind</i></tt> method corresponding to the
+ * first argument's kind.  The <tt>visit<i>XYZKind</i></tt> methods
+ * call {@link #defaultAction defaultAction}, passing their arguments
+ * to {@code defaultAction}'s corresponding parameters.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it or the
+ * {@code ElementKind} {@code enum} used in this case may have
+ * constants added to it in the future to accommodate new, currently
+ * unknown, language structures added to future versions of the
+ * Java&trade; programming language.  Therefore, methods whose names
+ * begin with {@code "visit"} may be added to this class in the
+ * future; to avoid incompatibilities, classes which extend this class
+ * should not declare any instance methods with names beginning with
+ * {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new abstract element kind
+ * visitor class will also be introduced to correspond to the new
+ * language level; this visitor will have different default behavior
+ * for the visit method in question.  When the new visitor is
+ * introduced, all or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see ElementKindVisitor6
+ * @see ElementKindVisitor7
+ * @see ElementKindVisitor8
+ * @since 1.9
+ */
+@SupportedSourceVersion(RELEASE_9)
+public class ElementKindVisitor9<R, P> extends ElementKindVisitor8<R, P> {
+    /**
+     * Constructor for concrete subclasses; uses {@code null} for the
+     * default value.
+     */
+    protected ElementKindVisitor9() {
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses; uses the argument for the
+     * default value.
+     *
+     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+     */
+    protected ElementKindVisitor9(R defaultValue) {
+        super(defaultValue);
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/ElementScanner6.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementScanner6.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -90,8 +90,12 @@
  *
  * @see ElementScanner7
  * @see ElementScanner8
+ * @see ElementScanner9
  * @since 1.6
+ * @deprecated Release 6 is obsolete; update to a visitor for a newer
+ * release level.
  */
+@Deprecated
 @SupportedSourceVersion(RELEASE_6)
 public class ElementScanner6<R, P> extends AbstractElementVisitor6<R, P> {
     /**
--- a/langtools/src/share/classes/javax/lang/model/util/ElementScanner7.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementScanner7.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -86,8 +86,10 @@
  *
  * @see ElementScanner6
  * @see ElementScanner8
+ * @see ElementScanner9
  * @since 1.7
  */
+@SuppressWarnings("deprecation") // Superclass deprecated
 @SupportedSourceVersion(RELEASE_7)
 public class ElementScanner7<R, P> extends ElementScanner6<R, P> {
     /**
--- a/langtools/src/share/classes/javax/lang/model/util/ElementScanner8.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementScanner8.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -86,6 +86,7 @@
  *
  * @see ElementScanner6
  * @see ElementScanner7
+ * @see ElementScanner9
  * @since 1.8
  */
 @SupportedSourceVersion(RELEASE_8)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementScanner9.java	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import javax.lang.model.element.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.SourceVersion;
+import static javax.lang.model.SourceVersion.*;
+
+
+/**
+ * A scanning visitor of program elements with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9}
+ * source version.  The <tt>visit<i>XYZ</i></tt> methods in this
+ * class scan their component elements by calling {@code scan} on
+ * their {@linkplain Element#getEnclosedElements enclosed elements},
+ * {@linkplain ExecutableElement#getParameters parameters}, etc., as
+ * indicated in the individual method specifications.  A subclass can
+ * control the order elements are visited by overriding the
+ * <tt>visit<i>XYZ</i></tt> methods.  Note that clients of a scanner
+ * may get the desired behavior be invoking {@code v.scan(e, p)} rather
+ * than {@code v.visit(e, p)} on the root objects of interest.
+ *
+ * <p>When a subclass overrides a <tt>visit<i>XYZ</i></tt> method, the
+ * new method can cause the enclosed elements to be scanned in the
+ * default way by calling <tt>super.visit<i>XYZ</i></tt>.  In this
+ * fashion, the concrete visitor can control the ordering of traversal
+ * over the component elements with respect to the additional
+ * processing; for example, consistently calling
+ * <tt>super.visit<i>XYZ</i></tt> at the start of the overridden
+ * methods will yield a preorder traversal, etc.  If the component
+ * elements should be traversed in some other order, instead of
+ * calling <tt>super.visit<i>XYZ</i></tt>, an overriding visit method
+ * should call {@code scan} with the elements in the desired order.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new element scanner visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question.  When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see ElementScanner6
+ * @see ElementScanner7
+ * @see ElementScanner8
+ * @since 1.9
+ */
+@SupportedSourceVersion(RELEASE_9)
+public class ElementScanner9<R, P> extends ElementScanner8<R, P> {
+    /**
+     * Constructor for concrete subclasses; uses {@code null} for the
+     * default value.
+     */
+    protected ElementScanner9(){
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses; uses the argument for the
+     * default value.
+     *
+     * @param defaultValue the default value
+     */
+    protected ElementScanner9(R defaultValue){
+        super(defaultValue);
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor6.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor6.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -81,8 +81,12 @@
  *
  * @see SimpleAnnotationValueVisitor7
  * @see SimpleAnnotationValueVisitor8
+ * @see SimpleAnnotationValueVisitor9
  * @since 1.6
+ * @deprecated Release 6 is obsolete; update to a visitor for a newer
+ * release level.
  */
+@Deprecated
 @SupportedSourceVersion(RELEASE_6)
 public class SimpleAnnotationValueVisitor6<R, P>
     extends AbstractAnnotationValueVisitor6<R, P> {
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor7.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor7.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -72,8 +72,10 @@
  *
  * @see SimpleAnnotationValueVisitor6
  * @see SimpleAnnotationValueVisitor8
+ * @see SimpleAnnotationValueVisitor9
  * @since 1.7
  */
+@SuppressWarnings("deprecation") // Superclass deprecated
 @SupportedSourceVersion(RELEASE_7)
 public class SimpleAnnotationValueVisitor7<R, P> extends SimpleAnnotationValueVisitor6<R, P> {
     /**
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor8.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor8.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -72,6 +72,7 @@
  *
  * @see SimpleAnnotationValueVisitor6
  * @see SimpleAnnotationValueVisitor7
+ * @see SimpleAnnotationValueVisitor8
  * @since 1.8
  */
 @SupportedSourceVersion(RELEASE_8)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor9.java	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.SourceVersion;
+import static javax.lang.model.SourceVersion.*;
+
+/**
+ * A simple visitor for annotation values with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9}
+ * source version.  Visit methods call {@link #defaultAction
+ * defaultAction} passing their arguments to {@code defaultAction}'s
+ * corresponding parameters.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code AnnotationValueVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new simple annotation
+ * value visitor class will also be introduced to correspond to the
+ * new language level; this visitor will have different default
+ * behavior for the visit method in question.  When the new visitor is
+ * introduced, all or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods
+ * @param <P> the type of the additional parameter to this visitor's methods.
+ *
+ * @see SimpleAnnotationValueVisitor6
+ * @see SimpleAnnotationValueVisitor7
+ * @see SimpleAnnotationValueVisitor8
+ * @since 1.9
+ */
+@SupportedSourceVersion(RELEASE_9)
+public class SimpleAnnotationValueVisitor9<R, P> extends SimpleAnnotationValueVisitor8<R, P> {
+    /**
+     * Constructor for concrete subclasses; uses {@code null} for the
+     * default value.
+     */
+    protected SimpleAnnotationValueVisitor9() {
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses; uses the argument for the
+     * default value.
+     *
+     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+     */
+    protected SimpleAnnotationValueVisitor9(R defaultValue) {
+        super(defaultValue);
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor6.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor6.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -85,8 +85,12 @@
  *
  * @see SimpleElementVisitor7
  * @see SimpleElementVisitor8
+ * @see SimpleElementVisitor9
  * @since 1.6
+ * @deprecated Release 6 is obsolete; update to a visitor for a newer
+ * release level.
  */
+@Deprecated
 @SupportedSourceVersion(RELEASE_6)
 public class SimpleElementVisitor6<R, P> extends AbstractElementVisitor6<R, P> {
     /**
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor7.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor7.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -78,8 +78,10 @@
  *
  * @see SimpleElementVisitor6
  * @see SimpleElementVisitor8
+ * @see SimpleElementVisitor9
  * @since 1.7
  */
+@SuppressWarnings("deprecation") // Superclass deprecated
 @SupportedSourceVersion(RELEASE_7)
 public class SimpleElementVisitor7<R, P> extends SimpleElementVisitor6<R, P> {
     /**
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor8.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor8.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,7 +34,7 @@
  * appropriate for the {@link SourceVersion#RELEASE_8 RELEASE_8}
  * source version.
  *
- * Visit methods corresponding to {@code RELEASE_7} and earlier
+ * Visit methods corresponding to {@code RELEASE_8} and earlier
  * language constructs call {@link #defaultAction defaultAction},
  * passing their arguments to {@code defaultAction}'s corresponding
  * parameters.
@@ -77,6 +77,7 @@
  *
  * @see SimpleElementVisitor6
  * @see SimpleElementVisitor7
+ * @see SimpleElementVisitor9
  * @since 1.8
  */
 @SupportedSourceVersion(RELEASE_8)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor9.java	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.SourceVersion;
+import static javax.lang.model.SourceVersion.*;
+
+/**
+ * A simple visitor of program elements with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_9 RELEASE_9}
+ * source version.
+ *
+ * Visit methods corresponding to {@code RELEASE_9} and earlier
+ * language constructs call {@link #defaultAction defaultAction},
+ * passing their arguments to {@code defaultAction}'s corresponding
+ * parameters.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new simple element visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question.  When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@code Void}
+ *             for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's methods.  Use {@code Void}
+ *              for visitors that do not need an additional parameter.
+ *
+ * @see SimpleElementVisitor6
+ * @see SimpleElementVisitor7
+ * @see SimpleElementVisitor8
+ * @since 1.9
+ */
+@SupportedSourceVersion(RELEASE_9)
+public class SimpleElementVisitor9<R, P> extends SimpleElementVisitor8<R, P> {
+    /**
+     * Constructor for concrete subclasses; uses {@code null} for the
+     * default value.
+     */
+    protected SimpleElementVisitor9(){
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses; uses the argument for the
+     * default value.
+     *
+     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+     */
+    protected SimpleElementVisitor9(R defaultValue){
+        super(defaultValue);
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor6.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor6.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -85,8 +85,12 @@
  *
  * @see SimpleTypeVisitor7
  * @see SimpleTypeVisitor8
+ * @see SimpleTypeVisitor9
  * @since 1.6
+ * @deprecated Release 6 is obsolete; update to a visitor for a newer
+ * release level.
  */
+@Deprecated
 @SupportedSourceVersion(RELEASE_6)
 public class SimpleTypeVisitor6<R, P> extends AbstractTypeVisitor6<R, P> {
     /**
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor7.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor7.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -78,8 +78,10 @@
  *
  * @see SimpleTypeVisitor6
  * @see SimpleTypeVisitor8
+ * @see SimpleTypeVisitor9
  * @since 1.7
  */
+@SuppressWarnings("deprecation") // Superclass deprecated
 @SupportedSourceVersion(RELEASE_7)
 public class SimpleTypeVisitor7<R, P> extends SimpleTypeVisitor6<R, P> {
     /**
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor8.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor8.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,7 +32,7 @@
 
 /**
  * A simple visitor of types with default behavior appropriate for the
- * {@link SourceVersion#RELEASE_7 RELEASE_7} source version.
+ * {@link SourceVersion#RELEASE_8 RELEASE_8} source version.
  *
  * Visit methods corresponding to {@code RELEASE_8} and earlier
  * language constructs call {@link #defaultAction defaultAction},
@@ -78,6 +78,7 @@
  *
  * @see SimpleTypeVisitor6
  * @see SimpleTypeVisitor7
+ * @see SimpleTypeVisitor9
  * @since 1.8
  */
 @SupportedSourceVersion(RELEASE_8)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor9.java	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.SourceVersion;
+import javax.lang.model.type.IntersectionType;
+import static javax.lang.model.SourceVersion.*;
+
+/**
+ * A simple visitor of types with default behavior appropriate for the
+ * {@link SourceVersion#RELEASE_9 RELEASE_9} source version.
+ *
+ * Visit methods corresponding to {@code RELEASE_9} and earlier
+ * language constructs call {@link #defaultAction defaultAction},
+ * passing their arguments to {@code defaultAction}'s corresponding
+ * parameters.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code TypeVisitor} interface implemented
+ * by this class may have methods added to it in the future to
+ * accommodate new, currently unknown, language structures added to
+ * future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new simple type visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question.  When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see SimpleTypeVisitor6
+ * @see SimpleTypeVisitor7
+ * @since 1.8
+ */
+@SupportedSourceVersion(RELEASE_9)
+public class SimpleTypeVisitor9<R, P> extends SimpleTypeVisitor8<R, P> {
+    /**
+     * Constructor for concrete subclasses; uses {@code null} for the
+     * default value.
+     */
+    protected SimpleTypeVisitor9(){
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses; uses the argument for the
+     * default value.
+     *
+     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+     */
+    protected SimpleTypeVisitor9(R defaultValue){
+        super(defaultValue);
+    }
+}
--- a/langtools/src/share/classes/javax/lang/model/util/TypeKindVisitor6.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/TypeKindVisitor6.java	Tue Aug 05 12:14:11 2014 -0700
@@ -85,7 +85,10 @@
  * @see TypeKindVisitor7
  * @see TypeKindVisitor8
  * @since 1.6
+ * @deprecated Release 6 is obsolete; update to a visitor for a newer
+ * release level.
  */
+@Deprecated
 @SupportedSourceVersion(RELEASE_6)
 public class TypeKindVisitor6<R, P> extends SimpleTypeVisitor6<R, P> {
     /**
--- a/langtools/src/share/classes/javax/lang/model/util/TypeKindVisitor7.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/classes/javax/lang/model/util/TypeKindVisitor7.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -82,6 +82,7 @@
  * @see TypeKindVisitor8
  * @since 1.7
  */
+@SuppressWarnings("deprecation") // Superclass deprecated
 @SupportedSourceVersion(RELEASE_7)
 public class TypeKindVisitor7<R, P> extends TypeKindVisitor6<R, P> {
     /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/javax/lang/model/util/TypeKindVisitor9.java	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javax.lang.model.util;
+
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.SourceVersion;
+import javax.lang.model.type.*;
+import static javax.lang.model.SourceVersion.*;
+
+/**
+ * A visitor of types based on their {@linkplain TypeKind kind} with
+ * default behavior appropriate for the {@link SourceVersion#RELEASE_9
+ * RELEASE_9} source version.  For {@linkplain
+ * TypeMirror types} <tt><i>XYZ</i></tt> that may have more than one
+ * kind, the <tt>visit<i>XYZ</i></tt> methods in this class delegate
+ * to the <tt>visit<i>XYZKind</i></tt> method corresponding to the
+ * first argument's kind.  The <tt>visit<i>XYZKind</i></tt> methods
+ * call {@link #defaultAction defaultAction}, passing their arguments
+ * to {@code defaultAction}'s corresponding parameters.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code TypeVisitor} interface implemented
+ * by this class may have methods added to it in the future to
+ * accommodate new, currently unknown, language structures added to
+ * future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new type kind visitor class
+ * will also be introduced to correspond to the new language level;
+ * this visitor will have different default behavior for the visit
+ * method in question.  When the new visitor is introduced, all or
+ * portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see TypeKindVisitor6
+ * @see TypeKindVisitor7
+ * @see TypeKindVisitor8
+ * @since 1.9
+ */
+@SupportedSourceVersion(RELEASE_9)
+public class TypeKindVisitor9<R, P> extends TypeKindVisitor8<R, P> {
+    /**
+     * Constructor for concrete subclasses to call; uses {@code null}
+     * for the default value.
+     */
+    protected TypeKindVisitor9() {
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses to call; uses the argument
+     * for the default value.
+     *
+     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+     */
+    protected TypeKindVisitor9(R defaultValue) {
+        super(defaultValue);
+    }
+}
--- a/langtools/src/share/sample/javac/processing/src/CheckNamesProcessor.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/sample/javac/processing/src/CheckNamesProcessor.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -138,7 +138,7 @@
     public SourceVersion getSupportedSourceVersion() {
         /*
          * Return latest source version instead of a fixed version
-         * like RELEASE_8.  To return a fixed version, this class
+         * like RELEASE_9.  To return a fixed version, this class
          * could be annotated with a SupportedSourceVersion
          * annotation.
          *
@@ -192,7 +192,7 @@
         /**
          * Visitor to implement name checks.
          */
-        private class NameCheckScanner extends ElementScanner8<Void, Void> {
+        private class NameCheckScanner extends ElementScanner9<Void, Void> {
             // The visitor could be enhanced to return true/false if
             // there were warnings reported or a count of the number
             // of warnings.  This could be facilitated by using
--- a/langtools/src/share/sample/language/model/CoreReflectionFactory.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/src/share/sample/language/model/CoreReflectionFactory.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -39,7 +39,7 @@
 import java.io.Writer;
 import java.util.*;
 
-import static javax.lang.model.SourceVersion.RELEASE_8;
+import static javax.lang.model.SourceVersion.RELEASE_9;
 import static java.util.Objects.*;
 
 /**
@@ -487,10 +487,10 @@
     /**
      * Base class for concrete visitors of elements backed by core reflection.
      */
-    public static abstract class AbstractReflectionElementVisitor8<R, P>
-        extends AbstractElementVisitor8<R, P>
+    public static abstract class AbstractReflectionElementVisitor9<R, P>
+        extends AbstractElementVisitor9<R, P>
         implements ReflectionElementVisitor<R, P> {
-        protected AbstractReflectionElementVisitor8() {
+        protected AbstractReflectionElementVisitor9() {
             super();
         }
     }
@@ -498,16 +498,16 @@
     /**
      * Base class for simple visitors of elements that are backed by core reflection.
      */
-    @SupportedSourceVersion(value=RELEASE_8)
-    public static abstract class SimpleReflectionElementVisitor8<R, P>
-        extends SimpleElementVisitor8<R, P>
+    @SupportedSourceVersion(value=RELEASE_9)
+    public static abstract class SimpleReflectionElementVisitor9<R, P>
+        extends SimpleElementVisitor9<R, P>
         implements ReflectionElementVisitor<R, P> {
 
-        protected SimpleReflectionElementVisitor8(){
+        protected SimpleReflectionElementVisitor9(){
             super();
         }
 
-        protected SimpleReflectionElementVisitor8(R defaultValue) {
+        protected SimpleReflectionElementVisitor9(R defaultValue) {
             super(defaultValue);
         }
 
@@ -2527,7 +2527,7 @@
                 Constructor<?> printProcCtor = printProcClass.getConstructor(Writer.class, Elements.class);
                 return (ElementVisitor) printProcCtor.newInstance(w, getElements());
             } catch (ReflectiveOperationException | SecurityException e) {
-                return new ElementScanner8<Writer, Void>(w){
+                return new ElementScanner9<Writer, Void>(w){
                     @Override
                     public Writer scan(Element e, Void v) {
                         try {
--- a/langtools/test/com/sun/javadoc/DocRootSlash/overview.html	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/com/sun/javadoc/DocRootSlash/overview.html	Tue Aug 05 12:14:11 2014 -0700
@@ -58,7 +58,6 @@
 <p>
 Sub-test 33 Actual: <A HREF="{@docRoot}../docs1/p2/package-summary.html#package_description">{&#064;docRoot}/../docs1/p2/package-summary.html#package_description</A> <br>
 Sub-test 33 Expect: <A HREF=".../docs1/p2/package-summary.html#package_description">./../docs1/p2/package-summary.html#package_description</A>
-<p>
 
 </BODY>
 </HTML>
--- a/langtools/test/com/sun/javadoc/DocRootSlash/p1/package.html	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/com/sun/javadoc/DocRootSlash/p1/package.html	Tue Aug 05 12:14:11 2014 -0700
@@ -59,7 +59,6 @@
 
 Sub-test 22 Actual: <A HREF="{@docRoot}../docs1/p2/package-summary.html#package_description">{&#064;docRoot}/../docs1/p2/package-summary.html#package_description</A> <br>
 Sub-test 22 Expect: <A HREF="..../docs1/p2/package-summary.html#package_description">../../docs1/p2/package-summary.html#package_description</A>
-<p>
 
 </BODY>
 </HTML>
--- a/langtools/test/tools/javac/6402516/CheckLocalElements.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/6402516/CheckLocalElements.java	Tue Aug 05 12:14:11 2014 -0700
@@ -110,7 +110,7 @@
         return encl == null ? "" : encl.accept(qualNameVisitor, null);
     }
 
-    private ElementVisitor<String,Void> qualNameVisitor = new SimpleElementVisitor8<String,Void>() {
+    private ElementVisitor<String,Void> qualNameVisitor = new SimpleElementVisitor9<String,Void>() {
         protected String defaultAction(Element e, Void ignore) {
             return "";
         }
--- a/langtools/test/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTestBase.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/classfiles/attributes/LocalVariableTable/LocalVariableTestBase.java	Tue Aug 05 12:14:11 2014 -0700
@@ -129,7 +129,7 @@
         }
     }
 
-    private void checkNamesAndTypes(List<LocalVariableTableTest.LocalVariableTable.Entry> entries,
+    private void checkNamesAndTypes(List<VariableTable.Entry> entries,
                                     Map<String, String> expectedLocals2Types) {
         Map<String, List<String>> actualNames2Types = entries.stream()
                 .collect(
@@ -163,7 +163,7 @@
 
     }
 
-    private void checkDoubleAndLongIndexes(Collection<LocalVariableTableTest.LocalVariableTable.Entry> entries,
+    private void checkDoubleAndLongIndexes(Collection<VariableTable.Entry> entries,
                                            Map<String, Integer> scopes, int maxLocals) {
         //check every scope separately
         Map<Object, List<VariableTable.Entry>> entriesByScope = groupByScope(entries, scopes);
@@ -185,7 +185,7 @@
     }
 
     private Map<Object, List<VariableTable.Entry>> groupByScope(
-            Collection<LocalVariableTableTest.LocalVariableTable.Entry> entries, Map<String, Integer> scopes) {
+            Collection<VariableTable.Entry> entries, Map<String, Integer> scopes) {
         return entries.stream().collect(groupingBy(e -> scopes.getOrDefault(e.name() + "&" + e.type(), DEFAULT_SCOPE)));
     }
 
@@ -203,7 +203,7 @@
 
         int localVariableTableLength();
 
-        List<LocalVariableTableTest.VariableTable.Entry> entries();
+        List<VariableTable.Entry> entries();
 
         int attributeLength();
 
--- a/langtools/test/tools/javac/generics/5086027/T5086027.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/5086027/T5086027.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     5086027
  * @summary Inner class of generic class cannot extend Throwable
  * @author  Peter von der Ah\u00e9
- * @compile/fail T5086027.java
+ * @compile/fail/ref=T5086027.out -XDrawDiagnostics  T5086027.java
  */
 
 public class T5086027<T> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/5086027/T5086027.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+T5086027.java:10:21: compiler.err.generic.throwable
+1 error
--- a/langtools/test/tools/javac/generics/6227936/Orig.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/6227936/Orig.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     6227936
  * @summary Wrong type of inherited method using specialized type parameter
- * @compile/fail Orig.java
+ * @compile/fail/ref=Orig.out -XDrawDiagnostics  Orig.java
  */
 
 class GenericTest {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/6227936/Orig.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+Orig.java:27:26: compiler.err.cant.resolve.location.args: kindname.method, someMethod, , , (compiler.misc.location: kindname.class, GenericTest.C, null)
+1 error
--- a/langtools/test/tools/javac/generics/6245699/T6245699b.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/6245699/T6245699b.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     6270396 6245699
  * @summary Missing bridge for final method (gives AbstractMethodError at runtime)
- * @compile/fail T6245699b.java
+ * @compile/fail/ref=T6245699b.out -XDrawDiagnostics  T6245699b.java
  */
 
 public class T6245699b {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/6245699/T6245699b.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+T6245699b.java:23:23: compiler.err.override.meth: (compiler.misc.cant.override: doIt(), T6245699b.Bar, doIt(), T6245699b.Foo), final
+1 error
--- a/langtools/test/tools/javac/generics/6294779/T6294779c.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/6294779/T6294779c.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     6294779
  * @summary Problem with interface inheritance and covariant return types
  * @author  Maurizio Cimadamore
- * @compile/fail T6294779c.java
+ * @compile/fail/ref=T6294779c.out -XDrawDiagnostics  T6294779c.java
  */
 
 public class T6294779c<X> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/6294779/T6294779c.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+T6294779c.java:29:5: compiler.err.types.incompatible.diff.ret: T6294779c.I2, T6294779c.I1, get()
+1 error
--- a/langtools/test/tools/javac/generics/6413682/T6413682.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/6413682/T6413682.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     6413682
  * @summary Compiler confused about implicit type args and arrays
- * @compile/fail T6413682.java
+ * @compile/fail/ref=T6413682.out -XDrawDiagnostics  T6413682.java
  */
 
 public class T6413682 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/6413682/T6413682.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+T6413682.java:11:2: compiler.err.cannot.create.array.with.type.arguments
+1 error
--- a/langtools/test/tools/javac/generics/6495506/T6495506.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/6495506/T6495506.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     6495506
  * @summary Cast inserted by generics can cause IllegalAccessError
  * @compile A.java
- * @compile/fail T6495506.java
+ * @compile/fail/ref=T6495506.out -XDrawDiagnostics  T6495506.java
  */
 
 public class T6495506 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/6495506/T6495506.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+T6495506.java:12:28: compiler.err.report.access: a.A.P, private, a.A
+1 error
--- a/langtools/test/tools/javac/generics/CatchTyparam.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/CatchTyparam.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,33 +1,10 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
  * @bug 5057445
  * @summary javac allows catching type parameter
  * @author gafter
  *
- * @compile/fail CatchTyparam.java
+ * @compile/fail/ref=CatchTyparam.out -XDrawDiagnostics  CatchTyparam.java
  */
 
 class J {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/CatchTyparam.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,3 @@
+CatchTyparam.java:14:18: compiler.err.type.found.req: (compiler.misc.type.parameter: T), (compiler.misc.type.req.class)
+CatchTyparam.java:15:18: compiler.err.type.found.req: (compiler.misc.type.parameter: U), (compiler.misc.type.req.class)
+2 errors
--- a/langtools/test/tools/javac/generics/inference/4941882/T4941882.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/inference/4941882/T4941882.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     4941882
  * @summary incorrect inference for result of lub(int[], float[])
- * @compile/fail T4941882.java
+ * @compile/fail/ref=T4941882.out -XDrawDiagnostics  T4941882.java
  */
 
 public class T4941882 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/inference/4941882/T4941882.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+T4941882.java:13:17: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Object&java.io.Serializable&java.lang.Cloneable, java.lang.Object[],java.lang.Object)
+1 error
--- a/langtools/test/tools/javac/generics/inference/4972073/T4972073.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/inference/4972073/T4972073.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     4972073
  * @summary same interface allowed twice in compound type
- * @compile/fail T4972073.java
+ * @compile/fail/ref=T4972073.out -XDrawDiagnostics  T4972073.java
  */
 
 public class T4972073 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/inference/4972073/T4972073.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,3 @@
+T4972073.java:18:80: compiler.err.repeated.interface
+T4972073.java:24:68: compiler.err.repeated.interface
+2 errors
--- a/langtools/test/tools/javac/generics/inference/4972073/T4972073a.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/inference/4972073/T4972073a.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     4972073
  * @summary same interface allowed twice in compound type
- * @compile/fail T4972073a.java
+ * @compile/fail/ref=T4972073a.out -XDrawDiagnostics  T4972073a.java
  */
 
 public class T4972073a {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/inference/4972073/T4972073a.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+T4972073a.java:18:80: compiler.err.repeated.interface
+1 error
--- a/langtools/test/tools/javac/generics/inference/4972073/T4972073b.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/inference/4972073/T4972073b.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     4972073
  * @summary same interface allowed twice in compound type
- * @compile/fail T4972073b.java
+ * @compile/fail/ref=T4972073b.out -XDrawDiagnostics  T4972073b.java
  */
 
 public class T4972073b {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/inference/4972073/T4972073b.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+T4972073b.java:18:68: compiler.err.repeated.interface
+1 error
--- a/langtools/test/tools/javac/generics/inference/5081782/Neg.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/inference/5081782/Neg.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     5081782
  * @summary type arguments to non-generic methods
  * @author  Peter von der Ah\u00e9
- * @compile/fail Neg.java
+ * @compile/fail/ref=Neg.out -XDrawDiagnostics  Neg.java
  */
 
 public class Neg {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/inference/5081782/Neg.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,8 @@
+Neg.java:12:14: compiler.err.cant.resolve.location: kindname.class, Can, , , (compiler.misc.location: kindname.class, Neg, null)
+Neg.java:12:18: compiler.err.cant.resolve.location: kindname.class, I, , , (compiler.misc.location: kindname.class, Neg, null)
+Neg.java:12:20: compiler.err.cant.resolve.location: kindname.class, write, , , (compiler.misc.location: kindname.class, Neg, null)
+Neg.java:12:26: compiler.err.cant.resolve.location: kindname.class, a, , , (compiler.misc.location: kindname.class, Neg, null)
+Neg.java:12:28: compiler.err.cant.resolve.location: kindname.class, little, , , (compiler.misc.location: kindname.class, Neg, null)
+Neg.java:12:35: compiler.err.cant.resolve.location: kindname.class, story, , , (compiler.misc.location: kindname.class, Neg, null)
+Neg.java:12:41: compiler.err.cant.resolve.location: kindname.class, here, , , (compiler.misc.location: kindname.class, Neg, null)
+7 errors
--- a/langtools/test/tools/javac/generics/rawOverride/Fail1.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/rawOverride/Fail1.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,34 +1,11 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
+ * @test /nodynamiccopyright/
  * @bug 5073079
  * @summary Allow unchecked override of generified methods in
  * parameterless classes
  * @author Peter von der Ah\u00e9
  *
- * @compile/fail Fail1.java
+ * @compile/fail/ref=Fail1.out -XDrawDiagnostics  Fail1.java
  */
 
 interface MyList<T> {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/rawOverride/Fail1.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+Fail1.java:21:1: compiler.err.does.not.override.abstract: C, f(MyList), A
+1 error
--- a/langtools/test/tools/javac/generics/syntax/6318240/BarNeg1.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/syntax/6318240/BarNeg1.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     6318240
  * @summary Creation of array of inner class of an enclosing wildcard type doesn't work
- * @compile/fail BarNeg1.java
+ * @compile/fail/ref=BarNeg1.out -XDrawDiagnostics  BarNeg1.java
  */
 
 class BarNeg1<T> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/syntax/6318240/BarNeg1.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+BarNeg1.java:9:45: compiler.err.generic.array.creation
+1 error
--- a/langtools/test/tools/javac/generics/syntax/6318240/BarNeg1a.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/syntax/6318240/BarNeg1a.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     6318240
  * @summary Creation of array of inner class of an enclosing wildcard type doesn't work
- * @compile/fail BarNeg1a.java
+ * @compile/fail/ref=BarNeg1a.out -XDrawDiagnostics  BarNeg1a.java
  */
 
 class BarNeg1a<T> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/syntax/6318240/BarNeg1a.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+BarNeg1a.java:9:36: compiler.err.cant.select.static.class.from.param.type
+1 error
--- a/langtools/test/tools/javac/generics/syntax/6318240/BarNeg2.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/syntax/6318240/BarNeg2.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     6318240
  * @summary Creation of array of inner class of an enclosing wildcard type doesn't work
- * @compile/fail BarNeg2.java
+ * @compile/fail/ref=BarNeg2.out -XDrawDiagnostics  BarNeg2.java
  */
 
 class BarNeg2<T> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/syntax/6318240/BarNeg2.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+BarNeg2.java:9:45: compiler.err.generic.array.creation
+1 error
--- a/langtools/test/tools/javac/generics/syntax/6318240/BarNeg2a.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/syntax/6318240/BarNeg2a.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     6318240
  * @summary Creation of array of inner class of an enclosing wildcard type doesn't work
- * @compile/fail BarNeg2a.java
+ * @compile/fail/ref=BarNeg2a.out -XDrawDiagnostics  BarNeg2a.java
  */
 
 class BarNeg2a<T> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/syntax/6318240/BarNeg2a.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+BarNeg2a.java:9:60: compiler.err.cant.select.static.class.from.param.type
+1 error
--- a/langtools/test/tools/javac/generics/typevars/5060485/Neg1.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/typevars/5060485/Neg1.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     5060485
  * @summary The scope of a class type parameter is too wide
  * @author  Peter von der Ah\u00e9
- * @compile/fail Neg1.java
+ * @compile/fail/ref=Neg1.out -XDrawDiagnostics  Neg1.java
  */
 
 public class Neg1<X extends Y> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/typevars/5060485/Neg1.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+Neg1.java:9:29: compiler.err.cant.resolve: kindname.class, Y, , 
+1 error
--- a/langtools/test/tools/javac/generics/typevars/5060485/Neg2.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/typevars/5060485/Neg2.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     5060485
  * @summary The scope of a class type parameter is too wide
  * @author  Peter von der Ah\u00e9
- * @compile/fail Neg2.java
+ * @compile/fail/ref=Neg2.out -XDrawDiagnostics  Neg2.java
  */
 
 public class Neg2<X extends X> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/typevars/5060485/Neg2.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+Neg2.java:9:19: compiler.err.cyclic.inheritance: X
+1 error
--- a/langtools/test/tools/javac/generics/typevars/5061359/T5061359.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/typevars/5061359/T5061359.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     5061359
  * @summary No error for ambiguous member of intersection
- * @compile/fail T5061359.java
+ * @compile/fail/ref=T5061359.out -XDrawDiagnostics  T5061359.java
  */
 
 class Test<T extends Base & Intf> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/typevars/5061359/T5061359.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+T5061359.java:11:10: compiler.err.ref.ambiguous: Inner, kindname.class, Base.Inner, Base, kindname.class, Intf.Inner, Intf
+1 error
--- a/langtools/test/tools/javac/generics/typevars/5061359/T5061359a.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/typevars/5061359/T5061359a.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,36 +1,13 @@
 /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     5061359
  * @summary No error for ambiguous member of intersection
  * @clean   Base Intf
- * @compile/fail T5061359a.java
+ * @compile/fail/ref=T5061359a.out -XDrawDiagnostics  T5061359a.java
  * @clean   Base Intf T5061359a
- * @compile/fail Base.java Intf.java T5061359a.java
+ * @compile/fail/ref=T5061359a.out -XDrawDiagnostics  Base.java Intf.java T5061359a.java
  * @clean   Base Intf T5061359a
- * @compile/fail T5061359a.java Base.java Intf.java
+ * @compile/fail/ref=T5061359a.out -XDrawDiagnostics  T5061359a.java Base.java Intf.java
  */
 
 import java.util.*;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/typevars/5061359/T5061359a.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+T5061359a.java:16:30: compiler.err.override.incompatible.ret: (compiler.misc.cant.implement: m1(), Base, m1(), Intf), int, void
+1 error
--- a/langtools/test/tools/javac/generics/typevars/6199146/T6199146.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/typevars/6199146/T6199146.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     6199146
  * @summary Javac accepts ambiguous compound type
- * @compile/fail T6199146.java
+ * @compile/fail/ref=T6199146.out -XDrawDiagnostics  T6199146.java
  */
 
 public class T6199146 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/typevars/6199146/T6199146.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+T6199146.java:9:25: compiler.err.types.incompatible.diff.ret: T6199146.I2, T6199146.I1, getFoo()
+1 error
--- a/langtools/test/tools/javac/generics/typevars/6486430/T6486430.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/typevars/6486430/T6486430.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     6486430
  * @summary Compiler fails to reject access to static member in parameterized type
  * @author  Peter von der Ah\u00e9
- * @compile/fail T6486430.java
+ * @compile/fail/ref=T6486430.out -XDrawDiagnostics  T6486430.java
  */
 
 class T6486430<T extends Number> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/typevars/6486430/T6486430.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+T6486430.java:10:16: compiler.err.cant.select.static.class.from.param.type
+1 error
--- a/langtools/test/tools/javac/generics/typevars/6486430/T6486430a.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/typevars/6486430/T6486430a.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     6486430
  * @summary Compiler fails to reject access to static member in parameterized type
  * @author  Peter von der Ah\u00e9
- * @compile/fail T6486430a.java
+ * @compile/fail/ref=T6486430a.out -XDrawDiagnostics  T6486430a.java
  */
 
 class T6486430a<T extends Number> {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/typevars/6486430/T6486430a.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+T6486430a.java:10:31: compiler.err.cant.select.static.class.from.param.type
+1 error
--- a/langtools/test/tools/javac/generics/wildcards/6762569/T6762569b.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/wildcards/6762569/T6762569b.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,31 +1,8 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test    /nodynamiccopyright/
  * @bug     6762569
  * @summary Javac crashes with AssertionError in Types.containedBy
- * @compile/fail T6762569b.java
+ * @compile/fail/ref=T6762569b.out -XDrawDiagnostics  T6762569b.java
  */
 import java.util.*;
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/wildcards/6762569/T6762569b.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+T6762569b.java:13:9: compiler.err.cant.apply.symbol: kindname.method, m, T,java.util.List<? super java.util.List<T>>, java.lang.String,java.util.List<compiler.misc.type.captureof: 1, ? super java.util.List<? extends java.lang.Number>>, kindname.class, T6762569b, (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.String, java.lang.Number,java.lang.Object)
+1 error
--- a/langtools/test/tools/javac/generics/wildcards/T6450290.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/generics/wildcards/T6450290.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,32 +1,9 @@
 /*
- * Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved.
- * 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
+ * @test /nodynamiccopyright/
  * @bug 6450290
  * @summary Capture of nested wildcards causes type error
  * @author Maurizio Cimadamore
- * @compile/fail T6450290.java
+ * @compile/fail/ref=T6450290.out -XDrawDiagnostics  T6450290.java
  */
 
 public class T6450290 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/generics/wildcards/T6450290.out	Tue Aug 05 12:14:11 2014 -0700
@@ -0,0 +1,2 @@
+T6450290.java:19:24: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: T6450290.Box<T6450290.B,T6450290.B>, T6450290.Box<compiler.misc.type.captureof: 1, ?,compiler.misc.type.captureof: 2, ?>)
+1 error
--- a/langtools/test/tools/javac/lib/JavacTestingAbstractProcessor.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/lib/JavacTestingAbstractProcessor.java	Tue Aug 05 12:14:11 2014 -0700
@@ -28,7 +28,7 @@
 import static javax.lang.model.SourceVersion.*;
 
 /**
- * An abstract annotation processor tailored to javac regression testing.
+ * An abstract annotation processor tailored to {@code javac} regression testing.
  */
 public abstract class JavacTestingAbstractProcessor extends AbstractProcessor {
     private static final Set<String> allAnnotations;
@@ -103,7 +103,7 @@
      */
 
     @SupportedSourceVersion(RELEASE_9)
-    public static abstract class AbstractAnnotationValueVisitor<R, P> extends AbstractAnnotationValueVisitor8<R, P> {
+    public static abstract class AbstractAnnotationValueVisitor<R, P> extends AbstractAnnotationValueVisitor9<R, P> {
 
         /**
          * Constructor for concrete subclasses to call.
@@ -114,7 +114,7 @@
     }
 
     @SupportedSourceVersion(RELEASE_9)
-    public static abstract class AbstractElementVisitor<R, P> extends AbstractElementVisitor8<R, P> {
+    public static abstract class AbstractElementVisitor<R, P> extends AbstractElementVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses to call.
          */
@@ -124,7 +124,7 @@
     }
 
     @SupportedSourceVersion(RELEASE_9)
-    public static abstract class AbstractTypeVisitor<R, P> extends AbstractTypeVisitor8<R, P> {
+    public static abstract class AbstractTypeVisitor<R, P> extends AbstractTypeVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses to call.
          */
@@ -134,7 +134,7 @@
     }
 
     @SupportedSourceVersion(RELEASE_9)
-    public static class ElementKindVisitor<R, P> extends ElementKindVisitor8<R, P> {
+    public static class ElementKindVisitor<R, P> extends ElementKindVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
          * default value.
@@ -155,7 +155,7 @@
     }
 
     @SupportedSourceVersion(RELEASE_9)
-    public static class ElementScanner<R, P> extends ElementScanner8<R, P> {
+    public static class ElementScanner<R, P> extends ElementScanner9<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
          * default value.
@@ -174,7 +174,7 @@
     }
 
     @SupportedSourceVersion(RELEASE_9)
-    public static class SimpleAnnotationValueVisitor<R, P> extends SimpleAnnotationValueVisitor8<R, P> {
+    public static class SimpleAnnotationValueVisitor<R, P> extends SimpleAnnotationValueVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
          * default value.
@@ -195,7 +195,7 @@
     }
 
     @SupportedSourceVersion(RELEASE_9)
-    public static class SimpleElementVisitor<R, P> extends SimpleElementVisitor8<R, P> {
+    public static class SimpleElementVisitor<R, P> extends SimpleElementVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
          * default value.
@@ -216,7 +216,7 @@
     }
 
     @SupportedSourceVersion(RELEASE_9)
-    public static class SimpleTypeVisitor<R, P> extends SimpleTypeVisitor8<R, P> {
+    public static class SimpleTypeVisitor<R, P> extends SimpleTypeVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses; uses {@code null} for the
          * default value.
@@ -237,7 +237,7 @@
     }
 
     @SupportedSourceVersion(RELEASE_9)
-    public static class TypeKindVisitor<R, P> extends TypeKindVisitor8<R, P> {
+    public static class TypeKindVisitor<R, P> extends TypeKindVisitor9<R, P> {
         /**
          * Constructor for concrete subclasses to call; uses {@code null}
          * for the default value.
--- a/langtools/test/tools/javac/multicatch/model/ModelChecker.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/multicatch/model/ModelChecker.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,7 +46,6 @@
 import javax.lang.model.type.UnionType;
 import javax.lang.model.type.UnknownTypeException;
 import javax.lang.model.util.SimpleTypeVisitor6;
-import javax.lang.model.util.SimpleTypeVisitor7;
 
 @SupportedAnnotationTypes("Check")
 public class ModelChecker extends JavacTestingAbstractProcessor {
--- a/langtools/test/tools/javac/processing/model/TestSymtabItems.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/processing/model/TestSymtabItems.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -110,7 +110,7 @@
 
     int errors;
 
-    class ElemPrinter extends ElementScanner8<Void, Void> {
+    class ElemPrinter extends ElementScanner9<Void, Void> {
         @Override
         public Void visitPackage(PackageElement e, Void p) {
             show("package", e);
@@ -201,7 +201,7 @@
         int indent;
     };
 
-    class TypePrinter extends SimpleTypeVisitor7<Void, Types> {
+    class TypePrinter extends SimpleTypeVisitor9<Void, Types> {
         @Override
         public Void defaultAction(TypeMirror m, Types types) {
             System.err.println(m.getKind() + " " + m + " " + types.asElement(m));
--- a/langtools/test/tools/javac/processing/model/element/TestTypeParameter.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/processing/model/element/TestTypeParameter.java	Tue Aug 05 12:14:11 2014 -0700
@@ -53,7 +53,7 @@
         return true;
     }
 
-    class Scanner extends ElementScanner7<Integer,Void> {
+    class Scanner extends ElementScanner<Integer, Void> {
         @Override
         public Integer visitExecutable(ExecutableElement e, Void p) {
             super.visitExecutable(e, p);
--- a/langtools/test/tools/javac/processing/model/type/InheritedAP.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/processing/model/type/InheritedAP.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8024513
  * @library /tools/javac/lib
- * @build InheritedAP
+ * @build JavacTestingAbstractProcessor InheritedAP
  * @compile -cp . -processor InheritedAP -proc:only InheritedAP.java
  * @summary NPE in annotation processing
  */
@@ -40,8 +40,7 @@
 import static javax.lang.model.util.ElementFilter.*;
 
 @SupportedAnnotationTypes("testclass")
-@SupportedSourceVersion(RELEASE_8)
-public class InheritedAP extends AbstractProcessor {
+public class InheritedAP extends JavacTestingAbstractProcessor {
     static Types types;
     public void init(ProcessingEnvironment penv) {super.init(penv);}
     public static Types getTypes() { return types; }
@@ -54,14 +53,14 @@
         types=processingEnv.getTypeUtils();
         for (TypeElement typeElem: typesIn(renv.getRootElements())) {
             if (typeElem.getAnnotation(testclass.class) != null) {
-                new ElementScanner( new SimpleTypeMirrorVisitor()).scan(typeElem, null);
+                new LocalElementScanner( new SimpleTypeMirrorVisitor()).scan(typeElem, null);
             }
         }
         return true ;
     }
 }
 
-class SimpleTypeMirrorVisitor extends SimpleTypeVisitor6 <Void, Void> {
+class SimpleTypeMirrorVisitor extends JavacTestingAbstractProcessor.SimpleTypeVisitor<Void, Void> {
     protected Void defaultAction(TypeMirror mirror, Void p ) {
         try {
             System.out.println( "InheritedAP.getTypes().directSupertypes( "+mirror.toString()+" );" );
@@ -72,11 +71,11 @@
     }
 }
 
-class ElementScanner <T extends SimpleTypeVisitor6<Void, Void> >
-                    extends ElementScanner6<Void, Void> {
-    SimpleTypeVisitor6<Void, Void> typeVisitor;
+class LocalElementScanner <T extends JavacTestingAbstractProcessor.SimpleTypeVisitor<Void, Void> >
+                    extends JavacTestingAbstractProcessor.ElementScanner<Void, Void> {
+    JavacTestingAbstractProcessor.SimpleTypeVisitor<Void, Void> typeVisitor;
 
-    public ElementScanner(T typeVisitor) { this.typeVisitor=typeVisitor;}
+    public LocalElementScanner(T typeVisitor) { this.typeVisitor=typeVisitor;}
 
     @Override
     public Void scan(Element e, Void p) {
@@ -86,7 +85,6 @@
         }
         return p;
     }
-
 }
 
 
--- a/langtools/test/tools/javac/processing/model/util/elements/doccomments/TestDocComments.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/processing/model/util/elements/doccomments/TestDocComments.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,9 @@
  * @test
  * @bug 6877202 6986246
  * @summary Elements.getDocComment() is not getting JavaDocComments
+ * @library /tools/javac/lib
+ * @build JavacTestingAbstractProcessor TestDocComments
+ * @run main TestDocComments
  */
 
 import com.sun.source.tree.*;
@@ -49,8 +52,7 @@
  */
 
 @SupportedOptions("scan")
-@SupportedAnnotationTypes("*")
-public class TestDocComments extends AbstractProcessor {
+public class TestDocComments extends JavacTestingAbstractProcessor {
     enum CompileKind { API, CMD };
     enum ScanKind { TREE, ELEMENT };
 
@@ -72,7 +74,7 @@
     }
 
     static void test(CompileKind ck, ScanKind sk) throws IOException {
-        String testClasses = System.getProperty("test.classes");
+        String testClasses = System.getProperty("test.class.path");
         String testSrc = System.getProperty("test.src");
         File testDir = new File("test." + ck + "." + sk);
         testDir.mkdirs();
@@ -136,26 +138,15 @@
     // ----- Annotation processor: scan for elements and check doc comments ----
 
     Map<String,String> options;
-    Filer filer;
-    Messager messager;
-    Elements elements;
     Trees trees;
     ScanKind skind;
 
     int round = 0;
 
     @Override
-    public SourceVersion getSupportedSourceVersion() {
-        return SourceVersion.latest();
-    }
-
-    @Override
     public void init(ProcessingEnvironment pEnv) {
         super.init(pEnv);
         options = pEnv.getOptions();
-        filer = pEnv.getFiler();
-        messager = pEnv.getMessager();
-        elements = pEnv.getElementUtils();
         trees = Trees.instance(processingEnv);
         skind = ScanKind.valueOf(options.get("scan"));
     }
@@ -271,7 +262,7 @@
 
     // ----- Scanners to find elements -----------------------------------------
 
-    class TestElementScanner extends ElementScanner7<Void, Void> {
+    class TestElementScanner extends ElementScanner<Void, Void> {
         @Override
         public Void visitExecutable(ExecutableElement e, Void _) {
             check(e);
@@ -306,5 +297,4 @@
             return super.visitVariable(tree, trees);
         }
     }
-
 }
--- a/langtools/test/tools/javac/processing/model/util/elements/doccomments/TestPackageInfoComments.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/processing/model/util/elements/doccomments/TestPackageInfoComments.java	Tue Aug 05 12:14:11 2014 -0700
@@ -25,8 +25,10 @@
  * @test
  * @bug 8042345
  * @summary getDocComment() fails for doc comments on PackageElement found in package-info.java
+ * @library /tools/javac/lib
+ * @build JavacTestingAbstractProcessor TestPackageInfoComments
+ * @run main TestPackageInfoComments
  */
-
 import com.sun.source.util.JavacTask;
 
 import java.io.*;
@@ -37,14 +39,13 @@
 import javax.lang.model.util.*;
 import javax.tools.*;
 
-@SupportedAnnotationTypes("*")
-public class TestPackageInfoComments extends AbstractProcessor {
+public class TestPackageInfoComments extends JavacTestingAbstractProcessor {
 
     public static void main(String... args) throws Exception {
         String[] opts = {
             "-implicit:none",
             "-processor", TestPackageInfoComments.class.getName(),
-            "-processorpath", System.getProperty("test.classes")
+            "-processorpath", System.getProperty("test.class.path")
         };
         File[] files = {
             new File(System.getProperty("test.src"), "p/package-info.java")
@@ -68,21 +69,6 @@
 
     // -- Annotation processor: Check all PackageDecl's have a doc comment
 
-    Messager messager;
-    Elements elements;
-
-    @Override
-    public SourceVersion getSupportedSourceVersion() {
-        return SourceVersion.latest();
-    }
-
-    @Override
-    public void init(ProcessingEnvironment pEnv) {
-        super.init(pEnv);
-        messager = pEnv.getMessager();
-        elements = pEnv.getElementUtils();
-    }
-
     @Override
     public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
         for (Element e: roundEnv.getRootElements())
@@ -90,7 +76,7 @@
         return true;
     }
 
-    class TestElementScanner extends ElementScanner7<Void, Void> {
+    class TestElementScanner extends ElementScanner<Void, Void> {
         @Override
         public Void visitPackage(PackageElement e, Void v) {
             if (elements.getDocComment(e) == null)
--- a/langtools/test/tools/javac/tree/NoPrivateTypesExported.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/javac/tree/NoPrivateTypesExported.java	Tue Aug 05 12:14:11 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -51,8 +51,6 @@
 import javax.lang.model.type.TypeMirror;
 import javax.lang.model.type.TypeVariable;
 import javax.lang.model.type.WildcardType;
-import javax.lang.model.util.ElementScanner8;
-import javax.lang.model.util.SimpleAnnotationValueVisitor8;
 import javax.tools.Diagnostic.Kind;
 
 public class NoPrivateTypesExported extends JavacTestingAbstractProcessor {
@@ -131,7 +129,7 @@
 
     private void verifyReferredTypesAcceptable(Element rootElement,
                                                final Set<String> acceptable) {
-        new ElementScanner8<Void, Void>() {
+        new ElementScanner<Void, Void>() {
             @Override public Void visitType(TypeElement e, Void p) {
                 verifyTypeAcceptable(e.getSuperclass(), acceptable);
                 verifyTypesAcceptable(e.getInterfaces(), acceptable);
@@ -189,7 +187,7 @@
 
     private void verifyAnnotationValue(AnnotationValue value,
                                        final Set<String> acceptable) {
-        value.accept(new SimpleAnnotationValueVisitor8<Void, Void>() {
+        value.accept(new SimpleAnnotationValueVisitor<Void, Void>() {
             @Override public Void visitType(TypeMirror t, Void p) {
                 verifyTypeAcceptable(t, acceptable);
                 return null;
--- a/langtools/test/tools/jdeps/APIDeps.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/langtools/test/tools/jdeps/APIDeps.java	Tue Aug 05 12:14:11 2014 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8015912 8029216 8048063
+ * @bug 8015912 8029216 8048063 8050804
  * @summary Test -apionly and -jdkinternals options
  * @build m.Bar m.Foo m.Gee b.B c.C c.I d.D e.E f.F g.G
  * @run main APIDeps
--- a/make/Javadoc.gmk	Tue Aug 05 15:39:05 2014 +0400
+++ b/make/Javadoc.gmk	Tue Aug 05 12:14:11 2014 -0700
@@ -239,11 +239,15 @@
 
 # Common echo of option
 define OptionOnly # opt
-	$(PRINTF) "%s\n" "$1"
+	if [ "$1" != "" ] ; then \
+		$(PRINTF) "%s\n" "$1"; \
+	fi
 endef
+
 define OptionPair # opt arg
 	$(PRINTF) "%s '%s'\n" "$1" '$2'
 endef
+
 define OptionTrip # opt arg arg
 	$(PRINTF) "%s '%s' '%s'\n" "$1" '$2' '$3'
 endef
@@ -258,14 +262,7 @@
 $(call CopyrightLine,$(COPYRIGHT_URL),$(FIRST_COPYRIGHT_YEAR),)\
 </font>
 
-# Common javadoc options used by all
-COMMON_JAVADOCFLAGS = \
-    -XDignore.symbol.file=true \
-    -quiet \
-    -use \
-    -keywords \
-    -Xprofilespath $(JDK_TOPDIR)/make/profile-rtjar-includes.txt \
-    $(ADDITIONAL_JAVADOCFLAGS)
+# Common javadoc options used by all bundles
 
 ifdef OPENJDK
   ADDITIONAL_JAVADOCFLAGS = \
@@ -274,6 +271,52 @@
   ADDITIONAL_JAVADOCFLAGS =
 endif
 
+define COMMON_JAVADOCFLAGS
+    $(call OptionOnly,-XDignore.symbol.file=true) ; \
+    $(call OptionOnly,-quiet) ; \
+    $(call OptionOnly,-use) ; \
+    $(call OptionOnly,-keywords) ; \
+    $(call OptionPair,-Xprofilespath,$(JDK_TOPDIR)/make/profile-rtjar-includes.txt) ; \
+    $(call OptionOnly,$(ADDITIONAL_JAVADOCFLAGS))
+endef
+
+# Common javadoc tags used by all bundles
+
+# Java language specification cite
+TAG_JLS = jls:a:See <cite> \
+The Java&trade; Language Specification</cite>:
+
+# Java virtual machine specification cite
+TAG_JVMS = jvms:a:See <cite> \
+The Java&trade; Virtual Machine Specification</cite>:
+
+# In order to get a specific ordering it's necessary to specify the total
+# ordering of tags as the tags are otherwise ordered in order of definition.
+define COMMON_JAVADOCTAGS
+  $(call OptionPair,-tag,beaninfo:X) ; \
+  $(call OptionPair,-tag,revised:X) ; \
+  $(call OptionPair,-tag,since.unbundled:X) ; \
+  $(call OptionPair,-tag,spec:X) ; \
+  $(call OptionPair,-tag,specdefault:X) ; \
+  $(call OptionPair,-tag,Note:X) ; \
+  $(call OptionPair,-tag,ToDo:X) ; \
+  $(call OptionPair,-tag,apiNote:a:API Note:) ; \
+  $(call OptionPair,-tag,implSpec:a:Implementation Requirements:) ; \
+  $(call OptionPair,-tag,implNote:a:Implementation Note:) ; \
+  $(call OptionPair,-tag,param) ; \
+  $(call OptionPair,-tag,return) ; \
+  $(call OptionPair,-tag,throws) ; \
+  $(call OptionPair,-tag,since) ; \
+  $(call OptionPair,-tag,version) ; \
+  $(call OptionPair,-tag,serialData) ; \
+  $(call OptionPair,-tag,factory) ; \
+  $(call OptionPair,-tag,see) ; \
+  $(call OptionPair,-tag,$(TAG_JVMS)) ; \
+  $(call OptionPair,-tag,$(TAG_JLS))
+endef
+
+
+
 # Draft used for non-fcs documents
 DRAFT_HEADER =
 ifneq ($(MILESTONE), fcs)
@@ -338,10 +381,6 @@
 COREAPI_HEADER = \
 <strong>Java$(TRADEMARK)&nbsp;Platform<br>Standard&nbsp;Ed.&nbsp;$(JDK_MINOR_VERSION)</strong>
 
-# Java language specification cite
-TAG_JLS = jls:a:See <cite> \
-The Java&trade; Language Specification</cite>:
-
 # Overview file for core apis
 COREAPI_OVERVIEW = $(JDK_SHARE_CLASSES)/overview-core.html
 
@@ -365,29 +404,11 @@
 # Create file with javadoc options in it
 $(COREAPI_OPTIONS_FILE): $(COREAPI_OVERVIEW)
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
-	  $(call OptionOnly,-Xdoclint:none) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
+          $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ISO-8859-1) ; \
-	  $(call OptionPair,-tag,beaninfo:X) ; \
-	  $(call OptionPair,-tag,revised:X) ; \
-	  $(call OptionPair,-tag,since.unbundled:X) ; \
-	  $(call OptionPair,-tag,spec:X) ; \
-	  $(call OptionPair,-tag,specdefault:X) ; \
-	  $(call OptionPair,-tag,Note:X) ; \
-	  $(call OptionPair,-tag,ToDo:X) ; \
-	  $(call OptionPair,-tag,apiNote:a:API Note:) ; \
-	  $(call OptionPair,-tag,implSpec:a:Implementation Requirements:) ; \
-	  $(call OptionPair,-tag,implNote:a:Implementation Note:) ; \
-	  $(call OptionPair,-tag,param) ; \
-	  $(call OptionPair,-tag,return) ; \
-	  $(call OptionPair,-tag,throws) ; \
-	  $(call OptionPair,-tag,since) ; \
-	  $(call OptionPair,-tag,version) ; \
-	  $(call OptionPair,-tag,serialData) ; \
-	  $(call OptionPair,-tag,factory) ; \
-	  $(call OptionPair,-tag,see) ; \
-	  $(call OptionPair,-tag,$(TAG_JLS)) ; \
 	  $(call OptionOnly,-splitIndex) ; \
 	  $(call OptionPair,-overview,$(COREAPI_OVERVIEW)) ; \
 	  $(call OptionPair,-doctitle,$(COREAPI_DOCTITLE)) ; \
@@ -441,7 +462,8 @@
 # Create file with javadoc options in it
 $(DOCLETAPI_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:all) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -498,7 +520,8 @@
 # Create file with javadoc options in it
 $(TAGLETAPI_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:all) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -550,7 +573,8 @@
 # Create file with javadoc options in it
 $(DOMAPI_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -613,7 +637,8 @@
 # Create file with javadoc options in it
 $(JDI_OPTIONS_FILE): $(JDI_OVERVIEW)
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -700,7 +725,8 @@
 # Create file with javadoc options in it
 $(JAAS_OPTIONS_FILE): $(JAAS_OVERVIEW)
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -753,7 +779,8 @@
 # Create file with javadoc options in it
 $(JGSS_OPTIONS_FILE): $(JGSS_OVERVIEW)
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -806,7 +833,8 @@
 # Create file with javadoc options in it
 $(SMARTCARDIO_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -857,7 +885,8 @@
 # Create file with javadoc options in it
 $(HTTPSERVER_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -917,7 +946,8 @@
 # Create file with javadoc options in it
 $(MGMT_OPTIONS_FILE): $(MGMT_OVERVIEW)
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -969,7 +999,8 @@
 # Create file with javadoc options in it
 $(ATTACH_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -1020,7 +1051,8 @@
 # Create file with javadoc options in it
 $(JCONSOLE_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -1073,14 +1105,14 @@
 # Create file with javadoc options in it
 $(TREEAPI_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:all) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
 	  $(call OptionPair,-doctitle,$(TREEAPI_DOCTITLE)) ; \
 	  $(call OptionPair,-windowtitle,$(TREEAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
 	  $(call OptionPair,-header,$(TREEAPI_HEADER)$(DRAFT_HEADER)) ; \
-	  $(call OptionPair,-tag,$(TAG_JLS)) ; \
 	  $(call OptionPair,-bottom,$(TREEAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
 	  $(call OptionTrip,-group,$(TREEAPI_GROUPNAME),$(TREEAPI_REGEXP)); \
 	  $(call OptionTrip,-linkoffline,$(TREEAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
@@ -1125,7 +1157,8 @@
 # Create file with javadoc options in it
 $(SCTPAPI_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
@@ -1176,7 +1209,8 @@
 # Create file with javadoc options in it
 $(JDKNET_OPTIONS_FILE):
 	$(prep-target)
-	@($(call OptionOnly,$(COMMON_JAVADOCFLAGS)) ; \
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
 	  $(call OptionOnly,-Xdoclint:none) ; \
 	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
 	  $(call OptionPair,-encoding,ascii) ; \
--- a/make/jprt.properties	Tue Aug 05 15:39:05 2014 +0400
+++ b/make/jprt.properties	Tue Aug 05 12:14:11 2014 -0700
@@ -460,19 +460,23 @@
   windows_i586_6.1-fastdebug-c2-hotspot_internalvmtests,		\
   windows_x64_6.1-fastdebug-c2-hotspot_internalvmtests
 
-my.make.rule.test.targets.hotspot.wbapitests=				\
-  solaris_sparcv9_5.11-{product|fastdebug}-c2-hotspot_wbapitest,	\
-  solaris_x64_5.11-{product|fastdebug}-c2-hotspot_wbapitest,		\
-  linux_i586_2.6-{product|fastdebug}-c2-hotspot_wbapitest,		\
-  linux_x64_2.6-{product|fastdebug}-c2-hotspot_wbapitest,		\
-  windows_i586_6.1-{product|fastdebug}-c2-hotspot_wbapitest,		\
-  windows_x64_6.1-{product|fastdebug}-c2-hotspot_wbapitest,		\
-  linux_i586_2.6-{product|fastdebug}-c1-hotspot_wbapitest,		\
-  windows_i586_6.1-{product|fastdebug}-c1-hotspot_wbapitest
+my.make.rule.test.targets.hotspot.reg.group=					\
+  solaris_sparcv9_5.11-{product|fastdebug}-c2-GROUP,				\
+  solaris_x64_5.11-{product|fastdebug}-c2-GROUP,				\
+  linux_i586_2.6-{product|fastdebug}-c2-GROUP,					\
+  linux_x64_2.6-{product|fastdebug}-c2-GROUP,					\
+  windows_i586_6.1-{product|fastdebug}-c2-GROUP,				\
+  windows_x64_6.1-{product|fastdebug}-c2-GROUP,					\
+  linux_i586_2.6-{product|fastdebug}-c1-GROUP,					\
+  windows_i586_6.1-{product|fastdebug}-c1-GROUP
 
-my.make.rule.test.targets.hotspot=					\
-  ${my.make.rule.test.targets.hotspot.clienttests},			\
-  ${my.make.rule.test.targets.hotspot.servertests},			\
-  ${my.make.rule.test.targets.hotspot.internalvmtests},			\
-  ${my.make.rule.test.targets.hotspot.wbapitests},			\
+my.make.rule.test.targets.hotspot=						\
+  ${my.make.rule.test.targets.hotspot.clienttests},				\
+  ${my.make.rule.test.targets.hotspot.servertests},				\
+  ${my.make.rule.test.targets.hotspot.internalvmtests},				\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_wbapitest},	\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_compiler},	\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_gc},		\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_runtime},	\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_serviceability},	\
   ${my.additional.make.rule.test.targets.hotspot}
--- a/nashorn/.hgtags	Tue Aug 05 15:39:05 2014 +0400
+++ b/nashorn/.hgtags	Tue Aug 05 12:14:11 2014 -0700
@@ -257,3 +257,4 @@
 174cf53bce4e93a3d5d880ed7915ce8d0f08bc5e jdk9-b21
 a9d39bcfeb1bb3f7de929c56a2ecbea10a554ca1 jdk9-b22
 aa3fda2d2967847dbd264aa962d624c07fc6c29f jdk9-b23
+49d7a2a66ae6b70fee367e2ceb29d0c20f8be01b jdk9-b24
--- a/nashorn/make/build-nasgen.xml	Tue Aug 05 15:39:05 2014 +0400
+++ b/nashorn/make/build-nasgen.xml	Tue Aug 05 12:14:11 2014 -0700
@@ -36,11 +36,13 @@
                 <pathelement location="${basedir}/jcov2/lib/jcov_j2se_rt.jar"/>
                 <pathelement location="${basedir}/buildtools/nasgen/dist/nasgen.jar"/>
                 <pathelement path="${basedir}/build/classes"/>
+                <pathelement location="${dist.dir}/nasgen.jar"/>
+                <pathelement path="${build.dir}/classes"/>
             </classpath>
             <jvmarg value="-Djava.ext.dirs="/>
-            <arg value="${basedir}/build/classes"/>
+            <arg value="${build.dir}/classes"/>
             <arg value="jdk.nashorn.internal.objects"/>
-            <arg value="${basedir}/build/classes"/>
+            <arg value="${build.dir}/classes"/>
         </java>
     </target>
 
--- a/nashorn/make/build.xml	Tue Aug 05 15:39:05 2014 +0400
+++ b/nashorn/make/build.xml	Tue Aug 05 12:14:11 2014 -0700
@@ -304,6 +304,14 @@
 grant codeBase "file:/${basedir}/${file.reference.testng.jar}" {
     permission java.security.AllPermission;
 };
+//// in case of absolute path:
+grant codeBase "file:/${nashorn.internal.tests.jar}" {
+    permission java.security.AllPermission;
+};
+
+grant codeBase "file:/${file.reference.testng.jar}" {
+    permission java.security.AllPermission;
+};
 
 grant codeBase "file:/${basedir}/test/script/trusted/*" {
     permission java.security.AllPermission;
@@ -391,7 +399,7 @@
     <testng outputdir="${build.nosecurity.test.results.dir}" classfilesetref="test.nosecurity.classes"
        verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
       <jvmarg line="${ext.class.path}"/>
-      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
+      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} -Dbuild.dir=${build.dir}"/>
       <sysproperty key="nashorn.jar" value="${dist.dir}/nashorn.jar"/>
       <propertyset>
         <propertyref prefix="nashorn."/>
@@ -413,7 +421,7 @@
     <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
        verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
       <jvmarg line="${ext.class.path}"/>
-      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
+      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
       <jvmarg line="${debug.test.jvmargs}"/>
       <propertyset>
         <propertyref prefix="nashorn."/>
@@ -451,7 +459,7 @@
     <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
        verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
       <jvmarg line="${ext.class.path}"/>
-      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
+      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} -Dbuild.dir=${build.dir}"/>
       <propertyset>
         <propertyref prefix="testjfx-test-sys-prop."/>
         <mapper from="testjfx-test-sys-prop.*" to="*" type="glob"/>
@@ -471,7 +479,7 @@
     <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
        verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
       <jvmarg line="${ext.class.path}"/>
-      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
+      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
       <propertyset>
         <propertyref prefix="testmarkdown-test-sys-prop."/>
         <mapper from="testmarkdown-test-sys-prop.*" to="*" type="glob"/>
@@ -490,7 +498,7 @@
     <testng outputdir="${build.test.results.dir}" classfilesetref="test.classes"
        verbose="${testng.verbose}" haltonfailure="true" useDefaultListeners="false" listeners="${testng.listeners}" workingDir="${basedir}">
       <jvmarg line="${ext.class.path}"/>
-      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
+      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
       <propertyset>
         <propertyref prefix="nashorn."/>
       </propertyset>
@@ -510,7 +518,7 @@
     <!-- use just build.test.classes.dir to avoid referring to TestNG -->
     <java classname="${parallel.test.runner}" dir="${basedir}" fork="true">
       <jvmarg line="${ext.class.path}"/>
-      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
+      <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -Dbuild.dir=${build.dir}"/>
       <classpath>
           <pathelement path="${run.test.classpath}"/>
       </classpath>
--- a/nashorn/make/project.properties	Tue Aug 05 15:39:05 2014 +0400
+++ b/nashorn/make/project.properties	Tue Aug 05 12:14:11 2014 -0700
@@ -309,7 +309,7 @@
 run.test.jvmargs.octane.main=${run.test.jvmargs.common} -XX:+UnlockDiagnosticVMOptions -XX:+UseNewCode -XX:TypeProfileLevel=222
 
 # Security manager args - make sure that we run with the nashorn.policy that the build creates
-run.test.jvmsecurityargs=-Xverify:all -Djava.security.manager -Djava.security.policy=${basedir}/build/nashorn.policy
+run.test.jvmsecurityargs=-Xverify:all -Djava.security.manager -Djava.security.policy=${build.dir}/nashorn.policy
 
 # VM options for script tests with @fork option
 test-sys-prop.test.fork.jvm.options=${run.test.jvmargs.main} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -cp ${run.test.classpath}
--- a/nashorn/test/src/jdk/nashorn/internal/test/framework/TestHelper.java	Tue Aug 05 15:39:05 2014 +0400
+++ b/nashorn/test/src/jdk/nashorn/internal/test/framework/TestHelper.java	Tue Aug 05 12:14:11 2014 -0700
@@ -39,7 +39,8 @@
 public abstract class TestHelper {
 
     public static final String TEST_ROOT   = "test";
-    public static final String BUILD_ROOT  = "build/test";
+    public static final String BUILD_ROOT =
+        System.getProperty("build.dir", "build") + File.separator + "test";
     public static final String TEST_PREFIX = TEST_ROOT + File.separator;
 
     private TestHelper() {