changeset 16728:1b7611896b3b

Merge
author lana
date Tue, 02 Apr 2013 11:59:34 -0700
parents 1d83fd280379 311a0f72fc77
children 3b26e313ad81
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 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 2077 files changed, 250509 insertions(+), 11812 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Apr 02 10:12:20 2013 -0700
+++ b/.hgtags	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/.hgtags-top-repo	Tue Apr 02 11:59:34 2013 -0700
@@ -202,3 +202,5 @@
 fd1a5574cf68af24bfd52decc37ac6361afb278a jdk8-b78
 91d35211e74464dca5edf9b66ab01d0d0d8cded7 jdk8-b79
 907a926d3c96472f357617b48b6b968ea855c23c jdk8-b80
+145dbc56f931c134e837b675b9e6e7bf08902e93 jdk8-b81
+29153d0df68f84162ffe8c2cf4f402a3f2245e85 jdk8-b82
--- a/Makefile	Tue Apr 02 10:12:20 2013 -0700
+++ b/Makefile	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/common/autoconf/configure.ac	Tue Apr 02 11:59:34 2013 -0700
@@ -194,6 +194,7 @@
 ###############################################################################
 
 JDKOPT_SETUP_BUILD_TWEAKS
+JDKOPT_DETECT_INTREE_EC
 
 ###############################################################################
 #
--- a/common/autoconf/generated-configure.sh	Tue Apr 02 10:12:20 2013 -0700
+++ b/common/autoconf/generated-configure.sh	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/common/autoconf/jdk-options.m4	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/common/autoconf/libraries.m4	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/common/autoconf/source-dirs.m4	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/common/autoconf/spec.gmk.in	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/common/autoconf/toolchain.m4	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/common/bin/hgforest.sh	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/common/makefiles/Main.gmk	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/common/makefiles/MakeBase.gmk	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/common/makefiles/javadoc/NON_CORE_PKGS.gmk	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/corba/.hgtags	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/corba/make/com/sun/corba/minclude/com_sun_corba_se_impl_orbutil.jmk	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/activation/ServerMain.java	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/corba/TypeCodeImpl.java	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/encoding/CDRInputStream_1_0.java	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/encoding/CDROutputStream_1_0.java	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/io/FVDCodeBaseImpl.java	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/io/ObjectStreamClass.java	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/io/ValueHandlerImpl.java	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/io/ValueUtility.java	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/javax/rmi/CORBA/Util.java	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 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	Tue Apr 02 10:12:20 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	Tue Apr 02 10:12:20 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	Tue Apr 02 10:12:20 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/ORBUtility.java	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/ObjectStreamClass_1_3_1.java	Tue Apr 02 11:59:34 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	Tue Apr 02 10:12:20 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	Tue Apr 02 10:12:20 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	Tue Apr 02 10:12:20 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	Tue Apr 02 10:12:20 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();
-          Object element = elements.nextElement();
-
-          push(element);
-          cache.remove(key);
-          }
-          }
-        */
-    }
-
-    final void setCaches(RepositoryIdCache_1_3_1 cache) {
-        this.cache = cache;
-    }
-
-}
-
-public class RepositoryIdCache_1_3_1 extends Hashtable {
-
-    private RepositoryIdPool_1_3_1 pool = new RepositoryIdPool_1_3_1();
-
-    public RepositoryIdCache_1_3_1() {
-        pool.setCaches(this);
-    }
-
-    public final synchronized RepositoryId_1_3_1 getId(String key) {
-        RepositoryId_1_3_1 repId = (RepositoryId_1_3_1)super.get(key);
-
-        if (repId != null)
-            return repId;
-        else {
-            //repId = pool.popId().init(key);
-            repId = new RepositoryId_1_3_1(key);
-            put(key, repId);
-            return repId;
-        }
-
-    }
-}
--- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryIdFactory.java	Tue Apr 02 10:12:20 2013 -0700
+++ b/corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryIdFactory.java	Tue Apr 02 11:59:34 2013 -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
@@ -30,12 +30,6 @@
 
 public abstract class RepositoryIdFactory
 {
-    private static final RepIdDelegator_1_3 legacyDelegator
-        = new RepIdDelegator_1_3();
-
-    private static final RepIdDelegator_1_3_1 ladybirdDelegator
-        = new RepIdDelegator_1_3_1();
-
     private static final RepIdDelegator currentDelegator
         = new RepIdDelegator();
 
@@ -48,29 +42,6 @@
     }
 
     /**
-     * Checks the version of the ORB and returns the appropriate
-     * RepositoryIdStrings instance.
-     */
-    public static RepositoryIdStrings getRepIdStringsFactory(ORB orb)
-    {
-        if (orb != null) {
-            switch (orb.getORBVersion().getORBType()) {
-                case ORBVersion.NEWER:
-                case ORBVersion.FOREIGN:
-                case ORBVersion.JDK1_3_1_01:
-                    return currentDelegator;
-                case ORBVersion.OLD:
-                    return legacyDelegator;
-                case ORBVersion.NEW:
-                    return ladybirdDelegator;
-                default:
-                    return currentDelegator;
-            }
-        } else
-            return currentDelegator;
-    }
-
-    /**
      * Returns the latest version RepositoryIdUtility instance
      */
     public static RepositoryIdUtility getRepIdUtility()
@@ -78,26 +49,4 @@
         return currentDelegator;
     }
 
-    /**
-     * Checks the version of the ORB and returns the appropriate
-     * RepositoryIdUtility instance.
-     */
-    public static RepositoryIdUtility getRepIdUtility(ORB orb)
-    {
-        if (orb != null) {
-            switch (orb.getORBVersion().getORBType()) {
-                case ORBVersion.NEWER:
-                case ORBVersion.FOREIGN:
-                case ORBVersion.JDK1_3_1_01:
-                    return currentDelegator;
-                case ORBVersion.OLD:
-                    return legacyDelegator;
-                case ORBVersion.NEW:
-                    return ladybirdDelegator;
-                default:
-                    return currentDelegator;
-            }
-        } else
-            return currentDelegator;
-    }
 }
--- a/corba/src/share/classes/com/sun/corba/se/impl/orbutil/RepositoryId_1_3.java	Tue Apr 02 10:12:20 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,990 +0,0 @@
-/*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-/*
- * 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.StringTokenizer;
-import java.util.Hashtable;
-import java.io.IOException;
-import java.lang.reflect.Method;
-
-// Imports for using codebase URL to load class
-import java.net.MalformedURLException;
-import org.omg.CORBA.portable.ValueBase;
-import org.omg.CORBA.portable.IDLEntity;
-
-import com.sun.corba.se.impl.util.JDKBridge;
-import com.sun.corba.se.impl.util.Utility;
-import com.sun.corba.se.impl.util.PackagePrefixChecker;
-import com.sun.corba.se.impl.util.IdentityHashtable;
-import com.sun.corba.se.impl.io.ObjectStreamClass;
-
-import javax.rmi.CORBA.Util;
-
-// keeping the original RepositoryId class that was shipped in
-// JDK 1.3.  It has interoperability bugs
-
-public class RepositoryId_1_3 {
-
-    // Legal IDL Identifier characters (1 = legal). Note
-    // that '.' (2E) is marked as legal even though it is
-    // not legal in IDL. This allows us to treat a fully
-    // qualified Java name with '.' package separators
-    // uniformly, and is safe because that is the only
-    // legal use of '.' in a Java name.
-
-    public static final RepositoryIdCache_1_3 cache = new RepositoryIdCache_1_3();
-    private static final byte[] IDL_IDENTIFIER_CHARS = {
-
-        // 0 1 2 3  4 5 6 7  8 9 a b  c d e f
-        0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 00-0f
-        0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 10-1f
-        0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,1,0, // 20-2f
-        1,1,1,1, 1,1,1,1, 1,1,0,0, 0,0,0,0, // 30-3f
-        0,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, // 40-4f
-        1,1,1,1, 1,1,1,1, 1,1,1,0, 0,0,0,1, // 50-5f
-        0,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, // 60-6f
-        1,1,1,1, 1,1,1,1, 1,1,1,0, 0,0,0,0, // 70-7f
-        0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 80-8f
-        0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // 90-9f
-        0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // a0-af
-        0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, // b0-bf
-        1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, // c0-cf
-        0,1,1,1, 1,1,1,0, 1,1,1,1, 1,0,0,1, // d0-df
-        1,1,1,1, 1,1,1,1, 1,1,1,1, 1,1,1,1, // e0-ef
-        0,1,1,1, 1,1,1,0, 1,1,1,1, 1,0,0,1, // f0-ff
-    };
-
-    private static String defaultServerURL = null;
-    private static boolean useCodebaseOnly = false;
-
-    static {
-        if (defaultServerURL == null)
-            defaultServerURL = (String)JDKBridge.getLocalCodebase();
-        useCodebaseOnly = JDKBridge.useCodebaseOnly();
-
-    }
-
-    private static IdentityHashtable classToRepStr = new IdentityHashtable();
-    private static IdentityHashtable classIDLToRepStr = new IdentityHashtable();
-    private static IdentityHashtable classSeqToRepStr = new IdentityHashtable();
-
-    private static IdentityHashtable repStrToByteArray = new IdentityHashtable();
-    private static Hashtable repStrToClass = new Hashtable();
-
-    private String repId = null;
-    private boolean isSupportedFormat = true;
-    private String typeString = null;
-    private String versionString = null;
-    private boolean isSequence = false;
-    private boolean isRMIValueType = false;
-    private boolean isIDLType = false;
-    private String completeClassName = null;
-    private String unqualifiedName = null;
-    private String definedInId = null;
-    private Class clazz = null;
-    private String suid = null, actualSuid = null;
-    private long suidLong = ObjectStreamClass.kDefaultUID, actualSuidLong = ObjectStreamClass.kDefaultUID;
-
-    // Repository ID fragments
-    private static final String kValuePrefix = "RMI:";
-    private static final String kIDLPrefix = "IDL:";
-    private static final String kIDLNamePrefix = "omg.org/";
-    private static final String kIDLClassnamePrefix = "org.omg.";
-    private static final String kSequencePrefix = "[";
-    private static final String kCORBAPrefix = "CORBA/";
-    private static final String kArrayPrefix = kValuePrefix + kSequencePrefix + kCORBAPrefix;
-    private static final int kValuePrefixLength = kValuePrefix.length();
-    private static final int kIDLPrefixLength = kIDLPrefix.length();
-    private static final int kSequencePrefixLength = kSequencePrefix.length();
-    private static final String kInterfaceHashCode = ":0000000000000000";
-    private static final String kInterfaceOnlyHashStr = "0000000000000000";
-    private static final String kExternalizableHashStr = "0000000000000001";
-
-    // Value tag utility methods and constants
-    public static final int kInitialValueTag= 0x7fffff00;
-    public static final int kNoTypeInfo = 0;
-    public static final int kSingleRepTypeInfo = 0x02;
-    public static final int  kPartialListTypeInfo = 0x06;
-    public static final int  kChunkedMask = 0x08;
-
-    // Public, well known repository IDs
-
-    // _REVISIT_ : A table structure with a good search routine for all of this
-    // would be more efficient and easier to maintain...
-
-    // String
-    public static final String kWStringValueVersion = "1.0";
-    public static final String kWStringValueHash = ":"+kWStringValueVersion;
-    public static final String kWStringStubValue = "WStringValue";
-    public static final String kWStringTypeStr = "omg.org/CORBA/"+kWStringStubValue;
-    public static final String kWStringValueRepID = kIDLPrefix + kWStringTypeStr + kWStringValueHash;
-
-    // Any
-    public static final String kAnyRepID = kIDLPrefix + "omg.org/CORBA/Any";
-
-    // Class
-    public static final String kClassDescValueHash = ":" + Long.toHexString(
-       ObjectStreamClass.getSerialVersionUID(javax.rmi.CORBA.ClassDesc.class));
-    public static final String kClassDescStubValue = "ClassDesc";
-    public static final String kClassDescTypeStr = "javax.rmi.CORBA."+kClassDescStubValue;
-    public static final String kClassDescValueRepID = kValuePrefix + kClassDescTypeStr + kClassDescValueHash;
-
-    // Object
-    public static final String kObjectValueHash = ":1.0";
-    public static final String kObjectStubValue = "Object";
-
-    // Sequence
-    public static final String kSequenceValueHash = ":1.0";
-    public static final String kPrimitiveSequenceValueHash = ":0000000000000000";
-
-    // Serializable
-    public static final String kSerializableValueHash = ":1.0";
-    public static final String kSerializableStubValue = "Serializable";
-
-    // Externalizable
-    public static final String kExternalizableValueHash = ":1.0";
-    public static final String kExternalizableStubValue = "Externalizable";
-
-    // Remote (The empty string is used for java.rmi.Remote)
-    public static final String kRemoteValueHash = "";
-    public static final String kRemoteStubValue = "";
-    public static final String kRemoteTypeStr = "";
-    public static final String kRemoteValueRepID = "";
-
-    private static final Hashtable kSpecialArrayTypeStrings = new Hashtable();
-
-    static {
-        kSpecialArrayTypeStrings.put("CORBA.WStringValue", new StringBuffer(java.lang.String.class.getName()));
-        kSpecialArrayTypeStrings.put("javax.rmi.CORBA.ClassDesc", new StringBuffer(java.lang.Class.class.getName()));
-        kSpecialArrayTypeStrings.put("CORBA.Object", new StringBuffer(java.rmi.Remote.class.getName()));
-
-    }
-
-    private static final Hashtable kSpecialCasesRepIDs = new Hashtable();
-
-    static {
-        kSpecialCasesRepIDs.put(java.lang.String.class, kWStringValueRepID);
-        kSpecialCasesRepIDs.put(java.lang.Class.class, kClassDescValueRepID);
-        kSpecialCasesRepIDs.put(java.rmi.Remote.class, kRemoteValueRepID);
-    }
-
-    private static final Hashtable kSpecialCasesStubValues = new Hashtable();
-
-    static {
-        kSpecialCasesStubValues.put(java.lang.String.class, kWStringStubValue);
-        kSpecialCasesStubValues.put(java.lang.Class.class, kClassDescStubValue);
-        kSpecialCasesStubValues.put(java.lang.Object.class, kObjectStubValue);
-        kSpecialCasesStubValues.put(java.io.Serializable.class, kSerializableStubValue);
-        kSpecialCasesStubValues.put(java.io.Externalizable.class, kExternalizableStubValue);
-        kSpecialCasesStubValues.put(java.rmi.Remote.class, kRemoteStubValue);
-    }
-
-
-    private static final Hashtable kSpecialCasesVersions = new Hashtable();
-
-    static {
-        kSpecialCasesVersions.put(java.lang.String.class, kWStringValueHash);
-        kSpecialCasesVersions.put(java.lang.Class.class, kClassDescValueHash);
-        kSpecialCasesVersions.put(java.lang.Object.class, kObjectValueHash);
-        kSpecialCasesVersions.put(java.io.Serializable.class, kSerializableValueHash);
-        kSpecialCasesVersions.put(java.io.Externalizable.class, kExternalizableValueHash);
-        kSpecialCasesVersions.put(java.rmi.Remote.class, kRemoteValueHash);
-    }
-
-    private static final Hashtable kSpecialCasesClasses = new Hashtable();
-
-    static {
-        kSpecialCasesClasses.put(kWStringTypeStr, java.lang.String.class);
-        kSpecialCasesClasses.put(kClassDescTypeStr, java.lang.Class.class);
-        kSpecialCasesClasses.put(kRemoteTypeStr, java.rmi.Remote.class);
-
-        kSpecialCasesClasses.put("org.omg.CORBA.WStringValue", java.lang.String.class);
-        kSpecialCasesClasses.put("javax.rmi.CORBA.ClassDesc", java.lang.Class.class);
-        //kSpecialCasesClasses.put(kRemoteTypeStr, java.rmi.Remote.class);
-    }
-
-    private static final Hashtable kSpecialCasesArrayPrefix = new Hashtable();
-
-    static {
-        kSpecialCasesArrayPrefix.put(java.lang.String.class, kValuePrefix + kSequencePrefix + kCORBAPrefix);
-        kSpecialCasesArrayPrefix.put(java.lang.Class.class, kValuePrefix + kSequencePrefix + "javax/rmi/CORBA/");
-        kSpecialCasesArrayPrefix.put(java.lang.Object.class, kValuePrefix + kSequencePrefix + "java/lang/");
-        kSpecialCasesArrayPrefix.put(java.io.Serializable.class, kValuePrefix + kSequencePrefix + "java/io/");
-        kSpecialCasesArrayPrefix.put(java.io.Externalizable.class, kValuePrefix + kSequencePrefix + "java/io/");
-        kSpecialCasesArrayPrefix.put(java.rmi.Remote.class, kValuePrefix + kSequencePrefix + kCORBAPrefix);
-    }
-
-    private static final Hashtable kSpecialPrimitives = new Hashtable();
-
-    static {
-        kSpecialPrimitives.put("int","long");
-        kSpecialPrimitives.put("long","longlong");
-        kSpecialPrimitives.put("byte","octet");
-    }
-
-    /**
-     * Used to convert ascii to hex.
-     */
-    private static final byte ASCII_HEX[] =     {
-        (byte)'0',
-        (byte)'1',
-        (byte)'2',
-        (byte)'3',
-        (byte)'4',
-        (byte)'5',
-        (byte)'6',
-        (byte)'7',
-        (byte)'8',
-        (byte)'9',
-        (byte)'A',
-        (byte)'B',
-        (byte)'C',
-        (byte)'D',
-        (byte)'E',
-        (byte)'F',
-    };
-
-
-    // Interface Rep ID Strings
-    public static final String kjava_rmi_Remote = createForAnyType(java.rmi.Remote.class);
-    public static final String korg_omg_CORBA_Object = createForAnyType(org.omg.CORBA.Object.class);
-
-    // Dummy arguments for getIdFromHelper method
-    public static final Class kNoParamTypes[] ={};
-    public static final Object kNoArgs[] = {};
-
-
-    RepositoryId_1_3(){}
-
-    RepositoryId_1_3(String aRepId){
-        init(aRepId);
-    }
-
-    RepositoryId_1_3 init(String aRepId){
-
-        this.repId = aRepId;
-
-        // Special case for remote
-        if (aRepId.length() == 0) {
-            clazz = java.rmi.Remote.class;
-            typeString = "";
-            isRMIValueType = true;
-            suid = kInterfaceOnlyHashStr;
-            return this;
-        }
-        else if (aRepId.equals(kWStringValueRepID)) {
-            clazz = java.lang.String.class;
-            typeString = kWStringTypeStr;
-            isIDLType = true;
-            versionString = kWStringValueVersion;
-            return this;
-        }
-        else {
-
-        String repId = convertFromISOLatin1(aRepId);
-
-        versionString = repId.substring(repId.indexOf(':', repId.indexOf(':')+1));
-        if (repId.startsWith(kIDLPrefix)) {
-            typeString =
-                repId.substring(kIDLPrefixLength, repId.indexOf(':', kIDLPrefixLength));
-            isIDLType = true;
-            if (typeString.startsWith(kIDLNamePrefix))
-                completeClassName = kIDLClassnamePrefix +
-                    typeString.substring(kIDLNamePrefix.length()).replace('/','.');
-            else completeClassName = typeString.replace('/','.');
-
-        }
-        else if (repId.startsWith(kValuePrefix)) {
-            typeString =
-                repId.substring(kValuePrefixLength, repId.indexOf(':', kValuePrefixLength));
-            isRMIValueType = true;
-
-            if (versionString.indexOf('.') == -1) {
-                    actualSuid = versionString.substring(1);
-                    suid = actualSuid;  // default if not explicitly specified
-
-                    if (actualSuid.indexOf(':') != -1){
-                    // we have a declared hash also
-                        int pos = actualSuid.indexOf(':')+1;
-                        // actualSuid = suid.substring(pos);
-                        // suid = suid.substring(0, pos-1);
-                        suid = actualSuid.substring(pos);
-                        actualSuid = actualSuid.substring(0, pos-1);
-                }
-
-            }
-            else {
-                    // _REVISIT_ : Special case version failure ?
-            }
-        }
-        else isSupportedFormat = false;
-
-        if (typeString.startsWith(kSequencePrefix)) {
-            isSequence = true;
-        }
-
-
-        return this;
-    }
-    }
-
-    public final String getUnqualifiedName() {
-        if (unqualifiedName == null){
-            String className = getClassName();
-            int index = (className != null) ? className.lastIndexOf('.') : -1;
-            if (index == -1){
-                unqualifiedName = className;
-                definedInId = "IDL::1.0";
-            }
-            else {
-                unqualifiedName = className.substring(index);
-                definedInId = "IDL:" + className.substring(0, index).replace('.','/') + ":1.0";
-            }
-        }
-
-        return unqualifiedName;
-    }
-
-    public final String getDefinedInId() {
-        if (definedInId == null){
-            getUnqualifiedName();
-        }
-
-        return definedInId;
-    }
-
-    public final String getTypeString() {
-        return typeString;
-    }
-
-    public final String getVersionString() {
-        return versionString;
-    }
-
-    public final String getSerialVersionUID() {
-        return suid;
-    }
-
-    public final String getActualSerialVersionUID() {
-        return actualSuid;
-    }
-    public final long getSerialVersionUIDAsLong() {
-        return suidLong;
-    }
-
-    public final long getActualSerialVersionUIDAsLong() {
-        return actualSuidLong;
-    }
-
-    public final boolean isRMIValueType() {
-        return isRMIValueType;
-    }
-
-    public final boolean isIDLType() {
-        return isIDLType;
-    }
-
-    public final String getRepositoryId() {
-        return repId;
-    }
-
-    public static byte[] getByteArray(String repStr) {
-        synchronized (repStrToByteArray){
-            return (byte[]) repStrToByteArray.get(repStr);
-        }
-    }
-
-    public static void setByteArray(String repStr, byte[] repStrBytes) {
-        synchronized (repStrToByteArray){
-            repStrToByteArray.put(repStr, repStrBytes);
-        }
-    }
-
-    public final boolean isSequence() {
-        return isSequence;
-    }
-
-    public final boolean isSupportedFormat() {
-        return isSupportedFormat;
-    }
-
-
-    // This method will return the classname from the typestring OR if the classname turns out to be
-    // a special class "pseudo" name, then the matching real classname is returned.
-    public final String getClassName() {
-
-        if (isRMIValueType)
-            return typeString;
-        else if (isIDLType)
-            return completeClassName;
-        else return null;
-
-    }
-
-    // This method calls getClazzFromType() and falls back to the repStrToClass
-    // cache if no class was found.  It's used where any class matching the
-    // given repid is an acceptable result.
-    public final Class getAnyClassFromType() throws ClassNotFoundException {
-        try {
-            return getClassFromType();
-        } catch (ClassNotFoundException cnfe) {
-            Class clz = (Class)repStrToClass.get(repId);
-            if (clz != null)
-                return clz;
-            else
-                throw cnfe;
-        }
-    }
-
-    public final Class getClassFromType()
-        throws ClassNotFoundException {
-        if (clazz != null)
-            return clazz;
-
-        Class specialCase = (Class)kSpecialCasesClasses.get(getClassName());
-
-        if (specialCase != null){
-            clazz = specialCase;
-            return specialCase;
-        }
-        else
-            {
-                try{
-                    return Util.loadClass(getClassName(), null, null);
-                }
-                catch(ClassNotFoundException cnfe){
-                    if (defaultServerURL != null) {
-                        try{
-                            return getClassFromType(defaultServerURL);
-                        }
-                        catch(MalformedURLException mue){
-                            throw cnfe;
-                        }
-                    }
-                    else throw cnfe;
-                }
-            }
-
-    }
-
-    public final Class getClassFromType(Class expectedType, String codebase)
-        throws ClassNotFoundException {
-        if (clazz != null)
-            return clazz;
-
-        Class specialCase = (Class)kSpecialCasesClasses.get(getClassName());
-
-        if (specialCase != null){
-            clazz = specialCase;
-            return specialCase;
-        } else {
-            ClassLoader expectedTypeClassLoader = (expectedType == null ? null : expectedType.getClassLoader());
-            return loadClassOfType(getClassName(),
-                                            codebase,
-                                            expectedTypeClassLoader,
-                                            expectedType,
-                                            expectedTypeClassLoader);
-        }
-
-    }
-
-    public final Class getClassFromType(String url)
-        throws ClassNotFoundException, MalformedURLException {
-        return Util.loadClass(getClassName(), url, null);
-    }
-