changeset 16703:5811e206dd2f

Merge
author lana
date Tue, 02 Apr 2013 17:03:25 -0700
parents fe534fb633cd 311a0f72fc77
children d36913af8b3e 4649538853ee
files corba/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3.java corba/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3_1.java corba/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPOutputStream_1_3.java corba/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPOutputStream_1_3_1.java corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepIdDelegator_1_3.java corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepIdDelegator_1_3_1.java corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryIdCache_1_3.java corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryIdCache_1_3_1.java corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryId_1_3.java corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryId_1_3_1.java corba/src/share/classes/com/sun/corba/se/impl/orbutil/ValueHandlerImpl_1_3.java corba/src/share/classes/com/sun/corba/se/impl/orbutil/ValueHandlerImpl_1_3_1.java hotspot/make/test/Queens.java jdk/make/com/sun/servicetag/Makefile jdk/src/share/classes/com/sun/servicetag/BrowserSupport.java jdk/src/share/classes/com/sun/servicetag/Installer.java jdk/src/share/classes/com/sun/servicetag/LinuxSystemEnvironment.java jdk/src/share/classes/com/sun/servicetag/RegistrationData.java jdk/src/share/classes/com/sun/servicetag/RegistrationDocument.java jdk/src/share/classes/com/sun/servicetag/Registry.java jdk/src/share/classes/com/sun/servicetag/ServiceTag.java jdk/src/share/classes/com/sun/servicetag/SolarisServiceTag.java jdk/src/share/classes/com/sun/servicetag/SolarisSystemEnvironment.java jdk/src/share/classes/com/sun/servicetag/SunConnection.java jdk/src/share/classes/com/sun/servicetag/SystemEnvironment.java jdk/src/share/classes/com/sun/servicetag/UnauthorizedAccessException.java jdk/src/share/classes/com/sun/servicetag/Util.java jdk/src/share/classes/com/sun/servicetag/WindowsSystemEnvironment.java jdk/src/share/classes/com/sun/servicetag/package.html jdk/src/share/classes/com/sun/servicetag/resources/Putback-Notes.txt jdk/src/share/classes/com/sun/servicetag/resources/javase_5_swordfish.properties jdk/src/share/classes/com/sun/servicetag/resources/javase_6_swordfish.properties jdk/src/share/classes/com/sun/servicetag/resources/javase_7_swordfish.properties jdk/src/share/classes/com/sun/servicetag/resources/javase_servicetag.properties jdk/src/share/classes/com/sun/servicetag/resources/jdk_header.png jdk/src/share/classes/com/sun/servicetag/resources/product_registration.xsd jdk/src/share/classes/com/sun/servicetag/resources/register.html jdk/src/share/classes/com/sun/servicetag/resources/register_ja.html jdk/src/share/classes/com/sun/servicetag/resources/register_zh_CN.html jdk/test/com/sun/servicetag/DeleteServiceTag.java jdk/test/com/sun/servicetag/DuplicateNotFound.java jdk/test/com/sun/servicetag/FindServiceTags.java jdk/test/com/sun/servicetag/InstanceUrnCheck.java jdk/test/com/sun/servicetag/InvalidRegistrationData.java jdk/test/com/sun/servicetag/InvalidServiceTag.java jdk/test/com/sun/servicetag/JavaServiceTagTest.java jdk/test/com/sun/servicetag/JavaServiceTagTest1.java jdk/test/com/sun/servicetag/NewRegistrationData.java jdk/test/com/sun/servicetag/SvcTagClient.java jdk/test/com/sun/servicetag/SystemRegistryTest.java jdk/test/com/sun/servicetag/TestLoadFromXML.java jdk/test/com/sun/servicetag/UpdateServiceTagTest.java jdk/test/com/sun/servicetag/Util.java jdk/test/com/sun/servicetag/ValidRegistrationData.java jdk/test/com/sun/servicetag/environ.properties jdk/test/com/sun/servicetag/missing-environ-field.xml jdk/test/com/sun/servicetag/newer-registry-version.xml jdk/test/com/sun/servicetag/registration.xml jdk/test/com/sun/servicetag/servicetag1.properties jdk/test/com/sun/servicetag/servicetag2.properties jdk/test/com/sun/servicetag/servicetag3.properties jdk/test/com/sun/servicetag/servicetag4.properties jdk/test/com/sun/servicetag/servicetag5.properties jdk/test/sun/tools/jstat/gcPermCapacityOutput1.awk jdk/test/sun/tools/jstat/jstatGcPermCapacityOutput1.sh langtools/test/tools/apt/Basics/NullAPF.java langtools/test/tools/apt/Basics/apt.sh langtools/test/tools/apt/verifyVariables.sh langtools/test/tools/javac/4846262/Test.java langtools/test/tools/javac/4846262/Test.out langtools/test/tools/javac/4846262/Test.sh langtools/test/tools/javac/6302184/T6302184.sh langtools/test/tools/javac/ClassPathTest/ClassPathTest.sh langtools/test/tools/javac/ClassPathTest/ClassPathTest1.java langtools/test/tools/javac/ClassPathTest/ClassPathTest2.java langtools/test/tools/javac/ClassPathTest/ClassPathTest3.java langtools/test/tools/javac/ClassPathTest/bar/pkg/ClassPathTestAux2.java langtools/test/tools/javac/ClassPathTest/foo/pkg/ClassPathTestAux1.java langtools/test/tools/javac/ClassPathTest/pkg/ClassPathTestAux3.java langtools/test/tools/javac/ExtDirs/ExtDirTest_1.java langtools/test/tools/javac/ExtDirs/ExtDirTest_2.java langtools/test/tools/javac/ExtDirs/ExtDirTest_3.java langtools/test/tools/javac/ExtDirs/ExtDirs.sh langtools/test/tools/javac/MethodParameters.java langtools/test/tools/javac/MissingInclude.java langtools/test/tools/javac/MissingInclude.sh langtools/test/tools/javac/ProtectedInnerClass/ProtectedInnerClass.sh langtools/test/tools/javac/ProtectedInnerClass/ProtectedInnerClass_2.java langtools/test/tools/javac/ProtectedInnerClass/p1/ProtectedInnerClass1.java langtools/test/tools/javac/ProtectedInnerClass/p2/ProtectedInnerClass2.java langtools/test/tools/javac/ProtectedInnerClass/p2/ProtectedInnerClass3.java langtools/test/tools/javac/T5090006/T5090006.java langtools/test/tools/javac/T5090006/compiler.sh langtools/test/tools/javac/constDebug/ConstDebug.java langtools/test/tools/javac/constDebug/ConstDebug.sh langtools/test/tools/javac/fatalErrors/NoJavaLang.java langtools/test/tools/javac/fatalErrors/NoJavaLang.out langtools/test/tools/javac/fatalErrors/NoJavaLang.sh langtools/test/tools/javac/generics/diamond/T6939780.java langtools/test/tools/javac/generics/diamond/T6939780.out langtools/test/tools/javac/innerClassFile/Driver.sh langtools/test/tools/javac/innerClassFile/x/B.java langtools/test/tools/javac/innerClassFile/x/C.java langtools/test/tools/javac/innerClassFile/y/Main.java langtools/test/tools/javac/innerClassFile/y/R1.java langtools/test/tools/javac/innerClassFile/y/R2.java langtools/test/tools/javac/innerClassFile/y/R3.java langtools/test/tools/javac/javazip/A.java langtools/test/tools/javac/javazip/Test.sh langtools/test/tools/javac/javazip/bad/B.java langtools/test/tools/javac/javazip/good/B.java langtools/test/tools/javac/links/T.java langtools/test/tools/javac/links/b/B.java langtools/test/tools/javac/links/links.sh langtools/test/tools/javac/newlines/Newlines.sh langtools/test/tools/javac/stackmap/T4955930.java langtools/test/tools/javac/stackmap/T4955930.sh langtools/test/tools/javac/unicode/SupplementaryJavaID6.sh langtools/test/tools/javah/6257087/foo.java langtools/test/tools/javah/6257087/foo.sh langtools/test/tools/javah/6257087/foo_bar.h langtools/test/tools/javah/ConstMacroTest.sh langtools/test/tools/javah/MissingParamClassException.java langtools/test/tools/javah/MissingParamClassTest.sh langtools/test/tools/javah/ParamClassTest.java langtools/test/tools/javah/SubClassConsts.java langtools/test/tools/javah/SubClassConsts.out langtools/test/tools/javah/SubClassConsts.win langtools/test/tools/javah/SuperClassConsts.java langtools/test/tools/javap/NotPackagePrivateInterface.java langtools/test/tools/javap/PublicInterfaceTest.sh langtools/test/tools/javap/pathsep.sh langtools/test/tools/javap/stackmap/T6271292.java langtools/test/tools/javap/stackmap/T6271292.out langtools/test/tools/javap/stackmap/T6271292.sh
diffstat 2246 files changed, 254620 insertions(+), 21850 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Wed Mar 27 12:42:51 2013 -0700
+++ b/.hgtags	Tue Apr 02 17:03:25 2013 -0700
@@ -202,3 +202,5 @@
 6d3dcd34b5b962ea1ef9eed0dafdee9e812401bc jdk8-b78
 a1313a8d90d17d363a3b2a645dc4030ec204b168 jdk8-b79
 3fa21fbf9be7e6b482af43aacb6a09acfa30bdb6 jdk8-b80
+e41d716405b209d3eddef8bd4240cec2bd34dcca jdk8-b81
+5e8c55025644730385a6f8fa029ecdb2d2c98a07 jdk8-b82
--- a/.hgtags-top-repo	Wed Mar 27 12:42:51 2013 -0700
+++ b/.hgtags-top-repo	Tue Apr 02 17:03:25 2013 -0700
@@ -202,3 +202,5 @@
 fd1a5574cf68af24bfd52decc37ac6361afb278a jdk8-b78
 91d35211e74464dca5edf9b66ab01d0d0d8cded7 jdk8-b79
 907a926d3c96472f357617b48b6b968ea855c23c jdk8-b80
+145dbc56f931c134e837b675b9e6e7bf08902e93 jdk8-b81
+29153d0df68f84162ffe8c2cf4f402a3f2245e85 jdk8-b82
--- a/Makefile	Wed Mar 27 12:42:51 2013 -0700
+++ b/Makefile	Tue Apr 02 17:03:25 2013 -0700
@@ -90,6 +90,7 @@
 include ./make/jaxp-rules.gmk
 include ./make/jaxws-rules.gmk
 include ./make/jdk-rules.gmk
+include ./make/nashorn-rules.gmk
 include ./make/install-rules.gmk
 include ./make/sponsors-rules.gmk
 include ./make/deploy-rules.gmk
@@ -174,6 +175,11 @@
   clobber:: jdk-clobber
 endif
 
+ifeq ($(BUILD_NASHORN), true)
+  generic_build_repo_series:: $(NASHORN)
+  clobber:: nashorn-clobber
+endif
+
 ifeq ($(BUILD_DEPLOY), true)
   generic_build_repo_series:: $(DEPLOY)
   clobber:: deploy-clobber
@@ -336,6 +342,7 @@
 	    BUILD_HOTSPOT=false \
 	    BUILD_JDK=false \
 	    BUILD_LANGTOOLS=false \
+	    BUILD_NASHORN=false \
 	    BUILD_CORBA=false \
 	    BUILD_JAXP=false \
 	    BUILD_JAXWS=false \
--- a/common/autoconf/configure.ac	Wed Mar 27 12:42:51 2013 -0700
+++ b/common/autoconf/configure.ac	Tue Apr 02 17:03:25 2013 -0700
@@ -194,6 +194,7 @@
 ###############################################################################
 
 JDKOPT_SETUP_BUILD_TWEAKS
+JDKOPT_DETECT_INTREE_EC
 
 ###############################################################################
 #
--- a/common/autoconf/generated-configure.sh	Wed Mar 27 12:42:51 2013 -0700
+++ b/common/autoconf/generated-configure.sh	Tue Apr 02 17:03:25 2013 -0700
@@ -612,6 +612,7 @@
 JOBS
 MEMORY_SIZE
 NUM_CORES
+ENABLE_INTREE_EC
 SALIB_NAME
 HOTSPOT_MAKE_ARGS
 FIXPATH
@@ -749,6 +750,7 @@
 OVERRIDE_SRC_ROOT
 ADD_SRC_ROOT
 JDK_TOPDIR
+NASHORN_TOPDIR
 HOTSPOT_TOPDIR
 JAXWS_TOPDIR
 JAXP_TOPDIR
@@ -3751,7 +3753,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1363150186
+DATE_WHEN_GENERATED=1363706268
 
 ###############################################################################
 #
@@ -10785,6 +10787,12 @@
 
 ###############################################################################
 #
+# Enable or disable the elliptic curve crypto implementation
+#
+
+
+###############################################################################
+#
 # Compress jars
 #
 COMPRESS_JARS=false
@@ -15682,6 +15690,7 @@
 JAXP_TOPDIR="$SRC_ROOT/jaxp"
 JAXWS_TOPDIR="$SRC_ROOT/jaxws"
 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
+NASHORN_TOPDIR="$SRC_ROOT/nashorn"
 JDK_TOPDIR="$SRC_ROOT/jdk"
 
 
@@ -15692,6 +15701,7 @@
 
 
 
+
 ###############################################################################
 #
 # Pickup additional source for a component from outside of the source root
@@ -15922,6 +15932,19 @@
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
 fi
+if test "x$with_override_nashorn" != x; then
+    CURDIR="$PWD"
+    cd "$with_override_nashorn"
+    NASHORN_TOPDIR="`pwd`"
+    cd "$CURDIR"
+    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
+        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
+$as_echo_n "checking if nashorn should be overridden... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
+$as_echo "yes with $NASHORN_TOPDIR" >&6; }
+fi
 if test "x$with_override_jdk" != x; then
     CURDIR="$PWD"
     cd "$with_override_jdk"
@@ -18534,14 +18557,18 @@
 
 ### Locate C compiler (CC)
 
-# gcc is almost always present, but on Windows we
-# prefer cl.exe and on Solaris we prefer CC.
-# Thus test for them in this order.
-if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-  # Do not probe for cc on MacOSX.
-  COMPILER_CHECK_LIST="cl gcc"
-else
-  COMPILER_CHECK_LIST="cl cc gcc"
+# On windows, only cl.exe is supported.
+# On Solaris, cc is preferred to gcc.
+# Elsewhere, gcc is preferred to cc.
+
+if test "x$CC" != x; then
+  COMPILER_CHECK_LIST="$CC"
+elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+  COMPILER_CHECK_LIST="cl"
+elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
+  COMPILER_CHECK_LIST="cc gcc"
+else
+  COMPILER_CHECK_LIST="gcc cc"
 fi
 
 
@@ -19505,7 +19532,7 @@
 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
 
 
-# Now that we have resolved CC ourself, let autoconf have it's go at it
+# Now that we have resolved CC ourself, let autoconf have its go at it
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -20107,12 +20134,16 @@
 
 ### Locate C++ compiler (CXX)
 
-if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-  # Do not probe for CC on MacOSX.
-  COMPILER_CHECK_LIST="cl g++"
-else
-  COMPILER_CHECK_LIST="cl CC g++"
-fi
+if test "x$CXX" != x; then
+  COMPILER_CHECK_LIST="$CXX"
+elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+  COMPILER_CHECK_LIST="cl"
+elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
+  COMPILER_CHECK_LIST="CC g++"
+else
+  COMPILER_CHECK_LIST="g++ CC"
+fi
+
 
   COMPILER_NAME=C++
 
@@ -21074,7 +21105,7 @@
 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
 
 
-# Now that we have resolved CXX ourself, let autoconf have it's go at it
+# Now that we have resolved CXX ourself, let autoconf have its go at it
 ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -29799,7 +29830,7 @@
 _ACEOF
  X11_A_OK=yes
 else
-  X11_A_OK=no
+  X11_A_OK=no; break
 fi
 
 done
@@ -31670,6 +31701,22 @@
 
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
+$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
+
+if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
+    ENABLE_INTREE_EC=yes
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+    ENABLE_INTREE_EC=no
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
 ###############################################################################
 #
 # Configure parts of the build that only affect the build performance,
--- a/common/autoconf/jdk-options.m4	Wed Mar 27 12:42:51 2013 -0700
+++ b/common/autoconf/jdk-options.m4	Tue Apr 02 17:03:25 2013 -0700
@@ -366,6 +366,25 @@
 
 ###############################################################################
 #
+# Enable or disable the elliptic curve crypto implementation
+#
+AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC],
+[
+AC_MSG_CHECKING([if elliptic curve crypto implementation is present])
+
+if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
+    ENABLE_INTREE_EC=yes
+    AC_MSG_RESULT([yes])
+else
+    ENABLE_INTREE_EC=no
+    AC_MSG_RESULT([no])
+fi
+
+AC_SUBST(ENABLE_INTREE_EC)
+])
+
+###############################################################################
+#
 # Compress jars
 #
 COMPRESS_JARS=false
--- a/common/autoconf/libraries.m4	Wed Mar 27 12:42:51 2013 -0700
+++ b/common/autoconf/libraries.m4	Tue Apr 02 17:03:25 2013 -0700
@@ -182,7 +182,7 @@
 # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
 AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h],
                  [X11_A_OK=yes],
-                 [X11_A_OK=no],
+                 [X11_A_OK=no; break],
                  [ # include <X11/Xlib.h>
                    # include <X11/Xutil.h>
                  ])
--- a/common/autoconf/source-dirs.m4	Wed Mar 27 12:42:51 2013 -0700
+++ b/common/autoconf/source-dirs.m4	Tue Apr 02 17:03:25 2013 -0700
@@ -33,12 +33,14 @@
 JAXP_TOPDIR="$SRC_ROOT/jaxp"
 JAXWS_TOPDIR="$SRC_ROOT/jaxws"
 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
+NASHORN_TOPDIR="$SRC_ROOT/nashorn"
 JDK_TOPDIR="$SRC_ROOT/jdk"
 AC_SUBST(LANGTOOLS_TOPDIR)
 AC_SUBST(CORBA_TOPDIR)
 AC_SUBST(JAXP_TOPDIR)
 AC_SUBST(JAXWS_TOPDIR)
 AC_SUBST(HOTSPOT_TOPDIR)
+AC_SUBST(NASHORN_TOPDIR)
 AC_SUBST(JDK_TOPDIR)
 ])
 
@@ -233,7 +235,18 @@
     fi
     AC_MSG_CHECKING([if hotspot should be overridden])
     AC_MSG_RESULT([yes with $HOTSPOT_TOPDIR])
-fi    
+fi
+if test "x$with_override_nashorn" != x; then
+    CURDIR="$PWD"
+    cd "$with_override_nashorn"
+    NASHORN_TOPDIR="`pwd`"
+    cd "$CURDIR"
+    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
+        AC_MSG_ERROR([You have to override nashorn with a full nashorn repo!])
+    fi
+    AC_MSG_CHECKING([if nashorn should be overridden])
+    AC_MSG_RESULT([yes with $NASHORN_TOPDIR])
+fi
 if test "x$with_override_jdk" != x; then
     CURDIR="$PWD"
     cd "$with_override_jdk"
--- a/common/autoconf/spec.gmk.in	Wed Mar 27 12:42:51 2013 -0700
+++ b/common/autoconf/spec.gmk.in	Tue Apr 02 17:03:25 2013 -0700
@@ -141,6 +141,7 @@
 JAXP_TOPDIR:=@JAXP_TOPDIR@
 JAXWS_TOPDIR:=@JAXWS_TOPDIR@
 HOTSPOT_TOPDIR:=@HOTSPOT_TOPDIR@
+NASHORN_TOPDIR:=@NASHORN_TOPDIR@
 COPYRIGHT_YEAR:=@COPYRIGHT_YEAR@
 
 # Location where build customization files may be found
@@ -230,6 +231,7 @@
 JAXWS_OUTPUTDIR=$(BUILD_OUTPUT)/jaxws
 HOTSPOT_OUTPUTDIR=$(BUILD_OUTPUT)/hotspot
 JDK_OUTPUTDIR=$(BUILD_OUTPUT)/jdk
+NASHORN_OUTPUTDIR=$(BUILD_OUTPUT)/nashorn
 IMAGES_OUTPUTDIR=$(BUILD_OUTPUT)/images
 JCE_OUTPUTDIR=$(BUILD_OUTPUT)/jce-release
 
@@ -238,6 +240,7 @@
 JAXP_DIST=$(JAXP_OUTPUTDIR)/dist
 JAXWS_DIST=$(JAXWS_OUTPUTDIR)/dist
 HOTSPOT_DIST=@HOTSPOT_DIST@
+NASHORN_DIST=$(NASHORN_OUTPUTDIR)/dist
 
 BUILD_HOTSPOT=@BUILD_HOTSPOT@
 
@@ -536,6 +539,7 @@
 
 # Build setup
 ENABLE_JFR=@ENABLE_JFR@
+ENABLE_INTREE_EC=@ENABLE_INTREE_EC@
 USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
 USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
 USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
--- a/common/autoconf/toolchain.m4	Wed Mar 27 12:42:51 2013 -0700
+++ b/common/autoconf/toolchain.m4	Tue Apr 02 17:03:25 2013 -0700
@@ -249,30 +249,38 @@
 
 ### Locate C compiler (CC)
 
-# gcc is almost always present, but on Windows we
-# prefer cl.exe and on Solaris we prefer CC.
-# Thus test for them in this order.
-if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-  # Do not probe for cc on MacOSX.
-  COMPILER_CHECK_LIST="cl gcc"
+# On windows, only cl.exe is supported.
+# On Solaris, cc is preferred to gcc.
+# Elsewhere, gcc is preferred to cc.
+
+if test "x$CC" != x; then
+  COMPILER_CHECK_LIST="$CC"
+elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+  COMPILER_CHECK_LIST="cl"
+elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
+  COMPILER_CHECK_LIST="cc gcc"
 else
-  COMPILER_CHECK_LIST="cl cc gcc"
+  COMPILER_CHECK_LIST="gcc cc"
 fi
 
 TOOLCHAIN_FIND_COMPILER([CC],[C],[$COMPILER_CHECK_LIST])
-# Now that we have resolved CC ourself, let autoconf have it's go at it
+# Now that we have resolved CC ourself, let autoconf have its go at it
 AC_PROG_CC([$CC])
 
 ### Locate C++ compiler (CXX)
 
-if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-  # Do not probe for CC on MacOSX.
-  COMPILER_CHECK_LIST="cl g++"
+if test "x$CXX" != x; then
+  COMPILER_CHECK_LIST="$CXX"
+elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
+  COMPILER_CHECK_LIST="cl"
+elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
+  COMPILER_CHECK_LIST="CC g++"
 else
-  COMPILER_CHECK_LIST="cl CC g++"
+  COMPILER_CHECK_LIST="g++ CC"
 fi
+
 TOOLCHAIN_FIND_COMPILER([CXX],[C++],[$COMPILER_CHECK_LIST])
-# Now that we have resolved CXX ourself, let autoconf have it's go at it
+# Now that we have resolved CXX ourself, let autoconf have its go at it
 AC_PROG_CXX([$CXX])
 
 ### Locate other tools
--- a/common/bin/hgforest.sh	Wed Mar 27 12:42:51 2013 -0700
+++ b/common/bin/hgforest.sh	Tue Apr 02 17:03:25 2013 -0700
@@ -96,7 +96,7 @@
 repos=""
 repos_extra=""
 if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then
-  subrepos="corba jaxp jaxws langtools jdk hotspot"
+  subrepos="corba jaxp jaxws langtools jdk hotspot nashorn"
   if [ -f .hg/hgrc ] ; then
     pull_default=`hg paths default`
     if [ "${pull_default}" = "" ] ; then
--- a/common/makefiles/Main.gmk	Wed Mar 27 12:42:51 2013 -0700
+++ b/common/makefiles/Main.gmk	Tue Apr 02 17:03:25 2013 -0700
@@ -120,6 +120,12 @@
 	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk $(JDK_TARGET))
 	@$(call TargetExit)
 
+nashorn: jdk nashorn-only
+nashorn-only: start-make
+	@$(call TargetEnter)
+	@($(CD) $(NASHORN_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildNashorn.gmk)
+	@$(call TargetExit)
+
 demos: jdk demos-only
 demos-only: start-make
 	@$(call TargetEnter)
@@ -128,7 +134,7 @@
 
 # Note: This double-colon rule is intentional, to support
 # custom make file integration.
-images:: source-tips demos images-only
+images:: source-tips demos nashorn images-only
 images-only: start-make
 	@$(call TargetEnter)
 	@($(CD) $(JDK_TOPDIR)/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f BuildJdk.gmk images)
@@ -175,9 +181,10 @@
 	@$(ECHO) Boot cycle build step 2: Building a new JDK image using previously built image
 	@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) SPEC=$(dir $(SPEC))bootcycle-spec.gmk images)
 
-test: start-make
+test: images test-only
+test-only: start-make
 	@$(call TargetEnter)
-	@($(CD) $(SRC_ROOT)/test && $(BUILD_LOG_WRAPPER) $(MAKE) -j1 -k MAKEFLAGS= PRODUCT_HOME=$(OUTPUT_ROOT)/jdk JPRT_JAVA_HOME=$(OUTPUT_ROOT)/jdk ALT_OUTPUTDIR=$(OUTPUT_ROOT) $(TEST)) || true
+	@($(CD) $(SRC_ROOT)/test && $(BUILD_LOG_WRAPPER) $(MAKE) -j1 -k MAKEFLAGS= PRODUCT_HOME=$(JDK_IMAGE_DIR) JPRT_JAVA_HOME=$(JDK_IMAGE_DIR) ALT_OUTPUTDIR=$(OUTPUT_ROOT) $(TEST)) || true
 	@$(call TargetExit)
 
 # Stores the tips for each repository. This file is be used when constructing the jdk image and can be
@@ -190,7 +197,7 @@
 
 
 # Remove everything, except the output from configure.
-clean: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-images clean-overlay-images clean-bootcycle-build clean-docs
+clean: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-nashorn clean-images clean-overlay-images clean-bootcycle-build clean-docs
 	@($(CD) $(OUTPUT_ROOT) && $(RM) -r tmp source_tips build.log* build-trace*.log*)
 	@$(ECHO) Cleaned all build artifacts.
 
@@ -220,6 +227,8 @@
 	$(call CleanComponent,hotspot)
 clean-jdk:
 	$(call CleanComponent,jdk)
+clean-nashorn:
+	$(call CleanComponent,nashorn)
 clean-images:
 	$(call CleanComponent,images)
 clean-overlay-images:
@@ -230,10 +239,10 @@
 	$(call CleanComponent,docs)
 	$(call CleanComponent,docstemp)
 
-.PHONY: langtools corba jaxp jaxws hotspot jdk images overlay-images install
-.PHONY: langtools-only corba-only jaxp-only jaxws-only hotspot-only jdk-only images-only overlay-images-only install-only
+.PHONY: langtools corba jaxp jaxws hotspot jdk nashorn images overlay-images install
+.PHONY: langtools-only corba-only jaxp-only jaxws-only hotspot-only jdk-only nashorn-only images-only overlay-images-only install-only
 .PHONY: all test clean dist-clean bootcycle-images start-make
-.PHONY: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-images clean-overlay-images clean-bootcycle-build
+.PHONY: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-nashorn clean-images clean-overlay-images clean-bootcycle-build
 .PHONY: profiles profiles-only profiles-oscheck
 
 FRC: # Force target
--- a/common/makefiles/MakeBase.gmk	Wed Mar 27 12:42:51 2013 -0700
+++ b/common/makefiles/MakeBase.gmk	Tue Apr 02 17:03:25 2013 -0700
@@ -51,8 +51,9 @@
 		     -e 's|X98|$(OUTPUT_ROOT)|g' -e 's|X97|$(SRC_ROOT)|g' \
 		     -e 's|X00|X|g' | tr '\n' '$2'
 
+# Subst in an extra $ to prevent it from disappearing.
 define ListPathsSafely_If
-    $(if $(word $3,$($1)),$(eval $1_LPS$3:=$(call compress_paths,$(wordlist $3,$4,$($1)))))
+    $(if $(word $3,$($1)),$(eval $1_LPS$3:=$(call compress_paths,$(subst $$,$$$$,$(wordlist $3,$4,$($1))))))
 endef
 
 define ListPathsSafely_Printf
--- a/common/makefiles/javadoc/NON_CORE_PKGS.gmk	Wed Mar 27 12:42:51 2013 -0700
+++ b/common/makefiles/javadoc/NON_CORE_PKGS.gmk	Tue Apr 02 17:03:25 2013 -0700
@@ -80,7 +80,8 @@
 
 TREEAPI_PKGS 	 = com.sun.source.doctree \
 		   com.sun.source.tree \
-		   com.sun.source.util
+		   com.sun.source.util \
+		   jdk
 
 SMARTCARDIO_PKGS = javax.smartcardio
 
@@ -93,6 +94,8 @@
                    com.apple.eio
 endif
 
+JDK_PKGS     = jdk
+
 # non-core packages in rt.jar
 NON_CORE_PKGS    = $(DOMAPI_PKGS) \
                    $(MGMT_PKGS) \
@@ -103,5 +106,5 @@
                    $(HTTPSERVER_PKGS) \
                    $(SMARTCARDIO_PKGS) \
                    $(SCTPAPI_PKGS) \
-                   $(APPLE_EXT_PKGS)
-
+                   $(APPLE_EXT_PKGS) \
+                   $(JDK_PKGS)
--- a/corba/.hgtags	Wed Mar 27 12:42:51 2013 -0700
+++ b/corba/.hgtags	Tue Apr 02 17:03:25 2013 -0700
@@ -202,3 +202,5 @@
 27d6368ae8ba570c31c2f0e696d39c99fa2f4538 jdk8-b78
 e41fb1aa0329767b2737303c994e38bede1baa07 jdk8-b79
 5f3d4a6bdd027a1631d97e2dfff63fd5e46987a4 jdk8-b80
+2a00aeeb466b9dee22508f6261f63b70f9c696fe jdk8-b81
+48e1bc77004d9af575b733c04637b98fd17603c2 jdk8-b82
--- a/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_orbutil.jmk	Wed Mar 27 12:42:51 2013 -0700
+++ b/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_orbutil.jmk	Tue Apr 02 17:03:25 2013 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000, 2009, 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
@@ -29,10 +29,6 @@
 	com/sun/corba/se/impl/orbutil/DenseIntMapImpl.java \
 	com/sun/corba/se/impl/orbutil/GetPropertyAction.java \
 	com/sun/corba/se/impl/orbutil/HexOutputStream.java \
-	com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3.java \
-	com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3_1.java \
-	com/sun/corba/se/impl/orbutil/IIOPOutputStream_1_3.java \
-	com/sun/corba/se/impl/orbutil/IIOPOutputStream_1_3_1.java \
 	com/sun/corba/se/impl/orbutil/LegacyHookGetFields.java \
 	com/sun/corba/se/impl/orbutil/LegacyHookPutFields.java \
 	com/sun/corba/se/impl/orbutil/LogKeywords.java \
@@ -45,19 +41,11 @@
 	com/sun/corba/se/impl/orbutil/ORBUtility.java \
 	com/sun/corba/se/impl/orbutil/ORBClassLoader.java \
 	com/sun/corba/se/impl/orbutil/RepIdDelegator.java \
-	com/sun/corba/se/impl/orbutil/RepIdDelegator_1_3.java \
-	com/sun/corba/se/impl/orbutil/RepIdDelegator_1_3_1.java \
-	com/sun/corba/se/impl/orbutil/RepositoryIdCache_1_3.java \
-	com/sun/corba/se/impl/orbutil/RepositoryId_1_3.java \
 	com/sun/corba/se/impl/orbutil/RepositoryIdFactory.java \
 	com/sun/corba/se/impl/orbutil/RepositoryIdStrings.java \
 	com/sun/corba/se/impl/orbutil/RepositoryIdUtility.java \
 	com/sun/corba/se/impl/orbutil/RepositoryIdInterface.java \
-	com/sun/corba/se/impl/orbutil/RepositoryIdCache_1_3_1.java \
-	com/sun/corba/se/impl/orbutil/RepositoryId_1_3_1.java \
 	com/sun/corba/se/impl/orbutil/StackImpl.java \
-	com/sun/corba/se/impl/orbutil/ValueHandlerImpl_1_3_1.java \
-	com/sun/corba/se/impl/orbutil/ValueHandlerImpl_1_3.java \
 	com/sun/corba/se/impl/orbutil/closure/Future.java \
 	com/sun/corba/se/impl/orbutil/closure/Constant.java \
 	com/sun/corba/se/impl/orbutil/concurrent/Sync.java \
--- a/corba/src/share/classes/com/sun/corba/se/impl/activation/ServerMain.java	Wed Mar 27 12:42:51 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/activation/ServerMain.java	Tue Apr 02 17:03:25 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -322,9 +322,9 @@
     com.sun.corba.se.spi.activation._ServerImplBase
 {
     private ORB orb;
-    private Method installMethod ;
-    private Method uninstallMethod ;
-    private Method shutdownMethod ;
+    private transient Method installMethod ;
+    private transient Method uninstallMethod ;
+    private transient Method shutdownMethod ;
     private Object methodArgs[] ;
 
     ServerCallback(ORB orb, Method installMethod, Method uninstallMethod,
--- a/corba/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java	Wed Mar 27 12:42:51 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java	Tue Apr 02 17:03:25 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -1218,7 +1218,7 @@
         // See bug 4391648 for more info about the tcORB in this
         // case.
         RepositoryIdStrings repStrs
-            = RepositoryIdFactory.getRepIdStringsFactory(tcORB);
+            = RepositoryIdFactory.getRepIdStringsFactory();
 
 
         // Assertion: c instanceof Serializable?
@@ -1251,7 +1251,7 @@
         // Anything else
         // We know that this is a TypeCodeImpl since it is our ORB
         classTC = (TypeCodeImpl)ValueUtility.createTypeCodeForClass(
-            tcORB, c, ORBUtility.createValueHandler(tcORB));
+            tcORB, c, ORBUtility.createValueHandler());
         // Intruct classTC to store its buffer
         classTC.setCaching(true);
         // Update the cache
--- a/corba/src/share/classes/com/sun/corba/se/impl/corba/TypeCodeImpl.java	Wed Mar 27 12:42:51 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/corba/TypeCodeImpl.java	Tue Apr 02 17:03:25 2013 -0700
@@ -2189,10 +2189,7 @@
 
                 if (labelIndex == _unionLabels.length) {
                     // check if label has not been found
-                    if (_defaultIndex == -1)
-                        // throw exception if default was not expected
-                        throw wrapper.unexpectedUnionDefault() ;
-                    else
+                    if (_defaultIndex != -1)
                         // must be of the default branch type
                         _memberTypes[_defaultIndex].copy(src, dst);
                 }
--- a/corba/src/share/classes/com/sun/corba/se/impl/encoding/CDRInputStream_1_0.java	Wed Mar 27 12:42:51 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/encoding/CDRInputStream_1_0.java	Tue Apr 02 17:03:25 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -269,8 +269,8 @@
 
     private final void createRepositoryIdHandlers()
     {
-        repIdUtil = RepositoryIdFactory.getRepIdUtility(orb);
-        repIdStrs = RepositoryIdFactory.getRepIdStringsFactory(orb);
+        repIdUtil = RepositoryIdFactory.getRepIdUtility();
+        repIdStrs = RepositoryIdFactory.getRepIdStringsFactory();
     }
 
     public GIOPVersion getGIOPVersion() {
@@ -564,10 +564,7 @@
 
         checkForNegativeLength(len);
 
-        if (orb != null && ORBUtility.isLegacyORB((ORB)orb))
-            return legacyReadString(len);
-        else
-            return internalReadString(len);
+        return internalReadString(len);
     }
 
     private final String internalReadString(int len) {
@@ -588,54 +585,6 @@
         return new String(result, 0, getCharConverter().getNumChars());
     }
 
-    private final String legacyReadString(int len) {
-
-        //
-        // Workaround for ORBs which send string lengths of
-        // zero to mean empty string.
-        //
-        //
-        // IMPORTANT: Do not replace 'new String("")' with "", it may result
-        // in a Serialization bug (See serialization.zerolengthstring) and
-        // bug id: 4728756 for details
-        if (len == 0)
-            return new String("");
-
-        len--;
-        char[] c = new char[len];
-
-        int n = 0;
-        while (n < len) {
-            int avail;
-            int bytes;
-            int wanted;
-
-            avail = bbwi.buflen - bbwi.position();
-            if (avail <= 0) {
-                grow(1, 1);
-                avail = bbwi.buflen - bbwi.position();
-            }
-            wanted = len - n;
-            bytes = (wanted < avail) ? wanted : avail;
-            // Microbenchmarks are showing a loop of ByteBuffer.get(int) being
-            // faster than ByteBuffer.get(byte[], int, int).
-            for (int i=0; i<bytes; i++) {
-                c[n+i] = (char) (bbwi.byteBuffer.get(bbwi.position()+i) & 0xFF);
-            }
-            bbwi.position(bbwi.position() + bytes);
-            n += bytes;
-        }
-
-        //
-        // Skip past terminating null byte
-        //
-        if (bbwi.position() + 1 > bbwi.buflen)
-            alignAndCheck(1, 1);
-        bbwi.position(bbwi.position() + 1);
-
-        return new String(c);
-    }
-
     public final String read_string() {
         return readStringOrIndirection(false);
     }
@@ -1045,7 +994,7 @@
 
                 try {
                     if (valueHandler == null)
-                        valueHandler = ORBUtility.createValueHandler(orb);
+                        valueHandler = ORBUtility.createValueHandler();
 
                     value = valueHandler.readValue(parent,
                                                    indirection,
--- a/corba/src/share/classes/com/sun/corba/se/impl/encoding/CDROutputStream_1_0.java	Wed Mar 27 12:42:51 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/encoding/CDROutputStream_1_0.java	Tue Apr 02 17:03:25 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -189,18 +189,8 @@
 
     private final void createRepositoryIdHandlers()
     {
-        if (orb != null) {
-            // Get the appropriate versions based on the ORB version.  The
-            // ORB versioning info is only in the core ORB.
-            repIdUtil
-                = RepositoryIdFactory.getRepIdUtility(orb);
-            repIdStrs
-                = RepositoryIdFactory.getRepIdStringsFactory(orb);
-        } else {
-            // Get the latest versions
-            repIdUtil = RepositoryIdFactory.getRepIdUtility();
-            repIdStrs = RepositoryIdFactory.getRepIdStringsFactory();
-        }
+        repIdUtil = RepositoryIdFactory.getRepIdUtility();
+        repIdStrs = RepositoryIdFactory.getRepIdStringsFactory();
     }
 
     public BufferManagerWrite getBufferManager()
@@ -705,7 +695,7 @@
     private void writeArray(Serializable array, Class clazz) {
 
         if (valueHandler == null)
-            valueHandler = ORBUtility.createValueHandler(orb); //d11638
+            valueHandler = ORBUtility.createValueHandler(); //d11638
 
         // Write value_tag
         int indirection = writeValueTag(mustChunk, true,
@@ -768,7 +758,7 @@
 
     private void writeRMIIIOPValueType(Serializable object, Class clazz) {
         if (valueHandler == null)
-            valueHandler = ORBUtility.createValueHandler(orb); //d11638
+            valueHandler = ORBUtility.createValueHandler(); //d11638
 
         Serializable key = object;
 
--- a/corba/src/share/classes/com/sun/corba/se/impl/io/FVDCodeBaseImpl.java	Wed Mar 27 12:42:51 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/io/FVDCodeBaseImpl.java	Tue Apr 02 17:03:25 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -86,7 +86,7 @@
             // default to using the current ORB version in case the
             // vhandler is not set
             if (vhandler == null) {
-                vhandler = new ValueHandlerImpl(false);
+                vhandler = ValueHandlerImpl.getInstance(false);
             }
 
             // Util.getCodebase may return null which would
@@ -120,7 +120,7 @@
                 // default to using the current ORB version in case the
                 // vhandler is not set
                 if (vhandler == null) {
-                    vhandler = new ValueHandlerImpl(false);
+                    vhandler = ValueHandlerImpl.getInstance(false);
                 }
 
                 try{
@@ -161,7 +161,7 @@
             // default to using the current ORB version in case the
             // vhandler is not set
             if (vhandler == null) {
-                vhandler = new ValueHandlerImpl(false);
+                vhandler = ValueHandlerImpl.getInstance(false);
             }
 
             Stack repIds = new Stack();
--- a/corba/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java	Wed Mar 27 12:42:51 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java	Tue Apr 02 17:03:25 2013 -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
@@ -25,7 +25,7 @@
 /*
  * Licensed Materials - Property of IBM
  * RMI-IIOP v1.0
- * Copyright IBM Corp. 1998 1999  All Rights Reserved
+ * Copyright IBM Corp. 1998 2012  All Rights Reserved
  *
  */
 
@@ -56,7 +56,6 @@
 
 import java.util.Arrays;
 import java.util.Comparator;
-import java.util.Hashtable;
 
 import com.sun.corba.se.impl.util.RepositoryId;
 
@@ -83,8 +82,6 @@
     private static Object noArgsList[] = {};
     private static Class noTypesList[] = {};
 
-    private static Hashtable translatedFields;
-
     /** true if represents enum type */
     private boolean isEnum;
 
@@ -384,6 +381,42 @@
          */
     }
 
+    private static final class PersistentFieldsValue
+            extends ClassValue<ObjectStreamField[]> {
+        PersistentFieldsValue() { }
+
+        protected ObjectStreamField[] computeValue(Class<?> type) {
+            try {
+                Field pf = type.getDeclaredField("serialPersistentFields");
+                int mods = pf.getModifiers();
+                if (Modifier.isPrivate(mods) && Modifier.isStatic(mods) &&
+                        Modifier.isFinal(mods)) {
+                    pf.setAccessible(true);
+                    java.io.ObjectStreamField[] fields =
+                        (java.io.ObjectStreamField[])pf.get(type);
+                    return translateFields(fields);
+                }
+            } catch (NoSuchFieldException | IllegalAccessException |
+                    IllegalArgumentException | ClassCastException e) {
+            }
+            return null;
+        }
+
+        private static ObjectStreamField[] translateFields(
+            java.io.ObjectStreamField[] fields) {
+            ObjectStreamField[] translation =
+                new ObjectStreamField[fields.length];
+            for (int i = 0; i < fields.length; i++) {
+                translation[i] = new ObjectStreamField(fields[i].getName(),
+                        fields[i].getType());
+            }
+            return translation;
+        }
+    }
+
+    private static final PersistentFieldsValue persistentFieldsValue =
+        new PersistentFieldsValue();
+
     /*
      * Initialize class descriptor.  This method is only invoked on class
      * descriptors created via calls to lookupInternal().  This method is kept
@@ -416,35 +449,7 @@
                  * If it is declared, use the declared serialPersistentFields.
                  * Otherwise, extract the fields from the class itself.
                  */
-                try {
-                    Field pf = cl.getDeclaredField("serialPersistentFields");
-                    // serial bug 7; the serialPersistentFields were not
-                    // being read and stored as Accessible bit was not set
-                    pf.setAccessible(true);
-                    // serial bug 7; need to find if the field is of type
-                    // java.io.ObjectStreamField
-                    java.io.ObjectStreamField[] f =
-                           (java.io.ObjectStreamField[])pf.get(cl);
-                    int mods = pf.getModifiers();
-                    if ((Modifier.isPrivate(mods)) &&
-                        (Modifier.isStatic(mods)) &&
-                        (Modifier.isFinal(mods)))
-                    {
-                        fields = (ObjectStreamField[])translateFields((Object[])pf.get(cl));
-                    }
-                } catch (NoSuchFieldException e) {
-                    fields = null;
-                } catch (IllegalAccessException e) {
-                    fields = null;
-                } catch (IllegalArgumentException e) {
-                    fields = null;
-                } catch (ClassCastException e) {
-                    /* Thrown if a field serialPersistentField exists
-                     * but it is not of type ObjectStreamField.
-                     */
-                    fields = null;
-                }
-
+                    fields = persistentFieldsValue.get(cl);
 
                 if (fields == null) {
                     /* Get all of the declared fields for this
@@ -641,43 +646,6 @@
         superclass = null;
     }
 
-    private static Object[] translateFields(Object objs[])
-        throws NoSuchFieldException {
-        try{
-            java.io.ObjectStreamField fields[] = (java.io.ObjectStreamField[])objs;
-            Object translation[] = null;
-
-            if (translatedFields == null)
-                translatedFields = new Hashtable();
-
-            translation = (Object[])translatedFields.get(fields);
-
-            if (translation != null)
-                return translation;
-            else {
-                Class osfClass = Class.forName("com.sun.corba.se.impl.io.ObjectStreamField");
-                translation = (Object[])java.lang.reflect.Array.newInstance(osfClass, objs.length);
-                Object arg[] = new Object[2];
-                Class types[] = {String.class, Class.class};
-                Constructor constructor = osfClass.getDeclaredConstructor(types);
-                for (int i = fields.length -1; i >= 0; i--){
-                    arg[0] = fields[i].getName();
-                    arg[1] = fields[i].getType();
-
-                    translation[i] = constructor.newInstance(arg);
-                }
-                translatedFields.put(fields, translation);
-
-            }
-
-            return (Object[])translation;
-        }
-        catch(Throwable t){
-            NoSuchFieldException nsfe = new NoSuchFieldException();
-            nsfe.initCause( t ) ;
-            throw nsfe ;
-        }
-    }
 
     /*
      * Set the class this version descriptor matches.
@@ -1555,8 +1523,8 @@
     private boolean hasExternalizableBlockData;
     Method writeObjectMethod;
     Method readObjectMethod;
-    private Method writeReplaceObjectMethod;
-    private Method readResolveObjectMethod;
+    private transient Method writeReplaceObjectMethod;
+    private transient Method readResolveObjectMethod;
     private Constructor cons ;
 
     /**
--- a/corba/src/share/classes/com/sun/corba/se/impl/io/ValueHandlerImpl.java	Wed Mar 27 12:42:51 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/io/ValueHandlerImpl.java	Tue Apr 02 17:03:25 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, 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
@@ -53,7 +53,7 @@
 import com.sun.corba.se.impl.logging.OMGSystemException;
 import com.sun.corba.se.impl.logging.UtilSystemException;
 
-public class ValueHandlerImpl implements javax.rmi.CORBA.ValueHandlerMultiFormat {
+public final class ValueHandlerImpl implements javax.rmi.CORBA.ValueHandlerMultiFormat {
 
     // Property to override our maximum stream format version
     public static final String FORMAT_VERSION_PROPERTY
@@ -150,14 +150,22 @@
         writeValueWithVersion(out, value, streamFormatVersion);
     }
 
-    public ValueHandlerImpl(){}
+    private ValueHandlerImpl(){}
 
-    public ValueHandlerImpl(boolean isInputStream) {
+    private ValueHandlerImpl(boolean isInputStream) {
         this();
         useHashtables = false;
         this.isInputStream = isInputStream;
     }
 
+    static ValueHandlerImpl getInstance() {
+        return new ValueHandlerImpl();
+    }
+
+    static ValueHandlerImpl getInstance(boolean isInputStream) {
+        return new ValueHandlerImpl(isInputStream);
+    }
+
     /**
      * Writes the value to the stream using java semantics.
      * @param out The stream to write the value to
@@ -458,12 +466,7 @@
         return ObjectStreamClass.lookup(value.getClass()).writeReplace(value);
     }
 
-    /**
-     * Encapsulates writing of Java char arrays so that the 1.3 subclass
-     * can override it without exposing internals across packages.  This
-     * is a fix for bug 4367783.
-     */
-    protected void writeCharArray(org.omg.CORBA_2_3.portable.OutputStream out,
+    private void writeCharArray(org.omg.CORBA_2_3.portable.OutputStream out,
                                 char[] array,
                                 int offset,
                                 int length)
@@ -576,12 +579,7 @@
         }
     }
 
-    /**
-     * Encapsulates reading of Java char arrays so that the 1.3 subclass
-     * can override it without exposing internals across packages.  This
-     * is a fix for bug 4367783.
-     */
-    protected void readCharArray(org.omg.CORBA_2_3.portable.InputStream in,
+    private void readCharArray(org.omg.CORBA_2_3.portable.InputStream in,
                                  char[] array,
                                  int offset,
                                  int length)
@@ -795,7 +793,7 @@
         return RepositoryId.cache.getId(repId).isSequence();
     }
 
-    protected String getOutputStreamClassName() {
+    private String getOutputStreamClassName() {
         return "com.sun.corba.se.impl.io.IIOPOutputStream";
     }
 
@@ -843,29 +841,11 @@
     private IIOPOutputStream createOutputStreamBuiltInNoPriv(
         final String name
     ) throws IOException {
-        return
-            name.equals(
-                IIOPOutputStream
-                    .class.getName()
-            ) ?
-            new IIOPOutputStream() :
-
-            name.equals(
-                com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3
-                    .class.getName()
-            ) ?
-            new com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3() :
-
-            name.equals(
-                com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3_1
-                    .class.getName()
-            ) ?
-            new com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3_1() :
-
-            null;
+        return name.equals(IIOPOutputStream.class.getName()) ?
+                new IIOPOutputStream() : null;
     }
 
-    protected String getInputStreamClassName() {
+    private String getInputStreamClassName() {
         return "com.sun.corba.se.impl.io.IIOPInputStream";
     }
 
@@ -913,26 +893,8 @@
      private IIOPInputStream createInputStreamBuiltInNoPriv(
          final String name
      ) throws IOException {
-         return
-             name.equals(
-                 IIOPInputStream
-                     .class.getName()
-             ) ?
-             new IIOPInputStream() :
-
-             name.equals(
-                 com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3
-                     .class.getName()
-             ) ?
-             new com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3() :
-
-             name.equals(
-                 com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3_1
-                     .class.getName()
-             ) ?
-             new com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3_1() :
-
-             null;
+         return name.equals(IIOPInputStream.class.getName()) ?
+                new IIOPInputStream() : null;
      }
 
      /**
@@ -958,12 +920,7 @@
 
     }
 
-    /**
-     * Our JDK 1.3 and JDK 1.3.1 behavior subclasses override this.
-     * The correct behavior is for a Java char to map to a CORBA wchar,
-     * but our older code mapped it to a CORBA char.
-     */
-    protected TCKind getJavaCharTCKind() {
+    TCKind getJavaCharTCKind() {
         return TCKind.tk_wchar;
     }
 }
--- a/corba/src/share/classes/com/sun/corba/se/impl/io/ValueUtility.java	Wed Mar 27 12:42:51 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/io/ValueUtility.java	Tue Apr 02 17:03:25 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -93,6 +93,14 @@
         null,       // tk_abstract_interface 32
     };
 
+    static {
+        sun.corba.SharedSecrets.setJavaCorbaAccess(new sun.corba.JavaCorbaAccess() {
+            public ValueHandlerImpl newValueHandlerImpl() {
+                return ValueHandlerImpl.getInstance();
+            }
+        });
+    }
+
     public static String getSignature(ValueMember member)
         throws ClassNotFoundException {
 
--- a/corba/src/share/classes/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java	Wed Mar 27 12:42:51 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java	Tue Apr 02 17:03:25 2013 -0700
@@ -112,6 +112,9 @@
 import com.sun.corba.se.impl.orbutil.ORBClassLoader;
 import com.sun.corba.se.impl.logging.UtilSystemException;
 import com.sun.corba.se.spi.logging.CORBALogDomains;
+import sun.corba.SharedSecrets;
+import sun.corba.JavaCorbaAccess;
+
 
 /**
  * Provides utility methods that can be used by stubs and ties to
@@ -125,7 +128,8 @@
     // Maps targets to ties.
     private static IdentityHashtable exportedServants = new IdentityHashtable();
 
-    private static ValueHandlerImpl valueHandlerSingleton = new ValueHandlerImpl();
+    private static final ValueHandlerImpl valueHandlerSingleton =
+        SharedSecrets.getJavaCorbaAccess().newValueHandlerImpl();
 
     private UtilSystemException utilWrapper = UtilSystemException.get(
                                                   CORBALogDomains.RPC_ENCODING);
--- a/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java	Wed Mar 27 12:42:51 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java	Tue Apr 02 17:03:25 2013 -0700
@@ -840,7 +840,7 @@
         // backward compatability 4365188
         CodeBase cb;
 
-        ValueHandler vh = ORBUtility.createValueHandler(this);
+        ValueHandler vh = ORBUtility.createValueHandler();
 
         cb = (CodeBase)vh.getRunTimeCodeBase();
         return ORBUtility.connectAndGetIOR( this, cb ) ;
--- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3.java	Wed Mar 27 12:42:51 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.corba.se.impl.orbutil;
-
-import java.io.*;
-import java.util.Hashtable;
-
-/**
- * Implements legacy behavior from before Ladybird to maintain
- * backwards compatibility.
- */
-public class IIOPInputStream_1_3 extends com.sun.corba.se.impl.io.IIOPInputStream
-{
-    // The newer version in the io package correctly reads a wstring instead.
-    // This concerns bug 4379597.
-    protected String internalReadUTF(org.omg.CORBA.portable.InputStream stream)
-    {
-        return stream.read_string();
-    }
-
-    /**
-     * Before JDK 1.3.1_01, the PutField/GetField implementation
-     * actually sent a Hashtable.
-     */
-    public ObjectInputStream.GetField readFields()
-        throws IOException, ClassNotFoundException, NotActiveException {
-        Hashtable fields = (Hashtable)readObject();
-        return new LegacyHookGetFields(fields);
-    }
-
-    public IIOPInputStream_1_3()
-        throws java.io.IOException {
-        super();
-    }
-}
--- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPInputStream_1_3_1.java	Wed Mar 27 12:42:51 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- */
-package com.sun.corba.se.impl.orbutil;
-
-import java.io.*;
-import java.util.Hashtable;
-
-/**
- * Implements legacy behavior from Ladybird to maintain
- * backwards compatibility.
- */
-public class IIOPInputStream_1_3_1 extends com.sun.corba.se.impl.io.IIOPInputStream
-{
-    public IIOPInputStream_1_3_1()
-        throws java.io.IOException {
-        super();
-    }
-
-    /**
-     * Before JDK 1.3.1_01, the PutField/GetField implementation
-     * actually sent a Hashtable.
-     */
-    public ObjectInputStream.GetField readFields()
-        throws IOException, ClassNotFoundException, NotActiveException {
-
-        Hashtable fields = (Hashtable)readObject();
-        return new LegacyHookGetFields(fields);
-    }
-}
--- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPOutputStream_1_3.java	Wed Mar 27 12:42:51 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.corba.se.impl.orbutil;
-
-import java.io.*;
-
-/**
- * Implements legacy behavior from before Ladybird to maintain
- * backwards compatibility.
- */
-public class IIOPOutputStream_1_3 extends com.sun.corba.se.impl.io.IIOPOutputStream
-{
-    // We can't assume that the superclass's putFields
-    // member will be non-private.  We must allow
-    // the RI to run on JDK 1.3.1 FCS as well as
-    // the JDK 1.3.1_01 patch.
-    private ObjectOutputStream.PutField putFields_1_3;
-
-    // The newer version in the io package correctly writes a wstring instead.
-    // This concerns bug 4379597.
-    protected void internalWriteUTF(org.omg.CORBA.portable.OutputStream stream,
-                                    String data)
-    {
-        stream.write_string(data);
-    }
-
-    public IIOPOutputStream_1_3()
-        throws java.io.IOException {
-        super();
-    }
-
-    /**
-     * Before JDK 1.3.1_01, the PutField/GetField implementation
-     * actually sent a Hashtable.
-     */
-    public ObjectOutputStream.PutField putFields()
-        throws IOException {
-        putFields_1_3 = new LegacyHookPutFields();
-        return putFields_1_3;
-    }
-
-    public void writeFields()
-        throws IOException {
-        putFields_1_3.write(this);
-    }
-}
--- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/IIOPOutputStream_1_3_1.java	Wed Mar 27 12:42:51 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- */
-package com.sun.corba.se.impl.orbutil;
-
-import java.io.*;
-import java.util.Hashtable;
-
-/**
- * Implements legacy behavior from Ladybird to maintain
- * backwards compatibility.
- */
-public class IIOPOutputStream_1_3_1 extends com.sun.corba.se.impl.io.IIOPOutputStream
-{
-    // We can't assume that the superclass's putFields
-    // member will be non-private.  We must allow
-    // the RI to run on JDK 1.3.1 FCS as well as
-    // the JDK 1.3.1_01 patch.
-    private ObjectOutputStream.PutField putFields_1_3_1;
-
-    public IIOPOutputStream_1_3_1()
-        throws java.io.IOException {
-        super();
-    }
-
-    /**
-     * Before JDK 1.3.1_01, the PutField/GetField implementation
-     * actually sent a Hashtable.
-     */
-    public ObjectOutputStream.PutField putFields()
-        throws IOException {
-
-        putFields_1_3_1 = new LegacyHookPutFields();
-        return putFields_1_3_1;
-    }
-
-    public void writeFields()
-        throws IOException {
-
-        putFields_1_3_1.write(this);
-    }
-}
--- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java	Wed Mar 27 12:42:51 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java	Tue Apr 02 17:03:25 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2009, 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
@@ -160,45 +160,13 @@
     }
 
     /**
-     * Creates the correct ValueHandler for the given ORB,
-     * querying ORBVersion information.  If the ORB or
-     * ORBVersion is null, gets the ValueHandler from
-     * Util.createValueHandler.
+     * Return default ValueHandler
      */
-    public static ValueHandler createValueHandler(ORB orb) {
-
-        if (orb == null)
-            return Util.createValueHandler();
-
-        ORBVersion version = orb.getORBVersion();
-
-        if (version == null)
-            return Util.createValueHandler();
-
-        if (version.equals(ORBVersionFactory.getOLD()))
-            return new ValueHandlerImpl_1_3();
-        if (version.equals(ORBVersionFactory.getNEW()))
-            return new ValueHandlerImpl_1_3_1();
-
+    public static ValueHandler createValueHandler() {
         return Util.createValueHandler();
     }
 
     /**
-     * Returns true if the given ORB could accurately be determined to be a
-     * Kestrel or earlier ORB.  Note: If passed the ORBSingleton, this will return
-     * false.
-     */
-    public static boolean isLegacyORB(ORB orb)
-    {
-        try {
-            ORBVersion currentORB = orb.getORBVersion();
-            return currentORB.equals( ORBVersionFactory.getOLD() ) ;
-        } catch (SecurityException se) {
-            return false;
-        }
-    }
-
-    /**
      * Returns true if it was accurately determined that the remote ORB is
      * a foreign (non-JavaSoft) ORB.  Note:  If passed the ORBSingleton, this
      * will return false.
--- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/ObjectStreamClass_1_3_1.java	Wed Mar 27 12:42:51 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/ObjectStreamClass_1_3_1.java	Tue Apr 02 17:03:25 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -1119,8 +1119,8 @@
     private boolean hasExternalizableBlockData;
     Method writeObjectMethod;
     Method readObjectMethod;
-    private Method writeReplaceObjectMethod;
-    private Method readResolveObjectMethod;
+    private transient Method writeReplaceObjectMethod;
+    private transient Method readResolveObjectMethod;
 
     /*
      * ObjectStreamClass_1_3_1 that this one was built from.
--- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepIdDelegator_1_3.java	Wed Mar 27 12:42:51 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +0,0 @@
-/*
- * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.corba.se.impl.orbutil;
-
-import org.omg.CORBA.ORB;
-import java.io.Serializable;
-import java.util.Hashtable;
-import java.net.MalformedURLException;
-import com.sun.corba.se.impl.io.TypeMismatchException;
-import com.sun.corba.se.impl.util.RepositoryId;
-
-/**
- * Delegates to the RepositoryId_1_3 implementation in
- * com.sun.corba.se.impl.orbutil.  This is necessary to
- * overcome the fact that many of RepositoryId's methods
- * are static.
- */
-public final class RepIdDelegator_1_3
-    implements RepositoryIdStrings,
-               RepositoryIdUtility,
-               RepositoryIdInterface
-{
-    // RepositoryIdFactory methods
-
-    public String createForAnyType(Class type) {
-        return RepositoryId_1_3.createForAnyType(type);
-    }
-
-    public String createForJavaType(Serializable ser)
-        throws TypeMismatchException
-    {
-        return RepositoryId_1_3.createForJavaType(ser);
-    }
-
-    public String createForJavaType(Class clz)
-        throws TypeMismatchException
-    {
-        return RepositoryId_1_3.createForJavaType(clz);
-    }
-
-    public String createSequenceRepID(java.lang.Object ser) {
-        return RepositoryId_1_3.createSequenceRepID(ser);
-    }
-
-    public String createSequenceRepID(Class clazz) {
-        return RepositoryId_1_3.createSequenceRepID(clazz);
-    }
-
-    public RepositoryIdInterface getFromString(String repIdString) {
-        return new RepIdDelegator_1_3(RepositoryId_1_3.cache.getId(repIdString));
-    }
-
-    // RepositoryIdUtility methods
-
-    public boolean isChunkedEncoding(int valueTag) {
-        return RepositoryId.isChunkedEncoding(valueTag);
-    }
-
-    public boolean isCodeBasePresent(int valueTag) {
-        return RepositoryId.isCodeBasePresent(valueTag);
-    }
-
-    public String getClassDescValueRepId() {
-        return RepositoryId_1_3.kClassDescValueRepID;
-    }
-
-    public String getWStringValueRepId() {
-        return RepositoryId_1_3.kWStringValueRepID;
-    }
-
-    public int getTypeInfo(int valueTag) {
-        return RepositoryId.getTypeInfo(valueTag);
-    }
-
-    public int getStandardRMIChunkedNoRepStrId() {
-        return RepositoryId.kPreComputed_StandardRMIChunked_NoRep;
-    }
-
-    public int getCodeBaseRMIChunkedNoRepStrId() {
-        return RepositoryId.kPreComputed_CodeBaseRMIChunked_NoRep;
-    }
-
-    public int getStandardRMIChunkedId() {
-        return RepositoryId.kPreComputed_StandardRMIChunked;
-    }
-
-    public int getCodeBaseRMIChunkedId() {
-        return RepositoryId.kPreComputed_CodeBaseRMIChunked;
-    }
-
-    public int getStandardRMIUnchunkedId() {
-        return RepositoryId.kPreComputed_StandardRMIUnchunked;
-    }
-
-    public int getCodeBaseRMIUnchunkedId() {
-        return RepositoryId.kPreComputed_CodeBaseRMIUnchunked;
-    }
-
-    public int getStandardRMIUnchunkedNoRepStrId() {
-        return RepositoryId.kPreComputed_StandardRMIUnchunked_NoRep;
-    }
-
-    public int getCodeBaseRMIUnchunkedNoRepStrId() {
-        return RepositoryId.kPreComputed_CodeBaseRMIUnchunked_NoRep;
-    }
-
-    // RepositoryIdInterface methods
-
-    public Class getClassFromType() throws ClassNotFoundException {
-        return delegate.getClassFromType();
-    }
-
-    public Class getClassFromType(String codebaseURL)
-        throws ClassNotFoundException, MalformedURLException
-    {
-        return delegate.getClassFromType(codebaseURL);
-    }
-
-    public Class getClassFromType(Class expectedType,
-                                  String codebaseURL)
-        throws ClassNotFoundException, MalformedURLException
-    {
-        return delegate.getClassFromType(expectedType, codebaseURL);
-    }
-
-    public String getClassName() {
-        return delegate.getClassName();
-    }
-
-    // Constructor used for factory/utility cases
-    public RepIdDelegator_1_3() {}
-
-    // Constructor used by getIdFromString.  All non-static
-    // RepositoryId methods will use the provided delegate.
-    private RepIdDelegator_1_3(RepositoryId_1_3 _delegate) {
-        this.delegate = _delegate;
-    }
-
-    private RepositoryId_1_3 delegate = null;
-
-    public String toString() {
-        if (delegate != null)
-            return delegate.toString();
-        else
-            return this.getClass().getName();
-    }
-
-    public boolean equals(Object obj) {
-        if (delegate != null)
-            return delegate.equals(obj);
-        else
-            return super.equals(obj);
-    }
-}
--- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepIdDelegator_1_3_1.java	Wed Mar 27 12:42:51 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +0,0 @@
-/*
- * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.corba.se.impl.orbutil;
-
-import org.omg.CORBA.ORB;
-import java.io.Serializable;
-import java.util.Hashtable;
-import java.net.MalformedURLException;
-import com.sun.corba.se.impl.io.TypeMismatchException;
-import com.sun.corba.se.impl.util.RepositoryId;
-
-/**
- * Delegates to the RepositoryId_1_3_1 implementation in
- * com.sun.corba.se.impl.orbutil.  This is necessary to
- * overcome the fact that many of RepositoryId's methods
- * are static.
- */
-public final class RepIdDelegator_1_3_1
-    implements RepositoryIdStrings,
-               RepositoryIdUtility,
-               RepositoryIdInterface
-{
-    // RepositoryIdFactory methods
-
-    public String createForAnyType(Class type) {
-        return RepositoryId_1_3_1.createForAnyType(type);
-    }
-
-    public String createForJavaType(Serializable ser)
-        throws TypeMismatchException
-    {
-        return RepositoryId_1_3_1.createForJavaType(ser);
-    }
-
-    public String createForJavaType(Class clz)
-        throws TypeMismatchException
-    {
-        return RepositoryId_1_3_1.createForJavaType(clz);
-    }
-
-    public String createSequenceRepID(java.lang.Object ser) {
-        return RepositoryId_1_3_1.createSequenceRepID(ser);
-    }
-
-    public String createSequenceRepID(Class clazz) {
-        return RepositoryId_1_3_1.createSequenceRepID(clazz);
-    }
-
-    public RepositoryIdInterface getFromString(String repIdString) {
-        return new RepIdDelegator_1_3_1(RepositoryId_1_3_1.cache.getId(repIdString));
-    }
-
-    // RepositoryIdUtility methods
-
-    public boolean isChunkedEncoding(int valueTag) {
-        return RepositoryId.isChunkedEncoding(valueTag);
-    }
-
-    public boolean isCodeBasePresent(int valueTag) {
-        return RepositoryId.isCodeBasePresent(valueTag);
-    }
-
-    public String getClassDescValueRepId() {
-        return RepositoryId_1_3_1.kClassDescValueRepID;
-    }
-
-    public String getWStringValueRepId() {
-        return RepositoryId_1_3_1.kWStringValueRepID;
-    }
-
-    public int getTypeInfo(int valueTag) {
-        return RepositoryId.getTypeInfo(valueTag);
-    }
-
-    public int getStandardRMIChunkedNoRepStrId() {
-        return RepositoryId.kPreComputed_StandardRMIChunked_NoRep;
-    }
-
-    public int getCodeBaseRMIChunkedNoRepStrId() {
-        return RepositoryId.kPreComputed_CodeBaseRMIChunked_NoRep;
-    }
-
-    public int getStandardRMIChunkedId() {
-        return RepositoryId.kPreComputed_StandardRMIChunked;
-    }
-
-    public int getCodeBaseRMIChunkedId() {
-        return RepositoryId.kPreComputed_CodeBaseRMIChunked;
-    }
-
-    public int getStandardRMIUnchunkedId() {
-        return RepositoryId.kPreComputed_StandardRMIUnchunked;
-    }
-
-    public int getCodeBaseRMIUnchunkedId() {
-        return RepositoryId.kPreComputed_CodeBaseRMIUnchunked;
-    }
-
-    public int getStandardRMIUnchunkedNoRepStrId() {
-        return RepositoryId.kPreComputed_StandardRMIUnchunked_NoRep;
-    }
-
-    public int getCodeBaseRMIUnchunkedNoRepStrId() {
-        return RepositoryId.kPreComputed_CodeBaseRMIUnchunked_NoRep;
-    }
-
-    // RepositoryIdInterface methods
-
-    public Class getClassFromType() throws ClassNotFoundException {
-        return delegate.getClassFromType();
-    }
-
-    public Class getClassFromType(String codebaseURL)
-        throws ClassNotFoundException, MalformedURLException
-    {
-        return delegate.getClassFromType(codebaseURL);
-    }
-
-    public Class getClassFromType(Class expectedType,
-                                  String codebaseURL)
-        throws ClassNotFoundException, MalformedURLException
-    {
-        return delegate.getClassFromType(expectedType, codebaseURL);
-    }
-
-    public String getClassName() {
-        return delegate.getClassName();
-    }
-
-    // Constructor used for factory/utility cases
-    public RepIdDelegator_1_3_1() {}
-
-    // Constructor used by getIdFromString.  All non-static
-    // RepositoryId methods will use the provided delegate.
-    private RepIdDelegator_1_3_1(RepositoryId_1_3_1 _delegate) {
-        this.delegate = _delegate;
-    }
-
-    private RepositoryId_1_3_1 delegate = null;
-
-    public String toString() {
-        if (delegate != null)
-            return delegate.toString();
-        else
-            return this.getClass().getName();
-    }
-
-    public boolean equals(Object obj) {
-        if (delegate != null)
-            return delegate.equals(obj);
-        else
-            return super.equals(obj);
-    }
-}
--- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryIdCache_1_3.java	Wed Mar 27 12:42:51 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2000, 2002, 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.
- */
-/*
- * Licensed Materials - Property of IBM
- * RMI-IIOP v1.0
- * Copyright IBM Corp. 1998 1999  All Rights Reserved
- *
- */
-
-package com.sun.corba.se.impl.orbutil;
-
-import java.util.Stack;
-import java.util.Hashtable;
-import java.util.EmptyStackException;
-import java.util.Enumeration;
-
-// Really limited pool - in this case just creating several at a time...
-class RepositoryIdPool_1_3 extends Stack {
-
-    private static int MAX_CACHE_SIZE = 4;
-    private RepositoryIdCache_1_3 cache;
-
-    public final synchronized RepositoryId_1_3 popId() {
-
-        try {
-            return (RepositoryId_1_3)super.pop();
-        }
-        catch(EmptyStackException e) {
-            increasePool(5);
-            return (RepositoryId_1_3)super.pop();
-        }
-
-    }
-
-    // Pool management
-    final void increasePool(int size) {
-        //if (cache.size() <= MAX_CACHE_SIZE)
-        for (int i = size; i > 0; i--)
-            push(new RepositoryId_1_3());
-        /*
-          // _REVISIT_ This will not work w/out either thread tracing or weak references.  I am
-          // betting that thread tracing almost completely negates benefit of reuse.  Until either
-          // 1.2 only inclusion or proof to the contrary, I'll leave it this way...
-          else {
-          int numToReclaim = cache.size() / 2;
-          Enumeration keys = cache.keys();
-          Enumeration elements = cache.elements();
-          for (int i = numToReclaim; i > 0; i--) {
-          Object key = keys.nextElement();
-          Object element = elements.nextElement();
-
-          push(element);
-          cache.remove(key);
-          }
-          }
-        */
-    }
-
-    final void setCaches(RepositoryIdCache_1_3 cache) {
-        this.cache = cache;
-    }
-
-}
-
-public class RepositoryIdCache_1_3 extends Hashtable {
-
-    private RepositoryIdPool_1_3 pool = new RepositoryIdPool_1_3();
-
-    public RepositoryIdCache_1_3() {
-        pool.setCaches(this);
-    }
-
-    public final synchronized RepositoryId_1_3 getId(String key) {
-        RepositoryId_1_3 repId = (RepositoryId_1_3)super.get(key);
-
-        if (repId != null)
-            return repId;
-        else {
-            //repId = pool.popId().init(key);
-            repId = new RepositoryId_1_3(key);
-            put(key, repId);
-            return repId;
-        }
-
-    }
-}
--- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryIdCache_1_3_1.java	Wed Mar 27 12:42:51 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.corba.se.impl.orbutil;
-
-import java.util.Stack;
-import java.util.Hashtable;
-import java.util.EmptyStackException;
-import java.util.Enumeration;
-
-// Really limited pool - in this case just creating several at a time...
-class RepositoryIdPool_1_3_1 extends Stack {
-
-    private static int MAX_CACHE_SIZE = 4;
-    private RepositoryIdCache_1_3_1 cache;
-
-    public final synchronized RepositoryId_1_3_1 popId() {
-
-        try {
-            return (RepositoryId_1_3_1)super.pop();
-        }
-        catch(EmptyStackException e) {
-            increasePool(5);
-            return (RepositoryId_1_3_1)super.pop();
-        }
-
-    }
-
-    // Pool management
-    final void increasePool(int size) {
-        //if (cache.size() <= MAX_CACHE_SIZE)
-        for (int i = size; i > 0; i--)
-            push(new RepositoryId_1_3_1());
-        /*
-          // _REVISIT_ This will not work w/out either thread tracing or weak references.  I am
-          // betting that thread tracing almost completely negates benefit of reuse.  Until either
-          // 1.2 only inclusion or proof to the contrary, I'll leave it this way...
-          else {
-          int numToReclaim = cache.size() / 2;
-          Enumeration keys = cache.keys();
-          Enumeration elements = cache.elements();
-          for (int i = numToReclaim; i > 0; i--) {
-          Object key = keys.nextElement();