changeset 11847:dbf9760f6c0e

Merge
author prr
date Mon, 27 Apr 2015 09:17:39 -0700
parents 0e483e64c1e4 76b64929271b
children d184800afb78
files src/java.base/share/classes/sun/security/provider/certpath/ReverseBuilder.java src/java.base/share/classes/sun/security/provider/certpath/ReverseState.java src/java.base/share/classes/sun/security/provider/certpath/SunCertPathBuilderParameters.java src/jdk.accessibility/windows/native/jabswitch/jabswitch_manifest.rc test/sun/security/provider/certpath/ReverseBuilder/BuildPath.java test/sun/security/provider/certpath/ReverseBuilder/ReverseBuild.java test/sun/security/provider/certpath/ReverseBuilder/mgrM2leadMA test/sun/security/provider/certpath/ReverseBuilder/mgrM2mgrM test/sun/security/provider/certpath/ReverseBuilder/mgrM2prjM test/sun/security/provider/certpath/ReverseBuilder/mgrMcrl test/sun/security/provider/certpath/ReverseBuilder/prjM2divE test/sun/security/provider/certpath/ReverseBuilder/prjM2mgrM test/sun/security/provider/certpath/ReverseBuilder/prjMcrl
diffstat 296 files changed, 2867 insertions(+), 2897 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Apr 24 15:45:25 2015 +0300
+++ b/.hgtags	Mon Apr 27 09:17:39 2015 -0700
@@ -302,3 +302,5 @@
 c76339e86ea7da5d9ac7856f3fae9ef73eef04a2 jdk9-b57
 36fc65e80d811ee43aedfc69284224b86a403662 jdk9-b58
 48ee960f29df93a9b2a895621321358a86909086 jdk9-b59
+84c5527f742bc64562e47d3149c16197fe1c4c1a jdk9-b60
+da84dcac1b0b12c5b836b05ac75ecbfadee0cd32 jdk9-b61
--- a/make/CompileDemos.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/CompileDemos.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -45,7 +45,7 @@
 DEMO_CLOSED_SHARE_SRC := $(JDK_TOPDIR)/src/closed/demo/share
 DEMO_SOLARIS_SRC := $(JDK_TOPDIR)/src/demo/solaris
 DEMO_OS_TYPE_SRC := $(JDK_TOPDIR)/src/demo/$(OPENJDK_TARGET_OS_TYPE)
-VERSION_INFO_RESOURCE := $(JDK_TOPDIR)/src/java.base/windows/native/common/version.rc
+GLOBAL_VERSION_INFO_RESOURCE := $(JDK_TOPDIR)/src/java.base/windows/native/common/version.rc
 
 ##################################################################################################
 
@@ -230,11 +230,8 @@
       $$(wildcard $$(patsubst %, $(DEMO_SHARE_SRC)/jvmti/%/README.txt, $2)) \
       $$(wildcard $$(patsubst %, $(DEMO_SHARE_SRC)/jvmti/%/sample.makefile.txt, $2))
   BUILD_DEMO_JVMTI_$1_EXTRA_INC := $$(addprefix -I, $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC))
-  BUILD_DEMO_JVMTI_$1_LANG := C
-  ifneq (, $4)
-    BUILD_DEMO_JVMTI_$1_LANG := $4
-  endif
   ifeq (C++, $4)
+    BUILD_DEMO_JVMTI_$1_TOOLCHAIN := TOOLCHAIN_LINK_CXX
     $1_EXTRA_CXX := $(LDFLAGS_CXX_JDK) $(LIBCXX)
   endif
 
@@ -254,7 +251,7 @@
   # Remove the -incremental:no setting to get .ilk-files like in the old build.
   $$(eval $$(call SetupNativeCompilation,BUILD_DEMO_JVMTI_$1, \
       SRC := $(DEMO_SHARE_SRC)/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \
-      LANG := $$(BUILD_DEMO_JVMTI_$1_LANG), \
+      TOOLCHAIN := $$(BUILD_DEMO_JVMTI_$1_TOOLCHAIN), \
       OPTIMIZATION := LOW, \
       CXXFLAGS := $$($1_CXXFLAGS), \
       DISABLED_WARNINGS_gcc := $(10), \
@@ -267,7 +264,7 @@
       LDFLAGS_SUFFIX_windows := $6, \
       LDFLAGS_SUFFIX_solaris := $7 -lc, \
       LDFLAGS_SUFFIX_linux := $8, \
-      VERSIONINFO_RESOURCE := $(VERSION_INFO_RESOURCE), \
+      VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
       RC_FLAGS := $$(RC_FLAGS) \
           -D "JDK_FNAME=$1.dll" \
           -D "JDK_INTERNAL_NAME=$1" \
@@ -398,7 +395,6 @@
 
   $(eval $(call SetupNativeCompilation,BUILD_LIBPOLLER, \
       SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \
-      LANG := C, \
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKLIB) $(SHARED_LIBRARY_FLAGS) \
           -I$(SUPPORT_OUTPUTDIR)/demo/classes/jni/Poller, \
--- a/make/Tools.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/Tools.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -163,9 +163,7 @@
 ifeq ($(OPENJDK_TARGET_OS), solaris)
   $(eval $(call SetupNativeCompilation,ADD_GNU_DEBUGLINK, \
       SRC := $(JDK_TOPDIR)/make/src/native/add_gnu_debuglink, \
-      LANG := C, \
-      CC := $(BUILD_CC), \
-      LDEXE := $(BUILD_LD), \
+      TOOLCHAIN := TOOLCHAIN_BUILD, \
       LDFLAGS := -lelf, \
       OBJECT_DIR := $(BUILDTOOLS_OUTPUTDIR)/objs/add_gnu_debuglink, \
       OUTPUT_DIR := $(BUILDTOOLS_OUTPUTDIR)/bin, \
@@ -173,9 +171,7 @@
 
   $(eval $(call SetupNativeCompilation,FIX_EMPTY_SEC_HDR_FLAGS, \
       SRC := $(JDK_TOPDIR)/make/src/native/fix_empty_sec_hdr_flags, \
-      LANG := C, \
-      CC := $(BUILD_CC), \
-      LDEXE := $(BUILD_LD), \
+      TOOLCHAIN := TOOLCHAIN_BUILD, \
       LDFLAGS := -lelf, \
       OBJECT_DIR := $(BUILDTOOLS_OUTPUTDIR)/objs/fix_empty_sec_hdr_flags, \
       OUTPUT_DIR := $(BUILDTOOLS_OUTPUTDIR)/bin, \
--- a/make/gensrc/GensrcMisc.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/gensrc/GensrcMisc.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -63,9 +63,7 @@
 $(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOR_EXE, \
     SRC := $(GENSRC_SOR_SRC), \
     INCLUDE_FILES := $(GENSRC_SOR_SRC_FILE), \
-    LANG := C, \
-    CC := $(BUILD_CC), \
-    LDEXE := $(BUILD_LD), \
+    TOOLCHAIN := TOOLCHAIN_BUILD, \
     OBJECT_DIR := $(GENSRC_SOR_BIN), \
     OUTPUT_DIR := $(GENSRC_SOR_BIN), \
     PROGRAM := genSocketOptionRegistry))
@@ -101,9 +99,7 @@
   $(eval $(call SetupNativeCompilation,BUILD_GENSRC_UC_EXE, \
       SRC := $(GENSRC_UC_SRC), \
       INCLUDE_FILES := $(GENSRC_UC_SRC_FILE), \
-      LANG := C, \
-      CC := $(BUILD_CC), \
-      LDEXE := $(BUILD_CC), \
+      TOOLCHAIN := TOOLCHAIN_BUILD, \
       CFLAGS := $(filter -D%, $(CFLAGS_JDKEXE)), \
       OBJECT_DIR := $(GENSRC_UC_BIN), \
       OUTPUT_DIR := $(GENSRC_UC_BIN), \
@@ -142,9 +138,7 @@
   $(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOL_EXE, \
       SRC := $(GENSRC_SOL_SRC), \
       INCLUDE_FILES := $(GENSRC_SOL_SRC_FILE), \
-      LANG := C, \
-      CC := $(BUILD_CC), \
-      LDEXE := $(BUILD_CC), \
+      TOOLCHAIN := TOOLCHAIN_BUILD, \
       OBJECT_DIR := $(GENSRC_SOL_BIN), \
       OUTPUT_DIR := $(GENSRC_SOL_BIN), \
       PROGRAM := genSolarisConstants))
--- a/make/launcher/Launcher-java.base.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/launcher/Launcher-java.base.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -103,7 +103,6 @@
   $(eval $(call SetupNativeCompilation,BUILD_JEXEC, \
       SRC := $(BUILD_JEXEC_SRC), \
       INCLUDE_FILES := jexec.c, \
-      LANG := C, \
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKEXE) \
           $(BUILD_JEXEC_INC), \
@@ -144,7 +143,6 @@
   $(eval $(call SetupNativeCompilation,BUILD_JSPAWNHELPER, \
       SRC := $(BUILD_JSPAWNHELPER_SRC), \
       INCLUDE_FILES := jspawnhelper.c, \
-      LANG := C, \
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKEXE) $(JSPAWNHELPER_CFLAGS), \
       LDFLAGS := $(LDFLAGS_JDKEXE) $(LINK_JSPAWNHELPER_FLAGS), \
--- a/make/launcher/Launcher-jdk.accessibility.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/launcher/Launcher-jdk.accessibility.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -36,7 +36,6 @@
   $(eval $(call SetupNativeCompilation,BUILD_JABSWITCH, \
       SRC := $(JABSWITCH_SRC), \
       INCLUDE_FILES := jabswitch.cpp, \
-      LANG := C++, \
       CFLAGS := $(filter-out -Zc:wchar_t-, $(CFLAGS_JDKEXE)) -Zc:wchar_t \
           -analyze- -Od -Gd -D_WINDOWS \
           -D_UNICODE -DUNICODE -RTC1 -EHsc, \
@@ -52,7 +51,9 @@
           -D "JDK_FNAME=jabswitch.exe" \
           -D "JDK_INTERNAL_NAME=jabswitch" \
           -D "JDK_FTYPE=0x01L", \
-      MANIFEST := $(JABSWITCH_SRC)/jabswitch.manifest))
+      MANIFEST := $(JABSWITCH_SRC)/jabswitch.manifest, \
+      MANIFEST_VERSION := $(JDK_VERSION_FOR_MANIFEST), \
+  ))
 
   TARGETS += $(BUILD_JABSWITCH)
 endif
--- a/make/launcher/Launcher-jdk.pack200.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/launcher/Launcher-jdk.pack200.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -56,9 +56,8 @@
 
 endif
 
-UNPACKEXE_LANG := C
 ifeq ($(OPENJDK_TARGET_OS), solaris)
-  UNPACKEXE_LANG := C++
+  UNPACKEXE_TOOLCHAIN := TOOLCHAIN_LINK_CXX
 endif
 
 UNPACK_MAPFILE_DIR := $(JDK_TOPDIR)/make/mapfiles/libunpack
@@ -78,7 +77,7 @@
 
 $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
     SRC := $(UNPACKEXE_SRC), \
-    LANG := $(UNPACKEXE_LANG), \
+    TOOLCHAIN := $(UNPACKEXE_TOOLCHAIN), \
     OPTIMIZATION := LOW, \
     CFLAGS := $(UNPACKEXE_CFLAGS) $(CXXFLAGS_JDKEXE) -DFULL, \
     CFLAGS_release := -DPRODUCT, \
@@ -102,7 +101,9 @@
         -D "JDK_INTERNAL_NAME=unpack200" \
         -D "JDK_FTYPE=0x1L", \
     DEBUG_SYMBOLS := true, \
-    MANIFEST := $(JDK_TOPDIR)/src/jdk.pack200/windows/native/unpack200/unpack200_proto.exe.manifest))
+    MANIFEST := $(JDK_TOPDIR)/src/jdk.pack200/windows/native/unpack200/unpack200_proto.exe.manifest, \
+    MANIFEST_VERSION := $(JDK_VERSION_FOR_MANIFEST), \
+))
 
 ifneq ($(USE_EXTERNAL_LIBZ), true)
 
--- a/make/launcher/LauncherCommon.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/launcher/LauncherCommon.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -161,7 +161,6 @@
   $(call SetupNativeCompilation,BUILD_LAUNCHER_$1, \
       SRC := $(LAUNCHER_SRC), \
       INCLUDE_FILES := main.c, \
-      LANG := C, \
       OPTIMIZATION := $$($1_OPTIMIZATION_ARG), \
       CFLAGS := $$($1_CFLAGS) \
           $(LAUNCHER_CFLAGS) \
@@ -199,7 +198,9 @@
           -D "JDK_FTYPE=0x1L" \
           $7, \
       MANIFEST := $(JAVA_MANIFEST), \
-      CODESIGN := $$($1_CODESIGN))
+      MANIFEST_VERSION := $(JDK_VERSION_FOR_MANIFEST), \
+      CODESIGN := $$($1_CODESIGN), \
+  )
 
   TARGETS += $$(BUILD_LAUNCHER_$1)
 
--- a/make/lib/Awt2dLibraries.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/Awt2dLibraries.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -51,7 +51,6 @@
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(BUILD_LIBMLIB_SRC), \
     EXCLUDE_FILES := mlib_c_ImageBlendTable.c, \
-    LANG := C, \
     OPTIMIZATION := HIGHEST, \
     CFLAGS := $(CFLAGS_JDKLIB) \
         $(BUILD_LIBMLIB_CFLAGS), \
@@ -124,7 +123,6 @@
       LIBRARY := mlib_image_v, \
       OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
       SRC := $(LIBMLIB_IMAGE_V_SRC), \
-      LANG := C, \
       EXCLUDE_FILES := $(BUILD_LIBMLIB_IMAGE_V_EXFILES), \
       OPTIMIZATION := HIGHEST, \
       CFLAGS := -xarch=sparcvis \
@@ -204,8 +202,6 @@
   LIBAWT_CFLAGS += -DMLIB_NO_LIBSUNMATH
 endif
 
-LIBAWT_LANG := C
-
 ifeq ($(OPENJDK_TARGET_OS), windows)
   LIBAWT_DIRS += $(JDK_TOPDIR)/src/java.desktop/share/native/common/font \
       $(JDK_TOPDIR)/src/java.desktop/share/native/common/java2d/opengl \
@@ -222,7 +218,6 @@
       awt/image/cvutils/img_colors.c \
       #
 
-  LIBAWT_LANG := C++
   LIBAWT_CFLAGS += -EHsc -DUNICODE -D_UNICODE
   ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
     LIBAWT_CFLAGS += -DMLIB_OS64BIT
@@ -247,7 +242,6 @@
     SRC := $(LIBAWT_DIRS), \
     EXCLUDES := $(LIBAWT_EXCLUDES), \
     EXCLUDE_FILES := $(LIBAWT_EXFILES), \
-    LANG := $(LIBAWT_LANG), \
     OPTIMIZATION := LOW, \
     CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS), \
     DISABLED_WARNINGS_gcc := sign-compare unused-result maybe-uninitialized \
@@ -355,7 +349,6 @@
         OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
         SRC := $(LIBAWT_XAWT_DIRS), \
         EXCLUDES := $(LIBAWT_XAWT_EXCLUDES), \
-        LANG := C, \
         OPTIMIZATION := LOW, \
         CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_XAWT_CFLAGS) \
             $(X_CFLAGS), \
@@ -413,7 +406,6 @@
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(LIBLCMS_SRC), \
     INCLUDE_FILES := $(BUILD_LIBLCMS_INCLUDE_FILES), \
-    LANG := C, \
     OPTIMIZATION := HIGHEST, \
     CFLAGS := $(filter-out -xc99=%none, $(CFLAGS_JDKLIB)) \
         $(SHARED_LIBRARY_FLAGS) $(LIBLCMS_CPPFLAGS) \
@@ -496,7 +488,6 @@
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(LIBJAVAJPEG_SRC), \
     INCLUDE_FILES := $(BUILD_LIBJAVAJPEG_INCLUDE_FILES), \
-    LANG := C, \
     OPTIMIZATION := HIGHEST, \
     CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJAVAJPEG_SRC)) \
         $(LIBJAVA_HEADER_FLAGS) \
@@ -564,7 +555,6 @@
         OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
         SRC := $(LIBAWT_HEADLESS_DIRS), \
         EXCLUDES := $(LIBAWT_HEADLESS_EXCLUDES), \
-        LANG := C, \
         OPTIMIZATION := LOW, \
         CFLAGS := $(CFLAGS_JDKLIB) \
             -DHEADLESS=true \
@@ -651,7 +641,7 @@
     SRC := $(LIBFONTMANAGER_SRC), \
     EXCLUDE_FILES := $(LIBFONTMANAGER_EXCLUDE_FILES) \
         AccelGlyphCache.c, \
-    LANG := C++, \
+    TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
     CFLAGS := $(CFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \
     CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBFONTMANAGER_CFLAGS), \
     OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \
@@ -712,7 +702,6 @@
       OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
       SRC := $(LIBJAWT_SRC), \
       INCLUDE_FILES := $(LIBJAWT_INCLUDE_FILES), \
-      LANG := C++, \
       OPTIMIZATION := LOW, \
       CFLAGS := $(CXXFLAGS_JDKLIB) \
           -EHsc -DUNICODE -D_UNICODE \
@@ -771,7 +760,6 @@
       OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
       SRC := $(LIBJAWT_SRC), \
       INCLUDE_FILES := $(JAWT_FILES), \
-      LANG := C, \
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKLIB) \
           $(LIBJAWT_CFLAGS), \
@@ -889,7 +877,6 @@
       SRC := $(LIBSPLASHSCREEN_DIRS), \
       EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
       EXCLUDES := $(LIBSPLASHSCREEN_EXCLUDES), \
-      LANG := C, \
       OPTIMIZATION := LOW, \
       CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \
                 $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS), \
@@ -958,7 +945,6 @@
       LIBRARY := awt_lwawt, \
       OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
       SRC := $(LIBAWT_LWAWT_DIRS), \
-      LANG := C, \
       INCLUDE_FILES := $(LIBAWT_LWAWT_FILES), \
       EXCLUDE_FILES := $(LIBAWT_LWAWT_EXFILES), \
       EXCLUDES := $(LIBAWT_LWAWT_EXCLUDES), \
@@ -1008,7 +994,6 @@
       LIBRARY := osxui, \
       OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
       SRC := $(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxui, \
-      LANG := C, \
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKLIB) \
           -I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxui \
--- a/make/lib/CoreLibraries.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/CoreLibraries.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -43,7 +43,6 @@
       STATIC_LIBRARY := fdlibm, \
       OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \
       SRC := $(LIBFDLIBM_SRC), \
-      LANG := C, \
       OPTIMIZATION := $(BUILD_LIBFDLIBM_OPTIMIZATION), \
       CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \
       CFLAGS_windows_debug := -DLOGGING, \
@@ -62,7 +61,6 @@
       LIBRARY := fdlibm, \
       OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
       SRC := $(LIBFDLIBM_SRC), \
-      LANG := C, \
       CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \
       LDFLAGS := -nostdlib -r -arch x86_64, \
       OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
@@ -93,7 +91,6 @@
     LIBRARY := verify, \
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(JDK_TOPDIR)/src/java.base/share/native/libverify, \
-    LANG := C, \
     OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
     CFLAGS := $(CFLAGS_JDKLIB), \
     DISABLED_WARNINGS_microsoft := 4244 4267, \
@@ -146,7 +143,6 @@
     LIBRARY := java, \
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(LIBJAVA_SRC_DIRS), \
-    LANG := C, \
     OPTIMIZATION := HIGH, \
     CFLAGS := $(CFLAGS_JDKLIB) \
         $(LIBJAVA_CFLAGS), \
@@ -206,7 +202,6 @@
 $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
     LIBRARY := zip, \
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
-    LANG := C, \
     OPTIMIZATION := LOW, \
     SRC := $(JDK_TOPDIR)/src/java.base/share/native/libzip, \
     EXCLUDES := $(LIBZIP_EXCLUDES), \
@@ -314,7 +309,6 @@
     SRC := $(LIBJLI_SRC_DIRS), \
     EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
     EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
-    LANG := C, \
     OPTIMIZATION := HIGH, \
     CFLAGS := $(LIBJLI_CFLAGS), \
     DISABLED_WARNINGS_solstudio := E_ASM_DISABLES_OPTIMIZATION, \
@@ -363,7 +357,6 @@
       SRC := $(LIBJLI_SRC_DIRS), \
       EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
       EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
-      LANG := C, \
       OPTIMIZATION := HIGH, \
       CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \
       ARFLAGS := $(ARFLAGS), \
@@ -383,7 +376,6 @@
       SRC := $(LIBJLI_SRC_DIRS), \
       EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
       EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
-      LANG := C, \
       OPTIMIZATION := HIGH, \
       CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
       LDFLAGS := -nostdlib -r, \
@@ -403,7 +395,6 @@
       SRC := $(LIBJLI_SRC_DIRS), \
       EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \
       EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
-      LANG := C, \
       OPTIMIZATION := HIGH, \
       CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \
       ARFLAGS := $(ARFLAGS), \
--- a/make/lib/Lib-java.instrument.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/Lib-java.instrument.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -57,7 +57,6 @@
     LIBRARY := instrument, \
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(LIBINSTRUMENT_SRC), \
-    LANG := C, \
     OPTIMIZATION := LOW, \
     CFLAGS := $(LIBINSTRUMENT_CFLAGS) $(CFLAGS_WARNINGS_ARE_ERRORS), \
     CFLAGS_debug := -DJPLIS_LOGGING, \
--- a/make/lib/Lib-java.management.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/Lib-java.management.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -72,7 +72,6 @@
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(BUILD_LIBMANAGEMENT_SRC), \
     EXCLUDE_FILES := $(BUILD_LIBMANAGEMENT_EXCLUDES), \
-    LANG := C, \
     OPTIMIZATION := $(LIBMANAGEMENT_OPTIMIZATION), \
     CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) $(BUILD_LIBMANAGEMENT_CFLAGS), \
     MAPFILE := $(LIBMANAGEMENT_MAPFILE), \
--- a/make/lib/Lib-java.prefs.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/Lib-java.prefs.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -37,7 +37,6 @@
     LIBRARY := prefs, \
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(LIBPREF_SRC_DIRS), \
-    LANG := C, \
     OPTIMIZATION := HIGH, \
     CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBPREF_SRC_DIRS)) \
         $(LIBJAVA_HEADER_FLAGS), \
--- a/make/lib/Lib-java.security.jgss.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/Lib-java.security.jgss.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -36,7 +36,6 @@
       LIBRARY := j2gss, \
       OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
       SRC := $(LIBJ2GSS_SRC), \
-      LANG := C, \
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2GSS_SRC)) \
           $(LIBJAVA_HEADER_FLAGS) \
@@ -79,7 +78,6 @@
         LIBRARY := $(BUILD_LIBKRB5_NAME), \
         OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
         SRC := $(BUILD_LIBKRB5_SRC), \
-        LANG := C, \
         OPTIMIZATION := LOW, \
         CFLAGS := $(CFLAGS_JDKLIB) \
             $(addprefix -I, $(BUILD_LIBKRB5_SRC)) \
--- a/make/lib/Lib-java.smartcardio.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/Lib-java.smartcardio.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -37,7 +37,6 @@
     LIBRARY := j2pcsc, \
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(LIBJ2PCSC_SRC), \
-    LANG := C, \
     CFLAGS_unix := -D__sun_jdk, \
     OPTIMIZATION := LOW, \
     CFLAGS := $(CFLAGS_JDKLIB) $(LIBJ2PCSC_CPPFLAGS), \
--- a/make/lib/Lib-jdk.accessibility.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/Lib-jdk.accessibility.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -45,7 +45,6 @@
         LIBRARY = javaaccessbridge$1, \
         OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
         SRC := $(JAVA_AB_SRCDIR), \
-        LANG := C++, \
         OPTIMIZATION := LOW, \
         CFLAGS := $(CFLAGS_JDKLIB) $(ACCESSBRIDGE_CFLAGS) \
             $(addprefix -I,$(JAVA_AB_SRCDIR)) \
@@ -76,7 +75,6 @@
         LIBRARY = windowsaccessbridge$1, \
         OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
         SRC := $(WIN_AB_SRCDIR), \
-        LANG := C++, \
         OPTIMIZATION := LOW, \
         CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT $(ACCESSBRIDGE_CFLAGS) \
             $(addprefix -I,$(WIN_AB_SRCDIR)) \
@@ -105,7 +103,6 @@
         LIBRARY = jabsysinfo, \
         OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
         SRC := $(SYSINFO_SRCDIR), \
-        LANG := C++, \
         OPTIMIZATION := LOW, \
         CFLAGS := $(CFLAGS_JDKLIB) $(ACCESSBRIDGE_CFLAGS), \
         LDFLAGS := $(LDFLAGS_JDKLIB) \
--- a/make/lib/Lib-jdk.attach.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/Lib-jdk.attach.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -32,7 +32,6 @@
     LIBRARY := attach, \
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(call FindSrcDirsForLib, jdk.attach, attach), \
-    LANG := C, \
     OPTIMIZATION := LOW, \
     CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
         -I$(SUPPORT_OUTPUTDIR)/headers/jdk.attach \
--- a/make/lib/Lib-jdk.crypto.ec.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/Lib-jdk.crypto.ec.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -47,7 +47,7 @@
       LIBRARY := sunec, \
       OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
       SRC := $(LIBSUNEC_SRC), \
-      LANG := C++, \
+      TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
       OPTIMIZATION := LOW, \
       CFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CFLAGS_JDKLIB)) \
           $(BUILD_LIBSUNEC_FLAGS) \
--- a/make/lib/Lib-jdk.crypto.mscapi.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/Lib-jdk.crypto.mscapi.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -35,7 +35,6 @@
       LIBRARY := sunmscapi, \
       OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
       SRC := $(LIBSUNMSCAPI_SRC), \
-      LANG := C++, \
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKLIB) \
           -I$(LIBSUNMSCAPI_SRC), \
--- a/make/lib/Lib-jdk.crypto.pkcs11.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/Lib-jdk.crypto.pkcs11.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -34,7 +34,6 @@
     LIBRARY := j2pkcs11, \
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(LIBJ2PKCS11_SRC), \
-    LANG := C, \
     OPTIMIZATION := LOW, \
     CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2PKCS11_SRC)) \
         $(LIBJAVA_HEADER_FLAGS) \
--- a/make/lib/Lib-jdk.crypto.ucrypto.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/Lib-jdk.crypto.ucrypto.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -35,7 +35,6 @@
       LIBRARY := j2ucrypto, \
       OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
       SRC := $(LIBJ2UCRYPTO_SRC), \
-      LANG := C, \
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKLIB) \
           $(addprefix -I, $(LIBJ2UCRYPTO_SRC)), \
--- a/make/lib/Lib-jdk.deploy.osx.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/Lib-jdk.deploy.osx.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -35,7 +35,6 @@
       LIBRARY := AppleScriptEngine, \
       OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
       SRC := $(LIBAPPLESCRIPTENGINE_SRC), \
-      LANG := C, \
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKLIB) \
           -I$(LIBAPPLESCRIPTENGINE_SRC) \
@@ -68,7 +67,6 @@
       LIBRARY := osx, \
       OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
       SRC := $(LIBOSX_DIRS), \
-      LANG := C, \
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKLIB) \
           $(LIBOSX_CFLAGS), \
--- a/make/lib/Lib-jdk.hprof.agent.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/Lib-jdk.hprof.agent.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -45,7 +45,6 @@
     LIBRARY := hprof, \
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(BUILD_LIBHPROF_SRC), \
-    LANG := C, \
     OPTIMIZATION := $(LIBHPROF_OPTIMIZATION), \
     CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
         $(BUILD_LIBHPROF_CFLAGS), \
@@ -75,7 +74,6 @@
     LIBRARY := java_crw_demo, \
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(LIBJAVA_CRW_DEMO_SRC), \
-    LANG := C, \
     OPTIMIZATION := LOW, \
     CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
         $(addprefix -I, $(LIBJAVA_CRW_DEMO_SRC)), \
--- a/make/lib/Lib-jdk.jdi.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/Lib-jdk.jdi.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -43,7 +43,6 @@
       LIBRARY := dt_shmem, \
       OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
       SRC := $(LIBDT_SHMEM_SRC), \
-      LANG := C, \
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) -DUSE_MMAP \
           $(LIBDT_SHMEM_CPPFLAGS), \
--- a/make/lib/Lib-jdk.jdwp.agent.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/Lib-jdk.jdwp.agent.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -40,7 +40,6 @@
     LIBRARY := dt_socket, \
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(LIBDT_SOCKET_SRC), \
-    LANG := C, \
     OPTIMIZATION := LOW, \
     CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_CFLAGS_WARNINGS_ARE_ERRORS) -DUSE_MMAP \
         $(LIBDT_SOCKET_CPPFLAGS), \
@@ -77,7 +76,6 @@
     LIBRARY := jdwp, \
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(LIBJDWP_SRC), \
-    LANG := C, \
     OPTIMIZATION := LOW, \
     CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) -DJDWP_LOGGING \
         $(LIBJDWP_CPPFLAGS) \
--- a/make/lib/Lib-jdk.pack200.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/Lib-jdk.pack200.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -32,7 +32,7 @@
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(JDK_TOPDIR)/src/jdk.pack200/share/native/libunpack \
         $(JDK_TOPDIR)/src/jdk.pack200/share/native/common-unpack, \
-    LANG := C++, \
+    TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
     OPTIMIZATION := LOW, \
     CFLAGS := $(CXXFLAGS_JDKLIB) \
         -DNO_ZLIB -DUNPACK_JNI -DFULL \
--- a/make/lib/Lib-jdk.sctp.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/Lib-jdk.sctp.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -41,7 +41,6 @@
         LIBRARY := sctp, \
         OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
         SRC := $(JDK_TOPDIR)/src/jdk.sctp/$(OPENJDK_TARGET_OS_TYPE)/native/libsctp, \
-        LANG := C, \
         OPTIMIZATION := LOW, \
         CFLAGS := $(CFLAGS_JDKLIB) \
             -I $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libnio/ch \
--- a/make/lib/Lib-jdk.security.auth.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/Lib-jdk.security.auth.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -42,7 +42,6 @@
     LIBRARY := $(LIBJAAS_NAME), \
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(call FindSrcDirsForLib, jdk.security.auth, jaas), \
-    LANG := C, \
     OPTIMIZATION := LOW, \
     CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/jdk.security.auth, \
     MAPFILE := $(LIBJAAS_MAPFILE), \
--- a/make/lib/NetworkingLibraries.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/NetworkingLibraries.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -29,7 +29,6 @@
     LIBRARY := net, \
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(LIBNET_SRC_DIRS), \
-    LANG := C, \
     OPTIMIZATION := LOW, \
     CFLAGS := $(CFLAGS_JDKLIB) -I$(SUPPORT_OUTPUTDIR)/headers/java.base \
         $(LIBJAVA_HEADER_FLAGS) $(addprefix -I, $(LIBNET_SRC_DIRS)), \
--- a/make/lib/NioLibraries.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/NioLibraries.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -65,7 +65,6 @@
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(BUILD_LIBNIO_SRC), \
     EXCLUDE_FILES := $(BUILD_LIBNIO_EXFILES), \
-    LANG := C, \
     OPTIMIZATION := HIGH, \
     CFLAGS := $(CFLAGS_JDKLIB) \
         $(BUILD_LIBNIO_CFLAGS), \
--- a/make/lib/PlatformLibraries.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/PlatformLibraries.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -33,7 +33,6 @@
       LIBRARY := osxapp, \
       OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
       SRC := $(LIBOSXAPP_SRC), \
-      LANG := C, \
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKLIB) \
           $(addprefix -I, $(LIBOSXAPP_SRC)) \
--- a/make/lib/SoundLibraries.gmk	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/lib/SoundLibraries.gmk	Mon Apr 27 09:17:39 2015 -0700
@@ -35,8 +35,6 @@
 
 LIBJSOUND_SRC_FILES := Utilities.c Platform.c
 
-LIBJSOUND_LANG := C
-
 EXTRA_SOUND_JNI_LIBS :=
 
 LIBJSOUND_MIDIFILES := \
@@ -81,7 +79,7 @@
 endif # OPENJDK_TARGET_OS aix
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
-  LIBJSOUND_LANG := C++
+  LIBJSOUND_TOOLCHAIN := TOOLCHAIN_LINK_CXX
   LIBJSOUND_CFLAGS += -DX_PLATFORM=X_MACOSX \
       -DUSE_PORTS=TRUE \
       -DUSE_DAUDIO=TRUE \
@@ -124,7 +122,7 @@
     OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
     SRC := $(LIBJSOUND_SRC_DIRS), \
     INCLUDE_FILES := $(LIBJSOUND_SRC_FILES), \
-    LANG := $(LIBJSOUND_LANG), \
+    TOOLCHAIN := $(LIBJSOUND_TOOLCHAIN), \
     OPTIMIZATION := LOW, \
     CFLAGS := $(CFLAGS_JDKLIB) \
         $(LIBJSOUND_CFLAGS), \
@@ -169,7 +167,6 @@
           PLATFORM_API_LinuxOS_ALSA_MidiOut.c \
           PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \
           PLATFORM_API_LinuxOS_ALSA_Ports.c, \
-      LANG := C, \
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKLIB) $(ALSA_CFLAGS) \
           $(LIBJSOUND_CFLAGS) \
@@ -201,7 +198,6 @@
       SRC := $(LIBJSOUND_SRC_DIRS), \
       INCLUDE_FILES := Utilities.c $(LIBJSOUND_DAUDIOFILES) \
           PLATFORM_API_WinOS_DirectSound.cpp, \
-      LANG := C++, \
       OPTIMIZATION := LOW, \
       CFLAGS := $(CFLAGS_JDKLIB) \
           $(LIBJSOUND_CFLAGS) \
--- a/make/src/classes/build/tools/module/ext.modules	Fri Apr 24 15:45:25 2015 +0300
+++ b/make/src/classes/build/tools/module/ext.modules	Mon Apr 27 09:17:39 2015 -0700
@@ -12,4 +12,5 @@
 jdk.localedata
 jdk.naming.dns
 jdk.scripting.nashorn
+jdk.xml.dom
 jdk.zipfs
--- a/src/java.base/linux/classes/sun/nio/ch/EPollPort.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/linux/classes/sun/nio/ch/EPollPort.java	Mon Apr 27 09:17:39 2015 -0700
@@ -105,7 +105,7 @@
 
         // create the queue and offer the special event to ensure that the first
         // threads polls
-        this.queue = new ArrayBlockingQueue<Event>(MAX_EPOLL_EVENTS);
+        this.queue = new ArrayBlockingQueue<>(MAX_EPOLL_EVENTS);
         this.queue.offer(NEED_TO_POLL);
     }
 
--- a/src/java.base/linux/classes/sun/nio/fs/LinuxNativeDispatcher.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/linux/classes/sun/nio/fs/LinuxNativeDispatcher.java	Mon Apr 27 09:17:39 2015 -0700
@@ -121,7 +121,7 @@
     private static native void init();
 
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             public Void run() {
                 System.loadLibrary("nio");
                 return null;
--- a/src/java.base/linux/classes/sun/nio/fs/LinuxWatchService.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/linux/classes/sun/nio/fs/LinuxWatchService.java	Mon Apr 27 09:17:39 2015 -0700
@@ -190,7 +190,7 @@
             this.watcher = watcher;
             this.ifd = ifd;
             this.socketpair = sp;
-            this.wdToKey = new HashMap<Integer,LinuxWatchKey>();
+            this.wdToKey = new HashMap<>();
             this.address = unsafe.allocateMemory(BUFFER_SIZE);
         }
 
@@ -457,7 +457,7 @@
     private static native int poll(int fd1, int fd2) throws UnixException;
 
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             public Void run() {
                 System.loadLibrary("nio");
                 return null;
--- a/src/java.base/linux/classes/sun/nio/fs/MagicFileTypeDetector.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/linux/classes/sun/nio/fs/MagicFileTypeDetector.java	Mon Apr 27 09:17:39 2015 -0700
@@ -68,7 +68,7 @@
     private static native byte[] probe0(long pathAddress);
 
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
             public Void run() {
                 System.loadLibrary("nio");
--- a/src/java.base/share/classes/com/sun/crypto/provider/JceKeyStore.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/com/sun/crypto/provider/JceKeyStore.java	Mon Apr 27 09:17:39 2015 -0700
@@ -711,7 +711,7 @@
                     cf = CertificateFactory.getInstance("X509");
                 } else {
                     // version 2
-                    cfs = new Hashtable<String, CertificateFactory>(3);
+                    cfs = new Hashtable<>(3);
                 }
 
                 entries.clear();
--- a/src/java.base/share/classes/com/sun/crypto/provider/PBEKeyFactory.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/com/sun/crypto/provider/PBEKeyFactory.java	Mon Apr 27 09:17:39 2015 -0700
@@ -56,7 +56,7 @@
     }
 
     static {
-        validTypes = new HashSet<String>(17);
+        validTypes = new HashSet<>(17);
         validTypes.add("PBEWithMD5AndDES".toUpperCase(Locale.ENGLISH));
         validTypes.add("PBEWithSHA1AndDESede".toUpperCase(Locale.ENGLISH));
         validTypes.add("PBEWithSHA1AndRC2_40".toUpperCase(Locale.ENGLISH));
--- a/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java	Mon Apr 27 09:17:39 2015 -0700
@@ -115,7 +115,7 @@
         final String BLOCK_PADS = "NOPADDING|PKCS5PADDING|ISO10126PADDING";
 
         AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Object>() {
+            new java.security.PrivilegedAction<>() {
                 public Object run() {
 
                     /*
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/NativeUnpack.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/NativeUnpack.java	Mon Apr 27 09:17:39 2015 -0700
@@ -87,7 +87,7 @@
         // If loading from stand alone build uncomment this.
         // System.loadLibrary("unpack");
         java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("unpack");
                     return null;
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/Package.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/Package.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1210,7 +1210,7 @@
         // This keeps files of similar format near each other.
         // Put class files at the end, keeping their fixed order.
         // Be sure the JAR file's required manifest stays at the front. (4893051)
-        Collections.sort(files, new Comparator<File>() {
+        Collections.sort(files, new Comparator<>() {
                 public int compare(File r0, File r1) {
                     // Get the file name.
                     String f0 = r0.nameString;
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1151,7 +1151,7 @@
         return -1;
     }
 
-    Comparator<Entry> entryOutputOrder = new Comparator<Entry>() {
+    Comparator<Entry> entryOutputOrder = new Comparator<>() {
         public int compare(Entry e0, Entry e1) {
             int k0 = getOutputIndex(e0);
             int k1 = getOutputIndex(e1);
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageWriter.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageWriter.java	Mon Apr 27 09:17:39 2015 -0700
@@ -829,7 +829,7 @@
         maxFlags = new int[ATTR_CONTEXT_LIMIT];
         allLayouts = new FixedList<>(ATTR_CONTEXT_LIMIT);
         for (int i = 0; i < ATTR_CONTEXT_LIMIT; i++) {
-            allLayouts.set(i, new HashMap<Attribute.Layout, int[]>());
+            allLayouts.set(i, new HashMap<>());
         }
         // Collect maxFlags and allLayouts.
         for (Class cls : pkg.classes) {
@@ -892,7 +892,7 @@
             // Sort by count, most frequent first.
             // Predefs. participate in this sort, though it does not matter.
             Arrays.sort(layoutsAndCounts,
-                        new Comparator<Map.Entry<Attribute.Layout, int[]>>() {
+                        new Comparator<>() {
                 public int compare(Map.Entry<Attribute.Layout, int[]> e0,
                                    Map.Entry<Attribute.Layout, int[]> e1) {
                     // Primary sort key is count, reversed.
@@ -1010,7 +1010,7 @@
         int numAttrDefs = defList.size();
         Object[][] defs = new Object[numAttrDefs][];
         defList.toArray(defs);
-        Arrays.sort(defs, new Comparator<Object[]>() {
+        Arrays.sort(defs, new Comparator<>() {
             public int compare(Object[] a0, Object[] a1) {
                 // Primary sort key is attr def header.
                 @SuppressWarnings("unchecked")
--- a/src/java.base/share/classes/com/sun/net/ssl/KeyManagerFactory.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/com/sun/net/ssl/KeyManagerFactory.java	Mon Apr 27 09:17:39 2015 -0700
@@ -63,7 +63,7 @@
      */
     public final static String getDefaultAlgorithm() {
         String type;
-        type = AccessController.doPrivileged(new PrivilegedAction<String>() {
+        type = AccessController.doPrivileged(new PrivilegedAction<>() {
             public String run() {
                 return Security.getProperty("sun.ssl.keymanager.type");
             }
--- a/src/java.base/share/classes/com/sun/net/ssl/TrustManagerFactory.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/com/sun/net/ssl/TrustManagerFactory.java	Mon Apr 27 09:17:39 2015 -0700
@@ -63,7 +63,7 @@
      */
     public final static String getDefaultAlgorithm() {
         String type;
-        type = AccessController.doPrivileged(new PrivilegedAction<String>() {
+        type = AccessController.doPrivileged(new PrivilegedAction<>() {
             public String run() {
                 return Security.getProperty("sun.ssl.trustmanager.type");
             }
--- a/src/java.base/share/classes/java/io/ExpiringCache.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/io/ExpiringCache.java	Mon Apr 27 09:17:39 2015 -0700
@@ -64,7 +64,7 @@
     @SuppressWarnings("serial")
     ExpiringCache(long millisUntilExpiration) {
         this.millisUntilExpiration = millisUntilExpiration;
-        map = new LinkedHashMap<String,Entry>() {
+        map = new LinkedHashMap<>() {
             protected boolean removeEldestEntry(Map.Entry<String,Entry> eldest) {
               return size() > MAX_ENTRIES;
             }
--- a/src/java.base/share/classes/java/io/FilePermission.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/io/FilePermission.java	Mon Apr 27 09:17:39 2015 -0700
@@ -201,7 +201,7 @@
         }
 
         // store only the canonical cpath if possible
-        cpath = AccessController.doPrivileged(new PrivilegedAction<String>() {
+        cpath = AccessController.doPrivileged(new PrivilegedAction<>() {
             public String run() {
                 try {
                     String path = cpath;
--- a/src/java.base/share/classes/java/io/ObjectInputStream.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/io/ObjectInputStream.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1263,7 +1263,7 @@
      */
     private static boolean auditSubclass(final Class<?> subcl) {
         Boolean result = AccessController.doPrivileged(
-            new PrivilegedAction<Boolean>() {
+            new PrivilegedAction<>() {
                 public Boolean run() {
                     for (Class<?> cl = subcl;
                          cl != ObjectInputStream.class;
@@ -2255,7 +2255,7 @@
             try {
                 while (list != null) {
                     AccessController.doPrivileged(
-                        new PrivilegedExceptionAction<Void>()
+                        new PrivilegedExceptionAction<>()
                     {
                         public Void run() throws InvalidObjectException {
                             list.obj.validateObject();
--- a/src/java.base/share/classes/java/io/ObjectOutputStream.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/io/ObjectOutputStream.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1066,7 +1066,7 @@
      */
     private static boolean auditSubclass(final Class<?> subcl) {
         Boolean result = AccessController.doPrivileged(
-            new PrivilegedAction<Boolean>() {
+            new PrivilegedAction<>() {
                 public Boolean run() {
                     for (Class<?> cl = subcl;
                          cl != ObjectOutputStream.class;
--- a/src/java.base/share/classes/java/io/ObjectStreamClass.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/io/ObjectStreamClass.java	Mon Apr 27 09:17:39 2015 -0700
@@ -367,7 +367,7 @@
                 entry = th;
             }
             if (future.set(entry)) {
-                Caches.localDescs.put(key, new SoftReference<Object>(entry));
+                Caches.localDescs.put(key, new SoftReference<>(entry));
             } else {
                 // nested lookup call already set future
                 entry = future.get();
@@ -430,7 +430,7 @@
             }
             if (interrupted) {
                 AccessController.doPrivileged(
-                    new PrivilegedAction<Void>() {
+                    new PrivilegedAction<>() {
                         public Void run() {
                             Thread.currentThread().interrupt();
                             return null;
@@ -465,7 +465,7 @@
         localDesc = this;
 
         if (serializable) {
-            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                 public Void run() {
                     if (isEnum) {
                         suid = Long.valueOf(0);
@@ -1733,7 +1733,7 @@
             for (int i = 0; i < fields.length; i++) {
                 fieldSigs[i] = new MemberSignature(fields[i]);
             }
-            Arrays.sort(fieldSigs, new Comparator<MemberSignature>() {
+            Arrays.sort(fieldSigs, new Comparator<>() {
                 public int compare(MemberSignature ms1, MemberSignature ms2) {
                     return ms1.name.compareTo(ms2.name);
                 }
@@ -1764,7 +1764,7 @@
             for (int i = 0; i < cons.length; i++) {
                 consSigs[i] = new MemberSignature(cons[i]);
             }
-            Arrays.sort(consSigs, new Comparator<MemberSignature>() {
+            Arrays.sort(consSigs, new Comparator<>() {
                 public int compare(MemberSignature ms1, MemberSignature ms2) {
                     return ms1.signature.compareTo(ms2.signature);
                 }
@@ -1787,7 +1787,7 @@
             for (int i = 0; i < methods.length; i++) {
                 methSigs[i] = new MemberSignature(methods[i]);
             }
-            Arrays.sort(methSigs, new Comparator<MemberSignature>() {
+            Arrays.sort(methSigs, new Comparator<>() {
                 public int compare(MemberSignature ms1, MemberSignature ms2) {
                     int comp = ms1.name.compareTo(ms2.name);
                     if (comp == 0) {
@@ -2164,7 +2164,7 @@
                 entry = th;
             }
             future.set(entry);
-            Caches.reflectors.put(key, new SoftReference<Object>(entry));
+            Caches.reflectors.put(key, new SoftReference<>(entry));
         }
 
         if (entry instanceof FieldReflector) {
--- a/src/java.base/share/classes/java/lang/CharacterName.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/lang/CharacterName.java	Mon Apr 27 09:17:39 2015 -0700
@@ -45,7 +45,7 @@
         DataInputStream dis = null;
         try {
             dis = new DataInputStream(new InflaterInputStream(
-                AccessController.doPrivileged(new PrivilegedAction<InputStream>()
+                AccessController.doPrivileged(new PrivilegedAction<>()
                 {
                     public InputStream run() {
                         return getClass().getResourceAsStream("uniName.dat");
--- a/src/java.base/share/classes/java/lang/Class.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/lang/Class.java	Mon Apr 27 09:17:39 2015 -0700
@@ -437,7 +437,7 @@
                 // (the stack depth is wrong for the Constructor's
                 // security check to work)
                 java.security.AccessController.doPrivileged(
-                    new java.security.PrivilegedAction<Void>() {
+                    new java.security.PrivilegedAction<>() {
                         public Void run() {
                                 c.setAccessible(true);
                                 return null;
@@ -1068,7 +1068,7 @@
                                                  Reflection.getCallerClass(), true);
             // Client is ok to access declared methods but j.l.Class might not be.
             Method[] candidates = AccessController.doPrivileged(
-                    new PrivilegedAction<Method[]>() {
+                    new PrivilegedAction<>() {
                         @Override
                         public Method[] run() {
                             return enclosingCandidate.getDeclaredMethods();
@@ -1228,7 +1228,7 @@
                                                  Reflection.getCallerClass(), true);
             // Client is ok to access declared methods but j.l.Class might not be.
             Constructor<?>[] candidates = AccessController.doPrivileged(
-                    new PrivilegedAction<Constructor<?>[]>() {
+                    new PrivilegedAction<>() {
                         @Override
                         public Constructor<?>[] run() {
                             return enclosingCandidate.getDeclaredConstructors();
@@ -1542,7 +1542,7 @@
         // has already been ok'd by the SecurityManager.
 
         return java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Class<?>[]>() {
+            new java.security.PrivilegedAction<>() {
                 public Class<?>[] run() {
                     List<Class<?>> list = new ArrayList<>();
                     Class<?> currentClass = Class.this;
@@ -3293,7 +3293,7 @@
     private static boolean initted = false;
     private static void checkInitted() {
         if (initted) return;
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
                 public Void run() {
                     // Tests to ensure the system properties table is fully
                     // initialized. This is needed because reflection code is
@@ -3349,7 +3349,7 @@
             try {
                 final Method values = getMethod("values");
                 java.security.AccessController.doPrivileged(
-                    new java.security.PrivilegedAction<Void>() {
+                    new java.security.PrivilegedAction<>() {
                         public Void run() {
                                 values.setAccessible(true);
                                 return null;
--- a/src/java.base/share/classes/java/lang/ClassLoader.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/lang/ClassLoader.java	Mon Apr 27 09:17:39 2015 -0700
@@ -496,7 +496,7 @@
             final String name = cls.getName();
             final int i = name.lastIndexOf('.');
             if (i != -1) {
-                AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                AccessController.doPrivileged(new PrivilegedAction<>() {
                     public Void run() {
                         sm.checkPackageAccess(name.substring(0, i));
                         return null;
@@ -1265,7 +1265,7 @@
     {
         final Enumeration<Resource> e =
             getBootstrapClassPath().getResources(name);
-        return new Enumeration<URL> () {
+        return new Enumeration<> () {
             public URL nextElement() {
                 return e.nextElement().getURL();
             }
@@ -1867,7 +1867,7 @@
         boolean isBuiltin = (name != null);
         if (!isBuiltin) {
             name = AccessController.doPrivileged(
-                new PrivilegedAction<String>() {
+                new PrivilegedAction<>() {
                     public String run() {
                         try {
                             return file.exists() ? file.getCanonicalPath() : null;
--- a/src/java.base/share/classes/java/lang/Package.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/lang/Package.java	Mon Apr 27 09:17:39 2015 -0700
@@ -595,7 +595,7 @@
 
         CachedManifest(final String fileName) {
             this.fileName = fileName;
-            this.url = AccessController.doPrivileged(new PrivilegedAction<URL>() {
+            this.url = AccessController.doPrivileged(new PrivilegedAction<>() {
                 public URL run() {
                     final File file = new File(fileName);
                     if (file.isFile()) {
@@ -626,7 +626,7 @@
                 if (m != null) {
                     return m;
                 }
-                m = AccessController.doPrivileged(new PrivilegedAction<Manifest>() {
+                m = AccessController.doPrivileged(new PrivilegedAction<>() {
                     public Manifest run() {
                         try (FileInputStream fis = new FileInputStream(fileName);
                              JarInputStream jis = new JarInputStream(fis, false)) {
--- a/src/java.base/share/classes/java/lang/SecurityManager.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/lang/SecurityManager.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1455,7 +1455,7 @@
             if (!packageAccessValid) {
                 String tmpPropertyStr =
                     AccessController.doPrivileged(
-                        new PrivilegedAction<String>() {
+                        new PrivilegedAction<>() {
                             public String run() {
                                 return java.security.Security.getProperty(
                                     "package.access");
@@ -1524,7 +1524,7 @@
             if (!packageDefinitionValid) {
                 String tmpPropertyStr =
                     AccessController.doPrivileged(
-                        new PrivilegedAction<String>() {
+                        new PrivilegedAction<>() {
                             public String run() {
                                 return java.security.Security.getProperty(
                                     "package.definition");
--- a/src/java.base/share/classes/java/lang/StringBuffer.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/lang/StringBuffer.java	Mon Apr 27 09:17:39 2015 -0700
@@ -206,6 +206,7 @@
     }
 
     /**
+     * @throws IndexOutOfBoundsException {@inheritDoc}
      * @since      1.5
      */
     @Override
@@ -214,6 +215,7 @@
     }
 
     /**
+     * @throws IndexOutOfBoundsException {@inheritDoc}
      * @since     1.5
      */
     @Override
@@ -222,6 +224,7 @@
     }
 
     /**
+     * @throws IndexOutOfBoundsException {@inheritDoc}
      * @since     1.5
      */
     @Override
@@ -230,6 +233,7 @@
     }
 
     /**
+     * @throws IndexOutOfBoundsException {@inheritDoc}
      * @since     1.5
      */
     @Override
--- a/src/java.base/share/classes/java/lang/System.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/lang/System.java	Mon Apr 27 09:17:39 2015 -0700
@@ -309,7 +309,7 @@
             // calls the installed security manager's checkPermission method
             // which will loop infinitely if there is a non-system class
             // (in this case: the new security manager class) on the stack).
-            AccessController.doPrivileged(new PrivilegedAction<Object>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                 public Object run() {
                     s.getClass().getProtectionDomain().implies
                         (SecurityConstants.ALL_PERMISSION);
--- a/src/java.base/share/classes/java/lang/Thread.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/lang/Thread.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1661,7 +1661,7 @@
      */
     private static boolean auditSubclass(final Class<?> subcl) {
         Boolean result = AccessController.doPrivileged(
-            new PrivilegedAction<Boolean>() {
+            new PrivilegedAction<>() {
                 public Boolean run() {
                     for (Class<?> cl = subcl;
                          cl != Thread.class;
--- a/src/java.base/share/classes/java/lang/invoke/InfoFromMemberName.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/lang/invoke/InfoFromMemberName.java	Mon Apr 27 09:17:39 2015 -0700
@@ -87,7 +87,7 @@
             // For more information see comments on {@link MethodHandleNatives#linkMethod}.
             throw new IllegalArgumentException("cannot reflect signature polymorphic method");
         }
-        Member mem = AccessController.doPrivileged(new PrivilegedAction<Member>() {
+        Member mem = AccessController.doPrivileged(new PrivilegedAction<>() {
                 public Member run() {
                     try {
                         return reflectUnchecked();
--- a/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java	Mon Apr 27 09:17:39 2015 -0700
@@ -194,7 +194,7 @@
         final Class<?> innerClass = spinInnerClass();
         if (invokedType.parameterCount() == 0) {
             final Constructor<?>[] ctrs = AccessController.doPrivileged(
-                    new PrivilegedAction<Constructor<?>[]>() {
+                    new PrivilegedAction<>() {
                 @Override
                 public Constructor<?>[] run() {
                     Constructor<?>[] ctrs = innerClass.getDeclaredConstructors();
@@ -311,7 +311,7 @@
 
         // If requested, dump out to a file for debugging purposes
         if (dumper != null) {
-            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                 @Override
                 public Void run() {
                     dumper.dumpClass(lambdaClassName, classBytes);
--- a/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Mon Apr 27 09:17:39 2015 -0700
@@ -167,7 +167,7 @@
     static void maybeDump(final String className, final byte[] classFile) {
         if (DUMP_CLASS_FILES) {
             java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     try {
                         String dumpName = className;
--- a/src/java.base/share/classes/java/lang/invoke/LambdaForm.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/lang/invoke/LambdaForm.java	Mon Apr 27 09:17:39 2015 -0700
@@ -631,7 +631,7 @@
      * as a sort of pre-invocation linkage step.)
      */
     public void prepare() {
-        if (COMPILE_THRESHOLD == 0) {
+        if (COMPILE_THRESHOLD == 0 && !isCompiled) {
             compileToBytecode();
         }
         if (this.vmentry != null) {
@@ -645,11 +645,11 @@
 
     /** Generate optimizable bytecode for this form. */
     MemberName compileToBytecode() {
-        MethodType invokerType = methodType();
-        assert(vmentry == null || vmentry.getMethodType().basicType().equals(invokerType));
         if (vmentry != null && isCompiled) {
             return vmentry;  // already compiled somehow
         }
+        MethodType invokerType = methodType();
+        assert(vmentry == null || vmentry.getMethodType().basicType().equals(invokerType));
         try {
             vmentry = InvokerBytecodeGenerator.generateCustomizedCode(this, invokerType);
             if (TRACE_INTERPRETER)
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java	Mon Apr 27 09:17:39 2015 -0700
@@ -51,7 +51,7 @@
     private static final int MAX_ARITY;
     static {
         final Object[] values = { 255 };
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
             public Void run() {
                 values[0] = Integer.getInteger(MethodHandleImpl.class.getName()+".MAX_ARITY", 255);
@@ -1234,7 +1234,7 @@
         private static final byte[] T_BYTES;
         static {
             final Object[] values = {null};
-            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                     public Void run() {
                         try {
                             Class<T> tClass = T.class;
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandleProxies.java	Mon Apr 27 09:17:39 2015 -0700
@@ -199,7 +199,7 @@
             // sun.invoke.WrapperInstance is a restricted interface not accessible
             // by any non-null class loader.
             final ClassLoader loader = proxyLoader;
-            proxy = AccessController.doPrivileged(new PrivilegedAction<Object>() {
+            proxy = AccessController.doPrivileged(new PrivilegedAction<>() {
                 public Object run() {
                     return Proxy.newProxyInstance(
                             loader,
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandleStatics.java	Mon Apr 27 09:17:39 2015 -0700
@@ -53,7 +53,7 @@
 
     static {
         final Object[] values = new Object[9];
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
                 public Void run() {
                     values[0] = Boolean.getBoolean("java.lang.invoke.MethodHandle.DEBUG_NAMES");
                     values[1] = Boolean.getBoolean("java.lang.invoke.MethodHandle.DUMP_CLASS_FILES");
--- a/src/java.base/share/classes/java/lang/invoke/ProxyClassesDumper.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/lang/invoke/ProxyClassesDumper.java	Mon Apr 27 09:17:39 2015 -0700
@@ -64,7 +64,7 @@
         try {
             path = path.trim();
             final Path dir = Paths.get(path.length() == 0 ? "." : path);
-            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                     @Override
                     public Void run() {
                         validateDumpDir(dir);
--- a/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/lang/invoke/SerializedLambda.java	Mon Apr 27 09:17:39 2015 -0700
@@ -218,7 +218,7 @@
 
     private Object readResolve() throws ReflectiveOperationException {
         try {
-            Method deserialize = AccessController.doPrivileged(new PrivilegedExceptionAction<Method>() {
+            Method deserialize = AccessController.doPrivileged(new PrivilegedExceptionAction<>() {
                 @Override
                 public Method run() throws Exception {
                     Method m = capturingClass.getDeclaredMethod("$deserializeLambda$", SerializedLambda.class);
--- a/src/java.base/share/classes/java/lang/ref/Finalizer.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/lang/ref/Finalizer.java	Mon Apr 27 09:17:39 2015 -0700
@@ -121,7 +121,7 @@
      */
     private static void forkSecondaryFinalizer(final Runnable proc) {
         AccessController.doPrivileged(
-            new PrivilegedAction<Void>() {
+            new PrivilegedAction<>() {
                 public Void run() {
                     ThreadGroup tg = Thread.currentThread().getThreadGroup();
                     for (ThreadGroup tgn = tg;
--- a/src/java.base/share/classes/java/lang/reflect/Proxy.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/lang/reflect/Proxy.java	Mon Apr 27 09:17:39 2015 -0700
@@ -728,7 +728,7 @@
 
             final Constructor<?> cons = cl.getConstructor(constructorParams);
             if (!Modifier.isPublic(cl.getModifiers())) {
-                AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                AccessController.doPrivileged(new PrivilegedAction<>() {
                     public Void run() {
                         cons.setAccessible(true);
                         return null;
--- a/src/java.base/share/classes/java/net/AbstractPlainDatagramSocketImpl.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/net/AbstractPlainDatagramSocketImpl.java	Mon Apr 27 09:17:39 2015 -0700
@@ -62,7 +62,7 @@
      */
     static {
         java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("net");
                     return null;
--- a/src/java.base/share/classes/java/net/AbstractPlainSocketImpl.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/net/AbstractPlainSocketImpl.java	Mon Apr 27 09:17:39 2015 -0700
@@ -79,7 +79,7 @@
      */
     static {
         java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("net");
                     return null;
--- a/src/java.base/share/classes/java/net/CookieManager.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/net/CookieManager.java	Mon Apr 27 09:17:39 2015 -0700
@@ -201,14 +201,13 @@
             throw new IllegalArgumentException("Argument is null");
         }
 
-        Map<String, List<String>> cookieMap =
-                        new java.util.HashMap<String, List<String>>();
+        Map<String, List<String>> cookieMap = new java.util.HashMap<>();
         // if there's no default CookieStore, no way for us to get any cookie
         if (cookieJar == null)
             return Collections.unmodifiableMap(cookieMap);
 
         boolean secureLink = "https".equalsIgnoreCase(uri.getScheme());
-        List<HttpCookie> cookies = new java.util.ArrayList<HttpCookie>();
+        List<HttpCookie> cookies = new java.util.ArrayList<>();
         String path = uri.getPath();
         if (path == null || path.isEmpty()) {
             path = "/";
@@ -411,7 +410,7 @@
     private List<String> sortByPath(List<HttpCookie> cookies) {
         Collections.sort(cookies, new CookiePathComparator());
 
-        List<String> cookieHeader = new java.util.ArrayList<String>();
+        List<String> cookieHeader = new java.util.ArrayList<>();
         for (HttpCookie cookie : cookies) {
             // Netscape cookie spec and RFC 2965 have different format of Cookie
             // header; RFC 2965 requires a leading $Version="1" string while Netscape
--- a/src/java.base/share/classes/java/net/DatagramPacket.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/net/DatagramPacket.java	Mon Apr 27 09:17:39 2015 -0700
@@ -47,7 +47,7 @@
      */
     static {
         java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("net");
                     return null;
--- a/src/java.base/share/classes/java/net/DatagramSocket.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/net/DatagramSocket.java	Mon Apr 27 09:17:39 2015 -0700
@@ -308,7 +308,7 @@
         // getDeclaredMethod, therefore we need permission to access the member
         try {
             AccessController.doPrivileged(
-                new PrivilegedExceptionAction<Void>() {
+                new PrivilegedExceptionAction<>() {
                     public Void run() throws NoSuchMethodException {
                         Class<?>[] cl = new Class<?>[1];
                         cl[0] = DatagramPacket.class;
--- a/src/java.base/share/classes/java/net/HttpConnectSocketImpl.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/net/HttpConnectSocketImpl.java	Mon Apr 27 09:17:39 2015 -0700
@@ -64,7 +64,7 @@
             serverSocketField = netClientClazz.getDeclaredField("serverSocket");
 
             java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction<Void>() {
+                new java.security.PrivilegedAction<>() {
                     public Void run() {
                         httpField.setAccessible(true);
                         serverSocketField.setAccessible(true);
@@ -146,7 +146,7 @@
     {
         try {
             return java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedExceptionAction<Socket>() {
+                new java.security.PrivilegedExceptionAction<>() {
                     public Socket run() throws IOException {
                         return doTunnel(urlString, timeout);
                 }
--- a/src/java.base/share/classes/java/net/HttpCookie.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/net/HttpCookie.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1125,7 +1125,7 @@
      * @return  list of strings; never null
      */
     private static List<String> splitMultiCookies(String header) {
-        List<String> cookies = new java.util.ArrayList<String>();
+        List<String> cookies = new java.util.ArrayList<>();
         int quoteCount = 0;
         int p, q;
 
--- a/src/java.base/share/classes/java/net/IDN.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/net/IDN.java	Mon Apr 27 09:17:39 2015 -0700
@@ -228,7 +228,7 @@
         try {
             final String IDN_PROFILE = "uidna.spp";
             if (System.getSecurityManager() != null) {
-                stream = AccessController.doPrivileged(new PrivilegedAction<InputStream>() {
+                stream = AccessController.doPrivileged(new PrivilegedAction<>() {
                     public InputStream run() {
                         return StringPrep.class.getResourceAsStream(IDN_PROFILE);
                     }
--- a/src/java.base/share/classes/java/net/InMemoryCookieStore.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/net/InMemoryCookieStore.java	Mon Apr 27 09:17:39 2015 -0700
@@ -62,9 +62,9 @@
      * The default ctor
      */
     public InMemoryCookieStore() {
-        cookieJar = new ArrayList<HttpCookie>();
-        domainIndex = new HashMap<String, List<HttpCookie>>();
-        uriIndex = new HashMap<URI, List<HttpCookie>>();
+        cookieJar = new ArrayList<>();
+        domainIndex = new HashMap<>();
+        uriIndex = new HashMap<>();
 
         lock = new ReentrantLock(false);
     }
@@ -115,7 +115,7 @@
             throw new NullPointerException("uri is null");
         }
 
-        List<HttpCookie> cookies = new ArrayList<HttpCookie>();
+        List<HttpCookie> cookies = new ArrayList<>();
         boolean secureLink = "https".equalsIgnoreCase(uri.getScheme());
         lock.lock();
         try {
@@ -157,7 +157,7 @@
      * of this cookie store.
      */
     public List<URI> getURIs() {
-        List<URI> uris = new ArrayList<URI>();
+        List<URI> uris = new ArrayList<>();
 
         lock.lock();
         try {
@@ -281,7 +281,7 @@
             String host, boolean secureLink) {
         // Use a separate list to handle cookies that need to be removed so
         // that there is no conflict with iterators.
-        ArrayList<HttpCookie> toRemove = new ArrayList<HttpCookie>();
+        ArrayList<HttpCookie> toRemove = new ArrayList<>();
         for (Map.Entry<String, List<HttpCookie>> entry : cookieIndex.entrySet()) {
             String domain = entry.getKey();
             List<HttpCookie> lst = entry.getValue();
@@ -368,7 +368,7 @@
 
                 cookies.add(cookie);
             } else {
-                cookies = new ArrayList<HttpCookie>();
+                cookies = new ArrayList<>();
                 cookies.add(cookie);
                 indexStore.put(index, cookies);
             }
--- a/src/java.base/share/classes/java/net/InetAddress.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/net/InetAddress.java	Mon Apr 27 09:17:39 2015 -0700
@@ -270,7 +270,7 @@
         preferIPv6Address = java.security.AccessController.doPrivileged(
             new GetBooleanAction("java.net.preferIPv6Addresses")).booleanValue();
         AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("net");
                     return null;
@@ -852,7 +852,7 @@
             final String providerName = provider;
             try {
                 nameService = java.security.AccessController.doPrivileged(
-                    new java.security.PrivilegedExceptionAction<NameService>() {
+                    new java.security.PrivilegedExceptionAction<>() {
                         public NameService run() {
                             Iterator<NameServiceDescriptor> itr =
                                 ServiceLoader.load(NameServiceDescriptor.class)
@@ -892,7 +892,7 @@
         String provider = null;;
         String propPrefix = "sun.net.spi.nameservice.provider.";
         int n = 1;
-        nameServices = new ArrayList<NameService>();
+        nameServices = new ArrayList<>();
         provider = AccessController.doPrivileged(
                 new GetPropertyAction(propPrefix + n));
         while (provider != null) {
--- a/src/java.base/share/classes/java/net/NetworkInterface.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/net/NetworkInterface.java	Mon Apr 27 09:17:39 2015 -0700
@@ -54,7 +54,7 @@
 
     static {
         AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("net");
                     return null;
@@ -167,7 +167,7 @@
      * @since 1.6
      */
     public java.util.List<InterfaceAddress> getInterfaceAddresses() {
-        java.util.List<InterfaceAddress> lst = new java.util.ArrayList<InterfaceAddress>(1);
+        java.util.List<InterfaceAddress> lst = new java.util.ArrayList<>(1);
         SecurityManager sec = System.getSecurityManager();
         for (int j=0; j<bindings.length; j++) {
             try {
@@ -346,7 +346,7 @@
         if (netifs == null)
             return null;
 
-        return new Enumeration<NetworkInterface>() {
+        return new Enumeration<>() {
             private int i = 0;
             public NetworkInterface nextElement() {
                 if (netifs != null && i < netifs.length) {
--- a/src/java.base/share/classes/java/net/Socket.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/net/Socket.java	Mon Apr 27 09:17:39 2015 -0700
@@ -470,7 +470,7 @@
         // getDeclaredMethod, therefore we need permission to access the member
 
         oldImpl = AccessController.doPrivileged
-                                (new PrivilegedAction<Boolean>() {
+                                (new PrivilegedAction<>() {
             public Boolean run() {
                 Class<?> clazz = impl.getClass();
                 while (true) {
@@ -911,7 +911,7 @@
         InputStream is = null;
         try {
             is = AccessController.doPrivileged(
-                new PrivilegedExceptionAction<InputStream>() {
+                new PrivilegedExceptionAction<>() {
                     public InputStream run() throws IOException {
                         return impl.getInputStream();
                     }
@@ -951,7 +951,7 @@
         OutputStream os = null;
         try {
             os = AccessController.doPrivileged(
-                new PrivilegedExceptionAction<OutputStream>() {
+                new PrivilegedExceptionAction<>() {
                     public OutputStream run() throws IOException {
                         return impl.getOutputStream();
                     }
--- a/src/java.base/share/classes/java/net/SocketPermission.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/net/SocketPermission.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1194,7 +1194,7 @@
      */
     private static int initEphemeralPorts(String suffix, int defval) {
         return AccessController.doPrivileged(
-            new PrivilegedAction<Integer>(){
+            new PrivilegedAction<>(){
                 public Integer run() {
                     int val = Integer.getInteger(
                             "jdk.net.ephemeralPortRange."+suffix, -1
@@ -1328,7 +1328,7 @@
      */
 
     public SocketPermissionCollection() {
-        perms = new ArrayList<SocketPermission>();
+        perms = new ArrayList<>();
     }
 
     /**
@@ -1466,7 +1466,7 @@
         // Get the one we want
         @SuppressWarnings("unchecked")
         Vector<SocketPermission> permissions = (Vector<SocketPermission>)gfields.get("permissions", null);
-        perms = new ArrayList<SocketPermission>(permissions.size());
+        perms = new ArrayList<>(permissions.size());
         perms.addAll(permissions);
     }
 }
--- a/src/java.base/share/classes/java/net/SocksSocketImpl.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/net/SocksSocketImpl.java	Mon Apr 27 09:17:39 2015 -0700
@@ -82,7 +82,7 @@
     {
         try {
             AccessController.doPrivileged(
-                new java.security.PrivilegedExceptionAction<Void>() {
+                new java.security.PrivilegedExceptionAction<>() {
                     public Void run() throws IOException {
                               superConnectServer(host, port, timeout);
                               cmdIn = getInputStream();
@@ -157,7 +157,7 @@
             final InetAddress addr = InetAddress.getByName(server);
             PasswordAuthentication pw =
                 java.security.AccessController.doPrivileged(
-                    new java.security.PrivilegedAction<PasswordAuthentication>() {
+                    new java.security.PrivilegedAction<>() {
                         public PasswordAuthentication run() {
                                 return Authenticator.requestPasswordAuthentication(
                                        server, addr, serverPort, "SOCKS5", "SOCKS authentication", null);
@@ -351,7 +351,7 @@
             // server is not null only when the socket was created with a
             // specified proxy in which case it does bypass the ProxySelector
             ProxySelector sel = java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction<ProxySelector>() {
+                new java.security.PrivilegedAction<>() {
                     public ProxySelector run() {
                             return ProxySelector.getDefault();
                         }
@@ -595,7 +595,7 @@
         InetAddress naddr = baddr;
         if (naddr.isAnyLocalAddress()) {
             naddr = AccessController.doPrivileged(
-                        new PrivilegedAction<InetAddress>() {
+                        new PrivilegedAction<>() {
                             public InetAddress run() {
                                 return cmdsock.getLocalAddress();
 
@@ -671,7 +671,7 @@
             // server is not null only when the socket was created with a
             // specified proxy in which case it does bypass the ProxySelector
             ProxySelector sel = java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction<ProxySelector>() {
+                new java.security.PrivilegedAction<>() {
                     public ProxySelector run() {
                             return ProxySelector.getDefault();
                         }
@@ -724,7 +724,7 @@
                 // Connects to the SOCKS server
                 try {
                     AccessController.doPrivileged(
-                        new PrivilegedExceptionAction<Void>() {
+                        new PrivilegedExceptionAction<>() {
                             public Void run() throws Exception {
                                 cmdsock = new Socket(new PlainSocketImpl());
                                 cmdsock.connect(new InetSocketAddress(server, serverPort));
@@ -755,7 +755,7 @@
         } else {
             try {
                 AccessController.doPrivileged(
-                    new PrivilegedExceptionAction<Void>() {
+                    new PrivilegedExceptionAction<>() {
                         public Void run() throws Exception {
                             cmdsock = new Socket(new PlainSocketImpl());
                             cmdsock.connect(new InetSocketAddress(server, serverPort));
--- a/src/java.base/share/classes/java/net/URL.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/net/URL.java	Mon Apr 27 09:17:39 2015 -0700
@@ -268,6 +268,23 @@
      *     createURLStreamHandler} method of each provider, if instantiated, is
      *     invoked, with the protocol string, until a provider returns non-null,
      *     or all providers have been exhausted.
+     * <li>If the previous step fails to find a protocol handler, the
+     *     constructor reads the value of the system property:
+     *     <blockquote>{@code
+     *         java.protocol.handler.pkgs
+     *     }</blockquote>
+     *     If the value of that system property is not {@code null},
+     *     it is interpreted as a list of packages separated by a vertical
+     *     slash character '{@code |}'. The constructor tries to load
+     *     the class named:
+     *     <blockquote>{@code
+     *         <package>.<protocol>.Handler
+     *     }</blockquote>
+     *     where {@code <package>} is replaced by the name of the package
+     *     and {@code <protocol>} is replaced by the name of the protocol.
+     *     If this class does not exist, or if the class exists but it is not
+     *     a subclass of {@code URLStreamHandler}, then the next package
+     *     in the list is tried.
      * <li>If the previous step fails to find a protocol handler, then the
      *     constructor tries to load a built-in protocol handler.
      *     If this class does not exist, or if the class exists but it is not a
@@ -1139,8 +1156,41 @@
         }
     }
 
+    private static URLStreamHandler lookupViaProperty(String protocol) {
+        String packagePrefixList = java.security.AccessController.doPrivileged(
+                new PrivilegedAction<>() {
+                    public String run() {
+                        return System.getProperty(protocolPathProp, "");
+                    }
+                });
+        String[] packagePrefixes = packagePrefixList.split("\\|");
+
+        URLStreamHandler handler = null;
+        for (int i=0; handler == null && i<packagePrefixes.length; i++) {
+            String packagePrefix = packagePrefixes[i].trim();
+            try {
+                String clsName = packagePrefix + "." + protocol + ".Handler";
+                Class<?> cls = null;
+                try {
+                    cls = Class.forName(clsName);
+                } catch (ClassNotFoundException e) {
+                    ClassLoader cl = ClassLoader.getSystemClassLoader();
+                    if (cl != null) {
+                        cls = cl.loadClass(clsName);
+                    }
+                }
+                if (cls != null) {
+                    handler = (URLStreamHandler)cls.newInstance();
+                }
+            } catch (Exception e) {
+                // any number of exceptions can get thrown here
+            }
+        }
+        return handler;
+    }
+
     private static Iterator<URLStreamHandlerProvider> providers() {
-        return new Iterator<URLStreamHandlerProvider>() {
+        return new Iterator<>() {
 
             ClassLoader cl = ClassLoader.getSystemClassLoader();
             ServiceLoader<URLStreamHandlerProvider> sl =
@@ -1193,7 +1243,7 @@
         gate.set(gate);
         try {
             return AccessController.doPrivileged(
-                new PrivilegedAction<URLStreamHandler>() {
+                new PrivilegedAction<>() {
                     public URLStreamHandler run() {
                         Iterator<URLStreamHandlerProvider> itr = providers();
                         while (itr.hasNext()) {
@@ -1251,6 +1301,10 @@
             if (handler == null && !protocol.equalsIgnoreCase("jar")) {
                 handler = lookupViaProviders(protocol);
             }
+
+            if (handler == null) {
+                handler = lookupViaProperty(protocol);
+            }
         }
 
         synchronized (streamHandlerLock) {
--- a/src/java.base/share/classes/java/net/URLClassLoader.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/net/URLClassLoader.java	Mon Apr 27 09:17:39 2015 -0700
@@ -359,7 +359,7 @@
         final Class<?> result;
         try {
             result = AccessController.doPrivileged(
-                new PrivilegedExceptionAction<Class<?>>() {
+                new PrivilegedExceptionAction<>() {
                     public Class<?> run() throws ClassNotFoundException {
                         String path = name.replace('.', '/').concat(".class");
                         Resource res = ucp.getResource(path, false);
@@ -564,7 +564,7 @@
          * The same restriction to finding classes applies to resources
          */
         URL url = AccessController.doPrivileged(
-            new PrivilegedAction<URL>() {
+            new PrivilegedAction<>() {
                 public URL run() {
                     return ucp.findResource(name, true);
                 }
@@ -587,7 +587,7 @@
     {
         final Enumeration<URL> e = ucp.findResources(name, true);
 
-        return new Enumeration<URL>() {
+        return new Enumeration<>() {
             private URL url = null;
 
             private boolean next() {
@@ -596,7 +596,7 @@
                 }
                 do {
                     URL u = AccessController.doPrivileged(
-                        new PrivilegedAction<URL>() {
+                        new PrivilegedAction<>() {
                             public URL run() {
                                 if (!e.hasMoreElements())
                                     return null;
@@ -704,7 +704,7 @@
             final SecurityManager sm = System.getSecurityManager();
             if (sm != null) {
                 final Permission fp = p;
-                AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                AccessController.doPrivileged(new PrivilegedAction<>() {
                     public Void run() throws SecurityException {
                         sm.checkPermission(fp);
                         return null;
@@ -735,7 +735,7 @@
         final AccessControlContext acc = AccessController.getContext();
         // Need a privileged block to create the class loader
         URLClassLoader ucl = AccessController.doPrivileged(
-            new PrivilegedAction<URLClassLoader>() {
+            new PrivilegedAction<>() {
                 public URLClassLoader run() {
                     return new FactoryURLClassLoader(urls, parent, acc);
                 }
@@ -760,7 +760,7 @@
         final AccessControlContext acc = AccessController.getContext();
         // Need a privileged block to create the class loader
         URLClassLoader ucl = AccessController.doPrivileged(
-            new PrivilegedAction<URLClassLoader>() {
+            new PrivilegedAction<>() {
                 public URLClassLoader run() {
                     return new FactoryURLClassLoader(urls, acc);
                 }
--- a/src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/nio/channels/AsynchronousFileChannel.java	Mon Apr 27 09:17:39 2015 -0700
@@ -296,7 +296,7 @@
     public static AsynchronousFileChannel open(Path file, OpenOption... options)
         throws IOException
     {
-        Set<OpenOption> set = new HashSet<OpenOption>(options.length);
+        Set<OpenOption> set = new HashSet<>(options.length);
         Collections.addAll(set, options);
         return open(file, set, null, NO_ATTRIBUTES);
     }
--- a/src/java.base/share/classes/java/nio/channels/FileChannel.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/nio/channels/FileChannel.java	Mon Apr 27 09:17:39 2015 -0700
@@ -330,7 +330,7 @@
     public static FileChannel open(Path path, OpenOption... options)
         throws IOException
     {
-        Set<OpenOption> set = new HashSet<OpenOption>(options.length);
+        Set<OpenOption> set = new HashSet<>(options.length);
         Collections.addAll(set, options);
         return open(path, set, NO_ATTRIBUTES);
     }
--- a/src/java.base/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/nio/channels/spi/AsynchronousChannelProvider.java	Mon Apr 27 09:17:39 2015 -0700
@@ -76,7 +76,7 @@
 
         private static AsynchronousChannelProvider load() {
             return AccessController
-                .doPrivileged(new PrivilegedAction<AsynchronousChannelProvider>() {
+                .doPrivileged(new PrivilegedAction<>() {
                     public AsynchronousChannelProvider run() {
                         AsynchronousChannelProvider p;
                         p = loadProviderFromProperty();
--- a/src/java.base/share/classes/java/nio/channels/spi/SelectorProvider.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/nio/channels/spi/SelectorProvider.java	Mon Apr 27 09:17:39 2015 -0700
@@ -172,7 +172,7 @@
             if (provider != null)
                 return provider;
             return AccessController.doPrivileged(
-                new PrivilegedAction<SelectorProvider>() {
+                new PrivilegedAction<>() {
                     public SelectorProvider run() {
                             if (loadProviderFromProperty())
                                 return provider;
--- a/src/java.base/share/classes/java/nio/charset/Charset.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/nio/charset/Charset.java	Mon Apr 27 09:17:39 2015 -0700
@@ -335,7 +335,7 @@
     // thrown.  Should be invoked with full privileges.
     //
     private static Iterator<CharsetProvider> providers() {
-        return new Iterator<CharsetProvider>() {
+        return new Iterator<>() {
 
                 ClassLoader cl = ClassLoader.getSystemClassLoader();
                 ServiceLoader<CharsetProvider> sl =
@@ -404,7 +404,7 @@
             gate.set(gate);
 
             return AccessController.doPrivileged(
-                new PrivilegedAction<Charset>() {
+                new PrivilegedAction<>() {
                     public Charset run() {
                         for (Iterator<CharsetProvider> i = providers();
                              i.hasNext();) {
@@ -428,7 +428,7 @@
         // returns ExtendedProvider, if installed
         private static CharsetProvider extendedProvider() {
             return AccessController.doPrivileged(
-                       new PrivilegedAction<CharsetProvider>() {
+                       new PrivilegedAction<>() {
                            public CharsetProvider run() {
                                 try {
                                     Class<?> epc
@@ -570,10 +570,10 @@
      */
     public static SortedMap<String,Charset> availableCharsets() {
         return AccessController.doPrivileged(
-            new PrivilegedAction<SortedMap<String,Charset>>() {
+            new PrivilegedAction<>() {
                 public SortedMap<String,Charset> run() {
                     TreeMap<String,Charset> m =
-                        new TreeMap<String,Charset>(
+                        new TreeMap<>(
                             ASCIICaseInsensitiveComparator.CASE_INSENSITIVE_ORDER);
                     put(standardProvider.charsets(), m);
                     CharsetProvider ecp = ExtendedProviderHolder.extendedProvider;
@@ -663,7 +663,7 @@
         if (aliasSet != null)
             return aliasSet;
         int n = aliases.length;
-        HashSet<String> hs = new HashSet<String>(n);
+        HashSet<String> hs = new HashSet<>(n);
         for (int i = 0; i < n; i++)
             hs.add(aliases[i]);
         aliasSet = Collections.unmodifiableSet(hs);
--- a/src/java.base/share/classes/java/nio/charset/CoderResult.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/nio/charset/CoderResult.java	Mon Apr 27 09:17:39 2015 -0700
@@ -204,13 +204,13 @@
             WeakReference<CoderResult> w;
             CoderResult e = null;
             if (cache == null) {
-                cache = new HashMap<Integer,WeakReference<CoderResult>>();
+                cache = new HashMap<>();
             } else if ((w = cache.get(k)) != null) {
                 e = w.get();
             }
             if (e == null) {
                 e = create(len);
-                cache.put(k, new WeakReference<CoderResult>(e));
+                cache.put(k, new WeakReference<>(e));
             }
             return e;
         }
--- a/src/java.base/share/classes/java/nio/file/FileSystems.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/nio/file/FileSystems.java	Mon Apr 27 09:17:39 2015 -0700
@@ -93,7 +93,7 @@
         private static FileSystem defaultFileSystem() {
             // load default provider
             FileSystemProvider provider = AccessController
-                .doPrivileged(new PrivilegedAction<FileSystemProvider>() {
+                .doPrivileged(new PrivilegedAction<>() {
                     public FileSystemProvider run() {
                         return getDefaultProvider();
                     }
--- a/src/java.base/share/classes/java/nio/file/Files.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/nio/file/Files.java	Mon Apr 27 09:17:39 2015 -0700
@@ -402,7 +402,7 @@
     public static SeekableByteChannel newByteChannel(Path path, OpenOption... options)
         throws IOException
     {
-        Set<OpenOption> set = new HashSet<OpenOption>(options.length);
+        Set<OpenOption> set = new HashSet<>(options.length);
         Collections.addAll(set, options);
         return newByteChannel(path, set);
     }
@@ -516,7 +516,7 @@
         // create a matcher and return a filter that uses it.
         FileSystem fs = dir.getFileSystem();
         final PathMatcher matcher = fs.getPathMatcher("glob:" + glob);
-        DirectoryStream.Filter<Path> filter = new DirectoryStream.Filter<Path>() {
+        DirectoryStream.Filter<Path> filter = new DirectoryStream.Filter<>() {
             @Override
             public boolean accept(Path entry)  {
                 return matcher.matches(entry.getFileName());
@@ -1541,7 +1541,7 @@
         // creates the default file type detector
         private static FileTypeDetector createDefaultFileTypeDetector() {
             return AccessController
-                .doPrivileged(new PrivilegedAction<FileTypeDetector>() {
+                .doPrivileged(new PrivilegedAction<>() {
                     @Override public FileTypeDetector run() {
                         return sun.nio.fs.DefaultFileTypeDetector.create();
                 }});
@@ -1550,7 +1550,7 @@
         // loads all installed file type detectors
         private static List<FileTypeDetector> loadInstalledDetectors() {
             return AccessController
-                .doPrivileged(new PrivilegedAction<List<FileTypeDetector>>() {
+                .doPrivileged(new PrivilegedAction<>() {
                     @Override public List<FileTypeDetector> run() {
                         List<FileTypeDetector> list = new ArrayList<>();
                         ServiceLoader<FileTypeDetector> loader = ServiceLoader
@@ -3468,7 +3468,7 @@
             final Iterator<Path> delegate = ds.iterator();
 
             // Re-wrap DirectoryIteratorException to UncheckedIOException
-            Iterator<Path> iterator = new Iterator<Path>() {
+            Iterator<Path> iterator = new Iterator<>() {
                 @Override
                 public boolean hasNext() {
                     try {
--- a/src/java.base/share/classes/java/nio/file/Path.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/nio/file/Path.java	Mon Apr 27 09:17:39 2015 -0700
@@ -801,7 +801,7 @@
      */
     @Override
     default Iterator<Path> iterator() {
-        return new Iterator<Path>() {
+        return new Iterator<>() {
             private int i = 0;
 
             @Override
--- a/src/java.base/share/classes/java/nio/file/attribute/AclEntry.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/nio/file/attribute/AclEntry.java	Mon Apr 27 09:17:39 2015 -0700
@@ -306,7 +306,7 @@
      * @return the permissions component
      */
     public Set<AclEntryPermission> permissions() {
-        return new HashSet<AclEntryPermission>(perms);
+        return new HashSet<>(perms);
     }
 
     /**
@@ -317,7 +317,7 @@
      * @return the flags component
      */
     public Set<AclEntryFlag> flags() {
-        return new HashSet<AclEntryFlag>(flags);
+        return new HashSet<>(flags);
     }
 
     /**
--- a/src/java.base/share/classes/java/nio/file/attribute/PosixFilePermissions.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/nio/file/attribute/PosixFilePermissions.java	Mon Apr 27 09:17:39 2015 -0700
@@ -160,13 +160,13 @@
     {
         // copy set and check for nulls (CCE will be thrown if an element is not
         // a PosixFilePermission)
-        perms = new HashSet<PosixFilePermission>(perms);
+        perms = new HashSet<>(perms);
         for (PosixFilePermission p: perms) {
             if (p == null)
                 throw new NullPointerException();
         }
         final Set<PosixFilePermission> value = perms;
-        return new FileAttribute<Set<PosixFilePermission>>() {
+        return new FileAttribute<>() {
             @Override
             public String name() {
                 return "posix:permissions";
--- a/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/nio/file/spi/FileSystemProvider.java	Mon Apr 27 09:17:39 2015 -0700
@@ -110,7 +110,7 @@
 
     // loads all installed providers
     private static List<FileSystemProvider> loadInstalledProviders() {
-        List<FileSystemProvider> list = new ArrayList<FileSystemProvider>();
+        List<FileSystemProvider> list = new ArrayList<>();
 
         ServiceLoader<FileSystemProvider> sl = ServiceLoader
             .load(FileSystemProvider.class, ClassLoader.getSystemClassLoader());
@@ -163,7 +163,7 @@
                     loadingProviders = true;
 
                     List<FileSystemProvider> list = AccessController
-                        .doPrivileged(new PrivilegedAction<List<FileSystemProvider>>() {
+                        .doPrivileged(new PrivilegedAction<>() {
                             @Override
                             public List<FileSystemProvider> run() {
                                 return loadInstalledProviders();
@@ -419,7 +419,7 @@
         throws IOException
     {
         int len = options.length;
-        Set<OpenOption> opts = new HashSet<OpenOption>(len + 3);
+        Set<OpenOption> opts = new HashSet<>(len + 3);
         if (len == 0) {
             opts.add(StandardOpenOption.CREATE);
             opts.add(StandardOpenOption.TRUNCATE_EXISTING);
--- a/src/java.base/share/classes/java/security/AccessControlContext.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/AccessControlContext.java	Mon Apr 27 09:17:39 2015 -0700
@@ -458,7 +458,7 @@
                     Thread.dumpStack();
                     final ProtectionDomain pd = context[i];
                     final Debug db = debug;
-                    AccessController.doPrivileged (new PrivilegedAction<Void>() {
+                    AccessController.doPrivileged (new PrivilegedAction<>() {
                         public Void run() {
                             db.println("domain that failed "+pd);
                             return null;
--- a/src/java.base/share/classes/java/security/AccessController.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/AccessController.java	Mon Apr 27 09:17:39 2015 -0700
@@ -612,7 +612,7 @@
 
     private static ProtectionDomain getCallerPD(final Class <?> caller) {
         ProtectionDomain callerPd = doPrivileged
-            (new PrivilegedAction<ProtectionDomain>() {
+            (new PrivilegedAction<>() {
             public ProtectionDomain run() {
                 return caller.getProtectionDomain();
             }
--- a/src/java.base/share/classes/java/security/AllPermission.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/AllPermission.java	Mon Apr 27 09:17:39 2015 -0700
@@ -212,7 +212,7 @@
      * @return an enumeration of all the AllPermission objects.
      */
     public Enumeration<Permission> elements() {
-        return new Enumeration<Permission>() {
+        return new Enumeration<>() {
             private boolean hasMore = all_allowed;
 
             public boolean hasMoreElements() {
--- a/src/java.base/share/classes/java/security/BasicPermission.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/BasicPermission.java	Mon Apr 27 09:17:39 2015 -0700
@@ -332,7 +332,7 @@
      */
 
     public BasicPermissionCollection(Class<?> clazz) {
-        perms = new HashMap<String, Permission>(11);
+        perms = new HashMap<>(11);
         all_allowed = false;
         permClass = clazz;
     }
@@ -533,7 +533,7 @@
         @SuppressWarnings("unchecked")
         Hashtable<String, Permission> permissions =
                 (Hashtable<String, Permission>)gfields.get("permissions", null);
-        perms = new HashMap<String, Permission>(permissions.size()*2);
+        perms = new HashMap<>(permissions.size()*2);
         perms.putAll(permissions);
 
         // Get all_allowed
--- a/src/java.base/share/classes/java/security/CodeSource.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/CodeSource.java	Mon Apr 27 09:17:39 2015 -0700
@@ -543,7 +543,7 @@
         if (size > 0) {
             // we know of 3 different cert types: X.509, PGP, SDSI, which
             // could all be present in the stream at the same time
-            cfs = new Hashtable<String, CertificateFactory>(3);
+            cfs = new Hashtable<>(3);
             this.certs = new java.security.cert.Certificate[size];
         }
 
--- a/src/java.base/share/classes/java/security/Identity.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/Identity.java	Mon Apr 27 09:17:39 2015 -0700
@@ -185,7 +185,7 @@
 
         check("setIdentityPublicKey");
         this.publicKey = key;
-        certificates = new Vector<Certificate>();
+        certificates = new Vector<>();
     }
 
     /**
@@ -248,7 +248,7 @@
         check("addIdentityCertificate");
 
         if (certificates == null) {
-            certificates = new Vector<Certificate>();
+            certificates = new Vector<>();
         }
         if (publicKey != null) {
             if (!keyEquals(publicKey, certificate.getPublicKey())) {
--- a/src/java.base/share/classes/java/security/IdentityScope.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/IdentityScope.java	Mon Apr 27 09:17:39 2015 -0700
@@ -74,7 +74,7 @@
     private static void initializeSystemScope() {
 
         String classname = AccessController.doPrivileged(
-                                new PrivilegedAction<String>() {
+                                new PrivilegedAction<>() {
             public String run() {
                 return Security.getProperty("system.scope");
             }
--- a/src/java.base/share/classes/java/security/KeyStore.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/KeyStore.java	Mon Apr 27 09:17:39 2015 -0700
@@ -976,7 +976,7 @@
      */
     public final static String getDefaultType() {
         String kstype;
-        kstype = AccessController.doPrivileged(new PrivilegedAction<String>() {
+        kstype = AccessController.doPrivileged(new PrivilegedAction<>() {
             public String run() {
                 return Security.getProperty(KEYSTORE_TYPE);
             }
--- a/src/java.base/share/classes/java/security/Permissions.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/Permissions.java	Mon Apr 27 09:17:39 2015 -0700
@@ -99,7 +99,7 @@
      * Creates a new Permissions object containing no PermissionCollections.
      */
     public Permissions() {
-        permsMap = new HashMap<Class<?>, PermissionCollection>(11);
+        permsMap = new HashMap<>(11);
         allPermission = null;
     }
 
@@ -394,7 +394,7 @@
         @SuppressWarnings("unchecked")
         Hashtable<Class<?>, PermissionCollection> perms =
             (Hashtable<Class<?>, PermissionCollection>)gfields.get("perms", null);
-        permsMap = new HashMap<Class<?>, PermissionCollection>(perms.size()*2);
+        permsMap = new HashMap<>(perms.size()*2);
         permsMap.putAll(perms);
 
         // Set hasUnresolved
@@ -488,7 +488,7 @@
      */
 
     PermissionsHash() {
-        permsMap = new HashMap<Permission, Permission>(11);
+        permsMap = new HashMap<>(11);
     }
 
     /**
@@ -597,7 +597,7 @@
         @SuppressWarnings("unchecked")
         Hashtable<Permission, Permission> perms =
                 (Hashtable<Permission, Permission>)gfields.get("perms", null);
-        permsMap = new HashMap<Permission, Permission>(perms.size()*2);
+        permsMap = new HashMap<>(perms.size()*2);
         permsMap.putAll(perms);
     }
 }
--- a/src/java.base/share/classes/java/security/Policy.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/Policy.java	Mon Apr 27 09:17:39 2015 -0700
@@ -170,7 +170,7 @@
                 PolicyInfo pinfo = policy.get();
                 if (pinfo.policy == null) {
                     String policy_class = AccessController.doPrivileged(
-                        new PrivilegedAction<String>() {
+                        new PrivilegedAction<>() {
                         public String run() {
                             return Security.getProperty("policy.provider");
                         }
@@ -199,7 +199,7 @@
 
                         final String pc = policy_class;
                         Policy pol = AccessController.doPrivileged(
-                            new PrivilegedAction<Policy>() {
+                            new PrivilegedAction<>() {
                             public Policy run() {
                                 try {
                                     ClassLoader cl =
@@ -303,7 +303,7 @@
          */
 
         ProtectionDomain policyDomain =
-        AccessController.doPrivileged(new PrivilegedAction<ProtectionDomain>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             public ProtectionDomain run() {
                 return p.getClass().getProtectionDomain();
             }
--- a/src/java.base/share/classes/java/security/ProtectionDomain.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/ProtectionDomain.java	Mon Apr 27 09:17:39 2015 -0700
@@ -367,7 +367,7 @@
 
         PermissionCollection perms =
             java.security.AccessController.doPrivileged
-            (new java.security.PrivilegedAction<PermissionCollection>() {
+            (new java.security.PrivilegedAction<>() {
                     public PermissionCollection run() {
                         Policy p = Policy.getPolicyNoCheck();
                         return p.getPermissions(ProtectionDomain.this);
--- a/src/java.base/share/classes/java/security/Provider.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/Provider.java	Mon Apr 27 09:17:39 2015 -0700
@@ -711,7 +711,7 @@
 
         legacyChanged = true;
         if (legacyStrings == null) {
-            legacyStrings = new LinkedHashMap<String,String>();
+            legacyStrings = new LinkedHashMap<>();
         }
         return true;
     }
@@ -773,7 +773,7 @@
     private void implReplaceAll(BiFunction<? super Object, ? super Object, ? extends Object> function) {
         legacyChanged = true;
         if (legacyStrings == null) {
-            legacyStrings = new LinkedHashMap<String,String>();
+            legacyStrings = new LinkedHashMap<>();
         } else {
             legacyStrings.replaceAll((BiFunction<? super String, ? super String, ? extends String>) function);
         }
@@ -905,7 +905,7 @@
         }
         serviceSet = null;
         if (legacyMap == null) {
-            legacyMap = new LinkedHashMap<ServiceKey,Service>();
+            legacyMap = new LinkedHashMap<>();
         } else {
             legacyMap.clear();
         }
@@ -1133,7 +1133,7 @@
                     ("service.getProvider() must match this Provider object");
         }
         if (serviceMap == null) {
-            serviceMap = new LinkedHashMap<ServiceKey,Service>();
+            serviceMap = new LinkedHashMap<>();
         }
         servicesChanged = true;
         String type = s.getType();
@@ -1305,7 +1305,7 @@
     }
 
     static {
-        knownEngines = new HashMap<String,EngineDescription>();
+        knownEngines = new HashMap<>();
         // JCA
         addEngine("AlgorithmParameterGenerator",        false, null);
         addEngine("AlgorithmParameters",                false, null);
@@ -1431,14 +1431,14 @@
 
         private void addAlias(String alias) {
             if (aliases.isEmpty()) {
-                aliases = new ArrayList<String>(2);
+                aliases = new ArrayList<>(2);
             }
             aliases.add(alias);
         }
 
         void addAttribute(String type, String value) {
             if (attributes.isEmpty()) {
-                attributes = new HashMap<UString,String>(8);
+                attributes = new HashMap<>(8);
             }
             attributes.put(new UString(type), value);
         }
@@ -1471,12 +1471,12 @@
             if (aliases == null) {
                 this.aliases = Collections.<String>emptyList();
             } else {
-                this.aliases = new ArrayList<String>(aliases);
+                this.aliases = new ArrayList<>(aliases);
             }
             if (attributes == null) {
                 this.attributes = Collections.<UString,String>emptyMap();
             } else {
-                this.attributes = new HashMap<UString,String>();
+                this.attributes = new HashMap<>();
                 for (Map.Entry<String,String> entry : attributes.entrySet()) {
                     this.attributes.put(new UString(entry.getKey()), entry.getValue());
                 }
@@ -1644,7 +1644,7 @@
                             ("class configured for " + type + " (provider: " +
                             provider.getName() + ") is not public.");
                     }
-                    classRef = new WeakReference<Class<?>>(clazz);
+                    classRef = new WeakReference<>(clazz);
                 }
                 return clazz;
             } catch (ClassNotFoundException e) {
--- a/src/java.base/share/classes/java/security/SecureRandom.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/SecureRandom.java	Mon Apr 27 09:17:39 2015 -0700
@@ -616,7 +616,7 @@
             throws NoSuchAlgorithmException {
 
         String property = AccessController.doPrivileged(
-            new PrivilegedAction<String>() {
+            new PrivilegedAction<>() {
                 @Override
                 public String run() {
                     return Security.getProperty(
--- a/src/java.base/share/classes/java/security/Security.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/Security.java	Mon Apr 27 09:17:39 2015 -0700
@@ -66,7 +66,7 @@
         // things in initialize that might require privs.
         // (the FileInputStream call and the File.exists call,
         // the securityPropFile call, etc)
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             public Void run() {
                 initialize();
                 return null;
@@ -810,7 +810,7 @@
         final boolean pd = key.equals("package.definition");
 
         if (pa || pd) {
-            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                 public Void run() {
                     try {
                         /* Get the class via the bootstrap class loader. */
--- a/src/java.base/share/classes/java/security/Signature.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/Signature.java	Mon Apr 27 09:17:39 2015 -0700
@@ -265,7 +265,7 @@
     private final static Map<String,Boolean> signatureInfo;
 
     static {
-        signatureInfo = new ConcurrentHashMap<String,Boolean>();
+        signatureInfo = new ConcurrentHashMap<>();
         Boolean TRUE = Boolean.TRUE;
         // pre-initialize with values for our SignatureSpi implementations
         signatureInfo.put("sun.security.provider.DSA$RawDSA", TRUE);
--- a/src/java.base/share/classes/java/security/Signer.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/Signer.java	Mon Apr 27 09:17:39 2015 -0700
@@ -140,7 +140,7 @@
         }
         try {
             AccessController.doPrivileged(
-                new PrivilegedExceptionAction<Void>() {
+                new PrivilegedExceptionAction<>() {
                 public Void run() throws KeyManagementException {
                     setPublicKey(pub);
                     return null;
--- a/src/java.base/share/classes/java/security/UnresolvedPermission.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/UnresolvedPermission.java	Mon Apr 27 09:17:39 2015 -0700
@@ -560,7 +560,7 @@
         if (size > 0) {
             // we know of 3 different cert types: X.509, PGP, SDSI, which
             // could all be present in the stream at the same time
-            cfs = new Hashtable<String, CertificateFactory>(3);
+            cfs = new Hashtable<>(3);
             this.certs = new java.security.cert.Certificate[size];
         }
 
--- a/src/java.base/share/classes/java/security/UnresolvedPermissionCollection.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/UnresolvedPermissionCollection.java	Mon Apr 27 09:17:39 2015 -0700
@@ -61,7 +61,7 @@
      *
      */
     public UnresolvedPermissionCollection() {
-        perms = new HashMap<String, List<UnresolvedPermission>>(11);
+        perms = new HashMap<>(11);
     }
 
     /**
@@ -82,7 +82,7 @@
         synchronized (this) {
             v = perms.get(up.getName());
             if (v == null) {
-                v = new ArrayList<UnresolvedPermission>();
+                v = new ArrayList<>();
                 perms.put(up.getName(), v);
             }
         }
@@ -203,7 +203,7 @@
         Hashtable<String, Vector<UnresolvedPermission>> permissions =
                 (Hashtable<String, Vector<UnresolvedPermission>>)
                 gfields.get("permissions", null);
-        perms = new HashMap<String, List<UnresolvedPermission>>(permissions.size()*2);
+        perms = new HashMap<>(permissions.size()*2);
 
         // Convert each entry (Vector) into a List
         Set<Map.Entry<String, Vector<UnresolvedPermission>>> set = permissions.entrySet();
--- a/src/java.base/share/classes/java/security/cert/CertPathBuilder.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/cert/CertPathBuilder.java	Mon Apr 27 09:17:39 2015 -0700
@@ -301,7 +301,7 @@
      */
     public final static String getDefaultType() {
         String cpbtype =
-            AccessController.doPrivileged(new PrivilegedAction<String>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                 public String run() {
                     return Security.getProperty(CPB_TYPE);
                 }
--- a/src/java.base/share/classes/java/security/cert/CertPathValidator.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/cert/CertPathValidator.java	Mon Apr 27 09:17:39 2015 -0700
@@ -313,7 +313,7 @@
      */
     public final static String getDefaultType() {
         String cpvtype =
-            AccessController.doPrivileged(new PrivilegedAction<String>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                 public String run() {
                     return Security.getProperty(CPV_TYPE);
                 }
--- a/src/java.base/share/classes/java/security/cert/CertStore.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/cert/CertStore.java	Mon Apr 27 09:17:39 2015 -0700
@@ -409,7 +409,7 @@
      */
     public final static String getDefaultType() {
         String cstype;
-        cstype = AccessController.doPrivileged(new PrivilegedAction<String>() {
+        cstype = AccessController.doPrivileged(new PrivilegedAction<>() {
             public String run() {
                 return Security.getProperty(CERTSTORE_TYPE);
             }
--- a/src/java.base/share/classes/java/security/cert/CertificateRevokedException.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/cert/CertificateRevokedException.java	Mon Apr 27 09:17:39 2015 -0700
@@ -231,7 +231,7 @@
         if (size == 0) {
             extensions = Collections.emptyMap();
         } else {
-            extensions = new HashMap<String, Extension>(size);
+            extensions = new HashMap<>(size);
         }
 
         // Read in the extensions and put the mappings in the extensions map
--- a/src/java.base/share/classes/java/security/cert/PKIXParameters.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/cert/PKIXParameters.java	Mon Apr 27 09:17:39 2015 -0700
@@ -120,8 +120,8 @@
         setTrustAnchors(trustAnchors);
 
         this.unmodInitialPolicies = Collections.<String>emptySet();
-        this.certPathCheckers = new ArrayList<PKIXCertPathChecker>();
-        this.certStores = new ArrayList<CertStore>();
+        this.certPathCheckers = new ArrayList<>();
+        this.certStores = new ArrayList<>();
     }
 
     /**
@@ -144,7 +144,7 @@
         if (keystore == null)
             throw new NullPointerException("the keystore parameter must be " +
                 "non-null");
-        Set<TrustAnchor> hashSet = new HashSet<TrustAnchor>();
+        Set<TrustAnchor> hashSet = new HashSet<>();
         Enumeration<String> aliases = keystore.aliases();
         while (aliases.hasMoreElements()) {
             String alias = aliases.nextElement();
@@ -156,8 +156,8 @@
         }
         setTrustAnchors(hashSet);
         this.unmodInitialPolicies = Collections.<String>emptySet();
-        this.certPathCheckers = new ArrayList<PKIXCertPathChecker>();
-        this.certStores = new ArrayList<CertStore>();
+        this.certPathCheckers = new ArrayList<>();
+        this.certStores = new ArrayList<>();
     }
 
     /**
@@ -207,7 +207,7 @@
             }
         }
         this.unmodTrustAnchors = Collections.unmodifiableSet
-                (new HashSet<TrustAnchor>(trustAnchors));
+                (new HashSet<>(trustAnchors));
     }
 
     /**
@@ -256,7 +256,7 @@
                         + "of type java.lang.String");
             }
             this.unmodInitialPolicies =
-                Collections.unmodifiableSet(new HashSet<String>(initialPolicies));
+                Collections.unmodifiableSet(new HashSet<>(initialPolicies));
         } else
             this.unmodInitialPolicies = Collections.<String>emptySet();
     }
@@ -280,7 +280,7 @@
      */
     public void setCertStores(List<CertStore> stores) {
         if (stores == null) {
-            this.certStores = new ArrayList<CertStore>();
+            this.certStores = new ArrayList<>();
         } else {
             for (Iterator<CertStore> i = stores.iterator(); i.hasNext();) {
                 if (!(i.next() instanceof CertStore)) {
@@ -288,7 +288,7 @@
                         + "of type java.security.cert.CertStore");
                 }
             }
-            this.certStores = new ArrayList<CertStore>(stores);
+            this.certStores = new ArrayList<>(stores);
         }
     }
 
@@ -316,7 +316,7 @@
      */
     public List<CertStore> getCertStores() {
         return Collections.unmodifiableList
-                (new ArrayList<CertStore>(this.certStores));
+                (new ArrayList<>(this.certStores));
     }
 
     /**
@@ -544,14 +544,13 @@
      */
     public void setCertPathCheckers(List<PKIXCertPathChecker> checkers) {
         if (checkers != null) {
-            List<PKIXCertPathChecker> tmpList =
-                        new ArrayList<PKIXCertPathChecker>();
+            List<PKIXCertPathChecker> tmpList = new ArrayList<>();
             for (PKIXCertPathChecker checker : checkers) {
                 tmpList.add((PKIXCertPathChecker)checker.clone());
             }
             this.certPathCheckers = tmpList;
         } else {
-            this.certPathCheckers = new ArrayList<PKIXCertPathChecker>();
+            this.certPathCheckers = new ArrayList<>();
         }
     }
 
@@ -567,7 +566,7 @@
      * @see #setCertPathCheckers
      */
     public List<PKIXCertPathChecker> getCertPathCheckers() {
-        List<PKIXCertPathChecker> tmpList = new ArrayList<PKIXCertPathChecker>();
+        List<PKIXCertPathChecker> tmpList = new ArrayList<>();
         for (PKIXCertPathChecker ck : certPathCheckers) {
             tmpList.add((PKIXCertPathChecker)ck.clone());
         }
@@ -667,11 +666,11 @@
 
             // must clone these because addCertStore, et al. modify them
             if (certStores != null) {
-                copy.certStores = new ArrayList<CertStore>(certStores);
+                copy.certStores = new ArrayList<>(certStores);
             }
             if (certPathCheckers != null) {
                 copy.certPathCheckers =
-                    new ArrayList<PKIXCertPathChecker>(certPathCheckers.size());
+                    new ArrayList<>(certPathCheckers.size());
                 for (PKIXCertPathChecker checker : certPathCheckers) {
                     copy.certPathCheckers.add(
                                     (PKIXCertPathChecker)checker.clone());
--- a/src/java.base/share/classes/java/security/cert/PKIXRevocationChecker.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/cert/PKIXRevocationChecker.java	Mon Apr 27 09:17:39 2015 -0700
@@ -170,7 +170,7 @@
     {
         this.ocspExtensions = (extensions == null)
                               ? Collections.<Extension>emptyList()
-                              : new ArrayList<Extension>(extensions);
+                              : new ArrayList<>(extensions);
     }
 
     /**
@@ -232,7 +232,7 @@
     public void setOptions(Set<Option> options) {
         this.options = (options == null)
                        ? Collections.<Option>emptySet()
-                       : new HashSet<Option>(options);
+                       : new HashSet<>(options);
     }
 
     /**
--- a/src/java.base/share/classes/java/security/cert/X509CRLSelector.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/cert/X509CRLSelector.java	Mon Apr 27 09:17:39 2015 -0700
@@ -124,8 +124,8 @@
             issuerX500Principals = null;
         } else {
             // clone
-            issuerX500Principals = new HashSet<X500Principal>(issuers);
-            issuerNames = new HashSet<Object>();
+            issuerX500Principals = new HashSet<>(issuers);
+            issuerNames = new HashSet<>();
             for (X500Principal p : issuerX500Principals) {
                 issuerNames.add(p.getEncoded());
             }
@@ -288,10 +288,10 @@
      */
     private void addIssuerNameInternal(Object name, X500Principal principal) {
         if (issuerNames == null) {
-            issuerNames = new HashSet<Object>();
+            issuerNames = new HashSet<>();
         }
         if (issuerX500Principals == null) {
-            issuerX500Principals = new HashSet<X500Principal>();
+            issuerX500Principals = new HashSet<>();
         }
         issuerNames.add(name);
         issuerX500Principals.add(principal);
@@ -311,7 +311,7 @@
     private static HashSet<Object> cloneAndCheckIssuerNames(Collection<?> names)
         throws IOException
     {
-        HashSet<Object> namesCopy = new HashSet<Object>();
+        HashSet<Object> namesCopy = new HashSet<>();
         Iterator<?> i = names.iterator();
         while (i.hasNext()) {
             Object nameObject = i.next();
@@ -363,7 +363,7 @@
      */
     private static HashSet<X500Principal> parseIssuerNames(Collection<Object> names)
     throws IOException {
-        HashSet<X500Principal> x500Principals = new HashSet<X500Principal>();
+        HashSet<X500Principal> x500Principals = new HashSet<>();
         for (Iterator<Object> t = names.iterator(); t.hasNext(); ) {
             Object nameObject = t.next();
             if (nameObject instanceof String) {
@@ -701,9 +701,9 @@
             X509CRLSelector copy = (X509CRLSelector)super.clone();
             if (issuerNames != null) {
                 copy.issuerNames =
-                        new HashSet<Object>(issuerNames);
+                        new HashSet<>(issuerNames);
                 copy.issuerX500Principals =
-                        new HashSet<X500Principal>(issuerX500Principals);
+                        new HashSet<>(issuerX500Principals);
             }
             return copy;
         } catch (CloneNotSupportedException e) {
--- a/src/java.base/share/classes/java/security/cert/X509CertSelector.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/security/cert/X509CertSelector.java	Mon Apr 27 09:17:39 2015 -0700
@@ -619,8 +619,8 @@
             keyPurposeOIDSet = null;
         } else {
             this.keyPurposeSet =
-                Collections.unmodifiableSet(new HashSet<String>(keyPurposeSet));
-            keyPurposeOIDSet = new HashSet<ObjectIdentifier>();
+                Collections.unmodifiableSet(new HashSet<>(keyPurposeSet));
+            keyPurposeOIDSet = new HashSet<>();
             for (String s : this.keyPurposeSet) {
                 keyPurposeOIDSet.add(new ObjectIdentifier(s));
             }
@@ -815,12 +815,12 @@
         // First, ensure that the name parses
         GeneralNameInterface tempName = makeGeneralNameInterface(type, name);
         if (subjectAlternativeNames == null) {
-            subjectAlternativeNames = new HashSet<List<?>>();
+            subjectAlternativeNames = new HashSet<>();
         }
         if (subjectAlternativeGeneralNames == null) {
-            subjectAlternativeGeneralNames = new HashSet<GeneralNameInterface>();
+            subjectAlternativeGeneralNames = new HashSet<>();
         }
-        List<Object> list = new ArrayList<Object>(2);
+        List<Object> list = new ArrayList<>(2);
         list.add(Integer.valueOf(type));
         list.add(name);
         subjectAlternativeNames.add(list);
@@ -845,7 +845,7 @@
      * @throws IOException if a parsing error occurs
      */
     private static Set<GeneralNameInterface> parseNames(Collection<List<?>> names) throws IOException {
-        Set<GeneralNameInterface> genNames = new HashSet<GeneralNameInterface>();
+        Set<GeneralNameInterface> genNames = new HashSet<>();
         for (List<?> nameList : names) {
             if (nameList.size() != 2) {
                 throw new IOException("name list size not 2");
@@ -1096,10 +1096,10 @@
         } else {
             // Snapshot set and parse it
             Set<String> tempSet = Collections.unmodifiableSet
-                                        (new HashSet<String>(certPolicySet));
+                                        (new HashSet<>(certPolicySet));
             /* Convert to Vector of ObjectIdentifiers */
             Iterator<String> i = tempSet.iterator();
-            Vector<CertificatePolicyId> polIdVector = new Vector<CertificatePolicyId>();
+            Vector<CertificatePolicyId> polIdVector = new Vector<>();
             while (i.hasNext()) {
                 Object o = i.next();
                 if (!(o instanceof String)) {
@@ -1267,10 +1267,10 @@
         // First, ensure that the name parses
         GeneralNameInterface tempName = makeGeneralNameInterface(type, name);
         if (pathToGeneralNames == null) {
-            pathToNames = new HashSet<List<?>>();
-            pathToGeneralNames = new HashSet<GeneralNameInterface>();
+            pathToNames = new HashSet<>();
+            pathToGeneralNames = new HashSet<>();
         }
-        List<Object> list = new ArrayList<Object>(2);
+        List<Object> list = new ArrayList<>(2);
         list.add(Integer.valueOf(type));
         list.add(name);
         pathToNames.add(list);
@@ -1671,10 +1671,10 @@
      */
     private static Set<List<?>> cloneAndCheckNames(Collection<List<?>> names) throws IOException {
         // Copy the Lists and Collection
-        Set<List<?>> namesCopy = new HashSet<List<?>>();
+        Set<List<?>> namesCopy = new HashSet<>();
         for (List<?> o : names)
         {
-            namesCopy.add(new ArrayList<Object>(o));
+            namesCopy.add(new ArrayList<>(o));
         }
 
         // Check the contents of the Lists and clone any byte arrays
@@ -2397,7 +2397,7 @@
              * Convert the Vector of PolicyInformation to a Vector
              * of CertificatePolicyIds for easier comparison.
              */
-            List<CertificatePolicyId> policyIDs = new ArrayList<CertificatePolicyId>(policies.size());
+            List<CertificatePolicyId> policyIDs = new ArrayList<>(policies.size());
             for (PolicyInformation info : policies) {
                 policyIDs.add(info.getPolicyIdentifier());
             }
--- a/src/java.base/share/classes/java/time/format/DateTimeParseContext.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/time/format/DateTimeParseContext.java	Mon Apr 27 09:17:39 2015 -0700
@@ -399,7 +399,7 @@
      */
     void addChronoChangedListener(Consumer<Chronology> listener) {
         if (chronoListeners == null) {
-            chronoListeners = new ArrayList<Consumer<Chronology>>();
+            chronoListeners = new ArrayList<>();
         }
         chronoListeners.add(listener);
     }
--- a/src/java.base/share/classes/java/time/zone/ZoneRulesProvider.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/time/zone/ZoneRulesProvider.java	Mon Apr 27 09:17:39 2015 -0700
@@ -141,7 +141,7 @@
         // if the property java.time.zone.DefaultZoneRulesProvider is
         // set then its value is the class name of the default provider
         final List<ZoneRulesProvider> loaded = new ArrayList<>();
-        AccessController.doPrivileged(new PrivilegedAction<Object>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             public Object run() {
                 String prop = System.getProperty("java.time.zone.DefaultZoneRulesProvider");
                 if (prop != null) {
--- a/src/java.base/share/classes/java/util/Calendar.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/util/Calendar.java	Mon Apr 27 09:17:39 2015 -0700
@@ -3579,7 +3579,7 @@
         ZoneInfo zi = null;
         try {
             zi = AccessController.doPrivileged(
-                    new PrivilegedExceptionAction<ZoneInfo>() {
+                    new PrivilegedExceptionAction<>() {
                         @Override
                         public ZoneInfo run() throws Exception {
                             return (ZoneInfo) input.readObject();
--- a/src/java.base/share/classes/java/util/Currency.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/util/Currency.java	Mon Apr 27 09:17:39 2015 -0700
@@ -212,7 +212,7 @@
     private static final int VALID_FORMAT_VERSION = 2;
 
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
             public Void run() {
                 try {
--- a/src/java.base/share/classes/java/util/ResourceBundle.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/util/ResourceBundle.java	Mon Apr 27 09:17:39 2015 -0700
@@ -2655,7 +2655,7 @@
                 InputStream stream = null;
                 try {
                     stream = AccessController.doPrivileged(
-                        new PrivilegedExceptionAction<InputStream>() {
+                        new PrivilegedExceptionAction<>() {
                             public InputStream run() throws IOException {
                                 InputStream is = null;
                                 if (reloadFlag) {
--- a/src/java.base/share/classes/java/util/TimeZone.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/util/TimeZone.java	Mon Apr 27 09:17:39 2015 -0700
@@ -678,7 +678,7 @@
         assert tz != null;
 
         final String id = zoneID;
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
                 public Void run() {
                     System.setProperty("user.timezone", id);
--- a/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java	Mon Apr 27 09:17:39 2015 -0700
@@ -2411,7 +2411,7 @@
                 int j = ((am & s) << ASHIFT) + ABASE;
                 U.putOrderedObject(a, j, task);
                 U.putOrderedInt(q, QTOP, s + 1);
-                U.putOrderedInt(q, QLOCK, 0);
+                U.putIntVolatile(q, QLOCK, 0);
                 if (n <= 1)
                     signalWork(ws, q);
                 return;
--- a/src/java.base/share/classes/java/util/jar/JarFile.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/util/jar/JarFile.java	Mon Apr 27 09:17:39 2015 -0700
@@ -593,7 +593,7 @@
         if (includeUnsigned) {
             return unsignedEntryNames();
         } else {
-            return new Enumeration<String>() {
+            return new Enumeration<>() {
 
                 public boolean hasMoreElements() {
                     return false;
@@ -619,7 +619,7 @@
 
         // screen out entries which are never signed
         final Enumeration<? extends ZipEntry> enum_ = super.entries();
-        return new Enumeration<JarEntry>() {
+        return new Enumeration<>() {
 
             ZipEntry entry;
 
@@ -669,7 +669,7 @@
 
     private Enumeration<String> unsignedEntryNames() {
         final Enumeration<JarEntry> entries = entries();
-        return new Enumeration<String>() {
+        return new Enumeration<>() {
 
             String name;
 
--- a/src/java.base/share/classes/java/util/jar/JarVerifier.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/java/util/jar/JarVerifier.java	Mon Apr 27 09:17:39 2015 -0700
@@ -684,7 +684,7 @@
         final List<CodeSigner[]> signersReq = req;
         final Enumeration<String> enum2 = (matchUnsigned) ? unsignedEntryNames(jar) : emptyEnumeration;
 
-        return new Enumeration<String>() {
+        return new Enumeration<>() {
 
             String name;
 
@@ -726,7 +726,7 @@
         final Map<String, CodeSigner[]> map = new HashMap<>();
         map.putAll(signerMap());
         final Enumeration<? extends ZipEntry> enum_ = e;
-        return new Enumeration<JarEntry>() {
+        return new Enumeration<>() {
 
             Enumeration<String> signers = null;
             JarEntry entry;
@@ -786,7 +786,7 @@
     private Enumeration<String> unsignedEntryNames(JarFile jar) {
         final Map<String, CodeSigner[]> map = signerMap();
         final Enumeration<JarEntry> entries = jar.entries();
-        return new Enumeration<String>() {
+        return new Enumeration<>() {
 
             String name;
 
--- a/src/java.base/share/classes/javax/crypto/JceSecurity.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/javax/crypto/JceSecurity.java	Mon Apr 27 09:17:39 2015 -0700
@@ -76,7 +76,7 @@
     static {
         try {
             AccessController.doPrivileged(
-                new PrivilegedExceptionAction<Void> () {
+                new PrivilegedExceptionAction<> () {
                     @Override
                     public Void run() throws Exception {
                         setupJurisdictionPolicies();
@@ -225,7 +225,7 @@
             URL url = codeBaseCacheRef.get(clazz);
             if (url == null) {
                 url = AccessController.doPrivileged(
-                    new PrivilegedAction<URL>() {
+                    new PrivilegedAction<>() {
                         @Override
                         public URL run() {
                             ProtectionDomain pd = clazz.getProtectionDomain();
--- a/src/java.base/share/classes/javax/crypto/JceSecurityManager.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/javax/crypto/JceSecurityManager.java	Mon Apr 27 09:17:39 2015 -0700
@@ -66,7 +66,7 @@
         exemptPolicy = JceSecurity.getExemptPolicy();
         allPerm = CryptoAllPermission.INSTANCE;
         INSTANCE = AccessController.doPrivileged(
-                new PrivilegedAction<JceSecurityManager>() {
+                new PrivilegedAction<>() {
                     public JceSecurityManager run() {
                         return new JceSecurityManager();
                     }
--- a/src/java.base/share/classes/javax/net/ssl/KeyManagerFactory.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/javax/net/ssl/KeyManagerFactory.java	Mon Apr 27 09:17:39 2015 -0700
@@ -63,7 +63,7 @@
      */
     public final static String getDefaultAlgorithm() {
         String type;
-        type = AccessController.doPrivileged(new PrivilegedAction<String>() {
+        type = AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
             public String run() {
                 return Security.getProperty(
--- a/src/java.base/share/classes/javax/net/ssl/SSLSocketFactory.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/javax/net/ssl/SSLSocketFactory.java	Mon Apr 27 09:17:39 2015 -0700
@@ -126,7 +126,7 @@
     }
 
     static String getSecurityProperty(final String name) {
-        return AccessController.doPrivileged(new PrivilegedAction<String>() {
+        return AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
             public String run() {
                 String s = java.security.Security.getProperty(name);
--- a/src/java.base/share/classes/javax/net/ssl/TrustManagerFactory.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/javax/net/ssl/TrustManagerFactory.java	Mon Apr 27 09:17:39 2015 -0700
@@ -63,7 +63,7 @@
      */
     public final static String getDefaultAlgorithm() {
         String type;
-        type = AccessController.doPrivileged(new PrivilegedAction<String>() {
+        type = AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
             public String run() {
                 return Security.getProperty(
--- a/src/java.base/share/classes/javax/security/auth/Subject.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/javax/security/auth/Subject.java	Mon Apr 27 09:17:39 2015 -0700
@@ -154,11 +154,11 @@
     public Subject() {
 
         this.principals = Collections.synchronizedSet
-                        (new SecureSet<Principal>(this, PRINCIPAL_SET));
+                        (new SecureSet<>(this, PRINCIPAL_SET));
         this.pubCredentials = Collections.synchronizedSet
-                        (new SecureSet<Object>(this, PUB_CREDENTIAL_SET));
+                        (new SecureSet<>(this, PUB_CREDENTIAL_SET));
         this.privCredentials = Collections.synchronizedSet
-                        (new SecureSet<Object>(this, PRIV_CREDENTIAL_SET));
+                        (new SecureSet<>(this, PRIV_CREDENTIAL_SET));
     }
 
     /**
@@ -206,11 +206,11 @@
         collectionNullClean(pubCredentials);
         collectionNullClean(privCredentials);
 
-        this.principals = Collections.synchronizedSet(new SecureSet<Principal>
+        this.principals = Collections.synchronizedSet(new SecureSet<>
                                 (this, PRINCIPAL_SET, principals));
-        this.pubCredentials = Collections.synchronizedSet(new SecureSet<Object>
+        this.pubCredentials = Collections.synchronizedSet(new SecureSet<>
                                 (this, PUB_CREDENTIAL_SET, pubCredentials));
-        this.privCredentials = Collections.synchronizedSet(new SecureSet<Object>
+        this.privCredentials = Collections.synchronizedSet(new SecureSet<>
                                 (this, PRIV_CREDENTIAL_SET, privCredentials));
         this.readOnly = readOnly;
     }
@@ -292,7 +292,7 @@
 
         // return the Subject from the DomainCombiner of the provided context
         return AccessController.doPrivileged
-            (new java.security.PrivilegedAction<Subject>() {
+            (new java.security.PrivilegedAction<>() {
             public Subject run() {
                 DomainCombiner dc = acc.getDomainCombiner();
                 if (!(dc instanceof SubjectDomainCombiner)) {
@@ -555,7 +555,7 @@
 
 
         return java.security.AccessController.doPrivileged
-            (new java.security.PrivilegedAction<AccessControlContext>() {
+            (new java.security.PrivilegedAction<>() {
             public AccessControlContext run() {
                 if (subject == null) {
                     return new AccessControlContext(acc, null);
@@ -801,7 +801,7 @@
             Set<Principal> thatPrincipals;
             synchronized(that.principals) {
                 // avoid deadlock from dual locks
-                thatPrincipals = new HashSet<Principal>(that.principals);
+                thatPrincipals = new HashSet<>(that.principals);
             }
             if (!principals.equals(thatPrincipals)) {
                 return false;
@@ -810,7 +810,7 @@
             Set<Object> thatPubCredentials;
             synchronized(that.pubCredentials) {
                 // avoid deadlock from dual locks
-                thatPubCredentials = new HashSet<Object>(that.pubCredentials);
+                thatPubCredentials = new HashSet<>(that.pubCredentials);
             }
             if (!pubCredentials.equals(thatPubCredentials)) {
                 return false;
@@ -819,7 +819,7 @@
             Set<Object> thatPrivCredentials;
             synchronized(that.privCredentials) {
                 // avoid deadlock from dual locks
-                thatPrivCredentials = new HashSet<Object>(that.privCredentials);
+                thatPrivCredentials = new HashSet<>(that.privCredentials);
             }
             if (!privCredentials.equals(thatPrivCredentials)) {
                 return false;
@@ -970,21 +970,21 @@
 
         // Rewrap the principals into a SecureSet
         try {
-            principals = Collections.synchronizedSet(new SecureSet<Principal>
+            principals = Collections.synchronizedSet(new SecureSet<>
                                 (this, PRINCIPAL_SET, inputPrincs));
         } catch (NullPointerException npe) {
             // Sometimes people deserialize the principals set only.
             // Subject is not accessible, so just don't fail.
             principals = Collections.synchronizedSet
-                        (new SecureSet<Principal>(this, PRINCIPAL_SET));
+                        (new SecureSet<>(this, PRINCIPAL_SET));
         }
 
         // The Credential {@code Set} is not serialized, but we do not
         // want the default deserialization routine to set it to null.
         this.pubCredentials = Collections.synchronizedSet
-                        (new SecureSet<Object>(this, PUB_CREDENTIAL_SET));
+                        (new SecureSet<>(this, PUB_CREDENTIAL_SET));
         this.privCredentials = Collections.synchronizedSet
-                        (new SecureSet<Object>(this, PRIV_CREDENTIAL_SET));
+                        (new SecureSet<>(this, PRIV_CREDENTIAL_SET));
     }
 
     /**
@@ -1497,7 +1497,7 @@
                 Object next;
                 if (which == Subject.PRIV_CREDENTIAL_SET) {
                     next = java.security.AccessController.doPrivileged
-                        (new java.security.PrivilegedAction<Object>() {
+                        (new java.security.PrivilegedAction<>() {
                         public Object run() {
                             return iterator.next();
                         }
--- a/src/java.base/share/classes/javax/security/auth/login/Configuration.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/javax/security/auth/login/Configuration.java	Mon Apr 27 09:17:39 2015 -0700
@@ -229,7 +229,7 @@
             if (configuration == null) {
                 String config_class = null;
                 config_class = AccessController.doPrivileged
-                    (new PrivilegedAction<String>() {
+                    (new PrivilegedAction<>() {
                     public String run() {
                         return java.security.Security.getProperty
                                     ("login.configuration.provider");
@@ -242,7 +242,7 @@
                 try {
                     final String finalClass = config_class;
                     Configuration untrustedImpl = AccessController.doPrivileged(
-                            new PrivilegedExceptionAction<Configuration>() {
+                            new PrivilegedExceptionAction<>() {
                                 public Configuration run() throws ClassNotFoundException,
                                         InstantiationException,
                                         IllegalAccessException {
@@ -254,7 +254,7 @@
                                 }
                             });
                     AccessController.doPrivileged(
-                            new PrivilegedExceptionAction<Void>() {
+                            new PrivilegedExceptionAction<>() {
                                 public Void run() {
                                     setConfiguration(untrustedImpl);
                                     return null;
--- a/src/java.base/share/classes/javax/security/cert/X509Certificate.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/javax/security/cert/X509Certificate.java	Mon Apr 27 09:17:39 2015 -0700
@@ -142,7 +142,7 @@
 
     static {
         X509Provider = AccessController.doPrivileged(
-            new PrivilegedAction<String>() {
+            new PrivilegedAction<>() {
                 public String run() {
                     return Security.getProperty(X509_PROVIDER);
                 }
--- a/src/java.base/share/classes/sun/misc/Cleaner.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/misc/Cleaner.java	Mon Apr 27 09:17:39 2015 -0700
@@ -142,7 +142,7 @@
         try {
             thunk.run();
         } catch (final Throwable x) {
-            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                     public Void run() {
                         if (System.err != null)
                             new Error("Cleaner terminated abnormally", x)
--- a/src/java.base/share/classes/sun/misc/URLClassPath.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/misc/URLClassPath.java	Mon Apr 27 09:17:39 2015 -0700
@@ -97,16 +97,16 @@
     }
 
     /* The original search path of URLs. */
-    private ArrayList<URL> path = new ArrayList<URL>();
+    private ArrayList<URL> path = new ArrayList<>();
 
     /* The stack of unopened URLs */
-    Stack<URL> urls = new Stack<URL>();
+    Stack<URL> urls = new Stack<>();
 
     /* The resulting search path of Loaders */
-    ArrayList<Loader> loaders = new ArrayList<Loader>();
+    ArrayList<Loader> loaders = new ArrayList<>();
 
     /* Map of each URL opened to its corresponding Loader */
-    HashMap<String, Loader> lmap = new HashMap<String, Loader>();
+    HashMap<String, Loader> lmap = new HashMap<>();
 
     /* The jar protocol handler to use when creating new URLs */
     private URLStreamHandler jarHandler;
@@ -142,7 +142,7 @@
         if (closed) {
             return Collections.emptyList();
         }
-        List<IOException> result = new LinkedList<IOException>();
+        List<IOException> result = new LinkedList<>();
         for (Loader loader : loaders) {
             try {
                 loader.close();
@@ -234,7 +234,7 @@
      */
     public Enumeration<URL> findResources(final String name,
                                      final boolean check) {
-        return new Enumeration<URL>() {
+        return new Enumeration<>() {
             private int index = 0;
             private URL url = null;
 
@@ -281,7 +281,7 @@
      */
     public Enumeration<Resource> getResources(final String name,
                                     final boolean check) {
-        return new Enumeration<Resource>() {
+        return new Enumeration<>() {
             private int index = 0;
             private Resource res = null;
 
@@ -374,7 +374,7 @@
     private Loader getLoader(final URL url) throws IOException {
         try {
             return java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedExceptionAction<Loader>() {
+                new java.security.PrivilegedExceptionAction<>() {
                 public Loader run() throws IOException {
                     String file = url.getFile();
                     if (file != null && file.endsWith("/")) {
@@ -689,7 +689,7 @@
             if (jar == null) {
                 try {
                     java.security.AccessController.doPrivileged(
-                        new java.security.PrivilegedExceptionAction<Void>() {
+                        new java.security.PrivilegedExceptionAction<>() {
                             public Void run() throws IOException {
                                 if (DEBUG) {
                                     System.err.println("Opening " + csu);
@@ -870,7 +870,7 @@
             if (index == null)
                 return null;
 
-            HashSet<String> visited = new HashSet<String>();
+            HashSet<String> visited = new HashSet<>();
             return getResource(name, check, visited);
         }
 
@@ -912,7 +912,7 @@
                              * before
                              */
                             newLoader = AccessController.doPrivileged(
-                                new PrivilegedExceptionAction<JarLoader>() {
+                                new PrivilegedExceptionAction<>() {
                                     public JarLoader run() throws IOException {
                                         return new JarLoader(url, handler,
                                             lmap);
--- a/src/java.base/share/classes/sun/net/NetworkClient.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/net/NetworkClient.java	Mon Apr 27 09:17:39 2015 -0700
@@ -69,7 +69,7 @@
         final String encs[] = { null };
 
         AccessController.doPrivileged(
-                new PrivilegedAction<Void>() {
+                new PrivilegedAction<>() {
                     public Void run() {
                         vals[0] = Integer.getInteger("sun.net.client.defaultReadTimeout", 0).intValue();
                         vals[1] = Integer.getInteger("sun.net.client.defaultConnectTimeout", 0).intValue();
@@ -154,7 +154,7 @@
         if (proxy != null) {
             if (proxy.type() == Proxy.Type.SOCKS) {
                 s = AccessController.doPrivileged(
-                    new PrivilegedAction<Socket>() {
+                    new PrivilegedAction<>() {
                         public Socket run() {
                                        return new Socket(proxy);
                                    }});
@@ -201,7 +201,7 @@
         if (serverSocket == null)
             throw new IOException("not connected");
         return  AccessController.doPrivileged(
-                        new PrivilegedAction<InetAddress>() {
+                        new PrivilegedAction<>() {
                             public InetAddress run() {
                                 return serverSocket.getLocalAddress();
 
--- a/src/java.base/share/classes/sun/net/ProgressMonitor.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/net/ProgressMonitor.java	Mon Apr 27 09:17:39 2015 -0700
@@ -64,7 +64,7 @@
      * Return a snapshot of the ProgressSource list
      */
     public ArrayList<ProgressSource> getProgressSources()    {
-        ArrayList<ProgressSource> snapshot = new ArrayList<ProgressSource>();
+        ArrayList<ProgressSource> snapshot = new ArrayList<>();
 
         try {
             synchronized(progressSourceList)    {
@@ -114,7 +114,7 @@
         if (progressListenerList.size() > 0)
         {
             // Notify progress listener if there is progress change
-            ArrayList<ProgressListener> listeners = new ArrayList<ProgressListener>();
+            ArrayList<ProgressListener> listeners = new ArrayList<>();
 
             // Copy progress listeners to another list to avoid holding locks
             synchronized(progressListenerList) {
@@ -151,7 +151,7 @@
         if (progressListenerList.size() > 0)
         {
             // Notify progress listener if there is progress change
-            ArrayList<ProgressListener> listeners = new ArrayList<ProgressListener>();
+            ArrayList<ProgressListener> listeners = new ArrayList<>();
 
             // Copy progress listeners to another list to avoid holding locks
             synchronized(progressListenerList) {
@@ -183,7 +183,7 @@
         if (progressListenerList.size() > 0)
         {
             // Notify progress listener if there is progress change
-            ArrayList<ProgressListener> listeners = new ArrayList<ProgressListener>();
+            ArrayList<ProgressListener> listeners = new ArrayList<>();
 
             // Copy progress listeners to another list to avoid holding locks
             synchronized(progressListenerList)  {
--- a/src/java.base/share/classes/sun/net/www/MessageHeader.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/net/www/MessageHeader.java	Mon Apr 27 09:17:39 2015 -0700
@@ -244,7 +244,7 @@
     public synchronized Map<String, List<String>> filterAndAddHeaders(
             String[] excludeList, Map<String, List<String>>  include) {
         boolean skipIt = false;
-        Map<String, List<String>> m = new HashMap<String, List<String>>();
+        Map<String, List<String>> m = new HashMap<>();
         for (int i = nkeys; --i >= 0;) {
             if (excludeList != null) {
                 // check if the key is in the excludeList.
@@ -260,7 +260,7 @@
             if (!skipIt) {
                 List<String> l = m.get(keys[i]);
                 if (l == null) {
-                    l = new ArrayList<String>();
+                    l = new ArrayList<>();
                     m.put(keys[i], l);
                 }
                 l.add(values[i]);
@@ -274,7 +274,7 @@
                 for (Map.Entry<String,List<String>> entry: include.entrySet()) {
                 List<String> l = m.get(entry.getKey());
                 if (l == null) {
-                    l = new ArrayList<String>();
+                    l = new ArrayList<>();
                     m.put(entry.getKey(), l);
                 }
                 l.addAll(entry.getValue());
--- a/src/java.base/share/classes/sun/net/www/http/HttpCapture.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/net/www/http/HttpCapture.java	Mon Apr 27 09:17:39 2015 -0700
@@ -64,7 +64,7 @@
     private static synchronized void init() {
         initialized = true;
         String rulesFile = java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<String>() {
+            new java.security.PrivilegedAction<>() {
                 public String run() {
                     return NetProperties.get("sun.net.http.captureRules");
                 }
@@ -85,8 +85,8 @@
                         String[] s = line.split(",");
                         if (s.length == 2) {
                             if (patterns == null) {
-                                patterns = new ArrayList<Pattern>();
-                                capFiles = new ArrayList<String>();
+                                patterns = new ArrayList<>();
+                                capFiles = new ArrayList<>();
                             }
                             patterns.add(Pattern.compile(s[0].trim()));
                             capFiles.add(s[1].trim());
--- a/src/java.base/share/classes/sun/net/www/http/HttpClient.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/net/www/http/HttpClient.java	Mon Apr 27 09:17:39 2015 -0700
@@ -479,7 +479,7 @@
     {
         try {
             java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedExceptionAction<Void>() {
+                new java.security.PrivilegedExceptionAction<>() {
                     public Void run() throws IOException {
                     openServer(server.getHostString(), server.getPort());
                     return null;
--- a/src/java.base/share/classes/sun/net/www/http/KeepAliveCache.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/net/www/http/KeepAliveCache.java	Mon Apr 27 09:17:39 2015 -0700
@@ -94,7 +94,7 @@
              */
             final KeepAliveCache cache = this;
             java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction<Void>() {
+                new java.security.PrivilegedAction<>() {
                 public Void run() {
                     keepAliveTimer = new InnocuousThread(cache, "Keep-Alive-Timer");
                     keepAliveTimer.setDaemon(true);
@@ -178,7 +178,7 @@
                 long currentTime = System.currentTimeMillis();
 
                 ArrayList<KeepAliveKey> keysToRemove
-                    = new ArrayList<KeepAliveKey>();
+                    = new ArrayList<>();
 
                 for (KeepAliveKey key : keySet()) {
                     ClientVector v = get(key);
--- a/src/java.base/share/classes/sun/net/www/protocol/http/AuthenticationHeader.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/net/www/protocol/http/AuthenticationHeader.java	Mon Apr 27 09:17:39 2015 -0700
@@ -122,7 +122,7 @@
         this.dontUseNegotiate = dontUseNegotiate;
         rsp = response;
         this.hdrname = hdrname;
-        schemes = new HashMap<String,SchemeMapValue>();
+        schemes = new HashMap<>();
         parse();
     }
 
--- a/src/java.base/share/classes/sun/net/www/protocol/http/DigestAuthentication.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/net/www/protocol/http/DigestAuthentication.java	Mon Apr 27 09:17:39 2015 -0700
@@ -62,7 +62,7 @@
 
     static {
         Boolean b = AccessController.doPrivileged(
-            new PrivilegedAction<Boolean>() {
+            new PrivilegedAction<>() {
                 public Boolean run() {
                     return NetProperties.getBoolean(compatPropName);
                 }
--- a/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Mon Apr 27 09:17:39 2015 -0700
@@ -244,7 +244,7 @@
                 new sun.security.action.GetBooleanAction(
                     "sun.net.http.allowRestrictedHeaders")).booleanValue();
         if (!allowRestrictedHeaders) {
-            restrictedHeaderSet = new HashSet<String>(restrictedHeaders.length);
+            restrictedHeaderSet = new HashSet<>(restrictedHeaders.length);
             for (int i=0; i < restrictedHeaders.length; i++) {
                 restrictedHeaderSet.add(restrictedHeaders[i].toLowerCase());
             }
@@ -413,7 +413,7 @@
                             final URL url,
                             final RequestorType authType) {
         return java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<PasswordAuthentication>() {
+            new java.security.PrivilegedAction<>() {
                 public PasswordAuthentication run() {
                     if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
                         logger.finest("Requesting Authentication: host =" + host + " url = " + url);
@@ -817,14 +817,14 @@
             } catch (SecurityException se) { /* swallow exception */ }
         } else {
             cookieHandler = java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction<CookieHandler>() {
+                new java.security.PrivilegedAction<>() {
                 public CookieHandler run() {
                     return CookieHandler.getDefault();
                 }
             });
         }
         cacheHandler = java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<ResponseCache>() {
+            new java.security.PrivilegedAction<>() {
                 public ResponseCache run() {
                 return ResponseCache.getDefault();
             }
@@ -909,7 +909,7 @@
         final boolean result[] = {false};
 
         java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                 try {
                     InetAddress a1 = InetAddress.getByName(h1);
@@ -954,7 +954,7 @@
         try {
             // lookup hostname and use IP address if available
             host = AccessController.doPrivileged(
-                new PrivilegedExceptionAction<String>() {
+                new PrivilegedExceptionAction<>() {
                     public String run() throws IOException {
                             InetAddress addr = InetAddress.getByName(hostarg);
                             return addr.getHostAddress();
@@ -984,7 +984,7 @@
         if (p != null) {
             try {
                 AccessController.doPrivileged(
-                    new PrivilegedExceptionAction<Void>() {
+                    new PrivilegedExceptionAction<>() {
                         public Void run() throws IOException {
                             plainConnect0();
                             return null;
@@ -1086,7 +1086,7 @@
                  */
                 ProxySelector sel =
                     java.security.AccessController.doPrivileged(
-                        new java.security.PrivilegedAction<ProxySelector>() {
+                        new java.security.PrivilegedAction<>() {
                             public ProxySelector run() {
                                      return ProxySelector.getDefault();
                                  }
@@ -1245,7 +1245,7 @@
         if (p != null) {
             try {
                 return AccessController.doPrivileged(
-                    new PrivilegedExceptionAction<OutputStream>() {
+                    new PrivilegedExceptionAction<>() {
                         public OutputStream run() throws IOException {
                             return getOutputStream0();
                         }
@@ -1423,7 +1423,7 @@
         if (p != null) {
             try {
                 return AccessController.doPrivileged(
-                    new PrivilegedExceptionAction<InputStream>() {
+                    new PrivilegedExceptionAction<>() {
                         public InputStream run() throws IOException {
                             return getInputStream0();
                         }
@@ -1877,7 +1877,7 @@
             final Object[] args = { rememberedException.getMessage() };
             IOException chainedException =
                 java.security.AccessController.doPrivileged(
-                    new java.security.PrivilegedExceptionAction<IOException>() {
+                    new java.security.PrivilegedExceptionAction<>() {
                         public IOException run() throws Exception {
                             return (IOException)
                                 rememberedException.getClass()
@@ -2204,7 +2204,7 @@
                     try {
                         final String finalHost = host;
                         addr = java.security.AccessController.doPrivileged(
-                            new java.security.PrivilegedExceptionAction<InetAddress>() {
+                            new java.security.PrivilegedExceptionAction<>() {
                                 public InetAddress run()
                                     throws java.net.UnknownHostException {
                                     return InetAddress.getByName(finalHost);
@@ -2566,7 +2566,7 @@
         if (p != null) {
             try {
                 return AccessController.doPrivileged(
-                    new PrivilegedExceptionAction<Boolean>() {
+                    new PrivilegedExceptionAction<>() {
                         public Boolean run() throws IOException {
                             return followRedirect0(loc, stat, locUrl0);
                         }
--- a/src/java.base/share/classes/sun/net/www/protocol/jar/URLJarFile.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/net/www/protocol/jar/URLJarFile.java	Mon Apr 27 09:17:39 2015 -0700
@@ -213,7 +213,7 @@
             /* get the stream before asserting privileges */
             try (final InputStream in = url.openConnection().getInputStream()) {
                 result = AccessController.doPrivileged(
-                    new PrivilegedExceptionAction<JarFile>() {
+                    new PrivilegedExceptionAction<>() {
                         public JarFile run() throws IOException {
                             Path tmpFile = Files.createTempFile("jar_cache", null);
                             try {
--- a/src/java.base/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java	Mon Apr 27 09:17:39 2015 -0700
@@ -76,7 +76,7 @@
         this.pool = pool;
 
         if (pool.isFixedThreadPool()) {
-            taskQueue = new ConcurrentLinkedQueue<Runnable>();
+            taskQueue = new ConcurrentLinkedQueue<>();
         } else {
             taskQueue = null;   // not used
         }
@@ -115,7 +115,7 @@
     }
 
     private void startInternalThread(final Runnable task) {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
             public Void run() {
                 // internal threads should not be visible to application so
@@ -246,7 +246,7 @@
     abstract void shutdownHandlerTasks();
 
     private void shutdownExecutors() {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             public Void run() {
                 pool.executor().shutdown();
                 timeoutExecutor.shutdown();
@@ -323,7 +323,7 @@
             task = new Runnable() {
                 @Override
                 public void run() {
-                    AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                    AccessController.doPrivileged(new PrivilegedAction<>() {
                         @Override
                         public Void run() {
                             delegate.run();
--- a/src/java.base/share/classes/sun/nio/ch/AsynchronousServerSocketChannelImpl.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/nio/ch/AsynchronousServerSocketChannelImpl.java	Mon Apr 27 09:17:39 2015 -0700
@@ -228,7 +228,7 @@
         static final Set<SocketOption<?>> defaultOptions = defaultOptions();
 
         private static Set<SocketOption<?>> defaultOptions() {
-            HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(2);
+            HashSet<SocketOption<?>> set = new HashSet<>(2);
             set.add(StandardSocketOptions.SO_RCVBUF);
             set.add(StandardSocketOptions.SO_REUSEADDR);
             return Collections.unmodifiableSet(set);
--- a/src/java.base/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/nio/ch/AsynchronousSocketChannelImpl.java	Mon Apr 27 09:17:39 2015 -0700
@@ -503,7 +503,7 @@
         static final Set<SocketOption<?>> defaultOptions = defaultOptions();
 
         private static Set<SocketOption<?>> defaultOptions() {
-            HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(5);
+            HashSet<SocketOption<?>> set = new HashSet<>(5);
             set.add(StandardSocketOptions.SO_SNDBUF);
             set.add(StandardSocketOptions.SO_RCVBUF);
             set.add(StandardSocketOptions.SO_KEEPALIVE);
--- a/src/java.base/share/classes/sun/nio/ch/DatagramChannelImpl.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/nio/ch/DatagramChannelImpl.java	Mon Apr 27 09:17:39 2015 -0700
@@ -294,7 +294,7 @@
         static final Set<SocketOption<?>> defaultOptions = defaultOptions();
 
         private static Set<SocketOption<?>> defaultOptions() {
-            HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(8);
+            HashSet<SocketOption<?>> set = new HashSet<>(8);
             set.add(StandardSocketOptions.SO_SNDBUF);
             set.add(StandardSocketOptions.SO_RCVBUF);
             set.add(StandardSocketOptions.SO_REUSEADDR);
--- a/src/java.base/share/classes/sun/nio/ch/MembershipKeyImpl.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/nio/ch/MembershipKeyImpl.java	Mon Apr 27 09:17:39 2015 -0700
@@ -184,7 +184,7 @@
 
             // created blocked set if required and add source address
             if (blockedSet == null)
-                blockedSet = new HashSet<InetAddress>();
+                blockedSet = new HashSet<>();
             blockedSet.add(toBlock);
         }
         return this;
--- a/src/java.base/share/classes/sun/nio/ch/MembershipRegistry.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/nio/ch/MembershipRegistry.java	Mon Apr 27 09:17:39 2015 -0700
@@ -84,13 +84,13 @@
         InetAddress group = key.group();
         List<MembershipKeyImpl> keys;
         if (groups == null) {
-            groups = new HashMap<InetAddress,List<MembershipKeyImpl>>();
+            groups = new HashMap<>();
             keys = null;
         } else {
             keys = groups.get(group);
         }
         if (keys == null) {
-            keys = new LinkedList<MembershipKeyImpl>();
+            keys = new LinkedList<>();
             groups.put(group, keys);
         }
         keys.add(key);
--- a/src/java.base/share/classes/sun/nio/ch/SelectorImpl.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/nio/ch/SelectorImpl.java	Mon Apr 27 09:17:39 2015 -0700
@@ -52,8 +52,8 @@
 
     protected SelectorImpl(SelectorProvider sp) {
         super(sp);
-        keys = new HashSet<SelectionKey>();
-        selectedKeys = new HashSet<SelectionKey>();
+        keys = new HashSet<>();
+        selectedKeys = new HashSet<>();
         if (Util.atBugLevel("1.4")) {
             publicKeys = keys;
             publicSelectedKeys = selectedKeys;
--- a/src/java.base/share/classes/sun/nio/ch/ServerSocketChannelImpl.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/nio/ch/ServerSocketChannelImpl.java	Mon Apr 27 09:17:39 2015 -0700
@@ -182,7 +182,7 @@
         static final Set<SocketOption<?>> defaultOptions = defaultOptions();
 
         private static Set<SocketOption<?>> defaultOptions() {
-            HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(2);
+            HashSet<SocketOption<?>> set = new HashSet<>(2);
             set.add(StandardSocketOptions.SO_RCVBUF);
             set.add(StandardSocketOptions.SO_REUSEADDR);
             set.add(StandardSocketOptions.IP_TOS);
--- a/src/java.base/share/classes/sun/nio/ch/SocketChannelImpl.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/nio/ch/SocketChannelImpl.java	Mon Apr 27 09:17:39 2015 -0700
@@ -229,7 +229,7 @@
         static final Set<SocketOption<?>> defaultOptions = defaultOptions();
 
         private static Set<SocketOption<?>> defaultOptions() {
-            HashSet<SocketOption<?>> set = new HashSet<SocketOption<?>>(8);
+            HashSet<SocketOption<?>> set = new HashSet<>(8);
             set.add(StandardSocketOptions.SO_SNDBUF);
             set.add(StandardSocketOptions.SO_RCVBUF);
             set.add(StandardSocketOptions.SO_KEEPALIVE);
--- a/src/java.base/share/classes/sun/nio/cs/CharsetMapping.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/nio/cs/CharsetMapping.java	Mon Apr 27 09:17:39 2015 -0700
@@ -135,7 +135,7 @@
 
     // init the CharsetMapping object from the .dat binary file
     public static CharsetMapping get(final InputStream is) {
-        return AccessController.doPrivileged(new PrivilegedAction<CharsetMapping>() {
+        return AccessController.doPrivileged(new PrivilegedAction<>() {
             public CharsetMapping run() {
                 return new CharsetMapping().load(is);
             }
--- a/src/java.base/share/classes/sun/nio/fs/AbstractPoller.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/nio/fs/AbstractPoller.java	Mon Apr 27 09:17:39 2015 -0700
@@ -48,7 +48,7 @@
     private boolean shutdown;
 
     protected AbstractPoller() {
-        this.requestList = new LinkedList<Request>();
+        this.requestList = new LinkedList<>();
         this.shutdown = false;
     }
 
@@ -57,7 +57,7 @@
      */
     public void start() {
         final Runnable thisRunnable = this;
-        AccessController.doPrivileged(new PrivilegedAction<Object>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
             public Object run() {
                 Thread thr = new ManagedLocalsThread(thisRunnable);
--- a/src/java.base/share/classes/sun/nio/fs/AbstractWatchKey.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/nio/fs/AbstractWatchKey.java	Mon Apr 27 09:17:39 2015 -0700
@@ -70,8 +70,8 @@
         this.watcher = watcher;
         this.dir = dir;
         this.state = State.READY;
-        this.events = new ArrayList<WatchEvent<?>>();
-        this.lastModifyEvents = new HashMap<Object,WatchEvent<?>>();
+        this.events = new ArrayList<>();
+        this.lastModifyEvents = new HashMap<>();
     }
 
     final AbstractWatchService watcher() {
@@ -146,7 +146,7 @@
 
             // non-repeated event
             Event<Object> ev =
-                new Event<Object>((WatchEvent.Kind<Object>)kind, context);
+                new Event<>((WatchEvent.Kind<Object>)kind, context);
             if (isModify) {
                 lastModifyEvents.put(context, ev);
             } else if (kind == StandardWatchEventKinds.OVERFLOW) {
@@ -163,7 +163,7 @@
     public final List<WatchEvent<?>> pollEvents() {
         synchronized (this) {
             List<WatchEvent<?>> result = events;
-            events = new ArrayList<WatchEvent<?>>();
+            events = new ArrayList<>();
             lastModifyEvents.clear();
             return result;
         }
--- a/src/java.base/share/classes/sun/reflect/ReflectionFactory.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/reflect/ReflectionFactory.java	Mon Apr 27 09:17:39 2015 -0700
@@ -375,7 +375,7 @@
     private static void checkInitted() {
         if (initted) return;
         AccessController.doPrivileged(
-            new PrivilegedAction<Void>() {
+            new PrivilegedAction<>() {
                 public Void run() {
                     // Tests to ensure the system properties table is fully
                     // initialized. This is needed because reflection code is
--- a/src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java	Mon Apr 27 09:17:39 2015 -0700
@@ -106,16 +106,16 @@
             throw new IllegalArgumentException("Not an annotation type");
 
         Method[] methods =
-            AccessController.doPrivileged(new PrivilegedAction<Method[]>() {
+            AccessController.doPrivileged(new PrivilegedAction<>() {
                 public Method[] run() {
                     // Initialize memberTypes and defaultValues
                     return annotationClass.getDeclaredMethods();
                 }
             });
 
-        memberTypes = new HashMap<String,Class<?>>(methods.length+1, 1.0f);
-        memberDefaults = new HashMap<String, Object>(0);
-        members = new HashMap<String, Method>(methods.length+1, 1.0f);
+        memberTypes = new HashMap<>(methods.length+1, 1.0f);
+        memberDefaults = new HashMap<>(0);
+        members = new HashMap<>(methods.length+1, 1.0f);
 
         for (Method method : methods) {
             if (method.getParameterTypes().length != 0)
--- a/src/java.base/share/classes/sun/security/pkcs/PKCS7.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/security/pkcs/PKCS7.java	Mon Apr 27 09:17:39 2015 -0700
@@ -530,7 +530,7 @@
         // CRLs (optional)
         if (crls != null && crls.length != 0) {
             // cast to X509CRLImpl[] since X509CRLImpl implements DerEncoder
-            Set<X509CRLImpl> implCRLs = new HashSet<X509CRLImpl>(crls.length);
+            Set<X509CRLImpl> implCRLs = new HashSet<>(crls.length);
             for (X509CRL crl: crls) {
                 if (crl instanceof X509CRLImpl)
                     implCRLs.add((X509CRLImpl) crl);
@@ -590,7 +590,7 @@
     public SignerInfo[] verify(byte[] bytes)
     throws NoSuchAlgorithmException, SignatureException {
 
-        Vector<SignerInfo> intResult = new Vector<SignerInfo>();
+        Vector<SignerInfo> intResult = new Vector<>();
         for (int i = 0; i < signerInfos.length; i++) {
 
             SignerInfo signerInfo = verify(signerInfos[i], bytes);
--- a/src/java.base/share/classes/sun/security/pkcs/PKCS9Attributes.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/security/pkcs/PKCS9Attributes.java	Mon Apr 27 09:17:39 2015 -0700
@@ -85,8 +85,7 @@
                            DerInputStream in) throws IOException {
         if (permittedAttributes != null) {
             this.permittedAttributes =
-                new Hashtable<ObjectIdentifier, ObjectIdentifier>(
-                                                permittedAttributes.length);
+                new Hashtable<>(permittedAttributes.length);
 
             for (int i = 0; i < permittedAttributes.length; i++)
                 this.permittedAttributes.put(permittedAttributes[i],
--- a/src/java.base/share/classes/sun/security/pkcs/SignerInfo.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/security/pkcs/SignerInfo.java	Mon Apr 27 09:17:39 2015 -0700
@@ -237,7 +237,7 @@
         if (userCert == null)
             return null;
 
-        ArrayList<X509Certificate> certList = new ArrayList<X509Certificate>();
+        ArrayList<X509Certificate> certList = new ArrayList<>();
         certList.add(userCert);
 
         X509Certificate[] pkcsCerts = block.getCertificates();
--- a/src/java.base/share/classes/sun/security/provider/SeedGenerator.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/security/provider/SeedGenerator.java	Mon Apr 27 09:17:39 2015 -0700
@@ -165,7 +165,7 @@
         md.update(b);
 
         java.security.AccessController.doPrivileged
-            (new java.security.PrivilegedAction<Void>() {
+            (new java.security.PrivilegedAction<>() {
                 @Override
                 public Void run() {
                     try {
@@ -295,7 +295,7 @@
 
             final ThreadGroup[] finalsg = new ThreadGroup[1];
             Thread t = java.security.AccessController.doPrivileged
-                (new java.security.PrivilegedAction<Thread>() {
+                (new java.security.PrivilegedAction<>() {
                         @Override
                         public Thread run() {
                             ThreadGroup parent, group =
@@ -501,7 +501,7 @@
             final URL device = new URL(deviceName);
             try {
                 seedStream = java.security.AccessController.doPrivileged
-                    (new java.security.PrivilegedExceptionAction<InputStream>() {
+                    (new java.security.PrivilegedExceptionAction<>() {
                         @Override
                         public InputStream run() throws IOException {
                             /*
--- a/src/java.base/share/classes/sun/security/provider/certpath/Builder.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/security/provider/certpath/Builder.java	Mon Apr 27 09:17:39 2015 -0700
@@ -102,8 +102,8 @@
 
     /**
      * Verifies whether the input certificate completes the path.
-     * When building forward, a trust anchor will complete the path.
-     * When building reverse, the target certificate will complete the path.
+     * When building in the forward direction, a trust anchor will
+     * complete the path.
      *
      * @param cert the certificate to test
      * @return a boolean value indicating whether the cert completes the path.
--- a/src/java.base/share/classes/sun/security/provider/certpath/PKIX.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/security/provider/certpath/PKIX.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,6 @@
 package sun.security.provider.certpath;
 
 import java.security.InvalidAlgorithmParameterException;
-import java.security.KeyStore;
 import java.security.PublicKey;
 import java.security.cert.*;
 import java.security.interfaces.DSAPublicKey;
@@ -194,7 +193,6 @@
 
     static class BuilderParams extends ValidatorParams {
         private PKIXBuilderParameters params;
-        private boolean buildForward = true;
         private List<CertStore> stores;
         private X500Principal targetSubject;
 
@@ -213,10 +211,6 @@
                     + "targetCertConstraints parameter must be an "
                     + "X509CertSelector");
             }
-            if (params instanceof SunCertPathBuilderParameters) {
-                buildForward =
-                    ((SunCertPathBuilderParameters)params).getBuildForward();
-            }
             this.params = params;
             this.targetSubject = getTargetSubject(
                 certStores(), (X509CertSelector)targetCertConstraints());
@@ -230,7 +224,6 @@
             return stores;
         }
         int maxPathLength() { return params.getMaxPathLength(); }
-        boolean buildForward() { return buildForward; }
         PKIXBuilderParameters params() { return params; }
         X500Principal targetSubject() { return targetSubject; }
 
--- a/src/java.base/share/classes/sun/security/provider/certpath/ReverseBuilder.java	Fri Apr 24 15:45:25 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,551 +0,0 @@
-/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.security.provider.certpath;
-
-import java.io.IOException;
-import java.security.GeneralSecurityException;
-import java.security.Principal;
-import java.security.cert.CertificateException;
-import java.security.cert.CertPathValidatorException;
-import java.security.cert.CertStore;
-import java.security.cert.CertStoreException;
-import java.security.cert.PKIXBuilderParameters;
-import java.security.cert.PKIXCertPathChecker;
-import java.security.cert.PKIXParameters;
-import java.security.cert.PKIXReason;
-import java.security.cert.TrustAnchor;
-import java.security.cert.X509Certificate;
-import java.security.cert.X509CertSelector;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.LinkedList;
-import java.util.Set;
-
-import javax.security.auth.x500.X500Principal;
-
-import sun.security.provider.certpath.PKIX.BuilderParams;
-import sun.security.util.Debug;
-import sun.security.x509.Extension;
-import static sun.security.x509.PKIXExtensions.*;
-import sun.security.x509.X500Name;
-import sun.security.x509.X509CertImpl;
-import sun.security.x509.PolicyMappingsExtension;
-
-/**
- * This class represents a reverse builder, which is able to retrieve
- * matching certificates from CertStores and verify a particular certificate
- * against a ReverseState.
- *
- * @since       1.4
- * @author      Sean Mullan
- * @author      Yassir Elley
- */
-
-class ReverseBuilder extends Builder {
-
-    private Debug debug = Debug.getInstance("certpath");
-
-    private final Set<String> initPolicies;
-
-    /**
-     * Initialize the builder with the input parameters.
-     *
-     * @param params the parameter set used to build a certification path
-     */
-    ReverseBuilder(BuilderParams buildParams) {
-        super(buildParams);
-
-        Set<String> initialPolicies = buildParams.initialPolicies();
-        initPolicies = new HashSet<String>();
-        if (initialPolicies.isEmpty()) {
-            // if no initialPolicies are specified by user, set
-            // initPolicies to be anyPolicy by default
-            initPolicies.add(PolicyChecker.ANY_POLICY);
-        } else {
-            initPolicies.addAll(initialPolicies);
-        }
-    }
-
-    /**
-     * Retrieves all certs from the specified CertStores that satisfy the
-     * requirements specified in the parameters and the current
-     * PKIX state (name constraints, policy constraints, etc).
-     *
-     * @param currentState the current state.
-     *        Must be an instance of <code>ReverseState</code>
-     * @param certStores list of CertStores
-     */
-    @Override
-    Collection<X509Certificate> getMatchingCerts
-        (State currState, List<CertStore> certStores)
-        throws CertStoreException, CertificateException, IOException
-    {
-        ReverseState currentState = (ReverseState) currState;
-
-        if (debug != null)
-            debug.println("In ReverseBuilder.getMatchingCerts.");
-
-        /*
-         * The last certificate could be an EE or a CA certificate
-         * (we may be building a partial certification path or
-         * establishing trust in a CA).
-         *
-         * Try the EE certs before the CA certs. It will be more
-         * common to build a path to an end entity.
-         */
-        Collection<X509Certificate> certs =
-            getMatchingEECerts(currentState, certStores);
-        certs.addAll(getMatchingCACerts(currentState, certStores));
-
-        return certs;
-    }
-
-    /*
-     * Retrieves all end-entity certificates which satisfy constraints
-     * and requirements specified in the parameters and PKIX state.
-     */
-    private Collection<X509Certificate> getMatchingEECerts
-        (ReverseState currentState, List<CertStore> certStores)
-        throws CertStoreException, CertificateException, IOException {
-
-        /*
-         * Compose a CertSelector to filter out
-         * certs which do not satisfy requirements.
-         *
-         * First, retrieve clone of current target cert constraints, and
-         * then add more selection criteria based on current validation state.
-         */
-        X509CertSelector sel = (X509CertSelector) targetCertConstraints.clone();
-
-        /*
-         * Match on issuer (subject of previous cert)
-         */
-        sel.setIssuer(currentState.subjectDN);
-
-        /*
-         * Match on certificate validity date.
-         */
-        sel.setCertificateValid(buildParams.date());
-
-        /*
-         * Policy processing optimizations
-         */
-        if (currentState.explicitPolicy == 0)
-            sel.setPolicy(getMatchingPolicies());
-
-        /*
-         * If previous cert has a subject key identifier extension,
-         * use it to match on authority key identifier extension.
-         */
-        /*if (currentState.subjKeyId != null) {
-          AuthorityKeyIdentifierExtension authKeyId = new AuthorityKeyIdentifierExtension(
-                (KeyIdentifier) currentState.subjKeyId.get(SubjectKeyIdentifierExtension.KEY_ID),
-                null, null);
-        sel.setAuthorityKeyIdentifier(authKeyId.getExtensionValue());
-        }*/
-
-        /*
-         * Require EE certs
-         */
-        sel.setBasicConstraints(-2);
-
-        /* Retrieve matching certs from CertStores */
-        HashSet<X509Certificate> eeCerts = new HashSet<>();
-        addMatchingCerts(sel, certStores, eeCerts, true);
-
-        if (debug != null) {
-            debug.println("ReverseBuilder.getMatchingEECerts got "
-                          + eeCerts.size() + " certs.");
-        }
-        return eeCerts;
-    }
-
-    /*
-     * Retrieves all CA certificates which satisfy constraints
-     * and requirements specified in the parameters and PKIX state.
-     */
-    private Collection<X509Certificate> getMatchingCACerts
-        (ReverseState currentState, List<CertStore> certStores)
-        throws CertificateException, CertStoreException, IOException {
-
-        /*
-         * Compose a CertSelector to filter out
-         * certs which do not satisfy requirements.
-         */
-        X509CertSelector sel = new X509CertSelector();
-
-        /*
-         * Match on issuer (subject of previous cert)
-         */
-        sel.setIssuer(currentState.subjectDN);
-
-        /*
-         * Match on certificate validity date.
-         */
-        sel.setCertificateValid(buildParams.date());
-
-        /*
-         * Match on target subject name (checks that current cert's
-         * name constraints permit it to certify target).
-         * (4 is the integer type for DIRECTORY name).
-         */
-        byte[] subject = targetCertConstraints.getSubjectAsBytes();
-        if (subject != null) {
-            sel.addPathToName(4, subject);
-        } else {
-            X509Certificate cert = targetCertConstraints.getCertificate();
-            if (cert != null) {
-                sel.addPathToName(4,
-                                  cert.getSubjectX500Principal().getEncoded());
-            }
-        }
-
-        /*
-         * Policy processing optimizations
-         */
-        if (currentState.explicitPolicy == 0)
-            sel.setPolicy(getMatchingPolicies());
-
-        /*
-         * If previous cert has a subject key identifier extension,
-         * use it to match on authority key identifier extension.
-         */
-        /*if (currentState.subjKeyId != null) {
-          AuthorityKeyIdentifierExtension authKeyId = new AuthorityKeyIdentifierExtension(
-                (KeyIdentifier) currentState.subjKeyId.get(SubjectKeyIdentifierExtension.KEY_ID),
-                                null, null);
-          sel.setAuthorityKeyIdentifier(authKeyId.getExtensionValue());
-        }*/
-
-        /*
-         * Require CA certs
-         */
-        sel.setBasicConstraints(0);
-
-        /* Retrieve matching certs from CertStores */
-        ArrayList<X509Certificate> reverseCerts = new ArrayList<>();
-        addMatchingCerts(sel, certStores, reverseCerts, true);
-
-        /* Sort remaining certs using name constraints */
-        Collections.sort(reverseCerts, new PKIXCertComparator());
-
-        if (debug != null)
-            debug.println("ReverseBuilder.getMatchingCACerts got " +
-                          reverseCerts.size() + " certs.");
-        return reverseCerts;
-    }
-
-    /*
-     * This inner class compares 2 PKIX certificates according to which
-     * should be tried first when building a path to the target. For
-     * now, the algorithm is to look at name constraints in each cert and those
-     * which constrain the path closer to the target should be
-     * ranked higher. Later, we may want to consider other components,
-     * such as key identifiers.
-     */
-    class PKIXCertComparator implements Comparator<X509Certificate> {
-
-        private Debug debug = Debug.getInstance("certpath");
-
-        @Override
-        public int compare(X509Certificate cert1, X509Certificate cert2) {
-
-            /*
-             * if either cert certifies the target, always
-             * put at head of list.
-             */
-            X500Principal targetSubject = buildParams.targetSubject();
-            if (cert1.getSubjectX500Principal().equals(targetSubject)) {
-                return -1;
-            }
-            if (cert2.getSubjectX500Principal().equals(targetSubject)) {
-                return 1;
-            }
-
-            int targetDist1;
-            int targetDist2;
-            try {
-                X500Name targetSubjectName = X500Name.asX500Name(targetSubject);
-                targetDist1 = Builder.targetDistance(
-                    null, cert1, targetSubjectName);
-                targetDist2 = Builder.targetDistance(
-                    null, cert2, targetSubjectName);
-            } catch (IOException e) {
-                if (debug != null) {
-                    debug.println("IOException in call to Builder.targetDistance");
-                    e.printStackTrace();
-                }
-                throw new ClassCastException
-                    ("Invalid target subject distinguished name");
-            }
-
-            if (targetDist1 == targetDist2)
-                return 0;
-
-            if (targetDist1 == -1)
-                return 1;
-
-            if (targetDist1 < targetDist2)
-                return -1;
-
-            return 1;
-        }
-    }
-
-    /**
-     * Verifies a matching certificate.
-     *
-     * This method executes any of the validation steps in the PKIX path validation
-     * algorithm which were not satisfied via filtering out non-compliant
-     * certificates with certificate matching rules.
-     *
-     * If the last certificate is being verified (the one whose subject
-     * matches the target subject, then the steps in Section 6.1.4 of the
-     * Certification Path Validation algorithm are NOT executed,
-     * regardless of whether or not the last cert is an end-entity
-     * cert or not. This allows callers to certify CA certs as
-     * well as EE certs.
-     *
-     * @param cert the certificate to be verified
-     * @param currentState the current state against which the cert is verified
-     * @param certPathList the certPathList generated thus far
-     */
-    @Override
-    void verifyCert(X509Certificate cert, State currState,
-        List<X509Certificate> certPathList)
-        throws GeneralSecurityException
-    {
-        if (debug != null) {
-            debug.println("ReverseBuilder.verifyCert(SN: "
-                + Debug.toHexString(cert.getSerialNumber())
-                + "\n  Subject: " + cert.getSubjectX500Principal() + ")");
-        }
-
-        ReverseState currentState = (ReverseState) currState;
-
-        /* we don't perform any validation of the trusted cert */
-        if (currentState.isInitial()) {
-            return;
-        }
-
-        // Don't bother to verify untrusted certificate more.
-        currentState.untrustedChecker.check(cert,
-                                    Collections.<String>emptySet());
-
-        /*
-         * check for looping - abort a loop if
-         * ((we encounter the same certificate twice) AND
-         * ((policyMappingInhibited = true) OR (no policy mapping
-         * extensions can be found between the occurrences of the same
-         * certificate)))
-         * in order to facilitate the check to see if there are
-         * any policy mapping extensions found between the occurrences
-         * of the same certificate, we reverse the certpathlist first
-         */
-        if ((certPathList != null) && (!certPathList.isEmpty())) {
-            List<X509Certificate> reverseCertList = new ArrayList<>();
-            for (X509Certificate c : certPathList) {
-                reverseCertList.add(0, c);
-            }
-
-            boolean policyMappingFound = false;
-            for (X509Certificate cpListCert : reverseCertList) {
-                X509CertImpl cpListCertImpl = X509CertImpl.toImpl(cpListCert);
-                PolicyMappingsExtension policyMappingsExt =
-                        cpListCertImpl.getPolicyMappingsExtension();
-                if (policyMappingsExt != null) {
-                    policyMappingFound = true;
-                }
-                if (debug != null)
-                    debug.println("policyMappingFound = " + policyMappingFound);
-                if (cert.equals(cpListCert)) {
-                    if ((buildParams.policyMappingInhibited()) ||
-                        (!policyMappingFound)){
-                        if (debug != null)
-                            debug.println("loop detected!!");
-                        throw new CertPathValidatorException("loop detected");
-                    }
-                }
-            }
-        }
-
-        /* check if target cert */
-        boolean finalCert = cert.getSubjectX500Principal().equals(buildParams.targetSubject());
-
-        /* check if CA cert */
-        boolean caCert = (cert.getBasicConstraints() != -1 ? true : false);
-
-        /* if there are more certs to follow, verify certain constraints */
-        if (!finalCert) {
-
-            /* check if CA cert */
-            if (!caCert)
-                throw new CertPathValidatorException("cert is NOT a CA cert");
-
-            /* If the certificate was not self-issued, verify that
-             * remainingCerts is greater than zero
-             */
-            if ((currentState.remainingCACerts <= 0) && !X509CertImpl.isSelfIssued(cert)) {
-                    throw new CertPathValidatorException
-                        ("pathLenConstraint violated, path too long", null,
-                         null, -1, PKIXReason.PATH_TOO_LONG);
-            }
-
-            /*
-             * Check keyUsage extension (only if CA cert and not final cert)
-             */
-            KeyChecker.verifyCAKeyUsage(cert);
-
-        } else {
-
-            /*
-             * If final cert, check that it satisfies specified target
-             * constraints
-             */
-            if (targetCertConstraints.match(cert) == false) {
-                throw new CertPathValidatorException("target certificate " +
-                    "constraints check failed");
-            }
-        }
-
-        /*
-         * Check revocation.
-         */
-        if (buildParams.revocationEnabled() && currentState.revChecker != null) {
-            currentState.revChecker.check(cert, Collections.<String>emptySet());
-        }
-
-        /* Check name constraints if this is not a self-issued cert */
-        if (finalCert || !X509CertImpl.isSelfIssued(cert)){
-            if (currentState.nc != null) {
-                try {
-                    if (!currentState.nc.verify(cert)){
-                        throw new CertPathValidatorException
-                            ("name constraints check failed", null, null, -1,
-                             PKIXReason.INVALID_NAME);
-                    }
-                } catch (IOException ioe) {
-                    throw new CertPathValidatorException(ioe);
-                }
-            }
-        }
-
-        /*
-         * Check policy
-         */
-        X509CertImpl certImpl = X509CertImpl.toImpl(cert);
-        currentState.rootNode = PolicyChecker.processPolicies
-            (currentState.certIndex, initPolicies,
-            currentState.explicitPolicy, currentState.policyMapping,
-            currentState.inhibitAnyPolicy,
-            buildParams.policyQualifiersRejected(), currentState.rootNode,
-            certImpl, finalCert);
-
-        /*
-         * Check CRITICAL private extensions
-         */
-        Set<String> unresolvedCritExts = cert.getCriticalExtensionOIDs();
-        if (unresolvedCritExts == null) {
-            unresolvedCritExts = Collections.<String>emptySet();
-        }
-
-        /*
-         * Check that the signature algorithm is not disabled.
-         */
-        currentState.algorithmChecker.check(cert, unresolvedCritExts);
-
-        for (PKIXCertPathChecker checker : currentState.userCheckers) {
-            checker.check(cert, unresolvedCritExts);
-        }
-
-        /*
-         * Look at the remaining extensions and remove any ones we have
-         * already checked. If there are any left, throw an exception!
-         */
-        if (!unresolvedCritExts.isEmpty()) {
-            unresolvedCritExts.remove(BasicConstraints_Id.toString());
-            unresolvedCritExts.remove(NameConstraints_Id.toString());
-            unresolvedCritExts.remove(CertificatePolicies_Id.toString());
-            unresolvedCritExts.remove(PolicyMappings_Id.toString());
-            unresolvedCritExts.remove(PolicyConstraints_Id.toString());
-            unresolvedCritExts.remove(InhibitAnyPolicy_Id.toString());
-            unresolvedCritExts.remove(SubjectAlternativeName_Id.toString());
-            unresolvedCritExts.remove(KeyUsage_Id.toString());
-            unresolvedCritExts.remove(ExtendedKeyUsage_Id.toString());
-
-            if (!unresolvedCritExts.isEmpty())
-                throw new CertPathValidatorException
-                    ("Unrecognized critical extension(s)", null, null, -1,
-                     PKIXReason.UNRECOGNIZED_CRIT_EXT);
-        }
-
-        /*
-         * Check signature.
-         */
-        if (buildParams.sigProvider() != null) {
-            cert.verify(currentState.pubKey, buildParams.sigProvider());
-        } else {
-            cert.verify(currentState.pubKey);
-        }
-    }
-
-    /**
-     * Verifies whether the input certificate completes the path.
-     * This checks whether the cert is the target certificate.
-     *
-     * @param cert the certificate to test
-     * @return a boolean value indicating whether the cert completes the path.
-     */
-    @Override
-    boolean isPathCompleted(X509Certificate cert) {
-        return cert.getSubjectX500Principal().equals(buildParams.targetSubject());
-    }
-
-    /** Adds the certificate to the certPathList
-     *
-     * @param cert the certificate to be added
-     * @param certPathList the certification path list
-     */
-    @Override
-    void addCertToPath(X509Certificate cert,
-        LinkedList<X509Certificate> certPathList) {
-        certPathList.addLast(cert);
-    }
-
-    /** Removes final certificate from the certPathList
-     *
-     * @param certPathList the certification path list
-     */
-    @Override
-    void removeFinalCertFromPath(LinkedList<X509Certificate> certPathList) {
-        certPathList.removeLast();
-    }
-}
--- a/src/java.base/share/classes/sun/security/provider/certpath/ReverseState.java	Fri Apr 24 15:45:25 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,406 +0,0 @@
-/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.security.provider.certpath;
-
-import java.io.IOException;
-import java.security.PublicKey;
-import java.security.cert.CertificateException;
-import java.security.cert.CertPathValidatorException;
-import java.security.cert.PKIXCertPathChecker;
-import java.security.cert.PKIXRevocationChecker;
-import java.security.cert.TrustAnchor;
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Set;
-import javax.security.auth.x500.X500Principal;
-
-import sun.security.provider.certpath.PKIX.BuilderParams;
-import sun.security.util.Debug;
-import sun.security.x509.NameConstraintsExtension;
-import sun.security.x509.SubjectKeyIdentifierExtension;
-import sun.security.x509.X509CertImpl;
-
-/**
- * A specification of a reverse PKIX validation state
- * which is initialized by each build and updated each time a
- * certificate is added to the current path.
- * @since       1.4
- * @author      Sean Mullan
- * @author      Yassir Elley
- */
-
-class ReverseState implements State {
-
-    private static final Debug debug = Debug.getInstance("certpath");
-
-    /* The subject DN of the last cert in the path */
-    X500Principal subjectDN;
-
-    /* The subject public key of the last cert */
-    PublicKey pubKey;
-
-    /* The subject key identifier extension (if any) of the last cert */
-    SubjectKeyIdentifierExtension subjKeyId;
-
-    /* The PKIX constrained/excluded subtrees state variable */
-    NameConstraintsExtension nc;
-
-    /* The PKIX explicit policy, policy mapping, and inhibit_any-policy
-       state variables */
-    int explicitPolicy;
-    int policyMapping;
-    int inhibitAnyPolicy;
-    int certIndex;
-    PolicyNodeImpl rootNode;
-
-    /* The number of remaining CA certs which may follow in the path.
-     * -1: previous cert was an EE cert
-     * 0: only EE certs may follow.
-     * >0 and <Integer.MAX_VALUE:no more than this number of CA certs may follow
-     * Integer.MAX_VALUE: unlimited
-     */
-    int remainingCACerts;
-
-    /* The list of user-defined checkers retrieved from the PKIXParameters
-     * instance */
-    ArrayList<PKIXCertPathChecker> userCheckers;
-
-    /* Flag indicating if state is initial (path is just starting) */
-    private boolean init = true;
-
-    /* the checker used for revocation status */
-    RevocationChecker revChecker;
-
-    /* the algorithm checker */
-    AlgorithmChecker algorithmChecker;
-
-    /* the untrusted certificates checker */
-    UntrustedChecker untrustedChecker;
-
-    /* the trust anchor used to validate the path */
-    TrustAnchor trustAnchor;
-
-    /* Flag indicating if current cert can vouch for the CRL for
-     * the next cert
-     */
-    boolean crlSign = true;
-
-    /**
-     * Returns a boolean flag indicating if the state is initial
-     * (just starting)
-     *
-     * @return boolean flag indicating if the state is initial (just starting)
-     */
-    @Override
-    public boolean isInitial() {
-        return init;
-    }
-
-    /**
-     * Display state for debugging purposes
-     */
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append("State [");
-        sb.append("\n  subjectDN of last cert: ").append(subjectDN);
-        sb.append("\n  subjectKeyIdentifier: ").append
-                 (String.valueOf(subjKeyId));
-        sb.append("\n  nameConstraints: ").append(String.valueOf(nc));
-        sb.append("\n  certIndex: ").append(certIndex);
-        sb.append("\n  explicitPolicy: ").append(explicitPolicy);
-        sb.append("\n  policyMapping:  ").append(policyMapping);
-        sb.append("\n  inhibitAnyPolicy:  ").append(inhibitAnyPolicy);
-        sb.append("\n  rootNode: ").append(rootNode);
-        sb.append("\n  remainingCACerts: ").append(remainingCACerts);
-        sb.append("\n  crlSign: ").append(crlSign);
-        sb.append("\n  init: ").append(init);
-        sb.append("\n]\n");
-        return sb.toString();
-    }
-
-    /**
-     * Initialize the state.
-     *
-     * @param buildParams builder parameters
-     */
-    public void initState(BuilderParams buildParams)
-        throws CertPathValidatorException
-    {
-        /*
-         * Initialize number of remainingCACerts.
-         * Note that -1 maxPathLen implies unlimited.
-         * 0 implies only an EE cert is acceptable.
-         */
-        int maxPathLen = buildParams.maxPathLength();
-        remainingCACerts = (maxPathLen == -1) ? Integer.MAX_VALUE
-                                              : maxPathLen;
-
-        /* Initialize explicit policy state variable */
-        if (buildParams.explicitPolicyRequired()) {
-            explicitPolicy = 0;
-        } else {
-            // unconstrained if maxPathLen is -1,
-            // otherwise, we want to initialize this to the value of the
-            // longest possible path + 1 (i.e. maxpathlen + finalcert + 1)
-            explicitPolicy = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2;
-        }
-
-        /* Initialize policy mapping state variable */
-        if (buildParams.policyMappingInhibited()) {
-            policyMapping = 0;
-        } else {
-            policyMapping = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2;
-        }
-
-        /* Initialize inhibit any policy state variable */
-        if (buildParams.anyPolicyInhibited()) {
-            inhibitAnyPolicy = 0;
-        } else {
-            inhibitAnyPolicy = (maxPathLen == -1) ? maxPathLen : maxPathLen + 2;
-        }
-
-        /* Initialize certIndex */
-        certIndex = 1;
-
-        /* Initialize policy tree */
-        Set<String> initExpPolSet = new HashSet<>(1);
-        initExpPolSet.add(PolicyChecker.ANY_POLICY);
-
-        rootNode = new PolicyNodeImpl(null, PolicyChecker.ANY_POLICY, null,
-                                      false, initExpPolSet, false);
-
-        /*
-         * Initialize each user-defined checker
-         * Shallow copy the checkers
-         */
-        userCheckers = new ArrayList<>(buildParams.certPathCheckers());
-        /* initialize each checker (just in case) */
-        for (PKIXCertPathChecker checker : userCheckers) {
-            checker.init(false);
-        }
-
-        /* Start by trusting the cert to sign CRLs */
-        crlSign = true;
-
-        init = true;
-    }
-
-    /**
-     * Update the state with the specified trust anchor.
-     *
-     * @param anchor the most-trusted CA
-     * @param buildParams builder parameters
-     */
-    public void updateState(TrustAnchor anchor, BuilderParams buildParams)
-        throws CertificateException, IOException, CertPathValidatorException
-    {
-        trustAnchor = anchor;
-        X509Certificate trustedCert = anchor.getTrustedCert();
-        if (trustedCert != null) {
-            updateState(trustedCert);
-        } else {
-            X500Principal caName = anchor.getCA();
-            updateState(anchor.getCAPublicKey(), caName);
-        }
-
-        // The user specified AlgorithmChecker and RevocationChecker may not be
-        // able to set the trust anchor until now.
-        boolean revCheckerAdded = false;
-        for (PKIXCertPathChecker checker : userCheckers) {
-            if (checker instanceof AlgorithmChecker) {
-                ((AlgorithmChecker)checker).trySetTrustAnchor(anchor);
-            } else if (checker instanceof PKIXRevocationChecker) {
-                if (revCheckerAdded) {
-                    throw new CertPathValidatorException(
-                        "Only one PKIXRevocationChecker can be specified");
-                }
-                // if it's our own, initialize it
-                if (checker instanceof RevocationChecker) {
-                    ((RevocationChecker)checker).init(anchor, buildParams);
-                }
-                ((PKIXRevocationChecker)checker).init(false);
-                revCheckerAdded = true;
-            }
-        }
-
-        // only create a RevocationChecker if revocation is enabled and
-        // a PKIXRevocationChecker has not already been added
-        if (buildParams.revocationEnabled() && !revCheckerAdded) {
-            revChecker = new RevocationChecker(anchor, buildParams);
-            revChecker.init(false);
-        }
-
-        init = false;
-    }
-
-    /**
-     * Update the state. This method is used when the most-trusted CA is
-     * a trusted public-key and caName, instead of a trusted cert.
-     *
-     * @param pubKey the public key of the trusted CA
-     * @param subjectDN the subject distinguished name of the trusted CA
-     */
-    private void updateState(PublicKey pubKey, X500Principal subjectDN) {
-
-        /* update subject DN */
-        this.subjectDN = subjectDN;
-
-        /* update subject public key */
-        this.pubKey = pubKey;
-    }
-
-    /**
-     * Update the state with the next certificate added to the path.
-     *
-     * @param cert the certificate which is used to update the state
-     */
-    public void updateState(X509Certificate cert)
-        throws CertificateException, IOException, CertPathValidatorException {
-
-        if (cert == null) {
-            return;
-        }
-
-        /* update subject DN */
-        subjectDN = cert.getSubjectX500Principal();
-
-        /* check for key needing to inherit alg parameters */
-        X509CertImpl icert = X509CertImpl.toImpl(cert);
-        PublicKey newKey = cert.getPublicKey();
-        if (PKIX.isDSAPublicKeyWithoutParams(newKey)) {
-            newKey = BasicChecker.makeInheritedParamsKey(newKey, pubKey);
-        }
-
-        /* update subject public key */
-        pubKey = newKey;
-
-        /*
-         * if this is a trusted cert (init == true), then we
-         * don't update any of the remaining fields
-         */
-        if (init) {
-            init = false;
-            return;
-        }
-
-        /* update subject key identifier */
-        subjKeyId = icert.getSubjectKeyIdentifierExtension();
-
-        /* update crlSign */
-        crlSign = RevocationChecker.certCanSignCrl(cert);
-
-        /* update current name constraints */
-        if (nc != null) {
-            nc.merge(icert.getNameConstraintsExtension());
-        } else {
-            nc = icert.getNameConstraintsExtension();
-            if (nc != null) {
-                // Make sure we do a clone here, because we're probably
-                // going to modify this object later and we don't want to
-                // be sharing it with a Certificate object!
-                nc = (NameConstraintsExtension) nc.clone();
-            }
-        }
-
-        /* update policy state variables */
-        explicitPolicy =
-            PolicyChecker.mergeExplicitPolicy(explicitPolicy, icert, false);
-        policyMapping =
-            PolicyChecker.mergePolicyMapping(policyMapping, icert);
-        inhibitAnyPolicy =
-            PolicyChecker.mergeInhibitAnyPolicy(inhibitAnyPolicy, icert);
-        certIndex++;
-
-        /*
-         * Update remaining CA certs
-         */
-        remainingCACerts =
-            ConstraintsChecker.mergeBasicConstraints(cert, remainingCACerts);
-
-        init = false;
-    }
-
-    /**
-     * Returns a boolean flag indicating if a key lacking necessary key
-     * algorithm parameters has been encountered.
-     *
-     * @return boolean flag indicating if key lacking parameters encountered.
-     */
-    @Override
-    public boolean keyParamsNeeded() {
-        /* when building in reverse, we immediately get parameters needed
-         * or else throw an exception
-         */
-        return false;
-    }
-
-    /*
-     * Clone current state. The state is cloned as each cert is
-     * added to the path. This is necessary if backtracking occurs,
-     * and a prior state needs to be restored.
-     *
-     * Note that this is a SMART clone. Not all fields are fully copied,
-     * because some of them (e.g., subjKeyId) will
-     * not have their contents modified by subsequent calls to updateState.
-     */
-    @Override
-    @SuppressWarnings("unchecked") // Safe casts assuming clone() works correctly
-    public Object clone() {
-        try {
-            ReverseState clonedState = (ReverseState) super.clone();
-
-            /* clone checkers, if cloneable */
-            clonedState.userCheckers =
-                        (ArrayList<PKIXCertPathChecker>)userCheckers.clone();
-            ListIterator<PKIXCertPathChecker> li =
-                        clonedState.userCheckers.listIterator();
-            while (li.hasNext()) {
-                PKIXCertPathChecker checker = li.next();
-                if (checker instanceof Cloneable) {
-                    li.set((PKIXCertPathChecker)checker.clone());
-                }
-            }
-
-            /* make copy of name constraints */
-            if (nc != null) {
-                clonedState.nc = (NameConstraintsExtension) nc.clone();
-            }
-
-            /* make copy of policy tree */
-            if (rootNode != null) {
-                clonedState.rootNode = rootNode.copyTree();
-            }
-
-            return clonedState;
-        } catch (CloneNotSupportedException e) {
-            throw new InternalError(e.toString(), e);
-        }
-    }
-}
--- a/src/java.base/share/classes/sun/security/provider/certpath/SunCertPathBuilder.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/security/provider/certpath/SunCertPathBuilder.java	Mon Apr 27 09:17:39 2015 -0700
@@ -35,8 +35,6 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
 import java.util.List;
 import java.util.LinkedList;
 import java.util.Set;
@@ -47,8 +45,7 @@
 import sun.security.util.Debug;
 
 /**
- * This class is able to build certification paths in either the forward
- * or reverse directions.
+ * This class builds certification paths in the forward direction.
  *
  * <p> If successful, it returns a certification path which has successfully
  * satisfied all the constraints and requirements specified in the
@@ -102,10 +99,8 @@
     /**
      * Attempts to build a certification path using the Sun build
      * algorithm from a trusted anchor(s) to a target subject, which must both
-     * be specified in the input parameter set. By default, this method will
-     * attempt to build in the forward direction. In order to build in the
-     * reverse direction, the caller needs to pass in an instance of
-     * SunCertPathBuilderParameters with the buildForward flag set to false.
+     * be specified in the input parameter set. This method will
+     * attempt to build in the forward direction: from the target to the CA.
      *
      * <p>The certification path that is constructed is validated
      * according to the PKIX specification.
@@ -162,11 +157,7 @@
         policyTreeResult = null;
         LinkedList<X509Certificate> certPathList = new LinkedList<>();
         try {
-            if (buildParams.buildForward()) {
-                buildForward(adjList, certPathList, searchAllCertStores);
-            } else {
-                buildReverse(adjList, certPathList);
-            }
+            buildForward(adjList, certPathList, searchAllCertStores);
         } catch (GeneralSecurityException | IOException e) {
             if (debug != null) {
                 debug.println("SunCertPathBuilder.engineBuild() exception in "
@@ -210,81 +201,6 @@
     }
 
     /*
-     * Private build reverse method.
-     */
-    private void buildReverse(List<List<Vertex>> adjacencyList,
-                              LinkedList<X509Certificate> certPathList)
-        throws GeneralSecurityException, IOException
-    {
-        if (debug != null) {
-            debug.println("SunCertPathBuilder.buildReverse()...");
-            debug.println("SunCertPathBuilder.buildReverse() InitialPolicies: "
-                + buildParams.initialPolicies());
-        }
-
-        ReverseState currentState = new ReverseState();
-        /* Initialize adjacency list */
-        adjacencyList.clear();
-        adjacencyList.add(new LinkedList<Vertex>());
-
-        /*
-         * Perform a search using each trust anchor, until a valid
-         * path is found
-         */
-        Iterator<TrustAnchor> iter = buildParams.trustAnchors().iterator();
-        while (iter.hasNext()) {
-            TrustAnchor anchor = iter.next();
-
-            /* check if anchor satisfies target constraints */
-            if (anchorIsTarget(anchor, buildParams.targetCertConstraints())) {
-                this.trustAnchor = anchor;
-                this.pathCompleted = true;
-                this.finalPublicKey = anchor.getTrustedCert().getPublicKey();
-                break;
-            }
-
-            // skip anchor if it contains a DSA key with no DSA params
-            X509Certificate trustedCert = anchor.getTrustedCert();
-            PublicKey pubKey = trustedCert != null ? trustedCert.getPublicKey()
-                                                   : anchor.getCAPublicKey();
-
-            if (PKIX.isDSAPublicKeyWithoutParams(pubKey)) {
-                continue;
-            }
-
-            /* Initialize current state */
-            currentState.initState(buildParams);
-            currentState.updateState(anchor, buildParams);
-
-            currentState.algorithmChecker = new AlgorithmChecker(anchor);
-            currentState.untrustedChecker = new UntrustedChecker();
-            try {
-                depthFirstSearchReverse(null, currentState,
-                                        new ReverseBuilder(buildParams),
-                                        adjacencyList, certPathList);
-            } catch (GeneralSecurityException | IOException e) {
-                // continue on error if more anchors to try
-                if (iter.hasNext())
-                    continue;
-                else
-                    throw e;
-            }
-
-            // break out of loop if search is successful
-            if (pathCompleted) {
-                break;
-            }
-        }
-
-        if (debug != null) {
-            debug.println("SunCertPathBuilder.buildReverse() returned from "
-                + "depthFirstSearchReverse()");
-            debug.println("SunCertPathBuilder.buildReverse() "
-                + "certPathList.size: " + certPathList.size());
-        }
-    }
-
-    /*
      * Private build forward method.
      */
     private void buildForward(List<List<Vertex>> adjacencyList,
@@ -632,147 +548,6 @@
     }
 
     /*
-     * This method performs a depth first search for a certification
-     * path while building reverse which meets the requirements set in
-     * the parameters object.
-     * It uses an adjacency list to store all certificates which were
-     * tried (i.e. at one time added to the path - they may not end up in
-     * the final path if backtracking occurs). This information can
-     * be used later to debug or demo the build.
-     *
-     * See "Data Structure and Algorithms, by Aho, Hopcroft, and Ullman"
-     * for an explanation of the DFS algorithm.
-     *
-     * @param dN the distinguished name being currently searched for certs
-     * @param currentState the current PKIX validation state
-     */
-    private void depthFirstSearchReverse(X500Principal dN,
-                                         ReverseState currentState,
-                                         ReverseBuilder builder,
-                                         List<List<Vertex>> adjList,
-                                         LinkedList<X509Certificate> cpList)
-        throws GeneralSecurityException, IOException
-    {
-        if (debug != null)
-            debug.println("SunCertPathBuilder.depthFirstSearchReverse(" + dN
-                + ", " + currentState.toString() + ")");
-
-        /*
-         * Find all the certificates issued by dN which
-         * satisfy the PKIX certification path constraints.
-         */
-        Collection<X509Certificate> certs =
-            builder.getMatchingCerts(currentState, buildParams.certStores());
-        List<Vertex> vertices = addVertices(certs, adjList);
-        if (debug != null)
-            debug.println("SunCertPathBuilder.depthFirstSearchReverse(): "
-                + "certs.size=" + vertices.size());
-
-        /*
-         * For each cert in the collection, verify anything
-         * that hasn't been checked yet (signature, revocation, etc)
-         * and check for loops. Call depthFirstSearchReverse()
-         * recursively for each good cert.
-         */
-        for (Vertex vertex : vertices) {
-            /**
-             * Restore state to currentState each time through the loop.
-             * This is important because some of the user-defined
-             * checkers modify the state, which MUST be restored if
-             * the cert eventually fails to lead to the target and
-             * the next matching cert is tried.
-             */
-            ReverseState nextState = (ReverseState) currentState.clone();
-            X509Certificate cert = vertex.getCertificate();
-            try {
-                builder.verifyCert(cert, nextState, cpList);
-            } catch (GeneralSecurityException gse) {
-                if (debug != null)
-                    debug.println("SunCertPathBuilder.depthFirstSearchReverse()"
-                        + ": validation failed: " + gse);
-                vertex.setThrowable(gse);
-                continue;
-            }
-
-            /*
-             * Certificate is good, add it to the path (if it isn't a
-             * self-signed cert) and update state
-             */
-            if (!currentState.isInitial())
-                builder.addCertToPath(cert, cpList);
-            // save trust anchor
-            this.trustAnchor = currentState.trustAnchor;
-
-            /*
-             * Check if path is completed, return ASAP if so.
-             */
-            if (builder.isPathCompleted(cert)) {
-                if (debug != null)
-                    debug.println("SunCertPathBuilder.depthFirstSearchReverse()"
-                        + ": path completed!");
-                pathCompleted = true;
-
-                PolicyNodeImpl rootNode = nextState.rootNode;
-
-                if (rootNode == null)
-                    policyTreeResult = null;
-                else {
-                    policyTreeResult = rootNode.copyTree();
-                    ((PolicyNodeImpl)policyTreeResult).setImmutable();
-                }
-
-                /*
-                 * Extract and save the final target public key
-                 */
-                finalPublicKey = cert.getPublicKey();
-                if (PKIX.isDSAPublicKeyWithoutParams(finalPublicKey)) {
-                    finalPublicKey =
-                        BasicChecker.makeInheritedParamsKey
-                            (finalPublicKey, currentState.pubKey);
-                }
-
-                return;
-            }
-
-            /* Update the PKIX state */
-            nextState.updateState(cert);
-
-            /*
-             * Append an entry for cert in adjacency list and
-             * set index for current vertex.
-             */
-            adjList.add(new LinkedList<Vertex>());
-            vertex.setIndex(adjList.size() - 1);
-
-            /* recursively search for matching certs at next dN */
-            depthFirstSearchReverse(cert.getSubjectX500Principal(), nextState,
-                                    builder, adjList, cpList);
-
-            /*
-             * If path has been completed, return ASAP!
-             */
-            if (pathCompleted) {
-                return;
-            } else {
-                /*
-                 * If we get here, it means we have searched all possible
-                 * certs issued by the dN w/o finding any matching certs. This
-                 * means we have to backtrack to the previous cert in the path
-                 * and try some other paths.
-                 */
-                if (debug != null)
-                    debug.println("SunCertPathBuilder.depthFirstSearchReverse()"
-                        + ": backtracking");
-                if (!currentState.isInitial())
-                    builder.removeFinalCertFromPath(cpList);
-            }
-        }
-        if (debug != null)
-            debug.println("SunCertPathBuilder.depthFirstSearchReverse() all "
-                + "certs in this adjacency list checked");
-    }
-
-    /*
      * Adds a collection of matching certificates to the
      * adjacency list.
      */
--- a/src/java.base/share/classes/sun/security/provider/certpath/SunCertPathBuilderParameters.java	Fri Apr 24 15:45:25 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.security.provider.certpath;
-
-import java.security.InvalidAlgorithmParameterException;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.cert.*;
-import java.util.Set;
-
-/**
- * This class specifies the set of parameters used as input for the Sun
- * certification path build algorithm. It is identical to PKIXBuilderParameters
- * with the addition of a <code>buildForward</code> parameter which allows
- * the caller to specify whether or not the path should be constructed in
- * the forward direction.
- *
- * The default for the <code>buildForward</code> parameter is
- * true, which means that the build algorithm should construct paths
- * from the target subject back to the trusted anchor.
- *
- * @since       1.4
- * @author      Sean Mullan
- * @author      Yassir Elley
- */
-public class SunCertPathBuilderParameters extends PKIXBuilderParameters {
-
-    private boolean buildForward = true;
-
-    /**
-     * Creates an instance of <code>SunCertPathBuilderParameters</code> with the
-     * specified parameter values.
-     *
-     * @param trustAnchors a <code>Set</code> of <code>TrustAnchor</code>s
-     * @param targetConstraints a <code>CertSelector</code> specifying the
-     * constraints on the target certificate
-     * @throws InvalidAlgorithmParameterException if the specified
-     * <code>Set</code> is empty <code>(trustAnchors.isEmpty() == true)</code>
-     * @throws NullPointerException if the specified <code>Set</code> is
-     * <code>null</code>
-     * @throws ClassCastException if any of the elements in the <code>Set</code>
-     * are not of type <code>java.security.cert.TrustAnchor</code>
-     */
-    public SunCertPathBuilderParameters(Set<TrustAnchor> trustAnchors,
-        CertSelector targetConstraints) throws InvalidAlgorithmParameterException
-    {
-        super(trustAnchors, targetConstraints);
-        setBuildForward(true);
-    }
-
-    /**
-     * Creates an instance of <code>SunCertPathBuilderParameters</code> that
-     * uses the specified <code>KeyStore</code> to populate the set
-     * of most-trusted CA certificates.
-     *
-     * @param keystore A keystore from which the set of most-trusted
-     * CA certificates will be populated.
-     * @param targetConstraints a <code>CertSelector</code> specifying the
-     * constraints on the target certificate
-     * @throws KeyStoreException if the keystore has not been initialized.
-     * @throws InvalidAlgorithmParameterException if the keystore does
-     * not contain at least one trusted certificate entry
-     * @throws NullPointerException if the keystore is <code>null</code>
-     */
-    public SunCertPathBuilderParameters(KeyStore keystore,
-        CertSelector targetConstraints)
-        throws KeyStoreException, InvalidAlgorithmParameterException
-    {
-        super(keystore, targetConstraints);
-        setBuildForward(true);
-    }
-
-    /**
-     * Returns the value of the buildForward flag.
-     *
-     * @return the value of the buildForward flag
-     */
-    public boolean getBuildForward() {
-        return this.buildForward;
-    }
-
-    /**
-     * Sets the value of the buildForward flag. If true, paths
-     * are built from the target subject to the trusted anchor.
-     * If false, paths are built from the trusted anchor to the
-     * target subject. The default value if not specified is true.
-     *
-     * @param buildForward the value of the buildForward flag
-     */
-    public void setBuildForward(boolean buildForward) {
-        this.buildForward = buildForward;
-    }
-
-    /**
-     * Returns a formatted string describing the parameters.
-     *
-     * @return a formatted string describing the parameters.
-     */
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append("[\n");
-        sb.append(super.toString());
-        sb.append("  Build Forward Flag: " + String.valueOf(buildForward) + "\n");
-        sb.append("]\n");
-        return sb.toString();
-    }
-}
--- a/src/java.base/share/classes/sun/security/ssl/SunJSSE.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/security/ssl/SunJSSE.java	Mon Apr 27 09:17:39 2015 -0700
@@ -148,7 +148,7 @@
     }
 
     private void registerAlgorithms(final boolean isfips) {
-        AccessController.doPrivileged(new PrivilegedAction<Object>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
             public Object run() {
                 doRegister(isfips);
--- a/src/java.base/share/classes/sun/security/util/DerInputStream.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/security/util/DerInputStream.java	Mon Apr 27 09:17:39 2015 -0700
@@ -394,7 +394,7 @@
         /*
          * Pull values out of the stream.
          */
-        Vector<DerValue> vec = new Vector<DerValue>(startLen);
+        Vector<DerValue> vec = new Vector<>(startLen);
         DerValue value;
 
         do {
--- a/src/java.base/share/classes/sun/security/util/ManifestDigester.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/security/util/ManifestDigester.java	Mon Apr 27 09:17:39 2015 -0700
@@ -110,7 +110,7 @@
     public ManifestDigester(byte bytes[])
     {
         rawBytes = bytes;
-        entries = new HashMap<String, Entry>();
+        entries = new HashMap<>();
 
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
 
--- a/src/java.base/share/classes/sun/security/util/ManifestEntryVerifier.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/security/util/ManifestEntryVerifier.java	Mon Apr 27 09:17:39 2015 -0700
@@ -77,9 +77,9 @@
      */
     public ManifestEntryVerifier(Manifest man)
     {
-        createdDigests = new HashMap<String, MessageDigest>(11);
-        digests = new ArrayList<MessageDigest>();
-        manifestHashes = new ArrayList<byte[]>();
+        createdDigests = new HashMap<>(11);
+        digests = new ArrayList<>();
+        manifestHashes = new ArrayList<>();
         this.man = man;
     }
 
--- a/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java	Mon Apr 27 09:17:39 2015 -0700
@@ -203,7 +203,7 @@
     private MessageDigest getDigest(String algorithm)
     {
         if (createdDigests == null)
-            createdDigests = new HashMap<String, MessageDigest>();
+            createdDigests = new HashMap<>();
 
         MessageDigest digest = createdDigests.get(algorithm);
 
@@ -523,7 +523,7 @@
             ArrayList<X509Certificate> chain = info.getCertificateChain(block);
             CertPath certChain = certificateFactory.generateCertPath(chain);
             if (signers == null) {
-                signers = new ArrayList<CodeSigner>();
+                signers = new ArrayList<>();
             }
             // Append the new code signer
             signers.add(new CodeSigner(certChain, info.getTimestamp()));
--- a/src/java.base/share/classes/sun/security/x509/AVA.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/security/x509/AVA.java	Mon Apr 27 09:17:39 2015 -0700
@@ -307,7 +307,7 @@
         // doublequote.
         int c = readChar(in, "Quoted string did not end in quote");
 
-        List<Byte> embeddedHex = new ArrayList<Byte>();
+        List<Byte> embeddedHex = new ArrayList<>();
         boolean isPrintableString = true;
         while (c != '"') {
             if (c == '\\') {
--- a/src/java.base/share/classes/sun/security/x509/AlgorithmId.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/security/x509/AlgorithmId.java	Mon Apr 27 09:17:39 2015 -0700
@@ -571,7 +571,7 @@
                             break;
                         }
                         if (oidTable == null) {
-                            oidTable = new HashMap<String,ObjectIdentifier>();
+                            oidTable = new HashMap<>();
                         }
                         oidString = alias.substring(index);
                         String stdAlgName = provs[i].getProperty(alias);
@@ -588,7 +588,7 @@
             }
 
             if (oidTable == null) {
-                oidTable = new HashMap<String,ObjectIdentifier>(1);
+                oidTable = new HashMap<>(1);
             }
             initOidTable = true;
         }
@@ -887,7 +887,7 @@
      */
         sha1WithDSA_oid = ObjectIdentifier.newInternal(dsaWithSHA1_PKIX_data);
 
-        nameTable = new HashMap<ObjectIdentifier,String>();
+        nameTable = new HashMap<>();
         nameTable.put(MD5_oid, "MD5");
         nameTable.put(MD2_oid, "MD2");
         nameTable.put(SHA_oid, "SHA-1");
--- a/src/java.base/share/classes/sun/security/x509/CertificatePolicySet.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/security/x509/CertificatePolicySet.java	Mon Apr 27 09:17:39 2015 -0700
@@ -58,7 +58,7 @@
      * @exception IOException on decoding errors.
      */
     public CertificatePolicySet(DerInputStream in) throws IOException {
-        ids = new Vector<CertificatePolicyId>();
+        ids = new Vector<>();
         DerValue[] seq = in.getSequence(5);
 
         for (int i = 0; i < seq.length; i++) {
--- a/src/java.base/share/classes/sun/security/x509/GeneralSubtrees.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/security/x509/GeneralSubtrees.java	Mon Apr 27 09:17:39 2015 -0700
@@ -59,11 +59,11 @@
      * The default constructor for the class.
      */
     public GeneralSubtrees() {
-        trees = new ArrayList<GeneralSubtree>();
+        trees = new ArrayList<>();
     }
 
     private GeneralSubtrees(GeneralSubtrees source) {
-        trees = new ArrayList<GeneralSubtree>(source.trees);
+        trees = new ArrayList<>(source.trees);
     }
 
     /**
--- a/src/java.base/share/classes/sun/security/x509/RDN.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/security/x509/RDN.java	Mon Apr 27 09:17:39 2015 -0700
@@ -102,7 +102,7 @@
         int quoteCount = 0;
         int searchOffset = 0;
         int avaOffset = 0;
-        List<AVA> avaVec = new ArrayList<AVA>(3);
+        List<AVA> avaVec = new ArrayList<>(3);
         int nextPlus = name.indexOf('+');
         while (nextPlus >= 0) {
             quoteCount += X500Name.countQuotes(name, searchOffset, nextPlus);
@@ -182,7 +182,7 @@
         }
         int searchOffset = 0;
         int avaOffset = 0;
-        List<AVA> avaVec = new ArrayList<AVA>(3);
+        List<AVA> avaVec = new ArrayList<>(3);
         int nextPlus = name.indexOf('+');
         while (nextPlus >= 0) {
             /*
@@ -453,7 +453,7 @@
         } else {
             // order the string type AVA's alphabetically,
             // followed by the oid type AVA's numerically
-            List<AVA> avaList = new ArrayList<AVA>(assertion.length);
+            List<AVA> avaList = new ArrayList<>(assertion.length);
             for (int i = 0; i < assertion.length; i++) {
                 avaList.add(assertion[i]);
             }
--- a/src/java.base/share/classes/sun/security/x509/X500Name.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/security/x509/X500Name.java	Mon Apr 27 09:17:39 2015 -0700
@@ -342,7 +342,7 @@
     public List<AVA> allAvas() {
         List<AVA> list = allAvaList;
         if (list == null) {
-            list = new ArrayList<AVA>();
+            list = new ArrayList<>();
             for (int i = 0; i < names.length; i++) {
                 list.addAll(names[i].avas());
             }
@@ -1382,7 +1382,7 @@
      */
     static {
         PrivilegedExceptionAction<Object[]> pa =
-                new PrivilegedExceptionAction<Object[]>() {
+                new PrivilegedExceptionAction<>() {
             public Object[] run() throws Exception {
                 Class<X500Principal> pClass = X500Principal.class;
                 Class<?>[] args = new Class<?>[] { X500Name.class };
--- a/src/java.base/share/classes/sun/util/PreHashedMap.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/util/PreHashedMap.java	Mon Apr 27 09:17:39 2015 -0700
@@ -166,14 +166,14 @@
     }
 
     public Set<String> keySet() {
-        return new AbstractSet<String> () {
+        return new AbstractSet<> () {
 
             public int size() {
                 return size;
             }
 
             public Iterator<String> iterator() {
-                return new Iterator<String>() {
+                return new Iterator<>() {
                     private int i = -1;
                     Object[] a = null;
                     String cur = null;
--- a/src/java.base/share/classes/sun/util/locale/provider/LocaleResources.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/util/locale/provider/LocaleResources.java	Mon Apr 27 09:17:39 2015 -0700
@@ -47,6 +47,7 @@
 import java.util.LinkedHashSet;
 import java.util.Locale;
 import java.util.Map;
+import java.util.Objects;
 import java.util.ResourceBundle;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
@@ -250,17 +251,17 @@
         return (String) localeName;
     }
 
-    String[] getTimeZoneNames(String key, int size) {
+    String[] getTimeZoneNames(String key) {
         String[] names = null;
-        String cacheKey = TIME_ZONE_NAMES + size + '.' + key;
+        String cacheKey = TIME_ZONE_NAMES + '.' + key;
 
         removeEmptyReferences();
         ResourceReference data = cache.get(cacheKey);
 
-        if (data == null || ((names = (String[]) data.get()) == null)) {
+        if (Objects.isNull(data) || Objects.isNull((names = (String[]) data.get()))) {
             TimeZoneNamesBundle tznb = localeData.getTimeZoneNames(locale);
             if (tznb.containsKey(key)) {
-                names = tznb.getStringArray(key, size);
+                names = tznb.getStringArray(key);
                 cache.put(cacheKey,
                           new ResourceReference(cacheKey, (Object) names, referenceQueue));
             }
--- a/src/java.base/share/classes/sun/util/locale/provider/TimeZoneNameProviderImpl.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/util/locale/provider/TimeZoneNameProviderImpl.java	Mon Apr 27 09:17:39 2015 -0700
@@ -26,6 +26,7 @@
 package sun.util.locale.provider;
 
 import java.util.Locale;
+import java.util.Objects;
 import java.util.Set;
 import java.util.TimeZone;
 import java.util.spi.TimeZoneNameProvider;
@@ -95,8 +96,9 @@
      */
     @Override
     public String getDisplayName(String id, boolean daylight, int style, Locale locale) {
-        String[] names = getDisplayNameArray(id, 5, locale);
-        if (names != null) {
+        String[] names = getDisplayNameArray(id, locale);
+        if (Objects.nonNull(names)) {
+            assert names.length >= 7;
             int index = daylight ? 3 : 1;
             if (style == TimeZone.SHORT) {
                 index++;
@@ -108,18 +110,18 @@
 
     @Override
     public String getGenericDisplayName(String id, int style, Locale locale) {
-        String[] names = getDisplayNameArray(id, 7, locale);
-        if (names != null && names.length >= 7) {
+        String[] names = getDisplayNameArray(id, locale);
+        if (Objects.nonNull(names)) {
+            assert names.length >= 7;
             return names[(style == TimeZone.LONG) ? 5 : 6];
         }
         return null;
     }
 
-    private String[] getDisplayNameArray(String id, int n, Locale locale) {
-        if (id == null || locale == null) {
-            throw new NullPointerException();
-        }
-        return LocaleProviderAdapter.forType(type).getLocaleResources(locale).getTimeZoneNames(id, n);
+    private String[] getDisplayNameArray(String id, Locale locale) {
+        Objects.requireNonNull(id);
+        Objects.requireNonNull(locale);
+        return LocaleProviderAdapter.forType(type).getLocaleResources(locale).getTimeZoneNames(id);
     }
 
     /**
--- a/src/java.base/share/classes/sun/util/locale/provider/TimeZoneNameUtility.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/util/locale/provider/TimeZoneNameUtility.java	Mon Apr 27 09:17:39 2015 -0700
@@ -30,6 +30,7 @@
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
+import java.util.Objects;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.spi.TimeZoneNameProvider;
@@ -100,9 +101,9 @@
      * Retrieve display names for a time zone ID.
      */
     public static String[] retrieveDisplayNames(String id, Locale locale) {
-        if (id == null || locale == null) {
-            throw new NullPointerException();
-        }
+        Objects.requireNonNull(id);
+        Objects.requireNonNull(locale);
+
         return retrieveDisplayNamesImpl(id, locale);
     }
 
@@ -115,9 +116,12 @@
      * @return the requested generic time zone display name, or null if not found.
      */
     public static String retrieveGenericDisplayName(String id, int style, Locale locale) {
-        LocaleServiceProviderPool pool =
-            LocaleServiceProviderPool.getPool(TimeZoneNameProvider.class);
-        return pool.getLocalizedObject(TimeZoneNameGetter.INSTANCE, locale, "generic", style, id);
+        String[] names = retrieveDisplayNamesImpl(id, locale);
+        if (Objects.nonNull(names)) {
+            return names[6 - style];
+        } else {
+            return null;
+        }
     }
 
     /**
@@ -130,140 +134,53 @@
      * @return the requested time zone name, or null if not found.
      */
     public static String retrieveDisplayName(String id, boolean daylight, int style, Locale locale) {
-        LocaleServiceProviderPool pool =
-            LocaleServiceProviderPool.getPool(TimeZoneNameProvider.class);
-        return pool.getLocalizedObject(TimeZoneNameGetter.INSTANCE, locale, daylight ? "dst" : "std", style, id);
+        String[] names = retrieveDisplayNamesImpl(id, locale);
+        if (Objects.nonNull(names)) {
+            return names[(daylight ? 4 : 2) - style];
+        } else {
+            return null;
+        }
     }
 
     private static String[] retrieveDisplayNamesImpl(String id, Locale locale) {
         LocaleServiceProviderPool pool =
             LocaleServiceProviderPool.getPool(TimeZoneNameProvider.class);
+        String[] names;
+        Map<Locale, String[]> perLocale = null;
 
         SoftReference<Map<Locale, String[]>> ref = cachedDisplayNames.get(id);
-        if (ref != null) {
-            Map<Locale, String[]> perLocale = ref.get();
-            if (perLocale != null) {
-                String[] names = perLocale.get(locale);
-                if (names != null) {
+        if (Objects.nonNull(ref)) {
+            perLocale = ref.get();
+            if (Objects.nonNull(perLocale)) {
+                names = perLocale.get(locale);
+                if (Objects.nonNull(names)) {
                     return names;
                 }
-                names = pool.getLocalizedObject(TimeZoneNameArrayGetter.INSTANCE, locale, id);
-                if (names != null) {
-                    perLocale.put(locale, names);
-                }
-                return names;
             }
         }
 
-        String[] names = pool.getLocalizedObject(TimeZoneNameArrayGetter.INSTANCE, locale, id);
-        if (names != null) {
-            Map<Locale, String[]> perLocale = new ConcurrentHashMap<>();
-            perLocale.put(locale, names);
-            ref = new SoftReference<>(perLocale);
-            cachedDisplayNames.put(id, ref);
+        // build names array
+        names = new String[7];
+        names[0] = id;
+        for (int i = 1; i <= 6; i ++) {
+            names[i] = pool.getLocalizedObject(TimeZoneNameGetter.INSTANCE, locale,
+                    i<5 ? (i<3 ? "std" : "dst") : "generic", i%2, id);
         }
+
+        if (Objects.isNull(perLocale)) {
+            perLocale = new ConcurrentHashMap<>();
+        }
+        perLocale.put(locale, names);
+        ref = new SoftReference<>(perLocale);
+        cachedDisplayNames.put(id, ref);
         return names;
     }
 
+
     /**
      * Obtains a localized time zone strings from a TimeZoneNameProvider
      * implementation.
      */
-    private static class TimeZoneNameArrayGetter
-        implements LocaleServiceProviderPool.LocalizedObjectGetter<TimeZoneNameProvider,
-                                                                   String[]>{
-        private static final TimeZoneNameArrayGetter INSTANCE =
-            new TimeZoneNameArrayGetter();
-
-        @Override
-        public String[] getObject(TimeZoneNameProvider timeZoneNameProvider,
-                                  Locale locale,
-                                  String requestID,
-                                  Object... params) {
-            assert params.length == 0;
-
-            // First, try to get names with the request ID
-            String[] names = buildZoneStrings(timeZoneNameProvider, locale, requestID);
-
-            if (names == null) {
-                Map<String, String> aliases = ZoneInfo.getAliasTable();
-
-                if (aliases != null) {
-                    // Check whether this id is an alias, if so,
-                    // look for the standard id.
-                    String canonicalID = aliases.get(requestID);
-                    if (canonicalID != null) {
-                        names = buildZoneStrings(timeZoneNameProvider, locale, canonicalID);
-                    }
-                    if (names == null) {
-                        // There may be a case that a standard id has become an
-                        // alias.  so, check the aliases backward.
-                        names = examineAliases(timeZoneNameProvider, locale,
-                                   canonicalID == null ? requestID : canonicalID, aliases);
-                    }
-                }
-            }
-
-            if (names != null) {
-                names[0] = requestID;
-            }
-
-            return names;
-        }
-
-        private static String[] examineAliases(TimeZoneNameProvider tznp, Locale locale,
-                                               String id,
-                                               Map<String, String> aliases) {
-            if (aliases.containsValue(id)) {
-                for (Map.Entry<String, String> entry : aliases.entrySet()) {
-                    if (entry.getValue().equals(id)) {
-                        String alias = entry.getKey();
-                        String[] names = buildZoneStrings(tznp, locale, alias);
-                        if (names != null) {
-                            return names;
-                        }
-                        names = examineAliases(tznp, locale, alias, aliases);
-                        if (names != null) {
-                            return names;
-                        }
-                    }
-                }
-            }
-
-            return null;
-        }
-
-        private static String[] buildZoneStrings(TimeZoneNameProvider tznp,
-                                                 Locale locale, String id) {
-            String[] names = new String[5];
-
-            for (int i = 1; i <= 4; i ++) {
-                names[i] = tznp.getDisplayName(id, i>=3, i%2, locale);
-
-                if (names[i] == null) {
-                    switch (i) {
-                    case 1:
-                        // this id seems not localized by this provider
-                        return null;
-                    case 2:
-                    case 4:
-                        // If the display name for SHORT is not supplied,
-                        // copy the LONG name.
-                        names[i] = names[i-1];
-                        break;
-                    case 3:
-                        // If the display name for DST is not supplied,
-                        // copy the "standard" name.
-                        names[3] = names[1];
-                        break;
-                }
-            }
-            }
-
-            return names;
-        }
-    }
-
     private static class TimeZoneNameGetter
         implements LocaleServiceProviderPool.LocalizedObjectGetter<TimeZoneNameProvider,
                                                                    String> {
@@ -299,18 +216,16 @@
         private static String examineAliases(TimeZoneNameProvider tznp, Locale locale,
                                              String requestID, String tzid, int style,
                                              Map<String, String> aliases) {
-            if (aliases.containsValue(tzid)) {
-                for (Map.Entry<String, String> entry : aliases.entrySet()) {
-                    if (entry.getValue().equals(tzid)) {
-                        String alias = entry.getKey();
-                        String name = getName(tznp, locale, requestID, style, alias);
-                        if (name != null) {
-                            return name;
-                        }
-                        name = examineAliases(tznp, locale, requestID, alias, style, aliases);
-                        if (name != null) {
-                            return name;
-                        }
+            for (Map.Entry<String, String> entry : aliases.entrySet()) {
+                if (entry.getValue().equals(tzid)) {
+                    String alias = entry.getKey();
+                    String name = getName(tznp, locale, requestID, style, alias);
+                    if (name != null) {
+                        return name;
+                    }
+                    name = examineAliases(tznp, locale, requestID, alias, style, aliases);
+                    if (name != null) {
+                        return name;
                     }
                 }
             }
--- a/src/java.base/share/classes/sun/util/logging/PlatformLogger.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/util/logging/PlatformLogger.java	Mon Apr 27 09:17:39 2015 -0700
@@ -161,7 +161,7 @@
     private static boolean loggingEnabled;
     static {
         loggingEnabled = AccessController.doPrivileged(
-            new PrivilegedAction<Boolean>() {
+            new PrivilegedAction<>() {
                 public Boolean run() {
                     String cname = System.getProperty("java.util.logging.config.class");
                     String fname = System.getProperty("java.util.logging.config.file");
--- a/src/java.base/share/classes/sun/util/resources/LocaleData.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/util/resources/LocaleData.java	Mon Apr 27 09:17:39 2015 -0700
@@ -159,7 +159,7 @@
     }
 
     public static ResourceBundle getBundle(final String baseName, final Locale locale) {
-        return AccessController.doPrivileged(new PrivilegedAction<ResourceBundle>() {
+        return AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
             public ResourceBundle run() {
                 return ResourceBundle
@@ -169,7 +169,7 @@
     }
 
     private static OpenListResourceBundle getSupplementary(final String baseName, final Locale locale) {
-        return AccessController.doPrivileged(new PrivilegedAction<OpenListResourceBundle>() {
+        return AccessController.doPrivileged(new PrivilegedAction<>() {
            @Override
            public OpenListResourceBundle run() {
                OpenListResourceBundle rb = null;
--- a/src/java.base/share/classes/sun/util/resources/ParallelListResourceBundle.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/util/resources/ParallelListResourceBundle.java	Mon Apr 27 09:17:39 2015 -0700
@@ -213,7 +213,7 @@
             if (parent == null) {
                 return set.iterator();
             }
-            return new Iterator<String>() {
+            return new Iterator<>() {
                 private Iterator<String> itr = set.iterator();
                 private boolean usingParent;
 
--- a/src/java.base/share/classes/sun/util/resources/TimeZoneNamesBundle.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/util/resources/TimeZoneNamesBundle.java	Mon Apr 27 09:17:39 2015 -0700
@@ -44,6 +44,7 @@
 import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;
 import java.util.MissingResourceException;
+import java.util.Objects;
 import java.util.Set;
 
 /**
@@ -61,26 +62,6 @@
 public abstract class TimeZoneNamesBundle extends OpenListResourceBundle {
 
     /**
-     * Returns a String array containing time zone names. The String array has
-     * at most size elements.
-     *
-     * @param key  the time zone ID for which names are obtained
-     * @param size the requested size of array for names
-     * @return a String array containing names
-     */
-    public String[] getStringArray(String key, int size) {
-        String[] names = handleGetObject(key, size);
-        if ((names == null || names.length != size) && parent != null) {
-            names = ((TimeZoneNamesBundle)parent).getStringArray(key, size);
-        }
-        if (names == null) {
-            throw new MissingResourceException("no time zone names", getClass().getName(), key);
-        }
-        return names;
-
-    }
-
-    /**
      * Maps time zone IDs to locale-specific names.
      * The value returned is an array of five strings:
      * <ul>
@@ -89,6 +70,8 @@
      * <li>The short name of the time zone in standard time (localized).
      * <li>The long name of the time zone in daylight savings time (localized).
      * <li>The short name of the time zone in daylight savings time (localized).
+     * <li>The long name of the time zone in generic form (localized).
+     * <li>The short name of the time zone in generic form (localized).
      * </ul>
      * The localized names come from the subclasses's
      * <code>getContents</code> implementations, while the time zone
@@ -96,16 +79,12 @@
      */
     @Override
     public Object handleGetObject(String key) {
-        return handleGetObject(key, 5);
-    }
-
-    private String[] handleGetObject(String key, int n) {
         String[] contents = (String[]) super.handleGetObject(key);
-        if (contents == null) {
+        if (Objects.isNull(contents)) {
             return null;
         }
-        int clen = Math.min(n - 1, contents.length);
-        String[] tmpobj = new String[clen+1];
+        int clen = contents.length;
+        String[] tmpobj = new String[7];
         tmpobj[0] = key;
         System.arraycopy(contents, 0, tmpobj, 1, clen);
         return tmpobj;
--- a/src/java.base/share/classes/sun/util/resources/en/TimeZoneNames_en_IE.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/share/classes/sun/util/resources/en/TimeZoneNames_en_IE.java	Mon Apr 27 09:17:39 2015 -0700
@@ -47,7 +47,8 @@
     protected final Object[][] getContents() {
         return new Object[][] {
             {"Europe/London", new String[] {"Greenwich Mean Time", "GMT",
-                                    "Irish Summer Time", "IST" /*Dublin*/}},
+                                    "Irish Summer Time", "IST", /*Dublin*/
+                                    "Irish Time", "IT" /*Dublin*/}},
         };
     }
 }
--- a/src/java.base/unix/classes/java/lang/ProcessEnvironment.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/unix/classes/java/lang/ProcessEnvironment.java	Mon Apr 27 09:17:39 2015 -0700
@@ -99,7 +99,7 @@
 
     /* Only for use by Runtime.exec(...String[]envp...) */
     static Map<String,String> emptyEnvironment(int capacity) {
-        return new StringEnvironment(new HashMap<Variable,Value>(capacity));
+        return new StringEnvironment(new HashMap<>(capacity));
     }
 
     private static native byte[][] environ();
--- a/src/java.base/unix/classes/sun/net/PortConfig.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/unix/classes/sun/net/PortConfig.java	Mon Apr 27 09:17:39 2015 -0700
@@ -42,7 +42,7 @@
 
     static {
         AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("net");
                     String os = System.getProperty("os.name");
--- a/src/java.base/unix/classes/sun/net/dns/ResolverConfigurationImpl.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/unix/classes/sun/net/dns/ResolverConfigurationImpl.java	Mon Apr 27 09:17:39 2015 -0700
@@ -85,6 +85,15 @@
                     if (val.charAt(0) == '#' || val.charAt(0) == ';') {
                         break;
                     }
+                    if ("nameserver".equals(keyword)) {
+                        if (val.indexOf(':') >= 0 &&
+                            val.indexOf('.') < 0 && // skip for IPv4 literals with port
+                            val.indexOf('[') < 0 &&
+                            val.indexOf(']') < 0 ) {
+                            // IPv6 literal, in non-BSD-style.
+                            val = "[" + val + "]";
+                        }
+                    }
                     ll.add(val);
                     if (--maxvalues == 0) {
                         break;
@@ -122,7 +131,7 @@
         // get the name servers from /etc/resolv.conf
         nameservers =
             java.security.AccessController.doPrivileged(
-                new java.security.PrivilegedAction<LinkedList<String>>() {
+                new java.security.PrivilegedAction<>() {
                     public LinkedList<String> run() {
                         // typically MAXNS is 3 but we've picked 5 here
                         // to allow for additional servers if required.
@@ -147,7 +156,7 @@
         // first try the search keyword in /etc/resolv.conf
 
         sl = java.security.AccessController.doPrivileged(
-                 new java.security.PrivilegedAction<LinkedList<String>>() {
+                 new java.security.PrivilegedAction<>() {
                     public LinkedList<String> run() {
                         LinkedList<String> ll;
 
@@ -173,7 +182,7 @@
 
         String localDomain = localDomain0();
         if (localDomain != null && localDomain.length() > 0) {
-            sl = new LinkedList<String>();
+            sl = new LinkedList<>();
             sl.add(localDomain);
             return sl;
         }
@@ -181,7 +190,7 @@
         // try domain keyword in /etc/resolv.conf
 
         sl = java.security.AccessController.doPrivileged(
-                 new java.security.PrivilegedAction<LinkedList<String>>() {
+                 new java.security.PrivilegedAction<>() {
                     public LinkedList<String> run() {
                         LinkedList<String> ll;
 
@@ -251,7 +260,7 @@
 
     static {
         java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<Void>() {
+            new java.security.PrivilegedAction<>() {
                 public Void run() {
                     System.loadLibrary("net");
                     return null;
--- a/src/java.base/unix/classes/sun/net/sdp/SdpProvider.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/unix/classes/sun/net/sdp/SdpProvider.java	Mon Apr 27 09:17:39 2015 -0700
@@ -198,7 +198,7 @@
     {
         Scanner scanner = new Scanner(new File(file));
         try {
-            List<Rule> result = new ArrayList<Rule>();
+            List<Rule> result = new ArrayList<>();
             while (scanner.hasNextLine()) {
                 String line = scanner.nextLine().trim();
 
--- a/src/java.base/unix/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/unix/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java	Mon Apr 27 09:17:39 2015 -0700
@@ -95,7 +95,7 @@
     private void init0() {
 
         hostname = java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction<String>() {
+            new java.security.PrivilegedAction<>() {
             public String run() {
                 String localhost;
                 try {
--- a/src/java.base/unix/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/unix/classes/sun/nio/ch/UnixAsynchronousServerSocketChannelImpl.java	Mon Apr 27 09:17:39 2015 -0700
@@ -216,7 +216,7 @@
         // permission check must always be in initiator's context
         try {
             if (acc != null) {
-                AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                AccessController.doPrivileged(new PrivilegedAction<>() {
                     public Void run() {
                         SecurityManager sm = System.getSecurityManager();
                         if (sm != null) {
@@ -287,7 +287,7 @@
                 synchronized (updateLock) {
                     if (handler == null) {
                         this.acceptHandler = null;
-                        result = new PendingFuture<AsynchronousSocketChannel,Object>(this);
+                        result = new PendingFuture<>(this);
                         this.acceptFuture = result;
                     } else {
                         this.acceptHandler = handler;
--- a/src/java.base/unix/classes/sun/nio/fs/GnomeFileTypeDetector.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/unix/classes/sun/nio/fs/GnomeFileTypeDetector.java	Mon Apr 27 09:17:39 2015 -0700
@@ -93,7 +93,7 @@
     private static native byte[] probeUsingGnomeVfs(long pathAddress);
 
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             public Void run() {
                 System.loadLibrary("nio");
                 return null;
--- a/src/java.base/unix/classes/sun/nio/fs/MimeTypesFileTypeDetector.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/unix/classes/sun/nio/fs/MimeTypesFileTypeDetector.java	Mon Apr 27 09:17:39 2015 -0700
@@ -106,7 +106,7 @@
             synchronized (this) {
                 if (!loaded) {
                     List<String> lines = AccessController.doPrivileged(
-                        new PrivilegedAction<List<String>>() {
+                        new PrivilegedAction<>() {
                             @Override
                             public List<String> run() {
                                 try {
--- a/src/java.base/unix/classes/sun/nio/fs/UnixCopyFile.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/unix/classes/sun/nio/fs/UnixCopyFile.java	Mon Apr 27 09:17:39 2015 -0700
@@ -606,7 +606,7 @@
         throws UnixException;
 
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             @Override
             public Void run() {
                 System.loadLibrary("nio");
--- a/src/java.base/unix/classes/sun/nio/fs/UnixFileStore.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/unix/classes/sun/nio/fs/UnixFileStore.java	Mon Apr 27 09:17:39 2015 -0700
@@ -222,7 +222,7 @@
             synchronized (loadLock) {
                 if (props == null) {
                     props = AccessController.doPrivileged(
-                        new PrivilegedAction<Properties>() {
+                        new PrivilegedAction<>() {
                             @Override
                             public Properties run() {
                                 return loadProperties();
--- a/src/java.base/unix/classes/sun/nio/fs/UnixFileSystem.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/unix/classes/sun/nio/fs/UnixFileSystem.java	Mon Apr 27 09:17:39 2015 -0700
@@ -152,7 +152,7 @@
     public final Iterable<Path> getRootDirectories() {
         final List<Path> allowedList =
            Collections.unmodifiableList(Arrays.asList((Path)rootDirectory));
-        return new Iterable<Path>() {
+        return new Iterable<>() {
             public Iterator<Path> iterator() {
                 try {
                     SecurityManager sm = System.getSecurityManager();
@@ -254,7 +254,7 @@
                 return Collections.emptyList();
             }
         }
-        return new Iterable<FileStore>() {
+        return new Iterable<>() {
             public Iterator<FileStore> iterator() {
                 return new FileStoreIterator();
             }
--- a/src/java.base/unix/classes/sun/nio/fs/UnixNativeDispatcher.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/unix/classes/sun/nio/fs/UnixNativeDispatcher.java	Mon Apr 27 09:17:39 2015 -0700
@@ -568,7 +568,7 @@
 
     private static native int init();
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+        AccessController.doPrivileged(new PrivilegedAction<>() {
             public Void run() {
                 System.loadLibrary("nio");
                 return null;
--- a/src/java.base/unix/classes/sun/nio/fs/UnixPath.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/unix/classes/sun/nio/fs/UnixPath.java	Mon Apr 27 09:17:39 2015 -0700
@@ -121,7 +121,7 @@
             ce = Util.jnuEncoding().newEncoder()
                 .onMalformedInput(CodingErrorAction.REPORT)
                 .onUnmappableCharacter(CodingErrorAction.REPORT);
-            encoder.set(new SoftReference<CharsetEncoder>(ce));
+            encoder.set(new SoftReference<>(ce));
         }
 
         char[] ca = fs.normalizeNativePath(input.toCharArray());
--- a/src/java.base/unix/classes/sun/security/provider/NativePRNG.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/unix/classes/sun/security/provider/NativePRNG.java	Mon Apr 27 09:17:39 2015 -0700
@@ -125,7 +125,7 @@
      */
     private static RandomIO initIO(final Variant v) {
         return AccessController.doPrivileged(
-            new PrivilegedAction<RandomIO>() {
+            new PrivilegedAction<>() {
                 @Override
                 public RandomIO run() {
 
@@ -440,7 +440,7 @@
                 if (seedOutInitialized == false) {
                     seedOutInitialized = true;
                     seedOut = AccessController.doPrivileged(
-                            new PrivilegedAction<OutputStream>() {
+                            new PrivilegedAction<>() {
                         @Override
                         public OutputStream run() {
                             try {
--- a/src/java.base/windows/native/launcher/java.manifest	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/windows/native/launcher/java.manifest	Mon Apr 27 09:17:39 2015 -0700
@@ -4,12 +4,12 @@
           xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"
 >
 <assemblyIdentity
-    version="IMVERSION"
+    name=""
+    version=""
     processorArchitecture="X86"
-    name="Oracle Corporation, Java(tm) 2 Standard Edition"
     type="win32"
 />
-<description>Java(TM) SE PROGRAM process</description>
+<description>Java(TM) SE process</description>
 <dependency>
     <dependentAssembly>
         <assemblyIdentity
--- a/src/java.base/windows/native/launcher/java.rc	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/windows/native/launcher/java.rc	Mon Apr 27 09:17:39 2015 -0700
@@ -7,9 +7,3 @@
 // Icon
 //
 IDI_ICON           ICON    DISCARDABLE     "awt.ico"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// RT_MANIFEST
-//
-1                  RT_MANIFEST             "java.manifest"
--- a/src/java.base/windows/native/libjava/TimeZone_md.c	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.base/windows/native/libjava/TimeZone_md.c	Mon Apr 27 09:17:39 2015 -0700
@@ -147,219 +147,248 @@
  */
 static int getWinTimeZone(char *winZoneName, char *winMapID)
 {
-    TIME_ZONE_INFORMATION tzi;
-    OSVERSIONINFO ver;
-    int onlyMapID;
-    HANDLE hKey = NULL, hSubKey = NULL;
+    DYNAMIC_TIME_ZONE_INFORMATION dtzi;
+    DWORD timeType;
+    DWORD bufSize;
+    DWORD val;
+    HANDLE hKey = NULL;
     LONG ret;
-    DWORD nSubKeys, i;
     ULONG valueType;
-    TCHAR subKeyName[MAX_ZONE_CHAR];
-    TCHAR szValue[MAX_ZONE_CHAR];
-    WCHAR stdNameInReg[MAX_ZONE_CHAR];
-    TziValue tempTzi;
-    WCHAR *stdNamePtr = tzi.StandardName;
-    DWORD valueSize;
-    DWORD timeType;
-    int isVista;
 
     /*
-     * Get the current time zone setting of the platform.
+     * Get the dynamic time zone information so that time zone redirection
+     * can be supported. (see JDK-7044727)
      */
-    timeType = GetTimeZoneInformation(&tzi);
+    timeType = GetDynamicTimeZoneInformation(&dtzi);
     if (timeType == TIME_ZONE_ID_INVALID) {
         goto err;
     }
 
     /*
-     * Determine if this is an NT system.
+     * Make sure TimeZoneKeyName is available from the API call. If
+     * DynamicDaylightTime is disabled, return a custom time zone name
+     * based on the GMT offset. Otherwise, return the TimeZoneKeyName
+     * value.
      */
-    ver.dwOSVersionInfoSize = sizeof(ver);
-    GetVersionEx(&ver);
-    isVista = ver.dwMajorVersion >= 6;
+    if (dtzi.TimeZoneKeyName[0] != 0) {
+        if (dtzi.DynamicDaylightTimeDisabled) {
+            customZoneName(dtzi.Bias, winZoneName);
+            return VALUE_GMTOFFSET;
+        }
+        wcstombs(winZoneName, dtzi.TimeZoneKeyName, MAX_ZONE_CHAR);
+        return VALUE_KEY;
+    }
 
-    ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_CURRENT_TZ_KEY, 0,
-                       KEY_READ, (PHKEY)&hKey);
-    if (ret == ERROR_SUCCESS) {
-        DWORD val;
-        DWORD bufSize;
+    /*
+     * If TimeZoneKeyName is not available, check whether StandardName
+     * is available to fall back to the older API GetTimeZoneInformation.
+     * If not, directly read the value from registry keys.
+     */
+    if (dtzi.StandardName[0] == 0) {
+        ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_CURRENT_TZ_KEY, 0,
+                           KEY_READ, (PHKEY)&hKey);
+        if (ret != ERROR_SUCCESS) {
+            goto err;
+        }
 
         /*
          * Determine if auto-daylight time adjustment is turned off.
          */
-        valueType = 0;
         bufSize = sizeof(val);
-        ret = RegQueryValueExA(hKey, "DisableAutoDaylightTimeSet",
-                               NULL, &valueType, (LPBYTE) &val, &bufSize);
+        ret = RegQueryValueExA(hKey, "DynamicDaylightTimeDisabled", NULL,
+                               &valueType, (LPBYTE) &val, &bufSize);
+        if (ret != ERROR_SUCCESS) {
+            goto err;
+        }
         /*
-         * Vista uses the different key name.
+         * Return a custom time zone name if auto-daylight time adjustment
+         * is disabled.
          */
-        if (ret != ERROR_SUCCESS) {
-            bufSize = sizeof(val);
-            ret = RegQueryValueExA(hKey, "DynamicDaylightTimeDisabled",
-                                   NULL, &valueType, (LPBYTE) &val, &bufSize);
+        if (val == 1) {
+            customZoneName(dtzi.Bias, winZoneName);
+            (void) RegCloseKey(hKey);
+            return VALUE_GMTOFFSET;
         }
 
+        bufSize = MAX_ZONE_CHAR;
+        ret = RegQueryValueExA(hKey, "TimeZoneKeyName", NULL,
+                               &valueType, (LPBYTE) winZoneName, &bufSize);
+        if (ret != ERROR_SUCCESS) {
+            goto err;
+        }
+        (void) RegCloseKey(hKey);
+        return VALUE_KEY;
+    } else {
+        /*
+         * Fall back to GetTimeZoneInformation
+         */
+        TIME_ZONE_INFORMATION tzi;
+        HANDLE hSubKey = NULL;
+        DWORD nSubKeys, i;
+        ULONG valueType;
+        TCHAR subKeyName[MAX_ZONE_CHAR];
+        TCHAR szValue[MAX_ZONE_CHAR];
+        WCHAR stdNameInReg[MAX_ZONE_CHAR];
+        TziValue tempTzi;
+        WCHAR *stdNamePtr = tzi.StandardName;
+        DWORD valueSize;
+        int onlyMapID;
+
+        timeType = GetTimeZoneInformation(&tzi);
+        if (timeType == TIME_ZONE_ID_INVALID) {
+            goto err;
+        }
+
+        ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_CURRENT_TZ_KEY, 0,
+                           KEY_READ, (PHKEY)&hKey);
         if (ret == ERROR_SUCCESS) {
-            int daylightSavingsUpdateDisabledOther = val == 1 && tzi.DaylightDate.wMonth != 0;
-            int daylightSavingsUpdateDisabledVista = val == 1;
-            int daylightSavingsUpdateDisabled = isVista ? daylightSavingsUpdateDisabledVista : daylightSavingsUpdateDisabledOther;
+            /*
+             * Determine if auto-daylight time adjustment is turned off.
+             */
+            bufSize = sizeof(val);
+            ret = RegQueryValueExA(hKey, "DynamicDaylightTimeDisabled", NULL,
+                                   &valueType, (LPBYTE) &val, &bufSize);
+            if (ret == ERROR_SUCCESS) {
+                if (val == 1 && tzi.DaylightDate.wMonth != 0) {
+                    (void) RegCloseKey(hKey);
+                    customZoneName(tzi.Bias, winZoneName);
+                    return VALUE_GMTOFFSET;
+                }
+            }
 
-            if (daylightSavingsUpdateDisabled) {
-                (void) RegCloseKey(hKey);
-                customZoneName(tzi.Bias, winZoneName);
-                return VALUE_GMTOFFSET;
+            /*
+             * Win32 problem: If the length of the standard time name is equal
+             * to (or probably longer than) 32 in the registry,
+             * GetTimeZoneInformation() on NT returns a null string as its
+             * standard time name. We need to work around this problem by
+             * getting the same information from the TimeZoneInformation
+             * registry.
+             */
+            if (tzi.StandardName[0] == 0) {
+                bufSize = sizeof(stdNameInReg);
+                ret = getValueInRegistry(hKey, STANDARD_NAME, &valueType,
+                                         (LPBYTE) stdNameInReg, &bufSize);
+                if (ret != ERROR_SUCCESS) {
+                    goto err;
+                }
+                stdNamePtr = stdNameInReg;
+            }
+            (void) RegCloseKey(hKey);
+        }
+
+        /*
+         * Open the "Time Zones" registry.
+         */
+        ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, NT_TZ_KEY, 0, KEY_READ, (PHKEY)&hKey);
+        if (ret != ERROR_SUCCESS) {
+            ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_TZ_KEY, 0, KEY_READ, (PHKEY)&hKey);
+            /*
+             * If both failed, then give up.
+             */
+            if (ret != ERROR_SUCCESS) {
+                return VALUE_UNKNOWN;
             }
         }
 
         /*
-         * Vista has the key for the current "Time Zones" entry.
+         * Get the number of subkeys of the "Time Zones" registry for
+         * enumeration.
          */
-        if (isVista) {
-            valueType = 0;
-            bufSize = MAX_ZONE_CHAR;
-            ret = RegQueryValueExA(hKey, "TimeZoneKeyName", NULL,
-                                   &valueType, (LPBYTE) winZoneName, &bufSize);
-            if (ret != ERROR_SUCCESS) {
-                goto err;
-            }
-            (void) RegCloseKey(hKey);
-            return VALUE_KEY;
-        }
-
-        /*
-         * Win32 problem: If the length of the standard time name is equal
-         * to (or probably longer than) 32 in the registry,
-         * GetTimeZoneInformation() on NT returns a null string as its
-         * standard time name. We need to work around this problem by
-         * getting the same information from the TimeZoneInformation
-         * registry. The function on Win98 seems to return its key name.
-         * We can't do anything in that case.
-         */
-        if (tzi.StandardName[0] == 0) {
-            bufSize = sizeof(stdNameInReg);
-            ret = getValueInRegistry(hKey, STANDARD_NAME, &valueType,
-                                     (LPBYTE) stdNameInReg, &bufSize);
-            if (ret != ERROR_SUCCESS) {
-                goto err;
-            }
-            stdNamePtr = stdNameInReg;
-        }
-        (void) RegCloseKey(hKey);
-    }
-
-    /*
-     * Open the "Time Zones" registry.
-     */
-    ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, NT_TZ_KEY, 0, KEY_READ, (PHKEY)&hKey);
-    if (ret != ERROR_SUCCESS) {
-        ret = RegOpenKeyEx(HKEY_LOCAL_MACHINE, WIN_TZ_KEY, 0, KEY_READ, (PHKEY)&hKey);
-        /*
-         * If both failed, then give up.
-         */
-        if (ret != ERROR_SUCCESS) {
-            return VALUE_UNKNOWN;
-        }
-    }
-
-    /*
-     * Get the number of subkeys of the "Time Zones" registry for
-     * enumeration.
-     */
-    ret = RegQueryInfoKey(hKey, NULL, NULL, NULL, &nSubKeys,
-                          NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-    if (ret != ERROR_SUCCESS) {
-        goto err;
-    }
-
-    /*
-     * Compare to the "Std" value of each subkey and find the entry that
-     * matches the current control panel setting.
-     */
-    onlyMapID = 0;
-    for (i = 0; i < nSubKeys; ++i) {
-        DWORD size = sizeof(subKeyName);
-        ret = RegEnumKeyEx(hKey, i, subKeyName, &size, NULL, NULL, NULL, NULL);
-        if (ret != ERROR_SUCCESS) {
-            goto err;
-        }
-        ret = RegOpenKeyEx(hKey, subKeyName, 0, KEY_READ, (PHKEY)&hSubKey);
+        ret = RegQueryInfoKey(hKey, NULL, NULL, NULL, &nSubKeys,
+                              NULL, NULL, NULL, NULL, NULL, NULL, NULL);
         if (ret != ERROR_SUCCESS) {
             goto err;
         }
 
-        size = sizeof(szValue);
-        ret = getValueInRegistry(hSubKey, STD_NAME, &valueType,
-                                 szValue, &size);
-        if (ret != ERROR_SUCCESS) {
-            /*
-             * NT 4.0 SP3 fails here since it doesn't have the "Std"
-             * entry in the Time Zones registry.
-             */
-            RegCloseKey(hSubKey);
-            onlyMapID = 1;
-            ret = RegOpenKeyExW(hKey, stdNamePtr, 0, KEY_READ, (PHKEY)&hSubKey);
+        /*
+         * Compare to the "Std" value of each subkey and find the entry that
+         * matches the current control panel setting.
+         */
+        onlyMapID = 0;
+        for (i = 0; i < nSubKeys; ++i) {
+            DWORD size = sizeof(subKeyName);
+            ret = RegEnumKeyEx(hKey, i, subKeyName, &size, NULL, NULL, NULL, NULL);
             if (ret != ERROR_SUCCESS) {
                 goto err;
             }
-            break;
-        }
+            ret = RegOpenKeyEx(hKey, subKeyName, 0, KEY_READ, (PHKEY)&hSubKey);
+            if (ret != ERROR_SUCCESS) {
+                goto err;
+            }
 
-        if (wcscmp((WCHAR *)szValue, stdNamePtr) == 0) {
-            /*
-             * Some localized Win32 platforms use a same name to
-             * different time zones. So, we can't rely only on the name
-             * here. We need to check GMT offsets and transition dates
-             * to make sure it's the registry of the current time
-             * zone.
-             */
-            DWORD tziValueSize = sizeof(tempTzi);
-            ret = RegQueryValueEx(hSubKey, "TZI", NULL, &valueType,
-                                  (unsigned char *) &tempTzi, &tziValueSize);
-            if (ret == ERROR_SUCCESS) {
-                if ((tzi.Bias != tempTzi.bias) ||
-                    (memcmp((const void *) &tzi.StandardDate,
-                            (const void *) &tempTzi.stdDate,
-                            sizeof(SYSTEMTIME)) != 0)) {
-                        goto out;
+            size = sizeof(szValue);
+            ret = getValueInRegistry(hSubKey, STD_NAME, &valueType,
+                                     szValue, &size);
+            if (ret != ERROR_SUCCESS) {
+                /*
+                 * NT 4.0 SP3 fails here since it doesn't have the "Std"
+                 * entry in the Time Zones registry.
+                 */
+                RegCloseKey(hSubKey);
+                onlyMapID = 1;
+                ret = RegOpenKeyExW(hKey, stdNamePtr, 0, KEY_READ, (PHKEY)&hSubKey);
+                if (ret != ERROR_SUCCESS) {
+                    goto err;
                 }
+                break;
+            }
 
-                if (tzi.DaylightBias != 0) {
-                    if ((tzi.DaylightBias != tempTzi.dstBias) ||
-                        (memcmp((const void *) &tzi.DaylightDate,
-                                (const void *) &tempTzi.dstDate,
+            if (wcscmp((WCHAR *)szValue, stdNamePtr) == 0) {
+                /*
+                 * Some localized Win32 platforms use a same name to
+                 * different time zones. So, we can't rely only on the name
+                 * here. We need to check GMT offsets and transition dates
+                 * to make sure it's the registry of the current time
+                 * zone.
+                 */
+                DWORD tziValueSize = sizeof(tempTzi);
+                ret = RegQueryValueEx(hSubKey, "TZI", NULL, &valueType,
+                                      (unsigned char *) &tempTzi, &tziValueSize);
+                if (ret == ERROR_SUCCESS) {
+                    if ((tzi.Bias != tempTzi.bias) ||
+                        (memcmp((const void *) &tzi.StandardDate,
+                                (const void *) &tempTzi.stdDate,
                                 sizeof(SYSTEMTIME)) != 0)) {
                         goto out;
                     }
+
+                    if (tzi.DaylightBias != 0) {
+                        if ((tzi.DaylightBias != tempTzi.dstBias) ||
+                            (memcmp((const void *) &tzi.DaylightDate,
+                                    (const void *) &tempTzi.dstDate,
+                                    sizeof(SYSTEMTIME)) != 0)) {
+                            goto out;
+                        }
+                    }
                 }
+
+                /*
+                 * found matched record, terminate search
+                 */
+                strcpy(winZoneName, subKeyName);
+                break;
             }
+        out:
+            (void) RegCloseKey(hSubKey);
+        }
 
+        /*
+         * Get the "MapID" value of the registry to be able to eliminate
+         * duplicated key names later.
+         */
+        valueSize = MAX_MAPID_LENGTH;
+        ret = RegQueryValueExA(hSubKey, "MapID", NULL, &valueType, winMapID, &valueSize);
+        (void) RegCloseKey(hSubKey);
+        (void) RegCloseKey(hKey);
+
+        if (ret != ERROR_SUCCESS) {
             /*
-             * found matched record, terminate search
+             * Vista doesn't have mapID. VALUE_UNKNOWN should be returned
+             * only for Windows NT.
              */
-            strcpy(winZoneName, subKeyName);
-            break;
-        }
-    out:
-        (void) RegCloseKey(hSubKey);
-    }
-
-    /*
-     * Get the "MapID" value of the registry to be able to eliminate
-     * duplicated key names later.
-     */
-    valueSize = MAX_MAPID_LENGTH;
-    ret = RegQueryValueExA(hSubKey, "MapID", NULL, &valueType, winMapID, &valueSize);
-    (void) RegCloseKey(hSubKey);
-    (void) RegCloseKey(hKey);
-
-    if (ret != ERROR_SUCCESS) {
-        /*
-         * Vista doesn't have mapID. VALUE_UNKNOWN should be returned
-         * only for Windows NT.
-         */
-        if (onlyMapID == 1) {
-            return VALUE_UNKNOWN;
+            if (onlyMapID == 1) {
+                return VALUE_UNKNOWN;
+            }
         }
     }
 
--- a/src/java.management/share/classes/javax/management/AttributeValueExp.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.management/share/classes/javax/management/AttributeValueExp.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -93,11 +93,10 @@
      *
      * @return  The <CODE>ValueExp</CODE>.
      *
-     * @exception BadAttributeValueExpException
-     * @exception InvalidApplicationException
-     * @exception BadStringOperationException
-     * @exception BadBinaryOpValueExpException
-     *
+     * @throws BadStringOperationException {@inheritDoc}
+     * @throws BadBinaryOpValueExpException {@inheritDoc}
+     * @throws BadAttributeValueExpException {@inheritDoc}
+     * @throws InvalidApplicationException  {@inheritDoc}
      */
     @Override
     public ValueExp apply(ObjectName name) throws BadStringOperationException, BadBinaryOpValueExpException,
--- a/src/java.management/share/classes/javax/management/DescriptorKey.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.management/share/classes/javax/management/DescriptorKey.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -168,5 +168,9 @@
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.METHOD)
 public @interface DescriptorKey {
+    /**
+     * Returns the descriptor key.
+     * @return the descriptor key
+     */
     String value();
 }
--- a/src/java.management/share/classes/javax/management/DynamicMBean.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.management/share/classes/javax/management/DynamicMBean.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,7 @@
      *
      * @return  The value of the attribute retrieved.
      *
-     * @exception AttributeNotFoundException
+     * @exception AttributeNotFoundException if specified attribute does not exist or cannot be retrieved
      * @exception MBeanException  Wraps a <CODE>java.lang.Exception</CODE> thrown by the MBean's getter.
      * @exception ReflectionException  Wraps a <CODE>java.lang.Exception</CODE> thrown while trying to invoke the getter.
      *
@@ -58,8 +58,8 @@
      * @param attribute The identification of the attribute to
      * be set and  the value it is to be set to.
      *
-     * @exception AttributeNotFoundException
-     * @exception InvalidAttributeValueException
+     * @exception AttributeNotFoundException if specified attribute does not exist or cannot be retrieved
+     * @exception InvalidAttributeValueException if value specified is not valid for the attribute
      * @exception MBeanException Wraps a <CODE>java.lang.Exception</CODE> thrown by the MBean's setter.
      * @exception ReflectionException Wraps a <CODE>java.lang.Exception</CODE> thrown while trying to invoke the MBean's setter.
      *
--- a/src/java.management/share/classes/javax/management/ImmutableDescriptor.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.management/share/classes/javax/management/ImmutableDescriptor.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -65,6 +65,8 @@
     /**
      * Construct a descriptor containing the given fields and values.
      *
+     * @param fieldNames the field names
+     * @param fieldValues the field values
      * @throws IllegalArgumentException if either array is null, or
      * if the arrays have different sizes, or
      * if a field name is null or empty, or if the same field name
@@ -81,6 +83,7 @@
      * is {@code a=b=c} then the field name is {@code a} and its value
      * is {@code b=c}.
      *
+     * @param fields the field names
      * @throws IllegalArgumentException if the parameter is null, or
      * if a field name is empty, or if the same field name appears
      * more than once, or if one of the strings does not contain
@@ -94,6 +97,7 @@
      * <p>Construct a descriptor where the names and values of the fields
      * are the keys and values of the given Map.</p>
      *
+     * @param fields the field names and values
      * @throws IllegalArgumentException if the parameter is null, or
      * if a field name is null or empty, or if the same field name appears
      * more than once (which can happen because field names are not case
--- a/src/java.management/share/classes/javax/management/QueryExp.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.management/share/classes/javax/management/QueryExp.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -53,10 +53,13 @@
       *
       * @return  True if the query was successfully applied to the MBean, false otherwise
       *
-      * @exception BadStringOperationException
-      * @exception BadBinaryOpValueExpException
-      * @exception BadAttributeValueExpException
-      * @exception InvalidApplicationException
+      * @throws BadStringOperationException when an invalid string
+      * operation is passed to a method for constructing a query
+      * @throws BadBinaryOpValueExpException when an invalid expression
+      * is passed to a method for constructing a query
+      * @throws BadAttributeValueExpException when an invalid MBean
+      * attribute is passed to a query constructing method
+      * @throws InvalidApplicationException when an invalid apply is attempted
       */
      public boolean apply(ObjectName name) throws BadStringOperationException, BadBinaryOpValueExpException,
          BadAttributeValueExpException, InvalidApplicationException ;
--- a/src/java.management/share/classes/javax/management/StandardEmitterMBean.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.management/share/classes/javax/management/StandardEmitterMBean.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -91,6 +91,7 @@
      * that will have no effect on this object's
      * {@code getNotificationInfo()}.</p>
      *
+     * @param <T> the implementation type of the MBean
      * @param implementation the implementation of the MBean interface.
      * @param mbeanInterface a Standard MBean interface.
      * @param emitter the object that will handle notifications.
@@ -129,6 +130,7 @@
      * that will have no effect on this object's
      * {@code getNotificationInfo()}.</p>
      *
+     * @param <T> the implementation type of the MBean
      * @param implementation the implementation of the MBean interface.
      * @param mbeanInterface a Standard MBean interface.
      * @param isMXBean If true, the {@code mbeanInterface} parameter
--- a/src/java.management/share/classes/javax/management/StringValueExp.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.management/share/classes/javax/management/StringValueExp.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -95,11 +95,12 @@
      *
      * @return  The <CODE>ValueExp</CODE>.
      *
-     * @exception BadStringOperationException
-     * @exception BadBinaryOpValueExpException
-     * @exception BadAttributeValueExpException
-     * @exception InvalidApplicationException
+     * @throws BadStringOperationException {@inheritDoc}
+     * @throws BadBinaryOpValueExpException {@inheritDoc}
+     * @throws BadAttributeValueExpException {@inheritDoc}
+     * @throws InvalidApplicationException  {@inheritDoc}
      */
+    @Override
     public ValueExp apply(ObjectName name) throws BadStringOperationException, BadBinaryOpValueExpException,
         BadAttributeValueExpException, InvalidApplicationException  {
         return this;
--- a/src/java.management/share/classes/javax/management/ValueExp.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.management/share/classes/javax/management/ValueExp.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -80,10 +80,13 @@
      *
      * @return  The <CODE>ValueExp</CODE>.
      *
-     * @exception BadStringOperationException
-     * @exception BadBinaryOpValueExpException
-     * @exception BadAttributeValueExpException
-     * @exception InvalidApplicationException
+     * @throws BadStringOperationException when an invalid string
+     * operation is passed to a method for constructing a query
+     * @throws BadBinaryOpValueExpException when an invalid expression
+     * is passed to a method for constructing a query
+     * @throws BadAttributeValueExpException when an invalid MBean
+     * attribute is passed to a query constructing method
+     * @throws InvalidApplicationException when an invalid apply is attempted
      */
     public ValueExp apply(ObjectName name)
             throws BadStringOperationException, BadBinaryOpValueExpException,
--- a/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanInfo.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanInfo.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -307,6 +307,7 @@
 
     /**
      * Creates and returns a copy of this object.
+     * @return a copy of this object
      */
     public java.lang.Object clone();
 
--- a/src/java.management/share/classes/javax/management/monitor/Monitor.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.management/share/classes/javax/management/monitor/Monitor.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -387,7 +387,7 @@
      *
      * @return The name of the monitor MBean registered.
      *
-     * @exception Exception
+     * @exception Exception if something goes wrong
      */
     public ObjectName preRegister(MBeanServer server, ObjectName name)
         throws Exception {
@@ -416,7 +416,7 @@
      * <P>
      * Stops the monitor.
      *
-     * @exception Exception
+     * @exception Exception if something goes wrong
      */
     public void preDeregister() throws Exception {
 
--- a/src/java.management/share/classes/javax/management/openmbean/ArrayType.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.management/share/classes/javax/management/openmbean/ArrayType.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -793,6 +793,7 @@
      * array type description = 3-dimension array of java.lang.String
      * }</pre>
      *
+     * @param <E> the Java type that described instances must have
      * @param  elementType  the <i>open type</i> of element values contained
      *                      in the arrays described by this <tt>ArrayType</tt>
      *                      instance; must be an instance of either
@@ -800,7 +801,7 @@
      *                      <tt>TabularType</tt> or another <tt>ArrayType</tt>
      *                      with a <tt>SimpleType</tt>, <tt>CompositeType</tt>
      *                      or <tt>TabularType</tt> as its <tt>elementType</tt>.
-     *
+     * @return an {@code ArrayType} instance
      * @throws OpenDataException if <var>elementType's className</var> is not
      *                           one of the allowed Java class names for open
      *                           data.
@@ -834,12 +835,14 @@
      * array type description = 3-dimension array of int
      * }</pre>
      *
+     * @param <T> the Java type that described instances must have
      * @param arrayClass a primitive array class such as {@code int[].class},
      *                   {@code boolean[][].class}, etc. The {@link
      *                   #getElementOpenType()} method of the returned
      *                   {@code ArrayType} returns the {@link SimpleType}
      *                   corresponding to the wrapper type of the primitive
      *                   type of the array.
+     * @return an {@code ArrayType} instance
      *
      * @throws IllegalArgumentException if <var>arrayClass</var> is not
      *                                  a primitive array.
--- a/src/java.management/share/classes/javax/management/timer/Timer.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.management/share/classes/javax/management/timer/Timer.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -195,7 +195,7 @@
      *
      * @return The name of the timer MBean registered.
      *
-     * @exception java.lang.Exception
+     * @exception java.lang.Exception if something goes wrong
      */
     public ObjectName preRegister(MBeanServer server, ObjectName name)
         throws java.lang.Exception {
@@ -217,7 +217,7 @@
      * <P>
      * Stops the timer.
      *
-     * @exception java.lang.Exception
+     * @exception java.lang.Exception if something goes wrong
      */
     public void preDeregister() throws java.lang.Exception {
 
--- a/src/java.naming/share/classes/com/sun/jndi/ldap/LdapURL.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.naming/share/classes/com/sun/jndi/ldap/LdapURL.java	Mon Apr 27 09:17:39 2015 -0700
@@ -26,9 +26,6 @@
 package com.sun.jndi.ldap;
 
 import javax.naming.*;
-import javax.naming.directory.*;
-import javax.naming.spi.*;
-import java.net.URL;
 import java.net.MalformedURLException;
 import java.io.UnsupportedEncodingException;
 import java.util.StringTokenizer;
@@ -211,43 +208,52 @@
 
         // query begins with a '?' or is null
 
-        if (query == null) {
+        if (query == null || query.length() < 2) {
             return;
         }
 
-        int qmark2 = query.indexOf('?', 1);
+        int currentIndex = 1;
+        int nextQmark;
+        int endIndex;
 
-        if (qmark2 < 0) {
-            attributes = query.substring(1);
+        // attributes:
+        nextQmark = query.indexOf('?', currentIndex);
+        endIndex = nextQmark == -1 ? query.length() : nextQmark;
+        if (endIndex - currentIndex > 0) {
+            attributes = query.substring(currentIndex, endIndex);
+        }
+        currentIndex = endIndex + 1;
+        if (currentIndex >= query.length()) {
             return;
-        } else if (qmark2 != 1) {
-            attributes = query.substring(1, qmark2);
         }
 
-        int qmark3 = query.indexOf('?', qmark2 + 1);
-
-        if (qmark3 < 0) {
-            scope = query.substring(qmark2 + 1);
+        // scope:
+        nextQmark = query.indexOf('?', currentIndex);
+        endIndex = nextQmark == -1 ? query.length() : nextQmark;
+        if (endIndex - currentIndex > 0) {
+            scope = query.substring(currentIndex, endIndex);
+        }
+        currentIndex = endIndex + 1;
+        if (currentIndex >= query.length()) {
             return;
-        } else if (qmark3 != qmark2 + 1) {
-            scope = query.substring(qmark2 + 1, qmark3);
         }
 
-        int qmark4 = query.indexOf('?', qmark3 + 1);
+        // filter:
+        nextQmark = query.indexOf('?', currentIndex);
+        endIndex = nextQmark == -1 ? query.length() : nextQmark;
+        if (endIndex - currentIndex > 0) {
+            filter = query.substring(currentIndex, endIndex);
+            filter = UrlUtil.decode(filter, "UTF8");
+        }
+        currentIndex = endIndex + 1;
+        if (currentIndex >= query.length()) {
+            return;
+        }
 
-        if (qmark4 < 0) {
-            filter = query.substring(qmark3 + 1);
-        } else {
-            if (qmark4 != qmark3 + 1) {
-                filter = query.substring(qmark3 + 1, qmark4);
-            }
-            extensions = query.substring(qmark4 + 1);
-            if (extensions.length() > 0) {
-                extensions = UrlUtil.decode(extensions, "UTF8");
-            }
-        }
-        if (filter != null && filter.length() > 0) {
-            filter = UrlUtil.decode(filter, "UTF8");
+        // extensions:
+        if (query.length() - currentIndex > 0) {
+            extensions = query.substring(currentIndex);
+            extensions = UrlUtil.decode(extensions, "UTF8");
         }
     }
 
--- a/src/java.security.jgss/share/classes/org/ietf/jgss/GSSCredential.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.security.jgss/share/classes/org/ietf/jgss/GSSCredential.java	Mon Apr 27 09:17:39 2015 -0700
@@ -35,7 +35,7 @@
  * may be used to perform context initiation, acceptance, or both.<p>
  *
  * Credentials are instantiated using one of the
- * <code>createCredential</code> methods in the {@link GSSManager
+ * {@code createCredential} methods in the {@link GSSManager
  * GSSManager} class. GSS-API credential creation is not
  * intended to provide a "login to the network" function, as such a
  * function would involve the creation of new credentials rather than
@@ -75,7 +75,7 @@
  *
  *    Oid [] mechs = cred.getMechs();
  *    if (mechs != null) {
- *            for (int i = 0; i < mechs.length; i++)
+ *            for (int i = 0; i{@literal <} mechs.length; i++)
  *                    System.out.println(mechs[i].toString());
  *    }
  *
@@ -297,8 +297,8 @@
      * with a variety of clients using different security mechanisms.<p>
      *
      * This routine adds the new credential element "in-place".  To add the
-     * element in a new credential, first call <code>clone</code> to obtain a
-     * copy of this credential, then call its <code>add</code> method.<p>
+     * element in a new credential, first call {@code clone} to obtain a
+     * copy of this credential, then call its {@code add} method.<p>
      *
      * As always, GSS-API implementations must impose a local access-control
      * policy on callers to prevent unauthorized callers from acquiring
@@ -311,7 +311,7 @@
      * getRemainingAcceptLifetime} on the credential.
      *
      * @param name the name of the principal for whom this credential is to
-     * be acquired.  Use <code>null</code> to specify the default
+     * be acquired.  Use {@code null} to specify the default
      * principal.
      * @param initLifetime the number of seconds that the credential element
      * should remain valid for initiating of security contexts. Use {@link
@@ -354,8 +354,8 @@
      * object.  The two credentials must be acquired over the same
      * mechanisms and must refer to the same principal.
      *
-     * @return <code>true</code> if the two GSSCredentials assert the same
-     * entity; <code>false</code> otherwise.
+     * @return {@code true} if the two GSSCredentials assert the same
+     * entity; {@code false} otherwise.
      * @param another another GSSCredential for comparison to this one
      */
     public boolean equals(Object another);
--- a/src/java.smartcardio/share/classes/javax/smartcardio/Card.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.smartcardio/share/classes/javax/smartcardio/Card.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -69,6 +69,7 @@
      * Returns the CardChannel for the basic logical channel. The basic
      * logical channel has a channel number of 0.
      *
+     * @return the CardChannel for the basic logical channel
      * @throws SecurityException if a SecurityManager exists and the
      *   caller does not have the required
      *   {@linkplain CardPermission permission}
@@ -82,6 +83,7 @@
      * opened by issuing a <code>MANAGE CHANNEL</code> command that should use
      * the format <code>[00 70 00 00 01]</code>.
      *
+     * @return the logical channel which has been opened
      * @throws SecurityException if a SecurityManager exists and the
      *   caller does not have the required
      *   {@linkplain CardPermission permission}
@@ -137,6 +139,7 @@
      *
      * @param controlCode the control code of the command
      * @param command the command data
+     * @return the response from the terminal device
      *
      * @throws SecurityException if a SecurityManager exists and the
      *   caller does not have the required
--- a/src/java.smartcardio/share/classes/javax/smartcardio/CardTerminal.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.smartcardio/share/classes/javax/smartcardio/CardTerminal.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -83,6 +83,7 @@
      * @throws SecurityException if a SecurityManager exists and the
      *   caller does not have the required
      *   {@linkplain CardPermission permission}
+     * @return the card the connection has been established with
      */
     public abstract Card connect(String protocol) throws CardException;
 
--- a/src/java.smartcardio/share/classes/javax/smartcardio/CardTerminals.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.smartcardio/share/classes/javax/smartcardio/CardTerminals.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -105,6 +105,7 @@
      * Returns the terminal with the specified name or null if no such
      * terminal exists.
      *
+     * @param name the terminal name
      * @return the terminal with the specified name or null if no such
      * terminal exists.
      *
--- a/src/java.transaction/share/classes/javax/transaction/InvalidTransactionException.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.transaction/share/classes/javax/transaction/InvalidTransactionException.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,10 +39,17 @@
 @SuppressWarnings("serial")             // serialVersionUID intentionally omitted
 public class InvalidTransactionException extends java.rmi.RemoteException {
 
+    /**
+     * Constructs an {@code InvalidTransactionException}.
+     */
     public InvalidTransactionException() {
         super();
     }
 
+    /**
+     * Constructs an {@code InvalidTransactionException}.
+     * @param msg the detail message
+     */
     public InvalidTransactionException(String msg) {
         super(msg);
     }
--- a/src/java.transaction/share/classes/javax/transaction/TransactionRequiredException.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.transaction/share/classes/javax/transaction/TransactionRequiredException.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,10 +38,17 @@
 @SuppressWarnings("serial")             // serialVersionUID intentionally omitted
 public class TransactionRequiredException extends java.rmi.RemoteException {
 
+    /**
+     * Constructs a {@code TransactionRequiredException}.
+     */
     public TransactionRequiredException() {
         super();
     }
 
+    /**
+     * Constructs a {@code TransactionRequiredException}.
+     * @param msg the detail message
+     */
     public TransactionRequiredException(String msg) {
         super(msg);
     }
--- a/src/java.transaction/share/classes/javax/transaction/TransactionRolledbackException.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.transaction/share/classes/javax/transaction/TransactionRolledbackException.java	Mon Apr 27 09:17:39 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -41,10 +41,17 @@
 @SuppressWarnings("serial")             // serialVersionUID intentionally omitted
 public class TransactionRolledbackException extends java.rmi.RemoteException {
 
+    /**
+     * Constructs a {@code TransactionRolledbackException}.
+     */
     public TransactionRolledbackException() {
         super();
     }
 
+    /**
+     * Constructs a {@code TransactionRolledbackException}.
+     * @param msg the detail message
+     */
     public TransactionRolledbackException(String msg) {
         super(msg);
     }
--- a/src/java.xml.crypto/share/classes/javax/xml/crypto/dom/package.html	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.xml.crypto/share/classes/javax/xml/crypto/dom/package.html	Mon Apr 27 09:17:39 2015 -0700
@@ -44,11 +44,7 @@
 RFC 3275: XML-Signature Syntax and Processing</a>
 </ul>
 
-<p>
-<dl>
-<dt><b>Since:</b></dt>
-  <dd>1.6</dd>
-</dl>
+@since 1.6
 
 </body>
 </html>
--- a/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/dom/package.html	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/dom/package.html	Mon Apr 27 09:17:39 2015 -0700
@@ -44,11 +44,7 @@
 RFC 3275: XML-Signature Syntax and Processing</a>
 </ul>
 
-<p>
-<dl>
-<dt><b>Since:</b></dt>
-  <dd>1.6</dd>
-</dl>
+@since 1.6
 
 </body>
 </html>
--- a/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/keyinfo/package.html	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/keyinfo/package.html	Mon Apr 27 09:17:39 2015 -0700
@@ -55,11 +55,7 @@
 RFC 3275: XML-Signature Syntax and Processing</a>
 </ul>
 
-<p>
-<dl>
-<dt><b>Since:</b></dt>
-  <dd>1.6</dd>
-</dl>
+@since 1.6
 
 </body>
 </html>
--- a/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/package.html	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/package.html	Mon Apr 27 09:17:39 2015 -0700
@@ -65,11 +65,7 @@
 RFC 3275: XML-Signature Syntax and Processing</a>
 </ul>
 
-<p>
-<dl>
-<dt><b>Since:</b></dt>
-  <dd>1.6</dd>
-</dl>
+@since 1.6
 
 </body>
 </html>
--- a/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/spec/package.html	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.xml.crypto/share/classes/javax/xml/crypto/dsig/spec/package.html	Mon Apr 27 09:17:39 2015 -0700
@@ -49,11 +49,7 @@
 XPath Filter 2.0 Transform Algorithm: W3C Recommendation</a>
 </ul>
 
-<p>
-<dl>
-<dt><b>Since:</b></dt>
-  <dd>1.6</dd>
-</dl>
+@since 1.6
 
 </body>
 </html>
--- a/src/java.xml.crypto/share/classes/javax/xml/crypto/package.html	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/java.xml.crypto/share/classes/javax/xml/crypto/package.html	Mon Apr 27 09:17:39 2015 -0700
@@ -42,11 +42,7 @@
 RFC 3275: XML-Signature Syntax and Processing</a>
 </ul>
 
-<p>
-<dl>
-<dt><b>Since:</b></dt>
-  <dd>1.6</dd>
-</dl>
+@since 1.6
 
 </body>
 </html>
--- a/src/jdk.accessibility/windows/native/jabswitch/jabswitch_manifest.rc	Fri Apr 24 15:45:25 2015 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-#define XSTR(x) STR(x)
-#define STR(x)  #x
-
-1 /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ 24 /* RT_MANIFEST */ XSTR(JAB_MANIFEST_EMBED)
--- a/src/jdk.jdi/share/classes/com/sun/jdi/Bootstrap.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/Bootstrap.java	Mon Apr 27 09:17:39 2015 -0700
@@ -43,13 +43,12 @@
      * <p> May throw an unspecified error if initialization of the
      * {@link com.sun.jdi.VirtualMachineManager} fails or if
      * the virtual machine manager is unable to locate or create
-     * any {@link com.sun.jdi.connect.Connector Connectors}. </p>
-     * <p>
+     * any {@link com.sun.jdi.connect.Connector Connectors}.
+     *
      * @throws java.lang.SecurityException if a security manager has been
      * installed and it denies {@link JDIPermission}
-     * <tt>("virtualMachineManager")</tt> or other unspecified
+     * ("{@code virtualMachineManager}") or other unspecified
      * permissions required by the implementation.
-     * </p>
      */
     static public synchronized VirtualMachineManager virtualMachineManager() {
         return com.sun.tools.jdi.VirtualMachineManagerImpl.virtualMachineManager();
--- a/src/jdk.jdi/share/classes/com/sun/jdi/Field.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/Field.java	Mon Apr 27 09:17:39 2015 -0700
@@ -65,22 +65,22 @@
      *    short s;
      *    Date d;
      *    byte[] ba;</PRE>
-     * And the JDI client defines these <CODE>Field</CODE> objects:
+     * And the JDI client defines these {@code Field} objects:
      * <PRE>
      *    Field sField = targetClass.fieldByName("s");
      *    Field dField = targetClass.fieldByName("d");
      *    Field baField = targetClass.fieldByName("ba");</PRE>
-     * to mirror the corresponding fields, then <CODE>sField.type()</CODE>
-     * is a {@link ShortType}, <CODE>dField.type()</CODE> is the
-     * {@link ReferenceType} for <CODE>java.util.Date</CODE> and
-     * <CODE>((ArrayType)(baField.type())).componentType()</CODE> is a
+     * to mirror the corresponding fields, then {@code sField.type()}
+     * is a {@link ShortType}, {@code dField.type()} is the
+     * {@link ReferenceType} for {@code java.util.Date} and
+     * {@code ((ArrayType)(baField.type())).componentType()} is a
      * {@link ByteType}.
      * <P>
      * Note: if the type of this field is a reference type (class,
      * interface, or array) and it has not been created or loaded
      * by the declaring type's class loader - that is,
-     * {@link TypeComponent#declaringType <CODE>declaringType()</CODE>}
-     * <CODE>.classLoader()</CODE>,
+     * {@link TypeComponent#declaringType declaringType()}
+     * {@code .classLoader()},
      * then ClassNotLoadedException will be thrown.
      * Also, a reference type may have been loaded but not yet prepared,
      * in which case the type will be returned
@@ -100,28 +100,28 @@
     /**
      * Determine if this is a transient field.
      *
-     * @return <code>true</code> if this field is transient; false otherwise.
+     * @return {@code true} if this field is transient; {@code false} otherwise.
      */
     boolean isTransient();
 
     /**
      * Determine if this is a volatile field.
      *
-     * @return <code>true</code> if this field is volatile; false otherwise.
+     * @return {@code true} if this field is volatile; {@code false} otherwise.
      */
     boolean isVolatile();
 
     /**
      * Determine if this is a field that represents an enum constant.
-     * @return <code>true</code> if this field represents an enum constant;
-     * false otherwise.
+     * @return {@code true} if this field represents an enum constant;
+     * {@code false} otherwise.
      */
     boolean isEnumConstant();
 
     /**
      * Compares the specified Object with this field for equality.
      *
-     * @return true if the Object is a Field and if both
+     * @return {@code true} if the Object is a Field and if both
      * mirror the same field (declared in the same class or interface, in
      * the same VM).
      */
@@ -130,7 +130,7 @@
     /**
      * Returns the hash code value for this Field.
      *
-     * @return the integer hash code
+     * @return the integer hash code.
      */
     int hashCode();
 }
--- a/src/jdk.jdi/share/classes/com/sun/jdi/JDIPermission.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/JDIPermission.java	Mon Apr 27 09:17:39 2015 -0700
@@ -26,20 +26,20 @@
 package com.sun.jdi;
 
 /**
- * The <code>JDIPermission</code> class represents access rights to
- * the <code>VirtualMachineManager</code>.  This is the permission
+ * The {@code JDIPermission} class represents access rights to
+ * the {@code VirtualMachineManager}.  This is the permission
  * which the SecurityManager will check when code that is running with
  * a SecurityManager requests access to the VirtualMachineManager, as
  * defined in the Java Debug Interface (JDI) for the Java platform.
  * <P>
- * A <code>JDIPermission</code> object contains a name (also referred
+ * A {@code JDIPermission} object contains a name (also referred
  * to as a "target name") but no actions list; you either have the
  * named permission or you don't.
  * <P>
  * The following table provides a summary description of what the
  * permission allows, and discusses the risks of granting code the
  * permission.
- * <P>
+ *
  * <table border=1 cellpadding=5 summary="Table shows permission
  * target name, what the permission allows, and associated risks">
  * <tr>
@@ -51,10 +51,10 @@
  * <tr>
  *   <td>virtualMachineManager</td>
  *   <td>Ability to inspect and modify the JDI objects in the
- *   <code>VirtualMachineManager</code>
+ *   {@code VirtualMachineManager}
  *   </td>
  *   <td>This allows an attacker to control the
- *   <code>VirtualMachineManager</code> and cause the system to
+ *   {@code VirtualMachineManager} and cause the system to
  *   misbehave.
  *   </td>
  * </tr>
@@ -82,8 +82,8 @@
 public final class JDIPermission extends java.security.BasicPermission {
     private static final long serialVersionUID = -6988461416938786271L;
     /**
-     * The <code>JDIPermission</code> class represents access rights to the
-     * <code>VirtualMachineManager</code>
+     * The {@code JDIPermission} class represents access rights to the
+     * {@code VirtualMachineManager}
      * @param name Permission name. Must be "virtualMachineManager".
      * @throws IllegalArgumentException if the name argument is invalid.
      */
--- a/src/jdk.jdi/share/classes/com/sun/jdi/Method.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/Method.java	Mon Apr 27 09:17:39 2015 -0700
@@ -49,7 +49,7 @@
      * This type name is always available even if
      * the type has not yet been created or loaded.
      *
-     * @return a String containing the return type name.
+     * @return a {@code String} containing the return type name.
      */
     String returnTypeName();
 
@@ -60,8 +60,8 @@
      * Note: if the return type of this method is a reference type (class,
      * interface, or array) and it has not been created or loaded
      * by the declaring type's class loader - that is,
-     * {@link TypeComponent#declaringType <CODE>declaringType()</CODE>}
-     * <CODE>.classLoader()</CODE>,
+     * {@link TypeComponent#declaringType declaringType()}
+     * {@code .classLoader()},
      * then ClassNotLoadedException will be thrown.
      * Also, a reference type may have been loaded but not yet prepared,
      * in which case the type will be returned
@@ -93,7 +93,6 @@
      * as specified at compile-time.
      * If the formal parameter was declared with an ellipsis, then
      * it is represented as an array of the type before the ellipsis.
-     *
      */
     List<String> argumentTypeNames();
 
@@ -105,8 +104,8 @@
      * is a reference type (class, interface, or array)
      * and it has not been created or loaded
      * by the declaring type's class loader - that is,
-     * {@link TypeComponent#declaringType <CODE>declaringType()</CODE>}
-     * <CODE>.classLoader()</CODE>,
+     * {@link TypeComponent#declaringType declaringType()}
+     * {@code .classLoader()},
      * then ClassNotLoadedException will be thrown.
      * Also, a reference type may have been loaded but not yet prepared,
      * in which case the list will be returned
@@ -132,16 +131,16 @@
     /**
      * Determine if this method is abstract.
      *
-     * @return <code>true</code> if the method is declared abstract;
-     * false otherwise.
+     * @return {@code true} if the method is declared abstract;
+     * {@code false} otherwise.
      */
     boolean isAbstract();
 
     /**
      * Determine if this method is a default method
      *
-     * @return <code>true</code> if the method is declared default;
-     * false otherwise
+     * @return {@code true} if the method is declared default;
+     * {@code false} otherwise.
      *
      * @since 1.8
      */
@@ -152,24 +151,24 @@
     /**
      * Determine if this method is synchronized.
      *
-     * @return <code>true</code> if the method is declared synchronized;
-     * false otherwise.
+     * @return {@code true} if the method is declared synchronized;
+     * {@code false} otherwise.
      */
     boolean isSynchronized();
 
     /**
      * Determine if this method is native.
      *
-     * @return <code>true</code> if the method is declared native;
-     * false otherwise.
+     * @return {@code true} if the method is declared native;
+     * {@code false} otherwise.
      */
     boolean isNative();
 
     /**
      * Determine if this method accepts a variable number of arguments.
      *
-     * @return <code>true</code> if the method accepts a variable number
-     * of arguments, false otherwise.
+     * @return {@code true} if the method accepts a variable number
+     * of arguments, {@code false} otherwise.
      *
      * @since 1.5
      */
@@ -180,8 +179,8 @@
      * methods are defined in
      * <cite>The Java&trade; Language Specification</cite>.
      *
-     * @return <code>true</code> if the method is a bridge method,
-     * false otherwise.
+     * @return {@code true} if the method is a bridge method,
+     * {@code false} otherwise.
      *
      * @since 1.5
      */
@@ -190,23 +189,23 @@
     /**
      * Determine if this method is a constructor.
      *
-     * @return <code>true</code> if the method is a constructor;
-     * false otherwise.
+     * @return {@code true} if the method is a constructor;
+     * {@code false} otherwise.
      */
     boolean isConstructor();
 
     /**
      * Determine if this method is a static initializer.
      *
-     * @return <code>true</code> if the method is a static initializer;
-     * false otherwise.
+     * @return {@code true} if the method is a static initializer;
+     * {@code false} otherwise.
      */
     boolean isStaticInitializer();
 
     /**
      * Determine if this method is obsolete.
      *
-     * @return <code>true</code> if this method has been made obsolete by a
+     * @return {@code true} if this method has been made obsolete by a
      * {@link VirtualMachine#redefineClasses} operation.
      *
      * @since 1.4
@@ -218,7 +217,7 @@
      * each executable source line in this method.
      * <P>
      * This method is equivalent to
-     * <code>allLineLocations(vm.getDefaultStratum(),null)</code> -
+     * {@code allLineLocations(vm.getDefaultStratum(),null)} -
      * see {@link #allLineLocations(String,String)}
      * for more information.
      *
@@ -252,16 +251,16 @@
      * (see {@link Location} for a description of strata).
      *
      * @param stratum The stratum to retrieve information from
-     * or <code>null</code> for the {@link ReferenceType#defaultStratum()}
+     * or {@code null} for the {@link ReferenceType#defaultStratum()}
      *
      * @param sourceName Return locations only within this
-     * source file or <code>null</code> to return locations.
+     * source file or {@code null} to return locations.
      *
      * @return a List of all source line {@link Location} objects.
      *
      * @throws AbsentInformationException if there is no line
      * number information for this (non-native, non-abstract)
-     * method.  Or if <i>sourceName</i> is non-<code>null</code>
+     * method.  Or if <i>sourceName</i> is non-{@code null}
      * and source name information is not present.
      *
      * @since 1.4
@@ -274,8 +273,8 @@
      * that map to the given line number.
      * <P>
      * This method is equivalent to
-     * <code>locationsOfLine(vm.getDefaultStratum(), null,
-     * lineNumber)</code> -
+     * {@code locationsOfLine(vm.getDefaultStratum(), null,
+     * lineNumber)} -
      * see {@link
      * #locationsOfLine(java.lang.String,java.lang.String,int)}
      * for more information.
@@ -320,7 +319,7 @@
      *
      * @throws AbsentInformationException if there is no line
      * number information for this method.
-     * Or if <i>sourceName</i> is non-<code>null</code>
+     * Or if <i>sourceName</i> is non-{@code null}
      * and source name information is not present.
      *
      * @since 1.4
@@ -436,7 +435,7 @@
     /**
      * Returns the hash code value for this Method.
      *
-     * @return the integer hash code
+     * @return the integer hash code.
      */
     int hashCode();
 }
--- a/src/jdk.jdi/share/classes/com/sun/jdi/Value.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/Value.java	Mon Apr 27 09:17:39 2015 -0700
@@ -63,47 +63,47 @@
  *   <TH id="type"     align="left">{@link Type} of value<br>{@link #type() Value.type()}</TH>
  * <TR>
  *   <TD headers="primval kind">     a boolean</TD>
- *   <TD headers="primval example">  <CODE>true</CODE></TD>
+ *   <TD headers="primval example">  {@code true}</TD>
  *   <TD headers="primval mirrored"> {@link BooleanValue}</TD>
  *   <TD headers="primval type">     {@link BooleanType}</TD>
  * <TR>
  *   <TD headers="primval kind">     a byte</TD>
- *   <TD headers="primval example">  <CODE>(byte)4</CODE></TD>
+ *   <TD headers="primval example">  {@code (byte)4}</TD>
  *   <TD headers="primval mirrored"> {@link ByteValue}</TD>
  *   <TD headers="primval type">     {@link ByteType}</TD>
  * <TR>
  *   <TD headers="primval kind">     a char</TD>
- *   <TD headers="primval example">  <CODE>'a'</CODE></TD>
+ *   <TD headers="primval example">  {@code 'a'}</TD>
  *   <TD headers="primval mirrored"> {@link CharValue}</TD>
  *   <TD headers="primval type">     {@link CharType}</TD>
  * <TR>
  *   <TD headers="primval kind">     a double</TD>
- *   <TD headers="primval example">  <CODE>3.1415926</CODE></TD>
+ *   <TD headers="primval example">  {@code 3.1415926}</TD>
  *   <TD headers="primval mirrored"> {@link DoubleValue}</TD>
  *   <TD headers="primval type">     {@link DoubleType}</TD>
  * <TR>
  *   <TD headers="primval kind">     a float</TD>
- *   <TD headers="primval example">  <CODE>2.5f</CODE></TD>
+ *   <TD headers="primval example">  {@code 2.5f}</TD>
  *   <TD headers="primval mirrored"> {@link FloatValue}</TD>
  *   <TD headers="primval type">     {@link FloatType}</TD>
  * <TR>
  *   <TD headers="primval kind">     an int</TD>
- *   <TD headers="primval example">  <CODE>22</CODE></TD>
+ *   <TD headers="primval example">  {@code 22}</TD>
  *   <TD headers="primval mirrored"> {@link IntegerValue}</TD>
  *   <TD headers="primval type">     {@link IntegerType}</TD>
  * <TR>
  *   <TD headers="primval kind">     a long</TD>
- *   <TD headers="primval example">  <CODE>1024L</CODE></TD>
+ *   <TD headers="primval example">  {@code 1024L}</TD>
  *   <TD headers="primval mirrored"> {@link LongValue}</TD>
  *   <TD headers="primval type">     {@link LongType}</TD>
  * <TR>
  *   <TD headers="primval kind">     a short</TD>
- *   <TD headers="primval example">  <CODE>(short)12</CODE></TD>
+ *   <TD headers="primval example">  {@code (short)12}</TD>
  *   <TD headers="primval mirrored"> {@link ShortValue}</TD>
  *   <TD headers="primval type">     {@link ShortType}</TD>
  * <TR>
  *   <TD headers="primval kind">     a void</TD>
- *   <TD headers="primval example">  <CODE>&nbsp;</CODE></TD>
+ *   <TD headers="primval example">  </TD>
  *   <TD headers="primval mirrored"> {@link VoidValue}</TD>
  *   <TD headers="primval type">     {@link VoidType}</TD>
  * <TR BGCOLOR="#EEEEFF">
@@ -115,50 +115,50 @@
  *   <TH id="type2"     align="left">{@link Type} of value<br>{@link #type() Value.type()}</TH>
  * <TR>
  *   <TD headers="objref kind2">     a class instance</TD>
- *   <TD headers="objref example2">  <CODE>this</CODE></TD>
+ *   <TD headers="objref example2">  {@code this}</TD>
  *   <TD headers="objref mirrored2"> {@link ObjectReference}</TD>
  *   <TD headers="objref type2">     {@link ClassType}</TD>
  * <TR>
  *   <TD headers="objref kind2">     an array</TD>
- *   <TD headers="objref example2">  <CODE>new int[5]</CODE></TD>
+ *   <TD headers="objref example2">  {@code new int[5]}</TD>
  *   <TD headers="objref mirrored2"> {@link ArrayReference}</TD>
  *   <TD headers="objref type2">     {@link ArrayType}</TD>
  * <TR>
  *   <TD headers="objref kind2">     a string</TD>
- *   <TD headers="objref example2">  <CODE>"hello"</CODE></TD>
+ *   <TD headers="objref example2">  {@code "hello"}</TD>
  *   <TD headers="objref mirrored2"> {@link StringReference}</TD>
  *   <TD headers="objref type2">     {@link ClassType}</TD>
  * <TR>
  *   <TD headers="objref kind2">     a thread</TD>
- *   <TD headers="objref example2">  <CODE>Thread.currentThread()</CODE></TD>
+ *   <TD headers="objref example2">  {@code Thread.currentThread()}</TD>
  *   <TD headers="objref mirrored2"> {@link ThreadReference}</TD>
  *   <TD headers="objref type2">     {@link ClassType}</TD>
  * <TR>
  *   <TD headers="objref kind2">     a thread group</TD>
- *   <TD headers="objref example2">  <CODE>Thread.currentThread()<br>&nbsp;&nbsp;.getThreadGroup()</CODE></TD>
+ *   <TD headers="objref example2">  {@code Thread.currentThread()}<br>&nbsp;&nbsp;{@code .getThreadGroup()}</TD>
  *   <TD headers="objref mirrored2"> {@link ThreadGroupReference}</TD>
  *   <TD headers="objref type2">     {@link ClassType}</TD>
  * <TR>
- *   <TD headers="objref kind2">     a <CODE>java.lang.Class</CODE><br>instance</TD>
- *   <TD headers="objref example2">  <CODE>this.getClass()</CODE></TD>
+ *   <TD headers="objref kind2">     a {@code java.lang.Class}<br>instance</TD>
+ *   <TD headers="objref example2">  {@code this.getClass()}</TD>
  *   <TD headers="objref mirrored2"> {@link ClassObjectReference}</TD>
  *   <TD headers="objref type2">     {@link ClassType}</TD>
  * <TR>
  *   <TD headers="objref kind2">     a class loader</TD>
- *   <TD headers="objref example2">  <CODE>this.getClass()<br>&nbsp;&nbsp;.getClassLoader() </CODE></TD>
+ *   <TD headers="objref example2">  {@code this.getClass()}<br>&nbsp;&nbsp;{@code .getClassLoader()}</TD>
  *   <TD headers="objref mirrored2"> {@link ClassLoaderReference}</TD>
  *   <TD headers="objref type2">     {@link ClassType}</TD>
  * <TR BGCOLOR="#EEEEFF">
  *   <TH id="other" colspan=4>Other</TH>
  * <TR BGCOLOR="#EEEEFF">
- *   <TH id="kind3"     align="left">Kind of value</TD>
- *   <TH id="example3"  align="left">For example -<br>expression in target</TD>
- *   <TH id="mirrored3" align="left">Is mirrored as</TD>
- *   <TH id="type3"     align="left">{@link Type} of value</TD>
+ *   <TD id="kind3"     align="left">Kind of value</TD>
+ *   <TD id="example3"  align="left">For example -<br>expression in target</TD>
+ *   <TD id="mirrored3" align="left">Is mirrored as</TD>
+ *   <TD id="type3"     align="left">{@link Type} of value</TD>
  * <TR>
  *   <TD headers="other kind3">     null</TD>
- *   <TD headers="other example3">  <CODE>null</CODE></TD>
- *   <TD headers="other mirrored3"> <CODE>null</CODE></TD>
+ *   <TD headers="other example3">  {@code null}</TD>
+ *   <TD headers="other mirrored3"> {@code null}</TD>
  *   <TD headers="other type3">     n/a</TD>
  * </TABLE>
  *
--- a/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachineManager.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/VirtualMachineManager.java	Mon Apr 27 09:17:39 2015 -0700
@@ -50,7 +50,7 @@
  * examples use the command line syntax in Sun's implementation.
  * Some {@link com.sun.jdi.connect.Connector} implementations may require slightly
  * different handling than presented below.
- * <p>
+ *
  * <TABLE BORDER WIDTH="75%" SUMMARY="Four scenarios for connecting a debugger
  *  to a virtual machine">
  * <TR>
@@ -85,7 +85,7 @@
  * <UL>
  * <LI>
  * Target VM is launched using the options
- * <code>-agentlib:jdwp=transport=xxx,server=y</code>
+ * {@code -agentlib:jdwp=transport=xxx,server=y}
  * </LI>
  * <LI>
  * Target VM generates and outputs the tranport-specific address at which it will
@@ -110,6 +110,7 @@
  * <TR>
  * <TD>Target VM attaches to previously-running debugger</TD>
  * <TD>
+ * <UL>
  * <LI>
  * At startup, debugger selects one or more connectors from
  * the list returned by {@link #listeningConnectors} for one or more
@@ -126,7 +127,7 @@
  * a target VM to connect.</LI>
  * <LI>
  * Later, target VM is launched by end user with the options
- * <code>-agentlib:jdwp=transport=xxx,address=yyy</code>
+ * {@code -agentlib:jdwp=transport=xxx,address=yyy}
  * where "xxx" the transport for one of the connectors selected by the
  * the debugger and "yyy"
  * is the address generated by
@@ -135,15 +136,17 @@
  * <LI>
  * Debugger's call to {@link com.sun.jdi.connect.ListeningConnector#accept(java.util.Map)} returns
  * a {@link VirtualMachine} mirror.</LI>
+ * </UL>
  * </TD>
  * </TR>
  *
  * <TR>
  * <TD>Target VM launches debugger (sometimes called "Just-In-Time" debugging)</TD>
  * <TD>
+ * <UL>
  * <LI>
  * Target VM is launched with the options
- * <code>-agentlib:jdwp=launch=cmdline,onuncaught=y,transport=xxx,server=y</code>
+ * {@code -agentlib:jdwp=launch=cmdline,onuncaught=y,transport=xxx,server=y}
  * </LI>
  * <LI>
  * Later, an uncaught exception is thrown in the target VM. The target
@@ -171,6 +174,7 @@
  * {@link com.sun.jdi.connect.AttachingConnector#attach(java.util.Map)} method
  * of the selected to attach to the target VM. A {@link VirtualMachine}
  * mirror is returned.
+ * </UL>
  * </TD>
  * </TR>
  * </TABLE>
@@ -380,7 +384,7 @@
       * a virtual machine mirror when a connection is established
       * to a target VM. Only developers creating new Connector
       * implementations should need to make direct use of this
-      * method. </p>
+      * method.
       *
       * @param  connection
       *         The open connection to the target VM.
@@ -415,7 +419,7 @@
       * a virtual machine mirror when a connection is established
       * to a target VM. Only developers creating new Connector
       * implementations should need to make direct use of this
-      * method. </p>
+      * method.
       *
       * @return the new virtual machine
       *
--- a/src/jdk.jdi/share/classes/com/sun/jdi/connect/spi/Connection.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/connect/spi/Connection.java	Mon Apr 27 09:17:39 2015 -0700
@@ -51,7 +51,7 @@
  *
  * <p> A Connection is safe for access by multiple concurrent threads,
  * although at most one thread may be reading and at most one thread may
- * be writing at any given time. </p>
+ * be writing at any given time.
  *
  * @since 1.5
  */
@@ -70,18 +70,18 @@
      *
      * <p> Reading a packet does not do any integrity checking on
      * the packet aside from a check that the length of the packet
-     * (as indicated by the value of the <tt>length</tt> field, the
+     * (as indicated by the value of the {@code length} field, the
      * first four bytes of the packet) is 11 or more bytes.
-     * If the value of the <tt>length</tt> value is less then 11
-     * then an <tt>IOException</tt> is thrown.
+     * If the value of the {@code length} value is less then 11
+     * then an {@code IOException} is thrown.
      *
      * <p> Returns a byte array of a length equal to the length
      * of the received packet, or a byte array of length 0 when an
      * end of stream is encountered. If end of stream is encountered
      * after some, but not all bytes of a packet, are read then it
-     * is considered an I/O error and an <tt>IOException</tt> is
+     * is considered an I/O error and an {@code IOException} is
      * thrown. The first byte of the packet is stored in element
-     * <tt>0</tt> of the byte array, the second in element <tt>1</tt>,
+     * {@code 0} of the byte array, the second in element {@code 1},
      * and so on. The bytes in the byte array are laid out as per the
      * <a href="../../../../../../../../../technotes/guides/jpda/jdwp-spec.html">
      * JDWP specification</a>. That is, all fields in the packet
@@ -90,7 +90,7 @@
      * <p> This method may be invoked at any time.  If another thread has
      * already initiated a {@link #readPacket readPacket} on this
      * connection then the invocation of this method will block until the
-     * first operation is complete. </p>
+     * first operation is complete.
      *
      * @return  the packet read from the target VM
      *
@@ -123,21 +123,21 @@
      * href="../../../../../../../../../technotes/guides/jpda/jdwp-spec.html">
      * JDWP specification</a>. That is, all fields in the packet
      * are in big endian order. The first byte, that is element
-     * <tt>pkt[0]</tt>, is the first byte of the <tt>length</tt> field.
-     * <tt>pkt[1]</tt> is the second byte of the <tt>length</tt> field,
+     * {@code pkt[0]}, is the first byte of the {@code length} field.
+     * {@code pkt[1]} is the second byte of the {@code length} field,
      * and so on.
      *
      * <p> Writing a packet does not do any integrity checking on
      * the packet aside from checking the packet length. Checking
      * the packet length requires checking that the value of the
-     * <tt>length</tt> field (as indicated by the first four bytes
+     * {@code length} field (as indicated by the first four bytes
      * of the packet) is 11 or greater. Consequently the length of
      * the byte array provided to this method, that is
-     * <tt>pkt.length</tt>, must be 11 or more, and must be equal
-     * or greater than the value of the <tt>length</tt> field. If the
+     * {@code pkt.length}, must be 11 or more, and must be equal
+     * or greater than the value of the {@code length} field. If the
      * length of the byte array is greater than the value of
-     * the <tt>length</tt> field then all bytes from element
-     * <tt>pkt[length]</tt> onwards are ignored. In other words,
+     * the {@code length} field then all bytes from element
+     * {@code pkt[length]} onwards are ignored. In other words,
      * any additional bytes that follow the packet in the byte
      * array are ignored and will not be transmitted to the target
      * VM.
@@ -152,7 +152,7 @@
      * <p> This method may be invoked at any time.  If another thread has
      * already initiated a write operation upon this Connection then
      * a subsequent invocation of this method will block until the first
-     * operation is complete. </p>
+     * operation is complete.
      *
      * @param   pkt
      *          The packet to write to the target VM.
@@ -165,7 +165,7 @@
      *          If an I/O error occurs.
      *
      * @throws  IllegalArgumentException
-     *          If the value of the <tt>length</tt> field is invalid,
+     *          If the value of the {@code length} field is invalid,
      *          or the byte array is of insufficient length.
      */
     public abstract void writePacket(byte pkt[]) throws IOException;
@@ -185,7 +185,7 @@
      * <p> This method may be invoked at any time.  If some other thread has
      * already invoked it, however, then another invocation will block until
      * the first invocation is complete, after which it will return without
-     * effect. </p>
+     * effect.
      *
      * @throws  java.io.IOException
      *          If an I/O error occurs
@@ -193,9 +193,9 @@
     public abstract void close() throws IOException;
 
     /**
-     * Tells whether or not this connection is open.  </p>
+     * Tells whether or not this connection is open.
      *
-     * @return <tt>true</tt> if, and only if, this connection is open
+     * @return {@code true} if and only if this connection is open
      */
     public abstract boolean isOpen();
 }
--- a/src/jdk.jdi/share/classes/com/sun/jdi/doc-files/signature.html	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/doc-files/signature.html	Mon Apr 27 09:17:39 2015 -0700
@@ -7,7 +7,7 @@
 <BODY BGCOLOR="white">
 <dl><dd>
 <Table Border="0">
-<caption><h2>JDI Type Signatures</h2></caption>
+<caption><font size=5><b>JDI Type Signatures</b></font></caption>
 <tr><th>Type Signature
 <th>Java Type
 <tr><td>Z<td>boolean
@@ -31,9 +31,9 @@
 </Table>
 </dd></dl>
 <p>For example, the Java method:
-<p><pre>    long f (int n, String s, int[] arr);
+<pre>    long f (int n, String s, int[] arr);
 </pre>has the following type signature:
-<p><pre>    (ILjava/lang/String;[I)J
+<pre>    (ILjava/lang/String;[I)J
 </pre>
 </BODY>
 </HTML>
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/EventSet.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/EventSet.java	Mon Apr 27 09:17:39 2015 -0700
@@ -51,7 +51,6 @@
  * <P>
  * The events that are grouped in an EventSet are restricted in the
  * following ways:
- * <P>
  * <UL>
  * <LI>Always singleton sets:
  *     <UL>
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorContendedEnterEvent.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorContendedEnterEvent.java	Mon Apr 27 09:17:39 2015 -0700
@@ -29,9 +29,8 @@
 
 /**
  *
- *  Notification that a thread in the target VM is attempting
- *  to enter a monitor that is already acquired by another thread.
- * <P>
+ * Notification that a thread in the target VM is attempting
+ * to enter a monitor that is already acquired by another thread.
  *
  * @see EventQueue
  * @see MonitorContendedEnteredEvent
@@ -45,7 +44,6 @@
 
     /**
      * Returns the thread in which this event has occurred.
-     * <p>
      *
      * @return a {@link ThreadReference} which mirrors the event's thread in
      * the target VM.
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorContendedEnteredEvent.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorContendedEnteredEvent.java	Mon Apr 27 09:17:39 2015 -0700
@@ -31,7 +31,6 @@
  *
  *  Notification that a thread in the target VM is entering a monitor
  *  after waiting for it to be released by another thread.
- * <P>
  *
  * @see EventQueue
  * @see MonitorContendedEnterEvent
@@ -44,7 +43,6 @@
 
     /**
      * Returns the thread in which this event has occurred.
-     * <p>
      *
      * @return a {@link ThreadReference} which mirrors the event's thread in
      * the target VM.
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorWaitEvent.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorWaitEvent.java	Mon Apr 27 09:17:39 2015 -0700
@@ -30,7 +30,6 @@
 /**
  * Notification that a thread in the target VM is about to
  * wait on a monitor object.
- * <P>
  *
  * @see EventQueue
  * @see MonitorWaitedEvent
@@ -43,7 +42,6 @@
 
     /**
      * Returns the thread in which monitor wait event has occurred.
-     * <p>
      *
      * @return a {@link ThreadReference} which mirrors the event's thread in
      * the target VM.
@@ -60,7 +58,7 @@
     /**
      * Returns the number of millisecond the thread will wait.
      *
-     * @return a <code>jlong</code> containing monitor wait time in milliseconds.
+     * @return a {@code jlong} containing monitor wait time in milliseconds.
      */
     public long  timeout();
 }
--- a/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorWaitedEvent.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/event/MonitorWaitedEvent.java	Mon Apr 27 09:17:39 2015 -0700
@@ -30,7 +30,6 @@
 /**
  * Notification that a thread in the target VM has finished
  * waiting on an monitor object.
- * <P>
  *
  * @see EventQueue
  * @see MonitorWaitEvent
@@ -43,7 +42,6 @@
 
     /**
      * Returns the thread in which this event has occurred.
-     * <p>
      *
      * @return a {@link ThreadReference} which mirrors the event's thread in
      * the target VM.
@@ -60,7 +58,7 @@
     /**
      * Returns whether the wait has timed out or been interrupted.
      *
-     * @return <code>true</code> if the wait is timed out.
+     * @return {@code true} if the wait is timed out.
      */
     public boolean  timedout();
 
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequest.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequest.java	Mon Apr 27 09:17:39 2015 -0700
@@ -61,14 +61,14 @@
  * Filters can dramatically improve debugger performance by reducing the
  * amount of event traffic sent from the target VM to the debugger VM.
  * <p>
- * Any method on <code>EventRequest</code> which
- * takes <code>EventRequest</code> as an parameter may throw
+ * Any method on {@code EventRequest} which
+ * takes {@code EventRequest} as an parameter may throw
  * {@link com.sun.jdi.VMDisconnectedException} if the target VM is
  * disconnected and the {@link com.sun.jdi.event.VMDisconnectEvent} has been or is
  * available to be read from the {@link com.sun.jdi.event.EventQueue}.
  * <p>
- * Any method on <code>EventRequest</code> which
- * takes <code>EventRequest</code> as an parameter may throw
+ * Any method on {@code EventRequest} which
+ * takes {@code EventRequest} as an parameter may throw
  * {@link com.sun.jdi.VMOutOfMemoryException} if the target VM has run out of memory.
  *
  * @see com.sun.jdi.event.BreakpointEvent
@@ -84,8 +84,8 @@
     /**
      * Determines if this event request is currently enabled.
      *
-     * @return <code>true</code> if enabled;
-     * <code>false</code> otherwise.
+     * @return {@code true} if enabled;
+     * {@code false} otherwise.
      */
     boolean isEnabled();
 
@@ -97,18 +97,18 @@
      * and are included in event request lists such as
      * {@link EventRequestManager#breakpointRequests()}.
      *
-     * @param val <code>true</code> if the event request is to be enabled;
-     * <code>false</code> otherwise.
+     * @param val {@code true} if the event request is to be enabled;
+     * {@code false} otherwise.
      * @throws InvalidRequestStateException if this request
      * has been deleted.
      * @throws IllegalThreadStateException if this is a StepRequest,
-     * <code>val</code> is <code>true</code>, and the
+     * {@code val} is {@code true}, and the
      * thread named in the request has died or is not yet started.
      */
     void setEnabled(boolean val);
 
     /**
-     * Same as {@link #setEnabled <CODE>setEnabled(true)</CODE>}.
+     * Same as {@link #setEnabled setEnabled(true)}.
      * @throws InvalidRequestStateException if this request
      * has been deleted.
      * @throws IllegalThreadStateException if this is a StepRequest
@@ -117,7 +117,7 @@
     void enable();
 
     /**
-     * Same as {@link #setEnabled <CODE>setEnabled(false)</CODE>}.
+     * Same as {@link #setEnabled setEnabled(false)}.
      * @throws InvalidRequestStateException if this request
      * has been deleted.
      */
@@ -126,7 +126,7 @@
     /**
      * Limit the requested event to be reported at most once after a
      * given number of occurrences.  The event is not reported
-     * the first <code>count - 1</code> times this filter is reached.
+     * the first {@code count - 1} times this filter is reached.
      * To request a one-off event, call this method with a count of 1.
      * <p>
      * Once the count reaches 0, any subsequent filters in this request
@@ -139,7 +139,7 @@
      * @throws InvalidRequestStateException if this request is currently
      * enabled or has been deleted.
      * Filters may be added only to disabled requests.
-     * @throws IllegalArgumentException if <CODE>count</CODE>
+     * @throws IllegalArgumentException if {@code count}
      * is less than one.
      */
     void addCountFilter(int count);
@@ -189,7 +189,7 @@
      * These client-set properties are not used internally
      * by the JDI.
      * <p>
-     * The <code>get/putProperty</code> methods provide access to
+     * The {@code get/putProperty} methods provide access to
      * a small per-instance map. This is <b>not</b> to be confused
      * with {@link java.util.Properties}.
      * <p>
--- a/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequestManager.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/jdk.jdi/share/classes/com/sun/jdi/request/EventRequestManager.java	Mon Apr 27 09:17:39 2015 -0700
@@ -217,20 +217,20 @@
      * activate this event request.
      * <p>
      * The returned request will control stepping only in the specified
-     * <code>thread</code>; all other threads will be unaffected.
-     * A <code>size</code>value of {@link com.sun.jdi.request.StepRequest#STEP_MIN} will generate a
+     * {@code thread}; all other threads will be unaffected.
+     * A {@code size} value of {@link com.sun.jdi.request.StepRequest#STEP_MIN} will generate a
      * step event each time the code index changes. It represents the
      * smallest step size available and often maps to the instruction
      * level.
-     * A <code>size</code> value of {@link com.sun.jdi.request.StepRequest#STEP_LINE} will generate a
+     * A {@code size} value of {@link com.sun.jdi.request.StepRequest#STEP_LINE} will generate a
      * step event each time the source line changes unless line number information is not available,
      * in which case a STEP_MIN will be done instead.  For example, no line number information is
      * available during the execution of a method that has been rendered obsolete by
      * by a {@link com.sun.jdi.VirtualMachine#redefineClasses} operation.
-     * A <code>depth</code> value of {@link com.sun.jdi.request.StepRequest#STEP_INTO} will generate
-     * step events in any called methods.  A <code>depth</code> value
+     * A {@code depth} value of {@link com.sun.jdi.request.StepRequest#STEP_INTO} will generate
+     * step events in any called methods.  A {@code depth} value
      * of {@link com.sun.jdi.request.StepRequest#STEP_OVER} restricts step events to the current frame
-     * or caller frames. A <code>depth</code> value of {@link com.sun.jdi.request.StepRequest#STEP_OUT}
+     * or caller frames. A {@code depth} value of {@link com.sun.jdi.request.StepRequest#STEP_OUT}
      * restricts step events to caller frames only. All depth
      * restrictions are relative to the call stack immediately before the
      * step takes place.
@@ -240,8 +240,7 @@
      * Note that a typical debugger will want to cancel stepping
      * after the first step is detected.  Thus a next line method
      * would do the following:
-     * <code>
-     * <pre>
+     * <pre>{@code
      *     EventRequestManager mgr = myVM.{@link VirtualMachine#eventRequestManager eventRequestManager}();
      *     StepRequest request = mgr.createStepRequest(myThread,
      *                                                 StepRequest.{@link StepRequest#STEP_LINE STEP_LINE},
@@ -249,8 +248,7 @@
      *     request.{@link EventRequest#addCountFilter addCountFilter}(1);  // next step only
      *     request.enable();
      *     myVM.{@link VirtualMachine#resume resume}();
-     * </pre>
-     * </code>
+     * }</pre>
      *
      * @param thread the thread in which to step
      * @param depth the step depth
--- a/src/jdk.jdi/share/classes/jdi-overview.html	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/jdk.jdi/share/classes/jdi-overview.html	Mon Apr 27 09:17:39 2015 -0700
@@ -49,7 +49,6 @@
             Any method which takes a {@link java.lang.Object} as an parameter will throw
             {@link java.lang.NullPointerException} if null is passed directly or indirectly
             -- unless null is explicitly mentioned as a valid parameter.
-        <p>
     </blockquote>
      NOTE: The exceptions below may be thrown whenever the specified
      conditions are met but a guarantee that they are thrown only
--- a/src/jdk.pack200/windows/native/unpack200/unpack200_proto.exe.manifest	Fri Apr 24 15:45:25 2015 +0300
+++ b/src/jdk.pack200/windows/native/unpack200/unpack200_proto.exe.manifest	Mon Apr 27 09:17:39 2015 -0700
@@ -1,11 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
-  <assemblyIdentity version="IMVERSION"
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+  <assemblyIdentity
+     name=""
+     version=""
      processorArchitecture="X86"
-     name="unpack200.exe"
-     type="win32"/> 
+     type="win32"/>
 
-  <description>Java(TM) SE Runtime Environment unpack200 Process.</description> 
+  <description>Java(TM) SE Runtime Environment unpack200 Process.</description>
   <!-- Identify the application security requirements. -->
   <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
     <security>
--- a/test/ProblemList.txt	Fri Apr 24 15:45:25 2015 +0300
+++ b/test/ProblemList.txt	Mon Apr 27 09:17:39 2015 -0700
@@ -164,9 +164,6 @@
 # 6988950
 demo/jvmti/compiledMethodLoad/CompiledMethodLoadTest.java	generic-all
 
-# 8071968
-javax/xml/ws/8046817/GenerateEnumSchema.java                windows-all
-
 ############################################################################
 
 # jdk_net
--- a/test/com/sun/jdi/JdbReadTwiceTest.sh	Fri Apr 24 15:45:25 2015 +0300
+++ b/test/com/sun/jdi/JdbReadTwiceTest.sh	Mon Apr 27 09:17:39 2015 -0700
@@ -206,39 +206,6 @@
 
 echo
 echo "+++++++++++++++++++++++++++++++++++"
-echo "Read an unreadable file - verify the read fails."
-
-canMakeUnreadable=No
-id > $HOME/jdb.ini
-if chmod a-r $HOME/jdb.ini 
-then
-  grep -q 'uid=0(' $HOME/jdb.ini 2> /dev/null
-  case $? in
-    0)
-      echo "Error! Can't make file unreadable running as root"
-    ;;
-    1)
-      echo "Error! Can't make file unreadable for some other reason (windows?)"
-    ;;
-    *)
-      echo "OK. the file is unreadable"
-      canMakeUnreadable=Yes 
-    ;;
-   esac
-else    
-  echo "Error! Can't create or chmod file"
-fi  
-
-if [ "$canMakeUnreadable" = "Yes" ]
-then
-    doit
-    failIfNot 1 "open: $HOME/jdb.ini"
-fi
-clean
-
-
-echo
-echo "+++++++++++++++++++++++++++++++++++"
 echo "Read a directory - verify the read fails"
 # If the file (IE. directory) exists, we try to read it.  The
 # read will fail.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/jndi/dns/IPv6NameserverPlatformParsingTest.java	Mon Apr 27 09:17:39 2015 -0700
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.lang.reflect.Field;
+import java.util.Hashtable;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.naming.spi.NamingManager;
+
+import com.sun.jndi.dns.DnsContext;
+
+/**
+ * @test
+ * @bug 6991580
+ * @summary IPv6 Nameservers in resolv.conf throws NumberFormatException
+ * @run main/manual IPv6NameserverPlatformParsingTest
+ *
+ * In order to run this test be sure to place, for example, the following
+ * snippet into your platform's {@code /etc/resolv.conf}:
+ * <pre>
+ * nameserver 127.0.0.1
+ * nameserver 2001:4860:4860::8888
+ * nameserver [::1]:5353
+ * nameserver 127.0.0.1:5353
+ * </pre>
+ *
+ * Then, run this test as manual jtreg test.
+ *
+ * @author Severin Gehwolf
+ *
+ */
+public class IPv6NameserverPlatformParsingTest {
+
+    private static boolean foundIPv6 = false;
+
+    public static void main(String[] args) {
+        Hashtable<String, String> env = new Hashtable<>();
+        env.put(Context.INITIAL_CONTEXT_FACTORY, com.sun.jndi.dns.DnsContextFactory.class.getName());
+
+        String[] servers;
+        try {
+            Context ctx = NamingManager.getInitialContext(env);
+            if (!com.sun.jndi.dns.DnsContextFactory.platformServersAvailable()) {
+                throw new RuntimeException("FAIL: no platform servers available, test does not make sense");
+            }
+            DnsContext context = (DnsContext)ctx;
+            servers = getServersFromContext(context);
+        } catch (NamingException e) {
+            throw new RuntimeException(e);
+        }
+        for (String server: servers) {
+            System.out.println("DEBUG: 'nameserver = " + server + "'");
+            if (server.indexOf(':') >= 0 && server.indexOf('.') < 0) {
+                System.out.println("DEBUG: ==> Found IPv6 address in servers list: " + server);
+                foundIPv6 = true;
+            }
+        }
+        try {
+            new com.sun.jndi.dns.DnsClient(servers, 100, 1);
+        } catch (NumberFormatException e) {
+            throw new RuntimeException("FAIL: Tried to parse non-[]-encapsulated IPv6 address.", e);
+        } catch (Exception e) {
+            throw new RuntimeException("ERROR: Something unexpected happened.");
+        }
+        if (!foundIPv6) {
+            // This is a manual test, since it requires changing /etc/resolv.conf on Linux/Unix
+            // platforms. See comment as to how to run this test.
+            throw new RuntimeException("ERROR: No IPv6 address returned from platform.");
+        }
+        System.out.println("PASS: Found IPv6 address and DnsClient parsed it correctly.");
+    }
+
+    private static String[] getServersFromContext(DnsContext context) {
+        try {
+            Field serversField = DnsContext.class.getDeclaredField("servers");
+            serversField.setAccessible(true);
+            return (String[])serversField.get(context);
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/jndi/ldap/LdapURLOptionalFields.java	Mon Apr 27 09:17:39 2015 -0700
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2015, Red Hat, Inc.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 8074761
+ * @summary RFC-2255 allows attribute, scope and filter to be empty.
+ */
+
+import com.sun.jndi.ldap.LdapURL;
+
+public class LdapURLOptionalFields {
+
+    private static final String[] TEST_URLS = {
+        "ldap://localhost:10389/ou=RefPeople,dc=example,dc=com",
+        "ldap://localhost:10389/ou=RefPeople,dc=example,dc=com?",
+        "ldap://localhost:10389/ou=RefPeople,dc=example,dc=com??",
+        "ldap://localhost:10389/ou=RefPeople,dc=example,dc=com???",
+        "ldap://localhost:10389/ou=RefPeople,dc=example,dc=com????"
+    };
+
+    public static void main(String[] args) throws Exception {
+        for (int i = 0; i < TEST_URLS.length; i++) {
+            String url = TEST_URLS[i];
+            checkEmptyAttributes(url);
+        }
+    }
+
+    private static void checkEmptyAttributes(String urlString) throws Exception {
+        LdapURL url = new LdapURL(urlString);
+        if (url.getAttributes() != null) {
+            throw new Exception("Expected null attributes for url: '" + urlString + "'");
+        }
+        if (url.getScope() != null) {
+            throw new Exception("Expected null scope for url: '" + urlString + "'");
+        }
+        if (url.getFilter() != null) {
+            throw new Exception("Expected null filter for url: '" + urlString + "'");
+        }
+    }
+
+}
--- a/test/com/sun/security/auth/login/ConfigFile/InconsistentError.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/test/com/sun/security/auth/login/ConfigFile/InconsistentError.java	Mon Apr 27 09:17:39 2015 -0700
@@ -26,6 +26,7 @@
  * @bug 4406033
  * @summary     ConfigFile throws an inconsistent error message
  *              when the configuration file is not found
+ * @run main/othervm -Duser.language=en InconsistentError
  */
 
 import com.sun.security.auth.login.*;
--- a/test/com/sun/security/auth/module/KeyStoreLoginModule/OptionTest.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/test/com/sun/security/auth/module/KeyStoreLoginModule/OptionTest.java	Mon Apr 27 09:17:39 2015 -0700
@@ -25,6 +25,7 @@
  * @test
  * @bug 4919147
  * @summary Support for token-based KeyStores
+ * @run main/othervm -Duser.language=en OptionTest
  */
 
 import java.io.File;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/net/URL/HandlersPkgPrefix/HandlersPkgPrefix.java	Mon Apr 27 09:17:39 2015 -0700
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.function.Consumer;
+
+/*
+ * @test
+ * @bug 8075139
+ * @summary Basic test for java.protocol.handler.pkgs
+ * @compile handlers/foo/Handler.java handlers/bar/Handler.java HandlersPkgPrefix.java
+ * @run main/othervm HandlersPkgPrefix
+ */
+
+public class HandlersPkgPrefix {
+    static final Consumer<Result> KNOWN = r -> {
+        if (r.exception != null)
+            throw new RuntimeException("Unexpected exception " + r.exception);
+        String p = r.url.getProtocol();
+        if (!r.protocol.equals(p))
+            throw new RuntimeException("Expected:" + r.protocol + ", got:" + p);
+    };
+    static final Consumer<Result> UNKNOWN = r -> {
+        if (r.url != null)
+            throw new RuntimeException("Unexpected url:" + r.url);
+        if (!(r.exception instanceof MalformedURLException))
+            throw new RuntimeException("Expected MalformedURLException, got:"
+                                       + r.exception);
+    };
+
+    public static void main(String[] args) {
+        withPrefix("unknown", "", UNKNOWN);
+        withPrefix("unknown", "handlers", UNKNOWN);
+
+        withPrefix("foo", "", UNKNOWN);
+        withPrefix("foo", "xxx|yyy|zzz", UNKNOWN);
+        withPrefix("foo", "||||", UNKNOWN);
+        withPrefix("foo", "|a|b|c|handlers", KNOWN);
+
+        withPrefix("bar", "", UNKNOWN);
+        withPrefix("bar", "x.y.z|y.y.y|z.z.z", UNKNOWN);
+        withPrefix("bar", " x.y.z | y.y.y | z.z.z| |  ", UNKNOWN);
+        withPrefix("bar", "| a | b | c | handlers | d | e", KNOWN);
+    }
+
+    static void withPrefix(String protocol, String pkgPrefix,
+                           Consumer<Result> resultChecker) {
+        System.out.println("Testing, " + protocol + ", " + pkgPrefix);
+
+        // The long standing implementation behavior is that the
+        // property is read multiple times, not cached.
+        System.setProperty("java.protocol.handler.pkgs", pkgPrefix);
+        URL url = null;
+        Exception exception = null;
+        try {
+            url = new URL(protocol + "://");
+        } catch (MalformedURLException x) {
+            exception = x;
+        }
+        resultChecker.accept(new Result(protocol, url, exception));
+    }
+
+    static class Result {
+        final String protocol;
+        final URL url;
+        final Exception exception;
+        Result(String protocol, URL url, Exception exception) {
+            this.protocol = protocol;
+            this.url = url;
+            this.exception = exception;
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/net/URL/HandlersPkgPrefix/handlers/bar/Handler.java	Mon Apr 27 09:17:39 2015 -0700
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package handlers.bar;
+
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLStreamHandler;
+
+public class Handler extends URLStreamHandler {
+    @Override
+    protected URLConnection openConnection(URL u) throws IOException {
+        return null;
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/net/URL/HandlersPkgPrefix/handlers/foo/Handler.java	Mon Apr 27 09:17:39 2015 -0700
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package handlers.foo;
+
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLStreamHandler;
+
+public class Handler extends URLStreamHandler {
+    @Override
+    protected URLConnection openConnection(URL u) throws IOException {
+        return null;
+    }
+}
+
--- a/test/java/util/PluggableLocale/TimeZoneNameProviderTest.java	Fri Apr 24 15:45:25 2015 +0300
+++ b/test/java/util/PluggableLocale/TimeZoneNameProviderTest.java	Mon Apr 27 09:17:39 2015 -0700
@@ -25,6 +25,7 @@
  */
 
 import java.text.*;
+import java.time.format.TextStyle;
 import java.util.*;
 import sun.util.locale.provider.*;
 import sun.util.resources.*;
@@ -42,6 +43,7 @@
         test2();
         test3();
         aliasTest();
+        genericFallbackTest();
     }
 
     void test1() {
@@ -169,9 +171,9 @@
             for (int style : new int[] { TimeZone.LONG, TimeZone.SHORT }) {
                 String osakaStd = tz.getDisplayName(false, style, OSAKA);
                 if (osakaStd != null) {
-                    // No API for getting generic time zone names
-                    String generic = TimeZoneNameUtility.retrieveGenericDisplayName(tzname,
-                                                                                    style, GENERIC);
+                    String generic = tz.toZoneId().getDisplayName(
+                            style == TimeZone.LONG ? TextStyle.FULL : TextStyle.SHORT,
+                            GENERIC);
                     String expected = "Generic " + osakaStd;
                     if (!expected.equals(generic)) {
                         throw new RuntimeException("Wrong generic name: got=\"" + generic
@@ -230,4 +232,20 @@
             throw new RuntimeException("Provider's localized name is not available for an alias ID: "+JAPAN+".  result: "+japan+" expected: "+JST_IN_OSAKA);
         }
     }
+
+    /*
+     * Tests whether generic names can be retrieved through fallback.
+     * The test assumes the provider impl for OSAKA locale does NOT
+     * provide generic names.
+     */
+    final String PT = "PT"; // SHORT generic name for "America/Los_Angeles"
+    void genericFallbackTest() {
+        String generic =
+            TimeZone.getTimeZone(LATIME)
+                .toZoneId()
+                .getDisplayName(TextStyle.SHORT, OSAKA);
+        if (!PT.equals(generic)) {
+            throw new RuntimeException("Generic name fallback failed. got: "+generic);
+        }
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/util/concurrent/forkjoin/SubmissionTest.java	Mon Apr 27 09:17:39 2015 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.util.concurrent.ForkJoinPool;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+/*
+ * @test
+ * @bug 8078490
+ * @summary Test submission and execution of task without joining
+ */
+public class SubmissionTest {
+    public static void main(String[] args) throws Throwable {
+        final ForkJoinPool e = new ForkJoinPool(1);
+        final AtomicBoolean b = new AtomicBoolean();
+        final Runnable setFalse = () -> b.set(false);
+        for (int i = 0; i < 100000; i++) {
+            b.set(true);
+            e.execute(setFalse);
+            long st = System.nanoTime();
+            while (b.get()) {
+                if (System.nanoTime() - st >= TimeUnit.SECONDS.toNanos(10)) {
+                    throw new RuntimeException("Submitted task failed to execute");
+                }
+            }