changeset 12890:6bac93e59597

Merge
author lana
date Fri, 08 Jun 2012 12:44:30 -0700
parents c5ca850e1dff 3ecbb4f2b752
children d3f312fc19e1
files jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java jdk/src/share/classes/sun/nio/ch/DevPollSelectorProvider.java jdk/src/share/classes/sun/security/provider/certpath/CrlRevocationChecker.java jdk/src/share/classes/sun/security/provider/certpath/OCSPChecker.java jdk/src/share/classes/sun/tools/jconsole/resources/JConsoleResources.java jdk/src/share/classes/sun/tools/jconsole/resources/JConsoleResources_ja.java jdk/src/share/classes/sun/tools/jconsole/resources/JConsoleResources_zh_CN.java jdk/src/share/native/java/sql/DriverManager.c jdk/test/sun/security/krb5/auto/ok-as-delegate-xrealm.sh jdk/test/sun/security/krb5/auto/ok-as-delegate.sh
diffstat 224 files changed, 10220 insertions(+), 7546 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/make/com/oracle/Makefile	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/make/com/oracle/Makefile	Fri Jun 08 12:44:30 2012 -0700
@@ -30,6 +30,22 @@
 #SUBDIRS_MAKEFLAGS += JAVAC_LINT_OPTIONS=-Xlint:all,-deprecation,-path
 include $(BUILDDIR)/common/Defs.gmk
 
+JFR_SRCDIRS_EXIST := $(shell \
+  if [ -d $(CLOSED_SHARE_SRC)/native/oracle/jfr ] ; then \
+    echo true; \
+  else \
+    echo false; \
+  fi)
+
+JFR =
+ifndef OPENJDK
+  ifndef JAVASE_EMBEDDED
+    ifeq ($(JFR_SRCDIRS_EXIST), true)
+      JFR = jfr
+    endif
+  endif
+endif
+
 # build com/oracle/security/ucrypto on Solaris platform for non-OpenJDK builds
 UCRYPTO =
 ifndef OPENJDK
@@ -38,13 +54,6 @@
   endif
 endif
 
-JFR =
-ifndef OPENJDK
-ifndef JAVASE_EMBEDDED
-	JFR = jfr
-endif
-endif
-
 SUBDIRS = $(JFR) net nio util $(UCRYPTO)
 
 include $(BUILDDIR)/common/Subdirs.gmk
--- a/jdk/make/common/Defs-solaris.gmk	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/make/common/Defs-solaris.gmk	Fri Jun 08 12:44:30 2012 -0700
@@ -99,6 +99,9 @@
 # variable names because the incoming option value can be overridden
 # in some situations, e.g., a VARIANT != OPT build.
 
+ADD_GNU_DEBUGLINK = $(ABS_BUILDTOOLBINDIR)/add_gnu_debuglink
+FIX_EMPTY_SEC_HDR_FLAGS = $(ABS_BUILDTOOLBINDIR)/fix_empty_sec_hdr_flags
+
 ifeq ($(VARIANT), OPT)
   FULL_DEBUG_SYMBOLS ?= 1
   ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
@@ -113,26 +116,11 @@
 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
   # Default OBJCOPY comes from the SUNWbinutils package:
   DEF_OBJCOPY=/usr/sfw/bin/gobjcopy
-  ifeq ($(PLATFORM)-$(LIBARCH), solaris-amd64)
-    # On Solaris AMD64/X64, gobjcopy is not happy and fails:
-    #
-    # usr/sfw/bin/gobjcopy --add-gnu-debuglink=<lib>.debuginfo <lib>.so
-    # BFD: stKPaiop: Not enough room for program headers, try linking with -N
-    # /usr/sfw/bin/gobjcopy: stKPaiop: Bad value
-    # BFD: stKPaiop: Not enough room for program headers, try linking with -N
-    # /usr/sfw/bin/gobjcopy: libsaproc.debuginfo: Bad value
-    # BFD: stKPaiop: Not enough room for program headers, try linking with -N
-    # /usr/sfw/bin/gobjcopy: stKPaiop: Bad value
-    _JUNK_ := $(shell \
-      echo >&2 "INFO: $(DEF_OBJCOPY) is not working on Solaris AMD64/X64")
-    OBJCOPY=
-  else
-    OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
-    ifneq ($(ALT_OBJCOPY),)
-      _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
-      # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
-      OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
-    endif
+  OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
+  ifneq ($(ALT_OBJCOPY),)
+    _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
+    # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
+    OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
   endif
 
   # Setting ENABLE_FULL_DEBUG_SYMBOLS=1 (and OBJCOPY) above enables the
@@ -243,18 +231,21 @@
 # optimization flags as used by FASTDEBUG. We also want all the
 # debug info in one place (-xs).
 #
+CFLAGS_COMMON=
+CXXFLAGS_COMMON=
 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
   ifeq ($(LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS),1)
     ifeq ($(VARIANT), OPT)
-      CC_OPT   = -g  -xs $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
-      CXX_OPT  = -g0 -xs $(CXX_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
+      OPTIMIZATION_LEVEL = $(FASTDEBUG_OPTIMIZATION_LEVEL)
+      CFLAGS_COMMON += -g  -xs
+      CXXFLAGS_COMMON += -g0 -xs
     endif
     CFLAGS_DEBUG_OPTION    += -xs
     CXXFLAGS_DEBUG_OPTION  += -xs
   endif
 endif
 
-CFLAGS_COMMON   = -L$(OBJDIR)
+CFLAGS_COMMON  += -L$(OBJDIR)
 
 # Do not allow C99 language features like declarations in code etc.
 CFLAGS_COMMON  += -xc99=%none
--- a/jdk/make/common/Defs.gmk	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/make/common/Defs.gmk	Fri Jun 08 12:44:30 2012 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1995, 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
@@ -297,6 +297,7 @@
 ABS_BUILDTOOLJARDIR = $(ABS_OUTPUTDIR)/btjars
 # for generated tool class files
 BUILDTOOLBINDIR     = $(OUTPUTDIR)/btbins
+ABS_BUILDTOOLBINDIR = $(ABS_OUTPUTDIR)/btbins
 # for generated java source files
 GENSRCDIR           = $(OUTPUTDIR)/gensrc
 # for generated C source files (not javah)
--- a/jdk/make/common/Library.gmk	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/make/common/Library.gmk	Fri Jun 08 12:44:30 2012 -0700
@@ -245,6 +245,12 @@
   ARFLAGS = -r
 endif
 
+ifeq ($(PLATFORM), solaris)
+  ifeq ($(LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS),1)
+$(ACTUAL_LIBRARY):: $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS)
+  endif
+endif
+
 $(ACTUAL_LIBRARY):: $(COMPILE_FILES_o) $(FILES_m) $(FILES_reorder)
 	@$(prep-target)
 	@$(ECHO) "STATS: LIBRARY=$(LIBRARY), PRODUCT=$(PRODUCT), OPTIMIZATION_LEVEL=$(OPTIMIZATION_LEVEL)"
@@ -260,11 +266,29 @@
   ifneq ($(PLATFORM), macosx)
     ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
       ifeq ($(LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS),1)
+        ifeq ($(PLATFORM), solaris)
+# gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
+# Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
+# empty section headers until a fixed $(OBJCOPY) is available.
+# An empty section header has sh_addr == 0 and sh_size == 0.
+# This problem has only been seen on Solaris X64, but we call this tool
+# on all Solaris builds just in case.
+#
+# $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
+# Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
 	(set -e ; \
 	 $(CD) $(@D) ; \
-	 $(OBJCOPY) --only-keep-debug $(@F) $(LIBRARY).debuginfo ; \
-	 $(OBJCOPY) --add-gnu-debuglink=$(LIBRARY).debuginfo $(@F) ; \
+	 $(FIX_EMPTY_SEC_HDR_FLAGS) $(@F) ; \
+	 $(OBJCOPY) --only-keep-debug $(@F) $(LIB_PREFIX)$(LIBRARY).debuginfo ; \
+         $(ADD_GNU_DEBUGLINK) $(LIB_PREFIX)$(LIBRARY).debuginfo $(@F) ; \
 	)
+        else # PLATFORM != solaris
+	(set -e ; \
+	 $(CD) $(@D) ; \
+	 $(OBJCOPY) --only-keep-debug $(@F) $(LIB_PREFIX)$(LIBRARY).debuginfo ; \
+	 $(OBJCOPY) --add-gnu-debuglink=$(LIB_PREFIX)$(LIBRARY).debuginfo $(@F) ; \
+	)
+        endif # PLATFORM == solaris
         ifeq ($(STRIP_POLICY),all_strip)
 	  $(STRIP) $@
         else
@@ -281,8 +305,8 @@
         ifeq ($(ZIP_DEBUGINFO_FILES),1)
 	  (set -e ; \
 	   $(CD) $(@D) ; \
-	   $(ZIPEXE) -q $(LIBRARY).diz $(LIBRARY).debuginfo ; \
-	   $(RM) $(LIBRARY).debuginfo ; \
+	   $(ZIPEXE) -q $(LIB_PREFIX)$(LIBRARY).diz $(LIB_PREFIX)$(LIBRARY).debuginfo ; \
+	   $(RM) $(LIB_PREFIX)$(LIBRARY).debuginfo ; \
 	  )
         endif
       endif # LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS
--- a/jdk/make/common/Program.gmk	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/make/common/Program.gmk	Fri Jun 08 12:44:30 2012 -0700
@@ -230,6 +230,13 @@
   #
   # This rule only applies on unix.  It supports quantify and its ilk.
   #
+
+  ifeq ($(PLATFORM), solaris)
+    ifeq ($(PROGRAM_SUPPORTS_FULL_DEBUG_SYMBOLS),1)
+  $(ACTUAL_PROGRAM):: $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS)
+    endif
+  endif
+
   $(ACTUAL_PROGRAM):: $(FILES_o)
 	@$(prep-target)
 	@set -- $?; \
@@ -244,11 +251,29 @@
   ifneq ($(PLATFORM), macosx)
     ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
       ifeq ($(PROGRAM_SUPPORTS_FULL_DEBUG_SYMBOLS),1)
+        ifeq ($(PLATFORM), solaris)
+# gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
+# Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
+# empty section headers until a fixed $(OBJCOPY) is available.
+# An empty section header has sh_addr == 0 and sh_size == 0.
+# This problem has only been seen on Solaris X64, but we call this tool
+# on all Solaris builds just in case.
+#
+# $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
+# Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
+	(set -e ; \
+	 $(CD) $(@D) ; \
+	 $(FIX_EMPTY_SEC_HDR_FLAGS) $(@F) ; \
+	 $(OBJCOPY) --only-keep-debug $(@F) $(@F).debuginfo ; \
+         $(ADD_GNU_DEBUGLINK) $(@F).debuginfo $(@F) ; \
+	)
+        else # PLATFORM != solaris
 	(set -e ; \
 	 $(CD) $(@D) ; \
 	 $(OBJCOPY) --only-keep-debug $(@F) $(@F).debuginfo ; \
 	 $(OBJCOPY) --add-gnu-debuglink=$(@F).debuginfo $(@F) ; \
 	)
+        endif # PLATFORM == solaris
         ifeq ($(STRIP_POLICY),all_strip)
 	  $(STRIP) $@
         else
--- a/jdk/make/java/java/FILES_c.gmk	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/make/java/java/FILES_c.gmk	Fri Jun 08 12:44:30 2012 -0700
@@ -69,7 +69,6 @@
 	jdk_util_md.c \
 	check_version.c \
 	java_props_md.c \
-	DriverManager.c \
 	ConstantPool.c \
 	MessageUtils.c \
 	GC.c \
--- a/jdk/make/java/java/FILES_java.gmk	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/make/java/java/FILES_java.gmk	Fri Jun 08 12:44:30 2012 -0700
@@ -482,6 +482,7 @@
     sun/misc/JavaNioAccess.java \
     sun/misc/Perf.java \
     sun/misc/PerfCounter.java \
+    sun/misc/Hashing.java \
     sun/net/www/protocol/jar/Handler.java \
     sun/net/www/protocol/jar/JarURLConnection.java \
     sun/net/www/protocol/file/Handler.java \
--- a/jdk/make/java/java/mapfile-vers	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/make/java/java/mapfile-vers	Fri Jun 08 12:44:30 2012 -0700
@@ -232,7 +232,6 @@
 		Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2Ljava_security_AccessControlContext_2;
 		Java_java_security_AccessController_getStackAccessControlContext;
 		Java_java_security_AccessController_getInheritedAccessControlContext;
-		Java_java_sql_DriverManager_getCallerClassLoader;
 		Java_java_util_ResourceBundle_getClassContext;
 		Java_java_util_TimeZone_getSystemTimeZoneID;
 		Java_java_util_TimeZone_getSystemGMTOffsetID;
--- a/jdk/make/java/nio/Makefile	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/make/java/nio/Makefile	Fri Jun 08 12:44:30 2012 -0700
@@ -55,6 +55,9 @@
 	sun/nio/ch/DevPollArrayWrapper.java \
 	sun/nio/ch/DevPollSelectorImpl.java \
         sun/nio/ch/DevPollSelectorProvider.java \
+	sun/nio/ch/EventPortSelectorImpl.java \
+	sun/nio/ch/EventPortSelectorProvider.java \
+	sun/nio/ch/EventPortWrapper.java \
 	sun/nio/ch/InheritedChannel.java \
         sun/nio/ch/PollSelectorProvider.java \
         sun/nio/ch/PollSelectorImpl.java \
--- a/jdk/make/java/nio/mapfile-linux	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/make/java/nio/mapfile-linux	Fri Jun 08 12:44:30 2012 -0700
@@ -39,7 +39,6 @@
                 Java_sun_nio_ch_EPollArrayWrapper_epollCreate;
                 Java_sun_nio_ch_EPollArrayWrapper_epollCtl;
                 Java_sun_nio_ch_EPollArrayWrapper_epollWait;
-		Java_sun_nio_ch_EPollArrayWrapper_fdLimit;
 		Java_sun_nio_ch_EPollArrayWrapper_init;
 		Java_sun_nio_ch_EPollArrayWrapper_interrupt;
 		Java_sun_nio_ch_EPollArrayWrapper_offsetofData;
@@ -87,6 +86,7 @@
                 Java_sun_nio_ch_IOUtil_configureBlocking;
                 Java_sun_nio_ch_IOUtil_drain;
                 Java_sun_nio_ch_IOUtil_fdVal;
+		Java_sun_nio_ch_IOUtil_fdLimit;
                 Java_sun_nio_ch_IOUtil_initIDs;
                 Java_sun_nio_ch_IOUtil_makePipe;
                 Java_sun_nio_ch_IOUtil_randomBytes;
--- a/jdk/make/java/nio/mapfile-solaris	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/make/java/nio/mapfile-solaris	Fri Jun 08 12:44:30 2012 -0700
@@ -36,7 +36,6 @@
                 Java_sun_nio_ch_DatagramDispatcher_readv0;
                 Java_sun_nio_ch_DatagramDispatcher_write0;
                 Java_sun_nio_ch_DatagramDispatcher_writev0;
-                Java_sun_nio_ch_DevPollArrayWrapper_fdLimit;
                 Java_sun_nio_ch_DevPollArrayWrapper_init;
                 Java_sun_nio_ch_DevPollArrayWrapper_interrupt;
                 Java_sun_nio_ch_DevPollArrayWrapper_poll0;
@@ -74,6 +73,7 @@
 		Java_sun_nio_ch_InheritedChannel_soType0;
                 Java_sun_nio_ch_IOUtil_configureBlocking;
                 Java_sun_nio_ch_IOUtil_drain;
+		Java_sun_nio_ch_IOUtil_fdLimit;
                 Java_sun_nio_ch_IOUtil_fdVal;
                 Java_sun_nio_ch_IOUtil_initIDs;
                 Java_sun_nio_ch_IOUtil_makePipe;
@@ -112,13 +112,13 @@
 		Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_accept0;
 		Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_initIDs;
 		Java_sun_nio_ch_UnixAsynchronousSocketChannelImpl_checkConnect;
-		Java_sun_nio_ch_SolarisEventPort_init;
-		Java_sun_nio_ch_SolarisEventPort_portCreate;
-		Java_sun_nio_ch_SolarisEventPort_portClose;
-		Java_sun_nio_ch_SolarisEventPort_portAssociate;
-		Java_sun_nio_ch_SolarisEventPort_portGet;
-		Java_sun_nio_ch_SolarisEventPort_portGetn;
-		Java_sun_nio_ch_SolarisEventPort_portSend;
+		Java_sun_nio_ch_SolarisEventPort_port_1create;
+		Java_sun_nio_ch_SolarisEventPort_port_1close;
+		Java_sun_nio_ch_SolarisEventPort_port_1associate;
+		Java_sun_nio_ch_SolarisEventPort_port_1dissociate;
+		Java_sun_nio_ch_SolarisEventPort_port_1get;
+		Java_sun_nio_ch_SolarisEventPort_port_1getn;
+		Java_sun_nio_ch_SolarisEventPort_port_1send;
 		Java_sun_nio_fs_GnomeFileTypeDetector_initializeGio;
 		Java_sun_nio_fs_GnomeFileTypeDetector_probeUsingGio;
 		Java_sun_nio_fs_GnomeFileTypeDetector_initializeGnomeVfs;
--- a/jdk/make/jprt.properties	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/make/jprt.properties	Fri Jun 08 12:44:30 2012 -0700
@@ -89,6 +89,7 @@
     ${jprt.my.test.target.set:TESTNAME=jdk_text},               \
     ${jprt.my.test.target.set:TESTNAME=jdk_tools1},             \
     ${jprt.my.test.target.set:TESTNAME=jdk_tools2},             \
+    ${jprt.my.test.target.set:TESTNAME=jdk_jfr},                \
     ${jprt.my.test.target.set:TESTNAME=jdk_misc}
 
 # All vm test targets (testset=all)
--- a/jdk/make/netbeans/jconsole/build.xml	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/make/netbeans/jconsole/build.xml	Fri Jun 08 12:44:30 2012 -0700
@@ -50,6 +50,7 @@
             <fileset dir="${classes.dir}">
                 <include name="sun/tools/jconsole/**/*.class"/>
                 <include name="com/sun/tools/jconsole/**/*.class"/>
+                <include name="sun/tools/jconsole/resources/*.properties"/>
                 <include name="sun/tools/jconsole/resources/*.gif"/>
                 <include name="sun/tools/jconsole/resources/*.png"/>
             </fileset>
--- a/jdk/make/sun/jconsole/FILES.gmk	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/make/sun/jconsole/FILES.gmk	Fri Jun 08 12:44:30 2012 -0700
@@ -30,17 +30,22 @@
 MANIFEST = sun/tools/jconsole/manifest
 
 PNG_FILES = \
-	sun/tools/jconsole/resources/brandlogo.png \
-	sun/tools/jconsole/resources/collapse-winlf.png \
-	sun/tools/jconsole/resources/connected16.png \
-	sun/tools/jconsole/resources/connected24.png \
-	sun/tools/jconsole/resources/disconnected16.png \
-	sun/tools/jconsole/resources/disconnected24.png \
-	sun/tools/jconsole/resources/expand-winlf.png \
-	sun/tools/jconsole/resources/masthead-left.png \
-	sun/tools/jconsole/resources/masthead-right.png
+  sun/tools/jconsole/resources/brandlogo.png \
+  sun/tools/jconsole/resources/collapse-winlf.png \
+  sun/tools/jconsole/resources/connected16.png \
+  sun/tools/jconsole/resources/connected24.png \
+  sun/tools/jconsole/resources/disconnected16.png \
+  sun/tools/jconsole/resources/disconnected24.png \
+  sun/tools/jconsole/resources/expand-winlf.png \
+  sun/tools/jconsole/resources/masthead-left.png \
+  sun/tools/jconsole/resources/masthead-right.png
 
 GIF_FILES = \
-	sun/tools/jconsole/resources/mbean.gif \
-	sun/tools/jconsole/resources/mbeanserverdelegate.gif \
-	sun/tools/jconsole/resources/xobject.gif
+  sun/tools/jconsole/resources/mbean.gif \
+  sun/tools/jconsole/resources/mbeanserverdelegate.gif \
+  sun/tools/jconsole/resources/xobject.gif
+
+PROP_FILES = \
+  sun/tools/jconsole/resources/messages.properties \
+  sun/tools/jconsole/resources/messages_ja.properties \
+  sun/tools/jconsole/resources/messages_zh_CN.properties
--- a/jdk/make/sun/jconsole/Makefile	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/make/sun/jconsole/Makefile	Fri Jun 08 12:44:30 2012 -0700
@@ -53,21 +53,21 @@
 
 FILES_png = $(PNG_FILES:%.png=$(CLASSBINDIR)/%.png)
 FILES_gif = $(GIF_FILES:%.gif=$(CLASSBINDIR)/%.gif)
-
+FILES_prop = $(PROP_FILES:%.properties=$(CLASSBINDIR)/%.properties)
 build: $(GENSRCDIR)/sun/tools/jconsole/Version.java
 
 #
 # Resources
 #
 LOCALE_SET_DEFINITION = jdk
-RESOURCE_BUNDLES_JAVA = $(PKGDIR)/resources/JConsoleResources.java
+RESOURCE_BUNDLES_UNCOMPILED_PROPERTIES = $(PKGDIR)/resources/messages.properties
 
 #
 # Rules.
 #
 include $(BUILDDIR)/common/Classes.gmk
 
-build: $(FILES_png) $(FILES_gif) $(TEMPDIR)/manifest $(JARFILE)
+build: $(FILES_png) $(FILES_gif) $(FILES_prop) $(TEMPDIR)/manifest $(JARFILE)
 
 $(GENSRCDIR)/sun/tools/jconsole/Version.java: \
                 $(SHARE_SRC)/classes/sun/tools/jconsole/Version.java.template
@@ -85,7 +85,7 @@
 # Extra rule to build jconsole.jar
 #
 
-$(JARFILE): $(LIBDIR) $(FILES_class) $(FILES_png) $(FILES_gif) $(TEMPDIR)/manifest
+$(JARFILE): $(LIBDIR) $(FILES_class) $(FILES_png) $(FILES_gif) $(FILES_prop) $(TEMPDIR)/manifest
 	$(BOOT_JAR_CMD) -cfm $(JARFILE) $(TEMPDIR)/manifest \
                -C $(CLASSBINDIR) sun/tools/jconsole \
                -C $(CLASSBINDIR) com/sun/tools/jconsole \
--- a/jdk/make/tools/CharsetMapping/GBK.map	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/make/tools/CharsetMapping/GBK.map	Fri Jun 08 12:44:30 2012 -0700
@@ -3,6 +3,10 @@
 # (1)sorted
 # (2)added the singlebyte entries
 #
+# (3)updated 0xA140-0xA7A0 mappings to follow GB18030/MS936
+# (4)added euro sign entry A2E3 20AC (instead of 0xA2E3  0xE76C)
+#    this is what gb18030 does.
+#
 0x00	0x0000
 0x01	0x0001
 0x02	0x0002
@@ -6508,12 +6512,12 @@
 0xA2A8	0x2177
 0xA2A9	0x2178
 0xA2AA	0x2179
-0xA2AB	0xE586
-0xA2AC	0xE587
-0xA2AD	0xE588
-0xA2AE	0xE589
-0xA2AF	0xE58A
-0xA2B0	0xE58B
+0xA2AB	0xE766
+0xA2AC	0xE767
+0xA2AD	0xE768
+0xA2AE	0xE769
+0xA2AF	0xE76A
+0xA2B0	0xE76B
 0xA2B1	0x2488
 0xA2B2	0x2489
 0xA2B3	0x248A
@@ -6564,8 +6568,8 @@
 0xA2E0	0x2467
 0xA2E1	0x2468
 0xA2E2	0x2469
-0xA2E3	0xE58C
-0xA2E4	0xE58D
+0xA2E3	0x20AC
+0xA2E4	0xE76D
 0xA2E5	0x3220
 0xA2E6	0x3221
 0xA2E7	0x3222
@@ -6576,8 +6580,8 @@
 0xA2EC	0x3227
 0xA2ED	0x3228
 0xA2EE	0x3229
-0xA2EF	0xE58E
-0xA2F0	0xE58F
+0xA2EF	0xE76E
+0xA2F0	0xE76F
 0xA2F1	0x2160
 0xA2F2	0x2161
 0xA2F3	0x2162
@@ -6590,104 +6594,104 @@
 0xA2FA	0x2169
 0xA2FB	0x216A
 0xA2FC	0x216B
-0xA2FD	0xE590
-0xA2FE	0xE591
-0xA340	0xE592
-0xA341	0xE593
-0xA342	0xE594
-0xA343	0xE595
-0xA344	0xE596
-0xA345	0xE597
-0xA346	0xE598
-0xA347	0xE599
-0xA348	0xE59A
-0xA349	0xE59B
-0xA34A	0xE59C
-0xA34B	0xE59D
-0xA34C	0xE59E
-0xA34D	0xE59F
-0xA34E	0xE5A0
-0xA34F	0xE5A1
-0xA350	0xE5A2
-0xA351	0xE5A3
-0xA352	0xE5A4
-0xA353	0xE5A5
-0xA354	0xE5A6
-0xA355	0xE5A7
-0xA356	0xE5A8
-0xA357	0xE5A9
-0xA358	0xE5AA
-0xA359	0xE5AB
-0xA35A	0xE5AC
-0xA35B	0xE5AD
-0xA35C	0xE5AE
-0xA35D	0xE5AF
-0xA35E	0xE5B0
-0xA35F	0xE5B1
-0xA360	0xE5B2
-0xA361	0xE5B3
-0xA362	0xE5B4
-0xA363	0xE5B5
-0xA364	0xE5B6
-0xA365	0xE5B7
-0xA366	0xE5B8
-0xA367	0xE5B9
-0xA368	0xE5BA
-0xA369	0xE5BB
-0xA36A	0xE5BC
-0xA36B	0xE5BD
-0xA36C	0xE5BE
-0xA36D	0xE5BF
-0xA36E	0xE5C0
-0xA36F	0xE5C1
-0xA370	0xE5C2
-0xA371	0xE5C3
-0xA372	0xE5C4
-0xA373	0xE5C5
-0xA374	0xE5C6
-0xA375	0xE5C7
-0xA376	0xE5C8
-0xA377	0xE5C9
-0xA378	0xE5CA
-0xA379	0xE5CB
-0xA37A	0xE5CC
-0xA37B	0xE5CD
-0xA37C	0xE5CE
-0xA37D	0xE5CF
-0xA37E	0xE5D0
-0xA380	0xE5D1
-0xA381	0xE5D2
-0xA382	0xE5D3
-0xA383	0xE5D4
-0xA384	0xE5D5
-0xA385	0xE5D6
-0xA386	0xE5D7
-0xA387	0xE5D8
-0xA388	0xE5D9
-0xA389	0xE5DA
-0xA38A	0xE5DB
-0xA38B	0xE5DC
-0xA38C	0xE5DD
-0xA38D	0xE5DE
-0xA38E	0xE5DF
-0xA38F	0xE5E0
-0xA390	0xE5E1
-0xA391	0xE5E2
-0xA392	0xE5E3
-0xA393	0xE5E4
-0xA394	0xE5E5
-0xA395	0xE5E6
-0xA396	0xE5E7
-0xA397	0xE5E8
-0xA398	0xE5E9
-0xA399	0xE5EA
-0xA39A	0xE5EB
-0xA39B	0xE5EC
-0xA39C	0xE5ED
-0xA39D	0xE5EE
-0xA39E	0xE5EF
-0xA39F	0xE5F0
-0xA3A0	0xE5F1
+0xA2FD	0xE770
+0xA2FE	0xE771
+0xA340	0xE586
+0xA341	0xE587
+0xA342	0xE588
+0xA343	0xE589
+0xA344	0xE58A
+0xA345	0xE58B
+0xA346	0xE58C
+0xA347	0xE58D
+0xA348	0xE58E
+0xA349	0xE58F
+0xA34A	0xE590
+0xA34B	0xE591
+0xA34C	0xE592
+0xA34D	0xE593
+0xA34E	0xE594
+0xA34F	0xE595
+0xA350	0xE596
+0xA351	0xE597
+0xA352	0xE598
+0xA353	0xE599
+0xA354	0xE59A
+0xA355	0xE59B
+0xA356	0xE59C
+0xA357	0xE59D
+0xA358	0xE59E
+0xA359	0xE59F
+0xA35A	0xE5A0
+0xA35B	0xE5A1
+0xA35C	0xE5A2
+0xA35D	0xE5A3
+0xA35E	0xE5A4
+0xA35F	0xE5A5
+0xA360	0xE5A6
+0xA361	0xE5A7
+0xA362	0xE5A8
+0xA363	0xE5A9
+0xA364	0xE5AA
+0xA365	0xE5AB
+0xA366	0xE5AC
+0xA367	0xE5AD
+0xA368	0xE5AE
+0xA369	0xE5AF
+0xA36A	0xE5B0
+0xA36B	0xE5B1
+0xA36C	0xE5B2
+0xA36D	0xE5B3
+0xA36E	0xE5B4
+0xA36F	0xE5B5
+0xA370	0xE5B6
+0xA371	0xE5B7
+0xA372	0xE5B8
+0xA373	0xE5B9
+0xA374	0xE5BA
+0xA375	0xE5BB
+0xA376	0xE5BC
+0xA377	0xE5BD
+0xA378	0xE5BE
+0xA379	0xE5BF
+0xA37A	0xE5C0
+0xA37B	0xE5C1
+0xA37C	0xE5C2
+0xA37D	0xE5C3
+0xA37E	0xE5C4
+0xA380	0xE5C5
+0xA381	0xE5C6
+0xA382	0xE5C7
+0xA383	0xE5C8
+0xA384	0xE5C9
+0xA385	0xE5CA
+0xA386	0xE5CB
+0xA387	0xE5CC
+0xA388	0xE5CD
+0xA389	0xE5CE
+0xA38A	0xE5CF
+0xA38B	0xE5D0
+0xA38C	0xE5D1
+0xA38D	0xE5D2
+0xA38E	0xE5D3
+0xA38F	0xE5D4
+0xA390	0xE5D5
+0xA391	0xE5D6
+0xA392	0xE5D7
+0xA393	0xE5D8
+0xA394	0xE5D9
+0xA395	0xE5DA
+0xA396	0xE5DB
+0xA397	0xE5DC
+0xA398	0xE5DD
+0xA399	0xE5DE
+0xA39A	0xE5DF
+0xA39B	0xE5E0
+0xA39C	0xE5E1
+0xA39D	0xE5E2
+0xA39E	0xE5E3
+0xA39F	0xE5E4
+0xA3A0	0xE5E5
 0xA3A1	0xFF01
 0xA3A2	0xFF02
 0xA3A3	0xFF03
@@ -6782,102 +6786,102 @@
 0xA3FC	0xFF5C
 0xA3FD	0xFF5D
 0xA3FE	0xFFE3
-0xA440	0xE5F2
-0xA441	0xE5F3
-0xA442	0xE5F4
-0xA443	0xE5F5
-0xA444	0xE5F6
-0xA445	0xE5F7
-0xA446	0xE5F8
-0xA447	0xE5F9
-0xA448	0xE5FA
-0xA449	0xE5FB
-0xA44A	0xE5FC
-0xA44B	0xE5FD
-0xA44C	0xE5FE
-0xA44D	0xE5FF
-0xA44E	0xE600
-0xA44F	0xE601
-0xA450	0xE602
-0xA451	0xE603
-0xA452	0xE604
-0xA453	0xE605
-0xA454	0xE606
-0xA455	0xE607
-0xA456	0xE608
-0xA457	0xE609
-0xA458	0xE60A
-0xA459	0xE60B
-0xA45A	0xE60C
-0xA45B	0xE60D
-0xA45C	0xE60E
-0xA45D	0xE60F
-0xA45E	0xE610
-0xA45F	0xE611
-0xA460	0xE612
-0xA461	0xE613
-0xA462	0xE614
-0xA463	0xE615
-0xA464	0xE616
-0xA465	0xE617
-0xA466	0xE618
-0xA467	0xE619
-0xA468	0xE61A
-0xA469	0xE61B
-0xA46A	0xE61C
-0xA46B	0xE61D
-0xA46C	0xE61E
-0xA46D	0xE61F
-0xA46E	0xE620
-0xA46F	0xE621
-0xA470	0xE622
-0xA471	0xE623
-0xA472	0xE624
-0xA473	0xE625
-0xA474	0xE626
-0xA475	0xE627
-0xA476	0xE628
-0xA477	0xE629
-0xA478	0xE62A
-0xA479	0xE62B
-0xA47A	0xE62C
-0xA47B	0xE62D
-0xA47C	0xE62E
-0xA47D	0xE62F
-0xA47E	0xE630
-0xA480	0xE631
-0xA481	0xE632
-0xA482	0xE633
-0xA483	0xE634
-0xA484	0xE635
-0xA485	0xE636
-0xA486	0xE637
-0xA487	0xE638
-0xA488	0xE639
-0xA489	0xE63A
-0xA48A	0xE63B
-0xA48B	0xE63C
-0xA48C	0xE63D
-0xA48D	0xE63E
-0xA48E	0xE63F
-0xA48F	0xE640
-0xA490	0xE641
-0xA491	0xE642
-0xA492	0xE643
-0xA493	0xE644
-0xA494	0xE645
-0xA495	0xE646
-0xA496	0xE647
-0xA497	0xE648
-0xA498	0xE649
-0xA499	0xE64A
-0xA49A	0xE64B
-0xA49B	0xE64C
-0xA49C	0xE64D
-0xA49D	0xE64E
-0xA49E	0xE64F
-0xA49F	0xE650
-0xA4A0	0xE651
+0xA440	0xE5E6
+0xA441	0xE5E7
+0xA442	0xE5E8
+0xA443	0xE5E9
+0xA444	0xE5EA
+0xA445	0xE5EB
+0xA446	0xE5EC
+0xA447	0xE5ED
+0xA448	0xE5EE
+0xA449	0xE5EF
+0xA44A	0xE5F0
+0xA44B	0xE5F1
+0xA44C	0xE5F2
+0xA44D	0xE5F3
+0xA44E	0xE5F4
+0xA44F	0xE5F5
+0xA450	0xE5F6
+0xA451	0xE5F7
+0xA452	0xE5F8
+0xA453	0xE5F9
+0xA454	0xE5FA
+0xA455	0xE5FB
+0xA456	0xE5FC
+0xA457	0xE5FD
+0xA458	0xE5FE
+0xA459	0xE5FF
+0xA45A	0xE600
+0xA45B	0xE601
+0xA45C	0xE602
+0xA45D	0xE603
+0xA45E	0xE604
+0xA45F	0xE605
+0xA460	0xE606
+0xA461	0xE607
+0xA462	0xE608
+0xA463	0xE609
+0xA464	0xE60A
+0xA465	0xE60B
+0xA466	0xE60C
+0xA467	0xE60D
+0xA468	0xE60E
+0xA469	0xE60F
+0xA46A	0xE610
+0xA46B	0xE611
+0xA46C	0xE612
+0xA46D	0xE613
+0xA46E	0xE614
+0xA46F	0xE615
+0xA470	0xE616
+0xA471	0xE617
+0xA472	0xE618
+0xA473	0xE619
+0xA474	0xE61A
+0xA475	0xE61B
+0xA476	0xE61C
+0xA477	0xE61D
+0xA478	0xE61E
+0xA479	0xE61F
+0xA47A	0xE620
+0xA47B	0xE621
+0xA47C	0xE622
+0xA47D	0xE623
+0xA47E	0xE624
+0xA480	0xE625
+0xA481	0xE626
+0xA482	0xE627
+0xA483	0xE628
+0xA484	0xE629
+0xA485	0xE62A
+0xA486	0xE62B
+0xA487	0xE62C
+0xA488	0xE62D
+0xA489	0xE62E
+0xA48A	0xE62F
+0xA48B	0xE630
+0xA48C	0xE631
+0xA48D	0xE632
+0xA48E	0xE633
+0xA48F	0xE634
+0xA490	0xE635
+0xA491	0xE636
+0xA492	0xE637
+0xA493	0xE638
+0xA494	0xE639
+0xA495	0xE63A
+0xA496	0xE63B
+0xA497	0xE63C
+0xA498	0xE63D
+0xA499	0xE63E
+0xA49A	0xE63F
+0xA49B	0xE640
+0xA49C	0xE641
+0xA49D	0xE642
+0xA49E	0xE643
+0xA49F	0xE644
+0xA4A0	0xE645
 0xA4A1	0x3041
 0xA4A2	0x3042
 0xA4A3	0x3043
@@ -6961,113 +6965,113 @@
 0xA4F1	0x3091
 0xA4F2	0x3092
 0xA4F3	0x3093
-0xA4F4	0xE652
-0xA4F5	0xE653
-0xA4F6	0xE654
-0xA4F7	0xE655
-0xA4F8	0xE656
-0xA4F9	0xE657
-0xA4FA	0xE658
-0xA4FB	0xE659
-0xA4FC	0xE65A
-0xA4FD	0xE65B
-0xA4FE	0xE65C
-0xA540	0xE65D
-0xA541	0xE65E
-0xA542	0xE65F
-0xA543	0xE660
-0xA544	0xE661
-0xA545	0xE662
-0xA546	0xE663
-0xA547	0xE664
-0xA548	0xE665
-0xA549	0xE666
-0xA54A	0xE667
-0xA54B	0xE668
-0xA54C	0xE669
-0xA54D	0xE66A
-0xA54E	0xE66B
-0xA54F	0xE66C
-0xA550	0xE66D
-0xA551	0xE66E
-0xA552	0xE66F
-0xA553	0xE670
-0xA554	0xE671
-0xA555	0xE672
-0xA556	0xE673
-0xA557	0xE674
-0xA558	0xE675
-0xA559	0xE676
-0xA55A	0xE677
-0xA55B	0xE678
-0xA55C	0xE679
-0xA55D	0xE67A
-0xA55E	0xE67B
-0xA55F	0xE67C
-0xA560	0xE67D
-0xA561	0xE67E
-0xA562	0xE67F
-0xA563	0xE680
-0xA564	0xE681
-0xA565	0xE682
-0xA566	0xE683
-0xA567	0xE684
-0xA568	0xE685
-0xA569	0xE686
-0xA56A	0xE687
-0xA56B	0xE688
-0xA56C	0xE689
-0xA56D	0xE68A
-0xA56E	0xE68B
-0xA56F	0xE68C
-0xA570	0xE68D
-0xA571	0xE68E
-0xA572	0xE68F
-0xA573	0xE690
-0xA574	0xE691
-0xA575	0xE692
-0xA576	0xE693
-0xA577	0xE694
-0xA578	0xE695
-0xA579	0xE696
-0xA57A	0xE697
-0xA57B	0xE698
-0xA57C	0xE699
-0xA57D	0xE69A
-0xA57E	0xE69B
-0xA580	0xE69C
-0xA581	0xE69D
-0xA582	0xE69E
-0xA583	0xE69F
-0xA584	0xE6A0
-0xA585	0xE6A1
-0xA586	0xE6A2
-0xA587	0xE6A3
-0xA588	0xE6A4
-0xA589	0xE6A5
-0xA58A	0xE6A6
-0xA58B	0xE6A7
-0xA58C	0xE6A8
-0xA58D	0xE6A9
-0xA58E	0xE6AA
-0xA58F	0xE6AB
-0xA590	0xE6AC
-0xA591	0xE6AD
-0xA592	0xE6AE
-0xA593	0xE6AF
-0xA594	0xE6B0
-0xA595	0xE6B1
-0xA596	0xE6B2
-0xA597	0xE6B3
-0xA598	0xE6B4
-0xA599	0xE6B5
-0xA59A	0xE6B6
-0xA59B	0xE6B7
-0xA59C	0xE6B8
-0xA59D	0xE6B9
-0xA59E	0xE6BA
-0xA59F	0xE6BB
-0xA5A0	0xE6BC
+0xA4F4	0xE772
+0xA4F5	0xE773
+0xA4F6	0xE774
+0xA4F7	0xE775
+0xA4F8	0xE776
+0xA4F9	0xE777
+0xA4FA	0xE778
+0xA4FB	0xE779
+0xA4FC	0xE77A
+0xA4FD	0xE77B
+0xA4FE	0xE77C
+0xA540	0xE646
+0xA541	0xE647
+0xA542	0xE648
+0xA543	0xE649
+0xA544	0xE64A
+0xA545	0xE64B
+0xA546	0xE64C
+0xA547	0xE64D
+0xA548	0xE64E
+0xA549	0xE64F
+0xA54A	0xE650
+0xA54B	0xE651
+0xA54C	0xE652
+0xA54D	0xE653
+0xA54E	0xE654
+0xA54F	0xE655
+0xA550	0xE656
+0xA551	0xE657
+0xA552	0xE658
+0xA553	0xE659
+0xA554	0xE65A
+0xA555	0xE65B
+0xA556	0xE65C
+0xA557	0xE65D
+0xA558	0xE65E
+0xA559	0xE65F
+0xA55A	0xE660
+0xA55B	0xE661
+0xA55C	0xE662
+0xA55D	0xE663
+0xA55E	0xE664
+0xA55F	0xE665
+0xA560	0xE666
+0xA561	0xE667
+0xA562	0xE668
+0xA563	0xE669
+0xA564	0xE66A
+0xA565	0xE66B
+0xA566	0xE66C
+0xA567	0xE66D
+0xA568	0xE66E
+0xA569	0xE66F
+0xA56A	0xE670
+0xA56B	0xE671
+0xA56C	0xE672
+0xA56D	0xE673
+0xA56E	0xE674
+0xA56F	0xE675
+0xA570	0xE676
+0xA571	0xE677
+0xA572	0xE678
+0xA573	0xE679
+0xA574	0xE67A
+0xA575	0xE67B
+0xA576	0xE67C
+0xA577	0xE67D
+0xA578	0xE67E
+0xA579	0xE67F
+0xA57A	0xE680
+0xA57B	0xE681
+0xA57C	0xE682
+0xA57D	0xE683
+0xA57E	0xE684
+0xA580	0xE685
+0xA581	0xE686
+0xA582	0xE687
+0xA583	0xE688
+0xA584	0xE689
+0xA585	0xE68A
+0xA586	0xE68B
+0xA587	0xE68C
+0xA588	0xE68D
+0xA589	0xE68E
+0xA58A	0xE68F
+0xA58B	0xE690
+0xA58C	0xE691
+0xA58D	0xE692
+0xA58E	0xE693
+0xA58F	0xE694
+0xA590	0xE695
+0xA591	0xE696
+0xA592	0xE697
+0xA593	0xE698
+0xA594	0xE699
+0xA595	0xE69A
+0xA596	0xE69B
+0xA597	0xE69C
+0xA598	0xE69D
+0xA599	0xE69E
+0xA59A	0xE69F
+0xA59B	0xE6A0
+0xA59C	0xE6A1
+0xA59D	0xE6A2
+0xA59E	0xE6A3
+0xA59F	0xE6A4
+0xA5A0	0xE6A5
 0xA5A1	0x30A1
 0xA5A2	0x30A2
 0xA5A3	0x30A3
@@ -7154,110 +7158,110 @@
 0xA5F4	0x30F4
 0xA5F5	0x30F5
 0xA5F6	0x30F6
-0xA5F7	0xE6BD
-0xA5F8	0xE6BE
-0xA5F9	0xE6BF
-0xA5FA	0xE6C0
-0xA5FB	0xE6C1
-0xA5FC	0xE6C2
-0xA5FD	0xE6C3
-0xA5FE	0xE6C4
-0xA640	0xE6C5
-0xA641	0xE6C6
-0xA642	0xE6C7
-0xA643	0xE6C8
-0xA644	0xE6C9
-0xA645	0xE6CA
-0xA646	0xE6CB
-0xA647	0xE6CC
-0xA648	0xE6CD
-0xA649	0xE6CE
-0xA64A	0xE6CF
-0xA64B	0xE6D0
-0xA64C	0xE6D1
-0xA64D	0xE6D2
-0xA64E	0xE6D3
-0xA64F	0xE6D4
-0xA650	0xE6D5
-0xA651	0xE6D6
-0xA652	0xE6D7
-0xA653	0xE6D8
-0xA654	0xE6D9
-0xA655	0xE6DA
-0xA656	0xE6DB
-0xA657	0xE6DC
-0xA658	0xE6DD
-0xA659	0xE6DE
-0xA65A	0xE6DF
-0xA65B	0xE6E0
-0xA65C	0xE6E1
-0xA65D	0xE6E2
-0xA65E	0xE6E3
-0xA65F	0xE6E4
-0xA660	0xE6E5
-0xA661	0xE6E6
-0xA662	0xE6E7
-0xA663	0xE6E8
-0xA664	0xE6E9
-0xA665	0xE6EA
-0xA666	0xE6EB
-0xA667	0xE6EC
-0xA668	0xE6ED
-0xA669	0xE6EE
-0xA66A	0xE6EF
-0xA66B	0xE6F0
-0xA66C	0xE6F1
-0xA66D	0xE6F2
-0xA66E	0xE6F3
-0xA66F	0xE6F4
-0xA670	0xE6F5
-0xA671	0xE6F6
-0xA672	0xE6F7
-0xA673	0xE6F8
-0xA674	0xE6F9
-0xA675	0xE6FA
-0xA676	0xE6FB
-0xA677	0xE6FC
-0xA678	0xE6FD
-0xA679	0xE6FE
-0xA67A	0xE6FF
-0xA67B	0xE700
-0xA67C	0xE701
-0xA67D	0xE702
-0xA67E	0xE703
-0xA680	0xE704
-0xA681	0xE705
-0xA682	0xE706
-0xA683	0xE707
-0xA684	0xE708
-0xA685	0xE709
-0xA686	0xE70A
-0xA687	0xE70B
-0xA688	0xE70C
-0xA689	0xE70D
-0xA68A	0xE70E
-0xA68B	0xE70F
-0xA68C	0xE710
-0xA68D	0xE711
-0xA68E	0xE712
-0xA68F	0xE713
-0xA690	0xE714
-0xA691	0xE715
-0xA692	0xE716
-0xA693	0xE717
-0xA694	0xE718
-0xA695	0xE719
-0xA696	0xE71A
-0xA697	0xE71B
-0xA698	0xE71C
-0xA699	0xE71D
-0xA69A	0xE71E
-0xA69B	0xE71F
-0xA69C	0xE720
-0xA69D	0xE721
-0xA69E	0xE722
-0xA69F	0xE723
-0xA6A0	0xE724
+0xA5F7	0xE77D
+0xA5F8	0xE77E
+0xA5F9	0xE77F
+0xA5FA	0xE780
+0xA5FB	0xE781
+0xA5FC	0xE782
+0xA5FD	0xE783
+0xA5FE	0xE784
+0xA640	0xE6A6
+0xA641	0xE6A7
+0xA642	0xE6A8
+0xA643	0xE6A9
+0xA644	0xE6AA
+0xA645	0xE6AB
+0xA646	0xE6AC
+0xA647	0xE6AD
+0xA648	0xE6AE
+0xA649	0xE6AF
+0xA64A	0xE6B0
+0xA64B	0xE6B1
+0xA64C	0xE6B2
+0xA64D	0xE6B3
+0xA64E	0xE6B4
+0xA64F	0xE6B5
+0xA650	0xE6B6
+0xA651	0xE6B7
+0xA652	0xE6B8
+0xA653	0xE6B9
+0xA654	0xE6BA
+0xA655	0xE6BB
+0xA656	0xE6BC
+0xA657	0xE6BD
+0xA658	0xE6BE
+0xA659	0xE6BF
+0xA65A	0xE6C0
+0xA65B	0xE6C1
+0xA65C	0xE6C2
+0xA65D	0xE6C3
+0xA65E	0xE6C4
+0xA65F	0xE6C5
+0xA660	0xE6C6
+0xA661	0xE6C7
+0xA662	0xE6C8
+0xA663	0xE6C9
+0xA664	0xE6CA
+0xA665	0xE6CB
+0xA666	0xE6CC
+0xA667	0xE6CD
+0xA668	0xE6CE
+0xA669	0xE6CF
+0xA66A	0xE6D0
+0xA66B	0xE6D1
+0xA66C	0xE6D2
+0xA66D	0xE6D3
+0xA66E	0xE6D4
+0xA66F	0xE6D5
+0xA670	0xE6D6
+0xA671	0xE6D7
+0xA672	0xE6D8
+0xA673	0xE6D9
+0xA674	0xE6DA
+0xA675	0xE6DB
+0xA676	0xE6DC
+0xA677	0xE6DD
+0xA678	0xE6DE
+0xA679	0xE6DF
+0xA67A	0xE6E0
+0xA67B	0xE6E1
+0xA67C	0xE6E2
+0xA67D	0xE6E3
+0xA67E	0xE6E4
+0xA680	0xE6E5
+0xA681	0xE6E6
+0xA682	0xE6E7
+0xA683	0xE6E8
+0xA684	0xE6E9
+0xA685	0xE6EA
+0xA686	0xE6EB
+0xA687	0xE6EC
+0xA688	0xE6ED
+0xA689	0xE6EE
+0xA68A	0xE6EF
+0xA68B	0xE6F0
+0xA68C	0xE6F1
+0xA68D	0xE6F2
+0xA68E	0xE6F3
+0xA68F	0xE6F4
+0xA690	0xE6F5
+0xA691	0xE6F6
+0xA692	0xE6F7
+0xA693	0xE6F8
+0xA694	0xE6F9
+0xA695	0xE6FA
+0xA696	0xE6FB
+0xA697	0xE6FC
+0xA698	0xE6FD
+0xA699	0xE6FE
+0xA69A	0xE6FF
+0xA69B	0xE700
+0xA69C	0xE701
+0xA69D	0xE702
+0xA69E	0xE703
+0xA69F	0xE704
+0xA6A0	0xE705
 0xA6A1	0x0391
 0xA6A2	0x0392
 0xA6A3	0x0393
@@ -7282,14 +7286,14 @@
 0xA6B6	0x03A7
 0xA6B7	0x03A8
 0xA6B8	0x03A9
-0xA6B9	0xE725
-0xA6BA	0xE726
-0xA6BB	0xE727
-0xA6BC	0xE728
-0xA6BD	0xE729
-0xA6BE	0xE72A
-0xA6BF	0xE72B
-0xA6C0	0xE72C
+0xA6B9	0xE785
+0xA6BA	0xE786
+0xA6BB	0xE787
+0xA6BC	0xE788
+0xA6BD	0xE789
+0xA6BE	0xE78A
+0xA6BF	0xE78B
+0xA6C0	0xE78C
 0xA6C1	0x03B1
 0xA6C2	0x03B2
 0xA6C3	0x03B3
@@ -7314,13 +7318,13 @@
 0xA6D6	0x03C7
 0xA6D7	0x03C8
 0xA6D8	0x03C9
-0xA6D9	0xE72D
-0xA6DA	0xE72E
-0xA6DB	0xE72F
-0xA6DC	0xE730
-0xA6DD	0xE731
-0xA6DE	0xE732
-0xA6DF	0xE733
+0xA6D9	0xE78D
+0xA6DA	0xE78E
+0xA6DB	0xE78F
+0xA6DC	0xE790
+0xA6DD	0xE791
+0xA6DE	0xE792
+0xA6DF	0xE793
 0xA6E0	0xFE35
 0xA6E1	0xFE36
 0xA6E2	0xFE39
@@ -7333,121 +7337,121 @@
 0xA6E9	0xFE42
 0xA6EA	0xFE43
 0xA6EB	0xFE44
-0xA6EC	0xE734
-0xA6ED	0xE735
+0xA6EC	0xE794
+0xA6ED	0xE795
 0xA6EE	0xFE3B
 0xA6EF	0xFE3C
 0xA6F0	0xFE37
 0xA6F1	0xFE38
 0xA6F2	0xFE31
-0xA6F3	0xE736
+0xA6F3	0xE796
 0xA6F4	0xFE33
 0xA6F5	0xFE34
-0xA6F6	0xE737
-0xA6F7	0xE738
-0xA6F8	0xE739
-0xA6F9	0xE73A
-0xA6FA	0xE73B
-0xA6FB	0xE73C
-0xA6FC	0xE73D
-0xA6FD	0xE73E
-0xA6FE	0xE73F
-0xA740	0xE740
-0xA741	0xE741
-0xA742	0xE742
-0xA743	0xE743
-0xA744	0xE744
-0xA745	0xE745
-0xA746	0xE746
-0xA747	0xE747
-0xA748	0xE748
-0xA749	0xE749
-0xA74A	0xE74A
-0xA74B	0xE74B
-0xA74C	0xE74C
-0xA74D	0xE74D
-0xA74E	0xE74E
-0xA74F	0xE74F
-0xA750	0xE750
-0xA751	0xE751
-0xA752	0xE752
-0xA753	0xE753
-0xA754	0xE754
-0xA755	0xE755
-0xA756	0xE756
-0xA757	0xE757
-0xA758	0xE758
-0xA759	0xE759
-0xA75A	0xE75A
-0xA75B	0xE75B
-0xA75C	0xE75C
-0xA75D	0xE75D
-0xA75E	0xE75E
-0xA75F	0xE75F
-0xA760	0xE760
-0xA761	0xE761
-0xA762	0xE762
-0xA763	0xE763
-0xA764	0xE764
-0xA765	0xE765
-0xA766	0xE766
-0xA767	0xE767
-0xA768	0xE768
-0xA769	0xE769
-0xA76A	0xE76A
-0xA76B	0xE76B
-0xA76C	0xE76C
-0xA76D	0xE76D
-0xA76E	0xE76E
-0xA76F	0xE76F
-0xA770	0xE770
-0xA771	0xE771
-0xA772	0xE772
-0xA773	0xE773
-0xA774	0xE774
-0xA775	0xE775
-0xA776	0xE776
-0xA777	0xE777
-0xA778	0xE778
-0xA779	0xE779
-0xA77A	0xE77A
-0xA77B	0xE77B
-0xA77C	0xE77C
-0xA77D	0xE77D
-0xA77E	0xE77E
-0xA780	0xE77F
-0xA781	0xE780
-0xA782	0xE781
-0xA783	0xE782
-0xA784	0xE783
-0xA785	0xE784
-0xA786	0xE785
-0xA787	0xE786
-0xA788	0xE787
-0xA789	0xE788
-0xA78A	0xE789
-0xA78B	0xE78A
-0xA78C	0xE78B
-0xA78D	0xE78C
-0xA78E	0xE78D
-0xA78F	0xE78E
-0xA790	0xE78F
-0xA791	0xE790
-0xA792	0xE791
-0xA793	0xE792
-0xA794	0xE793
-0xA795	0xE794
-0xA796	0xE795
-0xA797	0xE796
-0xA798	0xE797
-0xA799	0xE798
-0xA79A	0xE799
-0xA79B	0xE79A
-0xA79C	0xE79B
-0xA79D	0xE79C
-0xA79E	0xE79D
-0xA79F	0xE79E
-0xA7A0	0xE79F
+0xA6F6	0xE797
+0xA6F7	0xE798
+0xA6F8	0xE799
+0xA6F9	0xE79A
+0xA6FA	0xE79B
+0xA6FB	0xE79C
+0xA6FC	0xE79D
+0xA6FD	0xE79E
+0xA6FE	0xE79F
+0xA740	0xE706
+0xA741	0xE707
+0xA742	0xE708
+0xA743	0xE709
+0xA744	0xE70A
+0xA745	0xE70B
+0xA746	0xE70C
+0xA747	0xE70D
+0xA748	0xE70E
+0xA749	0xE70F
+0xA74A	0xE710
+0xA74B	0xE711
+0xA74C	0xE712
+0xA74D	0xE713
+0xA74E	0xE714
+0xA74F	0xE715
+0xA750	0xE716
+0xA751	0xE717
+0xA752	0xE718
+0xA753	0xE719
+0xA754	0xE71A
+0xA755	0xE71B
+0xA756	0xE71C
+0xA757	0xE71D
+0xA758	0xE71E
+0xA759	0xE71F
+0xA75A	0xE720
+0xA75B	0xE721
+0xA75C	0xE722
+0xA75D	0xE723
+0xA75E	0xE724
+0xA75F	0xE725
+0xA760	0xE726
+0xA761	0xE727
+0xA762	0xE728
+0xA763	0xE729
+0xA764	0xE72A
+0xA765	0xE72B
+0xA766	0xE72C
+0xA767	0xE72D
+0xA768	0xE72E
+0xA769	0xE72F
+0xA76A	0xE730
+0xA76B	0xE731
+0xA76C	0xE732
+0xA76D	0xE733
+0xA76E	0xE734
+0xA76F	0xE735
+0xA770	0xE736
+0xA771	0xE737
+0xA772	0xE738
+0xA773	0xE739
+0xA774	0xE73A
+0xA775	0xE73B
+0xA776	0xE73C
+0xA777	0xE73D
+0xA778	0xE73E
+0xA779	0xE73F
+0xA77A	0xE740
+0xA77B	0xE741
+0xA77C	0xE742
+0xA77D	0xE743
+0xA77E	0xE744
+0xA780	0xE745
+0xA781	0xE746
+0xA782	0xE747
+0xA783	0xE748
+0xA784	0xE749
+0xA785	0xE74A
+0xA786	0xE74B
+0xA787	0xE74C
+0xA788	0xE74D
+0xA789	0xE74E
+0xA78A	0xE74F
+0xA78B	0xE750
+0xA78C	0xE751
+0xA78D	0xE752
+0xA78E	0xE753
+0xA78F	0xE754
+0xA790	0xE755
+0xA791	0xE756
+0xA792	0xE757
+0xA793	0xE758
+0xA794	0xE759
+0xA795	0xE75A
+0xA796	0xE75B
+0xA797	0xE75C
+0xA798	0xE75D
+0xA799	0xE75E
+0xA79A	0xE75F
+0xA79B	0xE760
+0xA79C	0xE761
+0xA79D	0xE762
+0xA79E	0xE763
+0xA79F	0xE764
+0xA7A0	0xE765
 0xA7A1	0x0410
 0xA7A2	0x0411
 0xA7A3	0x0412
--- a/jdk/make/tools/CharsetMapping/MS936.map	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/make/tools/CharsetMapping/MS936.map	Fri Jun 08 12:44:30 2012 -0700
@@ -1,31 +1,8 @@
-# Copy/pasted from MS936.b2c
 #
-# This table comes from MS CP936 table posted on unicode.org webpage
-# with the modifications of 
+# This table comes from MultiByteToWideChar, the only entry
+# not included is
 #
-# (1)added Euro sign
-#      0x80 - 0x20ac
-# (2)removed DBCS lead byte entries 
-#      0x80 - 0xff  
-# (3)added GBK UDC block (1894)
-#      0xAAA1 - 0xAFFE  U+E000 - U+E233
-#      0xF8A1 - 0xFEFE  U+E234 - U+E4C5
-#      0xA140 - 0xA7A0  U+E4C6 - U+E79F
-# (4)added Microsoft defined "not GBK" EUDC
-#     a:  u+E586 - u+E591
-#     b:  u+E652 - u+E65C 
-#     c:  u+E6BD - u+E6C4
-#     d:  u+E725 - u+E73F
-#     e:  u+E7A0 - u+E864
-# 
-#    Mapping of (3) and (4) comes from Masayuki Fuse at FUSE@jp.ibm.com
-#
-#    Format: Three tab-separated columns
-#        Column #1 is the cp936 code (in hex)
-#        Column #2 is the Unicode (in hex as 0xXXXX)
-#        Column #3 is the Unicode name (follows a comment sign, '#')
-#
-#    The entries are in unicode order
+# 0xFF	0xF8F5
 #
 0x00	0x0000
 0x01	0x0001
@@ -6533,12 +6510,12 @@
 0xA2A8	0x2177  #SMALL ROMAN NUMERAL EIGHT
 0xA2A9	0x2178  #SMALL ROMAN NUMERAL NINE
 0xA2AA	0x2179  #SMALL ROMAN NUMERAL TEN
-0xA2AB  0xE586  #PRIVATE USE AREA-E586
-0xA2AC  0xE587  #PRIVATE USE AREA-E587
-0xA2AD  0xE588  #PRIVATE USE AREA-E588
-0xA2AE  0xE589  #PRIVATE USE AREA-E589
-0xA2AF  0xE58A  #PRIVATE USE AREA-E58A
-0xA2B0  0xE58B  #PRIVATE USE AREA-E58B
+0xA2AB  0xE766  #PRIVATE USE AREA-E766
+0xA2AC  0xE767  #PRIVATE USE AREA-E767
+0xA2AD  0xE768  #PRIVATE USE AREA-E768
+0xA2AE  0xE769  #PRIVATE USE AREA-E769
+0xA2AF  0xE76A  #PRIVATE USE AREA-E76A
+0xA2B0  0xE76B  #PRIVATE USE AREA-E76B
 0xA2B1	0x2488  #DIGIT ONE FULL STOP
 0xA2B2	0x2489  #DIGIT TWO FULL STOP
 0xA2B3	0x248A  #DIGIT THREE FULL STOP
@@ -6589,8 +6566,8 @@
 0xA2E0	0x2467  #CIRCLED DIGIT EIGHT
 0xA2E1	0x2468  #CIRCLED DIGIT NINE
 0xA2E2	0x2469  #CIRCLED NUMBER TEN
-0xA2E3  0xE58C  #PRIVATE USE AREA-E58C
-0xA2E4  0xE58D  #PRIVATE USE AREA-E58D
+0xA2E3  0xE76C  #PRIVATE USE AREA-E76C
+0xA2E4  0xE76D  #PRIVATE USE AREA-E76D
 0xA2E5	0x3220  #PARENTHESIZED IDEOGRAPH ONE
 0xA2E6	0x3221  #PARENTHESIZED IDEOGRAPH TWO
 0xA2E7	0x3222  #PARENTHESIZED IDEOGRAPH THREE
@@ -6601,8 +6578,8 @@
 0xA2EC	0x3227  #PARENTHESIZED IDEOGRAPH EIGHT
 0xA2ED	0x3228  #PARENTHESIZED IDEOGRAPH NINE
 0xA2EE	0x3229  #PARENTHESIZED IDEOGRAPH TEN
-0xA2EF  0xE58E  #PRIVATE USE AREA-E58E
-0xA2F0  0xE58F  #PRIVATE USE AREA-E58F
+0xA2EF  0xE76E  #PRIVATE USE AREA-E76E
+0xA2F0  0xE76F  #PRIVATE USE AREA-E76F
 0xA2F1	0x2160  #ROMAN NUMERAL ONE
 0xA2F2	0x2161  #ROMAN NUMERAL TWO
 0xA2F3	0x2162  #ROMAN NUMERAL THREE
@@ -6615,104 +6592,104 @@
 0xA2FA	0x2169  #ROMAN NUMERAL TEN
 0xA2FB	0x216A  #ROMAN NUMERAL ELEVEN
 0xA2FC	0x216B  #ROMAN NUMERAL TWELVE
-0xA2FD  0xE590  #PRIVATE USE AREA-E590
-0xA2FE  0xE591  #PRIVATE USE AREA-E591
-0xA340  0xE592  #PRIVATE USE AREA-E592
-0xA341  0xE593  #PRIVATE USE AREA-E593
-0xA342  0xE594  #PRIVATE USE AREA-E594
-0xA343  0xE595  #PRIVATE USE AREA-E595
-0xA344  0xE596  #PRIVATE USE AREA-E596
-0xA345  0xE597  #PRIVATE USE AREA-E597
-0xA346  0xE598  #PRIVATE USE AREA-E598
-0xA347  0xE599  #PRIVATE USE AREA-E599
-0xA348  0xE59A  #PRIVATE USE AREA-E59A
-0xA349  0xE59B  #PRIVATE USE AREA-E59B
-0xA34A  0xE59C  #PRIVATE USE AREA-E59C
-0xA34B  0xE59D  #PRIVATE USE AREA-E59D
-0xA34C  0xE59E  #PRIVATE USE AREA-E59E
-0xA34D  0xE59F  #PRIVATE USE AREA-E59F
-0xA34E  0xE5A0  #PRIVATE USE AREA-E5A0
-0xA34F  0xE5A1  #PRIVATE USE AREA-E5A1
-0xA350  0xE5A2  #PRIVATE USE AREA-E5A2
-0xA351  0xE5A3  #PRIVATE USE AREA-E5A3
-0xA352  0xE5A4  #PRIVATE USE AREA-E5A4
-0xA353  0xE5A5  #PRIVATE USE AREA-E5A5
-0xA354  0xE5A6  #PRIVATE USE AREA-E5A6
-0xA355  0xE5A7  #PRIVATE USE AREA-E5A7
-0xA356  0xE5A8  #PRIVATE USE AREA-E5A8
-0xA357  0xE5A9  #PRIVATE USE AREA-E5A9
-0xA358  0xE5AA  #PRIVATE USE AREA-E5AA
-0xA359  0xE5AB  #PRIVATE USE AREA-E5AB
-0xA35A  0xE5AC  #PRIVATE USE AREA-E5AC
-0xA35B  0xE5AD  #PRIVATE USE AREA-E5AD
-0xA35C  0xE5AE  #PRIVATE USE AREA-E5AE
-0xA35D  0xE5AF  #PRIVATE USE AREA-E5AF
-0xA35E  0xE5B0  #PRIVATE USE AREA-E5B0
-0xA35F  0xE5B1  #PRIVATE USE AREA-E5B1
-0xA360  0xE5B2  #PRIVATE USE AREA-E5B2
-0xA361  0xE5B3  #PRIVATE USE AREA-E5B3
-0xA362  0xE5B4  #PRIVATE USE AREA-E5B4
-0xA363  0xE5B5  #PRIVATE USE AREA-E5B5
-0xA364  0xE5B6  #PRIVATE USE AREA-E5B6
-0xA365  0xE5B7  #PRIVATE USE AREA-E5B7
-0xA366  0xE5B8  #PRIVATE USE AREA-E5B8
-0xA367  0xE5B9  #PRIVATE USE AREA-E5B9
-0xA368  0xE5BA  #PRIVATE USE AREA-E5BA
-0xA369  0xE5BB  #PRIVATE USE AREA-E5BB
-0xA36A  0xE5BC  #PRIVATE USE AREA-E5BC
-0xA36B  0xE5BD  #PRIVATE USE AREA-E5BD
-0xA36C  0xE5BE  #PRIVATE USE AREA-E5BE
-0xA36D  0xE5BF  #PRIVATE USE AREA-E5BF
-0xA36E  0xE5C0  #PRIVATE USE AREA-E5C0
-0xA36F  0xE5C1  #PRIVATE USE AREA-E5C1
-0xA370  0xE5C2  #PRIVATE USE AREA-E5C2
-0xA371  0xE5C3  #PRIVATE USE AREA-E5C3
-0xA372  0xE5C4  #PRIVATE USE AREA-E5C4
-0xA373  0xE5C5  #PRIVATE USE AREA-E5C5
-0xA374  0xE5C6  #PRIVATE USE AREA-E5C6
-0xA375  0xE5C7  #PRIVATE USE AREA-E5C7
-0xA376  0xE5C8  #PRIVATE USE AREA-E5C8
-0xA377  0xE5C9  #PRIVATE USE AREA-E5C9
-0xA378  0xE5CA  #PRIVATE USE AREA-E5CA
-0xA379  0xE5CB  #PRIVATE USE AREA-E5CB
-0xA37A  0xE5CC  #PRIVATE USE AREA-E5CC
-0xA37B  0xE5CD  #PRIVATE USE AREA-E5CD
-0xA37C  0xE5CE  #PRIVATE USE AREA-E5CE
-0xA37D  0xE5CF  #PRIVATE USE AREA-E5CF
-0xA37E  0xE5D0  #PRIVATE USE AREA-E5D0
-0xA380  0xE5D1  #PRIVATE USE AREA-E5D1
-0xA381  0xE5D2  #PRIVATE USE AREA-E5D2
-0xA382  0xE5D3  #PRIVATE USE AREA-E5D3
-0xA383  0xE5D4  #PRIVATE USE AREA-E5D4
-0xA384  0xE5D5  #PRIVATE USE AREA-E5D5
-0xA385  0xE5D6  #PRIVATE USE AREA-E5D6
-0xA386  0xE5D7  #PRIVATE USE AREA-E5D7
-0xA387  0xE5D8  #PRIVATE USE AREA-E5D8
-0xA388  0xE5D9  #PRIVATE USE AREA-E5D9
-0xA389  0xE5DA  #PRIVATE USE AREA-E5DA
-0xA38A  0xE5DB  #PRIVATE USE AREA-E5DB
-0xA38B  0xE5DC  #PRIVATE USE AREA-E5DC
-0xA38C  0xE5DD  #PRIVATE USE AREA-E5DD
-0xA38D  0xE5DE  #PRIVATE USE AREA-E5DE
-0xA38E  0xE5DF  #PRIVATE USE AREA-E5DF
-0xA38F  0xE5E0  #PRIVATE USE AREA-E5E0
-0xA390  0xE5E1  #PRIVATE USE AREA-E5E1
-0xA391  0xE5E2  #PRIVATE USE AREA-E5E2
-0xA392  0xE5E3  #PRIVATE USE AREA-E5E3
-0xA393  0xE5E4  #PRIVATE USE AREA-E5E4
-0xA394  0xE5E5  #PRIVATE USE AREA-E5E5
-0xA395  0xE5E6  #PRIVATE USE AREA-E5E6
-0xA396  0xE5E7  #PRIVATE USE AREA-E5E7
-0xA397  0xE5E8  #PRIVATE USE AREA-E5E8
-0xA398  0xE5E9  #PRIVATE USE AREA-E5E9
-0xA399  0xE5EA  #PRIVATE USE AREA-E5EA
-0xA39A  0xE5EB  #PRIVATE USE AREA-E5EB
-0xA39B  0xE5EC  #PRIVATE USE AREA-E5EC
-0xA39C  0xE5ED  #PRIVATE USE AREA-E5ED
-0xA39D  0xE5EE  #PRIVATE USE AREA-E5EE
-0xA39E  0xE5EF  #PRIVATE USE AREA-E5EF
-0xA39F  0xE5F0  #PRIVATE USE AREA-E5F0
-0xA3A0  0xE5F1  #PRIVATE USE AREA-E5F1
+0xA2FD  0xE770  #PRIVATE USE AREA-E770
+0xA2FE  0xE771  #PRIVATE USE AREA-E771
+0xA340  0xE586  #PRIVATE USE AREA-E586
+0xA341  0xE587  #PRIVATE USE AREA-E587
+0xA342  0xE588  #PRIVATE USE AREA-E588
+0xA343  0xE589  #PRIVATE USE AREA-E589
+0xA344  0xE58A  #PRIVATE USE AREA-E58A
+0xA345  0xE58B  #PRIVATE USE AREA-E58B
+0xA346  0xE58C  #PRIVATE USE AREA-E58C
+0xA347  0xE58D  #PRIVATE USE AREA-E58D
+0xA348  0xE58E  #PRIVATE USE AREA-E58E
+0xA349  0xE58F  #PRIVATE USE AREA-E58F
+0xA34A  0xE590  #PRIVATE USE AREA-E590
+0xA34B  0xE591  #PRIVATE USE AREA-E591
+0xA34C  0xE592  #PRIVATE USE AREA-E592
+0xA34D  0xE593  #PRIVATE USE AREA-E593
+0xA34E  0xE594  #PRIVATE USE AREA-E594
+0xA34F  0xE595  #PRIVATE USE AREA-E595
+0xA350  0xE596  #PRIVATE USE AREA-E596
+0xA351  0xE597  #PRIVATE USE AREA-E597
+0xA352  0xE598  #PRIVATE USE AREA-E598
+0xA353  0xE599  #PRIVATE USE AREA-E599
+0xA354  0xE59A  #PRIVATE USE AREA-E59A
+0xA355  0xE59B  #PRIVATE USE AREA-E59B
+0xA356  0xE59C  #PRIVATE USE AREA-E59C
+0xA357  0xE59D  #PRIVATE USE AREA-E59D
+0xA358  0xE59E  #PRIVATE USE AREA-E59E
+0xA359  0xE59F  #PRIVATE USE AREA-E59F
+0xA35A  0xE5A0  #PRIVATE USE AREA-E5A0
+0xA35B  0xE5A1  #PRIVATE USE AREA-E5A1
+0xA35C  0xE5A2  #PRIVATE USE AREA-E5A2
+0xA35D  0xE5A3  #PRIVATE USE AREA-E5A3
+0xA35E  0xE5A4  #PRIVATE USE AREA-E5A4
+0xA35F  0xE5A5  #PRIVATE USE AREA-E5A5
+0xA360  0xE5A6  #PRIVATE USE AREA-E5A6
+0xA361  0xE5A7  #PRIVATE USE AREA-E5A7
+0xA362  0xE5A8  #PRIVATE USE AREA-E5A8
+0xA363  0xE5A9  #PRIVATE USE AREA-E5A9
+0xA364  0xE5AA  #PRIVATE USE AREA-E5AA
+0xA365  0xE5AB  #PRIVATE USE AREA-E5AB
+0xA366  0xE5AC  #PRIVATE USE AREA-E5AC
+0xA367  0xE5AD  #PRIVATE USE AREA-E5AD
+0xA368  0xE5AE  #PRIVATE USE AREA-E5AE
+0xA369  0xE5AF  #PRIVATE USE AREA-E5AF
+0xA36A  0xE5B0  #PRIVATE USE AREA-E5B0
+0xA36B  0xE5B1  #PRIVATE USE AREA-E5B1
+0xA36C  0xE5B2  #PRIVATE USE AREA-E5B2
+0xA36D  0xE5B3  #PRIVATE USE AREA-E5B3
+0xA36E  0xE5B4  #PRIVATE USE AREA-E5B4
+0xA36F  0xE5B5  #PRIVATE USE AREA-E5B5
+0xA370  0xE5B6  #PRIVATE USE AREA-E5B6
+0xA371  0xE5B7  #PRIVATE USE AREA-E5B7
+0xA372  0xE5B8  #PRIVATE USE AREA-E5B8
+0xA373  0xE5B9  #PRIVATE USE AREA-E5B9
+0xA374  0xE5BA  #PRIVATE USE AREA-E5BA
+0xA375  0xE5BB  #PRIVATE USE AREA-E5BB
+0xA376  0xE5BC  #PRIVATE USE AREA-E5BC
+0xA377  0xE5BD  #PRIVATE USE AREA-E5BD
+0xA378  0xE5BE  #PRIVATE USE AREA-E5BE
+0xA379  0xE5BF  #PRIVATE USE AREA-E5BF
+0xA37A  0xE5C0  #PRIVATE USE AREA-E5C0
+0xA37B  0xE5C1  #PRIVATE USE AREA-E5C1
+0xA37C  0xE5C2  #PRIVATE USE AREA-E5C2
+0xA37D  0xE5C3  #PRIVATE USE AREA-E5C3
+0xA37E  0xE5C4  #PRIVATE USE AREA-E5C4
+0xA380  0xE5C5  #PRIVATE USE AREA-E5C5
+0xA381  0xE5C6  #PRIVATE USE AREA-E5C6
+0xA382  0xE5C7  #PRIVATE USE AREA-E5C7
+0xA383  0xE5C8  #PRIVATE USE AREA-E5C8
+0xA384  0xE5C9  #PRIVATE USE AREA-E5C9
+0xA385  0xE5CA  #PRIVATE USE AREA-E5CA
+0xA386  0xE5CB  #PRIVATE USE AREA-E5CB
+0xA387  0xE5CC  #PRIVATE USE AREA-E5CC
+0xA388  0xE5CD  #PRIVATE USE AREA-E5CD
+0xA389  0xE5CE  #PRIVATE USE AREA-E5CE
+0xA38A  0xE5CF  #PRIVATE USE AREA-E5CF
+0xA38B  0xE5D0  #PRIVATE USE AREA-E5D0
+0xA38C  0xE5D1  #PRIVATE USE AREA-E5D1
+0xA38D  0xE5D2  #PRIVATE USE AREA-E5D2
+0xA38E  0xE5D3  #PRIVATE USE AREA-E5D3
+0xA38F  0xE5D4  #PRIVATE USE AREA-E5D4
+0xA390  0xE5D5  #PRIVATE USE AREA-E5D5
+0xA391  0xE5D6  #PRIVATE USE AREA-E5D6
+0xA392  0xE5D7  #PRIVATE USE AREA-E5D7
+0xA393  0xE5D8  #PRIVATE USE AREA-E5D8
+0xA394  0xE5D9  #PRIVATE USE AREA-E5D9
+0xA395  0xE5DA  #PRIVATE USE AREA-E5DA
+0xA396  0xE5DB  #PRIVATE USE AREA-E5DB
+0xA397  0xE5DC  #PRIVATE USE AREA-E5DC
+0xA398  0xE5DD  #PRIVATE USE AREA-E5DD
+0xA399  0xE5DE  #PRIVATE USE AREA-E5DE
+0xA39A  0xE5DF  #PRIVATE USE AREA-E5DF
+0xA39B  0xE5E0  #PRIVATE USE AREA-E5E0
+0xA39C  0xE5E1  #PRIVATE USE AREA-E5E1
+0xA39D  0xE5E2  #PRIVATE USE AREA-E5E2
+0xA39E  0xE5E3  #PRIVATE USE AREA-E5E3
+0xA39F  0xE5E4  #PRIVATE USE AREA-E5E4
+0xA3A0  0xE5E5  #PRIVATE USE AREA-E5E5
 0xA3A1	0xFF01  #FULLWIDTH EXCLAMATION MARK
 0xA3A2	0xFF02  #FULLWIDTH QUOTATION MARK
 0xA3A3	0xFF03  #FULLWIDTH NUMBER SIGN
@@ -6807,102 +6784,102 @@
 0xA3FC	0xFF5C  #FULLWIDTH VERTICAL LINE
 0xA3FD	0xFF5D  #FULLWIDTH RIGHT CURLY BRACKET
 0xA3FE	0xFFE3  #FULLWIDTH MACRON
-0xA440  0xE5F2  #PRIVATE USE AREA-E5F2
-0xA441  0xE5F3  #PRIVATE USE AREA-E5F3
-0xA442  0xE5F4  #PRIVATE USE AREA-E5F4
-0xA443  0xE5F5  #PRIVATE USE AREA-E5F5
-0xA444  0xE5F6  #PRIVATE USE AREA-E5F6
-0xA445  0xE5F7  #PRIVATE USE AREA-E5F7
-0xA446  0xE5F8  #PRIVATE USE AREA-E5F8
-0xA447  0xE5F9  #PRIVATE USE AREA-E5F9
-0xA448  0xE5FA  #PRIVATE USE AREA-E5FA
-0xA449  0xE5FB  #PRIVATE USE AREA-E5FB
-0xA44A  0xE5FC  #PRIVATE USE AREA-E5FC
-0xA44B  0xE5FD  #PRIVATE USE AREA-E5FD
-0xA44C  0xE5FE  #PRIVATE USE AREA-E5FE
-0xA44D  0xE5FF  #PRIVATE USE AREA-E5FF
-0xA44E  0xE600  #PRIVATE USE AREA-E600
-0xA44F  0xE601  #PRIVATE USE AREA-E601
-0xA450  0xE602  #PRIVATE USE AREA-E602
-0xA451  0xE603  #PRIVATE USE AREA-E603
-0xA452  0xE604  #PRIVATE USE AREA-E604
-0xA453  0xE605  #PRIVATE USE AREA-E605
-0xA454  0xE606  #PRIVATE USE AREA-E606
-0xA455  0xE607  #PRIVATE USE AREA-E607
-0xA456  0xE608  #PRIVATE USE AREA-E608
-0xA457  0xE609  #PRIVATE USE AREA-E609
-0xA458  0xE60A  #PRIVATE USE AREA-E60A
-0xA459  0xE60B  #PRIVATE USE AREA-E60B
-0xA45A  0xE60C  #PRIVATE USE AREA-E60C
-0xA45B  0xE60D  #PRIVATE USE AREA-E60D
-0xA45C  0xE60E  #PRIVATE USE AREA-E60E
-0xA45D  0xE60F  #PRIVATE USE AREA-E60F
-0xA45E  0xE610  #PRIVATE USE AREA-E610
-0xA45F  0xE611  #PRIVATE USE AREA-E611
-0xA460  0xE612  #PRIVATE USE AREA-E612
-0xA461  0xE613  #PRIVATE USE AREA-E613
-0xA462  0xE614  #PRIVATE USE AREA-E614
-0xA463  0xE615  #PRIVATE USE AREA-E615
-0xA464  0xE616  #PRIVATE USE AREA-E616
-0xA465  0xE617  #PRIVATE USE AREA-E617
-0xA466  0xE618  #PRIVATE USE AREA-E618
-0xA467  0xE619  #PRIVATE USE AREA-E619
-0xA468  0xE61A  #PRIVATE USE AREA-E61A
-0xA469  0xE61B  #PRIVATE USE AREA-E61B
-0xA46A  0xE61C  #PRIVATE USE AREA-E61C
-0xA46B  0xE61D  #PRIVATE USE AREA-E61D
-0xA46C  0xE61E  #PRIVATE USE AREA-E61E
-0xA46D  0xE61F  #PRIVATE USE AREA-E61F
-0xA46E  0xE620  #PRIVATE USE AREA-E620
-0xA46F  0xE621  #PRIVATE USE AREA-E621
-0xA470  0xE622  #PRIVATE USE AREA-E622
-0xA471  0xE623  #PRIVATE USE AREA-E623
-0xA472  0xE624  #PRIVATE USE AREA-E624
-0xA473  0xE625  #PRIVATE USE AREA-E625
-0xA474  0xE626  #PRIVATE USE AREA-E626
-0xA475  0xE627  #PRIVATE USE AREA-E627
-0xA476  0xE628  #PRIVATE USE AREA-E628
-0xA477  0xE629  #PRIVATE USE AREA-E629
-0xA478  0xE62A  #PRIVATE USE AREA-E62A
-0xA479  0xE62B  #PRIVATE USE AREA-E62B
-0xA47A  0xE62C  #PRIVATE USE AREA-E62C
-0xA47B  0xE62D  #PRIVATE USE AREA-E62D
-0xA47C  0xE62E  #PRIVATE USE AREA-E62E
-0xA47D  0xE62F  #PRIVATE USE AREA-E62F
-0xA47E  0xE630  #PRIVATE USE AREA-E630
-0xA480  0xE631  #PRIVATE USE AREA-E631
-0xA481  0xE632  #PRIVATE USE AREA-E632
-0xA482  0xE633  #PRIVATE USE AREA-E633
-0xA483  0xE634  #PRIVATE USE AREA-E634
-0xA484  0xE635  #PRIVATE USE AREA-E635
-0xA485  0xE636  #PRIVATE USE AREA-E636
-0xA486  0xE637  #PRIVATE USE AREA-E637
-0xA487  0xE638  #PRIVATE USE AREA-E638
-0xA488  0xE639  #PRIVATE USE AREA-E639
-0xA489  0xE63A  #PRIVATE USE AREA-E63A
-0xA48A  0xE63B  #PRIVATE USE AREA-E63B
-0xA48B  0xE63C  #PRIVATE USE AREA-E63C
-0xA48C  0xE63D  #PRIVATE USE AREA-E63D
-0xA48D  0xE63E  #PRIVATE USE AREA-E63E
-0xA48E  0xE63F  #PRIVATE USE AREA-E63F
-0xA48F  0xE640  #PRIVATE USE AREA-E640
-0xA490  0xE641  #PRIVATE USE AREA-E641
-0xA491  0xE642  #PRIVATE USE AREA-E642
-0xA492  0xE643  #PRIVATE USE AREA-E643
-0xA493  0xE644  #PRIVATE USE AREA-E644
-0xA494  0xE645  #PRIVATE USE AREA-E645
-0xA495  0xE646  #PRIVATE USE AREA-E646
-0xA496  0xE647  #PRIVATE USE AREA-E647
-0xA497  0xE648  #PRIVATE USE AREA-E648
-0xA498  0xE649  #PRIVATE USE AREA-E649
-0xA499  0xE64A  #PRIVATE USE AREA-E64A
-0xA49A  0xE64B  #PRIVATE USE AREA-E64B
-0xA49B  0xE64C  #PRIVATE USE AREA-E64C
-0xA49C  0xE64D  #PRIVATE USE AREA-E64D
-0xA49D  0xE64E  #PRIVATE USE AREA-E64E
-0xA49E  0xE64F  #PRIVATE USE AREA-E64F
-0xA49F  0xE650  #PRIVATE USE AREA-E650
-0xA4A0  0xE651  #PRIVATE USE AREA-E651
+0xA440  0xE5E6  #PRIVATE USE AREA-E5E6
+0xA441  0xE5E7  #PRIVATE USE AREA-E5E7
+0xA442  0xE5E8  #PRIVATE USE AREA-E5E8
+0xA443  0xE5E9  #PRIVATE USE AREA-E5E9
+0xA444  0xE5EA  #PRIVATE USE AREA-E5EA
+0xA445  0xE5EB  #PRIVATE USE AREA-E5EB
+0xA446  0xE5EC  #PRIVATE USE AREA-E5EC
+0xA447  0xE5ED  #PRIVATE USE AREA-E5ED
+0xA448  0xE5EE  #PRIVATE USE AREA-E5EE
+0xA449  0xE5EF  #PRIVATE USE AREA-E5EF
+0xA44A  0xE5F0  #PRIVATE USE AREA-E5F0
+0xA44B  0xE5F1  #PRIVATE USE AREA-E5F1
+0xA44C  0xE5F2  #PRIVATE USE AREA-E5F2
+0xA44D  0xE5F3  #PRIVATE USE AREA-E5F3
+0xA44E  0xE5F4  #PRIVATE USE AREA-E5F4
+0xA44F  0xE5F5  #PRIVATE USE AREA-E5F5
+0xA450  0xE5F6  #PRIVATE USE AREA-E5F6
+0xA451  0xE5F7  #PRIVATE USE AREA-E5F7
+0xA452  0xE5F8  #PRIVATE USE AREA-E5F8
+0xA453  0xE5F9  #PRIVATE USE AREA-E5F9
+0xA454  0xE5FA  #PRIVATE USE AREA-E5FA
+0xA455  0xE5FB  #PRIVATE USE AREA-E5FB
+0xA456  0xE5FC  #PRIVATE USE AREA-E5FC
+0xA457  0xE5FD  #PRIVATE USE AREA-E5FD
+0xA458  0xE5FE  #PRIVATE USE AREA-E5FE
+0xA459  0xE5FF  #PRIVATE USE AREA-E5FF
+0xA45A  0xE600  #PRIVATE USE AREA-E600
+0xA45B  0xE601  #PRIVATE USE AREA-E601
+0xA45C  0xE602  #PRIVATE USE AREA-E602
+0xA45D  0xE603  #PRIVATE USE AREA-E603
+0xA45E  0xE604  #PRIVATE USE AREA-E604
+0xA45F  0xE605  #PRIVATE USE AREA-E605
+0xA460  0xE606  #PRIVATE USE AREA-E606
+0xA461  0xE607  #PRIVATE USE AREA-E607
+0xA462  0xE608  #PRIVATE USE AREA-E608
+0xA463  0xE609  #PRIVATE USE AREA-E609
+0xA464  0xE60A  #PRIVATE USE AREA-E60A
+0xA465  0xE60B  #PRIVATE USE AREA-E60B
+0xA466  0xE60C  #PRIVATE USE AREA-E60C
+0xA467  0xE60D  #PRIVATE USE AREA-E60D
+0xA468  0xE60E  #PRIVATE USE AREA-E60E
+0xA469  0xE60F  #PRIVATE USE AREA-E60F
+0xA46A  0xE610  #PRIVATE USE AREA-E610
+0xA46B  0xE611  #PRIVATE USE AREA-E611
+0xA46C  0xE612  #PRIVATE USE AREA-E612
+0xA46D  0xE613  #PRIVATE USE AREA-E613
+0xA46E  0xE614  #PRIVATE USE AREA-E614
+0xA46F  0xE615  #PRIVATE USE AREA-E615
+0xA470  0xE616  #PRIVATE USE AREA-E616
+0xA471  0xE617  #PRIVATE USE AREA-E617
+0xA472  0xE618  #PRIVATE USE AREA-E618
+0xA473  0xE619  #PRIVATE USE AREA-E619
+0xA474  0xE61A  #PRIVATE USE AREA-E61A
+0xA475  0xE61B  #PRIVATE USE AREA-E61B
+0xA476  0xE61C  #PRIVATE USE AREA-E61C
+0xA477  0xE61D  #PRIVATE USE AREA-E61D
+0xA478  0xE61E  #PRIVATE USE AREA-E61E
+0xA479  0xE61F  #PRIVATE USE AREA-E61F
+0xA47A  0xE620  #PRIVATE USE AREA-E620
+0xA47B  0xE621  #PRIVATE USE AREA-E621
+0xA47C  0xE622  #PRIVATE USE AREA-E622
+0xA47D  0xE623  #PRIVATE USE AREA-E623
+0xA47E  0xE624  #PRIVATE USE AREA-E624
+0xA480  0xE625  #PRIVATE USE AREA-E625
+0xA481  0xE626  #PRIVATE USE AREA-E626
+0xA482  0xE627  #PRIVATE USE AREA-E627
+0xA483  0xE628  #PRIVATE USE AREA-E628
+0xA484  0xE629  #PRIVATE USE AREA-E629
+0xA485  0xE62A  #PRIVATE USE AREA-E62A
+0xA486  0xE62B  #PRIVATE USE AREA-E62B
+0xA487  0xE62C  #PRIVATE USE AREA-E62C
+0xA488  0xE62D  #PRIVATE USE AREA-E62D
+0xA489  0xE62E  #PRIVATE USE AREA-E62E
+0xA48A  0xE62F  #PRIVATE USE AREA-E62F
+0xA48B  0xE630  #PRIVATE USE AREA-E630
+0xA48C  0xE631  #PRIVATE USE AREA-E631
+0xA48D  0xE632  #PRIVATE USE AREA-E632
+0xA48E  0xE633  #PRIVATE USE AREA-E633
+0xA48F  0xE634  #PRIVATE USE AREA-E634
+0xA490  0xE635  #PRIVATE USE AREA-E635
+0xA491  0xE636  #PRIVATE USE AREA-E636
+0xA492  0xE637  #PRIVATE USE AREA-E637
+0xA493  0xE638  #PRIVATE USE AREA-E638
+0xA494  0xE639  #PRIVATE USE AREA-E639
+0xA495  0xE63A  #PRIVATE USE AREA-E63A
+0xA496  0xE63B  #PRIVATE USE AREA-E63B
+0xA497  0xE63C  #PRIVATE USE AREA-E63C
+0xA498  0xE63D  #PRIVATE USE AREA-E63D
+0xA499  0xE63E  #PRIVATE USE AREA-E63E
+0xA49A  0xE63F  #PRIVATE USE AREA-E63F
+0xA49B  0xE640  #PRIVATE USE AREA-E640
+0xA49C  0xE641  #PRIVATE USE AREA-E641
+0xA49D  0xE642  #PRIVATE USE AREA-E642
+0xA49E  0xE643  #PRIVATE USE AREA-E643
+0xA49F  0xE644  #PRIVATE USE AREA-E644
+0xA4A0  0xE645  #PRIVATE USE AREA-E645
 0xA4A1	0x3041  #HIRAGANA LETTER SMALL A
 0xA4A2	0x3042  #HIRAGANA LETTER A
 0xA4A3	0x3043  #HIRAGANA LETTER SMALL I
@@ -6986,113 +6963,113 @@
 0xA4F1	0x3091  #HIRAGANA LETTER WE
 0xA4F2	0x3092  #HIRAGANA LETTER WO
 0xA4F3	0x3093  #HIRAGANA LETTER N
-0xA4F4  0xE652  #PRIVATE USE AREA-E652
-0xA4F5  0xE653  #PRIVATE USE AREA-E653
-0xA4F6  0xE654  #PRIVATE USE AREA-E654
-0xA4F7  0xE655  #PRIVATE USE AREA-E655
-0xA4F8  0xE656  #PRIVATE USE AREA-E656
-0xA4F9  0xE657  #PRIVATE USE AREA-E657
-0xA4FA  0xE658  #PRIVATE USE AREA-E658
-0xA4FB  0xE659  #PRIVATE USE AREA-E659
-0xA4FC  0xE65A  #PRIVATE USE AREA-E65A
-0xA4FD  0xE65B  #PRIVATE USE AREA-E65B
-0xA4FE  0xE65C  #PRIVATE USE AREA-E65C
-0xA540  0xE65D  #PRIVATE USE AREA-E65D
-0xA541  0xE65E  #PRIVATE USE AREA-E65E
-0xA542  0xE65F  #PRIVATE USE AREA-E65F
-0xA543  0xE660  #PRIVATE USE AREA-E660
-0xA544  0xE661  #PRIVATE USE AREA-E661
-0xA545  0xE662  #PRIVATE USE AREA-E662
-0xA546  0xE663  #PRIVATE USE AREA-E663
-0xA547  0xE664  #PRIVATE USE AREA-E664
-0xA548  0xE665  #PRIVATE USE AREA-E665
-0xA549  0xE666  #PRIVATE USE AREA-E666
-0xA54A  0xE667  #PRIVATE USE AREA-E667
-0xA54B  0xE668  #PRIVATE USE AREA-E668
-0xA54C  0xE669  #PRIVATE USE AREA-E669
-0xA54D  0xE66A  #PRIVATE USE AREA-E66A
-0xA54E  0xE66B  #PRIVATE USE AREA-E66B
-0xA54F  0xE66C  #PRIVATE USE AREA-E66C
-0xA550  0xE66D  #PRIVATE USE AREA-E66D
-0xA551  0xE66E  #PRIVATE USE AREA-E66E
-0xA552  0xE66F  #PRIVATE USE AREA-E66F
-0xA553  0xE670  #PRIVATE USE AREA-E670
-0xA554  0xE671  #PRIVATE USE AREA-E671
-0xA555  0xE672  #PRIVATE USE AREA-E672
-0xA556  0xE673  #PRIVATE USE AREA-E673
-0xA557  0xE674  #PRIVATE USE AREA-E674
-0xA558  0xE675  #PRIVATE USE AREA-E675
-0xA559  0xE676  #PRIVATE USE AREA-E676
-0xA55A  0xE677  #PRIVATE USE AREA-E677
-0xA55B  0xE678  #PRIVATE USE AREA-E678
-0xA55C  0xE679  #PRIVATE USE AREA-E679
-0xA55D  0xE67A  #PRIVATE USE AREA-E67A
-0xA55E  0xE67B  #PRIVATE USE AREA-E67B
-0xA55F  0xE67C  #PRIVATE USE AREA-E67C
-0xA560  0xE67D  #PRIVATE USE AREA-E67D
-0xA561  0xE67E  #PRIVATE USE AREA-E67E
-0xA562  0xE67F  #PRIVATE USE AREA-E67F
-0xA563  0xE680  #PRIVATE USE AREA-E680
-0xA564  0xE681  #PRIVATE USE AREA-E681
-0xA565  0xE682  #PRIVATE USE AREA-E682
-0xA566  0xE683  #PRIVATE USE AREA-E683
-0xA567  0xE684  #PRIVATE USE AREA-E684
-0xA568  0xE685  #PRIVATE USE AREA-E685
-0xA569  0xE686  #PRIVATE USE AREA-E686
-0xA56A  0xE687  #PRIVATE USE AREA-E687
-0xA56B  0xE688  #PRIVATE USE AREA-E688
-0xA56C  0xE689  #PRIVATE USE AREA-E689
-0xA56D  0xE68A  #PRIVATE USE AREA-E68A
-0xA56E  0xE68B  #PRIVATE USE AREA-E68B
-0xA56F  0xE68C  #PRIVATE USE AREA-E68C
-0xA570  0xE68D  #PRIVATE USE AREA-E68D
-0xA571  0xE68E  #PRIVATE USE AREA-E68E
-0xA572  0xE68F  #PRIVATE USE AREA-E68F
-0xA573  0xE690  #PRIVATE USE AREA-E690
-0xA574  0xE691  #PRIVATE USE AREA-E691
-0xA575  0xE692  #PRIVATE USE AREA-E692
-0xA576  0xE693  #PRIVATE USE AREA-E693
-0xA577  0xE694  #PRIVATE USE AREA-E694
-0xA578  0xE695  #PRIVATE USE AREA-E695
-0xA579  0xE696  #PRIVATE USE AREA-E696
-0xA57A  0xE697  #PRIVATE USE AREA-E697
-0xA57B  0xE698  #PRIVATE USE AREA-E698
-0xA57C  0xE699  #PRIVATE USE AREA-E699
-0xA57D  0xE69A  #PRIVATE USE AREA-E69A
-0xA57E  0xE69B  #PRIVATE USE AREA-E69B
-0xA580  0xE69C  #PRIVATE USE AREA-E69C
-0xA581  0xE69D  #PRIVATE USE AREA-E69D
-0xA582  0xE69E  #PRIVATE USE AREA-E69E
-0xA583  0xE69F  #PRIVATE USE AREA-E69F
-0xA584  0xE6A0  #PRIVATE USE AREA-E6A0
-0xA585  0xE6A1  #PRIVATE USE AREA-E6A1
-0xA586  0xE6A2  #PRIVATE USE AREA-E6A2
-0xA587  0xE6A3  #PRIVATE USE AREA-E6A3
-0xA588  0xE6A4  #PRIVATE USE AREA-E6A4
-0xA589  0xE6A5  #PRIVATE USE AREA-E6A5
-0xA58A  0xE6A6  #PRIVATE USE AREA-E6A6
-0xA58B  0xE6A7  #PRIVATE USE AREA-E6A7
-0xA58C  0xE6A8  #PRIVATE USE AREA-E6A8
-0xA58D  0xE6A9  #PRIVATE USE AREA-E6A9
-0xA58E  0xE6AA  #PRIVATE USE AREA-E6AA
-0xA58F  0xE6AB  #PRIVATE USE AREA-E6AB
-0xA590  0xE6AC  #PRIVATE USE AREA-E6AC
-0xA591  0xE6AD  #PRIVATE USE AREA-E6AD
-0xA592  0xE6AE  #PRIVATE USE AREA-E6AE
-0xA593  0xE6AF  #PRIVATE USE AREA-E6AF
-0xA594  0xE6B0  #PRIVATE USE AREA-E6B0
-0xA595  0xE6B1  #PRIVATE USE AREA-E6B1
-0xA596  0xE6B2  #PRIVATE USE AREA-E6B2
-0xA597  0xE6B3  #PRIVATE USE AREA-E6B3
-0xA598  0xE6B4  #PRIVATE USE AREA-E6B4
-0xA599  0xE6B5  #PRIVATE USE AREA-E6B5
-0xA59A  0xE6B6  #PRIVATE USE AREA-E6B6
-0xA59B  0xE6B7  #PRIVATE USE AREA-E6B7
-0xA59C  0xE6B8  #PRIVATE USE AREA-E6B8
-0xA59D  0xE6B9  #PRIVATE USE AREA-E6B9
-0xA59E  0xE6BA  #PRIVATE USE AREA-E6BA
-0xA59F  0xE6BB  #PRIVATE USE AREA-E6BB
-0xA5A0  0xE6BC  #PRIVATE USE AREA-E6BC
+0xA4F4  0xE772  #PRIVATE USE AREA-E772
+0xA4F5  0xE773  #PRIVATE USE AREA-E773
+0xA4F6  0xE774  #PRIVATE USE AREA-E774
+0xA4F7  0xE775  #PRIVATE USE AREA-E775
+0xA4F8  0xE776  #PRIVATE USE AREA-E776
+0xA4F9  0xE777  #PRIVATE USE AREA-E777
+0xA4FA  0xE778  #PRIVATE USE AREA-E778
+0xA4FB  0xE779  #PRIVATE USE AREA-E779
+0xA4FC  0xE77A  #PRIVATE USE AREA-E77A
+0xA4FD  0xE77B  #PRIVATE USE AREA-E77B
+0xA4FE  0xE77C  #PRIVATE USE AREA-E77C
+0xA540  0xE646  #PRIVATE USE AREA-E646
+0xA541  0xE647  #PRIVATE USE AREA-E647
+0xA542  0xE648  #PRIVATE USE AREA-E648
+0xA543  0xE649  #PRIVATE USE AREA-E649
+0xA544  0xE64A  #PRIVATE USE AREA-E64A
+0xA545  0xE64B  #PRIVATE USE AREA-E64B
+0xA546  0xE64C  #PRIVATE USE AREA-E64C
+0xA547  0xE64D  #PRIVATE USE AREA-E64D
+0xA548  0xE64E  #PRIVATE USE AREA-E64E
+0xA549  0xE64F  #PRIVATE USE AREA-E64F
+0xA54A  0xE650  #PRIVATE USE AREA-E650
+0xA54B  0xE651  #PRIVATE USE AREA-E651
+0xA54C  0xE652  #PRIVATE USE AREA-E652
+0xA54D  0xE653  #PRIVATE USE AREA-E653
+0xA54E  0xE654  #PRIVATE USE AREA-E654
+0xA54F  0xE655  #PRIVATE USE AREA-E655
+0xA550  0xE656  #PRIVATE USE AREA-E656
+0xA551  0xE657  #PRIVATE USE AREA-E657
+0xA552  0xE658  #PRIVATE USE AREA-E658
+0xA553  0xE659  #PRIVATE USE AREA-E659
+0xA554  0xE65A  #PRIVATE USE AREA-E65A
+0xA555  0xE65B  #PRIVATE USE AREA-E65B
+0xA556  0xE65C  #PRIVATE USE AREA-E65C
+0xA557  0xE65D  #PRIVATE USE AREA-E65D
+0xA558  0xE65E  #PRIVATE USE AREA-E65E
+0xA559  0xE65F  #PRIVATE USE AREA-E65F
+0xA55A  0xE660  #PRIVATE USE AREA-E660
+0xA55B  0xE661  #PRIVATE USE AREA-E661
+0xA55C  0xE662  #PRIVATE USE AREA-E662
+0xA55D  0xE663  #PRIVATE USE AREA-E663
+0xA55E  0xE664  #PRIVATE USE AREA-E664
+0xA55F  0xE665  #PRIVATE USE AREA-E665
+0xA560  0xE666  #PRIVATE USE AREA-E666
+0xA561  0xE667  #PRIVATE USE AREA-E667
+0xA562  0xE668  #PRIVATE USE AREA-E668
+0xA563  0xE669  #PRIVATE USE AREA-E669
+0xA564  0xE66A  #PRIVATE USE AREA-E66A
+0xA565  0xE66B  #PRIVATE USE AREA-E66B
+0xA566  0xE66C  #PRIVATE USE AREA-E66C
+0xA567  0xE66D  #PRIVATE USE AREA-E66D
+0xA568  0xE66E  #PRIVATE USE AREA-E66E
+0xA569  0xE66F  #PRIVATE USE AREA-E66F
+0xA56A  0xE670  #PRIVATE USE AREA-E670
+0xA56B  0xE671  #PRIVATE USE AREA-E671
+0xA56C  0xE672  #PRIVATE USE AREA-E672
+0xA56D  0xE673  #PRIVATE USE AREA-E673
+0xA56E  0xE674  #PRIVATE USE AREA-E674
+0xA56F  0xE675  #PRIVATE USE AREA-E675
+0xA570  0xE676  #PRIVATE USE AREA-E676
+0xA571  0xE677  #PRIVATE USE AREA-E677
+0xA572  0xE678  #PRIVATE USE AREA-E678
+0xA573  0xE679  #PRIVATE USE AREA-E679
+0xA574  0xE67A  #PRIVATE USE AREA-E67A
+0xA575  0xE67B  #PRIVATE USE AREA-E67B
+0xA576  0xE67C  #PRIVATE USE AREA-E67C
+0xA577  0xE67D  #PRIVATE USE AREA-E67D
+0xA578  0xE67E  #PRIVATE USE AREA-E67E
+0xA579  0xE67F  #PRIVATE USE AREA-E67F
+0xA57A  0xE680  #PRIVATE USE AREA-E680
+0xA57B  0xE681  #PRIVATE USE AREA-E681
+0xA57C  0xE682  #PRIVATE USE AREA-E682
+0xA57D  0xE683  #PRIVATE USE AREA-E683
+0xA57E  0xE684  #PRIVATE USE AREA-E684
+0xA580  0xE685  #PRIVATE USE AREA-E685
+0xA581  0xE686  #PRIVATE USE AREA-E686
+0xA582  0xE687  #PRIVATE USE AREA-E687
+0xA583  0xE688  #PRIVATE USE AREA-E688
+0xA584  0xE689  #PRIVATE USE AREA-E689
+0xA585  0xE68A  #PRIVATE USE AREA-E68A
+0xA586  0xE68B  #PRIVATE USE AREA-E68B
+0xA587  0xE68C  #PRIVATE USE AREA-E68C
+0xA588  0xE68D  #PRIVATE USE AREA-E68D
+0xA589  0xE68E  #PRIVATE USE AREA-E68E
+0xA58A  0xE68F  #PRIVATE USE AREA-E68F
+0xA58B  0xE690  #PRIVATE USE AREA-E690
+0xA58C  0xE691  #PRIVATE USE AREA-E691
+0xA58D  0xE692  #PRIVATE USE AREA-E692
+0xA58E  0xE693  #PRIVATE USE AREA-E693
+0xA58F  0xE694  #PRIVATE USE AREA-E694
+0xA590  0xE695  #PRIVATE USE AREA-E695
+0xA591  0xE696  #PRIVATE USE AREA-E696
+0xA592  0xE697  #PRIVATE USE AREA-E697
+0xA593  0xE698  #PRIVATE USE AREA-E698
+0xA594  0xE699  #PRIVATE USE AREA-E699
+0xA595  0xE69A  #PRIVATE USE AREA-E69A
+0xA596  0xE69B  #PRIVATE USE AREA-E69B
+0xA597  0xE69C  #PRIVATE USE AREA-E69C
+0xA598  0xE69D  #PRIVATE USE AREA-E69D
+0xA599  0xE69E  #PRIVATE USE AREA-E69E
+0xA59A  0xE69F  #PRIVATE USE AREA-E69F
+0xA59B  0xE6A0  #PRIVATE USE AREA-E6A0
+0xA59C  0xE6A1  #PRIVATE USE AREA-E6A1
+0xA59D  0xE6A2  #PRIVATE USE AREA-E6A2
+0xA59E  0xE6A3  #PRIVATE USE AREA-E6A3
+0xA59F  0xE6A4  #PRIVATE USE AREA-E6A4
+0xA5A0  0xE6A5  #PRIVATE USE AREA-E6A5
 0xA5A1	0x30A1  #KATAKANA LETTER SMALL A
 0xA5A2	0x30A2  #KATAKANA LETTER A
 0xA5A3	0x30A3  #KATAKANA LETTER SMALL I
@@ -7179,110 +7156,110 @@
 0xA5F4	0x30F4  #KATAKANA LETTER VU
 0xA5F5	0x30F5  #KATAKANA LETTER SMALL KA
 0xA5F6	0x30F6  #KATAKANA LETTER SMALL KE
-0xA5F7  0xE6BD  #PRIVATE USE AREA-E6BD
-0xA5F8  0xE6BE  #PRIVATE USE AREA-E6BE
-0xA5F9  0xE6BF  #PRIVATE USE AREA-E6BF
-0xA5FA  0xE6C0  #PRIVATE USE AREA-E6C0
-0xA5FB  0xE6C1  #PRIVATE USE AREA-E6C1
-0xA5FC  0xE6C2  #PRIVATE USE AREA-E6C2
-0xA5FD  0xE6C3  #PRIVATE USE AREA-E6C3
-0xA5FE  0xE6C4  #PRIVATE USE AREA-E6C4
-0xA640  0xE6C5  #PRIVATE USE AREA-E6C5
-0xA641  0xE6C6  #PRIVATE USE AREA-E6C6
-0xA642  0xE6C7  #PRIVATE USE AREA-E6C7
-0xA643  0xE6C8  #PRIVATE USE AREA-E6C8
-0xA644  0xE6C9  #PRIVATE USE AREA-E6C9
-0xA645  0xE6CA  #PRIVATE USE AREA-E6CA
-0xA646  0xE6CB  #PRIVATE USE AREA-E6CB
-0xA647  0xE6CC  #PRIVATE USE AREA-E6CC
-0xA648  0xE6CD  #PRIVATE USE AREA-E6CD
-0xA649  0xE6CE  #PRIVATE USE AREA-E6CE
-0xA64A  0xE6CF  #PRIVATE USE AREA-E6CF
-0xA64B  0xE6D0  #PRIVATE USE AREA-E6D0
-0xA64C  0xE6D1  #PRIVATE USE AREA-E6D1
-0xA64D  0xE6D2  #PRIVATE USE AREA-E6D2
-0xA64E  0xE6D3  #PRIVATE USE AREA-E6D3
-0xA64F  0xE6D4  #PRIVATE USE AREA-E6D4
-0xA650  0xE6D5  #PRIVATE USE AREA-E6D5
-0xA651  0xE6D6  #PRIVATE USE AREA-E6D6
-0xA652  0xE6D7  #PRIVATE USE AREA-E6D7
-0xA653  0xE6D8  #PRIVATE USE AREA-E6D8
-0xA654  0xE6D9  #PRIVATE USE AREA-E6D9
-0xA655  0xE6DA  #PRIVATE USE AREA-E6DA
-0xA656  0xE6DB  #PRIVATE USE AREA-E6DB
-0xA657  0xE6DC  #PRIVATE USE AREA-E6DC
-0xA658  0xE6DD  #PRIVATE USE AREA-E6DD
-0xA659  0xE6DE  #PRIVATE USE AREA-E6DE
-0xA65A  0xE6DF  #PRIVATE USE AREA-E6DF
-0xA65B  0xE6E0  #PRIVATE USE AREA-E6E0
-0xA65C  0xE6E1  #PRIVATE USE AREA-E6E1
-0xA65D  0xE6E2  #PRIVATE USE AREA-E6E2
-0xA65E  0xE6E3  #PRIVATE USE AREA-E6E3
-0xA65F  0xE6E4  #PRIVATE USE AREA-E6E4
-0xA660  0xE6E5  #PRIVATE USE AREA-E6E5
-0xA661  0xE6E6  #PRIVATE USE AREA-E6E6
-0xA662  0xE6E7  #PRIVATE USE AREA-E6E7
-0xA663  0xE6E8  #PRIVATE USE AREA-E6E8
-0xA664  0xE6E9  #PRIVATE USE AREA-E6E9
-0xA665  0xE6EA  #PRIVATE USE AREA-E6EA
-0xA666  0xE6EB  #PRIVATE USE AREA-E6EB
-0xA667  0xE6EC  #PRIVATE USE AREA-E6EC
-0xA668  0xE6ED  #PRIVATE USE AREA-E6ED
-0xA669  0xE6EE  #PRIVATE USE AREA-E6EE
-0xA66A  0xE6EF  #PRIVATE USE AREA-E6EF
-0xA66B  0xE6F0  #PRIVATE USE AREA-E6F0
-0xA66C  0xE6F1  #PRIVATE USE AREA-E6F1
-0xA66D  0xE6F2  #PRIVATE USE AREA-E6F2
-0xA66E  0xE6F3  #PRIVATE USE AREA-E6F3
-0xA66F  0xE6F4  #PRIVATE USE AREA-E6F4
-0xA670  0xE6F5  #PRIVATE USE AREA-E6F5
-0xA671  0xE6F6  #PRIVATE USE AREA-E6F6
-0xA672  0xE6F7  #PRIVATE USE AREA-E6F7
-0xA673  0xE6F8  #PRIVATE USE AREA-E6F8
-0xA674  0xE6F9  #PRIVATE USE AREA-E6F9
-0xA675  0xE6FA  #PRIVATE USE AREA-E6FA
-0xA676  0xE6FB  #PRIVATE USE AREA-E6FB
-0xA677  0xE6FC  #PRIVATE USE AREA-E6FC
-0xA678  0xE6FD  #PRIVATE USE AREA-E6FD
-0xA679  0xE6FE  #PRIVATE USE AREA-E6FE
-0xA67A  0xE6FF  #PRIVATE USE AREA-E6FF
-0xA67B  0xE700  #PRIVATE USE AREA-E700
-0xA67C  0xE701  #PRIVATE USE AREA-E701
-0xA67D  0xE702  #PRIVATE USE AREA-E702
-0xA67E  0xE703  #PRIVATE USE AREA-E703
-0xA680  0xE704  #PRIVATE USE AREA-E704
-0xA681  0xE705  #PRIVATE USE AREA-E705
-0xA682  0xE706  #PRIVATE USE AREA-E706
-0xA683  0xE707  #PRIVATE USE AREA-E707
-0xA684  0xE708  #PRIVATE USE AREA-E708
-0xA685  0xE709  #PRIVATE USE AREA-E709
-0xA686  0xE70A  #PRIVATE USE AREA-E70A
-0xA687  0xE70B  #PRIVATE USE AREA-E70B
-0xA688  0xE70C  #PRIVATE USE AREA-E70C
-0xA689  0xE70D  #PRIVATE USE AREA-E70D
-0xA68A  0xE70E  #PRIVATE USE AREA-E70E
-0xA68B  0xE70F  #PRIVATE USE AREA-E70F
-0xA68C  0xE710  #PRIVATE USE AREA-E710
-0xA68D  0xE711  #PRIVATE USE AREA-E711
-0xA68E  0xE712  #PRIVATE USE AREA-E712
-0xA68F  0xE713  #PRIVATE USE AREA-E713
-0xA690  0xE714  #PRIVATE USE AREA-E714
-0xA691  0xE715  #PRIVATE USE AREA-E715
-0xA692  0xE716  #PRIVATE USE AREA-E716
-0xA693  0xE717  #PRIVATE USE AREA-E717
-0xA694  0xE718  #PRIVATE USE AREA-E718
-0xA695  0xE719  #PRIVATE USE AREA-E719
-0xA696  0xE71A  #PRIVATE USE AREA-E71A
-0xA697  0xE71B  #PRIVATE USE AREA-E71B
-0xA698  0xE71C  #PRIVATE USE AREA-E71C
-0xA699  0xE71D  #PRIVATE USE AREA-E71D
-0xA69A  0xE71E  #PRIVATE USE AREA-E71E
-0xA69B  0xE71F  #PRIVATE USE AREA-E71F
-0xA69C  0xE720  #PRIVATE USE AREA-E720
-0xA69D  0xE721  #PRIVATE USE AREA-E721
-0xA69E  0xE722  #PRIVATE USE AREA-E722
-0xA69F  0xE723  #PRIVATE USE AREA-E723
-0xA6A0  0xE724  #PRIVATE USE AREA-E724
+0xA5F7  0xE77D  #PRIVATE USE AREA-E77D
+0xA5F8  0xE77E  #PRIVATE USE AREA-E77E
+0xA5F9  0xE77F  #PRIVATE USE AREA-E77F
+0xA5FA  0xE780  #PRIVATE USE AREA-E780
+0xA5FB  0xE781  #PRIVATE USE AREA-E781
+0xA5FC  0xE782  #PRIVATE USE AREA-E782
+0xA5FD  0xE783  #PRIVATE USE AREA-E783
+0xA5FE  0xE784  #PRIVATE USE AREA-E784
+0xA640  0xE6A6  #PRIVATE USE AREA-E6A6
+0xA641  0xE6A7  #PRIVATE USE AREA-E6A7
+0xA642  0xE6A8  #PRIVATE USE AREA-E6A8
+0xA643  0xE6A9  #PRIVATE USE AREA-E6A9
+0xA644  0xE6AA  #PRIVATE USE AREA-E6AA
+0xA645  0xE6AB  #PRIVATE USE AREA-E6AB
+0xA646  0xE6AC  #PRIVATE USE AREA-E6AC
+0xA647  0xE6AD  #PRIVATE USE AREA-E6AD
+0xA648  0xE6AE  #PRIVATE USE AREA-E6AE
+0xA649  0xE6AF  #PRIVATE USE AREA-E6AF
+0xA64A  0xE6B0  #PRIVATE USE AREA-E6B0
+0xA64B  0xE6B1  #PRIVATE USE AREA-E6B1
+0xA64C  0xE6B2  #PRIVATE USE AREA-E6B2
+0xA64D  0xE6B3  #PRIVATE USE AREA-E6B3
+0xA64E  0xE6B4  #PRIVATE USE AREA-E6B4
+0xA64F  0xE6B5  #PRIVATE USE AREA-E6B5
+0xA650  0xE6B6  #PRIVATE USE AREA-E6B6
+0xA651  0xE6B7  #PRIVATE USE AREA-E6B7
+0xA652  0xE6B8  #PRIVATE USE AREA-E6B8
+0xA653  0xE6B9  #PRIVATE USE AREA-E6B9
+0xA654  0xE6BA  #PRIVATE USE AREA-E6BA
+0xA655  0xE6BB  #PRIVATE USE AREA-E6BB
+0xA656  0xE6BC  #PRIVATE USE AREA-E6BC
+0xA657  0xE6BD  #PRIVATE USE AREA-E6BD
+0xA658  0xE6BE  #PRIVATE USE AREA-E6BE
+0xA659  0xE6BF  #PRIVATE USE AREA-E6BF
+0xA65A  0xE6C0  #PRIVATE USE AREA-E6C0
+0xA65B  0xE6C1  #PRIVATE USE AREA-E6C1
+0xA65C  0xE6C2  #PRIVATE USE AREA-E6C2
+0xA65D  0xE6C3  #PRIVATE USE AREA-E6C3
+0xA65E  0xE6C4  #PRIVATE USE AREA-E6C4
+0xA65F  0xE6C5  #PRIVATE USE AREA-E6C5
+0xA660  0xE6C6  #PRIVATE USE AREA-E6C6
+0xA661  0xE6C7  #PRIVATE USE AREA-E6C7
+0xA662  0xE6C8  #PRIVATE USE AREA-E6C8
+0xA663  0xE6C9  #PRIVATE USE AREA-E6C9
+0xA664  0xE6CA  #PRIVATE USE AREA-E6CA
+0xA665  0xE6CB  #PRIVATE USE AREA-E6CB
+0xA666  0xE6CC  #PRIVATE USE AREA-E6CC
+0xA667  0xE6CD  #PRIVATE USE AREA-E6CD
+0xA668  0xE6CE  #PRIVATE USE AREA-E6CE
+0xA669  0xE6CF  #PRIVATE USE AREA-E6CF
+0xA66A  0xE6D0  #PRIVATE USE AREA-E6D0
+0xA66B  0xE6D1  #PRIVATE USE AREA-E6D1
+0xA66C  0xE6D2  #PRIVATE USE AREA-E6D2
+0xA66D  0xE6D3  #PRIVATE USE AREA-E6D3
+0xA66E  0xE6D4  #PRIVATE USE AREA-E6D4
+0xA66F  0xE6D5  #PRIVATE USE AREA-E6D5
+0xA670  0xE6D6  #PRIVATE USE AREA-E6D6
+0xA671  0xE6D7  #PRIVATE USE AREA-E6D7
+0xA672  0xE6D8  #PRIVATE USE AREA-E6D8
+0xA673  0xE6D9  #PRIVATE USE AREA-E6D9
+0xA674  0xE6DA  #PRIVATE USE AREA-E6DA
+0xA675  0xE6DB  #PRIVATE USE AREA-E6DB
+0xA676  0xE6DC  #PRIVATE USE AREA-E6DC
+0xA677  0xE6DD  #PRIVATE USE AREA-E6DD
+0xA678  0xE6DE  #PRIVATE USE AREA-E6DE
+0xA679  0xE6DF  #PRIVATE USE AREA-E6DF
+0xA67A  0xE6E0  #PRIVATE USE AREA-E6E0
+0xA67B  0xE6E1  #PRIVATE USE AREA-E6E1
+0xA67C  0xE6E2  #PRIVATE USE AREA-E6E2
+0xA67D  0xE6E3  #PRIVATE USE AREA-E6E3
+0xA67E  0xE6E4  #PRIVATE USE AREA-E6E4
+0xA680  0xE6E5  #PRIVATE USE AREA-E6E5
+0xA681  0xE6E6  #PRIVATE USE AREA-E6E6
+0xA682  0xE6E7  #PRIVATE USE AREA-E6E7
+0xA683  0xE6E8  #PRIVATE USE AREA-E6E8
+0xA684  0xE6E9  #PRIVATE USE AREA-E6E9
+0xA685  0xE6EA  #PRIVATE USE AREA-E6EA
+0xA686  0xE6EB  #PRIVATE USE AREA-E6EB
+0xA687  0xE6EC  #PRIVATE USE AREA-E6EC
+0xA688  0xE6ED  #PRIVATE USE AREA-E6ED
+0xA689  0xE6EE  #PRIVATE USE AREA-E6EE
+0xA68A  0xE6EF  #PRIVATE USE AREA-E6EF
+0xA68B  0xE6F0  #PRIVATE USE AREA-E6F0
+0xA68C  0xE6F1  #PRIVATE USE AREA-E6F1
+0xA68D  0xE6F2  #PRIVATE USE AREA-E6F2
+0xA68E  0xE6F3  #PRIVATE USE AREA-E6F3
+0xA68F  0xE6F4  #PRIVATE USE AREA-E6F4
+0xA690  0xE6F5  #PRIVATE USE AREA-E6F5
+0xA691  0xE6F6  #PRIVATE USE AREA-E6F6
+0xA692  0xE6F7  #PRIVATE USE AREA-E6F7
+0xA693  0xE6F8  #PRIVATE USE AREA-E6F8
+0xA694  0xE6F9  #PRIVATE USE AREA-E6F9
+0xA695  0xE6FA  #PRIVATE USE AREA-E6FA
+0xA696  0xE6FB  #PRIVATE USE AREA-E6FB
+0xA697  0xE6FC  #PRIVATE USE AREA-E6FC
+0xA698  0xE6FD  #PRIVATE USE AREA-E6FD
+0xA699  0xE6FE  #PRIVATE USE AREA-E6FE
+0xA69A  0xE6FF  #PRIVATE USE AREA-E6FF
+0xA69B  0xE700  #PRIVATE USE AREA-E700
+0xA69C  0xE701  #PRIVATE USE AREA-E701
+0xA69D  0xE702  #PRIVATE USE AREA-E702
+0xA69E  0xE703  #PRIVATE USE AREA-E703
+0xA69F  0xE704  #PRIVATE USE AREA-E704
+0xA6A0  0xE705  #PRIVATE USE AREA-E705
 0xA6A1	0x0391  #GREEK CAPITAL LETTER ALPHA
 0xA6A2	0x0392  #GREEK CAPITAL LETTER BETA
 0xA6A3	0x0393  #GREEK CAPITAL LETTER GAMMA
@@ -7307,14 +7284,14 @@
 0xA6B6	0x03A7  #GREEK CAPITAL LETTER CHI
 0xA6B7	0x03A8  #GREEK CAPITAL LETTER PSI
 0xA6B8	0x03A9  #GREEK CAPITAL LETTER OMEGA
-0xA6B9  0xE725  #PRIVATE USE AREA-E725
-0xA6BA  0xE726  #PRIVATE USE AREA-E726
-0xA6BB  0xE727  #PRIVATE USE AREA-E727
-0xA6BC  0xE728  #PRIVATE USE AREA-E728
-0xA6BD  0xE729  #PRIVATE USE AREA-E729
-0xA6BE  0xE72A  #PRIVATE USE AREA-E72A
-0xA6BF  0xE72B  #PRIVATE USE AREA-E72B
-0xA6C0  0xE72C  #PRIVATE USE AREA-E72C
+0xA6B9  0xE785  #PRIVATE USE AREA-E785
+0xA6BA  0xE786  #PRIVATE USE AREA-E786
+0xA6BB  0xE787  #PRIVATE USE AREA-E787
+0xA6BC  0xE788  #PRIVATE USE AREA-E788
+0xA6BD  0xE789  #PRIVATE USE AREA-E789
+0xA6BE  0xE78A  #PRIVATE USE AREA-E78A
+0xA6BF  0xE78B  #PRIVATE USE AREA-E78B
+0xA6C0  0xE78C  #PRIVATE USE AREA-E78C
 0xA6C1	0x03B1  #GREEK SMALL LETTER ALPHA
 0xA6C2	0x03B2  #GREEK SMALL LETTER BETA
 0xA6C3	0x03B3  #GREEK SMALL LETTER GAMMA
@@ -7339,13 +7316,13 @@
 0xA6D6	0x03C7  #GREEK SMALL LETTER CHI
 0xA6D7	0x03C8  #GREEK SMALL LETTER PSI
 0xA6D8	0x03C9  #GREEK SMALL LETTER OMEGA
-0xA6D9  0xE72D  #PRIVATE USE AREA-E72D
-0xA6DA  0xE72E  #PRIVATE USE AREA-E72E
-0xA6DB  0xE72F  #PRIVATE USE AREA-E72F
-0xA6DC  0xE730  #PRIVATE USE AREA-E730
-0xA6DD  0xE731  #PRIVATE USE AREA-E731
-0xA6DE  0xE732  #PRIVATE USE AREA-E732
-0xA6DF  0xE733  #PRIVATE USE AREA-E733
+0xA6D9  0xE78D  #PRIVATE USE AREA-E78D
+0xA6DA  0xE78E  #PRIVATE USE AREA-E78E
+0xA6DB  0xE78F  #PRIVATE USE AREA-E78F
+0xA6DC  0xE790  #PRIVATE USE AREA-E790
+0xA6DD  0xE791  #PRIVATE USE AREA-E791
+0xA6DE  0xE792  #PRIVATE USE AREA-E792
+0xA6DF  0xE793  #PRIVATE USE AREA-E793
 0xA6E0	0xFE35  #PRESENTATION FORM FOR VERTICAL LEFT PARENTHESIS
 0xA6E1	0xFE36  #PRESENTATION FORM FOR VERTICAL RIGHT PARENTHESIS
 0xA6E2	0xFE39  #PRESENTATION FORM FOR VERTICAL LEFT TORTOISE SHELL BRACKET
@@ -7358,121 +7335,121 @@
 0xA6E9	0xFE42  #PRESENTATION FORM FOR VERTICAL RIGHT CORNER BRACKET
 0xA6EA	0xFE43  #PRESENTATION FORM FOR VERTICAL LEFT WHITE CORNER BRACKET
 0xA6EB	0xFE44  #PRESENTATION FORM FOR VERTICAL RIGHT WHITE CORNER BRACKET
-0xA6EC  0xE734  #PRIVATE USE AREA-E734
-0xA6ED  0xE735  #PRIVATE USE AREA-E735
+0xA6EC  0xE794  #PRIVATE USE AREA-E794
+0xA6ED  0xE795  #PRIVATE USE AREA-E795
 0xA6EE	0xFE3B  #PRESENTATION FORM FOR VERTICAL LEFT BLACK LENTICULAR BRACKET
 0xA6EF	0xFE3C  #PRESENTATION FORM FOR VERTICAL RIGHT BLACK LENTICULAR BRACKET
 0xA6F0	0xFE37  #PRESENTATION FORM FOR VERTICAL LEFT CURLY BRACKET
 0xA6F1	0xFE38  #PRESENTATION FORM FOR VERTICAL RIGHT CURLY BRACKET
 0xA6F2	0xFE31  #PRESENTATION FORM FOR VERTICAL EM DASH
-0xA6F3  0xE736  #PRIVATE USE AREA-E736
+0xA6F3  0xE796  #PRIVATE USE AREA-E796
 0xA6F4	0xFE33  #PRESENTATION FORM FOR VERTICAL LOW LINE
 0xA6F5	0xFE34  #PRESENTATION FORM FOR VERTICAL WAVY LOW LINE
-0xA6F6  0xE737  #PRIVATE USE AREA-E737
-0xA6F7  0xE738  #PRIVATE USE AREA-E738
-0xA6F8  0xE739  #PRIVATE USE AREA-E739
-0xA6F9  0xE73A  #PRIVATE USE AREA-E73A
-0xA6FA  0xE73B  #PRIVATE USE AREA-E73B
-0xA6FB  0xE73C  #PRIVATE USE AREA-E73C
-0xA6FC  0xE73D  #PRIVATE USE AREA-E73D
-0xA6FD  0xE73E  #PRIVATE USE AREA-E73E
-0xA6FE  0xE73F  #PRIVATE USE AREA-E73F
-0xA740  0xE740  #PRIVATE USE AREA-E740
-0xA741  0xE741  #PRIVATE USE AREA-E741
-0xA742  0xE742  #PRIVATE USE AREA-E742
-0xA743  0xE743  #PRIVATE USE AREA-E743
-0xA744  0xE744  #PRIVATE USE AREA-E744
-0xA745  0xE745  #PRIVATE USE AREA-E745
-0xA746  0xE746  #PRIVATE USE AREA-E746
-0xA747  0xE747  #PRIVATE USE AREA-E747
-0xA748  0xE748  #PRIVATE USE AREA-E748
-0xA749  0xE749  #PRIVATE USE AREA-E749
-0xA74A  0xE74A  #PRIVATE USE AREA-E74A
-0xA74B  0xE74B  #PRIVATE USE AREA-E74B
-0xA74C  0xE74C  #PRIVATE USE AREA-E74C
-0xA74D  0xE74D  #PRIVATE USE AREA-E74D
-0xA74E  0xE74E  #PRIVATE USE AREA-E74E
-0xA74F  0xE74F  #PRIVATE USE AREA-E74F
-0xA750  0xE750  #PRIVATE USE AREA-E750
-0xA751  0xE751  #PRIVATE USE AREA-E751
-0xA752  0xE752  #PRIVATE USE AREA-E752
-0xA753  0xE753  #PRIVATE USE AREA-E753
-0xA754  0xE754  #PRIVATE USE AREA-E754
-0xA755  0xE755  #PRIVATE USE AREA-E755
-0xA756  0xE756  #PRIVATE USE AREA-E756
-0xA757  0xE757  #PRIVATE USE AREA-E757
-0xA758  0xE758  #PRIVATE USE AREA-E758
-0xA759  0xE759  #PRIVATE USE AREA-E759
-0xA75A  0xE75A  #PRIVATE USE AREA-E75A
-0xA75B  0xE75B  #PRIVATE USE AREA-E75B
-0xA75C  0xE75C  #PRIVATE USE AREA-E75C
-0xA75D  0xE75D  #PRIVATE USE AREA-E75D
-0xA75E  0xE75E  #PRIVATE USE AREA-E75E
-0xA75F  0xE75F  #PRIVATE USE AREA-E75F
-0xA760  0xE760  #PRIVATE USE AREA-E760
-0xA761  0xE761  #PRIVATE USE AREA-E761
-0xA762  0xE762  #PRIVATE USE AREA-E762
-0xA763  0xE763  #PRIVATE USE AREA-E763
-0xA764  0xE764  #PRIVATE USE AREA-E764
-0xA765  0xE765  #PRIVATE USE AREA-E765
-0xA766  0xE766  #PRIVATE USE AREA-E766
-0xA767  0xE767  #PRIVATE USE AREA-E767
-0xA768  0xE768  #PRIVATE USE AREA-E768
-0xA769  0xE769  #PRIVATE USE AREA-E769
-0xA76A  0xE76A  #PRIVATE USE AREA-E76A
-0xA76B  0xE76B  #PRIVATE USE AREA-E76B
-0xA76C  0xE76C  #PRIVATE USE AREA-E76C
-0xA76D  0xE76D  #PRIVATE USE AREA-E76D
-0xA76E  0xE76E  #PRIVATE USE AREA-E76E
-0xA76F  0xE76F  #PRIVATE USE AREA-E76F
-0xA770  0xE770  #PRIVATE USE AREA-E770
-0xA771  0xE771  #PRIVATE USE AREA-E771
-0xA772  0xE772  #PRIVATE USE AREA-E772
-0xA773  0xE773  #PRIVATE USE AREA-E773
-0xA774  0xE774  #PRIVATE USE AREA-E774
-0xA775  0xE775  #PRIVATE USE AREA-E775
-0xA776  0xE776  #PRIVATE USE AREA-E776
-0xA777  0xE777  #PRIVATE USE AREA-E777
-0xA778  0xE778  #PRIVATE USE AREA-E778
-0xA779  0xE779  #PRIVATE USE AREA-E779
-0xA77A  0xE77A  #PRIVATE USE AREA-E77A
-0xA77B  0xE77B  #PRIVATE USE AREA-E77B
-0xA77C  0xE77C  #PRIVATE USE AREA-E77C
-0xA77D  0xE77D  #PRIVATE USE AREA-E77D
-0xA77E  0xE77E  #PRIVATE USE AREA-E77E
-0xA780  0xE77F  #PRIVATE USE AREA-E77F
-0xA781  0xE780  #PRIVATE USE AREA-E780
-0xA782  0xE781  #PRIVATE USE AREA-E781
-0xA783  0xE782  #PRIVATE USE AREA-E782
-0xA784  0xE783  #PRIVATE USE AREA-E783
-0xA785  0xE784  #PRIVATE USE AREA-E784
-0xA786  0xE785  #PRIVATE USE AREA-E785
-0xA787  0xE786  #PRIVATE USE AREA-E786
-0xA788  0xE787  #PRIVATE USE AREA-E787
-0xA789  0xE788  #PRIVATE USE AREA-E788
-0xA78A  0xE789  #PRIVATE USE AREA-E789
-0xA78B  0xE78A  #PRIVATE USE AREA-E78A
-0xA78C  0xE78B  #PRIVATE USE AREA-E78B
-0xA78D  0xE78C  #PRIVATE USE AREA-E78C
-0xA78E  0xE78D  #PRIVATE USE AREA-E78D
-0xA78F  0xE78E  #PRIVATE USE AREA-E78E
-0xA790  0xE78F  #PRIVATE USE AREA-E78F
-0xA791  0xE790  #PRIVATE USE AREA-E790
-0xA792  0xE791  #PRIVATE USE AREA-E791
-0xA793  0xE792  #PRIVATE USE AREA-E792
-0xA794  0xE793  #PRIVATE USE AREA-E793
-0xA795  0xE794  #PRIVATE USE AREA-E794
-0xA796  0xE795  #PRIVATE USE AREA-E795
-0xA797  0xE796  #PRIVATE USE AREA-E796
-0xA798  0xE797  #PRIVATE USE AREA-E797
-0xA799  0xE798  #PRIVATE USE AREA-E798
-0xA79A  0xE799  #PRIVATE USE AREA-E799
-0xA79B  0xE79A  #PRIVATE USE AREA-E79A
-0xA79C  0xE79B  #PRIVATE USE AREA-E79B
-0xA79D  0xE79C  #PRIVATE USE AREA-E79C
-0xA79E  0xE79D  #PRIVATE USE AREA-E79D
-0xA79F  0xE79E  #PRIVATE USE AREA-E79E
-0xA7A0  0xE79F  #PRIVATE USE AREA-E79F
+0xA6F6  0xE797  #PRIVATE USE AREA-E797
+0xA6F7  0xE798  #PRIVATE USE AREA-E798
+0xA6F8  0xE799  #PRIVATE USE AREA-E799
+0xA6F9  0xE79A  #PRIVATE USE AREA-E79A
+0xA6FA  0xE79B  #PRIVATE USE AREA-E79B
+0xA6FB  0xE79C  #PRIVATE USE AREA-E79C
+0xA6FC  0xE79D  #PRIVATE USE AREA-E79D
+0xA6FD  0xE79E  #PRIVATE USE AREA-E79E
+0xA6FE  0xE79F  #PRIVATE USE AREA-E79F
+0xA740  0xE706  #PRIVATE USE AREA-E706
+0xA741  0xE707  #PRIVATE USE AREA-E707
+0xA742  0xE708  #PRIVATE USE AREA-E708
+0xA743  0xE709  #PRIVATE USE AREA-E709
+0xA744  0xE70A  #PRIVATE USE AREA-E70A
+0xA745  0xE70B  #PRIVATE USE AREA-E70B
+0xA746  0xE70C  #PRIVATE USE AREA-E70C
+0xA747  0xE70D  #PRIVATE USE AREA-E70D
+0xA748  0xE70E  #PRIVATE USE AREA-E70E
+0xA749  0xE70F  #PRIVATE USE AREA-E70F
+0xA74A  0xE710  #PRIVATE USE AREA-E710
+0xA74B  0xE711  #PRIVATE USE AREA-E711
+0xA74C  0xE712  #PRIVATE USE AREA-E712
+0xA74D  0xE713  #PRIVATE USE AREA-E713
+0xA74E  0xE714  #PRIVATE USE AREA-E714
+0xA74F  0xE715  #PRIVATE USE AREA-E715
+0xA750  0xE716  #PRIVATE USE AREA-E716
+0xA751  0xE717  #PRIVATE USE AREA-E717
+0xA752  0xE718  #PRIVATE USE AREA-E718
+0xA753  0xE719  #PRIVATE USE AREA-E719
+0xA754  0xE71A  #PRIVATE USE AREA-E71A
+0xA755  0xE71B  #PRIVATE USE AREA-E71B
+0xA756  0xE71C  #PRIVATE USE AREA-E71C
+0xA757  0xE71D  #PRIVATE USE AREA-E71D
+0xA758  0xE71E  #PRIVATE USE AREA-E71E
+0xA759  0xE71F  #PRIVATE USE AREA-E71F
+0xA75A  0xE720  #PRIVATE USE AREA-E720
+0xA75B  0xE721  #PRIVATE USE AREA-E721
+0xA75C  0xE722  #PRIVATE USE AREA-E722
+0xA75D  0xE723  #PRIVATE USE AREA-E723
+0xA75E  0xE724  #PRIVATE USE AREA-E724
+0xA75F  0xE725  #PRIVATE USE AREA-E725
+0xA760  0xE726  #PRIVATE USE AREA-E726
+0xA761  0xE727  #PRIVATE USE AREA-E727
+0xA762  0xE728  #PRIVATE USE AREA-E728
+0xA763  0xE729  #PRIVATE USE AREA-E729
+0xA764  0xE72A  #PRIVATE USE AREA-E72A
+0xA765  0xE72B  #PRIVATE USE AREA-E72B
+0xA766  0xE72C  #PRIVATE USE AREA-E72C
+0xA767  0xE72D  #PRIVATE USE AREA-E72D
+0xA768  0xE72E  #PRIVATE USE AREA-E72E
+0xA769  0xE72F  #PRIVATE USE AREA-E72F
+0xA76A  0xE730  #PRIVATE USE AREA-E730
+0xA76B  0xE731  #PRIVATE USE AREA-E731
+0xA76C  0xE732  #PRIVATE USE AREA-E732
+0xA76D  0xE733  #PRIVATE USE AREA-E733
+0xA76E  0xE734  #PRIVATE USE AREA-E734
+0xA76F  0xE735  #PRIVATE USE AREA-E735
+0xA770  0xE736  #PRIVATE USE AREA-E736
+0xA771  0xE737  #PRIVATE USE AREA-E737
+0xA772  0xE738  #PRIVATE USE AREA-E738
+0xA773  0xE739  #PRIVATE USE AREA-E739
+0xA774  0xE73A  #PRIVATE USE AREA-E73A
+0xA775  0xE73B  #PRIVATE USE AREA-E73B
+0xA776  0xE73C  #PRIVATE USE AREA-E73C
+0xA777  0xE73D  #PRIVATE USE AREA-E73D
+0xA778  0xE73E  #PRIVATE USE AREA-E73E
+0xA779  0xE73F  #PRIVATE USE AREA-E73F
+0xA77A  0xE740  #PRIVATE USE AREA-E740
+0xA77B  0xE741  #PRIVATE USE AREA-E741
+0xA77C  0xE742  #PRIVATE USE AREA-E742
+0xA77D  0xE743  #PRIVATE USE AREA-E743
+0xA77E  0xE744  #PRIVATE USE AREA-E744
+0xA780  0xE745  #PRIVATE USE AREA-E745
+0xA781  0xE746  #PRIVATE USE AREA-E746
+0xA782  0xE747  #PRIVATE USE AREA-E747
+0xA783  0xE748  #PRIVATE USE AREA-E748
+0xA784  0xE749  #PRIVATE USE AREA-E749
+0xA785  0xE74A  #PRIVATE USE AREA-E74A
+0xA786  0xE74B  #PRIVATE USE AREA-E74B
+0xA787  0xE74C  #PRIVATE USE AREA-E74C
+0xA788  0xE74D  #PRIVATE USE AREA-E74D
+0xA789  0xE74E  #PRIVATE USE AREA-E74E
+0xA78A  0xE74F  #PRIVATE USE AREA-E74F
+0xA78B  0xE750  #PRIVATE USE AREA-E750
+0xA78C  0xE751  #PRIVATE USE AREA-E751
+0xA78D  0xE752  #PRIVATE USE AREA-E752
+0xA78E  0xE753  #PRIVATE USE AREA-E753
+0xA78F  0xE754  #PRIVATE USE AREA-E754
+0xA790  0xE755  #PRIVATE USE AREA-E755
+0xA791  0xE756  #PRIVATE USE AREA-E756
+0xA792  0xE757  #PRIVATE USE AREA-E757
+0xA793  0xE758  #PRIVATE USE AREA-E758
+0xA794  0xE759  #PRIVATE USE AREA-E759
+0xA795  0xE75A  #PRIVATE USE AREA-E75A
+0xA796  0xE75B  #PRIVATE USE AREA-E75B
+0xA797  0xE75C  #PRIVATE USE AREA-E75C
+0xA798  0xE75D  #PRIVATE USE AREA-E75D
+0xA799  0xE75E  #PRIVATE USE AREA-E75E
+0xA79A  0xE75F  #PRIVATE USE AREA-E75F
+0xA79B  0xE760  #PRIVATE USE AREA-E760
+0xA79C  0xE761  #PRIVATE USE AREA-E761
+0xA79D  0xE762  #PRIVATE USE AREA-E762
+0xA79E  0xE763  #PRIVATE USE AREA-E763
+0xA79F  0xE764  #PRIVATE USE AREA-E764
+0xA7A0  0xE765  #PRIVATE USE AREA-E765
 0xA7A1	0x0410  #CYRILLIC CAPITAL LETTER A
 0xA7A2	0x0411  #CYRILLIC CAPITAL LETTER BE
 0xA7A3	0x0412  #CYRILLIC CAPITAL LETTER VE
--- a/jdk/make/tools/Makefile	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/make/tools/Makefile	Fri Jun 08 12:44:30 2012 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 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
@@ -58,6 +58,11 @@
   SUBDIRS += generate_nimbus
 endif
 
+ifeq ($(PLATFORM), solaris)
+  # temporary tools to work around gobjcopy bugs
+  SUBDIRS += add_gnu_debuglink fix_empty_sec_hdr_flags
+endif
+
 include $(BUILDDIR)/common/Subdirs.gmk
 
 all build clean clobber::
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/tools/add_gnu_debuglink/Makefile	Fri Jun 08 12:44:30 2012 -0700
@@ -0,0 +1,46 @@
+#
+# Copyright (c) 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.
+#
+# 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.
+#  
+#
+
+# Rules to build add_gnu_debuglink, used by various Makefiles on Solaris
+
+BUILDDIR = ../..
+include $(BUILDDIR)/common/Defs.gmk
+
+# Default name
+PROGRAM = add_gnu_debuglink
+ADD_GNU_DEBUGLINK_PROG = $(ABS_BUILDTOOLBINDIR)/$(PROGRAM)
+
+ADD_GNU_DEBUGLINK_SRC     = add_gnu_debuglink.c
+ADD_GNU_DEBUGLINK_FLAGS   = 
+LIBS_ADD_GNU_DEBUGLINK   += -lelf
+
+all: $(ADD_GNU_DEBUGLINK)
+
+$(ADD_GNU_DEBUGLINK_PROG): $(ADD_GNU_DEBUGLINK_SRC)
+	$(MKDIR) -p $(BUILDTOOLBINDIR)
+	$(CC) -g -o $@ $< $(ADD_GNU_DEBUGLINK_FLAGS) $(LIBS_ADD_GNU_DEBUGLINK)
+
+clean::
+	$(RM) $(ADD_GNU_DEBUGLINK_PROG)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/tools/add_gnu_debuglink/add_gnu_debuglink.c	Fri Jun 08 12:44:30 2012 -0700
@@ -0,0 +1,285 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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.
+ *
+ */
+
+/*
+ * Name:        add_gnu_debuglink.c
+ *
+ * Description: Add a ".gnu_debuglink" section that refers to the specified
+ *     debug_info_path to the specified ELF object.
+ *
+ *     This program is adapted from the example program shown on the
+ *     elf(3elf) man page and from code from the Solaris compiler
+ *     driver.
+ */
+
+/*
+ * needed to define SHF_EXCLUDE
+ */
+#define ELF_TARGET_ALL
+
+#include <fcntl.h>
+#include <stdio.h>
+#include <libelf.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+static void failure(void);
+static unsigned int gnu_debuglink_crc32(unsigned int crc, unsigned char *buf,
+                                        size_t len);
+
+void
+main(int argc, char ** argv) {
+                                 /* new ELF section name */
+    static char SEC_NAME[] = ".gnu_debuglink";
+
+    unsigned char buffer[8 * 1024];  /* I/O buffer */
+    int           buffer_len;        /* buffer length */
+    char *        debug_info_path;   /* debug info path */
+    void *        ehdr;              /* ELF header */
+    Elf *         elf;               /* ELF descriptor */
+    char *        elf_ident;         /* ELF identity string */
+    char *        elf_obj;           /* elf_obj file */
+    int           fd;                /* descriptor for files */
+    unsigned int  file_crc = 0;      /* CRC for debug info file */
+    int           is_elfclass64;     /* is an ELFCLASS64 file? */
+    Elf_Data *    link_dat;          /* ELF data for new debug info link */
+    Elf_Data *    name_dat;          /* ELF data for new section name */
+    Elf_Scn *     new_scn;           /* new ELF section descriptor */
+    void *        new_shdr;          /* new ELF section header */
+    Elf_Scn *     scn;               /* ELF section descriptor */
+    void *        shdr;              /* ELF section header */
+
+    if (argc != 3) {
+        (void) fprintf(stderr, "Usage: %s debug_info_path elf_obj\n", argv[0]);
+        exit(2);
+    }
+
+    debug_info_path = argv[1];  /* save for later */
+    if ((fd = open(debug_info_path, O_RDONLY)) == -1) {
+        (void) fprintf(stderr, "%s: cannot open file.\n", debug_info_path);
+        exit(3);
+    }
+
+    (void) printf("Computing CRC for '%s'\n", debug_info_path);
+    (void) fflush(stdout);
+    /* compute CRC for the debug info file */
+    for (;;) {
+        int len = read(fd, buffer, sizeof buffer);
+        if (len <= 0) {
+            break;
+        }
+        file_crc = gnu_debuglink_crc32(file_crc, buffer, len);
+    }
+    (void) close(fd);
+
+    /* open the elf_obj */
+    elf_obj = argv[2];
+    if ((fd = open(elf_obj, O_RDWR)) == -1) {
+        (void) fprintf(stderr, "%s: cannot open file.\n", elf_obj);
+        exit(4);
+    }
+
+    (void) printf("Opening '%s' for update\n", elf_obj);
+    (void) fflush(stdout);
+    (void) elf_version(EV_CURRENT);  /* coordinate ELF versions */
+
+    /* obtain the ELF descriptors from the input file */
+    if ((elf = elf_begin(fd, ELF_C_RDWR, NULL)) == NULL) {
+        failure();
+    }
+
+    /* determine if ELFCLASS64 or not? */
+    elf_ident = elf_getident(elf, NULL);
+    is_elfclass64 = (elf_ident[EI_CLASS] == ELFCLASS64);
+
+    /* get the ELF header */
+    if (is_elfclass64) {
+        ehdr = elf64_getehdr(elf);
+    } else {
+        ehdr = elf32_getehdr(elf);
+    }
+    if (ehdr == NULL) {
+        failure();
+    }
+
+    /* get the ELF section descriptor */
+    if (is_elfclass64) {
+        scn = elf_getscn(elf, ((Elf64_Ehdr *) ehdr)->e_shstrndx);
+    } else {
+        scn = elf_getscn(elf, ((Elf32_Ehdr *) ehdr)->e_shstrndx);
+    }
+    if (scn == NULL) {
+        failure();
+    }
+
+    /* get the section header */
+    if (is_elfclass64) {
+        shdr = elf64_getshdr(scn);
+    } else {
+        shdr = elf32_getshdr(scn);
+    }
+    if (shdr == NULL) {
+        failure();
+    }
+
+    (void) printf("Adding ELF data for new section name\n");
+    (void) fflush(stdout);
+    name_dat = elf_newdata(scn);
+    name_dat->d_buf = (void *) SEC_NAME;
+    if (is_elfclass64) {
+        name_dat->d_off = ((Elf64_Shdr *) shdr)->sh_size + 1;
+    } else {
+        name_dat->d_off = ((Elf32_Shdr *) shdr)->sh_size + 1;
+    }
+    name_dat->d_align = 1;
+    name_dat->d_size = strlen(SEC_NAME) + 1;
+
+    new_scn = elf_newscn(elf);
+
+    if (is_elfclass64) {
+        new_shdr = elf64_getshdr(new_scn);
+        ((Elf64_Shdr *) new_shdr)->sh_flags = SHF_EXCLUDE;
+        ((Elf64_Shdr *) new_shdr)->sh_type = SHT_PROGBITS;
+        ((Elf64_Shdr *) new_shdr)->sh_name = ((Elf64_Shdr *) shdr)->sh_size;
+        ((Elf64_Shdr *) new_shdr)->sh_addralign = 1;
+        ((Elf64_Shdr *) shdr)->sh_size += (strlen(SEC_NAME) + 1);
+    } else {
+        new_shdr = elf32_getshdr(new_scn);
+        ((Elf32_Shdr *) new_shdr)->sh_flags = SHF_EXCLUDE;
+        ((Elf32_Shdr *) new_shdr)->sh_type = SHT_PROGBITS;
+        ((Elf32_Shdr *) new_shdr)->sh_name = ((Elf32_Shdr *) shdr)->sh_size;
+        ((Elf32_Shdr *) new_shdr)->sh_addralign = 1;
+        ((Elf32_Shdr *) shdr)->sh_size += (strlen(SEC_NAME) + 1);
+    }
+
+    (void) printf("Adding ELF data for debug_info_path value\n");
+    (void) fflush(stdout);
+    (void) memset(buffer, 0, sizeof buffer);
+    buffer_len = strlen(debug_info_path) + 1;  /* +1 for NUL */
+    (void) strncpy((char *) buffer, debug_info_path, buffer_len);
+    if (buffer_len % 4 != 0) {
+        /* not on a 4 byte boundary so pad to the next one */
+        buffer_len += (4 - buffer_len % 4);
+    }
+    /* save the CRC */
+    (void) memcpy(&buffer[buffer_len], &file_crc, sizeof file_crc);
+    buffer_len += sizeof file_crc;
+
+    link_dat = elf_newdata(new_scn);
+    link_dat->d_type = ELF_T_BYTE;
+    link_dat->d_size = buffer_len;
+    link_dat->d_buf = buffer;
+    link_dat->d_align = 1;
+
+    (void) printf("Saving updates to '%s'\n", elf_obj);
+    (void) fflush(stdout);
+    (void) elf_update(elf, ELF_C_NULL);   /* recalc ELF memory structures */
+    (void) elf_update(elf, ELF_C_WRITE);  /* write out changes to ELF obj */
+    (void) elf_end(elf);                  /* done with ELF obj */
+    (void) close(fd);
+
+    (void) printf("Done updating '%s'\n", elf_obj);
+    (void) fflush(stdout);
+    exit(0);
+}  /* end main */
+
+
+static void
+failure() {
+    (void) fprintf(stderr, "%s\n", elf_errmsg(elf_errno()));
+    exit(5);
+}
+
+
+/*
+ * The CRC used in gnu_debuglink, retrieved from
+ * http://sourceware.org/gdb/current/onlinedocs/gdb/Separate-Debug-Files.html#Separate-Debug-Files.
+ */
+
+static unsigned int
+gnu_debuglink_crc32(unsigned int crc, unsigned char *buf, size_t len) {
+    static const unsigned int crc32_table[256] = {
+        0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
+        0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
+        0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
+        0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
+        0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856,
+        0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
+        0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4,
+        0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
+        0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,
+        0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a,
+        0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599,
+        0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
+        0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190,
+        0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
+        0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e,
+        0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
+        0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed,
+        0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
+        0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3,
+        0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
+        0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a,
+        0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5,
+        0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010,
+        0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
+        0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17,
+        0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6,
+        0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,
+        0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
+        0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344,
+        0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
+        0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a,
+        0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
+        0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1,
+        0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c,
+        0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef,
+        0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
+        0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe,
+        0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31,
+        0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c,
+        0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
+        0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b,
+        0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
+        0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1,
+        0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
+        0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,
+        0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7,
+        0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66,
+        0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
+        0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605,
+        0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8,
+        0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
+        0x2d02ef8d
+    };
+
+    unsigned char *end;
+
+    crc = ~crc & 0xffffffff;
+    for (end = buf + len; buf < end; ++buf) {
+        crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8);
+    }
+    return ~crc & 0xffffffff;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/tools/fix_empty_sec_hdr_flags/Makefile	Fri Jun 08 12:44:30 2012 -0700
@@ -0,0 +1,46 @@
+#
+# Copyright (c) 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.
+#
+# 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.
+#  
+#
+
+# Rules to build fix_empty_sec_hdr_flags, used by various Makefiles on Solaris
+
+BUILDDIR = ../..
+include $(BUILDDIR)/common/Defs.gmk
+
+# Default name
+PROGRAM = fix_empty_sec_hdr_flags
+FIX_EMPTY_SEC_HDR_FLAGS_PROG = $(ABS_BUILDTOOLBINDIR)/$(PROGRAM)
+
+FIX_EMPTY_SEC_HDR_FLAGS_SRC     = fix_empty_sec_hdr_flags.c
+FIX_EMPTY_SEC_HDR_FLAGS_FLAGS   = 
+LIBS_FIX_EMPTY_SEC_HDR_FLAGS   += -lelf
+
+all: $(FIX_EMPTY_SEC_HDR_FLAGS)
+
+$(FIX_EMPTY_SEC_HDR_FLAGS_PROG): $(FIX_EMPTY_SEC_HDR_FLAGS_SRC)
+	$(MKDIR) -p $(BUILDTOOLBINDIR)
+	$(CC) -g -o $@ $< $(FIX_EMPTY_SEC_HDR_FLAGS_FLAGS) $(LIBS_FIX_EMPTY_SEC_HDR_FLAGS)
+
+clean::
+	$(RM) $(FIX_EMPTY_SEC_HDR_FLAGS_PROG)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/make/tools/fix_empty_sec_hdr_flags/fix_empty_sec_hdr_flags.c	Fri Jun 08 12:44:30 2012 -0700
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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.
+ *
+ */
+
+/*
+ * Name:        fix_empty_sec_hdr_flags.c
+ *
+ * Description: Remove the SHF_ALLOC flag from "empty" section headers.
+ *     An "empty" section header has sh_addr == 0 and sh_size == 0.
+ *
+ *     This program is adapted from the example program shown on the
+ *     elf(3elf) man page and from code from the Solaris compiler
+ *     driver.
+ */
+
+#include <fcntl.h>
+#include <stdio.h>
+#include <libelf.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+static void failure(void);
+
+void
+main(int argc, char ** argv) {
+    void *        ehdr;           /* ELF header */
+    unsigned int  i;              /* section counter */
+    int           fd;             /* descriptor for file */
+    Elf *         elf;            /* ELF descriptor */
+    char *        elf_ident;      /* ELF identity string */
+    char *        elf_obj;        /* elf_obj file */
+    int           fix_count;      /* number of flags fixed */
+    int           is_elfclass64;  /* is an ELFCLASS64 file? */
+    Elf_Scn *     scn;            /* ELF section descriptor */
+    void *        shdr;           /* ELF section header */
+    Elf_Data *    shstrtab;       /* ELF section header string table */
+
+    if (argc != 2) {
+        (void) fprintf(stderr, "Usage: %s elf_obj\n", argv[0]);
+        exit(2);
+    }
+
+    /* open the elf_obj */
+    elf_obj = argv[1];
+    if ((fd = open(elf_obj, O_RDWR)) == -1) {
+        (void) fprintf(stderr, "%s: cannot open file.\n", elf_obj);
+        exit(3);
+    }
+
+    (void) printf("Opening '%s' for update\n", elf_obj);
+    (void) fflush(stdout);
+    (void) elf_version(EV_CURRENT);  /* coordinate ELF versions */
+
+    /* obtain the ELF descriptors from the input file */
+    if ((elf = elf_begin(fd, ELF_C_RDWR, NULL)) == NULL) {
+        failure();
+    }
+
+    /* determine if ELFCLASS64 or not? */
+    elf_ident = elf_getident(elf, NULL);
+    is_elfclass64 = (elf_ident[EI_CLASS] == ELFCLASS64);
+
+    /* get the ELF header */
+    if (is_elfclass64) {
+        ehdr = elf64_getehdr(elf);
+    } else {
+        ehdr = elf32_getehdr(elf);
+    }
+    if (ehdr == NULL) {
+        failure();
+    }
+
+    /* get the ELF section descriptor */
+    if (is_elfclass64) {
+        scn = elf_getscn(elf, ((Elf64_Ehdr *) ehdr)->e_shstrndx);
+    } else {
+        scn = elf_getscn(elf, ((Elf32_Ehdr *) ehdr)->e_shstrndx);
+    }
+    if (scn == NULL) {
+        failure();
+    }
+
+    /* get the section header string table */
+    shstrtab = elf_getdata(scn, NULL);
+    if (shstrtab == NULL) {
+        failure();
+    }
+
+    fix_count = 0;
+
+    /* traverse the sections of the input file */
+    for (i = 1, scn = NULL; scn = elf_nextscn(elf, scn); i++) {
+        int    has_flag_set;  /* is SHF_ALLOC flag set? */
+        int    is_empty;      /* is section empty? */
+        char * name;          /* short hand pointer */
+
+        /* get the section header */
+        if (is_elfclass64) {
+            shdr = elf64_getshdr(scn);
+        } else {
+            shdr = elf32_getshdr(scn);
+        }
+        if (shdr == NULL) {
+            failure();
+        }
+
+        if (is_elfclass64) {
+            name = (char *)shstrtab->d_buf + ((Elf64_Shdr *) shdr)->sh_name;
+        } else {
+            name = (char *)shstrtab->d_buf + ((Elf32_Shdr *) shdr)->sh_name;
+        }
+
+        if (is_elfclass64) {
+            has_flag_set = ((Elf64_Shdr *) shdr)->sh_flags & SHF_ALLOC;
+            is_empty = ((Elf64_Shdr *) shdr)->sh_addr == 0 &&
+                ((Elf64_Shdr *) shdr)->sh_size == 0;
+        } else {
+            has_flag_set = ((Elf32_Shdr *) shdr)->sh_flags & SHF_ALLOC;
+            is_empty = ((Elf32_Shdr *) shdr)->sh_addr == 0 &&
+                ((Elf32_Shdr *) shdr)->sh_size == 0;
+        }
+
+        if (is_empty && has_flag_set) {
+            (void) printf("section[%u] '%s' is empty, "
+                "but SHF_ALLOC flag is set.\n", i, name);
+            (void) printf("Clearing the SHF_ALLOC flag.\n");
+
+            if (is_elfclass64) {
+                ((Elf64_Shdr *) shdr)->sh_flags &= ~SHF_ALLOC;
+            } else {
+                ((Elf32_Shdr *) shdr)->sh_flags &= ~SHF_ALLOC;
+            }
+            fix_count++;
+        }
+    }  /* end for each ELF section */
+
+    if (fix_count > 0) {
+        (void) printf("Saving %d updates to '%s'\n", fix_count, elf_obj);
+        (void) fflush(stdout);
+        (void) elf_update(elf, ELF_C_NULL);   /* recalc ELF memory structures */
+        (void) elf_update(elf, ELF_C_WRITE);  /* write out changes to ELF obj */
+    } else {
+        (void) printf("No SHF_ALLOC flags needed to be cleared.\n");
+    }
+
+    (void) elf_end(elf);                  /* done with ELF obj */
+    (void) close(fd);
+
+    (void) printf("Done %s '%s'\n",
+               (fix_count > 0) ? "updating" : "with", elf_obj);
+    (void) fflush(stdout);
+    exit(0);
+}  /* end main */
+
+
+static void
+failure() {
+    (void) fprintf(stderr, "%s\n", elf_errmsg(elf_errno()));
+    exit(6);
+}
--- a/jdk/makefiles/java/java/FILES_c.gmk	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/makefiles/java/java/FILES_c.gmk	Fri Jun 08 12:44:30 2012 -0700
@@ -69,7 +69,6 @@
 	jdk_util_md.c \
 	check_version.c \
 	java_props_md.c \
-	DriverManager.c \
 	ConstantPool.c \
 	MessageUtils.c \
 	GC.c \
--- a/jdk/makefiles/java/java/mapfile-vers	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/makefiles/java/java/mapfile-vers	Fri Jun 08 12:44:30 2012 -0700
@@ -232,7 +232,6 @@
 		Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2Ljava_security_AccessControlContext_2;
 		Java_java_security_AccessController_getStackAccessControlContext;
 		Java_java_security_AccessController_getInheritedAccessControlContext;
-		Java_java_sql_DriverManager_getCallerClassLoader;
 		Java_java_util_ResourceBundle_getClassContext;
 		Java_java_util_TimeZone_getSystemTimeZoneID;
 		Java_java_util_TimeZone_getSystemGMTOffsetID;
--- a/jdk/src/share/classes/com/sun/java/util/jar/pack/Attribute.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/com/sun/java/util/jar/pack/Attribute.java	Fri Jun 08 12:44:30 2012 -0700
@@ -653,8 +653,8 @@
             return fixups[0]; // return ref-bearing cookie, if any
         }
 
-        public String layoutForPackageMajver(int majver) {
-            if (majver <= JAVA5_PACKAGE_MAJOR_VERSION) {
+        public String layoutForClassVersion(Package.Version vers) {
+            if (vers.lessThan(JAVA6_MAX_CLASS_VERSION)) {
                 // Disallow layout syntax in the oldest protocol version.
                 return expandCaseDashNotation(layout);
             }
--- a/jdk/src/share/classes/com/sun/java/util/jar/pack/BandStructure.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/com/sun/java/util/jar/pack/BandStructure.java	Fri Jun 08 12:44:30 2012 -0700
@@ -74,30 +74,27 @@
 
     abstract protected Index getCPIndex(byte tag);
 
-    // Local copy of package version.
-    private int packageMajver = -1;
+    // Local copy of highest class version.
+    private Package.Version highestClassVersion = null;
 
     /** Call this exactly once, early, to specify the archive major version. */
-    public void initPackageMajver(int packageMajver) throws IOException {
-        assert(packageMajver > 0 && packageMajver < 0x10000);
-        if (this.packageMajver > 0) {
+    public void initHighestClassVersion(Package.Version highestClassVersion) throws IOException {
+        if (this.highestClassVersion != null) {
             throw new IOException(
-                "Package majver is already initialized to " + this.packageMajver+
-                "; new setting is " + packageMajver);
+                "Highest class major version is already initialized to " +
+                this.highestClassVersion + "; new setting is " + highestClassVersion);
         }
-        this.packageMajver = packageMajver;
-        adjustToMajver();
+        this.highestClassVersion = highestClassVersion;
+        adjustToClassVersion();
     }
-    public int getPackageMajver() {
-        if (packageMajver < 0) {
-            throw new RuntimeException("Package majver not yet initialized");
-        }
-        return packageMajver;
+
+    public Package.Version getHighestClassVersion() {
+        return highestClassVersion;
     }
 
     private final boolean isReader = this instanceof PackageReader;
-    protected BandStructure() {
-    }
+
+    protected BandStructure() {}
 
     final static Coding BYTE1 = Coding.of(1,256);
 
@@ -1866,20 +1863,12 @@
         attrClassFileVersionMask = (1<<CLASS_ATTR_ClassFile_version);
     }
 
-    private void adjustToMajver() throws IOException {
-        if (getPackageMajver() < JAVA6_PACKAGE_MAJOR_VERSION) {
+    private void adjustToClassVersion() throws IOException {
+        if (getHighestClassVersion().lessThan(JAVA6_MAX_CLASS_VERSION)) {
             if (verbose > 0)  Utils.log.fine("Legacy package version");
             // Revoke definition of pre-1.6 attribute type.
             undefineAttribute(CODE_ATTR_StackMapTable, ATTR_CONTEXT_CODE);
         }
-        if (getPackageMajver() < JAVA7_PACKAGE_MAJOR_VERSION) {
-            if (testBit(archiveOptions, AO_HAVE_CP_EXTRAS))
-                // this bit was reserved for future use in previous versions
-                throw new IOException("Format bits for Java 7 must be zero in previous releases");
-        }
-        if (testBit(archiveOptions, AO_UNUSED_MBZ)) {
-            throw new IOException("High archive option bits are reserved and must be zero: "+Integer.toHexString(archiveOptions));
-        }
     }
 
     protected void initAttrIndexLimit() {
@@ -1942,21 +1931,14 @@
         }
     }
 
-    protected Attribute makeClassFileVersionAttr(int minver, int majver) {
-        byte[] bytes = {
-            (byte)(minver >> 8), (byte)minver,
-            (byte)(majver >> 8), (byte)majver
-        };
-        return attrClassFileVersion.addContent(bytes);
+    protected Attribute makeClassFileVersionAttr(Package.Version ver) {
+        return attrClassFileVersion.addContent(ver.asBytes());
     }
 
-    protected short[] parseClassFileVersionAttr(Attribute attr) {
+    protected Package.Version parseClassFileVersionAttr(Attribute attr) {
         assert(attr.layout() == attrClassFileVersion);
         assert(attr.size() == 4);
-        byte[] bytes = attr.bytes();
-        int minver = ((bytes[0] & 0xFF) << 8) | (bytes[1] & 0xFF);
-        int majver = ((bytes[2] & 0xFF) << 8) | (bytes[3] & 0xFF);
-        return new short[]{ (short) minver, (short) majver };
+        return Package.Version.of(attr.bytes());
     }
 
     private boolean assertBandOKForElems(Band[] ab, Attribute.Layout.Element[] elems) {
--- a/jdk/src/share/classes/com/sun/java/util/jar/pack/ClassReader.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/com/sun/java/util/jar/pack/ClassReader.java	Fri Jun 08 12:44:30 2012 -0700
@@ -174,27 +174,31 @@
                 ("Bad magic number in class file "
                  +Integer.toHexString(cls.magic),
                  ATTR_CONTEXT_CLASS, "magic-number", "pass");
-        cls.minver = (short) readUnsignedShort();
-        cls.majver = (short) readUnsignedShort();
+        int minver = (short) readUnsignedShort();
+        int majver = (short) readUnsignedShort();
+        cls.version = Package.Version.of(majver, minver);
+
         //System.out.println("ClassFile.version="+cls.majver+"."+cls.minver);
-        String bad = checkVersion(cls.majver, cls.minver);
+        String bad = checkVersion(cls.version);
         if (bad != null) {
             throw new Attribute.FormatException
                 ("classfile version too "+bad+": "
-                 +cls.majver+"."+cls.minver+" in "+cls.file,
+                 +cls.version+" in "+cls.file,
                  ATTR_CONTEXT_CLASS, "version", "pass");
         }
     }
 
-    private String checkVersion(int majver, int minver) {
-        if (majver < pkg.min_class_majver ||
-            (majver == pkg.min_class_majver &&
-             minver < pkg.min_class_minver)) {
+    private String checkVersion(Package.Version ver) {
+        int majver = ver.major;
+        int minver = ver.minor;
+        if (majver < pkg.minClassVersion.major ||
+            (majver == pkg.minClassVersion.major &&
+             minver < pkg.minClassVersion.minor)) {
             return "small";
         }
-        if (majver > pkg.max_class_majver ||
-            (majver == pkg.max_class_majver &&
-             minver > pkg.max_class_minver)) {
+        if (majver > pkg.maxClassVersion.major ||
+            (majver == pkg.maxClassVersion.major &&
+             minver > pkg.maxClassVersion.minor)) {
             return "large";
         }
         return null;  // OK
--- a/jdk/src/share/classes/com/sun/java/util/jar/pack/ClassWriter.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/com/sun/java/util/jar/pack/ClassWriter.java	Fri Jun 08 12:44:30 2012 -0700
@@ -113,8 +113,8 @@
 
     void writeMagicNumbers() throws IOException {
         writeInt(cls.magic);
-        writeShort(cls.minver);
-        writeShort(cls.majver);
+        writeShort(cls.version.minor);
+        writeShort(cls.version.major);
     }
 
     void writeConstantPool() throws IOException {
--- a/jdk/src/share/classes/com/sun/java/util/jar/pack/Constants.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/com/sun/java/util/jar/pack/Constants.java	Fri Jun 08 12:44:30 2012 -0700
@@ -43,30 +43,40 @@
         1.0 to 1.3.X 45,3
         1.4 to 1.4.X 46,0
         1.5 to 1.5.X 49,0
-        1.6 to 1.5.x 50,0 NOTE Assumed for now
+        1.6 to 1.5.x 50,0
+        1.7 to 1.6.x 51,0
     */
 
-    public final static short JAVA_MIN_CLASS_MAJOR_VERSION = 45;
-    public final static short JAVA_MIN_CLASS_MINOR_VERSION = 03;
+    public final static Package.Version JAVA_MIN_CLASS_VERSION =
+            Package.Version.of(45, 03);
 
-    public final static short JAVA5_MAX_CLASS_MAJOR_VERSION = 49;
-    public final static short JAVA5_MAX_CLASS_MINOR_VERSION = 0;
+    public final static Package.Version JAVA5_MAX_CLASS_VERSION =
+            Package.Version.of(49, 00);
 
-    public final static short JAVA6_MAX_CLASS_MAJOR_VERSION = 50;
-    public final static short JAVA6_MAX_CLASS_MINOR_VERSION = 0;
+    public final static Package.Version JAVA6_MAX_CLASS_VERSION =
+            Package.Version.of(50, 00);
 
-    public final static short JAVA7_MAX_CLASS_MAJOR_VERSION = 51;
-    public final static short JAVA7_MAX_CLASS_MINOR_VERSION = 0;
+    public final static Package.Version JAVA7_MAX_CLASS_VERSION =
+            Package.Version.of(51, 00);
 
     public final static int JAVA_PACKAGE_MAGIC = 0xCAFED00D;
-    public final static int JAVA5_PACKAGE_MAJOR_VERSION = 150;
-    public final static int JAVA5_PACKAGE_MINOR_VERSION = 7;
 
-    public final static int JAVA6_PACKAGE_MAJOR_VERSION = 160;
-    public final static int JAVA6_PACKAGE_MINOR_VERSION = 1;
+    public final static Package.Version JAVA5_PACKAGE_VERSION =
+            Package.Version.of(150, 7);
 
-    public final static int JAVA7_PACKAGE_MAJOR_VERSION = 170;
-    public final static int JAVA7_PACKAGE_MINOR_VERSION = 1;
+    public final static Package.Version JAVA6_PACKAGE_VERSION =
+            Package.Version.of(160, 1);
+
+    public final static Package.Version JAVA7_PACKAGE_VERSION =
+            Package.Version.of(170, 1);
+
+    // upper limit, should point to the latest class version
+    public final static Package.Version JAVA_MAX_CLASS_VERSION =
+            JAVA7_MAX_CLASS_VERSION;
+
+    // upper limit should point to the latest package version, for version info!.
+    public final static Package.Version MAX_PACKAGE_VERSION =
+            JAVA7_PACKAGE_VERSION;
 
     public final static int CONSTANT_POOL_INDEX_LIMIT  = 0x10000;
     public final static int CONSTANT_POOL_NARROW_LIMIT = 0x00100;
--- a/jdk/src/share/classes/com/sun/java/util/jar/pack/Package.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/com/sun/java/util/jar/pack/Package.java	Fri Jun 08 12:44:30 2012 -0700
@@ -25,6 +25,7 @@
 
 package com.sun.java.util.jar.pack;
 
+import java.util.jar.Pack200;
 import com.sun.java.util.jar.pack.Attribute.Layout;
 import com.sun.java.util.jar.pack.ConstantPool.ClassEntry;
 import com.sun.java.util.jar.pack.ConstantPool.DescriptorEntry;
@@ -67,46 +68,58 @@
             verbose = pmap.getInteger(Utils.DEBUG_VERBOSE);
     }
 
-    int magic;
-    int package_minver;
-    int package_majver;
+    final int magic = JAVA_PACKAGE_MAGIC;
 
     int default_modtime = NO_MODTIME;
     int default_options = 0;  // FO_DEFLATE_HINT
 
-    short default_class_majver = -1; // fill in later
-    short default_class_minver = 0;  // fill in later
+    Version defaultClassVersion = null;
 
     // These fields can be adjusted by driver properties.
-    short min_class_majver = JAVA_MIN_CLASS_MAJOR_VERSION;
-    short min_class_minver = JAVA_MIN_CLASS_MINOR_VERSION;
-    short max_class_majver = JAVA7_MAX_CLASS_MAJOR_VERSION;
-    short max_class_minver = JAVA7_MAX_CLASS_MINOR_VERSION;
+    final Version minClassVersion;
+    final Version maxClassVersion;
+    // null, indicates that consensus rules during package write
+    final Version packageVersion;
 
-    short observed_max_class_majver = min_class_majver;
-    short observed_max_class_minver = min_class_minver;
+    Version observedHighestClassVersion = null;
+
 
     // What constants are used in this unit?
     ConstantPool.IndexGroup cp = new ConstantPool.IndexGroup();
 
-    Package() {
-        magic          = JAVA_PACKAGE_MAGIC;
-        package_minver = -1;  // fill in later
-        package_majver = 0;   // fill in later
+    /*
+     * typically used by the PackageReader to set the defaults, in which
+     * case we take the defaults.
+     */
+    public Package() {
+        minClassVersion = JAVA_MIN_CLASS_VERSION;
+        maxClassVersion = JAVA_MAX_CLASS_VERSION;
+        packageVersion = null;
     }
 
-    public
-    void reset() {
+
+    /*
+     * Typically used by the PackerImpl during before packing, the defaults are
+     * overridden by the users preferences.
+     */
+    public Package(Version minClassVersion, Version maxClassVersion, Version packageVersion) {
+        // Fill in permitted range of major/minor version numbers.
+        this.minClassVersion = minClassVersion == null
+                ? JAVA_MIN_CLASS_VERSION
+                : minClassVersion;
+        this.maxClassVersion = maxClassVersion == null
+                ? JAVA_MAX_CLASS_VERSION
+                : maxClassVersion;
+        this.packageVersion  = packageVersion;
+    }
+
+
+    public void reset() {
         cp = new ConstantPool.IndexGroup();
         classes.clear();
         files.clear();
         BandStructure.nextSeqForDebug = 0;
-        package_minver = -1;  // fill in later
-        package_majver = 0;   // fill in later
-    }
-
-    int getPackageVersion() {
-        return (package_majver << 16) + package_minver;
+        observedHighestClassVersion = null;
     }
 
     // Special empty versions of Code and InnerClasses, used for markers.
@@ -128,73 +141,31 @@
         attrDefs = Collections.unmodifiableMap(ad);
     }
 
-    int getDefaultClassVersion() {
-        return (default_class_majver << 16) + (char)default_class_minver;
+    Version getDefaultClassVersion() {
+        return defaultClassVersion;
     }
 
     /** Return the highest version number of all classes,
      *  or 0 if there are no classes.
      */
-    int getHighestClassVersion() {
-        int res = 0;  // initial low value
+    private void setHighestClassVersion() {
+        if (observedHighestClassVersion != null)
+            return;
+        Version res = JAVA_MIN_CLASS_VERSION;  // initial low value
         for (Class cls : classes) {
-            int ver = cls.getVersion();
-            if (res < ver)  res = ver;
+            Version ver = cls.getVersion();
+            if (res.lessThan(ver))  res = ver;
         }
-        return res;
+        observedHighestClassVersion = res;
     }
 
-    /** Convenience function to choose an archive version based
-     *  on the class file versions observed within the archive.
-     */
-    void choosePackageVersion() {
-        assert(package_majver <= 0);  // do not call this twice
-        int classver = getHighestClassVersion();
-        if (classver == 0 || (classver >>> 16) < JAVA6_MAX_CLASS_MAJOR_VERSION) {
-            // There are only old classfiles in this segment or resources
-            package_majver = JAVA5_PACKAGE_MAJOR_VERSION;
-            package_minver = JAVA5_PACKAGE_MINOR_VERSION;
-        } else if ((classver >>> 16) == JAVA6_MAX_CLASS_MAJOR_VERSION) {
-            package_majver = JAVA6_PACKAGE_MAJOR_VERSION;
-            package_minver = JAVA6_PACKAGE_MINOR_VERSION;
-        } else {
-            // Normal case.  Use the newest archive format, when available
-            package_majver = JAVA7_PACKAGE_MAJOR_VERSION;
-            package_minver = JAVA7_PACKAGE_MINOR_VERSION;
-        }
+    Version getHighestClassVersion() {
+        setHighestClassVersion();
+        return observedHighestClassVersion;
     }
 
     // What Java classes are in this unit?
 
-    // Fixed 6211177, converted to throw IOException
-    void checkVersion() throws IOException {
-        if (magic != JAVA_PACKAGE_MAGIC) {
-            String gotMag = Integer.toHexString(magic);
-            String expMag = Integer.toHexString(JAVA_PACKAGE_MAGIC);
-            throw new IOException("Unexpected package magic number: got "+gotMag+"; expected "+expMag);
-        }
-        int[] majminFound = null;
-        for (int[] majmin : new int[][]{
-                { JAVA7_PACKAGE_MAJOR_VERSION, JAVA7_PACKAGE_MINOR_VERSION },
-                { JAVA6_PACKAGE_MAJOR_VERSION, JAVA6_PACKAGE_MINOR_VERSION },
-                { JAVA5_PACKAGE_MAJOR_VERSION, JAVA5_PACKAGE_MINOR_VERSION }
-            }) {
-            if (package_majver == majmin[0] && package_minver == majmin[1]) {
-                majminFound = majmin;
-                break;
-            }
-        }
-        if (majminFound == null) {
-            String gotVer = package_majver+"."+package_minver;
-            String expVer = JAVA7_PACKAGE_MAJOR_VERSION+"."+JAVA7_PACKAGE_MINOR_VERSION+
-                            " OR "+
-                            JAVA6_PACKAGE_MAJOR_VERSION+"."+JAVA6_PACKAGE_MINOR_VERSION+
-                            " OR "+
-                            JAVA5_PACKAGE_MAJOR_VERSION+"."+JAVA5_PACKAGE_MINOR_VERSION;
-            throw new IOException("Unexpected package minor version: got "+gotVer+"; expected "+expVer);
-        }
-    }
-
     ArrayList<Package.Class> classes = new ArrayList<>();
 
     public List<Package.Class> getClasses() {
@@ -210,7 +181,7 @@
 
         // File header
         int magic;
-        short minver, majver;
+        Version version;
 
         // Local constant pool (one-way mapping of index => package cp).
         Entry[] cpMap;
@@ -231,8 +202,7 @@
 
         Class(int flags, ClassEntry thisClass, ClassEntry superClass, ClassEntry[] interfaces) {
             this.magic      = JAVA_MAGIC;
-            this.minver     = default_class_minver;
-            this.majver     = default_class_majver;
+            this.version    = defaultClassVersion;
             this.flags      = flags;
             this.thisClass  = thisClass;
             this.superClass = superClass;
@@ -254,11 +224,8 @@
             return thisClass.stringValue();
         }
 
-        int getVersion() {
-            return (majver << 16) + (char)minver;
-        }
-        String getVersionString() {
-            return versionStringOf(majver, minver);
+        Version getVersion() {
+            return this.version;
         }
 
         // Note:  equals and hashCode are identity-based.
@@ -1182,13 +1149,6 @@
         }
     }
 
-    public static String versionStringOf(int majver, int minver) {
-        return majver+"."+minver;
-    }
-    public static String versionStringOf(int version) {
-        return versionStringOf(version >>> 16, (char)version);
-    }
-
     public void stripConstantFields() {
         for (Class c : classes) {
             for (Iterator<Class.Field> j = c.fields.iterator(); j.hasNext(); ) {
@@ -1342,4 +1302,75 @@
     static final List<Class.Field> noFields = Arrays.asList(new Class.Field[0]);
     static final List<Class.Method> noMethods = Arrays.asList(new Class.Method[0]);
     static final List<InnerClass> noInnerClasses = Arrays.asList(new InnerClass[0]);
+
+    protected static final class Version {
+
+        public final short major;
+        public final short minor;
+
+        private Version(short major, short minor) {
+            this.major = major;
+            this.minor = minor;
+        }
+
+        public String toString() {
+            return major + "." + minor;
+        }
+
+        public boolean equals(Object that) {
+            return that instanceof Version
+                    && major == ((Version)that).major
+                    && minor == ((Version)that).minor;
+        }
+
+        public int intValue() {
+            return (major << 16) + minor;
+        }
+
+        public int hashCode() {
+            return (major << 16) + 7 + minor;
+        }
+
+        public static Version of(int major, int minor) {
+            return new Version((short)major, (short)minor);
+        }
+
+        public static Version of(byte[] bytes) {
+           int minor = ((bytes[0] & 0xFF) << 8) | (bytes[1] & 0xFF);
+           int major = ((bytes[2] & 0xFF) << 8) | (bytes[3] & 0xFF);
+           return new Version((short)major, (short)minor);
+        }
+
+        public static Version of(int major_minor) {
+            short minor = (short)major_minor;
+            short major = (short)(major_minor >>> 16);
+            return new Version(major, minor);
+        }
+
+        public static Version makeVersion(PropMap props, String partialKey) {
+            int min = props.getInteger(Utils.COM_PREFIX
+                    + partialKey + ".minver", -1);
+            int maj = props.getInteger(Utils.COM_PREFIX
+                    + partialKey + ".majver", -1);
+            return min >= 0 && maj >= 0 ? Version.of(maj, min) : null;
+        }
+        public byte[] asBytes() {
+            byte[] bytes = {
+                (byte) (minor >> 8), (byte) minor,
+                (byte) (major >> 8), (byte) major
+            };
+            return bytes;
+        }
+        public int compareTo(Version that) {
+            return this.intValue() - that.intValue();
+        }
+
+        public boolean lessThan(Version that) {
+            return compareTo(that) < 0 ;
+        }
+
+        public boolean greaterThan(Version that) {
+            return compareTo(that) > 0 ;
+        }
+    }
 }
--- a/jdk/src/share/classes/com/sun/java/util/jar/pack/PackageReader.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/com/sun/java/util/jar/pack/PackageReader.java	Fri Jun 08 12:44:30 2012 -0700
@@ -60,6 +60,7 @@
     Package pkg;
     byte[] bytes;
     LimitedBuffer in;
+    Package.Version packageVersion;
 
     PackageReader(Package pkg, InputStream in) throws IOException {
         this.pkg = pkg;
@@ -220,7 +221,6 @@
     final static int MAGIC_BYTES = 4;
 
     void readArchiveMagic() throws IOException {
-
         // Read a minimum of bytes in the first gulp.
         in.setReadLimit(MAGIC_BYTES + AH_LENGTH_MIN);
 
@@ -230,10 +230,38 @@
         archive_magic.readFrom(in);
 
         // read and check magic numbers:
-        pkg.magic = getMagicInt32();
+        int magic = getMagicInt32();
+        if (pkg.magic != magic) {
+            throw new IOException("Unexpected package magic number: got "
+                    + magic + "; expected " + pkg.magic);
+        }
         archive_magic.doneDisbursing();
     }
 
+     // Fixed 6211177, converted to throw IOException
+    void checkArchiveVersion() throws IOException {
+        Package.Version versionFound = null;
+        for (Package.Version v : new Package.Version[] {
+                JAVA7_PACKAGE_VERSION,
+                JAVA6_PACKAGE_VERSION,
+                JAVA5_PACKAGE_VERSION
+            }) {
+            if (packageVersion.equals(v)) {
+                versionFound = v;
+                break;
+            }
+        }
+        if (versionFound == null) {
+            String expVer = JAVA7_PACKAGE_VERSION.toString()
+                            + " OR "
+                            + JAVA6_PACKAGE_VERSION.toString()
+                            + " OR "
+                            + JAVA5_PACKAGE_VERSION.toString();
+            throw new IOException("Unexpected package minor version: got "
+                    +  packageVersion.toString() + "; expected " + expVer);
+        }
+    }
+
     void readArchiveHeader() throws IOException {
         //  archive_header:
         //        #archive_minver :UNSIGNED5[1]
@@ -264,10 +292,11 @@
         archive_header_0.expectLength(AH_LENGTH_0);
         archive_header_0.readFrom(in);
 
-        pkg.package_minver = archive_header_0.getInt();
-        pkg.package_majver = archive_header_0.getInt();
-        pkg.checkVersion();
-        this.initPackageMajver(pkg.package_majver);
+        int minver = archive_header_0.getInt();
+        int majver = archive_header_0.getInt();
+        packageVersion = Package.Version.of(majver, minver);
+        checkArchiveVersion();
+        this.initHighestClassVersion(JAVA7_MAX_CLASS_VERSION);
 
         archiveOptions = archive_header_0.getInt();
         archive_header_0.doneDisbursing();
@@ -324,8 +353,9 @@
 
         numInnerClasses = archive_header_1.getInt();
 
-        pkg.default_class_minver = (short) archive_header_1.getInt();
-        pkg.default_class_majver = (short) archive_header_1.getInt();
+        minver = (short) archive_header_1.getInt();
+        majver = (short) archive_header_1.getInt();
+        pkg.defaultClassVersion = Package.Version.of(majver, minver);
         numClasses = archive_header_1.getInt();
 
         archive_header_1.doneDisbursing();
@@ -414,7 +444,7 @@
     }
 
     void checkLegacy(String bandname) {
-        if (this.pkg.package_majver < JAVA7_PACKAGE_MAJOR_VERSION) {
+        if (packageVersion.lessThan(JAVA7_PACKAGE_VERSION)) {
             throw new RuntimeException("unexpected band " + bandname);
         }
     }
@@ -947,9 +977,9 @@
                                                             name.stringValue(),
                                                             layout.stringValue());
                 // Check layout string for Java 6 extensions.
-                String pvLayout = def.layoutForPackageMajver(getPackageMajver());
+                String pvLayout = def.layoutForClassVersion(getHighestClassVersion());
                 if (!pvLayout.equals(def.layout())) {
-                    throw new IOException("Bad attribute layout in version 150 archive: "+def.layout());
+                    throw new IOException("Bad attribute layout in archive: "+def.layout());
                 }
                 this.setAttributeLayoutIndex(def, index);
                 if (dump != null)  dump.println(index+" "+def);
@@ -1140,12 +1170,9 @@
         Attribute retroVersion = cls.getAttribute(attrClassFileVersion);
         if (retroVersion != null) {
             cls.removeAttribute(retroVersion);
-            short[] minmajver = parseClassFileVersionAttr(retroVersion);
-            cls.minver = minmajver[0];
-            cls.majver = minmajver[1];
+            cls.version = parseClassFileVersionAttr(retroVersion);
         } else {
-            cls.minver = pkg.default_class_minver;
-            cls.majver = pkg.default_class_majver;
+            cls.version = pkg.defaultClassVersion;
         }
 
         // Replace null SourceFile by "obvious" string.
--- a/jdk/src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/com/sun/java/util/jar/pack/PackageWriter.java	Fri Jun 08 12:44:30 2012 -0700
@@ -49,12 +49,13 @@
 class PackageWriter extends BandStructure {
     Package pkg;
     OutputStream finalOut;
+    Package.Version packageVersion;
 
     PackageWriter(Package pkg, OutputStream out) throws IOException {
         this.pkg = pkg;
         this.finalOut = out;
-        // Caller has specified archive version in the package:
-        initPackageMajver(pkg.package_majver);
+        // Caller has specified maximum class file version in the package:
+        initHighestClassVersion(pkg.getHighestClassVersion());
     }
 
     void write() throws IOException {
@@ -118,6 +119,57 @@
         collectInnerClasses();
     }
 
+    /*
+     * Convenience function to choose an archive version based
+     * on the class file versions observed within the archive
+     * or set the user defined version preset via properties.
+     */
+    void chooseDefaultPackageVersion() throws IOException {
+        if (pkg.packageVersion != null) {
+            packageVersion = pkg.packageVersion;
+            if (verbose > 0) {
+                Utils.log.info("package version overridden with: "
+                                + packageVersion);
+            }
+            return;
+        }
+
+        Package.Version highV = getHighestClassVersion();
+        // set the package version now
+        if (highV.lessThan(JAVA6_MAX_CLASS_VERSION)) {
+            // There are only old classfiles in this segment or resources
+            packageVersion = JAVA5_PACKAGE_VERSION;
+        } else if (highV.equals(JAVA6_MAX_CLASS_VERSION) ||
+                (highV.equals(JAVA7_MAX_CLASS_VERSION) && !pkg.cp.haveExtraTags())) {
+            // force down the package version if we have jdk7 classes without
+            // any Indy references, this is because jdk7 class file (52.0) without
+            // Indy is identical to jdk6 class file (51.0).
+            packageVersion = JAVA6_PACKAGE_VERSION;
+        } else {
+            // Normal case.  Use the newest archive format, when available
+            packageVersion = JAVA7_PACKAGE_VERSION;
+        }
+
+        if (verbose > 0) {
+            Utils.log.info("Highest version class file: " + highV
+                    + " package version: " + packageVersion);
+        }
+    }
+
+    void checkVersion() throws IOException {
+        assert(packageVersion != null);
+
+        if (packageVersion.lessThan(JAVA7_PACKAGE_VERSION)) {
+            // this bit was reserved for future use in previous versions
+            if (testBit(archiveOptions, AO_HAVE_CP_EXTRAS)) {
+                throw new IOException("Format bits for Java 7 must be zero in previous releases");
+            }
+        }
+        if (testBit(archiveOptions, AO_UNUSED_MBZ)) {
+            throw new IOException("High archive option bits are reserved and must be zero: " + Integer.toHexString(archiveOptions));
+        }
+    }
+
     void setArchiveOptions() {
         // Decide on some archive options early.
         // Does not decide on: AO_HAVE_SPECIAL_FORMATS,
@@ -168,11 +220,11 @@
             }
         }
         // Decide on default version number (majority rule).
-        Map<Integer, int[]> verCounts = new HashMap<>();
+        Map<Package.Version, int[]> verCounts = new HashMap<>();
         int bestCount = 0;
-        int bestVersion = -1;
+        Package.Version bestVersion = null;
         for (Class cls : pkg.classes) {
-            int version = cls.getVersion();
+            Package.Version version = cls.getVersion();
             int[] var = verCounts.get(version);
             if (var == null) {
                 var = new int[1];
@@ -186,28 +238,22 @@
             }
         }
         verCounts.clear();
-        if (bestVersion == -1)  bestVersion = 0;  // degenerate case
-        int bestMajver = (char)(bestVersion >>> 16);
-        int bestMinver = (char)(bestVersion);
-        pkg.default_class_majver = (short) bestMajver;
-        pkg.default_class_minver = (short) bestMinver;
-        String bestVerStr = Package.versionStringOf(bestMajver, bestMinver);
+        if (bestVersion == null)  bestVersion = JAVA_MIN_CLASS_VERSION;  // degenerate case
+        pkg.defaultClassVersion = bestVersion;
         if (verbose > 0)
-           Utils.log.info("Consensus version number in segment is "+bestVerStr);
+           Utils.log.info("Consensus version number in segment is " + bestVersion);
         if (verbose > 0)
-            Utils.log.info("Highest version number in segment is "+
-                           Package.versionStringOf(pkg.getHighestClassVersion()));
+            Utils.log.info("Highest version number in segment is "
+                            + pkg.getHighestClassVersion());
 
         // Now add explicit pseudo-attrs. to classes with odd versions.
         for (Class cls : pkg.classes) {
-            if (cls.getVersion() != bestVersion) {
-                Attribute a = makeClassFileVersionAttr(cls.minver, cls.majver);
+            if (!cls.getVersion().equals(bestVersion)) {
+                Attribute a = makeClassFileVersionAttr(cls.getVersion());
                 if (verbose > 1) {
-                    String clsVer = cls.getVersionString();
-                    String pkgVer = bestVerStr;
-                    Utils.log.fine("Version "+clsVer+" of "+cls
-                                     +" doesn't match package version "
-                                     +pkgVer);
+                    Utils.log.fine("Version "+cls.getVersion() + " of " + cls
+                                     + " doesn't match package version "
+                                     + bestVersion);
                 }
                 // Note:  Does not add in "natural" order.  (Who cares?)
                 cls.addAttribute(a);
@@ -252,7 +298,7 @@
     }
 
     void writeFileHeader() throws IOException {
-        pkg.checkVersion();
+        chooseDefaultPackageVersion();
         writeArchiveMagic();
         writeArchiveHeader();
     }
@@ -322,12 +368,13 @@
         if (haveCPExtra)
             headerSizeForDebug += AH_CP_EXTRA_LEN;
 
-        assert(pkg.package_majver > 0);  // caller must specify!
-        archive_header_0.putInt(pkg.package_minver);
-        archive_header_0.putInt(pkg.package_majver);
+        // the archiveOptions are all initialized, sanity check now!.
+        checkVersion();
+
+        archive_header_0.putInt(packageVersion.minor);
+        archive_header_0.putInt(packageVersion.major);
         if (verbose > 0)
-            Utils.log.info("Package Version for this segment:"+
-                           Package.versionStringOf(pkg.getPackageVersion()));
+            Utils.log.info("Package Version for this segment:" + packageVersion);
         archive_header_0.putInt(archiveOptions); // controls header format
         assert(archive_header_0.length() == AH_LENGTH_0);
 
@@ -361,8 +408,8 @@
         writeConstantPoolCounts(haveNumbers, haveCPExtra);
 
         archive_header_1.putInt(pkg.getAllInnerClasses().size());
-        archive_header_1.putInt(pkg.default_class_minver);
-        archive_header_1.putInt(pkg.default_class_majver);
+        archive_header_1.putInt(pkg.defaultClassVersion.minor);
+        archive_header_1.putInt(pkg.defaultClassVersion.major);
         archive_header_1.putInt(pkg.classes.size());
 
         // Sanity:  Make sure we came out to 29 (less optional fields):
@@ -892,7 +939,7 @@
                 if (predefIndex == null) {
                     // Make sure the package CP can name the local attribute.
                     Entry ne = ConstantPool.getUtf8Entry(def.name());
-                    String layout = def.layoutForPackageMajver(getPackageMajver());
+                    String layout = def.layoutForClassVersion(getHighestClassVersion());
                     Entry le = ConstantPool.getUtf8Entry(layout);
                     requiredEntries.add(ne);
                     requiredEntries.add(le);
@@ -988,7 +1035,7 @@
                 assert((header & ADH_CONTEXT_MASK) == def.ctype());
                 attr_definition_headers.putByte(header);
                 attr_definition_name.putRef(ConstantPool.getUtf8Entry(def.name()));
-                String layout = def.layoutForPackageMajver(getPackageMajver());
+                String layout = def.layoutForClassVersion(getHighestClassVersion());
                 attr_definition_layout.putRef(ConstantPool.getUtf8Entry(layout));
                 // Check that we are transmitting that correct attribute index:
                 boolean debug = false;
@@ -1542,8 +1589,8 @@
                         break;
                     default:
                         // CONSTANT_MethodHandle, etc.
-                        if (getPackageMajver() < JAVA7_PACKAGE_MAJOR_VERSION) {
-                            throw new IOException("bad package major version for Java 7 ldc");
+                        if (getHighestClassVersion().lessThan(JAVA7_MAX_CLASS_VERSION)) {
+                            throw new IOException("bad class file major version for Java 7 ldc");
                         }
                         bc_which = bc_loadablevalueref;
                         switch (bc) {
@@ -1581,8 +1628,8 @@
                     // Make sure the discarded bytes are sane:
                     assert(i.getConstant() == (1+((MemberEntry)ref).descRef.typeRef.computeSize(true)) << 8);
                 } else if (bc == _invokedynamic) {
-                    if (getPackageMajver() < JAVA7_PACKAGE_MAJOR_VERSION) {
-                        throw new IOException("bad package major version for Java 7 invokedynamic");
+                    if (getHighestClassVersion().lessThan(JAVA7_MAX_CLASS_VERSION)) {
+                        throw new IOException("bad class major version for Java 7 invokedynamic");
                     }
                     assert(i.getLength() == 5);
                     assert(i.getConstant() == 0);  // last 2 bytes MBZ
--- a/jdk/src/share/classes/com/sun/java/util/jar/pack/PackerImpl.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/com/sun/java/util/jar/pack/PackerImpl.java	Fri Jun 08 12:44:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -164,8 +164,11 @@
             if (verbose > 0) Utils.log.info(props.toString());
         }
 
-        // Here's where the bits are collected before getting packed:
-        final Package pkg = new Package();
+        // Here's where the bits are collected before getting packed, we also
+        // initialize the version numbers now.
+        final Package pkg = new Package(Package.Version.makeVersion(props, "min.class"),
+                                        Package.Version.makeVersion(props, "max.class"),
+                                        Package.Version.makeVersion(props, "package"));
 
         final String unknownAttrCommand;
         {
@@ -280,23 +283,6 @@
         }
 
         {
-            // Fill in permitted range of major/minor version numbers.
-            int ver;
-            if ((ver = props.getInteger(Utils.COM_PREFIX+"min.class.majver")) != 0)
-                pkg.min_class_majver = (short) ver;
-            if ((ver = props.getInteger(Utils.COM_PREFIX+"min.class.minver")) != 0)
-                pkg.min_class_minver = (short) ver;
-            if ((ver = props.getInteger(Utils.COM_PREFIX+"max.class.majver")) != 0)
-                pkg.max_class_majver = (short) ver;
-            if ((ver = props.getInteger(Utils.COM_PREFIX+"max.class.minver")) != 0)
-                pkg.max_class_minver = (short) ver;
-            if ((ver = props.getInteger(Utils.COM_PREFIX+"package.minver")) != 0)
-                pkg.package_minver = (short) ver;
-            if ((ver = props.getInteger(Utils.COM_PREFIX+"package.majver")) != 0)
-                pkg.package_majver = (short) ver;
-        }
-
-        {
             // Hook for testing:  Forces use of special archive modes.
             int opt = props.getInteger(Utils.COM_PREFIX+"archive.options");
             if (opt != 0)
@@ -603,9 +589,6 @@
             if (props.getBoolean(Utils.COM_PREFIX+"strip.exceptions"))   pkg.stripAttributeKind("Exceptions");
             if (props.getBoolean(Utils.COM_PREFIX+"strip.innerclasses")) pkg.stripAttributeKind("InnerClasses");
 
-            // Must choose an archive version; PackageWriter does not.
-            if (pkg.package_majver <= 0)  pkg.choosePackageVersion();
-
             PackageWriter pw = new PackageWriter(pkg, out);
             pw.archiveNextCount = nextCount;
             pw.write();
--- a/jdk/src/share/classes/com/sun/java/util/jar/pack/PropMap.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/com/sun/java/util/jar/pack/PropMap.java	Fri Jun 08 12:44:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -193,13 +193,18 @@
     boolean setBoolean(String s, boolean val) {
         return toBoolean(setProperty(s, String.valueOf(val)));
     }
-
     int toInteger(String val) {
-        if (val == null)  return 0;
+        return toInteger(val, 0);
+    }
+    int toInteger(String val, int def) {
+        if (val == null)  return def;
         if (Pack200.Packer.TRUE.equals(val))   return 1;
         if (Pack200.Packer.FALSE.equals(val))  return 0;
         return Integer.parseInt(val);
     }
+    int getInteger(String s, int def) {
+        return toInteger(getProperty(s), def);
+    }
     int getInteger(String s) {
         return toInteger(getProperty(s));
     }
--- a/jdk/src/share/classes/com/sun/java/util/jar/pack/Utils.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/com/sun/java/util/jar/pack/Utils.java	Fri Jun 08 12:44:30 2012 -0700
@@ -25,12 +25,6 @@
 
 package com.sun.java.util.jar.pack;
 
-import com.sun.java.util.jar.pack.ConstantPool.ClassEntry;
-import com.sun.java.util.jar.pack.ConstantPool.DescriptorEntry;
-import com.sun.java.util.jar.pack.ConstantPool.LiteralEntry;
-import com.sun.java.util.jar.pack.ConstantPool.MemberEntry;
-import com.sun.java.util.jar.pack.ConstantPool.SignatureEntry;
-import com.sun.java.util.jar.pack.ConstantPool.Utf8Entry;
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
 import java.io.File;
@@ -38,9 +32,8 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.util.Collections;
 import java.util.Date;
-import java.util.Enumeration;
-import java.util.Map;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
 import java.util.jar.JarInputStream;
@@ -211,9 +204,7 @@
     static String getVersionString() {
         return "Pack200, Vendor: " +
             System.getProperty("java.vendor") +
-            ", Version: " +
-            Constants.JAVA6_PACKAGE_MAJOR_VERSION + "." +
-            Constants.JAVA6_PACKAGE_MINOR_VERSION;
+            ", Version: " + Constants.MAX_PACKAGE_VERSION;
     }
 
     static void markJarFile(JarOutputStream out) throws IOException {
@@ -240,8 +231,7 @@
     }
     static void copyJarFile(JarFile in, JarOutputStream out) throws IOException {
         byte[] buffer = new byte[1 << 14];
-        for (Enumeration<JarEntry> e = in.entries(); e.hasMoreElements(); ) {
-            JarEntry je = e.nextElement();
+        for (JarEntry je : Collections.list(in.entries())) {
             out.putNextEntry(je);
             InputStream ein = in.getInputStream(je);
             for (int nr; 0 < (nr = ein.read(buffer)); ) {
--- a/jdk/src/share/classes/java/lang/IllegalArgumentException.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/lang/IllegalArgumentException.java	Fri Jun 08 12:44:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 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
@@ -30,7 +30,6 @@
  * inappropriate argument.
  *
  * @author  unascribed
- * @see     java.lang.Thread#setPriority(int)
  * @since   JDK1.0
  */
 public
--- a/jdk/src/share/classes/java/lang/Integer.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/lang/Integer.java	Fri Jun 08 12:44:30 2012 -0700
@@ -381,7 +381,7 @@
         int size = (i < 0) ? stringSize(-i) + 1 : stringSize(i);
         char[] buf = new char[size];
         getChars(i, size, buf);
-        return new String(0, size, buf);
+        return new String(buf, true);
     }
 
     /**
--- a/jdk/src/share/classes/java/lang/Long.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/lang/Long.java	Fri Jun 08 12:44:30 2012 -0700
@@ -373,7 +373,7 @@
         int size = (i < 0) ? stringSize(-i) + 1 : stringSize(i);
         char[] buf = new char[size];
         getChars(i, size, buf);
-        return new String(0, size, buf);
+        return new String(buf, true);
     }
 
     /**
--- a/jdk/src/share/classes/java/lang/NumberFormatException.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/lang/NumberFormatException.java	Fri Jun 08 12:44:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 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
@@ -31,7 +31,7 @@
  * have the appropriate format.
  *
  * @author  unascribed
- * @see     java.lang.Integer#toString()
+ * @see     java.lang.Integer#parseInt(String)
  * @since   JDK1.0
  */
 public
--- a/jdk/src/share/classes/java/lang/String.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/lang/String.java	Fri Jun 08 12:44:30 2012 -0700
@@ -25,7 +25,6 @@
 
 package java.lang;
 
-import java.io.ObjectStreamClass;
 import java.io.ObjectStreamField;
 import java.io.UnsupportedEncodingException;
 import java.nio.charset.Charset;
@@ -108,17 +107,10 @@
  */
 
 public final class String
-    implements java.io.Serializable, Comparable<String>, CharSequence
-{
+    implements java.io.Serializable, Comparable<String>, CharSequence {
     /** The value is used for character storage. */
     private final char value[];
 
-    /** The offset is the first index of the storage that is used. */
-    private final int offset;
-
-    /** The count is the number of characters in the String. */
-    private final int count;
-
     /** Cache the hash code for the string */
     private int hash; // Default to 0
 
@@ -138,7 +130,7 @@
      * string instance within the stream.
      */
     private static final ObjectStreamField[] serialPersistentFields =
-        new ObjectStreamField[0];
+            new ObjectStreamField[0];
 
     /**
      * Initializes a newly created {@code String} object so that it represents
@@ -146,8 +138,6 @@
      * unnecessary since Strings are immutable.
      */
     public String() {
-        this.offset = 0;
-        this.count = 0;
         this.value = new char[0];
     }
 
@@ -162,23 +152,8 @@
      *         A {@code String}
      */
     public String(String original) {
-        int size = original.count;
-        char[] originalValue = original.value;
-        char[] v;
-        if (originalValue.length > size) {
-            // The array representing the String is bigger than the new
-            // String itself.  Perhaps this constructor is being called
-            // in order to trim the baggage, so make a copy of the array.
-            int off = original.offset;
-            v = Arrays.copyOfRange(originalValue, off, off+size);
-        } else {
-            // The array representing the String is the same
-            // size as the String, so no point in making a copy.
-            v = originalValue;
-        }
-        this.offset = 0;
-        this.count = size;
-        this.value = v;
+        this.value = original.value;
+        this.hash = original.hash;
     }
 
     /**
@@ -191,10 +166,7 @@
      *         The initial value of the string
      */
     public String(char value[]) {
-        int size = value.length;
-        this.offset = 0;
-        this.count = size;
-        this.value = Arrays.copyOf(value, size);
+        this.value = Arrays.copyOf(value, value.length);
     }
 
     /**
@@ -229,8 +201,6 @@
         if (offset > value.length - count) {
             throw new StringIndexOutOfBoundsException(offset + count);
         }
-        this.offset = 0;
-        this.count = count;
         this.value = Arrays.copyOfRange(value, offset, offset+count);
     }
 
@@ -293,14 +263,12 @@
         for (int i = offset, j = 0; i < end; i++, j++) {
             int c = codePoints[i];
             if (Character.isBmpCodePoint(c))
-                v[j] = (char) c;
+                v[j] = (char)c;
             else
                 Character.toSurrogates(c, v, j++);
         }
 
-        this.value  = v;
-        this.count  = n;
-        this.offset = 0;
+        this.value = v;
     }
 
     /**
@@ -348,17 +316,15 @@
         char value[] = new char[count];
 
         if (hibyte == 0) {
-            for (int i = count ; i-- > 0 ;) {
-                value[i] = (char) (ascii[i + offset] & 0xff);
+            for (int i = count; i-- > 0;) {
+                value[i] = (char)(ascii[i + offset] & 0xff);
             }
         } else {
             hibyte <<= 8;
-            for (int i = count ; i-- > 0 ;) {
-                value[i] = (char) (hibyte | (ascii[i + offset] & 0xff));
+            for (int i = count; i-- > 0;) {
+                value[i] = (char)(hibyte | (ascii[i + offset] & 0xff));
             }
         }
-        this.offset = 0;
-        this.count = count;
         this.value = value;
     }
 
@@ -444,15 +410,11 @@
      * @since  JDK1.1
      */
     public String(byte bytes[], int offset, int length, String charsetName)
-        throws UnsupportedEncodingException
-    {
+            throws UnsupportedEncodingException {
         if (charsetName == null)
             throw new NullPointerException("charsetName");
         checkBounds(bytes, offset, length);
-        char[] v = StringCoding.decode(charsetName, bytes, offset, length);
-        this.offset = 0;
-        this.count = v.length;
-        this.value = v;
+        this.value = StringCoding.decode(charsetName, bytes, offset, length);
     }
 
     /**
@@ -489,10 +451,7 @@
         if (charset == null)
             throw new NullPointerException("charset");
         checkBounds(bytes, offset, length);
-        char[] v = StringCoding.decode(charset, bytes, offset, length);
-        this.offset = 0;
-        this.count = v.length;
-        this.value = v;
+        this.value =  StringCoding.decode(charset, bytes, offset, length);
     }
 
     /**
@@ -519,8 +478,7 @@
      * @since  JDK1.1
      */
     public String(byte bytes[], String charsetName)
-        throws UnsupportedEncodingException
-    {
+            throws UnsupportedEncodingException {
         this(bytes, 0, bytes.length, charsetName);
     }
 
@@ -576,10 +534,7 @@
      */
     public String(byte bytes[], int offset, int length) {
         checkBounds(bytes, offset, length);
-        char[] v  = StringCoding.decode(bytes, offset, length);
-        this.offset = 0;
-        this.count = v.length;
-        this.value = v;
+        this.value = StringCoding.decode(bytes, offset, length);
     }
 
     /**
@@ -612,10 +567,9 @@
      *         A {@code StringBuffer}
      */
     public String(StringBuffer buffer) {
-        String result = buffer.toString();
-        this.value = result.value;
-        this.count = result.count;
-        this.offset = result.offset;
+        synchronized(buffer) {
+            this.value = Arrays.copyOf(buffer.getValue(), buffer.length());
+        }
     }
 
     /**
@@ -634,18 +588,18 @@
      * @since  1.5
      */
     public String(StringBuilder builder) {
-        String result = builder.toString();
-        this.value = result.value;
-        this.count = result.count;
-        this.offset = result.offset;
+        this.value = Arrays.copyOf(builder.getValue(), builder.length());
     }
 
-
-    // Package private constructor which shares value array for speed.
-    String(int offset, int count, char value[]) {
+    /*
+    * Package private constructor which shares value array for speed.
+    * this constructor is always expected to be called with share==true.
+    * a separate constructor is needed because we already have a public
+    * String(char[]) constructor that makes a copy of the given char[].
+    */
+    String(char[] value, boolean share) {
+        // assert share : "unshared not supported";
         this.value = value;
-        this.offset = offset;
-        this.count = count;
     }
 
     /**
@@ -657,7 +611,7 @@
      *          object.
      */
     public int length() {
-        return count;
+        return value.length;
     }
 
     /**
@@ -669,7 +623,7 @@
      * @since 1.6
      */
     public boolean isEmpty() {
-        return count == 0;
+        return value.length == 0;
     }
 
     /**
@@ -691,10 +645,10 @@
      *             string.
      */
     public char charAt(int index) {
-        if ((index < 0) || (index >= count)) {
+        if ((index < 0) || (index >= value.length)) {
             throw new StringIndexOutOfBoundsException(index);
         }
-        return value[index + offset];
+        return value[index];
     }
 
     /**
@@ -720,10 +674,10 @@
      * @since      1.5
      */
     public int codePointAt(int index) {
-        if ((index < 0) || (index >= count)) {
+        if ((index < 0) || (index >= value.length)) {
             throw new StringIndexOutOfBoundsException(index);
         }
-        return Character.codePointAtImpl(value, offset + index, offset + count);
+        return Character.codePointAtImpl(value, index, value.length);
     }
 
     /**
@@ -750,10 +704,10 @@
      */
     public int codePointBefore(int index) {
         int i = index - 1;
-        if ((i < 0) || (i >= count)) {
+        if ((i < 0) || (i >= value.length)) {
             throw new StringIndexOutOfBoundsException(index);
         }
-        return Character.codePointBeforeImpl(value, offset + index, offset);
+        return Character.codePointBeforeImpl(value, index, 0);
     }
 
     /**
@@ -778,10 +732,10 @@
      * @since  1.5
      */
     public int codePointCount(int beginIndex, int endIndex) {
-        if (beginIndex < 0 || endIndex > count || beginIndex > endIndex) {
+        if (beginIndex < 0 || endIndex > value.length || beginIndex > endIndex) {
             throw new IndexOutOfBoundsException();
         }
-        return Character.codePointCountImpl(value, offset+beginIndex, endIndex-beginIndex);
+        return Character.codePointCountImpl(value, beginIndex, endIndex - beginIndex);
     }
 
     /**
@@ -805,11 +759,11 @@
      * @since 1.5
      */
     public int offsetByCodePoints(int index, int codePointOffset) {
-        if (index < 0 || index > count) {
+        if (index < 0 || index > value.length) {
             throw new IndexOutOfBoundsException();
         }
-        return Character.offsetByCodePointsImpl(value, offset, count,
-                                                offset+index, codePointOffset) - offset;
+        return Character.offsetByCodePointsImpl(value, 0, value.length,
+                index, codePointOffset);
     }
 
     /**
@@ -817,7 +771,7 @@
      * This method doesn't perform any range checking.
      */
     void getChars(char dst[], int dstBegin) {
-        System.arraycopy(value, offset, dst, dstBegin, count);
+        System.arraycopy(value, 0, dst, dstBegin, value.length);
     }
 
     /**
@@ -854,14 +808,13 @@
         if (srcBegin < 0) {
             throw new StringIndexOutOfBoundsException(srcBegin);
         }
-        if (srcEnd > count) {
+        if (srcEnd > value.length) {
             throw new StringIndexOutOfBoundsException(srcEnd);
         }
         if (srcBegin > srcEnd) {
             throw new StringIndexOutOfBoundsException(srcEnd - srcBegin);
         }
-        System.arraycopy(value, offset + srcBegin, dst, dstBegin,
-             srcEnd - srcBegin);
+        System.arraycopy(value, srcBegin, dst, dstBegin, srcEnd - srcBegin);
     }
 
     /**
@@ -912,15 +865,15 @@
         if (srcBegin < 0) {
             throw new StringIndexOutOfBoundsException(srcBegin);
         }
-        if (srcEnd > count) {
+        if (srcEnd > value.length) {
             throw new StringIndexOutOfBoundsException(srcEnd);
         }
         if (srcBegin > srcEnd) {
             throw new StringIndexOutOfBoundsException(srcEnd - srcBegin);
         }
         int j = dstBegin;
-        int n = offset + srcEnd;
-        int i = offset + srcBegin;
+        int n = srcEnd;
+        int i = srcBegin;
         char[] val = value;   /* avoid getfield opcode */
 
         while (i < n) {
@@ -949,10 +902,9 @@
      * @since  JDK1.1
      */
     public byte[] getBytes(String charsetName)
-        throws UnsupportedEncodingException
-    {
+            throws UnsupportedEncodingException {
         if (charsetName == null) throw new NullPointerException();
-        return StringCoding.encode(charsetName, value, offset, count);
+        return StringCoding.encode(charsetName, value, 0, value.length);
     }
 
     /**
@@ -975,7 +927,7 @@
      */
     public byte[] getBytes(Charset charset) {
         if (charset == null) throw new NullPointerException();
-        return StringCoding.encode(charset, value, offset, count);
+        return StringCoding.encode(charset, value, 0, value.length);
     }
 
     /**
@@ -992,7 +944,7 @@
      * @since      JDK1.1
      */
     public byte[] getBytes() {
-        return StringCoding.encode(value, offset, count);
+        return StringCoding.encode(value, 0, value.length);
     }
 
     /**
@@ -1015,16 +967,16 @@
             return true;
         }
         if (anObject instanceof String) {
-            String anotherString = (String)anObject;
-            int n = count;
-            if (n == anotherString.count) {
+            String anotherString = (String) anObject;
+            int n = value.length;
+            if (n == anotherString.value.length) {
                 char v1[] = value;
                 char v2[] = anotherString.value;
-                int i = offset;
-                int j = anotherString.offset;
+                int i = 0;
                 while (n-- != 0) {
-                    if (v1[i++] != v2[j++])
-                        return false;
+                    if (v1[i] != v2[i])
+                            return false;
+                    i++;
                 }
                 return true;
             }
@@ -1047,8 +999,8 @@
      * @since  1.4
      */
     public boolean contentEquals(StringBuffer sb) {
-        synchronized(sb) {
-            return contentEquals((CharSequence)sb);
+        synchronized (sb) {
+            return contentEquals((CharSequence) sb);
         }
     }
 
@@ -1067,18 +1019,18 @@
      * @since  1.5
      */
     public boolean contentEquals(CharSequence cs) {
-        if (count != cs.length())
+        if (value.length != cs.length())
             return false;
         // Argument is a StringBuffer, StringBuilder
         if (cs instanceof AbstractStringBuilder) {
             char v1[] = value;
-            char v2[] = ((AbstractStringBuilder)cs).getValue();
-            int i = offset;
-            int j = 0;
-            int n = count;
+            char v2[] = ((AbstractStringBuilder) cs).getValue();
+            int i = 0;
+            int n = value.length;
             while (n-- != 0) {
-                if (v1[i++] != v2[j++])
+                if (v1[i] != v2[i])
                     return false;
+                i++;
             }
             return true;
         }
@@ -1087,12 +1039,12 @@
             return true;
         // Argument is a generic CharSequence
         char v1[] = value;
-        int i = offset;
-        int j = 0;
-        int n = count;
+        int i = 0;
+        int n = value.length;
         while (n-- != 0) {
-            if (v1[i++] != cs.charAt(j++))
+            if (v1[i] != cs.charAt(i))
                 return false;
+            i++;
         }
         return true;
     }
@@ -1126,9 +1078,10 @@
      * @see  #equals(Object)
      */
     public boolean equalsIgnoreCase(String anotherString) {
-        return (this == anotherString) ? true :
-               (anotherString != null) && (anotherString.count == count) &&
-               regionMatches(true, 0, anotherString, 0, count);
+        return (this == anotherString) ? true
+                : (anotherString != null)
+                && (anotherString.value.length == value.length)
+                && regionMatches(true, 0, anotherString, 0, value.length);
     }
 
     /**
@@ -1173,33 +1126,20 @@
      *          lexicographically greater than the string argument.
      */
     public int compareTo(String anotherString) {
-        int len1 = count;
-        int len2 = anotherString.count;
-        int n = Math.min(len1, len2);
+        int len1 = value.length;
+        int len2 = anotherString.value.length;
+        int lim = Math.min(len1, len2);
         char v1[] = value;
         char v2[] = anotherString.value;
-        int i = offset;
-        int j = anotherString.offset;
 
-        if (i == j) {
-            int k = i;
-            int lim = n + i;
-            while (k < lim) {
-                char c1 = v1[k];
-                char c2 = v2[k];
-                if (c1 != c2) {
-                    return c1 - c2;
-                }
-                k++;
+        int k = 0;
+        while (k < lim) {
+            char c1 = v1[k];
+            char c2 = v2[k];
+            if (c1 != c2) {
+                return c1 - c2;
             }
-        } else {
-            while (n-- != 0) {
-                char c1 = v1[i++];
-                char c2 = v2[j++];
-                if (c1 != c2) {
-                    return c1 - c2;
-                }
-            }
+            k++;
         }
         return len1 - len2;
     }
@@ -1219,7 +1159,7 @@
     public static final Comparator<String> CASE_INSENSITIVE_ORDER
                                          = new CaseInsensitiveComparator();
     private static class CaseInsensitiveComparator
-                         implements Comparator<String>, java.io.Serializable {
+            implements Comparator<String>, java.io.Serializable {
         // use serialVersionUID from JDK 1.2.2 for interoperability
         private static final long serialVersionUID = 8575799808933029326L;
 
@@ -1306,14 +1246,15 @@
      *          {@code false} otherwise.
      */
     public boolean regionMatches(int toffset, String other, int ooffset,
-                                 int len) {
+            int len) {
         char ta[] = value;
-        int to = offset + toffset;
+        int to = toffset;
         char pa[] = other.value;
-        int po = other.offset + ooffset;
+        int po = ooffset;
         // Note: toffset, ooffset, or len might be near -1>>>1.
-        if ((ooffset < 0) || (toffset < 0) || (toffset > (long)count - len)
-            || (ooffset > (long)other.count - len)) {
+        if ((ooffset < 0) || (toffset < 0)
+                || (toffset > (long)value.length - len)
+                || (ooffset > (long)other.value.length - len)) {
             return false;
         }
         while (len-- > 0) {
@@ -1351,7 +1292,7 @@
      * integer <i>k</i> less than <tt>len</tt> such that:
      * <blockquote><pre>
      * Character.toLowerCase(this.charAt(toffset+k)) !=
-               Character.toLowerCase(other.charAt(ooffset+k))
+     Character.toLowerCase(other.charAt(ooffset+k))
      * </pre></blockquote>
      * and:
      * <blockquote><pre>
@@ -1375,14 +1316,15 @@
      *          argument.
      */
     public boolean regionMatches(boolean ignoreCase, int toffset,
-                           String other, int ooffset, int len) {
+            String other, int ooffset, int len) {
         char ta[] = value;
-        int to = offset + toffset;
+        int to = toffset;
         char pa[] = other.value;
-        int po = other.offset + ooffset;
+        int po = ooffset;
         // Note: toffset, ooffset, or len might be near -1>>>1.
-        if ((ooffset < 0) || (toffset < 0) || (toffset > (long)count - len) ||
-                (ooffset > (long)other.count - len)) {
+        if ((ooffset < 0) || (toffset < 0)
+                || (toffset > (long)value.length - len)
+                || (ooffset > (long)other.value.length - len)) {
             return false;
         }
         while (len-- > 0) {
@@ -1433,12 +1375,12 @@
      */
     public boolean startsWith(String prefix, int toffset) {
         char ta[] = value;
-        int to = offset + toffset;
+        int to = toffset;
         char pa[] = prefix.value;
-        int po = prefix.offset;
-        int pc = prefix.count;
+        int po = 0;
+        int pc = prefix.value.length;
         // Note: toffset might be near -1>>>1.
-        if ((toffset < 0) || (toffset > count - pc)) {
+        if ((toffset < 0) || (toffset > value.length - pc)) {
             return false;
         }
         while (--pc >= 0) {
@@ -1478,7 +1420,7 @@
      *          as determined by the {@link #equals(Object)} method.
      */
     public boolean endsWith(String suffix) {
-        return startsWith(suffix, count - suffix.count);
+        return startsWith(suffix, value.length - suffix.value.length);
     }
 
     /**
@@ -1496,13 +1438,11 @@
      */
     public int hashCode() {
         int h = hash;
-        if (h == 0 && count > 0) {
-            int off = offset;
+        if (h == 0 && value.length > 0) {
             char val[] = value;
-            int len = count;
 
-            for (int i = 0; i < len; i++) {
-                h = 31*h + val[off++];
+            for (int i = 0; i < value.length; i++) {
+                h = 31 * h + val[i];
             }
             hash = h;
         }
@@ -1577,9 +1517,10 @@
      *          if the character does not occur.
      */
     public int indexOf(int ch, int fromIndex) {
+        final int max = value.length;
         if (fromIndex < 0) {
             fromIndex = 0;
-        } else if (fromIndex >= count) {
+        } else if (fromIndex >= max) {
             // Note: fromIndex might be near -1>>>1.
             return -1;
         }
@@ -1588,11 +1529,9 @@
             // handle most cases here (ch is a BMP code point or a
             // negative value (invalid code point))
             final char[] value = this.value;
-            final int offset = this.offset;
-            final int max = offset + count;
-            for (int i = offset + fromIndex; i < max ; i++) {
+            for (int i = fromIndex; i < max; i++) {
                 if (value[i] == ch) {
-                    return i - offset;
+                    return i;
                 }
             }
             return -1;
@@ -1607,13 +1546,12 @@
     private int indexOfSupplementary(int ch, int fromIndex) {
         if (Character.isValidCodePoint(ch)) {
             final char[] value = this.value;
-            final int offset = this.offset;
             final char hi = Character.highSurrogate(ch);
             final char lo = Character.lowSurrogate(ch);
-            final int max = offset + count - 1;
-            for (int i = offset + fromIndex; i < max; i++) {
-                if (value[i] == hi && value[i+1] == lo) {
-                    return i - offset;
+            final int max = value.length - 1;
+            for (int i = fromIndex; i < max; i++) {
+                if (value[i] == hi && value[i + 1] == lo) {
+                    return i;
                 }
             }
         }
@@ -1644,7 +1582,7 @@
      *          {@code -1} if the character does not occur.
      */
     public int lastIndexOf(int ch) {
-        return lastIndexOf(ch, count - 1);
+        return lastIndexOf(ch, value.length - 1);
     }
 
     /**
@@ -1686,11 +1624,10 @@
             // handle most cases here (ch is a BMP code point or a
             // negative value (invalid code point))
             final char[] value = this.value;
-            final int offset = this.offset;
-            int i = offset + Math.min(fromIndex, count - 1);
-            for (; i >= offset ; i--) {
+            int i = Math.min(fromIndex, value.length - 1);
+            for (; i >= 0; i--) {
                 if (value[i] == ch) {
-                    return i - offset;
+                    return i;
                 }
             }
             return -1;
@@ -1705,13 +1642,12 @@
     private int lastIndexOfSupplementary(int ch, int fromIndex) {
         if (Character.isValidCodePoint(ch)) {
             final char[] value = this.value;
-            final int offset = this.offset;
             char hi = Character.highSurrogate(ch);
             char lo = Character.lowSurrogate(ch);
-            int i = offset + Math.min(fromIndex, count - 2);
-            for (; i >= offset; i--) {
-                if (value[i] == hi && value[i+1] == lo) {
-                    return i - offset;
+            int i = Math.min(fromIndex, value.length - 2);
+            for (; i >= 0; i--) {
+                if (value[i] == hi && value[i + 1] == lo) {
+                    return i;
                 }
             }
         }
@@ -1753,8 +1689,8 @@
      *          or {@code -1} if there is no such occurrence.
      */
     public int indexOf(String str, int fromIndex) {
-        return indexOf(value, offset, count,
-                       str.value, str.offset, str.count, fromIndex);
+        return indexOf(value, 0, value.length,
+                str.value, 0, str.value.length, fromIndex);
     }
 
     /**
@@ -1771,8 +1707,8 @@
      * @param   fromIndex    the index to begin searching from.
      */
     static int indexOf(char[] source, int sourceOffset, int sourceCount,
-                       char[] target, int targetOffset, int targetCount,
-                       int fromIndex) {
+            char[] target, int targetOffset, int targetCount,
+            int fromIndex) {
         if (fromIndex >= sourceCount) {
             return (targetCount == 0 ? sourceCount : -1);
         }
@@ -1783,7 +1719,7 @@
             return fromIndex;
         }
 
-        char first  = target[targetOffset];
+        char first = target[targetOffset];
         int max = sourceOffset + (sourceCount - targetCount);
 
         for (int i = sourceOffset + fromIndex; i <= max; i++) {
@@ -1796,8 +1732,8 @@
             if (i <= max) {
                 int j = i + 1;
                 int end = j + targetCount - 1;
-                for (int k = targetOffset + 1; j < end && source[j] ==
-                         target[k]; j++, k++);
+                for (int k = targetOffset + 1; j < end && source[j]
+                        == target[k]; j++, k++);
 
                 if (j == end) {
                     /* Found whole string. */
@@ -1824,7 +1760,7 @@
      *          or {@code -1} if there is no such occurrence.
      */
     public int lastIndexOf(String str) {
-        return lastIndexOf(str, count);
+        return lastIndexOf(str, value.length);
     }
 
     /**
@@ -1844,8 +1780,8 @@
      *          or {@code -1} if there is no such occurrence.
      */
     public int lastIndexOf(String str, int fromIndex) {
-        return lastIndexOf(value, offset, count,
-                           str.value, str.offset, str.count, fromIndex);
+        return lastIndexOf(value, 0, value.length,
+                str.value, 0, str.value.length, fromIndex);
     }
 
     /**
@@ -1862,8 +1798,8 @@
      * @param   fromIndex    the index to begin searching from.
      */
     static int lastIndexOf(char[] source, int sourceOffset, int sourceCount,
-                           char[] target, int targetOffset, int targetCount,
-                           int fromIndex) {
+            char[] target, int targetOffset, int targetCount,
+            int fromIndex) {
         /*
          * Check arguments; return immediately where possible. For
          * consistency, don't check for null str.
@@ -1885,7 +1821,7 @@
         int min = sourceOffset + targetCount - 1;
         int i = min + fromIndex;
 
-    startSearchForLastChar:
+        startSearchForLastChar:
         while (true) {
             while (i >= min && source[i] != strLastChar) {
                 i--;
@@ -1925,7 +1861,14 @@
      *             length of this {@code String} object.
      */
     public String substring(int beginIndex) {
-        return substring(beginIndex, count);
+        if (beginIndex < 0) {
+            throw new StringIndexOutOfBoundsException(beginIndex);
+        }
+        int subLen = value.length - beginIndex;
+        if (subLen < 0) {
+            throw new StringIndexOutOfBoundsException(subLen);
+        }
+        return (beginIndex == 0) ? this : new String(value, beginIndex, subLen);
     }
 
     /**
@@ -1954,14 +1897,15 @@
         if (beginIndex < 0) {
             throw new StringIndexOutOfBoundsException(beginIndex);
         }
-        if (endIndex > count) {
+        if (endIndex > value.length) {
             throw new StringIndexOutOfBoundsException(endIndex);
         }
-        if (beginIndex > endIndex) {
-            throw new StringIndexOutOfBoundsException(endIndex - beginIndex);
+        int subLen = endIndex - beginIndex;
+        if (subLen < 0) {
+            throw new StringIndexOutOfBoundsException(subLen);
         }
-        return ((beginIndex == 0) && (endIndex == count)) ? this :
-            new String(offset + beginIndex, endIndex - beginIndex, value);
+        return ((beginIndex == 0) && (endIndex == value.length)) ? this
+                : new String(value, beginIndex, subLen);
     }
 
     /**
@@ -2021,10 +1965,10 @@
         if (otherLen == 0) {
             return this;
         }
-        char buf[] = new char[count + otherLen];
-        getChars(0, count, buf, 0);
-        str.getChars(0, otherLen, buf, count);
-        return new String(0, count + otherLen, buf);
+        int len = value.length;
+        char buf[] = Arrays.copyOf(value, len + otherLen);
+        str.getChars(buf, len);
+        return new String(buf, true);
     }
 
     /**
@@ -2058,27 +2002,26 @@
      */
     public String replace(char oldChar, char newChar) {
         if (oldChar != newChar) {
-            int len = count;
+            int len = value.length;
             int i = -1;
             char[] val = value; /* avoid getfield opcode */
-            int off = offset;   /* avoid getfield opcode */
 
             while (++i < len) {
-                if (val[off + i] == oldChar) {
+                if (val[i] == oldChar) {
                     break;
                 }
             }
             if (i < len) {
                 char buf[] = new char[len];
-                for (int j = 0 ; j < i ; j++) {
-                    buf[j] = val[off+j];
+                for (int j = 0; j < i; j++) {
+                    buf[j] = val[j];
                 }
                 while (i < len) {
-                    char c = val[off + i];
+                    char c = val[i];
                     buf[i] = (c == oldChar) ? newChar : c;
                     i++;
                 }
-                return new String(0, len, buf);
+                return new String(buf, true);
             }
         }
         return this;
@@ -2229,7 +2172,7 @@
      */
     public String replace(CharSequence target, CharSequence replacement) {
         return Pattern.compile(target.toString(), Pattern.LITERAL).matcher(
-            this).replaceAll(Matcher.quoteReplacement(replacement.toString()));
+                this).replaceAll(Matcher.quoteReplacement(replacement.toString()));
     }
 
     /**
@@ -2314,13 +2257,13 @@
      */
     public String[] split(String regex, int limit) {
         /* fastpath if the regex is a
-           (1)one-char String and this character is not one of the
-              RegEx's meta characters ".$|()[{^?*+\\", or
-           (2)two-char String and the first char is the backslash and
-              the second is not the ascii digit or ascii letter.
-        */
+         (1)one-char String and this character is not one of the
+            RegEx's meta characters ".$|()[{^?*+\\", or
+         (2)two-char String and the first char is the backslash and
+            the second is not the ascii digit or ascii letter.
+         */
         char ch = 0;
-        if (((regex.count == 1 &&
+        if (((regex.value.length == 1 &&
              ".$|()[{^?*+\\".indexOf(ch = regex.charAt(0)) == -1) ||
              (regex.length() == 2 &&
               regex.charAt(0) == '\\' &&
@@ -2340,23 +2283,23 @@
                     off = next + 1;
                 } else {    // last one
                     //assert (list.size() == limit - 1);
-                    list.add(substring(off, count));
-                    off = count;
+                    list.add(substring(off, value.length));
+                    off = value.length;
                     break;
                 }
             }
             // If no match was found, return this
             if (off == 0)
-                return new String[] { this };
+                return new String[]{this};
 
             // Add remaining segment
             if (!limited || list.size() < limit)
-                list.add(substring(off, count));
+                list.add(substring(off, value.length));
 
             // Construct result
             int resultSize = list.size();
             if (limit == 0)
-                while (resultSize > 0 && list.get(resultSize-1).length() == 0)
+                while (resultSize > 0 && list.get(resultSize - 1).length() == 0)
                     resultSize--;
             String[] result = new String[resultSize];
             return list.subList(0, resultSize).toArray(result);
@@ -2463,14 +2406,15 @@
             throw new NullPointerException();
         }
 
-        int     firstUpper;
+        int firstUpper;
+        final int len = value.length;
 
         /* Now check if there are any characters that need to be changed. */
         scan: {
-            for (firstUpper = 0 ; firstUpper < count; ) {
-                char c = value[offset+firstUpper];
-                if ((c >= Character.MIN_HIGH_SURROGATE) &&
-                    (c <= Character.MAX_HIGH_SURROGATE)) {
+            for (firstUpper = 0 ; firstUpper < len; ) {
+                char c = value[firstUpper];
+                if ((c >= Character.MIN_HIGH_SURROGATE)
+                        && (c <= Character.MAX_HIGH_SURROGATE)) {
                     int supplChar = codePointAt(firstUpper);
                     if (supplChar != Character.toLowerCase(supplChar)) {
                         break scan;
@@ -2486,24 +2430,24 @@
             return this;
         }
 
-        char[]  result = new char[count];
-        int     resultOffset = 0;  /* result may grow, so i+resultOffset
-                                    * is the write location in result */
+        char[] result = new char[len];
+        int resultOffset = 0;  /* result may grow, so i+resultOffset
+                                * is the write location in result */
 
         /* Just copy the first few lowerCase characters. */
-        System.arraycopy(value, offset, result, 0, firstUpper);
+        System.arraycopy(value, 0, result, 0, firstUpper);
 
         String lang = locale.getLanguage();
         boolean localeDependent =
-            (lang == "tr" || lang == "az" || lang == "lt");
+                (lang == "tr" || lang == "az" || lang == "lt");
         char[] lowerCharArray;
         int lowerChar;
         int srcChar;
         int srcCount;
-        for (int i = firstUpper; i < count; i += srcCount) {
-            srcChar = (int)value[offset+i];
-            if ((char)srcChar >= Character.MIN_HIGH_SURROGATE &&
-                (char)srcChar <= Character.MAX_HIGH_SURROGATE) {
+        for (int i = firstUpper; i < len; i += srcCount) {
+            srcChar = (int)value[i];
+            if ((char)srcChar >= Character.MIN_HIGH_SURROGATE
+                    && (char)srcChar <= Character.MAX_HIGH_SURROGATE) {
                 srcChar = codePointAt(i);
                 srcCount = Character.charCount(srcChar);
             } else {
@@ -2516,16 +2460,16 @@
             } else {
                 lowerChar = Character.toLowerCase(srcChar);
             }
-            if ((lowerChar == Character.ERROR) ||
-                (lowerChar >= Character.MIN_SUPPLEMENTARY_CODE_POINT)) {
+            if ((lowerChar == Character.ERROR)
+                    || (lowerChar >= Character.MIN_SUPPLEMENTARY_CODE_POINT)) {
                 if (lowerChar == Character.ERROR) {
-                     if (!localeDependent && srcChar == '\u0130') {
-                         lowerCharArray =
-                             ConditionalSpecialCasing.toLowerCaseCharArray(this, i, Locale.ENGLISH);
-                     } else {
+                    if (!localeDependent && srcChar == '\u0130') {
                         lowerCharArray =
-                            ConditionalSpecialCasing.toLowerCaseCharArray(this, i, locale);
-                     }
+                                ConditionalSpecialCasing.toLowerCaseCharArray(this, i, Locale.ENGLISH);
+                    } else {
+                        lowerCharArray =
+                                ConditionalSpecialCasing.toLowerCaseCharArray(this, i, locale);
+                    }
                 } else if (srcCount == 2) {
                     resultOffset += Character.toChars(lowerChar, result, i + resultOffset) - srcCount;
                     continue;
@@ -2537,19 +2481,18 @@
                 int mapLen = lowerCharArray.length;
                 if (mapLen > srcCount) {
                     char[] result2 = new char[result.length + mapLen - srcCount];
-                    System.arraycopy(result, 0, result2, 0,
-                        i + resultOffset);
+                    System.arraycopy(result, 0, result2, 0, i + resultOffset);
                     result = result2;
                 }
-                for (int x=0; x<mapLen; ++x) {
-                    result[i+resultOffset+x] = lowerCharArray[x];
+                for (int x = 0; x < mapLen; ++x) {
+                    result[i + resultOffset + x] = lowerCharArray[x];
                 }
                 resultOffset += (mapLen - srcCount);
             } else {
-                result[i+resultOffset] = (char)lowerChar;
+                result[i + resultOffset] = (char)lowerChar;
             }
         }
-        return new String(0, count+resultOffset, result);
+        return new String(result, 0, len + resultOffset);
     }
 
     /**
@@ -2628,23 +2571,24 @@
             throw new NullPointerException();
         }
 
-        int     firstLower;
+        int firstLower;
+        final int len = value.length;
 
         /* Now check if there are any characters that need to be changed. */
         scan: {
-            for (firstLower = 0 ; firstLower < count; ) {
-                int c = (int)value[offset+firstLower];
+            for (firstLower = 0 ; firstLower < len; ) {
+                int c = (int)value[firstLower];
                 int srcCount;
-                if ((c >= Character.MIN_HIGH_SURROGATE) &&
-                    (c <= Character.MAX_HIGH_SURROGATE)) {
+                if ((c >= Character.MIN_HIGH_SURROGATE)
+                        && (c <= Character.MAX_HIGH_SURROGATE)) {
                     c = codePointAt(firstLower);
                     srcCount = Character.charCount(c);
                 } else {
                     srcCount = 1;
                 }
                 int upperCaseChar = Character.toUpperCaseEx(c);
-                if ((upperCaseChar == Character.ERROR) ||
-                    (c != upperCaseChar)) {
+                if ((upperCaseChar == Character.ERROR)
+                        || (c != upperCaseChar)) {
                     break scan;
                 }
                 firstLower += srcCount;
@@ -2652,22 +2596,22 @@
             return this;
         }
 
-        char[]  result       = new char[count]; /* may grow */
-        int     resultOffset = 0;  /* result may grow, so i+resultOffset
-                                    * is the write location in result */
+        char[] result = new char[len]; /* may grow */
+        int resultOffset = 0;  /* result may grow, so i+resultOffset
+         * is the write location in result */
 
         /* Just copy the first few upperCase characters. */
-        System.arraycopy(value, offset, result, 0, firstLower);
+        System.arraycopy(value, 0, result, 0, firstLower);
 
         String lang = locale.getLanguage();
         boolean localeDependent =
-            (lang == "tr" || lang == "az" || lang == "lt");
+                (lang == "tr" || lang == "az" || lang == "lt");
         char[] upperCharArray;
         int upperChar;
         int srcChar;
         int srcCount;
-        for (int i = firstLower; i < count; i += srcCount) {
-            srcChar = (int)value[offset+i];
+        for (int i = firstLower; i < len; i += srcCount) {
+            srcChar = (int)value[i];
             if ((char)srcChar >= Character.MIN_HIGH_SURROGATE &&
                 (char)srcChar <= Character.MAX_HIGH_SURROGATE) {
                 srcChar = codePointAt(i);
@@ -2680,12 +2624,12 @@
             } else {
                 upperChar = Character.toUpperCaseEx(srcChar);
             }
-            if ((upperChar == Character.ERROR) ||
-                (upperChar >= Character.MIN_SUPPLEMENTARY_CODE_POINT)) {
+            if ((upperChar == Character.ERROR)
+                    || (upperChar >= Character.MIN_SUPPLEMENTARY_CODE_POINT)) {
                 if (upperChar == Character.ERROR) {
                     if (localeDependent) {
                         upperCharArray =
-                            ConditionalSpecialCasing.toUpperCaseCharArray(this, i, locale);
+                                ConditionalSpecialCasing.toUpperCaseCharArray(this, i, locale);
                     } else {
                         upperCharArray = Character.toUpperCaseCharArray(srcChar);
                     }
@@ -2700,19 +2644,18 @@
                 int mapLen = upperCharArray.length;
                 if (mapLen > srcCount) {
                     char[] result2 = new char[result.length + mapLen - srcCount];
-                    System.arraycopy(result, 0, result2, 0,
-                        i + resultOffset);
+                    System.arraycopy(result, 0, result2, 0, i + resultOffset);
                     result = result2;
                 }
-                for (int x=0; x<mapLen; ++x) {
-                    result[i+resultOffset+x] = upperCharArray[x];
+                for (int x = 0; x < mapLen; ++x) {
+                    result[i + resultOffset + x] = upperCharArray[x];
                 }
                 resultOffset += (mapLen - srcCount);
             } else {
-                result[i+resultOffset] = (char)upperChar;
+                result[i + resultOffset] = (char)upperChar;
             }
         }
-        return new String(0, count+resultOffset, result);
+        return new String(result, 0, len + resultOffset);
     }
 
     /**
@@ -2770,18 +2713,17 @@
      *          trailing white space.
      */
     public String trim() {
-        int len = count;
+        int len = value.length;
         int st = 0;
-        int off = offset;      /* avoid getfield opcode */
         char[] val = value;    /* avoid getfield opcode */
 
-        while ((st < len) && (val[off + st] <= ' ')) {
+        while ((st < len) && (val[st] <= ' ')) {
             st++;
         }
-        while ((st < len) && (val[off + len - 1] <= ' ')) {
+        while ((st < len) && (val[len - 1] <= ' ')) {
             len--;
         }
-        return ((st > 0) || (len < count)) ? substring(st, len) : this;
+        return ((st > 0) || (len < value.length)) ? substring(st, len) : this;
     }
 
     /**
@@ -2801,8 +2743,9 @@
      *          the character sequence represented by this string.
      */
     public char[] toCharArray() {
-        char result[] = new char[count];
-        getChars(0, count, result, 0);
+        // Cannot use Arrays.copyOf because of class initialization order issues
+        char result[] = new char[value.length];
+        System.arraycopy(value, 0, result, 0, value.length);
         return result;
     }
 
@@ -2844,7 +2787,7 @@
      * @see  java.util.Formatter
      * @since  1.5
      */
-    public static String format(String format, Object ... args) {
+    public static String format(String format, Object... args) {
         return new Formatter().format(format, args).toString();
     }
 
@@ -2888,7 +2831,7 @@
      * @see  java.util.Formatter
      * @since  1.5
      */
-    public static String format(Locale l, String format, Object ... args) {
+    public static String format(Locale l, String format, Object... args) {
         return new Formatter(l).format(format, args).toString();
     }
 
@@ -2968,7 +2911,7 @@
      *          character array.
      */
     public static String copyValueOf(char data[]) {
-        return copyValueOf(data, 0, data.length);
+        return new String(data);
     }
 
     /**
@@ -2993,7 +2936,7 @@
      */
     public static String valueOf(char c) {
         char data[] = {c};
-        return new String(0, 1, data);
+        return new String(data, true);
     }
 
     /**
@@ -3077,4 +3020,100 @@
      */
     public native String intern();
 
+    /**
+     * Seed value used for each alternative hash calculated.
+     */
+    private static final int HASHING_SEED;
+
+    static {
+        long nanos = System.nanoTime();
+        long now = System.currentTimeMillis();
+        int SEED_MATERIAL[] = {
+                System.identityHashCode(String.class),
+                System.identityHashCode(System.class),
+                (int) (nanos >>> 32),
+                (int) nanos,
+                (int) (now >>> 32),
+                (int) now,
+                (int) (System.nanoTime() >>> 2)
+        };
+
+        // Use murmur3 to scramble the seeding material.
+        // Inline implementation to avoid loading classes
+        int h1 = 0;
+
+        // body
+        for(int k1 : SEED_MATERIAL) {
+            k1 *= 0xcc9e2d51;
+            k1 = (k1 << 15) | (k1 >>> 17);
+            k1 *= 0x1b873593;
+
+            h1 ^= k1;
+            h1 = (h1 << 13) | (h1 >>> 19);
+            h1 = h1 * 5 + 0xe6546b64;
+        }
+
+        // tail (always empty, as body is always 32-bit chunks)
+
+        // finalization
+
+        h1 ^= SEED_MATERIAL.length * 4;
+
+        // finalization mix force all bits of a hash block to avalanche
+        h1 ^= h1 >>> 16;
+        h1 *= 0x85ebca6b;
+        h1 ^= h1 >>> 13;
+        h1 *= 0xc2b2ae35;
+        h1 ^= h1 >>> 16;
+
+        HASHING_SEED = h1;
+    }
+
+    /**
+     * Cached value of the hashing algorithm result
+     */
+    private transient int hash32 = 0;
+
+    /**
+    * Return a 32-bit hash code value for this object.
+    * <p>
+    * The general contract of {@code hash32} is:
+    * <ul>
+    * <li>Whenever it is invoked on the same object more than once during
+    *     an execution of a Java application, the {@code hash32} method
+    *     must consistently return the same integer, provided no information
+    *     used in {@code equals} comparisons on the object is modified.
+    *     This integer need not remain consistent from one execution of an
+    *     application to another execution of the same application.
+    * <li>If two objects are equal according to the {@code equals(Object)}
+    *     method, then calling the {@code hash32} method on each of
+    *     the two objects must produce the same integer result.
+    * <li>It is <em>not</em> required that if two objects are unequal
+    *     according to the {@link java.lang.Object#equals(java.lang.Object)}
+    *     method, then calling the {@code hash32} method on each of the
+    *     two objects must produce distinct integer results.  However, the
+    *     programmer should be aware that producing distinct integer results
+    *     for unequal objects may improve the performance of hash tables.
+    * </ul>
+    * <p/>
+     * The hash value will never be zero.
+    *
+    * @return  a hash code value for this object.
+    * @see     java.lang.Object#equals(java.lang.Object)
+    */
+    public int hash32() {
+        int h = hash32;
+        if (0 == h) {
+           // harmless data race on hash32 here.
+           h = sun.misc.Hashing.murmur3_32(HASHING_SEED, value, 0, value.length);
+
+           // ensure result is not zero to avoid recalcing
+           h = (0 != h) ? h : 1;
+
+           hash32 = h;
+        }
+
+        return h;
+    }
+
 }
--- a/jdk/src/share/classes/java/lang/StringCoding.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/lang/StringCoding.java	Fri Jun 08 12:44:30 2012 -0700
@@ -250,6 +250,7 @@
     static char[] decode(byte[] ba, int off, int len) {
         String csn = Charset.defaultCharset().name();
         try {
+            // use charset name decode() variant which provides caching.
             return decode(csn, ba, off, len);
         } catch (UnsupportedEncodingException x) {
             warnUnsupportedCharset(csn);
@@ -382,6 +383,7 @@
     static byte[] encode(char[] ca, int off, int len) {
         String csn = Charset.defaultCharset().name();
         try {
+            // use charset name encode() variant which provides caching.
             return encode(csn, ca, off, len);
         } catch (UnsupportedEncodingException x) {
             warnUnsupportedCharset(csn);
--- a/jdk/src/share/classes/java/security/Signature.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/security/Signature.java	Fri Jun 08 12:44:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -658,7 +658,7 @@
         throws SignatureException {
         if (state == VERIFY) {
             if ((signature == null) || (offset < 0) || (length < 0) ||
-                (offset + length > signature.length)) {
+                (length > signature.length - offset)) {
                 throw new IllegalArgumentException("Bad arguments");
             }
 
--- a/jdk/src/share/classes/java/security/cert/CertPathBuilder.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/security/cert/CertPathBuilder.java	Fri Jun 08 12:44:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -45,15 +45,28 @@
  * one of the static <code>getInstance</code> methods, passing in the
  * algorithm name of the <code>CertPathBuilder</code> desired and optionally
  * the name of the provider desired.
- * <p>
- * Once a <code>CertPathBuilder</code> object has been created, certification
+ *
+ * <p>Once a <code>CertPathBuilder</code> object has been created, certification
  * paths can be constructed by calling the {@link #build build} method and
  * passing it an algorithm-specific set of parameters. If successful, the
  * result (including the <code>CertPath</code> that was built) is returned
  * in an object that implements the <code>CertPathBuilderResult</code>
  * interface.
  *
- * <p> Every implementation of the Java platform is required to support the
+ * <p>The {@link #getRevocationChecker} method allows an application to specify
+ * additional algorithm-specific parameters and options used by the
+ * {@code CertPathBuilder} when checking the revocation status of certificates.
+ * Here is an example demonstrating how it is used with the PKIX algorithm:
+ *
+ * <pre>
+ * CertPathBuilder cpb = CertPathBuilder.getInstance("PKIX");
+ * PKIXRevocationChecker rc = (PKIXRevocationChecker)cpb.getRevocationChecker();
+ * rc.setOptions(EnumSet.of(Option.PREFER_CRLS));
+ * params.addCertPathChecker(rc);
+ * CertPathBuilderResult cpbr = cpb.build(params);
+ * </pre>
+ *
+ * <p>Every implementation of the Java platform is required to support the
  * following standard <code>CertPathBuilder</code> algorithm:
  * <ul>
  * <li><tt>PKIX</tt></li>
@@ -96,10 +109,9 @@
      * </pre>
      */
     private static final String CPB_TYPE = "certpathbuilder.type";
-    private static final Debug debug = Debug.getInstance("certpath");
-    private CertPathBuilderSpi builderSpi;
-    private Provider provider;
-    private String algorithm;
+    private final CertPathBuilderSpi builderSpi;
+    private final Provider provider;
+    private final String algorithm;
 
     /**
      * Creates a <code>CertPathBuilder</code> object of the given algorithm,
@@ -290,15 +302,30 @@
      * if no such property exists.
      */
     public final static String getDefaultType() {
-        String cpbtype;
-        cpbtype = AccessController.doPrivileged(new PrivilegedAction<String>() {
-            public String run() {
-                return Security.getProperty(CPB_TYPE);
-            }
-        });
-        if (cpbtype == null) {
-            cpbtype = "PKIX";
-        }
-        return cpbtype;
+        String cpbtype =
+            AccessController.doPrivileged(new PrivilegedAction<String>() {
+                public String run() {
+                    return Security.getProperty(CPB_TYPE);
+                }
+            });
+        return (cpbtype == null) ? "PKIX" : cpbtype;
+    }
+
+    /**
+     * Returns a {@code CertPathChecker} that the encapsulated
+     * {@code CertPathBuilderSpi} implementation uses to check the revocation
+     * status of certificates. A PKIX implementation returns objects of
+     * type {@code PKIXRevocationChecker}.
+     *
+     * <p>The primary purpose of this method is to allow callers to specify
+     * additional input parameters and options specific to revocation checking.
+     * See the class description for an example.
+     *
+     * @throws UnsupportedOperationException if the service provider does not
+     *         support this method
+     * @since 1.8
+     */
+    public final CertPathChecker getRevocationChecker() {
+        return builderSpi.engineGetRevocationChecker();
     }
 }
--- a/jdk/src/share/classes/java/security/cert/CertPathBuilderSpi.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/security/cert/CertPathBuilderSpi.java	Fri Jun 08 12:44:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -72,4 +72,25 @@
      */
     public abstract CertPathBuilderResult engineBuild(CertPathParameters params)
         throws CertPathBuilderException, InvalidAlgorithmParameterException;
+
+    /**
+     * Returns a {@code CertPathChecker} that this implementation uses to
+     * check the revocation status of certificates. A PKIX implementation
+     * returns objects of type {@code PKIXRevocationChecker}.
+     *
+     * <p>The primary purpose of this method is to allow callers to specify
+     * additional input parameters and options specific to revocation checking.
+     * See the class description of {@code CertPathBuilder} for an example.
+     *
+     * <p>This method was added to version 1.8 of the Java Platform Standard
+     * Edition. In order to maintain backwards compatibility with existing
+     * service providers, this method cannot be abstract and by default throws
+     * an {@code UnsupportedOperationException}.
+     *
+     * @throws UnsupportedOperationException if this method is not supported
+     * @since 1.8
+     */
+    public CertPathChecker engineGetRevocationChecker() {
+        throw new UnsupportedOperationException();
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/java/security/cert/CertPathChecker.java	Fri Jun 08 12:44:30 2012 -0700
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 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 java.security.cert;
+
+/**
+ * <p>Performs one or more checks on each {@code Certificate} of a
+ * {@code CertPath}.
+ *
+ * <p>A {@code CertPathChecker} implementation is typically created to extend
+ * a certification path validation algorithm. For example, an implementation
+ * may check for and process a critical private extension of each certificate
+ * in a certification path.
+ *
+ * @since 1.8
+ */
+public interface CertPathChecker {
+
+    /**
+     * Initializes the internal state of this {@code CertPathChecker}.
+     *
+     * <p>The {@code forward} flag specifies the order that certificates will
+     * be passed to the {@link #check check} method (forward or reverse).
+     *
+     * @param forward the order that certificates are presented to the
+     *        {@code check} method. If {@code true}, certificates are
+     *        presented from target to trust anchor (forward); if
+     *        {@code false}, from trust anchor to target (reverse).
+     * @throws CertPathValidatorException if this {@code CertPathChecker} is
+     *         unable to check certificates in the specified order
+     */
+    void init(boolean forward) throws CertPathValidatorException;
+
+    /**
+     * Indicates if forward checking is supported. Forward checking refers
+     * to the ability of the {@code CertPathChecker} to perform its checks
+     * when certificates are presented to the {@code check} method in the
+     * forward direction (from target to trust anchor).
+     *
+     * @return {@code true} if forward checking is supported, {@code false}
+     *         otherwise
+     */
+    boolean isForwardCheckingSupported();
+
+    /**
+     * Performs the check(s) on the specified certificate using its internal
+     * state. The certificates are presented in the order specified by the
+     * {@code init} method.
+     *
+     * @param cert the {@code Certificate} to be checked
+     * @throws CertPathValidatorException if the specified certificate does
+     *         not pass the check
+     */
+    void check(Certificate cert) throws CertPathValidatorException;
+}
--- a/jdk/src/share/classes/java/security/cert/CertPathValidator.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/security/cert/CertPathValidator.java	Fri Jun 08 12:44:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -46,15 +46,29 @@
  * call one of the static <code>getInstance</code> methods, passing in the
  * algorithm name of the <code>CertPathValidator</code> desired and
  * optionally the name of the provider desired.
- * <p>
- * Once a <code>CertPathValidator</code> object has been created, it can
+ *
+ * <p>Once a <code>CertPathValidator</code> object has been created, it can
  * be used to validate certification paths by calling the {@link #validate
  * validate} method and passing it the <code>CertPath</code> to be validated
  * and an algorithm-specific set of parameters. If successful, the result is
  * returned in an object that implements the
  * <code>CertPathValidatorResult</code> interface.
  *
- * <p> Every implementation of the Java platform is required to support the
+ * <p>The {@link #getRevocationChecker} method allows an application to specify
+ * additional algorithm-specific parameters and options used by the
+ * {@code CertPathValidator} when checking the revocation status of
+ * certificates. Here is an example demonstrating how it is used with the PKIX
+ * algorithm:
+ *
+ * <pre>
+ * CertPathValidator cpv = CertPathValidator.getInstance("PKIX");
+ * PKIXRevocationChecker rc = (PKIXRevocationChecker)cpv.getRevocationChecker();
+ * rc.setOptions(EnumSet.of(Option.SOFT_FAIL));
+ * params.addCertPathChecker(rc);
+ * CertPathValidatorResult cpvr = cpv.validate(path, params);
+ * </pre>
+ *
+ * <p>Every implementation of the Java platform is required to support the
  * following standard <code>CertPathValidator</code> algorithm:
  * <ul>
  * <li><tt>PKIX</tt></li>
@@ -96,10 +110,9 @@
      * </pre>
      */
     private static final String CPV_TYPE = "certpathvalidator.type";
-    private static final Debug debug = Debug.getInstance("certpath");
-    private CertPathValidatorSpi validatorSpi;
-    private Provider provider;
-    private String algorithm;
+    private final CertPathValidatorSpi validatorSpi;
+    private final Provider provider;
+    private final String algorithm;
 
     /**
      * Creates a <code>CertPathValidator</code> object of the given algorithm,
@@ -301,15 +314,30 @@
      * if no such property exists.
      */
     public final static String getDefaultType() {
-        String cpvtype;
-        cpvtype = AccessController.doPrivileged(new PrivilegedAction<String>() {
-            public String run() {
-                return Security.getProperty(CPV_TYPE);
-            }
-        });
-        if (cpvtype == null) {
-            cpvtype = "PKIX";
-        }
-        return cpvtype;
+        String cpvtype =
+            AccessController.doPrivileged(new PrivilegedAction<String>() {
+                public String run() {
+                    return Security.getProperty(CPV_TYPE);
+                }
+            });
+        return (cpvtype == null) ? "PKIX" : cpvtype;
+    }
+
+    /**
+     * Returns a {@code CertPathChecker} that the encapsulated
+     * {@code CertPathValidatorSpi} implementation uses to check the revocation
+     * status of certificates. A PKIX implementation returns objects of
+     * type {@code PKIXRevocationChecker}.
+     *
+     * <p>The primary purpose of this method is to allow callers to specify
+     * additional input parameters and options specific to revocation checking.
+     * See the class description for an example.
+     *
+     * @throws UnsupportedOperationException if the service provider does not
+     *         support this method
+     * @since 1.8
+     */
+    public final CertPathChecker getRevocationChecker() {
+        return validatorSpi.engineGetRevocationChecker();
     }
 }
--- a/jdk/src/share/classes/java/security/cert/CertPathValidatorSpi.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/security/cert/CertPathValidatorSpi.java	Fri Jun 08 12:44:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -82,4 +82,25 @@
     public abstract CertPathValidatorResult
         engineValidate(CertPath certPath, CertPathParameters params)
         throws CertPathValidatorException, InvalidAlgorithmParameterException;
+
+    /**
+     * Returns a {@code CertPathChecker} that this implementation uses to
+     * check the revocation status of certificates. A PKIX implementation
+     * returns objects of type {@code PKIXRevocationChecker}.
+     *
+     * <p>The primary purpose of this method is to allow callers to specify
+     * additional input parameters and options specific to revocation checking.
+     * See the class description of {@code CertPathValidator} for an example.
+     *
+     * <p>This method was added to version 1.8 of the Java Platform Standard
+     * Edition. In order to maintain backwards compatibility with existing
+     * service providers, this method cannot be abstract and by default throws
+     * an {@code UnsupportedOperationException}.
+     *
+     * @throws UnsupportedOperationException if this method is not supported
+     * @since 1.8
+     */
+    public CertPathChecker engineGetRevocationChecker() {
+        throw new UnsupportedOperationException();
+    }
 }
--- a/jdk/src/share/classes/java/security/cert/PKIXCertPathChecker.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/security/cert/PKIXCertPathChecker.java	Fri Jun 08 12:44:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -87,7 +87,8 @@
  * @author      Yassir Elley
  * @author      Sean Mullan
  */
-public abstract class PKIXCertPathChecker implements Cloneable {
+public abstract class PKIXCertPathChecker
+    implements CertPathChecker, Cloneable {
 
     /**
      * Default constructor.
@@ -111,6 +112,7 @@
      * the specified order; it should never be thrown if the forward flag
      * is false since reverse checking must be supported
      */
+    @Override
     public abstract void init(boolean forward)
         throws CertPathValidatorException;
 
@@ -123,6 +125,7 @@
      * @return <code>true</code> if forward checking is supported,
      * <code>false</code> otherwise
      */
+    @Override
     public abstract boolean isForwardCheckingSupported();
 
     /**
@@ -163,6 +166,17 @@
             throws CertPathValidatorException;
 
     /**
+     * {@inheritDoc}
+     *
+     * <p>This implementation calls
+     * {@code check(cert, java.util.Collections.<String>emptySet())}.
+     */
+    @Override
+    public void check(Certificate cert) throws CertPathValidatorException {
+        check(cert, java.util.Collections.<String>emptySet());
+    }
+
+    /**
      * Returns a clone of this object. Calls the <code>Object.clone()</code>
      * method.
      * All subclasses which maintain state must support and
@@ -170,6 +184,7 @@
      *
      * @return a copy of this <code>PKIXCertPathChecker</code>
      */
+    @Override
     public Object clone() {
         try {
             return super.clone();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/java/security/cert/PKIXRevocationChecker.java	Fri Jun 08 12:44:30 2012 -0700
@@ -0,0 +1,271 @@
+/*
+ * Copyright (c) 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 java.security.cert;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+/**
+ * A {@code PKIXCertPathChecker} for checking the revocation status of
+ * certificates with the PKIX algorithm.
+ *
+ * <p>A {@code PKIXRevocationChecker} checks the revocation status of
+ * certificates with the Online Certificate Status Protocol (OCSP) or
+ * Certificate Revocation Lists (CRLs). OCSP is described in RFC 2560 and
+ * is a network protocol for determining the status of a certificate. A CRL
+ * is a time-stamped list identifying revoked certificates, and RFC 5280
+ * describes an algorithm for determining the revocation status of certificates
+ * using CRLs.
+ *
+ * <p>Each {@code PKIXRevocationChecker} must be able to check the revocation
+ * status of certificates with OCSP and CRLs. By default, OCSP is the
+ * preferred mechanism for checking revocation status, with CRLs as the
+ * fallback mechanism. However, this preference can be switched to CRLs with
+ * the {@link Option.PREFER_CRLS} option.
+ *
+ * <p>A {@code PKIXRevocationChecker} is obtained by calling the
+ * {@link CertPathValidator#getRevocationChecker getRevocationChecker} method
+ * of a PKIX {@code CertPathValidator}. Additional parameters and options
+ * specific to revocation can be set (by calling {@link #setOCSPResponder}
+ * method for instance). The {@code PKIXRevocationChecker} is added to
+ * a {@code PKIXParameters} object using the
+ * {@link PKIXParameters#addCertPathChecker addCertPathChecker}
+ * or {@link PKIXParameters#setCertPathCheckers setCertPathCheckers} method,
+ * and then the {@code PKIXParameters} is passed along with the {@code CertPath}
+ * to be validated to the {@link CertPathValidator#validate validate} method
+ * of a PKIX {@code CertPathValidator}. When supplying a revocation checker in
+ * this manner, do not enable the default revocation checking mechanism (by
+ * calling {@link PKIXParameters#setRevocationEnabled}.
+ *
+ * <p>Note that when a {@code PKIXRevocationChecker} is added to
+ * {@code PKIXParameters}, it clones the {@code PKIXRevocationChecker};
+ * thus any subsequent modifications to the {@code PKIXRevocationChecker}
+ * have no effect.
+ *
+ * <p>Any parameter that is not set (or is set to {@code null}) will be set to
+ * the default value for that parameter.
+ *
+ * <p><b>Concurrent Access</b>
+ *
+ * <p>Unless otherwise specified, the methods defined in this class are not
+ * thread-safe. Multiple threads that need to access a single object
+ * concurrently should synchronize amongst themselves and provide the
+ * necessary locking. Multiple threads each manipulating separate objects
+ * need not synchronize.
+ *
+ * @since 1.8
+ */
+public abstract class PKIXRevocationChecker extends PKIXCertPathChecker {
+    private URI ocspResponder;
+    private X509Certificate ocspResponderCert;
+    private List<Extension> ocspExtensions = Collections.<Extension>emptyList();
+    private Map<X509Certificate, byte[]> ocspStapled = Collections.emptyMap();
+    private Set<Option> options = Collections.emptySet();
+
+    protected PKIXRevocationChecker() {}
+
+    /**
+     * Sets the URI that identifies the location of the OCSP responder. This
+     * overrides the {@code ocsp.responderURL} security property and any
+     * responder specified in a certificate's Authority Information Access
+     * Extension, as defined in RFC 5280.
+     *
+     * @param uri the responder URI
+     */
+    public void setOCSPResponder(URI uri) {
+        this.ocspResponder = uri;
+    }
+
+    /**
+     * Gets the URI that identifies the location of the OCSP responder. This
+     * overrides the {@code ocsp.responderURL} security property. If this
+     * parameter or the {@code ocsp.responderURL} property is not set, the
+     * location is determined from the certificate's Authority Information
+     * Access Extension, as defined in RFC 5280.
+     *
+     * @return the responder URI, or {@code null} if not set
+     */
+    public URI getOCSPResponder() {
+        return ocspResponder;
+    }
+
+    /**
+     * Sets the OCSP responder's certificate. This overrides the
+     * {@code ocsp.responderCertSubjectName},
+     * {@code ocsp.responderCertIssuerName},
+     * and {@code ocsp.responderCertSerialNumber} security properties.
+     *
+     * @param cert the responder's certificate
+     */
+    public void setOCSPResponderCert(X509Certificate cert) {
+        this.ocspResponderCert = cert;
+    }
+
+    /**
+     * Gets the OCSP responder's certificate. This overrides the
+     * {@code ocsp.responderCertSubjectName},
+     * {@code ocsp.responderCertIssuerName},
+     * and {@code ocsp.responderCertSerialNumber} security properties. If this
+     * parameter or the aforementioned properties are not set, then the
+     * responder's certificate is determined as specified in RFC 2560.
+     *
+     * @return the responder's certificate, or {@code null} if not set
+     */
+    public X509Certificate getOCSPResponderCert() {
+        return ocspResponderCert;
+    }
+
+    // request extensions; single extensions not supported
+    /**
+     * Sets the optional OCSP request extensions.
+     *
+     * @param extensions a list of extensions. The list is copied to protect
+     *        against subsequent modification.
+     */
+    public void setOCSPExtensions(List<Extension> extensions)
+    {
+        this.ocspExtensions = (extensions == null)
+                              ? Collections.<Extension>emptyList()
+                              : new ArrayList<Extension>(extensions);
+    }
+
+    /**
+     * Gets the optional OCSP request extensions.
+     *
+     * @return an unmodifiable list of extensions. Returns an empty list if no
+     *         extensions have been specified.
+     */
+    public List<Extension> getOCSPExtensions() {
+        return Collections.unmodifiableList(ocspExtensions);
+    }
+
+    /**
+     * Sets the stapled OCSP responses. These responses are used to determine
+     * the revocation status of the specified certificates when OCSP is used.
+     *
+     * @param responses a map of stapled OCSP responses. Each key is an
+     *        {@code X509Certificate} that maps to the corresponding
+     *        DER-encoded OCSP response for that certificate. A deep copy of
+     *        the map is performed to protect against subsequent modification.
+     */
+    public void setOCSPStapledResponses(Map<X509Certificate, byte[]> responses)
+    {
+        if (responses == null) {
+            this.ocspStapled = Collections.<X509Certificate, byte[]>emptyMap();
+        } else {
+            Map<X509Certificate, byte[]> copy = new HashMap<>(responses.size());
+            for (Map.Entry<X509Certificate, byte[]> e : responses.entrySet()) {
+                copy.put(e.getKey(), e.getValue().clone());
+            }
+            this.ocspStapled = copy;
+        }
+    }
+
+    /**
+     * Gets the stapled OCSP responses. These responses are used to determine
+     * the revocation status of the specified certificates when OCSP is used.
+     *
+     * @return a map of stapled OCSP responses. Each key is an
+     *        {@code X509Certificate} that maps to the corresponding
+     *        DER-encoded OCSP response for that certificate. A deep copy of
+     *        the map is returned to protect against subsequent modification.
+     *        Returns an empty map if no responses have been specified.
+     */
+    public Map<X509Certificate, byte[]> getOCSPStapledResponses() {
+        Map<X509Certificate, byte[]> copy = new HashMap<>(ocspStapled.size());
+        for (Map.Entry<X509Certificate, byte[]> e : ocspStapled.entrySet()) {
+            copy.put(e.getKey(), e.getValue().clone());
+        }
+        return copy;
+    }
+
+    /**
+     * Sets the revocation options.
+     *
+     * @param options a set of revocation options. The set is copied to protect
+     *        against subsequent modification.
+     */
+    public void setOptions(Set<Option> options) {
+        this.options = (options == null)
+                       ? Collections.<Option>emptySet()
+                       : new HashSet<Option>(options);
+    }
+
+    /**
+     * Gets the revocation options.
+     *
+     * @return an unmodifiable set of revocation options, or an empty set if
+     *         none are specified
+     */
+    public Set<Option> getOptions() {
+        return Collections.unmodifiableSet(options);
+    }
+
+    @Override
+    public Object clone() {
+        PKIXRevocationChecker copy = (PKIXRevocationChecker)super.clone();
+        copy.ocspExtensions = new ArrayList<>(ocspExtensions);
+        copy.ocspStapled = new HashMap<>(ocspStapled);
+        // deep-copy the encoded stapled responses, since they are mutable
+        for (Map.Entry<X509Certificate, byte[]> entry :
+                 copy.ocspStapled.entrySet())
+        {
+            byte[] encoded = entry.getValue();
+            entry.setValue(encoded.clone());
+        }
+        copy.options = new HashSet<>(options);
+        return copy;
+    }
+
+    /**
+     * Various revocation options that can be specified for the revocation
+     * checking mechanism.
+     */
+    public enum Option {
+        /**
+         * Only check the revocation status of end-entity certificates.
+         */
+        ONLY_END_ENTITY,
+        /**
+         * Prefer CRLs to OSCP. The default behavior is to prefer OCSP. Each
+         * PKIX implementation should document further details of their
+         * specific preference rules and fallback policies.
+         */
+        PREFER_CRLS,
+        /**
+         * Ignore network failures. The default behavior is to consider it a
+         * failure if the revocation status of a certificate cannot be obtained
+         * due to a network error. This option applies to both OCSP and CRLs.
+         */
+        SOFT_FAIL
+    }
+}
--- a/jdk/src/share/classes/java/security/cert/package.html	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/security/cert/package.html	Fri Jun 08 12:44:30 2012 -0700
@@ -1,5 +1,5 @@
 <!--
- Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 1998, 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
@@ -38,8 +38,10 @@
   <li><a href="{@docRoot}/../technotes/guides/security/crypto/CryptoSpec.html">
     <b>Java<FONT SIZE=-2><SUP>TM</SUP></FONT>
     Cryptography Architecture (JCA) Reference Guide</b></a>
-  <li>RFC 3280: Internet X.509 Public Key Infrastructure Certificate and 
+  <li>RFC 5280: Internet X.509 Public Key Infrastructure Certificate and 
     Certificate Revocation List (CRL) Profile
+  <li>RFC 2560: X.509 Internet Public Key Infrastructure Online Certificate
+    Status Protocol - OCSP
   <li><a href="{@docRoot}/../technotes/guides/security/StandardNames.html">
     <b>Java<FONT SIZE=-2><SUP>TM</SUP></FONT>
     Cryptography Architecture Standard Algorithm Name
@@ -50,8 +52,8 @@
 
 For information about X.509 certificates and CRLs, please see:
 <ul>
-  <li><a href="http://www.ietf.org/rfc/rfc3280.txt">
-    http://www.ietf.org/rfc/rfc3280.txt</a>
+  <li><a href="http://www.ietf.org/rfc/rfc5280.txt">
+    http://www.ietf.org/rfc/rfc5280.txt</a>
   <li><a href=
     "{@docRoot}/../technotes/guides/security/certpath/CertPathProgGuide.html">
     <b>Java<FONT SIZE=-2><SUP>TM</SUP></FONT>
--- a/jdk/src/share/classes/java/sql/DriverManager.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/sql/DriverManager.java	Fri Jun 08 12:44:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 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
@@ -30,6 +30,7 @@
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.concurrent.CopyOnWriteArrayList;
+import sun.reflect.Reflection;
 
 
 /**
@@ -462,6 +463,15 @@
 
     //------------------------------------------------------------------------
 
+    // Internal method used to get the caller's class loader.
+    // Replaces the call to the native method
+    private static ClassLoader getCallerClassLoader() {
+        Class<?> cc = Reflection.getCallerClass(3);
+        ClassLoader cl = (cc != null) ? cc.getClassLoader() : null;
+        return cl;
+    }
+
+
     // Indicates whether the class object that would be created if the code calling
     // DriverManager is accessible.
     private static boolean isDriverAllowed(Driver driver, ClassLoader classLoader) {
@@ -604,8 +614,6 @@
         throw new SQLException("No suitable driver found for "+ url, "08001");
     }
 
-    /* Returns the caller's class loader, or null if none */
-    private static native ClassLoader getCallerClassLoader();
 
 }
 
--- a/jdk/src/share/classes/java/text/AttributedCharacterIterator.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/text/AttributedCharacterIterator.java	Fri Jun 08 12:44:30 2012 -0700
@@ -97,7 +97,7 @@
         private String name;
 
         // table of all instances in this class, used by readResolve
-        private static final Map instanceMap = new HashMap(7);
+        private static final Map<String, Attribute> instanceMap = new HashMap<>(7);
 
         /**
          * Constructs an {@code Attribute} with the given name.
@@ -150,7 +150,7 @@
                 throw new InvalidObjectException("subclass didn't correctly implement readResolve");
             }
 
-            Attribute instance = (Attribute) instanceMap.get(getName());
+            Attribute instance = instanceMap.get(getName());
             if (instance != null) {
                 return instance;
             } else {
--- a/jdk/src/share/classes/java/text/AttributedString.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/text/AttributedString.java	Fri Jun 08 12:44:30 2012 -0700
@@ -61,8 +61,8 @@
     int runArraySize;               // current size of the arrays
     int runCount;                   // actual number of runs, <= runArraySize
     int runStarts[];                // start index for each run
-    Vector runAttributes[];         // vector of attribute keys for each run
-    Vector runAttributeValues[];    // parallel vector of attribute values for each run
+    Vector<Attribute> runAttributes[];         // vector of attribute keys for each run
+    Vector<Object> runAttributeValues[];    // parallel vector of attribute values for each run
 
     /**
      * Constructs an AttributedString instance with the given
@@ -92,7 +92,7 @@
                 // Determine the runs, creating a new run when the attributes
                 // differ.
                 int offset = 0;
-                Map last = null;
+                Map<Attribute,Object> last = null;
 
                 for (int counter = 0; counter < iterators.length; counter++) {
                     AttributedCharacterIterator iterator = iterators[counter];
@@ -103,7 +103,7 @@
                     while (index < end) {
                         iterator.setIndex(index);
 
-                        Map attrs = iterator.getAttributes();
+                        Map<Attribute,Object> attrs = iterator.getAttributes();
 
                         if (mapsDiffer(last, attrs)) {
                             setAttributes(attrs, index - start + offset);
@@ -156,13 +156,14 @@
         int attributeCount = attributes.size();
         if (attributeCount > 0) {
             createRunAttributeDataVectors();
-            Vector newRunAttributes = new Vector(attributeCount);
-            Vector newRunAttributeValues = new Vector(attributeCount);
+            Vector<Attribute> newRunAttributes = new Vector<>(attributeCount);
+            Vector<Object> newRunAttributeValues = new Vector<>(attributeCount);
             runAttributes[0] = newRunAttributes;
             runAttributeValues[0] = newRunAttributeValues;
-            Iterator iterator = attributes.entrySet().iterator();
+
+            Iterator<? extends Map.Entry<? extends Attribute, ?>> iterator = attributes.entrySet().iterator();
             while (iterator.hasNext()) {
-                Map.Entry entry = (Map.Entry) iterator.next();
+                Map.Entry<? extends Attribute, ?> entry = iterator.next();
                 newRunAttributes.addElement(entry.getKey());
                 newRunAttributeValues.addElement(entry.getValue());
             }
@@ -252,7 +253,7 @@
             return;
 
         // Select attribute keys to be taken care of
-        HashSet keys = new HashSet();
+        HashSet<Attribute> keys = new HashSet<>();
         if (attributes == null) {
             keys.addAll(text.getAllAttributeKeys());
         } else {
@@ -266,9 +267,9 @@
         // Get and set attribute runs for each attribute name. Need to
         // scan from the top of the text so that we can discard any
         // Annotation that is no longer applied to a subset text segment.
-        Iterator itr = keys.iterator();
+        Iterator<Attribute> itr = keys.iterator();
         while (itr.hasNext()) {
-            Attribute attributeKey = (Attribute)itr.next();
+            Attribute attributeKey = itr.next();
             text.setIndex(textBeginIndex);
             while (text.getIndex() < endIndex) {
                 int start = text.getRunStart(attributeKey);
@@ -390,10 +391,11 @@
         int beginRunIndex = ensureRunBreak(beginIndex);
         int endRunIndex = ensureRunBreak(endIndex);
 
-        Iterator iterator = attributes.entrySet().iterator();
+        Iterator<? extends Map.Entry<? extends Attribute, ?>> iterator =
+            attributes.entrySet().iterator();
         while (iterator.hasNext()) {
-            Map.Entry entry = (Map.Entry) iterator.next();
-            addAttributeRunData((Attribute) entry.getKey(), entry.getValue(), beginRunIndex, endRunIndex);
+            Map.Entry<? extends Attribute, ?> entry = iterator.next();
+            addAttributeRunData(entry.getKey(), entry.getValue(), beginRunIndex, endRunIndex);
         }
     }
 
@@ -415,8 +417,13 @@
     private final void createRunAttributeDataVectors() {
         // use temporary variables so things remain consistent in case of an exception
         int newRunStarts[] = new int[ARRAY_SIZE_INCREMENT];
-        Vector newRunAttributes[] = new Vector[ARRAY_SIZE_INCREMENT];
-        Vector newRunAttributeValues[] = new Vector[ARRAY_SIZE_INCREMENT];
+
+        @SuppressWarnings("unchecked")
+        Vector<Attribute> newRunAttributes[] = (Vector<Attribute>[]) new Vector<?>[ARRAY_SIZE_INCREMENT];
+
+        @SuppressWarnings("unchecked")
+        Vector<Object> newRunAttributeValues[] = (Vector<Object>[]) new Vector<?>[ARRAY_SIZE_INCREMENT];
+
         runStarts = newRunStarts;
         runAttributes = newRunAttributes;
         runAttributeValues = newRunAttributeValues;
@@ -461,8 +468,13 @@
         if (runCount == runArraySize) {
             int newArraySize = runArraySize + ARRAY_SIZE_INCREMENT;
             int newRunStarts[] = new int[newArraySize];
-            Vector newRunAttributes[] = new Vector[newArraySize];
-            Vector newRunAttributeValues[] = new Vector[newArraySize];
+
+            @SuppressWarnings("unchecked")
+            Vector<Attribute> newRunAttributes[] = (Vector<Attribute>[]) new Vector<?>[newArraySize];
+
+            @SuppressWarnings("unchecked")
+            Vector<Object> newRunAttributeValues[] = (Vector<Object>[]) new Vector<?>[newArraySize];
+
             for (int i = 0; i < runArraySize; i++) {
                 newRunStarts[i] = runStarts[i];
                 newRunAttributes[i] = runAttributes[i];
@@ -476,17 +488,17 @@
 
         // make copies of the attribute information of the old run that the new one used to be part of
         // use temporary variables so things remain consistent in case of an exception
-        Vector newRunAttributes = null;
-        Vector newRunAttributeValues = null;
+        Vector<Attribute> newRunAttributes = null;
+        Vector<Object> newRunAttributeValues = null;
 
         if (copyAttrs) {
-            Vector oldRunAttributes = runAttributes[runIndex - 1];
-            Vector oldRunAttributeValues = runAttributeValues[runIndex - 1];
+            Vector<Attribute> oldRunAttributes = runAttributes[runIndex - 1];
+            Vector<Object> oldRunAttributeValues = runAttributeValues[runIndex - 1];
             if (oldRunAttributes != null) {
-                newRunAttributes = (Vector) oldRunAttributes.clone();
+                newRunAttributes = new Vector<>(oldRunAttributes);
             }
             if (oldRunAttributeValues != null) {
-                newRunAttributeValues = (Vector) oldRunAttributeValues.clone();
+                newRunAttributeValues =  new Vector<>(oldRunAttributeValues);
             }
         }
 
@@ -511,8 +523,8 @@
         for (int i = beginRunIndex; i < endRunIndex; i++) {
             int keyValueIndex = -1; // index of key and value in our vectors; assume we don't have an entry yet
             if (runAttributes[i] == null) {
-                Vector newRunAttributes = new Vector();
-                Vector newRunAttributeValues = new Vector();
+                Vector<Attribute> newRunAttributes = new Vector<>();
+                Vector<Object> newRunAttributeValues = new Vector<>();
                 runAttributes[i] = newRunAttributes;
                 runAttributeValues[i] = newRunAttributeValues;
             } else {
@@ -597,8 +609,8 @@
     }
 
     private synchronized Object getAttribute(Attribute attribute, int runIndex) {
-        Vector currentRunAttributes = runAttributes[runIndex];
-        Vector currentRunAttributeValues = runAttributeValues[runIndex];
+        Vector<Attribute> currentRunAttributes = runAttributes[runIndex];
+        Vector<Object> currentRunAttributeValues = runAttributeValues[runIndex];
         if (currentRunAttributes == null) {
             return null;
         }
@@ -650,10 +662,10 @@
     }
 
     // returns whether all specified attributes have equal values in the runs with the given indices
-    private boolean attributeValuesMatch(Set attributes, int runIndex1, int runIndex2) {
-        Iterator iterator = attributes.iterator();
+    private boolean attributeValuesMatch(Set<? extends Attribute> attributes, int runIndex1, int runIndex2) {
+        Iterator<? extends Attribute> iterator = attributes.iterator();
         while (iterator.hasNext()) {
-            Attribute key = (Attribute) iterator.next();
+            Attribute key = iterator.next();
            if (!valuesMatch(getAttribute(key, runIndex1), getAttribute(key, runIndex2))) {
                 return false;
             }
@@ -690,7 +702,7 @@
      * (typically the end of the text) to the ones specified in attrs.
      * This is only meant to be called from the constructor!
      */
-    private void setAttributes(Map attrs, int offset) {
+    private void setAttributes(Map<Attribute, Object> attrs, int offset) {
         if (runCount == 0) {
             createRunAttributeDataVectors();
         }
@@ -699,12 +711,12 @@
         int size;
 
         if (attrs != null && (size = attrs.size()) > 0) {
-            Vector runAttrs = new Vector(size);
-            Vector runValues = new Vector(size);
-            Iterator iterator = attrs.entrySet().iterator();
+            Vector<Attribute> runAttrs = new Vector<>(size);
+            Vector<Object> runValues = new Vector<>(size);
+            Iterator<Map.Entry<Attribute, Object>> iterator = attrs.entrySet().iterator();
 
             while (iterator.hasNext()) {
-                Map.Entry entry = (Map.Entry)iterator.next();
+                Map.Entry<Attribute, Object> entry = iterator.next();
 
                 runAttrs.add(entry.getKey());
                 runValues.add(entry.getValue());
@@ -717,7 +729,7 @@
     /**
      * Returns true if the attributes specified in last and attrs differ.
      */
-    private static boolean mapsDiffer(Map last, Map attrs) {
+    private static <K,V> boolean mapsDiffer(Map<K, V> last, Map<K, V> attrs) {
         if (last == null) {
             return (attrs != null && attrs.size() > 0);
         }
@@ -761,7 +773,7 @@
             this.currentIndex = beginIndex;
             updateRunInfo();
             if (attributes != null) {
-                relevantAttributes = (Attribute[]) attributes.clone();
+                relevantAttributes = attributes.clone();
             }
         }
 
@@ -944,7 +956,7 @@
             if (runAttributes == null || currentRunIndex == -1 || runAttributes[currentRunIndex] == null) {
                 // ??? would be nice to return null, but current spec doesn't allow it
                 // returning Hashtable saves AttributeMap from dealing with emptiness
-                return new Hashtable();
+                return new Hashtable<>();
             }
             return new AttributeMap(currentRunIndex, beginIndex, endIndex);
         }
@@ -954,16 +966,16 @@
             if (runAttributes == null) {
                 // ??? would be nice to return null, but current spec doesn't allow it
                 // returning HashSet saves us from dealing with emptiness
-                return new HashSet();
+                return new HashSet<>();
             }
             synchronized (AttributedString.this) {
                 // ??? should try to create this only once, then update if necessary,
                 // and give callers read-only view
-                Set keys = new HashSet();
+                Set<Attribute> keys = new HashSet<>();
                 int i = 0;
                 while (i < runCount) {
                     if (runStarts[i] < endIndex && (i == runCount - 1 || runStarts[i + 1] > beginIndex)) {
-                        Vector currentRunAttributes = runAttributes[i];
+                        Vector<Attribute> currentRunAttributes = runAttributes[i];
                         if (currentRunAttributes != null) {
                             int j = currentRunAttributes.size();
                             while (j-- > 0) {
@@ -1052,12 +1064,12 @@
             this.endIndex = endIndex;
         }
 
-        public Set entrySet() {
-            HashSet set = new HashSet();
+        public Set<Map.Entry<Attribute, Object>> entrySet() {
+            HashSet<Map.Entry<Attribute, Object>> set = new HashSet<>();
             synchronized (AttributedString.this) {
                 int size = runAttributes[runIndex].size();
                 for (int i = 0; i < size; i++) {
-                    Attribute key = (Attribute) runAttributes[runIndex].get(i);
+                    Attribute key = runAttributes[runIndex].get(i);
                     Object value = runAttributeValues[runIndex].get(i);
                     if (value instanceof Annotation) {
                         value = AttributedString.this.getAttributeCheckRange(key,
@@ -1066,7 +1078,8 @@
                             continue;
                         }
                     }
-                    Map.Entry entry = new AttributeEntry(key, value);
+
+                    Map.Entry<Attribute, Object> entry = new AttributeEntry(key, value);
                     set.add(entry);
                 }
             }
@@ -1079,7 +1092,7 @@
     }
 }
 
-class AttributeEntry implements Map.Entry {
+class AttributeEntry implements Map.Entry<Attribute,Object> {
 
     private Attribute key;
     private Object value;
@@ -1098,7 +1111,7 @@
             (value == null ? other.value == null : other.value.equals(value));
     }
 
-    public Object getKey() {
+    public Attribute getKey() {
         return key;
     }
 
--- a/jdk/src/share/classes/java/text/BreakDictionary.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/text/BreakDictionary.java	Fri Jun 08 12:44:30 2012 -0700
@@ -145,9 +145,9 @@
 
         BufferedInputStream in;
         try {
-            in = (BufferedInputStream)AccessController.doPrivileged(
-                new PrivilegedExceptionAction() {
-                    public Object run() throws Exception {
+            in = AccessController.doPrivileged(
+                new PrivilegedExceptionAction<BufferedInputStream>() {
+                    public BufferedInputStream run() throws Exception {
                         return new BufferedInputStream(getClass().getResourceAsStream("/sun/text/resources/" + dictionaryName));
                     }
                 }
--- a/jdk/src/share/classes/java/text/BreakIterator.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/text/BreakIterator.java	Fri Jun 08 12:44:30 2012 -0700
@@ -439,7 +439,9 @@
     private static final int WORD_INDEX = 1;
     private static final int LINE_INDEX = 2;
     private static final int SENTENCE_INDEX = 3;
-    private static final SoftReference[] iterCache = new SoftReference[4];
+
+    @SuppressWarnings("unchecked")
+    private static final SoftReference<BreakIteratorCache>[] iterCache = (SoftReference<BreakIteratorCache>[]) new SoftReference<?>[4];
 
     /**
      * Returns a new <code>BreakIterator</code> instance
@@ -554,7 +556,7 @@
                                                   String dataName,
                                                   String dictionaryName) {
         if (iterCache[type] != null) {
-            BreakIteratorCache cache = (BreakIteratorCache) iterCache[type].get();
+            BreakIteratorCache cache = iterCache[type].get();
             if (cache != null) {
                 if (cache.getLocale().equals(locale)) {
                     return cache.createBreakInstance();
@@ -567,13 +569,13 @@
                                                    dataName,
                                                    dictionaryName);
         BreakIteratorCache cache = new BreakIteratorCache(locale, result);
-        iterCache[type] = new SoftReference(cache);
+        iterCache[type] = new SoftReference<>(cache);
         return result;
     }
 
     private static ResourceBundle getBundle(final String baseName, final Locale locale) {
-         return (ResourceBundle) AccessController.doPrivileged(new PrivilegedAction() {
-            public Object run() {
+         return AccessController.doPrivileged(new PrivilegedAction<ResourceBundle>() {
+            public ResourceBundle run() {
                 return ResourceBundle.getBundle(baseName, locale);
             }
         });
--- a/jdk/src/share/classes/java/text/CharacterIteratorFieldDelegate.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/text/CharacterIteratorFieldDelegate.java	Fri Jun 08 12:44:30 2012 -0700
@@ -41,7 +41,7 @@
      * for existing regions result in invoking addAttribute on the existing
      * AttributedStrings.
      */
-    private ArrayList attributedStrings;
+    private ArrayList<AttributedString> attributedStrings;
     /**
      * Running count of the number of characters that have
      * been encountered.
@@ -50,7 +50,7 @@
 
 
     CharacterIteratorFieldDelegate() {
-        attributedStrings = new ArrayList();
+        attributedStrings = new ArrayList<>();
     }
 
     public void formatted(Format.Field attr, Object value, int start, int end,
@@ -62,7 +62,7 @@
                 int asIndex = attributedStrings.size() - 1;
 
                 while (start < index) {
-                    AttributedString as = (AttributedString)attributedStrings.
+                    AttributedString as = attributedStrings.
                                            get(asIndex--);
                     int newIndex = index - as.length();
                     int aStart = Math.max(0, start - newIndex);
@@ -116,8 +116,8 @@
                                     AttributedCharacterIterator[iCount];
 
         for (int counter = 0; counter < iCount; counter++) {
-            iterators[counter] = ((AttributedString)attributedStrings.
-                                  get(counter)).getIterator();
+            iterators[counter] = attributedStrings.
+                                  get(counter).getIterator();
         }
         return new AttributedString(iterators).getIterator();
     }
--- a/jdk/src/share/classes/java/text/ChoiceFormat.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/text/ChoiceFormat.java	Fri Jun 08 12:44:30 2012 -0700
@@ -457,8 +457,8 @@
     {
         ChoiceFormat other = (ChoiceFormat) super.clone();
         // for primitives or immutables, shallow clone is enough
-        other.choiceLimits = (double[]) choiceLimits.clone();
-        other.choiceFormats = (String[]) choiceFormats.clone();
+        other.choiceLimits = choiceLimits.clone();
+        other.choiceFormats = choiceFormats.clone();
         return other;
     }
 
--- a/jdk/src/share/classes/java/text/CollationElementIterator.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/text/CollationElementIterator.java	Fri Jun 08 12:44:30 2012 -0700
@@ -412,6 +412,7 @@
      * @param newOffset The new character offset into the original text.
      * @since 1.2
      */
+    @SuppressWarnings("deprecation") // getBeginIndex, getEndIndex and setIndex are deprecated
     public void setOffset(int newOffset)
     {
         if (text != null) {
@@ -645,14 +646,14 @@
     {
         // First get the ordering of this single character,
         // which is always the first element in the list
-        Vector list = ordering.getContractValues(ch);
-        EntryPair pair = (EntryPair)list.firstElement();
+        Vector<EntryPair> list = ordering.getContractValues(ch);
+        EntryPair pair = list.firstElement();
         int order = pair.value;
 
         // find out the length of the longest contracting character sequence in the list.
         // There's logic in the builder code to make sure the longest sequence is always
         // the last.
-        pair = (EntryPair)list.lastElement();
+        pair = list.lastElement();
         int maxLength = pair.entryName.length();
 
         // (the Normalizer is cloned here so that the seeking we do in the next loop
@@ -684,7 +685,7 @@
         // to this sequence
         maxLength = 1;
         for (int i = list.size() - 1; i > 0; i--) {
-            pair = (EntryPair)list.elementAt(i);
+            pair = list.elementAt(i);
             if (!pair.fwd)
                 continue;
 
@@ -721,11 +722,11 @@
         // rather than off.  Notice that we still use append() and startsWith() when
         // working on the fragment.  This is because the entry pairs that are used
         // in reverse iteration have their names reversed already.
-        Vector list = ordering.getContractValues(ch);
-        EntryPair pair = (EntryPair)list.firstElement();
+        Vector<EntryPair> list = ordering.getContractValues(ch);
+        EntryPair pair = list.firstElement();
         int order = pair.value;
 
-        pair = (EntryPair)list.lastElement();
+        pair = list.lastElement();
         int maxLength = pair.entryName.length();
 
         NormalizerBase tempText = (NormalizerBase)text.clone();
@@ -747,7 +748,7 @@
 
         maxLength = 1;
         for (int i = list.size() - 1; i > 0; i--) {
-            pair = (EntryPair)list.elementAt(i);
+            pair = list.elementAt(i);
             if (pair.fwd)
                 continue;
 
--- a/jdk/src/share/classes/java/text/DateFormat.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/text/DateFormat.java	Fri Jun 08 12:44:30 2012 -0700
@@ -798,7 +798,7 @@
         private static final long serialVersionUID = 7441350119349544720L;
 
         // table of all instances in this class, used by readResolve
-        private static final Map instanceMap = new HashMap(18);
+        private static final Map<String, Field> instanceMap = new HashMap<>(18);
         // Maps from Calendar constant (such as Calendar.ERA) to Field
         // constant (such as Field.ERA).
         private static final Field[] calendarToFieldMapping =
--- a/jdk/src/share/classes/java/text/DecimalFormat.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/text/DecimalFormat.java	Fri Jun 08 12:44:30 2012 -0700
@@ -2051,7 +2051,7 @@
      * @return FieldPosition array of the resulting fields.
      */
     private FieldPosition[] expandAffix(String pattern) {
-        ArrayList positions = null;
+        ArrayList<FieldPosition> positions = null;
         int stringIndex = 0;
         for (int i=0; i<pattern.length(); ) {
             char c = pattern.charAt(i++);
@@ -2071,7 +2071,7 @@
                     }
                     if (string.length() > 0) {
                         if (positions == null) {
-                            positions = new ArrayList(2);
+                            positions = new ArrayList<>(2);
                         }
                         FieldPosition fp = new FieldPosition(Field.CURRENCY);
                         fp.setBeginIndex(stringIndex);
@@ -2098,7 +2098,7 @@
                 }
                 if (fieldID != null) {
                     if (positions == null) {
-                        positions = new ArrayList(2);
+                        positions = new ArrayList<>(2);
                     }
                     FieldPosition fp = new FieldPosition(fieldID, field);
                     fp.setBeginIndex(stringIndex);
@@ -2109,7 +2109,7 @@
             stringIndex++;
         }
         if (positions != null) {
-            return (FieldPosition[])positions.toArray(EmptyFieldPositionArray);
+            return positions.toArray(EmptyFieldPositionArray);
         }
         return EmptyFieldPositionArray;
     }
--- a/jdk/src/share/classes/java/text/DictionaryBasedBreakIterator.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/text/DictionaryBasedBreakIterator.java	Fri Jun 08 12:44:30 2012 -0700
@@ -356,9 +356,9 @@
         // continues in this way until we either successfully make it all the way
         // across the range, or exhaust all of our combinations of break
         // positions.)
-        Stack currentBreakPositions = new Stack();
-        Stack possibleBreakPositions = new Stack();
-        Vector wrongBreakPositions = new Vector();
+        Stack<Integer> currentBreakPositions = new Stack<>();
+        Stack<Integer> possibleBreakPositions = new Stack<>();
+        Vector<Integer> wrongBreakPositions = new Vector<>();
 
         // the dictionary is implemented as a trie, which is treated as a state
         // machine.  -1 represents the end of a legal word.  Every word in the
@@ -374,7 +374,7 @@
         // farthest as real break positions, and then start over from scratch with
         // the character where the error occurred.
         int farthestEndPoint = text.getIndex();
-        Stack bestBreakPositions = null;
+        Stack<Integer> bestBreakPositions = null;
 
         // initialize (we always exit the loop with a break statement)
         c = getCurrent();
@@ -409,7 +409,11 @@
                 // case there's an error in the text
                 if (text.getIndex() > farthestEndPoint) {
                     farthestEndPoint = text.getIndex();
-                    bestBreakPositions = (Stack)(currentBreakPositions.clone());
+
+                    @SuppressWarnings("unchecked")
+                    Stack<Integer> currentBreakPositionsCopy = (Stack<Integer>) currentBreakPositions.clone();
+
+                    bestBreakPositions = currentBreakPositionsCopy;
                 }
 
                 // wrongBreakPositions is a list of all break positions
@@ -448,7 +452,7 @@
                     }
                     else {
                         if ((currentBreakPositions.size() == 0 ||
-                             ((Integer)(currentBreakPositions.peek())).intValue() != text.getIndex())
+                             currentBreakPositions.peek().intValue() != text.getIndex())
                             && text.getIndex() != startPos) {
                             currentBreakPositions.push(new Integer(text.getIndex()));
                         }
@@ -463,15 +467,15 @@
                 // it.  Then back up to that position and start over from there (i.e.,
                 // treat that position as the beginning of a new word)
                 else {
-                    Integer temp = (Integer)possibleBreakPositions.pop();
-                    Object temp2 = null;
+                    Integer temp = possibleBreakPositions.pop();
+                    Integer temp2 = null;
                     while (!currentBreakPositions.isEmpty() && temp.intValue() <
-                           ((Integer)currentBreakPositions.peek()).intValue()) {
+                           currentBreakPositions.peek().intValue()) {
                         temp2 = currentBreakPositions.pop();
                         wrongBreakPositions.addElement(temp2);
                     }
                     currentBreakPositions.push(temp);
-                    text.setIndex(((Integer)currentBreakPositions.peek()).intValue());
+                    text.setIndex(currentBreakPositions.peek().intValue());
                 }
 
                 // re-sync "c" for the next go-round, and drop out of the loop if
@@ -507,7 +511,7 @@
         cachedBreakPositions[0] = startPos;
 
         for (int i = 0; i < currentBreakPositions.size(); i++) {
-            cachedBreakPositions[i + 1] = ((Integer)currentBreakPositions.elementAt(i)).intValue();
+            cachedBreakPositions[i + 1] = currentBreakPositions.elementAt(i).intValue();
         }
         positionInCache = 0;
     }
--- a/jdk/src/share/classes/java/text/MergeCollation.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/text/MergeCollation.java	Fri Jun 08 12:44:30 2012 -0700
@@ -88,19 +88,19 @@
     public String getPattern(boolean withWhiteSpace) {
         StringBuffer result = new StringBuffer();
         PatternEntry tmp = null;
-        ArrayList extList = null;
+        ArrayList<PatternEntry> extList = null;
         int i;
         for (i = 0; i < patterns.size(); ++i) {
-            PatternEntry entry = (PatternEntry) patterns.get(i);
+            PatternEntry entry = patterns.get(i);
             if (entry.extension.length() != 0) {
                 if (extList == null)
-                    extList = new ArrayList();
+                    extList = new ArrayList<>();
                 extList.add(entry);
             } else {
                 if (extList != null) {
                     PatternEntry last = findLastWithNoExtension(i-1);
                     for (int j = extList.size() - 1; j >= 0 ; j--) {
-                        tmp = (PatternEntry)(extList.get(j));
+                        tmp = extList.get(j);
                         tmp.addToBuffer(result, false, withWhiteSpace, last);
                     }
                     extList = null;
@@ -111,7 +111,7 @@
         if (extList != null) {
             PatternEntry last = findLastWithNoExtension(i-1);
             for (int j = extList.size() - 1; j >= 0 ; j--) {
-                tmp = (PatternEntry)(extList.get(j));
+                tmp = extList.get(j);
                 tmp.addToBuffer(result, false, withWhiteSpace, last);
             }
             extList = null;
@@ -121,7 +121,7 @@
 
     private final PatternEntry findLastWithNoExtension(int i) {
         for (--i;i >= 0; --i) {
-            PatternEntry entry = (PatternEntry) patterns.get(i);
+            PatternEntry entry = patterns.get(i);
             if (entry.extension.length() == 0) {
                 return entry;
             }
@@ -149,7 +149,7 @@
         StringBuffer result = new StringBuffer();
         for (int i = 0; i < patterns.size(); ++i)
         {
-            PatternEntry entry = (PatternEntry) patterns.get(i);
+            PatternEntry entry = patterns.get(i);
             if (entry != null) {
                 entry.addToBuffer(result, true, withWhiteSpace, null);
             }
@@ -198,13 +198,13 @@
      * @return the requested pattern entry
      */
     public PatternEntry getItemAt(int index) {
-        return (PatternEntry) patterns.get(index);
+        return patterns.get(index);
     }
 
     //============================================================
     // privates
     //============================================================
-    ArrayList patterns = new ArrayList(); // a list of PatternEntries
+    ArrayList<PatternEntry> patterns = new ArrayList<>(); // a list of PatternEntries
 
     private transient PatternEntry saveEntry = null;
     private transient PatternEntry lastEntry = null;
@@ -326,7 +326,7 @@
         } else {
             int i;
             for (i = patterns.size() - 1; i >= 0; --i) {
-                PatternEntry e = (PatternEntry) patterns.get(i);
+                PatternEntry e = patterns.get(i);
                 if (e.chars.regionMatches(0,entry.chars,0,
                                               e.chars.length())) {
                     excessChars.append(entry.chars.substring(e.chars.length(),
--- a/jdk/src/share/classes/java/text/MessageFormat.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/text/MessageFormat.java	Fri Jun 08 12:44:30 2012 -0700
@@ -422,6 +422,7 @@
      * @param pattern the pattern for this message format
      * @exception IllegalArgumentException if the pattern is invalid
      */
+    @SuppressWarnings("fallthrough") // fallthrough in switch is expected, suppress it
     public void applyPattern(String pattern) {
             StringBuilder[] segments = new StringBuilder[4];
             // Allocate only segments[SEG_RAW] here. The rest are
@@ -897,7 +898,7 @@
      */
     public AttributedCharacterIterator formatToCharacterIterator(Object arguments) {
         StringBuffer result = new StringBuffer();
-        ArrayList iterators = new ArrayList();
+        ArrayList<AttributedCharacterIterator> iterators = new ArrayList<>();
 
         if (arguments == null) {
             throw new NullPointerException(
@@ -908,7 +909,7 @@
             return createAttributedCharacterIterator("");
         }
         return createAttributedCharacterIterator(
-                     (AttributedCharacterIterator[])iterators.toArray(
+                     iterators.toArray(
                      new AttributedCharacterIterator[iterators.size()]));
     }
 
@@ -1074,14 +1075,14 @@
         MessageFormat other = (MessageFormat) super.clone();
 
         // clone arrays. Can't do with utility because of bug in Cloneable
-        other.formats = (Format[]) formats.clone(); // shallow clone
+        other.formats = formats.clone(); // shallow clone
         for (int i = 0; i < formats.length; ++i) {
             if (formats[i] != null)
                 other.formats[i] = (Format)formats[i].clone();
         }
         // for primitives or immutables, shallow clone is enough
-        other.offsets = (int[]) offsets.clone();
-        other.argumentNumbers = (int[]) argumentNumbers.clone();
+        other.offsets = offsets.clone();
+        other.argumentNumbers = argumentNumbers.clone();
 
         return other;
     }
@@ -1224,7 +1225,7 @@
      *            expected by the format element(s) that use it.
      */
     private StringBuffer subformat(Object[] arguments, StringBuffer result,
-                                   FieldPosition fp, List characterIterators) {
+                                   FieldPosition fp, List<AttributedCharacterIterator> characterIterators) {
         // note: this implementation assumes a fast substring & index.
         // if this is not true, would be better to append chars one by one.
         int lastOffset = 0;
--- a/jdk/src/share/classes/java/text/NumberFormat.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/text/NumberFormat.java	Fri Jun 08 12:44:30 2012 -0700
@@ -756,7 +756,7 @@
         }
 
         /* try the cache first */
-        String[] numberPatterns = (String[])cachedLocaleData.get(desiredLocale);
+        String[] numberPatterns = cachedLocaleData.get(desiredLocale);
         if (numberPatterns == null) { /* cache miss */
             ResourceBundle resource = LocaleData.getNumberFormatData(desiredLocale);
             numberPatterns = resource.getStringArray("NumberPatterns");
@@ -844,7 +844,7 @@
     /**
      * Cache to hold the NumberPatterns of a Locale.
      */
-    private static final Hashtable cachedLocaleData = new Hashtable(3);
+    private static final Hashtable<Locale, String[]> cachedLocaleData = new Hashtable<>(3);
 
     // Constants used by factory methods to specify a style of format.
     private static final int NUMBERSTYLE = 0;
@@ -1035,7 +1035,7 @@
         private static final long serialVersionUID = 7494728892700160890L;
 
         // table of all instances in this class, used by readResolve
-        private static final Map instanceMap = new HashMap(11);
+        private static final Map<String, Field> instanceMap = new HashMap<>(11);
 
         /**
          * Creates a Field instance with the specified
--- a/jdk/src/share/classes/java/text/ParseException.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/text/ParseException.java	Fri Jun 08 12:44:30 2012 -0700
@@ -49,6 +49,8 @@
 public
 class ParseException extends Exception {
 
+    private static final long serialVersionUID = 2703218443322787634L;
+
     /**
      * Constructs a ParseException with the specified detail message and
      * offset.
--- a/jdk/src/share/classes/java/text/RBCollationTables.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/text/RBCollationTables.java	Fri Jun 08 12:44:30 2012 -0700
@@ -112,8 +112,8 @@
         void fillInTables(boolean f2ary,
                           boolean swap,
                           UCompactIntArray map,
-                          Vector cTbl,
-                          Vector eTbl,
+                          Vector<Vector<EntryPair>> cTbl,
+                          Vector<int[]> eTbl,
                           IntHashtable cFlgs,
                           short mso,
                           short mto) {
@@ -155,18 +155,18 @@
      *  table.
      *  @param ch the starting character of the contracting string
      */
-    Vector getContractValues(int ch)
+    Vector<EntryPair> getContractValues(int ch)
     {
         int index = mapping.elementAt(ch);
         return getContractValuesImpl(index - CONTRACTCHARINDEX);
     }
 
     //get contract values from contractTable by index
-    private Vector getContractValuesImpl(int index)
+    private Vector<EntryPair> getContractValuesImpl(int index)
     {
         if (index >= 0)
         {
-            return (Vector)contractTable.elementAt(index);
+            return contractTable.elementAt(index);
         }
         else // not found
         {
@@ -202,7 +202,7 @@
             // this could cause a performance problem, but in practise that
             // rarely happens
             for (int i = 0; i < expandTable.size(); i++) {
-                int[] valueList = (int [])expandTable.elementAt(i);
+                int[] valueList = expandTable.elementAt(i);
                 int length = valueList.length;
 
                 if (length > result && valueList[length-1] == order) {
@@ -220,7 +220,7 @@
      *  @param idx the index of the expanding string value list
      */
     final int[] getExpandValueList(int order) {
-        return (int[])expandTable.elementAt(order - EXPANDCHARINDEX);
+        return expandTable.elementAt(order - EXPANDCHARINDEX);
     }
 
     /**
@@ -260,9 +260,9 @@
         }
     }
 
-    final static int getEntry(Vector list, String name, boolean fwd) {
+    final static int getEntry(Vector<EntryPair> list, String name, boolean fwd) {
         for (int i = 0; i < list.size(); i++) {
-            EntryPair pair = (EntryPair)list.elementAt(i);
+            EntryPair pair = list.elementAt(i);
             if (pair.fwd == fwd && pair.entryName.equals(name)) {
                 return i;
             }
@@ -294,8 +294,8 @@
     private boolean seAsianSwapping = false;
 
     private UCompactIntArray mapping = null;
-    private Vector contractTable = null;
-    private Vector expandTable = null;
+    private Vector<Vector<EntryPair>> contractTable = null;
+    private Vector<int[]> expandTable = null;
     private IntHashtable contractFlags = null;
 
     private short maxSecOrder = 0;
--- a/jdk/src/share/classes/java/text/RBTableBuilder.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/text/RBTableBuilder.java	Fri Jun 08 12:44:30 2012 -0700
@@ -85,7 +85,7 @@
             throw new ParseException("Build rules empty.", 0);
 
         // This array maps Unicode characters to their collation ordering
-        mapping = new UCompactIntArray((int)RBCollationTables.UNMAPPED);
+        mapping = new UCompactIntArray(RBCollationTables.UNMAPPED);
         // Normalize the build rules.  Find occurances of all decomposed characters
         // and normalize the rules before feeding into the builder.  By "normalize",
         // we mean that all precomposed Unicode characters must be converted into
@@ -263,7 +263,7 @@
     {
         if (expandTable != null) {
             for (int i = 0; i < expandTable.size(); i++) {
-                int[] valueList = (int [])expandTable.elementAt(i);
+                int[] valueList = expandTable.elementAt(i);
                 for (int j = 0; j < valueList.length; j++) {
                     int order = valueList[j];
                     if (order < RBCollationTables.EXPANDCHARINDEX && order > CHARINDEX) {
@@ -354,7 +354,7 @@
                                           boolean fwd)
     {
         if (contractTable == null) {
-            contractTable = new Vector(INITIALTABLESIZE);
+            contractTable = new Vector<>(INITIALTABLESIZE);
         }
 
         //initial character
@@ -366,12 +366,12 @@
           */
         // See if the initial character of the string already has a contract table.
         int entry = mapping.elementAt(ch);
-        Vector entryTable = getContractValuesImpl(entry - RBCollationTables.CONTRACTCHARINDEX);
+        Vector<EntryPair> entryTable = getContractValuesImpl(entry - RBCollationTables.CONTRACTCHARINDEX);
 
         if (entryTable == null) {
             // We need to create a new table of contract entries for this base char
             int tableIndex = RBCollationTables.CONTRACTCHARINDEX + contractTable.size();
-            entryTable = new Vector(INITIALTABLESIZE);
+            entryTable = new Vector<>(INITIALTABLESIZE);
             contractTable.addElement(entryTable);
 
             // Add the initial character's current ordering first. then
@@ -383,10 +383,10 @@
         // Now add (or replace) this string in the table
         int index = RBCollationTables.getEntry(entryTable, groupChars, fwd);
         if (index != RBCollationTables.UNMAPPED) {
-            EntryPair pair = (EntryPair) entryTable.elementAt(index);
+            EntryPair pair = entryTable.elementAt(index);
             pair.value = anOrder;
         } else {
-            EntryPair pair = (EntryPair)entryTable.lastElement();
+            EntryPair pair = entryTable.lastElement();
 
             // NOTE:  This little bit of logic is here to speed CollationElementIterator
             // .nextContractChar().  This code ensures that the longest sequence in
@@ -426,11 +426,11 @@
             int ch = Character.isHighSurrogate(ch0)?
               Character.toCodePoint(ch0, groupChars.charAt(1)):ch0;
               */
-            Vector entryTable = getContractValues(ch);
+            Vector<EntryPair> entryTable = getContractValues(ch);
             if (entryTable != null) {
                 int index = RBCollationTables.getEntry(entryTable, groupChars, true);
                 if (index != RBCollationTables.UNMAPPED) {
-                    EntryPair pair = (EntryPair) entryTable.elementAt(index);
+                    EntryPair pair = entryTable.elementAt(index);
                     result = pair.value;
                 }
             }
@@ -442,8 +442,8 @@
         int order = mapping.elementAt(ch);
 
         if (order >= RBCollationTables.CONTRACTCHARINDEX) {
-            Vector groupList = getContractValuesImpl(order - RBCollationTables.CONTRACTCHARINDEX);
-            EntryPair pair = (EntryPair)groupList.firstElement();
+            Vector<EntryPair> groupList = getContractValuesImpl(order - RBCollationTables.CONTRACTCHARINDEX);
+            EntryPair pair = groupList.firstElement();
             order = pair.value;
         }
         return order;
@@ -454,17 +454,17 @@
      *  table.
      *  @param ch the starting character of the contracting string
      */
-    private Vector getContractValues(int ch)
+    private Vector<EntryPair> getContractValues(int ch)
     {
         int index = mapping.elementAt(ch);
         return getContractValuesImpl(index - RBCollationTables.CONTRACTCHARINDEX);
     }
 
-    private Vector getContractValuesImpl(int index)
+    private Vector<EntryPair> getContractValuesImpl(int index)
     {
         if (index >= 0)
         {
-            return (Vector)contractTable.elementAt(index);
+            return contractTable.elementAt(index);
         }
         else // not found
         {
@@ -513,7 +513,7 @@
      */
     private int addExpansion(int anOrder, String expandChars) {
         if (expandTable == null) {
-            expandTable = new Vector(INITIALTABLESIZE);
+            expandTable = new Vector<>(INITIALTABLESIZE);
         }
 
         // If anOrder is valid, we want to add it at the beginning of the list
@@ -610,8 +610,8 @@
     private boolean seAsianSwapping = false;
 
     private UCompactIntArray mapping = null;
-    private Vector   contractTable = null;
-    private Vector   expandTable = null;
+    private Vector<Vector<EntryPair>>   contractTable = null;
+    private Vector<int[]>   expandTable = null;
 
     private short maxSecOrder = 0;
     private short maxTerOrder = 0;
--- a/jdk/src/share/classes/java/text/RuleBasedBreakIterator.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/text/RuleBasedBreakIterator.java	Fri Jun 08 12:44:30 2012 -0700
@@ -444,9 +444,9 @@
 
         BufferedInputStream is;
         try {
-            is = (BufferedInputStream)AccessController.doPrivileged(
-                new PrivilegedExceptionAction() {
-                    public Object run() throws Exception {
+            is = AccessController.doPrivileged(
+                new PrivilegedExceptionAction<BufferedInputStream>() {
+                    public BufferedInputStream run() throws Exception {
                         return new BufferedInputStream(getClass().getResourceAsStream("/sun/text/resources/" + datafile));
                     }
                 }
--- a/jdk/src/share/classes/java/util/EnumMap.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/util/EnumMap.java	Fri Jun 08 12:44:30 2012 -0700
@@ -730,6 +730,7 @@
             throw new AssertionError();
         }
         result.vals = result.vals.clone();
+        result.entrySet = null;
         return result;
     }
 
--- a/jdk/src/share/classes/java/util/HashMap.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/util/HashMap.java	Fri Jun 08 12:44:30 2012 -0700
@@ -175,6 +175,35 @@
      */
     transient int modCount;
 
+    private static class Holder {
+         /**
+         *
+         */
+        static final sun.misc.Unsafe UNSAFE;
+
+        /**
+         * Offset of "final" hashSeed field we must set in
+         * readObject() method.
+         */
+        static final long HASHSEED_OFFSET;
+
+        static {
+            try {
+                UNSAFE = sun.misc.Unsafe.getUnsafe();
+                HASHSEED_OFFSET = UNSAFE.objectFieldOffset(
+                    HashMap.class.getDeclaredField("hashSeed"));
+            } catch (NoSuchFieldException | SecurityException e) {
+                throw new InternalError("Failed to record hashSeed offset", e);
+            }
+        }
+    }
+
+    /**
+     * A randomizing value associated with this instance that is applied to
+     * hash code of keys to make hash collisions harder to find.
+     */
+    transient final int hashSeed = sun.misc.Hashing.randomHashSeed(this);
+
     /**
      * Constructs an empty <tt>HashMap</tt> with the specified initial
      * capacity and load factor.
@@ -200,7 +229,7 @@
             capacity <<= 1;
 
         this.loadFactor = loadFactor;
-        threshold = (int)(capacity * loadFactor);
+        threshold = (int)Math.min(capacity * loadFactor, MAXIMUM_CAPACITY + 1);
         table = new Entry[capacity];
         init();
     }
@@ -221,10 +250,7 @@
      * (16) and the default load factor (0.75).
      */
     public HashMap() {
-        this.loadFactor = DEFAULT_LOAD_FACTOR;
-        threshold = (int)(DEFAULT_INITIAL_CAPACITY * DEFAULT_LOAD_FACTOR);
-        table = new Entry[DEFAULT_INITIAL_CAPACITY];
-        init();
+        this(DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR);
     }
 
     /**
@@ -255,13 +281,20 @@
     }
 
     /**
-     * Applies a supplemental hash function to a given hashCode, which
-     * defends against poor quality hash functions.  This is critical
-     * because HashMap uses power-of-two length hash tables, that
+     * Retrieve object hash code and applies a supplemental hash function to the
+     * result hash, which defends against poor quality hash functions.  This is
+     * critical because HashMap uses power-of-two length hash tables, that
      * otherwise encounter collisions for hashCodes that do not differ
-     * in lower bits. Note: Null keys always map to hash 0, thus index 0.
+     * in lower bits.
      */
-    static int hash(int h) {
+    final int hash(Object k) {
+        int h = hashSeed;
+        if (k instanceof String) {
+            return ((String)k).hash32();
+        }
+
+        h ^= k.hashCode();
+
         // This function ensures that hashCodes that differ only by
         // constant multiples at each bit position have a bounded
         // number of collisions (approximately 8 at default load factor).
@@ -313,32 +346,9 @@
      */
     @SuppressWarnings("unchecked")
     public V get(Object key) {
-        if (key == null)
-            return (V)getForNullKey();
-        int hash = hash(key.hashCode());
-        for (Entry<?,?> e = table[indexFor(hash, table.length)];
-             e != null;
-             e = e.next) {
-            Object k;
-            if (e.hash == hash && ((k = e.key) == key || key.equals(k)))
-                return (V)e.value;
-        }
-        return null;
-    }
+        Entry<K,V> entry = getEntry(key);
 
-    /**
-     * Offloaded version of get() to look up null keys.  Null keys map
-     * to index 0.  This null case is split out into separate methods
-     * for the sake of performance in the two most commonly used
-     * operations (get and put), but incorporated with conditionals in
-     * others.
-     */
-    private Object getForNullKey() {
-        for (Entry<?,?> e = table[0]; e != null; e = e.next) {
-            if (e.key == null)
-                return e.value;
-        }
-        return null;
+        return null == entry ? null : entry.getValue();
     }
 
     /**
@@ -360,7 +370,7 @@
      */
     @SuppressWarnings("unchecked")
     final Entry<K,V> getEntry(Object key) {
-        int hash = (key == null) ? 0 : hash(key.hashCode());
+        int hash = (key == null) ? 0 : hash(key);
         for (Entry<?,?> e = table[indexFor(hash, table.length)];
              e != null;
              e = e.next) {
@@ -388,7 +398,7 @@
     public V put(K key, V value) {
         if (key == null)
             return putForNullKey(value);
-        int hash = hash(key.hashCode());
+        int hash = hash(key);
         int i = indexFor(hash, table.length);
         @SuppressWarnings("unchecked")
         Entry<K,V> e = (Entry<K,V>)table[i];
@@ -433,7 +443,7 @@
      * addEntry.
      */
     private void putForCreate(K key, V value) {
-        int hash = (key == null) ? 0 : hash(key.hashCode());
+        int hash = null == key ? 0 : hash(key);
         int i = indexFor(hash, table.length);
 
         /**
@@ -484,7 +494,7 @@
         Entry<?,?>[] newTable = new Entry<?,?>[newCapacity];
         transfer(newTable);
         table = newTable;
-        threshold = (int)(newCapacity * loadFactor);
+        threshold = (int)Math.min(newCapacity * loadFactor, MAXIMUM_CAPACITY + 1);
     }
 
     /**
@@ -494,19 +504,17 @@
     void transfer(Entry<?,?>[] newTable) {
         Entry<?,?>[] src = table;
         int newCapacity = newTable.length;
-        for (int j = 0; j < src.length; j++) {
-            Entry<K,V> e = (Entry<K,V>)src[j];
-            if (e != null) {
-                src[j] = null;
-                do {
-                    Entry<K,V> next = e.next;
-                    int i = indexFor(e.hash, newCapacity);
-                    e.next = (Entry<K,V>)newTable[i];
-                    newTable[i] = e;
-                    e = next;
-                } while (e != null);
+        for (int j = 0; j < src.length; j++ ) {
+            Entry<K,V> e = (Entry<K,V>) src[j];
+            while(null != e) {
+                Entry<K,V> next = e.next;
+                int i = indexFor(e.hash, newCapacity);
+                e.next = (Entry<K,V>) newTable[i];
+                newTable[i] = e;
+                e = next;
             }
         }
+        Arrays.fill(table, null);
     }
 
     /**
@@ -566,7 +574,7 @@
      * for this key.
      */
     final Entry<K,V> removeEntryForKey(Object key) {
-        int hash = (key == null) ? 0 : hash(key.hashCode());
+        int hash = (key == null) ? 0 : hash(key);
         int i = indexFor(hash, table.length);
         @SuppressWarnings("unchecked")
             Entry<K,V> prev = (Entry<K,V>)table[i];
@@ -594,7 +602,8 @@
     }
 
     /**
-     * Special version of remove for EntrySet.
+     * Special version of remove for EntrySet using {@code Map.Entry.equals()}
+     * for matching.
      */
     final Entry<K,V> removeMapping(Object o) {
         if (!(o instanceof Map.Entry))
@@ -602,7 +611,7 @@
 
         Map.Entry<?,?> entry = (Map.Entry<?,?>) o;
         Object key = entry.getKey();
-        int hash = (key == null) ? 0 : hash(key.hashCode());
+        int hash = (key == null) ? 0 : hash(key);
         int i = indexFor(hash, table.length);
         @SuppressWarnings("unchecked")
             Entry<K,V> prev = (Entry<K,V>)table[i];
@@ -773,11 +782,13 @@
      * Subclass overrides this to alter the behavior of put method.
      */
     void addEntry(int hash, K key, V value, int bucketIndex) {
-        @SuppressWarnings("unchecked")
-            Entry<K,V> e = (Entry<K,V>)table[bucketIndex];
-        table[bucketIndex] = new Entry<>(hash, key, value, e);
-        if (size++ >= threshold)
+        if ((size >= threshold) && (null != table[bucketIndex])) {
             resize(2 * table.length);
+            hash = (null != key) ? hash(key) : 0;
+            bucketIndex = indexFor(hash, table.length);
+        }
+
+        createEntry(hash, key, value, bucketIndex);
     }
 
     /**
@@ -841,7 +852,6 @@
             HashMap.this.removeEntryForKey(k);
             expectedModCount = modCount;
         }
-
     }
 
     private final class ValueIterator extends HashIterator<V> {
@@ -1021,9 +1031,8 @@
         s.writeInt(size);
 
         // Write out keys and values (alternating)
-        if (i != null) {
-            while (i.hasNext()) {
-                Map.Entry<K,V> e = i.next();
+        if (size > 0) {
+            for(Map.Entry<K,V> e : entrySet0()) {
                 s.writeObject(e.getKey());
                 s.writeObject(e.getValue());
             }
@@ -1033,26 +1042,50 @@
     private static final long serialVersionUID = 362498820763181265L;
 
     /**
-     * Reconstitute the <tt>HashMap</tt> instance from a stream (i.e.,
+     * Reconstitute the {@code HashMap} instance from a stream (i.e.,
      * deserialize it).
      */
     private void readObject(java.io.ObjectInputStream s)
          throws IOException, ClassNotFoundException
     {
-        // Read in the threshold, loadfactor, and any hidden stuff
+        // Read in the threshold (ignored), loadfactor, and any hidden stuff
         s.defaultReadObject();
+        if (loadFactor <= 0 || Float.isNaN(loadFactor))
+            throw new InvalidObjectException("Illegal load factor: " +
+                                               loadFactor);
+
+        // set hashMask
+        Holder.UNSAFE.putIntVolatile(this, Holder.HASHSEED_OFFSET,
+                sun.misc.Hashing.randomHashSeed(this));
 
         // Read in number of buckets and allocate the bucket array;
-        int numBuckets = s.readInt();
-        table = new Entry[numBuckets];
+        s.readInt(); // ignored
 
+        // Read number of mappings
+        int mappings = s.readInt();
+        if (mappings < 0)
+            throw new InvalidObjectException("Illegal mappings count: " +
+                                               mappings);
+
+        int initialCapacity = (int) Math.min(
+                // capacity chosen by number of mappings
+                // and desired load (if >= 0.25)
+                mappings * Math.min(1 / loadFactor, 4.0f),
+                // we have limits...
+                HashMap.MAXIMUM_CAPACITY);
+        int capacity = 1;
+        // find smallest power of two which holds all mappings
+        while (capacity < initialCapacity) {
+            capacity <<= 1;
+        }
+
+        table = new Entry[capacity];
+        threshold = (int) Math.min(capacity * loadFactor, MAXIMUM_CAPACITY + 1);
         init();  // Give subclass a chance to do its thing.
 
-        // Read in size (number of Mappings)
-        int size = s.readInt();
 
         // Read the keys and values, and put the mappings in the HashMap
-        for (int i=0; i<size; i++) {
+        for (int i=0; i<mappings; i++) {
             @SuppressWarnings("unchecked")
                 K key = (K) s.readObject();
             @SuppressWarnings("unchecked")
--- a/jdk/src/share/classes/java/util/Hashtable.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/util/Hashtable.java	Fri Jun 08 12:44:30 2012 -0700
@@ -163,6 +163,52 @@
     /** use serialVersionUID from JDK 1.0.2 for interoperability */
     private static final long serialVersionUID = 1421746759512286392L;
 
+    private static class Holder {
+            // Unsafe mechanics
+        /**
+         *
+         */
+        static final sun.misc.Unsafe UNSAFE;
+
+        /**
+         * Offset of "final" hashSeed field we must set in
+         * readObject() method.
+         */
+        static final long HASHSEED_OFFSET;
+
+        static {
+            try {
+                UNSAFE = sun.misc.Unsafe.getUnsafe();
+                HASHSEED_OFFSET = UNSAFE.objectFieldOffset(
+                    Hashtable.class.getDeclaredField("hashSeed"));
+            } catch (NoSuchFieldException | SecurityException e) {
+                throw new InternalError("Failed to record hashSeed offset", e);
+            }
+        }
+    }
+
+    /**
+     * A randomizing value associated with this instance that is applied to
+     * hash code of keys to make hash collisions harder to find.
+     */
+    transient final int hashSeed = sun.misc.Hashing.randomHashSeed(this);
+
+    private int hash(Object k) {
+        int h = hashSeed;
+
+        if (k instanceof String) {
+            return ((String)k).hash32();
+        } else {
+            h ^= k.hashCode();
+
+            // This function ensures that hashCodes that differ only by
+            // constant multiples at each bit position have a bounded
+            // number of collisions (approximately 8 at default load factor).
+            h ^= (h >>> 20) ^ (h >>> 12);
+            return h ^ (h >>> 7) ^ (h >>> 4);
+        }
+    }
+
     /**
      * Constructs a new, empty hashtable with the specified initial
      * capacity and the specified load factor.
@@ -183,7 +229,7 @@
             initialCapacity = 1;
         this.loadFactor = loadFactor;
         table = new Entry<?,?>[initialCapacity];
-        threshold = (int)(initialCapacity * loadFactor);
+        threshold = (int)Math.min(initialCapacity * loadFactor, MAX_ARRAY_SIZE + 1);
     }
 
     /**
@@ -327,7 +373,7 @@
      */
     public synchronized boolean containsKey(Object key) {
         Entry<?,?> tab[] = table;
-        int hash = key.hashCode();
+        int hash = hash(key);
         int index = (hash & 0x7FFFFFFF) % tab.length;
         for (Entry<?,?> e = tab[index] ; e != null ; e = e.next) {
             if ((e.hash == hash) && e.key.equals(key)) {
@@ -355,7 +401,7 @@
     @SuppressWarnings("unchecked")
     public synchronized V get(Object key) {
         Entry<?,?> tab[] = table;
-        int hash = key.hashCode();
+        int hash = hash(key);
         int index = (hash & 0x7FFFFFFF) % tab.length;
         for (Entry<?,?> e = tab[index] ; e != null ; e = e.next) {
             if ((e.hash == hash) && e.key.equals(key)) {
@@ -396,7 +442,7 @@
         Entry<?,?>[] newMap = new Entry<?,?>[newCapacity];
 
         modCount++;
-        threshold = (int)(newCapacity * loadFactor);
+        threshold = (int)Math.min(newCapacity * loadFactor, MAX_ARRAY_SIZE + 1);
         table = newMap;
 
         for (int i = oldCapacity ; i-- > 0 ;) {
@@ -436,7 +482,7 @@
 
         // Makes sure the key is not already in the hashtable.
         Entry<?,?> tab[] = table;
-        int hash = key.hashCode();
+        int hash = hash(key);
         int index = (hash & 0x7FFFFFFF) % tab.length;
         @SuppressWarnings("unchecked")
         Entry<K,V> entry = (Entry<K,V>)tab[index];
@@ -454,6 +500,7 @@
             rehash();
 
             tab = table;
+            hash = hash(key);
             index = (hash & 0x7FFFFFFF) % tab.length;
         }
 
@@ -476,7 +523,7 @@
      */
     public synchronized V remove(Object key) {
         Entry<?,?> tab[] = table;
-        int hash = key.hashCode();
+        int hash = hash(key);
         int index = (hash & 0x7FFFFFFF) % tab.length;
         @SuppressWarnings("unchecked")
         Entry<K,V> e = (Entry<K,V>)tab[index];
@@ -685,7 +732,7 @@
             Map.Entry<?,?> entry = (Map.Entry<?,?>)o;
             Object key = entry.getKey();
             Entry<?,?>[] tab = table;
-            int hash = key.hashCode();
+            int hash = hash(key);
             int index = (hash & 0x7FFFFFFF) % tab.length;
 
             for (Entry<?,?> e = tab[index]; e != null; e = e.next)
@@ -700,7 +747,7 @@
             Map.Entry<?,?> entry = (Map.Entry<?,?>) o;
             Object key = entry.getKey();
             Entry<?,?>[] tab = table;
-            int hash = key.hashCode();
+            int hash = hash(key);
             int index = (hash & 0x7FFFFFFF) % tab.length;
 
             @SuppressWarnings("unchecked")
@@ -835,9 +882,13 @@
 
         loadFactor = -loadFactor;  // Mark hashCode computation in progress
         Entry<?,?>[] tab = table;
-        for (int i = 0; i < tab.length; i++)
-            for (Entry<?,?> e = tab[i]; e != null; e = e.next)
-                h += e.key.hashCode() ^ e.value.hashCode();
+        for (Entry<?,?> entry : tab) {
+            while (entry != null) {
+                h += entry.hashCode();
+                entry = entry.next;
+            }
+        }
+
         loadFactor = -loadFactor;  // Mark hashCode computation complete
 
         return h;
@@ -894,6 +945,10 @@
         // Read in the length, threshold, and loadfactor
         s.defaultReadObject();
 
+        // set hashMask
+        Holder.UNSAFE.putIntVolatile(this, Holder.HASHSEED_OFFSET,
+                sun.misc.Hashing.randomHashSeed(this));
+
         // Read the original length of the array and number of elements
         int origlength = s.readInt();
         int elements = s.readInt();
@@ -907,7 +962,8 @@
             length--;
         if (origlength > 0 && length > origlength)
             length = origlength;
-        Entry<?,?>[] table = new Entry<?,?>[length];
+        table = new Entry<?,?>[length];
+        threshold = (int)Math.min(length * loadFactor, MAX_ARRAY_SIZE + 1);
         count = 0;
 
         // Read the number of elements and then all the key/value objects
@@ -919,7 +975,6 @@
             // synch could be eliminated for performance
             reconstitutionPut(table, key, value);
         }
-        this.table = table;
     }
 
     /**
@@ -941,7 +996,7 @@
         }
         // Makes sure the key is not already in the hashtable.
         // This should not happen in deserialized version.
-        int hash = key.hashCode();
+        int hash = hash(key);
         int index = (hash & 0x7FFFFFFF) % tab.length;
         for (Entry<?,?> e = tab[index] ; e != null ; e = e.next) {
             if ((e.hash == hash) && e.key.equals(key)) {
@@ -956,17 +1011,17 @@
     }
 
     /**
-     * Hashtable collision list.
+     * Hashtable bucket collision list entry
      */
     private static class Entry<K,V> implements Map.Entry<K,V> {
-        int hash;
+        final int hash;
         K key;
         V value;
         Entry<K,V> next;
 
         protected Entry(int hash, K key, V value, Entry<K,V> next) {
             this.hash = hash;
-            this.key = key;
+            this.key =  key;
             this.value = value;
             this.next = next;
         }
--- a/jdk/src/share/classes/java/util/LinkedHashMap.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/util/LinkedHashMap.java	Fri Jun 08 12:44:30 2012 -0700
@@ -236,6 +236,7 @@
      * readObject) before any entries are inserted into the map.  Initializes
      * the chain.
      */
+    @Override
     void init() {
         header = new Entry<>(-1, null, null, null);
         header.before = header.after = header;
@@ -246,6 +247,7 @@
      * by superclass resize.  It is overridden for performance, as it is
      * faster to iterate using our linked list.
      */
+    @Override
     @SuppressWarnings("unchecked")
     void transfer(HashMap.Entry[] newTable) {
         int newCapacity = newTable.length;
@@ -421,15 +423,12 @@
      * removes the eldest entry if appropriate.
      */
     void addEntry(int hash, K key, V value, int bucketIndex) {
-        createEntry(hash, key, value, bucketIndex);
+        super.addEntry(hash, key, value, bucketIndex);
 
-        // Remove eldest entry if instructed, else grow capacity if appropriate
+        // Remove eldest entry if instructed
         Entry<K,V> eldest = header.after;
         if (removeEldestEntry(eldest)) {
             removeEntryForKey(eldest.key);
-        } else {
-            if (size >= threshold)
-                resize(2 * table.length);
         }
     }
 
--- a/jdk/src/share/classes/java/util/WeakHashMap.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/util/WeakHashMap.java	Fri Jun 08 12:44:30 2012 -0700
@@ -90,7 +90,8 @@
  * from being discarded.  Note that a value object may refer indirectly to its
  * key via the <tt>WeakHashMap</tt> itself; that is, a value object may
  * strongly refer to some other key object whose associated value object, in
- * turn, strongly refers to the key of the first value object.  One way
+ * turn, strongly refers to the key of the first value object.  If the values
+ * in the map do not rely on the map holding strong references to them, one way
  * to deal with this is to wrap values themselves within
  * <tt>WeakReferences</tt> before
  * inserting, as in: <tt>m.put(key, new WeakReference(value))</tt>,
@@ -184,6 +185,12 @@
      */
     int modCount;
 
+    /**
+     * A randomizing value associated with this instance that is applied to
+     * hash code of keys to make hash collisions harder to find.
+     */
+    transient final int hashSeed = sun.misc.Hashing.randomHashSeed(this);
+
     @SuppressWarnings("unchecked")
     private Entry<K,V>[] newTable(int n) {
         return (Entry<K,V>[]) new Entry<?,?>[n];
@@ -232,9 +239,7 @@
      * capacity (16) and load factor (0.75).
      */
     public WeakHashMap() {
-        this.loadFactor = DEFAULT_LOAD_FACTOR;
-        threshold = DEFAULT_INITIAL_CAPACITY;
-        table = newTable(DEFAULT_INITIAL_CAPACITY);
+        this(DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR);
     }
 
     /**
@@ -248,7 +253,8 @@
      * @since   1.3
      */
     public WeakHashMap(Map<? extends K, ? extends V> m) {
-        this(Math.max((int) (m.size() / DEFAULT_LOAD_FACTOR) + 1, 16),
+        this(Math.max((int) (m.size() / DEFAULT_LOAD_FACTOR) + 1,
+                DEFAULT_INITIAL_CAPACITY),
              DEFAULT_LOAD_FACTOR);
         putAll(m);
     }
@@ -283,6 +289,28 @@
     }
 
     /**
+     * Retrieve object hash code and applies a supplemental hash function to the
+     * result hash, which defends against poor quality hash functions.  This is
+     * critical because HashMap uses power-of-two length hash tables, that
+     * otherwise encounter collisions for hashCodes that do not differ
+     * in lower bits.
+     */
+    int hash(Object k) {
+        int h = hashSeed;
+        if (k instanceof String) {
+            return ((String) k).hash32();
+        } else {
+            h ^= k.hashCode();
+        }
+
+        // This function ensures that hashCodes that differ only by
+        // constant multiples at each bit position have a bounded
+        // number of collisions (approximately 8 at default load factor).
+        h ^= (h >>> 20) ^ (h >>> 12);
+        return h ^ (h >>> 7) ^ (h >>> 4);
+    }
+
+    /**
      * Returns index for hash code h.
      */
     private static int indexFor(int h, int length) {
@@ -371,7 +399,7 @@
      */
     public V get(Object key) {
         Object k = maskNull(key);
-        int h = HashMap.hash(k.hashCode());
+        int h = hash(k);
         Entry<K,V>[] tab = getTable();
         int index = indexFor(h, tab.length);
         Entry<K,V> e = tab[index];
@@ -401,7 +429,7 @@
      */
     Entry<K,V> getEntry(Object key) {
         Object k = maskNull(key);
-        int h = HashMap.hash(k.hashCode());
+        int h = hash(k);
         Entry<K,V>[] tab = getTable();
         int index = indexFor(h, tab.length);
         Entry<K,V> e = tab[index];
@@ -424,7 +452,7 @@
      */
     public V put(K key, V value) {
         Object k = maskNull(key);
-        int h = HashMap.hash(k.hashCode());
+        int h = hash(k);
         Entry<K,V>[] tab = getTable();
         int i = indexFor(h, tab.length);
 
@@ -566,7 +594,7 @@
      */
     public V remove(Object key) {
         Object k = maskNull(key);
-        int h = HashMap.hash(k.hashCode());
+        int h = hash(k);
         Entry<K,V>[] tab = getTable();
         int i = indexFor(h, tab.length);
         Entry<K,V> prev = tab[i];
@@ -597,7 +625,7 @@
         Entry<K,V>[] tab = getTable();
         Map.Entry<?,?> entry = (Map.Entry<?,?>)o;
         Object k = maskNull(entry.getKey());
-        int h = HashMap.hash(k.hashCode());
+        int h = hash(k);
         int i = indexFor(h, tab.length);
         Entry<K,V> prev = tab[i];
         Entry<K,V> e = prev;
--- a/jdk/src/share/classes/java/util/concurrent/ConcurrentHashMap.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/java/util/concurrent/ConcurrentHashMap.java	Fri Jun 08 12:44:30 2012 -0700
@@ -175,6 +175,12 @@
     /* ---------------- Fields -------------- */
 
     /**
+     * A randomizing value associated with this instance that is applied to
+     * hash code of keys to make hash collisions harder to find.
+     */
+   private transient final int hashSeed = sun.misc.Hashing.randomHashSeed(this);
+
+    /**
      * Mask value for indexing into segments. The upper bits of a
      * key's hash code are used to choose the segment.
      */
@@ -262,7 +268,15 @@
      * that otherwise encounter collisions for hashCodes that do not
      * differ in lower or upper bits.
      */
-    private static int hash(int h) {
+    private int hash(Object k) {
+       int h = hashSeed;
+
+        if (k instanceof String) {
+            return ((String) k).hash32();
+        }
+
+        h ^= k.hashCode();
+
         // Spread bits to regularize both segment and index locations,
         // using variant of single-word Wang/Jenkins hash.
         h += (h <<  15) ^ 0xffffcd7d;
@@ -917,7 +931,7 @@
     public V get(Object key) {
         Segment<K,V> s; // manually integrate access methods to reduce overhead
         HashEntry<K,V>[] tab;
-        int h = hash(key.hashCode());
+        int h = hash(key);
         long u = (((h >>> segmentShift) & segmentMask) << SSHIFT) + SBASE;
         if ((s = (Segment<K,V>)UNSAFE.getObjectVolatile(segments, u)) != null &&
             (tab = s.table) != null) {
@@ -945,7 +959,7 @@
     public boolean containsKey(Object key) {
         Segment<K,V> s; // same as get() except no need for volatile value read
         HashEntry<K,V>[] tab;
-        int h = hash(key.hashCode());
+        int h = hash(key);
         long u = (((h >>> segmentShift) & segmentMask) << SSHIFT) + SBASE;
         if ((s = (Segment<K,V>)UNSAFE.getObjectVolatile(segments, u)) != null &&
             (tab = s.table) != null) {
@@ -1054,7 +1068,7 @@
         Segment<K,V> s;
         if (value == null)
             throw new NullPointerException();
-        int hash = hash(key.hashCode());
+        int hash = hash(key);
         int j = (hash >>> segmentShift) & segmentMask;
         if ((s = (Segment<K,V>)UNSAFE.getObject          // nonvolatile; recheck
              (segments, (j << SSHIFT) + SBASE)) == null) //  in ensureSegment
@@ -1074,7 +1088,7 @@
         Segment<K,V> s;
         if (value == null)
             throw new NullPointerException();
-        int hash = hash(key.hashCode());
+        int hash = hash(key);
         int j = (hash >>> segmentShift) & segmentMask;
         if ((s = (Segment<K,V>)UNSAFE.getObject
              (segments, (j << SSHIFT) + SBASE)) == null)
@@ -1104,7 +1118,7 @@
      * @throws NullPointerException if the specified key is null
      */
     public V remove(Object key) {
-        int hash = hash(key.hashCode());
+        int hash = hash(key);
         Segment<K,V> s = segmentForHash(hash);
         return s == null ? null : s.remove(key, hash, null);
     }
@@ -1115,7 +1129,7 @@
      * @throws NullPointerException if the specified key is null
      */
     public boolean remove(Object key, Object value) {
-        int hash = hash(key.hashCode());
+        int hash = hash(key);
         Segment<K,V> s;
         return value != null && (s = segmentForHash(hash)) != null &&
             s.remove(key, hash, value) != null;
@@ -1127,7 +1141,7 @@
      * @throws NullPointerException if any of the arguments are null
      */
     public boolean replace(K key, V oldValue, V newValue) {
-        int hash = hash(key.hashCode());
+        int hash = hash(key);
         if (oldValue == null || newValue == null)
             throw new NullPointerException();
         Segment<K,V> s = segmentForHash(hash);
@@ -1142,7 +1156,7 @@
      * @throws NullPointerException if the specified key or value is null
      */
     public V replace(K key, V value) {
-        int hash = hash(key.hashCode());
+        int hash = hash(key);
         if (value == null)
             throw new NullPointerException();
         Segment<K,V> s = segmentForHash(hash);
@@ -1473,6 +1487,10 @@
             throws java.io.IOException, ClassNotFoundException {
         s.defaultReadObject();
 
+        // set hashMask
+        UNSAFE.putIntVolatile(this, HASHSEED_OFFSET,
+                 sun.misc.Hashing.randomHashSeed(this));
+
         // Re-initialize segments to be minimally sized, and let grow.
         int cap = MIN_SEGMENT_TABLE_CAPACITY;
         final Segment<K,V>[] segments = this.segments;
@@ -1500,6 +1518,7 @@
     private static final int SSHIFT;
     private static final long TBASE;
     private static final int TSHIFT;
+    private static final long HASHSEED_OFFSET;
 
     static {
         int ss, ts;
@@ -1511,6 +1530,8 @@
             SBASE = UNSAFE.arrayBaseOffset(sc);
             ts = UNSAFE.arrayIndexScale(tc);
             ss = UNSAFE.arrayIndexScale(sc);
+            HASHSEED_OFFSET = UNSAFE.objectFieldOffset(
+                ConcurrentHashMap.class.getDeclaredField("hashSeed"));
         } catch (Exception e) {
             throw new Error(e);
         }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/misc/Hashing.java	Fri Jun 08 12:44:30 2012 -0700
@@ -0,0 +1,251 @@
+/*
+ * Copyright (c) 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.misc;
+
+import java.util.Random;
+
+/**
+ * Hashing utilities.
+ *
+ * Little endian implementations of Murmur3 hashing.
+ */
+public class Hashing {
+
+    /**
+     * Static utility methods only.
+     */
+    private Hashing() {
+        throw new Error("No instances");
+    }
+
+    public static int murmur3_32(byte[] data) {
+        return murmur3_32(0, data, 0, data.length);
+    }
+
+    public static int murmur3_32(int seed, byte[] data) {
+        return murmur3_32(seed, data, 0, data.length);
+    }
+
+    @SuppressWarnings("fallthrough")
+    public static int murmur3_32(int seed, byte[] data, int offset, int len) {
+        int h1 = seed;
+        int count = len;
+
+        // body
+        while (count >= 4) {
+            int k1 = (data[offset] & 0x0FF)
+                    | (data[offset + 1] & 0x0FF) << 8
+                    | (data[offset + 2] & 0x0FF) << 16
+                    | data[offset + 3] << 24;
+
+            count -= 4;
+            offset += 4;
+
+            k1 *= 0xcc9e2d51;
+            k1 = Integer.rotateLeft(k1, 15);
+            k1 *= 0x1b873593;
+
+            h1 ^= k1;
+            h1 = Integer.rotateLeft(h1, 13);
+            h1 = h1 * 5 + 0xe6546b64;
+        }
+
+        // tail
+
+        if (count > 0) {
+            int k1 = 0;
+
+            switch (count) {
+                case 3:
+                    k1 ^= (data[offset + 2] & 0xff) << 16;
+                // fall through
+                case 2:
+                    k1 ^= (data[offset + 1] & 0xff) << 8;
+                // fall through
+                case 1:
+                    k1 ^= (data[offset] & 0xff);
+                // fall through
+                default:
+                    k1 *= 0xcc9e2d51;
+                    k1 = Integer.rotateLeft(k1, 15);
+                    k1 *= 0x1b873593;
+                    h1 ^= k1;
+            }
+        }
+
+        // finalization
+
+        h1 ^= len;
+
+        // finalization mix force all bits of a hash block to avalanche
+        h1 ^= h1 >>> 16;
+        h1 *= 0x85ebca6b;
+        h1 ^= h1 >>> 13;
+        h1 *= 0xc2b2ae35;
+        h1 ^= h1 >>> 16;
+
+        return h1;
+    }
+
+    public static int murmur3_32(char[] data) {
+        return murmur3_32(0, data, 0, data.length);
+    }
+
+    public static int murmur3_32(int seed, char[] data) {
+        return murmur3_32(seed, data, 0, data.length);
+    }
+
+    public static int murmur3_32(int seed, char[] data, int offset, int len) {
+        int h1 = seed;
+
+        int off = offset;
+        int count = len;
+
+        // body
+        while (count >= 2) {
+            int k1 = (data[off++] & 0xFFFF) | (data[off++] << 16);
+
+            count -= 2;
+
+            k1 *= 0xcc9e2d51;
+            k1 = Integer.rotateLeft(k1, 15);
+            k1 *= 0x1b873593;
+
+            h1 ^= k1;
+            h1 = Integer.rotateLeft(h1, 13);
+            h1 = h1 * 5 + 0xe6546b64;
+        }
+
+        // tail
+
+        if (count > 0) {
+            int k1 = data[off];
+
+            k1 *= 0xcc9e2d51;
+            k1 = Integer.rotateLeft(k1, 15);
+            k1 *= 0x1b873593;
+            h1 ^= k1;
+        }
+
+        // finalization
+
+        h1 ^= len * (Character.SIZE / Byte.SIZE);
+
+        // finalization mix force all bits of a hash block to avalanche
+        h1 ^= h1 >>> 16;
+        h1 *= 0x85ebca6b;
+        h1 ^= h1 >>> 13;
+        h1 *= 0xc2b2ae35;
+        h1 ^= h1 >>> 16;
+
+        return h1;
+    }
+
+    public static int murmur3_32(int[] data) {
+        return murmur3_32(0, data, 0, data.length);
+    }
+
+    public static int murmur3_32(int seed, int[] data) {
+        return murmur3_32(seed, data, 0, data.length);
+    }
+
+    public static int murmur3_32(int seed, int[] data, int offset, int len) {
+        int h1 = seed;
+
+        int off = offset;
+        int end = offset + len;
+
+        // body
+        while (off < end) {
+            int k1 = data[off++];
+
+            k1 *= 0xcc9e2d51;
+            k1 = Integer.rotateLeft(k1, 15);
+            k1 *= 0x1b873593;
+
+            h1 ^= k1;
+            h1 = Integer.rotateLeft(h1, 13);
+            h1 = h1 * 5 + 0xe6546b64;
+        }
+
+        // tail (always empty, as body is always 32-bit chunks)
+
+        // finalization
+
+        h1 ^= len * (Integer.SIZE / Byte.SIZE);
+
+        // finalization mix force all bits of a hash block to avalanche
+        h1 ^= h1 >>> 16;
+        h1 *= 0x85ebca6b;
+        h1 ^= h1 >>> 13;
+        h1 *= 0xc2b2ae35;
+        h1 ^= h1 >>> 16;
+
+        return h1;
+    }
+
+    /**
+     * Holds references to things that can't be initialized until after VM
+     * is fully booted.
+     */
+    private static class Holder {
+
+        /**
+         * Used for generating per-instance hash seeds.
+         *
+         * We try to improve upon the default seeding.
+         */
+        static final Random SEED_MAKER = new Random(
+                Double.doubleToRawLongBits(Math.random())
+                ^ System.identityHashCode(Hashing.class)
+                ^ System.currentTimeMillis()
+                ^ System.nanoTime()
+                ^ Runtime.getRuntime().freeMemory());
+    }
+
+    public static int randomHashSeed(Object instance) {
+        int seed;
+        if (sun.misc.VM.isBooted()) {
+            seed = Holder.SEED_MAKER.nextInt();
+        } else {
+            // lower quality "random" seed value--still better than zero and not
+            // not practically reversible.
+            int hashing_seed[] = {
+                System.identityHashCode(Hashing.class),
+                System.identityHashCode(instance),
+                System.identityHashCode(Thread.currentThread()),
+                (int) Thread.currentThread().getId(),
+                (int) (System.currentTimeMillis() >>> 2), // resolution is poor
+                (int) (System.nanoTime() >>> 5), // resolution is poor
+                (int) (Runtime.getRuntime().freeMemory() >>> 4) // alloc min
+            };
+
+            seed = murmur3_32(hashing_seed);
+        }
+
+        // force to non-zero.
+        return (0 != seed) ? seed : 1;
+    }
+}
--- a/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java	Fri Jun 08 12:44:30 2012 -0700
@@ -663,7 +663,12 @@
                         throw new AlreadyBoundException();
                     InetSocketAddress isa;
                     if (local == null) {
-                        isa = new InetSocketAddress(0);
+                        // only Inet4Address allowed with IPv4 socket
+                        if (family == StandardProtocolFamily.INET) {
+                            isa = new InetSocketAddress(InetAddress.getByName("0.0.0.0"), 0);
+                        } else {
+                            isa = new InetSocketAddress(0);
+                        }
                     } else {
                         isa = Net.checkAddress(local);
 
--- a/jdk/src/share/classes/sun/nio/ch/DevPollSelectorProvider.java	Fri Jun 08 12:00:22 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package sun.nio.ch;
-
-import java.io.IOException;
-import java.nio.channels.*;
-import java.nio.channels.spi.*;
-
-public class DevPollSelectorProvider
-    extends SelectorProviderImpl
-{
-    public AbstractSelector openSelector() throws IOException {
-        return new DevPollSelectorImpl(this);
-    }
-
-    public Channel inheritedChannel() throws IOException {
-        return InheritedChannel.getChannel();
-    }
-}
--- a/jdk/src/share/classes/sun/nio/ch/IOUtil.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/sun/nio/ch/IOUtil.java	Fri Jun 08 12:44:30 2012 -0700
@@ -334,6 +334,8 @@
 
     static native void setfdVal(FileDescriptor fd, int value);
 
+    static native int fdLimit();
+
     static native void initIDs();
 
     static {
--- a/jdk/src/share/classes/sun/security/krb5/KdcComm.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/sun/security/krb5/KdcComm.java	Fri Jun 08 12:44:30 2012 -0700
@@ -365,37 +365,36 @@
 
             for (int i=1; i <= retries; i++) {
                 String proto = useTCP?"TCP":"UDP";
-                NetClient kdcClient = NetClient.getInstance(
-                        proto, kdc, port, timeout);
-                if (DEBUG) {
-                    System.out.println(">>> KDCCommunication: kdc=" + kdc
-                           + " " + proto + ":"
-                           +  port +  ", timeout="
-                           + timeout
-                           + ",Attempt =" + i
-                           + ", #bytes=" + obuf.length);
-                }
-                try {
-                    /*
-                     * Send the data to the kdc.
-                     */
-                    kdcClient.send(obuf);
-                    /*
-                     * And get a response.
-                     */
-                    ibuf = kdcClient.receive();
-                    break;
-                } catch (SocketTimeoutException se) {
+                try (NetClient kdcClient = NetClient.getInstance(
+                        proto, kdc, port, timeout)) {
                     if (DEBUG) {
-                        System.out.println ("SocketTimeOutException with " +
-                                            "attempt: " + i);
+                        System.out.println(">>> KDCCommunication: kdc=" + kdc
+                            + " " + proto + ":"
+                            +  port +  ", timeout="
+                            + timeout
+                            + ",Attempt =" + i
+                            + ", #bytes=" + obuf.length);
                     }
-                    if (i == retries) {
-                        ibuf = null;
-                        throw se;
+                    try {
+                        /*
+                        * Send the data to the kdc.
+                        */
+                        kdcClient.send(obuf);
+                        /*
+                        * And get a response.
+                        */
+                        ibuf = kdcClient.receive();
+                        break;
+                    } catch (SocketTimeoutException se) {
+                        if (DEBUG) {
+                            System.out.println ("SocketTimeOutException with " +
+                                                "attempt: " + i);
+                        }
+                        if (i == retries) {
+                            ibuf = null;
+                            throw se;
+                        }
                     }
-                } finally {
-                    kdcClient.close();
                 }
             }
             return ibuf;
--- a/jdk/src/share/classes/sun/security/krb5/internal/NetClient.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/sun/security/krb5/internal/NetClient.java	Fri Jun 08 12:44:30 2012 -0700
@@ -34,7 +34,7 @@
 import java.io.*;
 import java.net.*;
 
-public abstract class NetClient {
+public abstract class NetClient implements AutoCloseable {
     public static NetClient getInstance(String protocol, String hostname, int port,
             int timeout) throws IOException {
         if (protocol.equals("TCP")) {
@@ -45,9 +45,7 @@
     }
 
     abstract public void send(byte[] data) throws IOException;
-
     abstract public byte[] receive() throws IOException;
-
     abstract public void close() throws IOException;
 }
 
@@ -190,6 +188,7 @@
         iport = port;
         dgSocket = new DatagramSocket();
         dgSocket.setSoTimeout(timeout);
+        dgSocket.connect(iaddr, iport);
     }
 
     @Override
@@ -207,6 +206,9 @@
             dgSocket.receive(dgPacketIn);
         }
         catch (SocketException e) {
+            if (e instanceof PortUnreachableException) {
+                throw e;
+            }
             dgSocket.receive(dgPacketIn);
         }
         byte[] data = new byte[dgPacketIn.getLength()];
--- a/jdk/src/share/classes/sun/security/provider/certpath/AdjacencyList.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/sun/security/provider/certpath/AdjacencyList.java	Fri Jun 08 12:44:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -24,13 +24,11 @@
  */
 package sun.security.provider.certpath;
 
-
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 
-
 /**
  * An AdjacencyList is used to store the history of certification paths
  * attempted in constructing a path from an initiator to a target. The
@@ -123,124 +121,117 @@
      * at the start.
      */
     private boolean buildList(List<List<Vertex>> theList, int index,
-        BuildStep follow) {
+                              BuildStep follow) {
 
         // Each time this method is called, we're examining a new list
         // from the global list. So, we have to start by getting the list
         // that contains the set of Vertexes we're considering.
         List<Vertex> l = theList.get(index);
 
-        try {
-            // we're interested in the case where all indexes are -1...
-            boolean allNegOne = true;
-            // ...and in the case where every entry has a Throwable
-            boolean allXcps = true;
+        // we're interested in the case where all indexes are -1...
+        boolean allNegOne = true;
+        // ...and in the case where every entry has a Throwable
+        boolean allXcps = true;
+
+        for (Vertex v : l) {
+            if (v.getIndex() != -1) {
+                // count an empty list the same as an index of -1...this
+                // is to patch a bug somewhere in the builder
+                if (theList.get(v.getIndex()).size() != 0)
+                    allNegOne = false;
+            } else {
+                if (v.getThrowable() == null)
+                    allXcps = false;
+            }
+            // every entry, regardless of the final use for it, is always
+            // entered as a possible step before we take any actions
+            mStepList.add(new BuildStep(v, BuildStep.POSSIBLE));
+        }
+
+        if (allNegOne) {
+            // There are two cases that we could be looking at here. We
+            // may need to back up, or the build may have succeeded at
+            // this point. This is based on whether or not any
+            // exceptions were found in the list.
+            if (allXcps) {
+                // we need to go back...see if this is the last one
+                if (follow == null)
+                    mStepList.add(new BuildStep(null, BuildStep.FAIL));
+                else
+                    mStepList.add(new BuildStep(follow.getVertex(),
+                                                BuildStep.BACK));
+
+                return false;
+            } else {
+                // we succeeded...now the only question is which is the
+                // successful step? If there's only one entry without
+                // a throwable, then that's the successful step. Otherwise,
+                // we'll have to make some guesses...
+                List<Vertex> possibles = new ArrayList<>();
+                for (Vertex v : l) {
+                    if (v.getThrowable() == null)
+                        possibles.add(v);
+                }
+
+                if (possibles.size() == 1) {
+                    // real easy...we've found the final Vertex
+                    mStepList.add(new BuildStep(possibles.get(0),
+                                                BuildStep.SUCCEED));
+                } else {
+                    // ok...at this point, there is more than one Cert
+                    // which might be the succeed step...how do we know
+                    // which it is? I'm going to assume that our builder
+                    // algorithm is good enough to know which is the
+                    // correct one, and put it first...but a FIXME goes
+                    // here anyway, and we should be comparing to the
+                    // target/initiator Cert...
+                    mStepList.add(new BuildStep(possibles.get(0),
+                                                BuildStep.SUCCEED));
+                }
+
+                return true;
+            }
+        } else {
+            // There's at least one thing that we can try before we give
+            // up and go back. Run through the list now, and enter a new
+            // BuildStep for each path that we try to follow. If none of
+            // the paths we try produce a successful end, we're going to
+            // have to back out ourselves.
+            boolean success = false;
 
             for (Vertex v : l) {
+
+                // Note that we'll only find a SUCCEED case when we're
+                // looking at the last possible path, so we don't need to
+                // consider success in the while loop
+
                 if (v.getIndex() != -1) {
-                    // count an empty list the same as an index of -1...this
-                    // is to patch a bug somewhere in the builder
-                    if (theList.get(v.getIndex()).size() != 0)
-                        allNegOne = false;
+                    if (theList.get(v.getIndex()).size() != 0) {
+                        // If the entry we're looking at doesn't have an
+                        // index of -1, and doesn't lead to an empty list,
+                        // then it's something we follow!
+                        BuildStep bs = new BuildStep(v, BuildStep.FOLLOW);
+                        mStepList.add(bs);
+                        success = buildList(theList, v.getIndex(), bs);
+                    }
                 }
-                else
-                    if (v.getThrowable() == null)
-                        allXcps = false;
-
-                // every entry, regardless of the final use for it, is always
-                // entered as a possible step before we take any actions
-                mStepList.add(new BuildStep(v, BuildStep.POSSIBLE));
             }
 
-            if (allNegOne) {
-                // There are two cases that we could be looking at here. We
-                // may need to back up, or the build may have succeeded at
-                // this point. This is based on whether or not any
-                // exceptions were found in the list.
-                if (allXcps) {
-                    // we need to go back...see if this is the last one
-                    if (follow == null)
-                        mStepList.add(new BuildStep(null, BuildStep.FAIL));
-                    else
-                        mStepList.add(new BuildStep(follow.getVertex(),
-                                                    BuildStep.BACK));
+            if (success) {
+                // We're already finished!
+                return true;
+            } else {
+                // We failed, and we've exhausted all the paths that we
+                // could take. The only choice is to back ourselves out.
+                if (follow == null)
+                    mStepList.add(new BuildStep(null, BuildStep.FAIL));
+                else
+                    mStepList.add(new BuildStep(follow.getVertex(),
+                                                BuildStep.BACK));
 
-                    return false;
-                } else {
-                    // we succeeded...now the only question is which is the
-                    // successful step? If there's only one entry without
-                    // a throwable, then that's the successful step. Otherwise,
-                    // we'll have to make some guesses...
-                    List<Vertex> possibles = new ArrayList<Vertex>();
-                    for (Vertex v : l) {
-                        if (v.getThrowable() == null)
-                            possibles.add(v);
-                    }
-
-                    if (possibles.size() == 1) {
-                        // real easy...we've found the final Vertex
-                        mStepList.add(new BuildStep(possibles.get(0),
-                                                    BuildStep.SUCCEED));
-                    } else {
-                        // ok...at this point, there is more than one Cert
-                        // which might be the succeed step...how do we know
-                        // which it is? I'm going to assume that our builder
-                        // algorithm is good enough to know which is the
-                        // correct one, and put it first...but a FIXME goes
-                        // here anyway, and we should be comparing to the
-                        // target/initiator Cert...
-                        mStepList.add(new BuildStep(possibles.get(0),
-                                                    BuildStep.SUCCEED));
-                    }
-
-                    return true;
-                }
-            } else {
-                // There's at least one thing that we can try before we give
-                // up and go back. Run through the list now, and enter a new
-                // BuildStep for each path that we try to follow. If none of
-                // the paths we try produce a successful end, we're going to
-                // have to back out ourselves.
-                boolean success = false;
-
-                for (Vertex v : l) {
-
-                    // Note that we'll only find a SUCCEED case when we're
-                    // looking at the last possible path, so we don't need to
-                    // consider success in the while loop
-
-                    if (v.getIndex() != -1) {
-                        if (theList.get(v.getIndex()).size() != 0) {
-                            // If the entry we're looking at doesn't have an
-                            // index of -1, and doesn't lead to an empty list,
-                            // then it's something we follow!
-                            BuildStep bs = new BuildStep(v, BuildStep.FOLLOW);
-                            mStepList.add(bs);
-                            success = buildList(theList, v.getIndex(), bs);
-                        }
-                    }
-                }
-
-                if (success) {
-                    // We're already finished!
-                    return true;
-                } else {
-                    // We failed, and we've exhausted all the paths that we
-                    // could take. The only choice is to back ourselves out.
-                    if (follow == null)
-                        mStepList.add(new BuildStep(null, BuildStep.FAIL));
-                    else
-                        mStepList.add(new BuildStep(follow.getVertex(),
-                                                    BuildStep.BACK));
-
-                    return false;
-                }
+                return false;
             }
         }
-        catch (Exception e) {}
-
-        // we'll never get here, but you know java...
-        return false;
     }
 
     /**
@@ -248,23 +239,20 @@
      *
      * @return String representation
      */
+    @Override
     public String toString() {
-        String out = "[\n";
+        StringBuilder sb = new StringBuilder("[\n");
 
         int i = 0;
         for (List<Vertex> l : mOrigList) {
-            out = out + "LinkedList[" + i++ + "]:\n";
+            sb.append("LinkedList[").append(i++).append("]:\n");
 
             for (Vertex step : l) {
-                try {
-                    out = out + step.toString();
-                    out = out + "\n";
-                }
-                catch (Exception e) { out = out + "No Such Element\n"; }
+                sb.append(step.toString()).append("\n");
             }
         }
-        out = out + "]\n";
+        sb.append("]\n");
 
-        return out;
+        return sb.toString();
     }
 }
--- a/jdk/src/share/classes/sun/security/provider/certpath/BasicChecker.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/sun/security/provider/certpath/BasicChecker.java	Fri Jun 08 12:44:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -62,7 +62,7 @@
     private static final Debug debug = Debug.getInstance("certpath");
     private final PublicKey trustedPubKey;
     private final X500Principal caName;
-    private final Date testDate;
+    private final Date date;
     private final String sigProvider;
     private final boolean sigOnly;
     private X500Principal prevSubject;
@@ -73,14 +73,13 @@
      *
      * @param anchor the anchor selected to validate the target certificate
      * @param testDate the time for which the validity of the certificate
-     * should be determined
+     *        should be determined
      * @param sigProvider the name of the signature provider
      * @param sigOnly true if only signature checking is to be done;
      *        if false, all checks are done
      */
-    BasicChecker(TrustAnchor anchor, Date testDate, String sigProvider,
-        boolean sigOnly) throws CertPathValidatorException
-    {
+    BasicChecker(TrustAnchor anchor, Date date, String sigProvider,
+                 boolean sigOnly) {
         if (anchor.getTrustedCert() != null) {
             this.trustedPubKey = anchor.getTrustedCert().getPublicKey();
             this.caName = anchor.getTrustedCert().getSubjectX500Principal();
@@ -88,16 +87,16 @@
             this.trustedPubKey = anchor.getCAPublicKey();
             this.caName = anchor.getCA();
         }
-        this.testDate = testDate;
+        this.date = date;
         this.sigProvider = sigProvider;
         this.sigOnly = sigOnly;
-        init(false);
     }
 
     /**
      * Initializes the internal state of the checker from parameters
      * specified in the constructor.
      */
+    @Override
     public void init(boolean forward) throws CertPathValidatorException {
         if (!forward) {
             prevPubKey = trustedPubKey;
@@ -108,10 +107,12 @@
         }
     }
 
+    @Override
     public boolean isForwardCheckingSupported() {
         return false;
     }
 
+    @Override
     public Set<String> getSupportedExtensions() {
         return null;
     }
@@ -124,33 +125,31 @@
      * @param cert the Certificate
      * @param unresolvedCritExts a Collection of the unresolved critical
      * extensions
-     * @exception CertPathValidatorException Exception thrown if certificate
-     * does not verify.
+     * @throws CertPathValidatorException if certificate does not verify
      */
+    @Override
     public void check(Certificate cert, Collection<String> unresolvedCritExts)
         throws CertPathValidatorException
     {
-        X509Certificate currCert = (X509Certificate) cert;
+        X509Certificate currCert = (X509Certificate)cert;
 
         if (!sigOnly) {
-            verifyTimestamp(currCert, testDate);
-            verifyNameChaining(currCert, prevSubject);
+            verifyTimestamp(currCert);
+            verifyNameChaining(currCert);
         }
-        verifySignature(currCert, prevPubKey, sigProvider);
+        verifySignature(currCert);
 
         updateState(currCert);
     }
 
     /**
-     * Verifies the signature on the certificate using the previous public key
-     * @param cert the Certificate
-     * @param prevPubKey the previous PublicKey
-     * @param sigProvider a String containing the signature provider
-     * @exception CertPathValidatorException Exception thrown if certificate
-     * does not verify.
+     * Verifies the signature on the certificate using the previous public key.
+     *
+     * @param cert the X509Certificate
+     * @throws CertPathValidatorException if certificate does not verify
      */
-    private void verifySignature(X509Certificate cert, PublicKey prevPubKey,
-        String sigProvider) throws CertPathValidatorException
+    private void verifySignature(X509Certificate cert)
+        throws CertPathValidatorException
     {
         String msg = "signature";
         if (debug != null)
@@ -162,7 +161,7 @@
             throw new CertPathValidatorException
                 (msg + " check failed", e, null, -1,
                  BasicReason.INVALID_SIGNATURE);
-        } catch (Exception e) {
+        } catch (GeneralSecurityException e) {
             throw new CertPathValidatorException(msg + " check failed", e);
         }
 
@@ -173,7 +172,7 @@
     /**
      * Internal method to verify the timestamp on a certificate
      */
-    private void verifyTimestamp(X509Certificate cert, Date date)
+    private void verifyTimestamp(X509Certificate cert)
         throws CertPathValidatorException
     {
         String msg = "timestamp";
@@ -197,8 +196,8 @@
     /**
      * Internal method to check that cert has a valid DN to be next in a chain
      */
-    private void verifyNameChaining(X509Certificate cert,
-        X500Principal prevSubject) throws CertPathValidatorException
+    private void verifyNameChaining(X509Certificate cert)
+        throws CertPathValidatorException
     {
         if (prevSubject != null) {
 
@@ -207,8 +206,8 @@
                 debug.println("---checking " + msg + "...");
 
             X500Principal currIssuer = cert.getIssuerX500Principal();
+
             // reject null or empty issuer DNs
-
             if (X500Name.asX500Name(currIssuer).isEmpty()) {
                 throw new CertPathValidatorException
                     (msg + " check failed: " +
--- a/jdk/src/share/classes/sun/security/provider/certpath/BuildStep.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/sun/security/provider/certpath/BuildStep.java	Fri Jun 08 12:44:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -25,7 +25,6 @@
 
 package sun.security.provider.certpath;
 
-import sun.security.util.Debug;
 import java.security.cert.X509Certificate;
 
 /**
@@ -39,7 +38,6 @@
  */
 public class BuildStep {
 
-    private static final Debug debug = Debug.getInstance("certpath");
     private Vertex          vertex;
     private X509Certificate cert;
     private Throwable       throwable;
@@ -86,7 +84,7 @@
     public BuildStep(Vertex vtx, int res) {
         vertex = vtx;
         if (vertex != null) {
-            cert = (X509Certificate)vertex.getCertificate();
+            cert = vertex.getCertificate();
             throwable = vertex.getThrowable();
         }
         result = res;
@@ -117,7 +115,7 @@
      * @returns String form of issuer name or null, if no certificate.
      */
     public String getIssuerName() {
-        return (cert == null ? null : cert.getIssuerX500Principal().toString());
+        return getIssuerName(null);
     }
 
     /**
@@ -142,7 +140,7 @@
      * @returns String form of subject name or null, if no certificate.
      */
     public String getSubjectName() {
-        return (cert == null ? null : cert.getSubjectX500Principal().toString());
+        return getSubjectName(null);
     }
 
     /**
@@ -191,21 +189,21 @@
     public String resultToString(int res) {
         String resultString = "";
         switch (res) {
-            case BuildStep.POSSIBLE:
+            case POSSIBLE:
                 resultString = "Certificate to be tried.\n";
                 break;
-            case BuildStep.BACK:
+            case BACK:
                 resultString = "Certificate backed out since path does not "
                     + "satisfy build requirements.\n";
                 break;
-            case BuildStep.FOLLOW:
+            case FOLLOW:
                 resultString = "Certificate satisfies conditions.\n";
                 break;
-            case BuildStep.FAIL:
+            case FAIL:
                 resultString = "Certificate backed out since path does not "
                     + "satisfy conditions.\n";
                 break;
-            case BuildStep.SUCCEED:
+            case SUCCEED:
                 resultString = "Certificate satisfies conditions.\n";
                 break;
             default:
@@ -220,6 +218,7 @@
      *
      * @returns String
      */
+    @Override
     public String toString() {
         String out = "Internal Error\n";
         switch (result) {
@@ -273,8 +272,6 @@
      * @returns String
      */
     public String fullToString() {
-        String out = resultToString(getResult());
-        out = out + vertex.toString();
-        return out;
+        return resultToString(getResult()) + vertex.toString();
     }
 }
--- a/jdk/src/share/classes/sun/security/provider/certpath/Builder.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/sun/security/provider/certpath/Builder.java	Fri Jun 08 12:44:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -31,9 +31,8 @@
 import java.security.cert.*;
 import java.util.*;
 
-import javax.security.auth.x500.X500Principal;
-
 import sun.security.action.GetBooleanAction;
+import sun.security.provider.certpath.PKIX.BuilderParams;
 import sun.security.util.Debug;
 import sun.security.x509.GeneralNames;
 import sun.security.x509.GeneralNameInterface;
@@ -56,9 +55,7 @@
 
     private static final Debug debug = Debug.getInstance("certpath");
     private Set<String> matchingPolicies;
-    final PKIXBuilderParameters buildParams;
-    final X500Principal targetSubjectDN;
-    final Date date;
+    final BuilderParams buildParams;
     final X509CertSelector targetCertConstraints;
 
     /**
@@ -74,14 +71,10 @@
      *
      * @param params the parameter set used to build a certification path
      */
-    Builder(PKIXBuilderParameters buildParams, X500Principal targetSubjectDN) {
+    Builder(BuilderParams buildParams) {
         this.buildParams = buildParams;
-        this.targetSubjectDN = targetSubjectDN;
-        // Initialize date if not specified
-        Date paramsDate = buildParams.getDate();
-        this.date = paramsDate != null ? paramsDate : new Date();
         this.targetCertConstraints =
-            (X509CertSelector) buildParams.getTargetCertConstraints();
+            (X509CertSelector)buildParams.targetCertConstraints();
     }
 
     /**
@@ -104,7 +97,8 @@
      * @param certPathList the certPathList generated thus far
      */
     abstract void verifyCert(X509Certificate cert, State currentState,
-        List<X509Certificate> certPathList) throws GeneralSecurityException;
+                             List<X509Certificate> certPathList)
+        throws GeneralSecurityException;
 
     /**
      * Verifies whether the input certificate completes the path.
@@ -123,7 +117,7 @@
      * @param certPathList the certification path list
      */
     abstract void addCertToPath(X509Certificate cert,
-        LinkedList<X509Certificate> certPathList);
+                                LinkedList<X509Certificate> certPathList);
 
     /**
      * Removes final certificate from the certPathList
@@ -147,7 +141,8 @@
      *         is a grandparent, etc.
      */
     static int distance(GeneralNameInterface base,
-        GeneralNameInterface test, int incomparable) {
+                        GeneralNameInterface test, int incomparable)
+    {
         switch (base.constrains(test)) {
         case GeneralNameInterface.NAME_DIFF_TYPE:
             if (debug != null) {
@@ -192,7 +187,8 @@
      *         some number of down hops.
      */
     static int hops(GeneralNameInterface base, GeneralNameInterface test,
-        int incomparable) {
+                    int incomparable)
+    {
         int baseRtest = base.constrains(test);
         switch (baseRtest) {
         case GeneralNameInterface.NAME_DIFF_TYPE:
@@ -282,9 +278,9 @@
      * @throws IOException if certificate does not get closer
      */
     static int targetDistance(NameConstraintsExtension constraints,
-            X509Certificate cert, GeneralNameInterface target)
-            throws IOException {
-
+                              X509Certificate cert, GeneralNameInterface target)
+            throws IOException
+    {
         /* ensure that certificate satisfies existing name constraints */
         if (constraints != null && !constraints.verify(cert)) {
             throw new IOException("certificate does not satisfy existing name "
@@ -295,7 +291,7 @@
         try {
             certImpl = X509CertImpl.toImpl(cert);
         } catch (CertificateException e) {
-            throw (IOException)new IOException("Invalid certificate").initCause(e);
+            throw new IOException("Invalid certificate", e);
         }
         /* see if certificate subject matches target */
         X500Name subject = X500Name.asX500Name(certImpl.getSubjectX500Principal());
@@ -398,13 +394,13 @@
      */
     Set<String> getMatchingPolicies() {
         if (matchingPolicies != null) {
-            Set<String> initialPolicies = buildParams.getInitialPolicies();
+            Set<String> initialPolicies = buildParams.initialPolicies();
             if ((!initialPolicies.isEmpty()) &&
                 (!initialPolicies.contains(PolicyChecker.ANY_POLICY)) &&
-                (buildParams.isPolicyMappingInhibited()))
+                (buildParams.policyMappingInhibited()))
             {
-                initialPolicies.add(PolicyChecker.ANY_POLICY);
-                matchingPolicies = initialPolicies;
+                matchingPolicies = new HashSet<>(initialPolicies);
+                matchingPolicies.add(PolicyChecker.ANY_POLICY);
             } else {
                 // we just return an empty set to make sure that there is
                 // at least a certificate policies extension in the cert
@@ -429,13 +425,15 @@
      * Returns true iff resultCerts changed (a cert was added to the collection)
      */
     boolean addMatchingCerts(X509CertSelector selector,
-            Collection<CertStore> certStores,
-            Collection<X509Certificate> resultCerts, boolean checkAll) {
+                             Collection<CertStore> certStores,
+                             Collection<X509Certificate> resultCerts,
+                             boolean checkAll)
+    {
         X509Certificate targetCert = selector.getCertificate();
         if (targetCert != null) {
             // no need to search CertStores
             if (selector.match(targetCert) && !X509CertImpl.isSelfSigned
-                (targetCert, buildParams.getSigProvider())) {
+                (targetCert, buildParams.sigProvider())) {
                 if (debug != null) {
                     debug.println("Builder.addMatchingCerts: adding target cert");
                 }
@@ -450,7 +448,7 @@
                                         store.getCertificates(selector);
                 for (Certificate cert : certs) {
                     if (!X509CertImpl.isSelfSigned
-                        ((X509Certificate)cert, buildParams.getSigProvider())) {
+                        ((X509Certificate)cert, buildParams.sigProvider())) {
                         if (resultCerts.add((X509Certificate)cert)) {
                             add = true;
                         }
@@ -471,16 +469,4 @@
         }
         return add;
     }
-
-    /**
-     * Returns true if CertStore is local. Currently, returns true if
-     * type is Collection or if it has been initialized with
-     * CollectionCertStoreParameters. A new API method should be added
-     * to CertStore that returns local or remote.
-     */
-    static boolean isLocalCertStore(CertStore certStore) {
-        return (certStore.getType().equals("Collection") ||
-                certStore.getCertStoreParameters() instanceof
-                CollectionCertStoreParameters);
-    }
 }
--- a/jdk/src/share/classes/sun/security/provider/certpath/CertStoreHelper.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/sun/security/provider/certpath/CertStoreHelper.java	Fri Jun 08 12:44:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -83,9 +83,8 @@
                                 = (CertStoreHelper)c.newInstance();
                             cache.put(type, csh);
                             return csh;
-                        } catch (InstantiationException e) {
-                            throw new AssertionError(e);
-                        } catch (IllegalAccessException e) {
+                        } catch (InstantiationException |
+                                 IllegalAccessException e) {
                             throw new AssertionError(e);
                         }
                     }
--- a/jdk/src/share/classes/sun/security/provider/certpath/CollectionCertStore.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/sun/security/provider/certpath/CollectionCertStore.java	Fri Jun 08 12:44:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -31,7 +31,6 @@
 import java.util.Collection;
 import java.util.ConcurrentModificationException;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.security.cert.CertSelector;
 import java.security.cert.CertStore;
 import java.security.cert.CertStoreException;
@@ -114,6 +113,7 @@
      *         match the specified selector
      * @throws CertStoreException if an exception occurs
      */
+    @Override
     public Collection<Certificate> engineGetCertificates
             (CertSelector selector) throws CertStoreException {
         if (coll == null) {
@@ -122,18 +122,15 @@
         // Tolerate a few ConcurrentModificationExceptions
         for (int c = 0; c < 10; c++) {
             try {
-                HashSet<Certificate> result = new HashSet<Certificate>();
-                Iterator<?> i = coll.iterator();
+                HashSet<Certificate> result = new HashSet<>();
                 if (selector != null) {
-                    while (i.hasNext()) {
-                        Object o = i.next();
+                    for (Object o : coll) {
                         if ((o instanceof Certificate) &&
                             selector.match((Certificate) o))
                             result.add((Certificate)o);
                     }
                 } else {
-                    while (i.hasNext()) {
-                        Object o = i.next();
+                    for (Object o : coll) {
                         if (o instanceof Certificate)
                             result.add((Certificate)o);
                     }
@@ -157,6 +154,7 @@
      *         match the specified selector
      * @throws CertStoreException if an exception occurs
      */
+    @Override
     public Collection<CRL> engineGetCRLs(CRLSelector selector)
         throws CertStoreException
     {
@@ -166,22 +164,19 @@
         // Tolerate a few ConcurrentModificationExceptions
         for (int c = 0; c < 10; c++) {
             try {
-                HashSet<CRL> result = new HashSet<CRL>();
-                Iterator<?> i = coll.iterator();
+                HashSet<CRL> result = new HashSet<>();
                 if (selector != null) {
-                    while (i.hasNext()) {
-                        Object o = i.next();
+                    for (Object o : coll) {
                         if ((o instanceof CRL) && selector.match((CRL) o))
                             result.add((CRL)o);
                     }
                 } else {
-                    while (i.hasNext()) {
-                        Object o = i.next();
+                    for (Object o : coll) {
                         if (o instanceof CRL)
                             result.add((CRL)o);
                     }
                 }
-                return(result);
+                return result;
             } catch (ConcurrentModificationException e) { }
         }
         throw new ConcurrentModificationException("Too many "
--- a/jdk/src/share/classes/sun/security/provider/certpath/ConstraintsChecker.java	Fri Jun 08 12:00:22 2012 -0700
+++ b/jdk/src/share/classes/sun/security/provider/certpath/ConstraintsChecker.java	Fri Jun 08 12:44:30 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -25,19 +25,20 @@
 
 package sun.security.provider.certpath;
 
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Set;
-import java.util.HashSet;
 import java.io.IOException;
 import java.security.cert.Certificate;
 import java.security.cert.CertificateException;
 import java.security.cert.CertPathValidatorException;
-import java.security.cert.X509Certificate;
 import java.security.cert.PKIXCertPathChecker;
 import java.security.cert.PKIXReason;
+import java.security.cert.X509Certificate;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
 import sun.security.util.Debug;
-import sun.security.x509.PKIXExtensions;
+import static sun.security.x509.PKIXExtensions.*;
 import sun.security.x509.NameConstraintsExtension;
 import sun.security.x509.X509CertImpl;
 
@@ -66,13 +67,12 @@
      * Creates a ConstraintsChecker.
      *
      * @param certPathLength the length of the certification path
-     * @throws CertPathValidatorException if the checker cannot be initialized
      */
-    ConstraintsChecker(int certPathLength) throws CertPathValidatorException {
+    ConstraintsChecker(int certPathLength) {
         this.certPathLength = certPathLength;
-        init(false);
     }
 
+    @Override
     public void init(boolean forward) throws CertPathValidatorException {
         if (!forward) {
             i = 0;
@@ -84,15 +84,17 @@
         }
     }
 
+    @Override
     public boolean isForwardCheckingSupported() {
         return false;
     }
 
+    @Override
     public Set<String> getSupportedExtensions() {
         if (supportedExts == null) {
-            supportedExts = new HashSet<String>();
-            supportedExts.add(PKIXExtensions.BasicConstraints_Id.toString());
-            supportedExts.add(PKIXExtensions.NameConstraints_Id.toString());
+            supportedExts = new HashSet<String>(2);
+            supportedExts.add(BasicConstraints_Id.toString());
+            supportedExts.add(NameConstraints_Id.toString());
             supportedExts = Collections.unmodifiableSet(supportedExts);
         }
         return supportedExts;
@@ -104,14 +106,15 @@
      *
      * @param cert the <code>Certificate</code> to be checked
      * @param unresCritExts a <code>Collection</code> of OID strings
-     * representing the current set of unresolved critical extensions
+     *        representing the current set of unresolved critical extensions
      * @throws CertPathValidatorException if the specified certificate
-     * does not pass the check
+     *         does not pass the check
      */
+    @Override
     public void check(Certificate cert, Collection<String> unresCritExts)
         throws CertPathValidatorException
     {
-        X509Certificate currCert = (X509Certificate) cert;
+        X509Certificate currCert = (X509Certificate)cert;
 
         i++;
         // MUST run NC check second, since it depends on BC check to
@@ -120,8 +123,8 @@
         verifyNameConstraints(currCert);
 
         if (unresCritExts != null && !unresCritExts.isEmpty()) {
-            unresCritExts.remove(PKIXExtensions.BasicConstraints_Id.toString());
-            unresCritExts.remove(PKIXExtensions.NameConstraints_Id.toString());
+            unresCritExts.remove(BasicConstraints_Id.toString());
+            unresCritExts.remove(NameConstraints_Id.toString());
         }
     }
 
@@ -166,9 +169,9 @@
     /**
      * Helper to fold sets of name constraints together
      */
-    static NameConstraintsExtension
-        mergeNameConstraints(X509Certificate currCert,
-            NameConstraintsExtension prevNC) throws CertPathValidatorException
+    static NameConstraintsExtension mergeNameConstraints(
+        X509Certificate currCert, NameConstraintsExtension prevNC)
+        throws CertPathValidatorException
     {
         X509CertImpl currCertImpl;
         try {
@@ -197,7 +200,7 @@
                 // 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!
-                return (NameConstraintsExtension) newConstraints.clone();
+                return (NameConstraintsExtension)newConstraints.clone();
             }
         } else {
             try {
--- a/jdk/src/share/classes/sun/security/provider/certpath/CrlRevocationChecker.java	Fri Jun 08 12:00:22 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,785 +0,0 @@
-/*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *