changeset 22557:1a1c5b99b152

Merge
author amurillo
date Wed, 05 Feb 2014 08:57:33 -0800
parents a17351e8c2c2 fae90cb64946
children 69d4b2a482eb ab191bdb1dc9
files jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.sh jdk/test/sun/tools/jcmd/jcmd-Defaults.sh jdk/test/sun/tools/jcmd/jcmd-big-script.sh jdk/test/sun/tools/jcmd/jcmd-f.sh jdk/test/sun/tools/jcmd/jcmd-help-help.sh jdk/test/sun/tools/jcmd/jcmd-help.sh jdk/test/sun/tools/jcmd/jcmd-pid.sh jdk/test/sun/tools/jcmd/jcmd_Output1.awk jdk/test/sun/tools/jcmd/jcmd_pid_Output1.awk jdk/test/sun/tools/jcmd/jcmd_pid_Output2.awk jdk/test/sun/tools/jmap/Basic.sh jdk/test/sun/tools/jstack/Basic.sh langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/activetitlebar.gif langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/activetitlebar_end.gif langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/background.gif langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/tab.gif langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/titlebar.gif langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/titlebar_end.gif langtools/test/tools/doclint/html/AAA.java langtools/test/tools/doclint/tidy/AAA.java langtools/test/tools/doclint/tool/AAA.java langtools/test/tools/javac/Capture.java langtools/test/tools/javac/Source5.java langtools/test/tools/javac/processing/warnings/gold_sv_warn_0_2.out langtools/test/tools/javac/processing/warnings/gold_sv_warn_2_3.out langtools/test/tools/javac/varargs/warning/Warn1.java make/scripts/hgforest.sh make/scripts/webrev.ksh nashorn/bin/jjs nashorn/bin/jjs.bat nashorn/bin/jjssecure nashorn/bin/jjssecure.bat nashorn/bin/nashorn nashorn/bin/nashorn.bat nashorn/bin/nashornsecure nashorn/bin/nashornsecure.bat
diffstat 945 files changed, 42882 insertions(+), 10304 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Thu Jan 30 14:01:45 2014 +0100
+++ b/.hgtags	Wed Feb 05 08:57:33 2014 -0800
@@ -243,3 +243,4 @@
 87b743b2263cc53955266411b7797b365a0fb050 jdk8-b119
 a1ee9743f4ee165eae59389a020f2552f895dac8 jdk8-b120
 13b877757b0b1c0d5813298df85364f41d7ba6fe jdk9-b00
+f130ca87de6637acae7d99fcd7a8573eea1cbaed jdk9-b01
--- a/.hgtags-top-repo	Thu Jan 30 14:01:45 2014 +0100
+++ b/.hgtags-top-repo	Wed Feb 05 08:57:33 2014 -0800
@@ -243,3 +243,4 @@
 9e90215673be68a3e77a9e444e4232076373734d jdk8-b119
 cd3825b2983045784d6fc6d1729c799b08215752 jdk8-b120
 1e1f86d5d4e22c15a9bf9f1581acddb8c59abae2 jdk9-b00
+50669e45cec4491de0d921d3118a3fe2e767020a jdk9-b01
--- a/common/autoconf/boot-jdk.m4	Thu Jan 30 14:01:45 2014 +0100
+++ b/common/autoconf/boot-jdk.m4	Wed Feb 05 08:57:33 2014 -0800
@@ -324,8 +324,6 @@
     fi
     # When is adding -client something that speeds up the JVM?
     # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
-    ADD_JVM_ARG_IF_OK([-XX:PermSize=32m],boot_jdk_jvmargs,[$JAVA])
-    ADD_JVM_ARG_IF_OK([-XX:MaxPermSize=160m],boot_jdk_jvmargs,[$JAVA])
     ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA])
     # Disable special log output when a debug build is used as Boot JDK...
     ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
--- a/common/autoconf/generated-configure.sh	Thu Jan 30 14:01:45 2014 +0100
+++ b/common/autoconf/generated-configure.sh	Wed Feb 05 08:57:33 2014 -0800
@@ -3865,7 +3865,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1389186094
+DATE_WHEN_GENERATED=1389815815
 
 ###############################################################################
 #
@@ -11156,6 +11156,12 @@
     as_fn_error $? "Update version must have a value" "$LINENO" 5
   elif test "x$with_update_version" != x; then
     JDK_UPDATE_VERSION="$with_update_version"
+    # On macosx 10.7, it's not possible to set --with-update-version=0X due
+    # to a bug in expr (which reduces it to just X). To work around this, we
+    # always add a 0 to one digit update versions.
+    if test "${#JDK_UPDATE_VERSION}" = "1"; then
+      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
+    fi
   fi
 
 
@@ -16068,36 +16074,6 @@
     # When is adding -client something that speeds up the JVM?
     # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
 
-  $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
-  $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
-  OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
-  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
-    JVM_ARG_OK=true
-  else
-    $ECHO "Arg failed:" >&5
-    $ECHO "$OUTPUT" >&5
-    JVM_ARG_OK=false
-  fi
-
-
-  $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
-  $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
-  OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
-  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
-  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
-  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
-    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
-    JVM_ARG_OK=true
-  else
-    $ECHO "Arg failed:" >&5
-    $ECHO "$OUTPUT" >&5
-    JVM_ARG_OK=false
-  fi
-
-
   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
@@ -20011,8 +19987,8 @@
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
 $as_echo "no, keeping CC" >&6; }
-    CC="$TEST_COMPILER"
-  fi
+  fi
+
 
   COMPILER=$CC
   COMPILER_NAME=$COMPILER_NAME
@@ -21590,8 +21566,8 @@
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
 $as_echo "no, keeping CXX" >&6; }
-    CXX="$TEST_COMPILER"
-  fi
+  fi
+
 
   COMPILER=$CXX
   COMPILER_NAME=$COMPILER_NAME
--- a/common/autoconf/jdk-options.m4	Thu Jan 30 14:01:45 2014 +0100
+++ b/common/autoconf/jdk-options.m4	Wed Feb 05 08:57:33 2014 -0800
@@ -105,7 +105,7 @@
   fi
 
   # Replace the commas with AND for use in the build directory name.
-  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
+  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
   COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
   if test "x$COUNT_VARIANTS" != "x,1"; then
     BUILDING_MULTIPLE_JVM_VARIANTS=yes
@@ -423,6 +423,12 @@
     AC_MSG_ERROR([Update version must have a value])
   elif test "x$with_update_version" != x; then
     JDK_UPDATE_VERSION="$with_update_version"
+    # On macosx 10.7, it's not possible to set --with-update-version=0X due
+    # to a bug in expr (which reduces it to just X). To work around this, we
+    # always add a 0 to one digit update versions.
+    if test "${#JDK_UPDATE_VERSION}" = "1"; then
+      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
+    fi
   fi
 
   AC_ARG_WITH(user-release-suffix, [AS_HELP_STRING([--with-user-release-suffix],
--- a/common/autoconf/toolchain.m4	Thu Jan 30 14:01:45 2014 +0100
+++ b/common/autoconf/toolchain.m4	Wed Feb 05 08:57:33 2014 -0800
@@ -166,8 +166,8 @@
     $1="$PROPER_COMPILER_$1"
   else
     AC_MSG_RESULT([no, keeping $1])
-    $1="$TEST_COMPILER"
   fi
+
   TOOLCHAIN_CHECK_COMPILER_VERSION([$1], [$COMPILER_NAME])
 ])
 
--- a/corba/.hgtags	Thu Jan 30 14:01:45 2014 +0100
+++ b/corba/.hgtags	Wed Feb 05 08:57:33 2014 -0800
@@ -243,3 +243,4 @@
 379fc7609beb7a3d85ebc0cc21a8a51c60d3c7d3 jdk8-b119
 53fd772d28c8a9f0f43adfc06f75f6b3cfa93cb5 jdk8-b120
 a7d3638deb2f4e33217b1ecf889479e90f9e5b50 jdk9-b00
+79a8136b18c1c6848f500088f5a4b39f262f082d jdk9-b01
--- a/corba/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/corba/src/share/classes/com/sun/corba/se/impl/corba/AnyImpl.java	Wed Feb 05 08:57:33 2014 -0800
@@ -82,11 +82,18 @@
             super((ORB)orb);
         }
 
-        public org.omg.CORBA.portable.InputStream create_input_stream()
-        {
-            return new AnyInputStream(
-                (com.sun.corba.se.impl.encoding.EncapsInputStream)
-                    super.create_input_stream());
+        public org.omg.CORBA.portable.InputStream create_input_stream() {
+            final org.omg.CORBA.portable.InputStream is = super
+                    .create_input_stream();
+            AnyInputStream aIS = AccessController
+                    .doPrivileged(new PrivilegedAction<AnyInputStream>() {
+                        @Override
+                        public AnyInputStream run() {
+                            return new AnyInputStream(
+                                    (com.sun.corba.se.impl.encoding.EncapsInputStream) is);
+                        }
+                    });
+            return aIS;
         }
     }
 
--- a/corba/src/share/classes/com/sun/corba/se/impl/encoding/EncapsInputStream.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/corba/src/share/classes/com/sun/corba/se/impl/encoding/EncapsInputStream.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,11 +36,10 @@
 import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
 
 import com.sun.corba.se.spi.orb.ORB;
-
 import com.sun.corba.se.spi.logging.CORBALogDomains;
-
 import com.sun.corba.se.impl.logging.ORBUtilSystemException;
 
+import sun.corba.EncapsInputStreamFactory;
 /**
  * Encapsulations are supposed to explicitly define their
  * code sets and GIOP version.  The original resolution to issue 2784
@@ -148,7 +147,7 @@
     }
 
     public CDRInputStream dup() {
-        return new EncapsInputStream(this);
+        return EncapsInputStreamFactory.newEncapsInputStream(this);
     }
 
     protected CodeSetConversion.BTCConverter createCharBTCConverter() {
--- a/corba/src/share/classes/com/sun/corba/se/impl/encoding/EncapsOutputStream.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/corba/src/share/classes/com/sun/corba/se/impl/encoding/EncapsOutputStream.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -39,6 +39,8 @@
 import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
 import com.sun.corba.se.impl.orbutil.ORBConstants;
 
+import sun.corba.EncapsInputStreamFactory;
+
 /**
  * Encapsulations are supposed to explicitly define their
  * code sets and GIOP version.  The original resolution to issue 2784
@@ -107,11 +109,11 @@
     public org.omg.CORBA.portable.InputStream create_input_stream() {
         freeInternalCaches();
 
-        return new EncapsInputStream(orb(),
-                                     getByteBuffer(),
-                                     getSize(),
-                                     isLittleEndian(),
-                                     getGIOPVersion());
+        return  EncapsInputStreamFactory.newEncapsInputStream(orb(),
+                getByteBuffer(),
+                getSize(),
+                isLittleEndian(),
+                getGIOPVersion());
     }
 
     protected CodeSetConversion.CTBConverter createCharCTBConverter() {
--- a/corba/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeInputStream.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/corba/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeInputStream.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -64,6 +64,8 @@
 import com.sun.corba.se.impl.encoding.CDROutputStream;
 import com.sun.corba.se.impl.encoding.MarshalInputStream;
 
+import sun.corba.EncapsInputStreamFactory;
+
 public class TypeCodeInputStream extends EncapsInputStream implements TypeCodeReader
 {
     private Map typeMap = null;
@@ -157,11 +159,13 @@
 
         // create an encapsulation using the marshal buffer
         if (is instanceof CDRInputStream) {
-            encap = new TypeCodeInputStream((ORB)_orb, encapBuffer, encapBuffer.length,
-                                            ((CDRInputStream)is).isLittleEndian(),
-                                            ((CDRInputStream)is).getGIOPVersion());
+            encap = EncapsInputStreamFactory.newTypeCodeInputStream((ORB) _orb,
+                    encapBuffer, encapBuffer.length,
+                    ((CDRInputStream) is).isLittleEndian(),
+                    ((CDRInputStream) is).getGIOPVersion());
         } else {
-            encap = new TypeCodeInputStream((ORB)_orb, encapBuffer, encapBuffer.length);
+            encap = EncapsInputStreamFactory.newTypeCodeInputStream((ORB) _orb,
+                    encapBuffer, encapBuffer.length);
         }
         encap.setEnclosingInputStream(is);
         encap.makeEncapsulation();
--- a/corba/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeOutputStream.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/corba/src/share/classes/com/sun/corba/se/impl/encoding/TypeCodeOutputStream.java	Wed Feb 05 08:57:33 2014 -0800
@@ -61,6 +61,8 @@
 import java.math.BigInteger;
 import java.nio.ByteBuffer;
 
+import sun.corba.EncapsInputStreamFactory;
+
 public final class TypeCodeOutputStream extends EncapsOutputStream
 {
     private OutputStream enclosure = null;
@@ -77,9 +79,9 @@
 
     public org.omg.CORBA.portable.InputStream create_input_stream()
     {
-        //return new TypeCodeInputStream((ORB)orb(), getByteBuffer(), getIndex(), isLittleEndian());
-        TypeCodeInputStream tcis
-            = new TypeCodeInputStream((ORB)orb(), getByteBuffer(), getIndex(), isLittleEndian(), getGIOPVersion());
+        TypeCodeInputStream tcis = EncapsInputStreamFactory
+                .newTypeCodeInputStream((ORB) orb(), getByteBuffer(),
+                        getIndex(), isLittleEndian(), getGIOPVersion());
         //if (TypeCodeImpl.debug) {
             //System.out.println("Created TypeCodeInputStream " + tcis + " with no parent");
             //tcis.printBuffer();
--- a/corba/src/share/classes/com/sun/corba/se/impl/interceptors/CDREncapsCodec.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/corba/src/share/classes/com/sun/corba/se/impl/interceptors/CDREncapsCodec.java	Wed Feb 05 08:57:33 2014 -0800
@@ -33,6 +33,8 @@
 import com.sun.corba.se.spi.ior.iiop.GIOPVersion;
 import com.sun.corba.se.spi.logging.CORBALogDomains;
 
+import sun.corba.EncapsInputStreamFactory;
+
 import com.sun.corba.se.impl.corba.AnyImpl;
 import com.sun.corba.se.impl.encoding.EncapsInputStream;
 import com.sun.corba.se.impl.encoding.EncapsOutputStream;
@@ -193,8 +195,9 @@
         // it is turned into a FormatMismatch exception.
 
         try {
-            EncapsInputStream cdrIn = new EncapsInputStream( orb, data,
-                data.length, giopVersion );
+            EncapsInputStream cdrIn = EncapsInputStreamFactory.newEncapsInputStream( orb, data,
+                    data.length, giopVersion );
+
 
             cdrIn.consumeEndian();
 
--- a/corba/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/corba/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java	Wed Feb 05 08:57:33 2014 -0800
@@ -370,7 +370,7 @@
      * @exception IOException Any of the usual Input/Output related exceptions.
      * @since     JDK1.1
      */
-    public final Object readObjectDelegate() throws IOException
+    public final synchronized Object readObjectDelegate() throws IOException
     {
         try {
 
@@ -389,7 +389,7 @@
             }
     }
 
-    final Object simpleReadObject(Class clz,
+    final synchronized Object simpleReadObject(Class clz,
                                   String repositoryID,
                                   com.sun.org.omg.SendingContext.CodeBase sender,
                                   int offset)
@@ -461,7 +461,7 @@
         return obj;
     }
 
-    public final void simpleSkipObject(String repositoryID,
+    public final synchronized  void simpleSkipObject(String repositoryID,
                                        com.sun.org.omg.SendingContext.CodeBase sender)
                                        /* throws OptionalDataException, ClassNotFoundException, IOException */
     {
@@ -559,7 +559,7 @@
      *              objects.
      * @since     JDK1.1
      */
-    public final void defaultReadObjectDelegate()
+    final synchronized void defaultReadObjectDelegate()
     /* throws IOException, ClassNotFoundException, NotActiveException */
     {
         try {
@@ -988,7 +988,7 @@
         }
     }
 
-    private Object inputObject(Class clz,
+    private synchronized Object inputObject(Class clz,
                                String repositoryID,
                                com.sun.org.omg.SendingContext.CodeBase sender,
                                int offset)
@@ -1317,7 +1317,7 @@
      * a form of custom marshaling.
      *
      */
-    private Object inputObjectUsingFVD(Class clz,
+    private synchronized Object inputObjectUsingFVD(Class clz,
                                        String repositoryID,
                                        com.sun.org.omg.SendingContext.CodeBase sender,
                                        int offset)
--- a/corba/src/share/classes/com/sun/corba/se/impl/io/InputStreamHook.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/corba/src/share/classes/com/sun/corba/se/impl/io/InputStreamHook.java	Wed Feb 05 08:57:33 2014 -0800
@@ -201,7 +201,7 @@
         readObjectState.endDefaultReadObject(this);
     }
 
-    public abstract void defaultReadObjectDelegate();
+    abstract void defaultReadObjectDelegate();
 
     abstract void readFields(java.util.Map fieldToValueMap)
         throws java.io.InvalidClassException, java.io.StreamCorruptedException,
--- a/corba/src/share/classes/com/sun/corba/se/impl/ior/EncapsulationUtility.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/corba/src/share/classes/com/sun/corba/se/impl/ior/EncapsulationUtility.java	Wed Feb 05 08:57:33 2014 -0800
@@ -47,6 +47,8 @@
 import com.sun.corba.se.impl.encoding.EncapsOutputStream ;
 import com.sun.corba.se.impl.encoding.EncapsInputStream ;
 
+import sun.corba.EncapsInputStreamFactory;
+
 /**
  * This static utility class contains various utility methods for reading and
  * writing CDR encapsulations.
@@ -108,8 +110,8 @@
     static public InputStream getEncapsulationStream( InputStream is )
     {
         byte[] data = readOctets( is ) ;
-        EncapsInputStream result = new EncapsInputStream( is.orb(), data,
-            data.length ) ;
+        EncapsInputStream result = EncapsInputStreamFactory.newEncapsInputStream( is.orb(), data,
+                data.length ) ;
         result.consumeEndian() ;
         return result ;
     }
--- a/corba/src/share/classes/com/sun/corba/se/impl/ior/ObjectKeyFactoryImpl.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/corba/src/share/classes/com/sun/corba/se/impl/ior/ObjectKeyFactoryImpl.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -49,6 +49,8 @@
 import com.sun.corba.se.impl.logging.IORSystemException ;
 
 import com.sun.corba.se.impl.encoding.EncapsInputStream ;
+import sun.corba.EncapsInputStreamFactory;
+
 
 /** Based on the magic and scid, return the appropriate
 * ObjectKeyTemplate.  Expects to be called with a valid
@@ -217,7 +219,7 @@
     public ObjectKey create( byte[] key )
     {
         OctetSeqHolder osh = new OctetSeqHolder() ;
-        EncapsInputStream is = new EncapsInputStream( orb, key, key.length ) ;
+        EncapsInputStream is = EncapsInputStreamFactory.newEncapsInputStream( orb, key, key.length );
 
         ObjectKeyTemplate oktemp = create( is, fullKey, osh ) ;
         if (oktemp == null)
--- a/corba/src/share/classes/com/sun/corba/se/impl/ior/iiop/IIOPProfileImpl.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/corba/src/share/classes/com/sun/corba/se/impl/ior/iiop/IIOPProfileImpl.java	Wed Feb 05 08:57:33 2014 -0800
@@ -70,6 +70,8 @@
 import com.sun.corba.se.impl.encoding.EncapsInputStream ;
 import com.sun.corba.se.impl.encoding.EncapsOutputStream ;
 
+import sun.corba.EncapsInputStreamFactory;
+
 import com.sun.corba.se.impl.util.JDKBridge;
 
 import com.sun.corba.se.impl.logging.IORSystemException;
@@ -170,8 +172,8 @@
             throw wrapper.invalidTaggedProfile() ;
         }
 
-        EncapsInputStream istr = new EncapsInputStream((ORB)orb, profile.profile_data,
-            profile.profile_data.length);
+        EncapsInputStream istr = EncapsInputStreamFactory.newEncapsInputStream((ORB)orb, profile.profile_data,
+                profile.profile_data.length);
         istr.consumeEndian();
         init( istr ) ;
     }
--- a/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryDynamicBase.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryDynamicBase.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013 Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
 
 package com.sun.corba.se.impl.presentation.rmi ;
 
+import java.io.SerializablePermission;
 import java.lang.reflect.InvocationHandler ;
 import java.lang.reflect.Proxy ;
 
@@ -38,11 +39,18 @@
 {
     protected final ClassLoader loader ;
 
-    public StubFactoryDynamicBase( PresentationManager.ClassData classData,
-        ClassLoader loader )
-    {
-        super( classData ) ;
+    private static Void checkPermission() {
+        SecurityManager sm = System.getSecurityManager();
+        if (sm != null) {
+            sm.checkPermission(new SerializablePermission(
+                    "enableSubclassImplementation"));
+        }
+        return null;
+    }
 
+    private StubFactoryDynamicBase(Void unused,
+            PresentationManager.ClassData classData, ClassLoader loader) {
+        super(classData);
         // this.loader must not be null, or the newProxyInstance call
         // will fail.
         if (loader == null) {
@@ -55,5 +63,11 @@
         }
     }
 
+    public StubFactoryDynamicBase( PresentationManager.ClassData classData,
+        ClassLoader loader )
+    {
+        this (checkPermission(), classData, loader);
+    }
+
     public abstract org.omg.CORBA.Object makeStub() ;
 }
--- a/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryFactoryProxyImpl.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/corba/src/share/classes/com/sun/corba/se/impl/presentation/rmi/StubFactoryFactoryProxyImpl.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,22 @@
 
 package com.sun.corba.se.impl.presentation.rmi;
 
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import com.sun.corba.se.spi.presentation.rmi.PresentationManager ;
 
 public class StubFactoryFactoryProxyImpl extends StubFactoryFactoryDynamicBase
 {
     public PresentationManager.StubFactory makeDynamicStubFactory(
-        PresentationManager pm, PresentationManager.ClassData classData,
-        ClassLoader classLoader )
+        PresentationManager pm, final PresentationManager.ClassData classData,
+        final ClassLoader classLoader )
     {
-        return new StubFactoryProxyImpl( classData, classLoader ) ;
+        return AccessController
+                .doPrivileged(new PrivilegedAction<StubFactoryProxyImpl>() {
+                    @Override
+                    public StubFactoryProxyImpl run() {
+                        return new StubFactoryProxyImpl(classData, classLoader);
+                    }
+                });
     }
 }
--- a/corba/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/corba/src/share/classes/com/sun/corba/se/impl/protocol/CorbaClientRequestDispatcherImpl.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -115,6 +115,7 @@
 
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.ConcurrentHashMap;
+import sun.corba.EncapsInputStreamFactory;
 
 /**
  * ClientDelegate is the RMI client-side subcontract or representation
@@ -847,8 +848,8 @@
         }
         byte[] data = ((UnknownServiceContext)sc).getData();
         EncapsInputStream in =
-            new EncapsInputStream((ORB)messageMediator.getBroker(),
-                                  data, data.length);
+                EncapsInputStreamFactory.newEncapsInputStream((ORB)messageMediator.getBroker(),
+                                      data, data.length);
         in.consumeEndian();
 
         String msg =
--- a/corba/src/share/classes/com/sun/corba/se/impl/protocol/SharedCDRClientRequestDispatcherImpl.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/corba/src/share/classes/com/sun/corba/se/impl/protocol/SharedCDRClientRequestDispatcherImpl.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,8 @@
 import java.util.Iterator;
 import java.rmi.RemoteException;
 import java.nio.ByteBuffer;
-
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import javax.rmi.CORBA.Util;
 import javax.rmi.CORBA.Tie;
 
@@ -111,6 +112,7 @@
 import com.sun.corba.se.impl.protocol.giopmsgheaders.ProfileAddr;
 import com.sun.corba.se.impl.protocol.giopmsgheaders.ReferenceAddr;
 import com.sun.corba.se.impl.transport.CorbaContactInfoListIteratorImpl;
+import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
 import com.sun.corba.se.impl.util.JDKBridge;
 
 /**
@@ -156,10 +158,17 @@
 
         ByteBufferWithInfo bbwi = cdrOutputObject.getByteBufferWithInfo();
         cdrOutputObject.getMessageHeader().setSize(bbwi.byteBuffer, bbwi.getSize());
-
-        CDRInputObject cdrInputObject =
-            new CDRInputObject(orb, null, bbwi.byteBuffer,
-                               cdrOutputObject.getMessageHeader());
+        final ORB inOrb = orb;
+        final ByteBuffer inBuffer = bbwi.byteBuffer;
+        final Message inMsg = cdrOutputObject.getMessageHeader();
+        CDRInputObject cdrInputObject = AccessController
+                .doPrivileged(new PrivilegedAction<CDRInputObject>() {
+                    @Override
+                    public CDRInputObject run() {
+                        return new CDRInputObject(inOrb, null, inBuffer,
+                                inMsg);
+                    }
+                });
         messageMediator.setInputObject(cdrInputObject);
         cdrInputObject.setMessageMediator(messageMediator);
 
@@ -192,9 +201,17 @@
         cdrOutputObject = (CDROutputObject) messageMediator.getOutputObject();
         bbwi = cdrOutputObject.getByteBufferWithInfo();
         cdrOutputObject.getMessageHeader().setSize(bbwi.byteBuffer, bbwi.getSize());
-        cdrInputObject =
-            new CDRInputObject(orb, null, bbwi.byteBuffer,
-                               cdrOutputObject.getMessageHeader());
+        final ORB inOrb2 = orb;
+        final ByteBuffer inBuffer2 = bbwi.byteBuffer;
+        final Message inMsg2 = cdrOutputObject.getMessageHeader();
+        cdrInputObject = AccessController
+                .doPrivileged(new PrivilegedAction<CDRInputObject>() {
+                    @Override
+                    public CDRInputObject run() {
+                        return new CDRInputObject(inOrb2, null, inBuffer2,
+                                inMsg2);
+                    }
+                });
         messageMediator.setInputObject(cdrInputObject);
         cdrInputObject.setMessageMediator(messageMediator);
 
--- a/corba/src/share/classes/com/sun/corba/se/impl/resolver/INSURLOperationImpl.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/corba/src/share/classes/com/sun/corba/se/impl/resolver/INSURLOperationImpl.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,6 +36,8 @@
 import org.omg.CosNaming.NamingContextExt ;
 import org.omg.CosNaming.NamingContextExtHelper ;
 
+import sun.corba.EncapsInputStreamFactory;
+
 import com.sun.corba.se.spi.ior.IOR;
 import com.sun.corba.se.spi.ior.IORTemplate;
 import com.sun.corba.se.spi.ior.ObjectKey;
@@ -114,8 +116,8 @@
              buf[j] = (byte)((ORBUtility.hexOf(str.charAt(i)) << UN_SHIFT) & 0xF0);
              buf[j] |= (byte)(ORBUtility.hexOf(str.charAt(i+1)) & 0x0F);
         }
-        EncapsInputStream s = new EncapsInputStream(orb, buf, buf.length,
-            orb.getORBData().getGIOPVersion());
+        EncapsInputStream s = EncapsInputStreamFactory.newEncapsInputStream(orb, buf, buf.length,
+                orb.getORBData().getGIOPVersion());
         s.consumeEndian();
         return s.read_Object() ;
     }
--- a/corba/src/share/classes/com/sun/corba/se/spi/servicecontext/ServiceContexts.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/corba/src/share/classes/com/sun/corba/se/spi/servicecontext/ServiceContexts.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -58,6 +58,9 @@
 import com.sun.corba.se.impl.util.Utility ;
 import com.sun.corba.se.impl.logging.ORBUtilSystemException ;
 
+import sun.corba.EncapsInputStreamFactory;
+
+
 public class ServiceContexts {
     private static boolean isDebugging( OutputStream os )
     {
@@ -198,11 +201,11 @@
             // Note:  As of Jan 2001, no standard OMG or Sun service contexts
             // ship wchar data or are defined as using anything but GIOP 1.0 CDR.
             EncapsInputStream eis
-                = new EncapsInputStream(orb,
-                                        data,
-                                        data.length,
-                                        giopVersion,
-                                        codeBase);
+                = EncapsInputStreamFactory.newEncapsInputStream(orb,
+                                    data,
+                                    data.length,
+                                    giopVersion,
+                                    codeBase);
             eis.consumeEndian();
 
             // Now the input stream passed to a ServiceContext
--- a/corba/src/share/classes/org/omg/CORBA_2_3/portable/InputStream.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/corba/src/share/classes/org/omg/CORBA_2_3/portable/InputStream.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,10 @@
 
 package org.omg.CORBA_2_3.portable;
 
+import java.io.SerializablePermission;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
 /**
  * InputStream provides for the reading of all of the mapped IDL types
  * from the stream. It extends org.omg.CORBA.portable.InputStream.  This
@@ -43,6 +47,43 @@
 
 public abstract class InputStream extends org.omg.CORBA.portable.InputStream {
 
+
+    private static final String ALLOW_SUBCLASS_PROP = "jdk.corba.allowInputStreamSubclass";
+
+    private static final boolean allowSubclass = AccessController.doPrivileged(
+        new PrivilegedAction<Boolean>() {
+            @Override
+            public Boolean run() {
+            String prop = System.getProperty(ALLOW_SUBCLASS_PROP);
+                return prop == null ? false :
+                           (prop.equalsIgnoreCase("false") ? false : true);
+            }
+        });
+
+    private static Void checkPermission() {
+        SecurityManager sm = System.getSecurityManager();
+        if (sm != null) {
+            if (!allowSubclass)
+                sm.checkPermission(new
+                    SerializablePermission("enableSubclassImplementation"));
+        }
+        return null;
+    }
+
+    private InputStream(Void ignore) { }
+
+    /**
+     * Create a new instance of this class.
+     *
+     * throw SecurityException if SecurityManager is installed and
+     * enableSubclassImplementation SerializablePermission
+     * is not granted or jdk.corba.allowOutputStreamSubclass system
+     * property is either not set or is set to 'false'
+     */
+    public InputStream() {
+        this(checkPermission());
+    }
+
     /**
      * Unmarshalls a value type from the input stream.
      * @return the value type unmarshalled from the input stream
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/corba/src/share/classes/sun/corba/EncapsInputStreamFactory.java	Wed Feb 05 08:57:33 2014 -0800
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package sun.corba;
+
+import java.nio.ByteBuffer;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+
+import com.sun.corba.se.impl.encoding.EncapsInputStream;
+import com.sun.corba.se.impl.encoding.TypeCodeInputStream;
+import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
+import com.sun.corba.se.pept.protocol.MessageMediator;
+import com.sun.corba.se.spi.ior.iiop.GIOPVersion;
+import com.sun.corba.se.spi.orb.ORB;
+import com.sun.org.omg.SendingContext.CodeBase;
+
+public class EncapsInputStreamFactory {
+
+    public static EncapsInputStream newEncapsInputStream(
+            final org.omg.CORBA.ORB orb, final byte[] buf, final int size,
+            final boolean littleEndian, final GIOPVersion version) {
+        return AccessController
+                .doPrivileged(new PrivilegedAction<EncapsInputStream>() {
+                    @Override
+                    public EncapsInputStream run() {
+                        return new EncapsInputStream(orb, buf, size,
+                                littleEndian, version);
+                    }
+                });
+    }
+
+    public static EncapsInputStream newEncapsInputStream(
+            final org.omg.CORBA.ORB orb, final ByteBuffer byteBuffer,
+            final int size, final boolean littleEndian,
+            final GIOPVersion version) {
+        return AccessController
+                .doPrivileged(new PrivilegedAction<EncapsInputStream>() {
+                    @Override
+                    public EncapsInputStream run() {
+                        return new EncapsInputStream(orb, byteBuffer, size,
+                                littleEndian, version);
+                    }
+                });
+    }
+
+    public static EncapsInputStream newEncapsInputStream(
+            final org.omg.CORBA.ORB orb, final byte[] data, final int size) {
+        return AccessController
+                .doPrivileged(new PrivilegedAction<EncapsInputStream>() {
+                    @Override
+                    public EncapsInputStream run() {
+                        return new EncapsInputStream(orb, data, size);
+                    }
+                });
+    }
+
+    public static EncapsInputStream newEncapsInputStream(
+            final EncapsInputStream eis) {
+        return AccessController
+                .doPrivileged(new PrivilegedAction<EncapsInputStream>() {
+                    @Override
+                    public EncapsInputStream run() {
+                        return new EncapsInputStream(eis);
+                    }
+                });
+    }
+
+    public static EncapsInputStream newEncapsInputStream(
+            final org.omg.CORBA.ORB orb, final byte[] data, final int size,
+            final GIOPVersion version) {
+        return AccessController
+                .doPrivileged(new PrivilegedAction<EncapsInputStream>() {
+                    @Override
+                    public EncapsInputStream run() {
+                        return new EncapsInputStream(orb, data, size, version);
+                    }
+                });
+    }
+
+    public static EncapsInputStream newEncapsInputStream(
+            final org.omg.CORBA.ORB orb, final byte[] data, final int size,
+            final GIOPVersion version, final CodeBase codeBase) {
+        return AccessController
+                .doPrivileged(new PrivilegedAction<EncapsInputStream>() {
+                    @Override
+                    public EncapsInputStream run() {
+                        return new EncapsInputStream(orb, data, size, version,
+                                codeBase);
+                    }
+                });
+    }
+
+    public static TypeCodeInputStream newTypeCodeInputStream(
+            final org.omg.CORBA.ORB orb, final byte[] buf, final int size,
+            final boolean littleEndian, final GIOPVersion version) {
+        return AccessController
+                .doPrivileged(new PrivilegedAction<TypeCodeInputStream>() {
+                    @Override
+                    public TypeCodeInputStream run() {
+                        return new TypeCodeInputStream(orb, buf, size,
+                                littleEndian, version);
+                    }
+                });
+    }
+
+    public static TypeCodeInputStream newTypeCodeInputStream(
+            final org.omg.CORBA.ORB orb, final ByteBuffer byteBuffer,
+            final int size, final boolean littleEndian,
+            final GIOPVersion version) {
+        return AccessController
+                .doPrivileged(new PrivilegedAction<TypeCodeInputStream>() {
+                    @Override
+                    public TypeCodeInputStream run() {
+                        return new TypeCodeInputStream(orb, byteBuffer, size,
+                                littleEndian, version);
+                    }
+                });
+    }
+
+    public static TypeCodeInputStream newTypeCodeInputStream(
+            final org.omg.CORBA.ORB orb, final byte[] data, final int size) {
+        return AccessController
+                .doPrivileged(new PrivilegedAction<TypeCodeInputStream>() {
+                    @Override
+                    public TypeCodeInputStream run() {
+                        return new TypeCodeInputStream(orb, data, size);
+                    }
+                });
+    }
+}
--- a/hotspot/.hgtags	Thu Jan 30 14:01:45 2014 +0100
+++ b/hotspot/.hgtags	Wed Feb 05 08:57:33 2014 -0800
@@ -403,3 +403,4 @@
 05fedd51e40da22c9460bf17c7185889e435db3d hs25-b62
 fca262db9c4309f99d2f5542ab0780e45c2f1578 jdk8-b120
 ce2d7e46f3c7e41241f3b407705a4071323a11ab jdk9-b00
+050a626a88951140df874f7b163e304d07b6c296 jdk9-b01
--- a/jaxp/.hgtags	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxp/.hgtags	Wed Feb 05 08:57:33 2014 -0800
@@ -243,3 +243,4 @@
 69a930376c70beb9877970128bad0f04cb0c6eb1 jdk8-b119
 64d8b228a72cf9082b1a9a881c81188ccffde234 jdk8-b120
 4045edd35e8ba73bfdc23ce8961b9640d4145fe5 jdk9-b00
+e5256f530a9b5f2d677ca245de44a617ffb58f52 jdk9-b01
--- a/jaxp/src/com/sun/org/apache/xalan/internal/XalanConstants.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/XalanConstants.java	Wed Feb 05 08:57:33 2014 -0800
@@ -79,7 +79,7 @@
     /**
      * JDK maximum general entity size limit
      */
-    public static final String JDK_GENEAL_ENTITY_SIZE_LIMIT =
+    public static final String JDK_GENERAL_ENTITY_SIZE_LIMIT =
             ORACLE_JAXP_PROPERTY_PREFIX + "maxGeneralEntitySizeLimit";
     /**
      * JDK maximum parameter entity size limit
@@ -129,7 +129,7 @@
     /**
      * JDK maximum general entity size limit
      */
-    public static final String SP_GENEAL_ENTITY_SIZE_LIMIT = "jdk.xml.maxGeneralEntitySizeLimit";
+    public static final String SP_GENERAL_ENTITY_SIZE_LIMIT = "jdk.xml.maxGeneralEntitySizeLimit";
     /**
      * JDK maximum parameter entity size limit
      */
--- a/jaxp/src/com/sun/org/apache/xalan/internal/lib/ExsltStrings.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/lib/ExsltStrings.java	Wed Feb 05 08:57:33 2014 -0800
@@ -52,6 +52,8 @@
  */
 public class ExsltStrings extends ExsltBase
 {
+   static final String JDK_DEFAULT_DOM = "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl";
+
   /**
    * The str:align function aligns a string within another string.
    * <p>
@@ -225,7 +227,7 @@
         token = str.substring(fromIndex);
       }
 
-      Document doc = DocumentHolder.m_doc;
+      Document doc = getDocument();
       synchronized (doc)
       {
         Element element = doc.createElement("token");
@@ -289,7 +291,7 @@
     {
       StringTokenizer lTokenizer = new StringTokenizer(toTokenize, delims);
 
-      Document doc = DocumentHolder.m_doc;
+      Document doc = getDocument();
       synchronized (doc)
       {
         while (lTokenizer.hasMoreTokens())
@@ -305,7 +307,7 @@
     else
     {
 
-      Document doc = DocumentHolder.m_doc;
+      Document doc = getDocument();
       synchronized (doc)
       {
         for (int i = 0; i < toTokenize.length(); i++)
@@ -327,31 +329,23 @@
   {
     return tokenize(toTokenize, " \t\n\r");
   }
+
     /**
-     * This class is not loaded until first referenced (see Java Language
-     * Specification by Gosling/Joy/Steele, section 12.4.1)
-     *
-     * The static members are created when this class is first referenced, as a
-     * lazy initialization not needing checking against null or any
-     * synchronization.
-     *
+   * @return an instance of DOM Document
      */
-    private static class DocumentHolder
-    {
-        // Reuse the Document object to reduce memory usage.
-        private static final Document m_doc;
-        static {
-            try
-            {
-                m_doc =DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+   private static Document getDocument()
+   {
+        try
+        {
+            if (System.getSecurityManager() == null) {
+                return DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+            } else {
+                return DocumentBuilderFactory.newInstance(JDK_DEFAULT_DOM, null).newDocumentBuilder().newDocument();
             }
-
-            catch(ParserConfigurationException pce)
-            {
-                  throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce);
-            }
-
+        }
+        catch(ParserConfigurationException pce)
+        {
+            throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce);
         }
     }
-
 }
--- a/jaxp/src/com/sun/org/apache/xalan/internal/lib/Extensions.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/lib/Extensions.java	Wed Feb 05 08:57:33 2014 -0800
@@ -56,6 +56,7 @@
  */
 public class Extensions
 {
+    static final String JDK_DEFAULT_DOM = "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl";
   /**
    * Constructor Extensions
    *
@@ -114,23 +115,14 @@
 
       // This no longer will work right since the DTM.
       // Document myDoc = myProcessor.getContextNode().getOwnerDocument();
-      try
-      {
-        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-        DocumentBuilder db = dbf.newDocumentBuilder();
-        Document myDoc = db.newDocument();
+      Document myDoc = getDocument();
 
         Text textNode = myDoc.createTextNode(textNodeValue);
         DocumentFragment docFrag = myDoc.createDocumentFragment();
 
         docFrag.appendChild(textNode);
 
-        return new NodeSet(docFrag);
-      }
-      catch(ParserConfigurationException pce)
-      {
-        throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce);
-      }
+      return new NodeSet(docFrag);
     }
   }
 
@@ -249,8 +241,7 @@
   public static NodeList tokenize(String toTokenize, String delims)
   {
 
-    Document doc = DocumentHolder.m_doc;
-
+    Document doc = getDocument();
 
     StringTokenizer lTokenizer = new StringTokenizer(toTokenize, delims);
     NodeSet resultSet = new NodeSet();
@@ -308,17 +299,7 @@
   public static Node checkEnvironment(ExpressionContext myContext)
   {
 
-    Document factoryDocument;
-    try
-    {
-      DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-      DocumentBuilder db = dbf.newDocumentBuilder();
-      factoryDocument = db.newDocument();
-    }
-    catch(ParserConfigurationException pce)
-    {
-      throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce);
-    }
+    Document factoryDocument = getDocument();
 
     Node resultNode = null;
     try
@@ -391,30 +372,21 @@
   }
 
     /**
-     * This class is not loaded until first referenced (see Java Language
-     * Specification by Gosling/Joy/Steele, section 12.4.1)
-     *
-     * The static members are created when this class is first referenced, as a
-     * lazy initialization not needing checking against null or any
-     * synchronization.
-     *
+   * @return an instance of DOM Document
      */
-    private static class DocumentHolder
-    {
-        // Reuse the Document object to reduce memory usage.
-        private static final Document m_doc;
-        static
+   private static Document getDocument()
+   {
+        try
         {
-            try
-            {
-                m_doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+            if (System.getSecurityManager() == null) {
+                return DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+            } else {
+                return DocumentBuilderFactory.newInstance(JDK_DEFAULT_DOM, null).newDocumentBuilder().newDocument();
             }
-
-            catch(ParserConfigurationException pce)
-            {
-                  throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce);
-            }
-
+        }
+        catch(ParserConfigurationException pce)
+        {
+            throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(pce);
         }
     }
 }
--- a/jaxp/src/com/sun/org/apache/xalan/internal/utils/XMLSecurityManager.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxp/src/com/sun/org/apache/xalan/internal/utils/XMLSecurityManager.java	Wed Feb 05 08:57:33 2014 -0800
@@ -73,8 +73,8 @@
                 XalanConstants.SP_ELEMENT_ATTRIBUTE_LIMIT, 0, 10000),
         TOTAL_ENTITY_SIZE_LIMIT(XalanConstants.JDK_TOTAL_ENTITY_SIZE_LIMIT,
                 XalanConstants.SP_TOTAL_ENTITY_SIZE_LIMIT, 0, 50000000),
-        GENEAL_ENTITY_SIZE_LIMIT(XalanConstants.JDK_GENEAL_ENTITY_SIZE_LIMIT,
-                XalanConstants.SP_GENEAL_ENTITY_SIZE_LIMIT, 0, 0),
+        GENERAL_ENTITY_SIZE_LIMIT(XalanConstants.JDK_GENERAL_ENTITY_SIZE_LIMIT,
+                XalanConstants.SP_GENERAL_ENTITY_SIZE_LIMIT, 0, 0),
         PARAMETER_ENTITY_SIZE_LIMIT(XalanConstants.JDK_PARAMETER_ENTITY_SIZE_LIMIT,
                 XalanConstants.SP_PARAMETER_ENTITY_SIZE_LIMIT, 0, 1000000);
 
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/Constants.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/Constants.java	Wed Feb 05 08:57:33 2014 -0800
@@ -240,7 +240,7 @@
     /**
      * JDK maximum general entity size limit
      */
-    public static final String JDK_GENEAL_ENTITY_SIZE_LIMIT =
+    public static final String JDK_GENERAL_ENTITY_SIZE_LIMIT =
             ORACLE_JAXP_PROPERTY_PREFIX + "maxGeneralEntitySizeLimit";
     /**
      * JDK maximum parameter entity size limit
@@ -287,7 +287,7 @@
     /**
      * JDK maximum general entity size limit
      */
-    public static final String SP_GENEAL_ENTITY_SIZE_LIMIT = "jdk.xml.maxGeneralEntitySizeLimit";
+    public static final String SP_GENERAL_ENTITY_SIZE_LIMIT = "jdk.xml.maxGeneralEntitySizeLimit";
     /**
      * JDK maximum parameter entity size limit
      */
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java	Wed Feb 05 08:57:33 2014 -0800
@@ -44,6 +44,7 @@
 import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter;
 import com.sun.org.apache.xerces.internal.impl.XMLEntityHandler;
 import com.sun.org.apache.xerces.internal.impl.Constants;
+import com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer;
 import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager;
 import com.sun.xml.internal.stream.Entity;
 
@@ -262,6 +263,11 @@
         fEntityManager.startDTDEntity(inputSource);
     } // setInputSource(XMLInputSource)
 
+
+    public void setLimitAnalyzer(XMLLimitAnalyzer limitAnalyzer) {
+        fLimitAnalyzer = limitAnalyzer;
+    }
+
     /**
      * Scans the external subset of the document.
      *
@@ -1625,10 +1631,10 @@
         XMLString literal = fString;
         XMLString literal2 = fString;
         int countChar = 0;
-        if (fLimitAnalyzer == null && fSecurityManager != null) {
-            fLimitAnalyzer = fSecurityManager.getLimitAnalyzer();
-            fLimitAnalyzer.startEntity(entityName);
-        }
+        if (fLimitAnalyzer == null ) {
+            fLimitAnalyzer = new XMLLimitAnalyzer();
+         }
+        fLimitAnalyzer.startEntity(entityName);
 
         if (fEntityScanner.scanLiteral(quote, fString) != quote) {
             fStringBuffer.clear();
@@ -2145,6 +2151,8 @@
         // set starting state
         setScannerState(SCANNER_STATE_TEXT_DECL);
         //new SymbolTable());
+
+        fLimitAnalyzer = new XMLLimitAnalyzer();
     }
 
     /**
@@ -2164,18 +2172,18 @@
      */
     private void checkLimit(String entityName, int len) {
         if (fLimitAnalyzer == null) {
-            fLimitAnalyzer = fSecurityManager.getLimitAnalyzer();
+            fLimitAnalyzer = new XMLLimitAnalyzer();
         }
         fLimitAnalyzer.addValue(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT, entityName, len);
-        if (fSecurityManager.isOverLimit(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT)) {
-                    fSecurityManager.debugPrint();
+        if (fSecurityManager.isOverLimit(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT, fLimitAnalyzer)) {
+                    fSecurityManager.debugPrint(fLimitAnalyzer);
             reportFatalError("MaxEntitySizeLimit", new Object[]{entityName,
                 fLimitAnalyzer.getValue(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT),
                 fSecurityManager.getLimit(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT),
                 fSecurityManager.getStateLiteral(XMLSecurityManager.Limit.PARAMETER_ENTITY_SIZE_LIMIT)});
         }
-        if (fSecurityManager.isOverLimit(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT)) {
-            fSecurityManager.debugPrint();
+        if (fSecurityManager.isOverLimit(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT, fLimitAnalyzer)) {
+            fSecurityManager.debugPrint(fLimitAnalyzer);
             reportFatalError("TotalEntitySizeLimit",
                 new Object[]{fLimitAnalyzer.getTotalValue(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT),
                 fSecurityManager.getLimit(XMLSecurityManager.Limit.TOTAL_ENTITY_SIZE_LIMIT),
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java	Wed Feb 05 08:57:33 2014 -0800
@@ -659,12 +659,12 @@
         dtdGrammarUtil = null;
 
         if (fSecurityManager != null) {
-            fLimitAnalyzer = fSecurityManager.getLimitAnalyzer();
             fElementAttributeLimit = fSecurityManager.getLimit(XMLSecurityManager.Limit.ELEMENT_ATTRIBUTE_LIMIT);
         } else {
-            fLimitAnalyzer = null;
             fElementAttributeLimit = 0;
         }
+        fLimitAnalyzer = new XMLLimitAnalyzer();
+        fEntityManager.setLimitAnalyzer(fLimitAnalyzer);
     }
 
     /**
@@ -3154,16 +3154,16 @@
          */
         protected void checkLimit(XMLStringBuffer buffer) {
             if (fLimitAnalyzer.isTracking(fCurrentEntityName)) {
-                fLimitAnalyzer.addValue(Limit.GENEAL_ENTITY_SIZE_LIMIT, fCurrentEntityName, buffer.length);
-                if (fSecurityManager.isOverLimit(Limit.GENEAL_ENTITY_SIZE_LIMIT)) {
-                    fSecurityManager.debugPrint();
+                fLimitAnalyzer.addValue(Limit.GENERAL_ENTITY_SIZE_LIMIT, fCurrentEntityName, buffer.length);
+                if (fSecurityManager.isOverLimit(Limit.GENERAL_ENTITY_SIZE_LIMIT, fLimitAnalyzer)) {
+                    fSecurityManager.debugPrint(fLimitAnalyzer);
                     reportFatalError("MaxEntitySizeLimit", new Object[]{fCurrentEntityName,
-                        fLimitAnalyzer.getValue(Limit.GENEAL_ENTITY_SIZE_LIMIT),
-                        fSecurityManager.getLimit(Limit.GENEAL_ENTITY_SIZE_LIMIT),
-                        fSecurityManager.getStateLiteral(Limit.GENEAL_ENTITY_SIZE_LIMIT)});
+                        fLimitAnalyzer.getValue(Limit.GENERAL_ENTITY_SIZE_LIMIT),
+                        fSecurityManager.getLimit(Limit.GENERAL_ENTITY_SIZE_LIMIT),
+                        fSecurityManager.getStateLiteral(Limit.GENERAL_ENTITY_SIZE_LIMIT)});
                 }
-                if (fSecurityManager.isOverLimit(Limit.TOTAL_ENTITY_SIZE_LIMIT)) {
-                    fSecurityManager.debugPrint();
+                if (fSecurityManager.isOverLimit(Limit.TOTAL_ENTITY_SIZE_LIMIT, fLimitAnalyzer)) {
+                    fSecurityManager.debugPrint(fLimitAnalyzer);
                     reportFatalError("TotalEntitySizeLimit",
                         new Object[]{fLimitAnalyzer.getTotalValue(Limit.TOTAL_ENTITY_SIZE_LIMIT),
                         fSecurityManager.getLimit(Limit.TOTAL_ENTITY_SIZE_LIMIT),
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1090,6 +1090,8 @@
 
                     ((XMLDTDScannerImpl)fDTDScanner).reset(fPropertyManager);
                 }
+
+                fDTDScanner.setLimitAnalyzer(fLimitAnalyzer);
                 do {
                     again = false;
                     switch (fScannerState) {
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1300,8 +1300,8 @@
         if(fLimitAnalyzer != null) {
            fLimitAnalyzer.addValue(entityExpansionIndex, name, 1);
         }
-        if( fSecurityManager != null && fSecurityManager.isOverLimit(entityExpansionIndex)){
-            fSecurityManager.debugPrint();
+        if( fSecurityManager != null && fSecurityManager.isOverLimit(entityExpansionIndex, fLimitAnalyzer)){
+            fSecurityManager.debugPrint(fLimitAnalyzer);
             fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,"EntityExpansionLimitExceeded",
                     new Object[]{fSecurityManager.getLimitValueByIndex(entityExpansionIndex)},
                                              XMLErrorReporter.SEVERITY_FATAL_ERROR );
@@ -1368,9 +1368,9 @@
             //close the reader
             try{
                 if (fLimitAnalyzer != null) {
-                    fLimitAnalyzer.endEntity(XMLSecurityManager.Limit.GENEAL_ENTITY_SIZE_LIMIT, fCurrentEntity.name);
+                    fLimitAnalyzer.endEntity(XMLSecurityManager.Limit.GENERAL_ENTITY_SIZE_LIMIT, fCurrentEntity.name);
                     if (fCurrentEntity.name.equals("[xml]")) {
-                        fSecurityManager.debugPrint();
+                        fSecurityManager.debugPrint(fLimitAnalyzer);
                     }
                 }
                 fCurrentEntity.close();
@@ -1439,7 +1439,6 @@
         fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD);
 
         fSecurityManager = (XMLSecurityManager)propertyManager.getProperty(SECURITY_MANAGER);
-        fLimitAnalyzer = fSecurityManager.getLimitAnalyzer();
 
         // initialize state
         //fStandalone = false;
@@ -1501,7 +1500,6 @@
         fStaxEntityResolver = (StaxEntityResolverWrapper)componentManager.getProperty(STAX_ENTITY_RESOLVER, null);
         fValidationManager = (ValidationManager)componentManager.getProperty(VALIDATION_MANAGER, null);
         fSecurityManager = (XMLSecurityManager)componentManager.getProperty(SECURITY_MANAGER, null);
-        fLimitAnalyzer = fSecurityManager.getLimitAnalyzer();
         entityExpansionIndex = fSecurityManager.getIndex(Constants.JDK_ENTITY_EXPANSION_LIMIT);
 
         // JAXP 1.5 feature
@@ -1659,7 +1657,6 @@
             if (suffixLength == Constants.SECURITY_MANAGER_PROPERTY.length() &&
                 propertyId.endsWith(Constants.SECURITY_MANAGER_PROPERTY)) {
                 fSecurityManager = (XMLSecurityManager)value;
-                fLimitAnalyzer = fSecurityManager.getLimitAnalyzer();
             }
         }
 
@@ -1668,8 +1665,13 @@
         {
             XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager)value;
             fAccessExternalDTD = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_DTD);
-            }
         }
+    }
+
+    public void setLimitAnalyzer(XMLLimitAnalyzer fLimitAnalyzer) {
+        this.fLimitAnalyzer = fLimitAnalyzer;
+    }
+
     /**
      * Returns a list of property identifiers that are recognized by
      * this component. This method may return null if no properties
--- a/jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLLimitAnalyzer.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLLimitAnalyzer.java	Wed Feb 05 08:57:33 2014 -0800
@@ -77,7 +77,6 @@
         }
     }
 
-    private XMLSecurityManager securityManager;
     /**
      * Max value accumulated for each property
      */
@@ -101,8 +100,7 @@
      * Default constructor. Establishes default values for known security
      * vulnerabilities.
      */
-    public XMLLimitAnalyzer(XMLSecurityManager securityManager) {
-        this.securityManager = securityManager;
+    public XMLLimitAnalyzer() {
         values = new int[Limit.values().length];
         totalValue = new int[Limit.values().length];
         names = new String[Limit.values().length];
@@ -157,7 +155,7 @@
         }
 
 
-        if (index == Limit.GENEAL_ENTITY_SIZE_LIMIT.ordinal() ||
+        if (index == Limit.GENERAL_ENTITY_SIZE_LIMIT.ordinal() ||
                 index == Limit.PARAMETER_ENTITY_SIZE_LIMIT.ordinal()) {
             totalValue[Limit.TOTAL_ENTITY_SIZE_LIMIT.ordinal()] += value;
         }
@@ -221,7 +219,7 @@
         }
     }
 
-    public void debugPrint() {
+    public void debugPrint(XMLSecurityManager securityManager) {
         Formatter formatter = new Formatter();
         System.out.println(formatter.format("%30s %15s %15s %15s %30s",
                 "Property","Limit","Total size","Size","Entity Name"));
--- a/jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityManager.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/utils/XMLSecurityManager.java	Wed Feb 05 08:57:33 2014 -0800
@@ -65,7 +65,7 @@
         MAX_OCCUR_NODE_LIMIT(Constants.JDK_MAX_OCCUR_LIMIT, Constants.SP_MAX_OCCUR_LIMIT, 0, 5000),
         ELEMENT_ATTRIBUTE_LIMIT(Constants.JDK_ELEMENT_ATTRIBUTE_LIMIT, Constants.SP_ELEMENT_ATTRIBUTE_LIMIT, 0, 10000),
         TOTAL_ENTITY_SIZE_LIMIT(Constants.JDK_TOTAL_ENTITY_SIZE_LIMIT, Constants.SP_TOTAL_ENTITY_SIZE_LIMIT, 0, 50000000),
-        GENEAL_ENTITY_SIZE_LIMIT(Constants.JDK_GENEAL_ENTITY_SIZE_LIMIT, Constants.SP_GENEAL_ENTITY_SIZE_LIMIT, 0, 0),
+        GENERAL_ENTITY_SIZE_LIMIT(Constants.JDK_GENERAL_ENTITY_SIZE_LIMIT, Constants.SP_GENERAL_ENTITY_SIZE_LIMIT, 0, 0),
         PARAMETER_ENTITY_SIZE_LIMIT(Constants.JDK_PARAMETER_ENTITY_SIZE_LIMIT, Constants.SP_PARAMETER_ENTITY_SIZE_LIMIT, 0, 1000000);
 
         final String apiProperty;
@@ -148,7 +148,6 @@
     private boolean[] isSet;
 
 
-    private XMLLimitAnalyzer limitAnalyzer;
     /**
      * Index of the special entityCountInfo property
      */
@@ -169,7 +168,6 @@
      * @param secureProcessing
      */
     public XMLSecurityManager(boolean secureProcessing) {
-        limitAnalyzer = new XMLLimitAnalyzer(this);
         values = new int[Limit.values().length];
         states = new State[Limit.values().length];
         isSet = new boolean[Limit.values().length];
@@ -249,13 +247,15 @@
         if (index == indexEntityCountInfo) {
             printEntityCountInfo = (String)value;
         } else {
-            int temp = 0;
-            try {
+            int temp;
+            if (Integer.class.isAssignableFrom(value.getClass())) {
+                temp = ((Integer)value).intValue();
+            } else {
                 temp = Integer.parseInt((String) value);
                 if (temp < 0) {
                     temp = 0;
                 }
-            } catch (NumberFormatException e) {}
+            }
             setLimit(index, state, temp);
         }
     }
@@ -387,8 +387,9 @@
      * @param size the size (count or length) of the entity
      * @return true if the size is over the limit, false otherwise
      */
-    public boolean isOverLimit(Limit limit, String entityName, int size) {
-        return isOverLimit(limit.ordinal(), entityName, size);
+    public boolean isOverLimit(Limit limit, String entityName, int size,
+            XMLLimitAnalyzer limitAnalyzer) {
+        return isOverLimit(limit.ordinal(), entityName, size, limitAnalyzer);
     }
 
     /**
@@ -400,7 +401,8 @@
      * @param size the size (count or length) of the entity
      * @return true if the size is over the limit, false otherwise
      */
-    public boolean isOverLimit(int index, String entityName, int size) {
+    public boolean isOverLimit(int index, String entityName, int size,
+            XMLLimitAnalyzer limitAnalyzer) {
         if (values[index] == NO_LIMIT) {
             return false;
         }
@@ -418,11 +420,11 @@
      * @param size the size (count or length) of the entity
      * @return true if the size is over the limit, false otherwise
      */
-    public boolean isOverLimit(Limit limit) {
-        return isOverLimit(limit.ordinal());
+    public boolean isOverLimit(Limit limit, XMLLimitAnalyzer limitAnalyzer) {
+        return isOverLimit(limit.ordinal(), limitAnalyzer);
     }
 
-    public boolean isOverLimit(int index) {
+    public boolean isOverLimit(int index, XMLLimitAnalyzer limitAnalyzer) {
         if (values[index] == NO_LIMIT) {
             return false;
         }
@@ -436,29 +438,12 @@
         }
     }
 
-    public void debugPrint() {
+    public void debugPrint(XMLLimitAnalyzer limitAnalyzer) {
         if (printEntityCountInfo.equals(Constants.JDK_YES)) {
-            limitAnalyzer.debugPrint();
+            limitAnalyzer.debugPrint(this);
         }
     }
 
-    /**
-     * Return the limit analyzer
-     *
-     * @return the limit analyzer
-     */
-    public XMLLimitAnalyzer getLimitAnalyzer() {
-        return limitAnalyzer;
-    }
-
-    /**
-     * Set limit analyzer
-     *
-     * @param analyzer a limit analyzer
-     */
-    public void setLimitAnalyzer(XMLLimitAnalyzer analyzer) {
-        limitAnalyzer = analyzer;
-    }
 
     /**
      * Indicate if a property is set explicitly
--- a/jaxp/src/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDScanner.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/xni/parser/XMLDTDScanner.java	Wed Feb 05 08:57:33 2014 -0800
@@ -20,6 +20,7 @@
 
 package com.sun.org.apache.xerces.internal.xni.parser;
 
+import com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer;
 import java.io.IOException;
 import com.sun.org.apache.xerces.internal.xni.XNIException;
 
@@ -95,4 +96,5 @@
     public boolean scanDTDExternalSubset(boolean complete)
         throws IOException, XNIException;
 
+    public void setLimitAnalyzer(XMLLimitAnalyzer limitAnalyzer);
 } // interface XMLDTDScanner
--- a/jaxp/src/com/sun/org/apache/xml/internal/resolver/CatalogManager.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxp/src/com/sun/org/apache/xml/internal/resolver/CatalogManager.java	Wed Feb 05 08:57:33 2014 -0800
@@ -24,20 +24,17 @@
 package com.sun.org.apache.xml.internal.resolver;
 
 import com.sun.org.apache.xerces.internal.utils.SecuritySupport;
+import com.sun.org.apache.xml.internal.resolver.helpers.BootstrapResolver;
+import com.sun.org.apache.xml.internal.resolver.helpers.Debug;
 import java.io.InputStream;
-
+import java.net.MalformedURLException;
 import java.net.URL;
-import java.net.MalformedURLException;
-
 import java.util.MissingResourceException;
 import java.util.PropertyResourceBundle;
 import java.util.ResourceBundle;
 import java.util.StringTokenizer;
 import java.util.Vector;
-
-import com.sun.org.apache.xml.internal.resolver.helpers.Debug;
-import com.sun.org.apache.xml.internal.resolver.helpers.BootstrapResolver;
-import com.sun.org.apache.xml.internal.resolver.Catalog;
+import sun.reflect.misc.ReflectUtil;
 
 /**
  * CatalogManager provides an interface to the catalog properties.
@@ -687,7 +684,7 @@
           catalog = new Catalog();
         } else {
           try {
-            catalog = (Catalog) Class.forName(catalogClassName).newInstance();
+            catalog = (Catalog) ReflectUtil.forName(catalogClassName).newInstance();
           } catch (ClassNotFoundException cnfe) {
             debug.message(1,"Catalog class named '"
                           + catalogClassName
--- a/jaxp/src/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogReader.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxp/src/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogReader.java	Wed Feb 05 08:57:33 2014 -0800
@@ -23,24 +23,21 @@
 
 package com.sun.org.apache.xml.internal.resolver.readers;
 
-import java.util.Hashtable;
+import com.sun.org.apache.xml.internal.resolver.Catalog;
+import com.sun.org.apache.xml.internal.resolver.CatalogException;
+import com.sun.org.apache.xml.internal.resolver.helpers.Namespaces;
 import java.io.IOException;
 import java.io.InputStream;
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLConnection;
-import java.net.MalformedURLException;
-
+import java.util.Hashtable;
+import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.ParserConfigurationException;
-
-import com.sun.org.apache.xml.internal.resolver.Catalog;
-import com.sun.org.apache.xml.internal.resolver.CatalogException;
-import com.sun.org.apache.xml.internal.resolver.readers.CatalogReader;
-import com.sun.org.apache.xml.internal.resolver.helpers.Namespaces;
-
+import org.w3c.dom.*;
 import org.xml.sax.SAXException;
-import org.w3c.dom.*;
+import sun.reflect.misc.ReflectUtil;
 
 /**
  * A DOM-based CatalogReader.
@@ -199,7 +196,7 @@
     DOMCatalogParser domParser = null;
 
     try {
-      domParser = (DOMCatalogParser) Class.forName(domParserClass).newInstance();
+      domParser = (DOMCatalogParser) ReflectUtil.forName(domParserClass).newInstance();
     } catch (ClassNotFoundException cnfe) {
       catalog.getCatalogManager().debug.message(1, "Cannot load XML Catalog Parser class", domParserClass);
       throw new CatalogException(CatalogException.UNPARSEABLE);
--- a/jaxp/src/com/sun/org/apache/xml/internal/resolver/readers/SAXCatalogReader.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxp/src/com/sun/org/apache/xml/internal/resolver/readers/SAXCatalogReader.java	Wed Feb 05 08:57:33 2014 -0800
@@ -23,19 +23,21 @@
 
 package com.sun.org.apache.xml.internal.resolver.readers;
 
-import java.util.Hashtable;
+import com.sun.org.apache.xml.internal.resolver.Catalog;
+import com.sun.org.apache.xml.internal.resolver.CatalogException;
+import com.sun.org.apache.xml.internal.resolver.CatalogManager;
+import com.sun.org.apache.xml.internal.resolver.helpers.Debug;
+import java.io.FileNotFoundException;
 import java.io.IOException;
-import java.io.FileNotFoundException;
 import java.io.InputStream;
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLConnection;
-import java.net.MalformedURLException;
 import java.net.UnknownHostException;
-
+import java.util.Hashtable;
 import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
-import javax.xml.parsers.SAXParser;
-
 import org.xml.sax.AttributeList;
 import org.xml.sax.Attributes;
 import org.xml.sax.ContentHandler;
@@ -45,12 +47,7 @@
 import org.xml.sax.Locator;
 import org.xml.sax.Parser;
 import org.xml.sax.SAXException;
-
-import com.sun.org.apache.xml.internal.resolver.Catalog;
-import com.sun.org.apache.xml.internal.resolver.CatalogManager;
-import com.sun.org.apache.xml.internal.resolver.CatalogException;
-import com.sun.org.apache.xml.internal.resolver.readers.CatalogReader;
-import com.sun.org.apache.xml.internal.resolver.helpers.Debug;
+import sun.reflect.misc.ReflectUtil;
 
 /**
  * A SAX-based CatalogReader.
@@ -246,7 +243,7 @@
         }
         parser.parse(new InputSource(is), spHandler);
       } else {
-        Parser parser = (Parser) Class.forName(parserClass).newInstance();
+        Parser parser = (Parser) ReflectUtil.forName(parserClass).newInstance();
         parser.setDocumentHandler(this);
         if (bResolver != null) {
           parser.setEntityResolver(bResolver);
@@ -352,7 +349,7 @@
 
       try {
         saxParser = (SAXCatalogParser)
-          Class.forName(saxParserClass).newInstance();
+          ReflectUtil.forName(saxParserClass).newInstance();
 
         saxParser.setCatalog(catalog);
         saxParser.startDocument();
@@ -413,7 +410,7 @@
 
       try {
         saxParser = (SAXCatalogParser)
-          Class.forName(saxParserClass).newInstance();
+          ReflectUtil.forName(saxParserClass).newInstance();
 
         saxParser.setCatalog(catalog);
         saxParser.startDocument();
--- a/jaxws/.hgtags	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/.hgtags	Wed Feb 05 08:57:33 2014 -0800
@@ -242,4 +242,8 @@
 76a598cf50c4e1dc1fc8adc08b451943aa1a3179 jdk8-b118
 172b8e056ff259044ca48c5425d643dc8e2e05c8 jdk8-b119
 6c152deb600d8a11bc46149ace317b1c9fce1482 jdk8-b120
+32050ab53c8a8e4cb09f04b88db78258a480fb61 jdk8-b121
+bc622ba563f9316f981c11c3a260f4c3fdc5ef07 jdk8-b122
+91f5c542ccad330efc0d281362dd6f33f2039746 jdk8-b123
 32050ab53c8a8e4cb09f04b88db78258a480fb61 jdk9-b00
+9c9fabbcd3d526d7ca29165169155f49a107533a jdk9-b01
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/ApNavigator.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/ApNavigator.java	Wed Feb 05 08:57:33 2014 -0800
@@ -65,7 +65,7 @@
  *
  * @author Kohsuke Kawaguchi (kk@kohsuke.org)
  */
-public class ApNavigator implements Navigator<TypeMirror, TypeElement, VariableElement, ExecutableElement> {
+public final class ApNavigator implements Navigator<TypeMirror, TypeElement, VariableElement, ExecutableElement> {
 
     private final ProcessingEnvironment env;
 
@@ -236,7 +236,7 @@
     }
 
     public boolean isFinal(TypeElement clazz) {
-        return hasModifier(clazz,Modifier.FINAL);
+        return hasModifier(clazz, Modifier.FINAL);
     }
 
     public VariableElement[] getEnumConstants(TypeElement clazz) {
@@ -258,8 +258,9 @@
         return env.getElementUtils().getPackageOf(clazz).getQualifiedName().toString();
     }
 
-    public TypeElement findClass(String className, TypeElement referencePoint) {
-        return env.getElementUtils().getTypeElement(className);
+    @Override
+    public TypeElement loadObjectFactory(TypeElement referencePoint, String packageName) {
+        return env.getElementUtils().getTypeElement(packageName + ".ObjectFactory");
     }
 
     public boolean isBridgeMethod(ExecutableElement method) {
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/EagerNType.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/EagerNType.java	Wed Feb 05 08:57:33 2014 -0800
@@ -30,7 +30,6 @@
 import com.sun.codemodel.internal.JType;
 import com.sun.tools.internal.xjc.outline.Aspect;
 import com.sun.tools.internal.xjc.outline.Outline;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
 
 /**
  * @author Kohsuke Kawaguchi
@@ -69,6 +68,6 @@
     }
 
     public String fullName() {
-        return Navigator.REFLECTION.getTypeName(t);
+        return Utils.REFLECTION_NAVIGATOR.getTypeName(t);
     }
 }
--- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NavigatorImpl.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/NavigatorImpl.java	Wed Feb 05 08:57:33 2014 -0800
@@ -56,7 +56,7 @@
             EagerNType ent = (EagerNType) nt;
             if (base instanceof EagerNClass) {
                 EagerNClass enc = (EagerNClass) base;
-                return create(REFLECTION.getBaseClass(ent.t, enc.c));
+                return create(Utils.REFLECTION_NAVIGATOR.getBaseClass(ent.t, enc.c));
             }
             // lazy class can never be a base type of an eager type
             return null;
@@ -176,7 +176,7 @@
     public NType getTypeArgument(NType nt, int i) {
         if (nt instanceof EagerNType) {
             EagerNType ent = (EagerNType) nt;
-            return create(REFLECTION.getTypeArgument(ent.t,i));
+            return create(Utils.REFLECTION_NAVIGATOR.getTypeArgument(ent.t,i));
         }
         if (nt instanceof NClassByJClass) {
             NClassByJClass nnt = (NClassByJClass) nt;
@@ -189,7 +189,7 @@
     public boolean isParameterizedType(NType nt) {
         if (nt instanceof EagerNType) {
             EagerNType ent = (EagerNType) nt;
-            return REFLECTION.isParameterizedType(ent.t);
+            return Utils.REFLECTION_NAVIGATOR.isParameterizedType(ent.t);
         }
         if (nt instanceof NClassByJClass) {
             NClassByJClass nnt = (NClassByJClass) nt;
@@ -304,8 +304,8 @@
         throw new UnsupportedOperationException();
     }
 
-    public NClass findClass(String className, NClass referencePoint) {
-        // TODO: implement this method later
+    @Override
+    public NClass loadObjectFactory(NClass referencePoint, String pkg) {
         throw new UnsupportedOperationException();
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/model/nav/Utils.java	Wed Feb 05 08:57:33 2014 -0800
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.tools.internal.xjc.model.nav;
+
+import com.sun.xml.internal.bind.v2.model.nav.Navigator;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Utils class.
+ * Has *package private* access to avoid inappropriate usage.
+ */
+/* package */ final class Utils {
+
+    private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
+
+    /**
+     * static ReflectionNavigator field to avoid usage of reflection every time we use it.
+     */
+    /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
+
+    static { // we statically initializing REFLECTION_NAVIGATOR property
+        Class refNav = null;
+        try {
+            refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
+            //noinspection unchecked
+            Method getInstance = refNav.getDeclaredMethod("getInstance");
+            getInstance.setAccessible(true);
+            //noinspection unchecked
+            REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
+        } catch (ClassNotFoundException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("Can't find ReflectionNavigator class");
+        } catch (InvocationTargetException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
+        } catch (NoSuchMethodException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
+        } catch (IllegalAccessException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
+        } catch (SecurityException e) {
+            LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
+            throw e;
+        }
+    }
+
+    /**
+     * private constructor to avoid util class instantiating
+     */
+    private Utils() {
+    }
+}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/JAXBRIContext.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/JAXBRIContext.java	Wed Feb 05 08:57:33 2014 -0800
@@ -45,7 +45,6 @@
 import com.sun.xml.internal.bind.api.impl.NameConverter;
 import com.sun.xml.internal.bind.v2.ContextFactory;
 import com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfoSet;
 import java.util.HashMap;
 
@@ -417,7 +416,7 @@
      * @since 2.0 FCS
      */
     public static @Nullable Type getBaseType(@NotNull Type type, @NotNull Class baseType) {
-        return Navigator.REFLECTION.getBaseClass(type,baseType);
+        return Utils.REFLECTION_NAVIGATOR.getBaseClass(type, baseType);
     }
 
     /**
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/TypeReference.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/TypeReference.java	Wed Feb 05 08:57:33 2014 -0800
@@ -32,8 +32,6 @@
 
 import javax.xml.namespace.QName;
 
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-
 /**
  * A reference to a JAXB-bound type.
  *
@@ -105,12 +103,11 @@
         // if we are to reinstitute this check, check JAXB annotations only
         // assert annotations.length==0;   // not designed to work with adapters.
 
-        Type base = Navigator.REFLECTION.getBaseClass(type, Collection.class);
+        Type base = Utils.REFLECTION_NAVIGATOR.getBaseClass(type, Collection.class);
         if(base==null)
             return this;    // not a collection
 
-        return new TypeReference(tagName,
-            Navigator.REFLECTION.getTypeArgument(base,0));
+        return new TypeReference(tagName, Utils.REFLECTION_NAVIGATOR.getTypeArgument(base,0));
     }
 
     @Override
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Utils.java	Wed Feb 05 08:57:33 2014 -0800
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.bind.api;
+
+import com.sun.xml.internal.bind.v2.model.nav.Navigator;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Utils class.
+ * Has *package private* access to avoid inappropriate usage.
+ */
+/* package */ final class Utils {
+
+    private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
+
+    /**
+     * static ReflectionNavigator field to avoid usage of reflection every time we use it.
+     */
+    /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
+
+    static { // we statically initializing REFLECTION_NAVIGATOR property
+        Class refNav = null;
+        try {
+            refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
+            //noinspection unchecked
+            Method getInstance = refNav.getDeclaredMethod("getInstance");
+            getInstance.setAccessible(true);
+            //noinspection unchecked
+            REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
+        } catch (ClassNotFoundException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("Can't find ReflectionNavigator class");
+        } catch (InvocationTargetException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
+        } catch (NoSuchMethodException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
+        } catch (IllegalAccessException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
+        } catch (SecurityException e) {
+            LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
+            throw e;
+        }
+    }
+
+    /**
+     * private constructor to avoid util class instantiating
+     */
+    private Utils() {
+    }
+}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/ModelBuilder.java	Wed Feb 05 08:57:33 2014 -0800
@@ -289,23 +289,12 @@
         String pkg = nav.getPackageName(clazz);
         if (!registries.containsKey(pkg)) {
             // insert the package's object factory
-            C c = loadObjectFactory(clazz, pkg);
+            C c = nav.loadObjectFactory(clazz, pkg);
             if (c != null)
                 addRegistry(c, p);
         }
     }
 
-    private C loadObjectFactory(C clazz, String pkg) {
-        C c;
-        try {
-            c = nav.findClass(pkg + ".ObjectFactory", clazz);
-        } catch (SecurityException ignored) {
-            // treat SecurityException in same way as ClassNotFoundException in this case
-            c = null;
-        }
-        return c;
-    }
-
     /**
      * Getting parametrized classes of {@code JAXBElement<...>} property
      * @param p property which parametrized types we will try to get
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAnyTypeImpl.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeAnyTypeImpl.java	Wed Feb 05 08:57:33 2014 -0800
@@ -36,7 +36,7 @@
  */
 final class RuntimeAnyTypeImpl extends AnyTypeImpl<Type,Class> implements RuntimeNonElement {
     private RuntimeAnyTypeImpl() {
-        super(Navigator.REFLECTION);
+        super(Utils.REFLECTION_NAVIGATOR);
     }
 
     public <V> Transducer<V> getTransducer() {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeBuiltinLeafInfoImpl.java	Wed Feb 05 08:57:33 2014 -0800
@@ -91,9 +91,6 @@
 import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
 import com.sun.xml.internal.bind.v2.util.ByteArrayOutputStreamEx;
 import com.sun.xml.internal.bind.v2.util.DataSourceSource;
-import java.util.logging.Logger;
-import com.sun.xml.internal.bind.Util;
-import java.util.logging.Level;
 
 import org.xml.sax.SAXException;
 
@@ -108,8 +105,6 @@
 public abstract class RuntimeBuiltinLeafInfoImpl<T> extends BuiltinLeafInfoImpl<Type,Class>
     implements RuntimeBuiltinLeafInfo, Transducer<T> {
 
-    private static final Logger logger = Util.getClassLogger();
-
     private RuntimeBuiltinLeafInfoImpl(Class type, QName... typeNames) {
         super(type, typeNames);
         LEAVES.put(type,this);
@@ -201,7 +196,6 @@
     public static final List<RuntimeBuiltinLeafInfoImpl<?>> builtinBeanInfos;
 
     public static final String MAP_ANYURI_TO_URI = "mapAnyUriToUri";
-    public static final String USE_OLD_GMONTH_MAPPING = "jaxb.ri.useOldGmonthMapping";
 
     static {
 
@@ -966,14 +960,7 @@
         m.put(DatatypeConstants.DATETIME,   "%Y-%M-%DT%h:%m:%s"+ "%z");
         m.put(DatatypeConstants.DATE,       "%Y-%M-%D" +"%z");
         m.put(DatatypeConstants.TIME,       "%h:%m:%s"+ "%z");
-        if (System.getProperty(USE_OLD_GMONTH_MAPPING) == null) {
-            m.put(DatatypeConstants.GMONTH, "--%M%z");      //  E2-12 Error. http://www.w3.org/2001/05/xmlschema-errata#e2-12
-        } else {                                            //  backw. compatibility
-            if (logger.isLoggable(Level.FINE)) {
-                logger.log(Level.FINE, "Old GMonth mapping used.");
-            }
-            m.put(DatatypeConstants.GMONTH, "--%M--%z");
-        }
+        m.put(DatatypeConstants.GMONTH,     "--%M--%z");
         m.put(DatatypeConstants.GDAY,       "---%D" + "%z");
         m.put(DatatypeConstants.GYEAR,      "%Y" + "%z");
         m.put(DatatypeConstants.GYEARMONTH, "%Y-%M" + "%z");
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementInfoImpl.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeElementInfoImpl.java	Wed Feb 05 08:57:33 2014 -0800
@@ -42,7 +42,6 @@
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeRef;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
 import com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationException;
 import com.sun.xml.internal.bind.v2.runtime.Transducer;
 import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
@@ -122,7 +121,8 @@
     }
 
     public Class<? extends JAXBElement> getType() {
-        return Navigator.REFLECTION.erasure(super.getType());
+        //noinspection unchecked
+        return (Class<? extends JAXBElement>) Utils.REFLECTION_NAVIGATOR.erasure(super.getType());
     }
 
     public RuntimeClassInfo getScope() {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeModelBuilder.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeModelBuilder.java	Wed Feb 05 08:57:33 2014 -0800
@@ -38,7 +38,6 @@
 import com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader;
 import com.sun.xml.internal.bind.v2.model.core.ID;
 import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElementRef;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
@@ -75,7 +74,7 @@
     public final @Nullable JAXBContextImpl context;
 
     public RuntimeModelBuilder(JAXBContextImpl context, RuntimeAnnotationReader annotationReader, Map<Class, Class> subclassReplacements, String defaultNamespaceRemap) {
-        super(annotationReader, Navigator.REFLECTION, subclassReplacements, defaultNamespaceRemap);
+        super(annotationReader, Utils.REFLECTION_NAVIGATOR, subclassReplacements, defaultNamespaceRemap);
         this.context = context;
     }
 
@@ -109,10 +108,6 @@
         return new RuntimeArrayInfoImpl(this, upstream, (Class)arrayType);
     }
 
-    public ReflectionNavigator getNavigator() {
-        return (ReflectionNavigator)nav;
-    }
-
     @Override
     protected RuntimeTypeInfoSetImpl createTypeInfoSet() {
         return new RuntimeTypeInfoSetImpl(reader);
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeInfoSetImpl.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/RuntimeTypeInfoSetImpl.java	Wed Feb 05 08:57:33 2014 -0800
@@ -35,7 +35,6 @@
 import com.sun.xml.internal.bind.v2.model.annotation.AnnotationReader;
 import com.sun.xml.internal.bind.v2.model.core.TypeInfoSet;
 import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElement;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfoSet;
 
@@ -46,7 +45,7 @@
  */
 final class RuntimeTypeInfoSetImpl extends TypeInfoSetImpl<Type,Class,Field,Method> implements RuntimeTypeInfoSet {
     public RuntimeTypeInfoSetImpl(AnnotationReader<Type,Class,Field,Method> reader) {
-        super(Navigator.REFLECTION,reader,RuntimeBuiltinLeafInfoImpl.LEAVES);
+        super(Utils.REFLECTION_NAVIGATOR,reader,RuntimeBuiltinLeafInfoImpl.LEAVES);
     }
 
     @Override
@@ -54,10 +53,6 @@
         return RuntimeAnyTypeImpl.theInstance;
     }
 
-    public ReflectionNavigator getNavigator() {
-        return (ReflectionNavigator)super.getNavigator();
-    }
-
     public RuntimeNonElement getTypeInfo( Type type ) {
         return (RuntimeNonElement)super.getTypeInfo(type);
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Utils.java	Wed Feb 05 08:57:33 2014 -0800
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.bind.v2.model.impl;
+
+import com.sun.xml.internal.bind.v2.model.nav.Navigator;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Utils class.
+ * Has *package private* access to avoid inappropriate usage.
+ */
+/* package */ final class Utils {
+
+    private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
+
+    /**
+     * static ReflectionNavigator field to avoid usage of reflection every time we use it.
+     */
+    /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
+
+    static { // we statically initializing REFLECTION_NAVIGATOR property
+        Class refNav = null;
+        try {
+            refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
+            //noinspection unchecked
+            Method getInstance = refNav.getDeclaredMethod("getInstance");
+            getInstance.setAccessible(true);
+            //noinspection unchecked
+            REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
+        } catch (ClassNotFoundException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("Can't find ReflectionNavigator class");
+        } catch (InvocationTargetException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
+        } catch (NoSuchMethodException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
+        } catch (IllegalAccessException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
+        } catch (SecurityException e) {
+            LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
+            throw e;
+        }
+    }
+
+    /**
+     * private constructor to avoid util class instantiating
+     */
+    private Utils() {
+    }
+}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/Navigator.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/Navigator.java	Wed Feb 05 08:57:33 2014 -0800
@@ -25,6 +25,10 @@
 
 package com.sun.xml.internal.bind.v2.model.nav;
 
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.lang.reflect.Type;
 import java.util.Collection;
 
 import com.sun.xml.internal.bind.v2.runtime.Location;
@@ -240,10 +244,6 @@
      */
     T getComponentType(T t);
 
-
-    /** The singleton instance. */
-    public static final ReflectionNavigator REFLECTION = new ReflectionNavigator();
-
     /**
      * Gets the i-th type argument from a parameterized type.
      *
@@ -357,14 +357,14 @@
     String getPackageName(C clazz);
 
     /**
-     * Finds the class/interface/enum/annotation of the given name.
+     * Finds ObjectFactory for the given referencePoint.
      *
      * @param referencePoint
      *      The class that refers to the specified class.
      * @return
      *      null if not found.
      */
-    C findClass(String className, C referencePoint);
+    C loadObjectFactory(C referencePoint, String packageName);
 
     /**
      * Returns true if this method is a bridge method as defined in JLS.
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java	Wed Feb 05 08:57:33 2014 -0800
@@ -44,16 +44,19 @@
  * {@link Navigator} implementation for {@code java.lang.reflect}.
  *
  */
-public final class ReflectionNavigator implements Navigator<Type, Class, Field, Method> {
+/*package*/final class ReflectionNavigator implements Navigator<Type, Class, Field, Method> {
 
-    /**
-     * Singleton.
-     *
-     * Use {@link Navigator#REFLECTION}
-     */
-    ReflectionNavigator() {
+//  ----------  Singleton -----------------
+    private static final ReflectionNavigator INSTANCE = new ReflectionNavigator();
+
+    /*package*/static ReflectionNavigator getInstance() {
+        return INSTANCE;
     }
 
+    private ReflectionNavigator() {
+    }
+//  ---------------------------------------
+
     public Class getSuperClass(Class clazz) {
         if (clazz == Object.class) {
             return null;
@@ -64,6 +67,7 @@
         }
         return sc;
     }
+
     private static final TypeVisitor<Type, Class> baseClassFinder = new TypeVisitor<Type, Class>() {
 
         public Type onClass(Class c, Class sup) {
@@ -496,7 +500,7 @@
             c.getDeclaredConstructor();
             return true;
         } catch (NoSuchMethodException e) {
-            return false;
+            return false; // todo: do this WITHOUT exception throw
         }
     }
 
@@ -544,13 +548,14 @@
         }
     }
 
-    public Class findClass(String className, Class referencePoint) {
+    @Override
+    public Class loadObjectFactory(Class referencePoint, String pkg) {
+        ClassLoader cl= SecureLoader.getClassClassLoader(referencePoint);
+        if (cl == null)
+            cl = SecureLoader.getSystemClassLoader();
+
         try {
-            ClassLoader cl = SecureLoader.getClassClassLoader(referencePoint);
-            if (cl == null) {
-                cl = SecureLoader.getSystemClassLoader();
-            }
-            return cl.loadClass(className);
+            return cl.loadClass(pkg + ".ObjectFactory");
         } catch (ClassNotFoundException e) {
             return null;
         }
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeInfoSet.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/runtime/RuntimeTypeInfoSet.java	Wed Feb 05 08:57:33 2014 -0800
@@ -33,7 +33,6 @@
 import javax.xml.namespace.QName;
 
 import com.sun.xml.internal.bind.v2.model.core.TypeInfoSet;
-import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator;
 
 /**
  * {@link TypeInfoSet} refined for runtime.
@@ -51,5 +50,4 @@
     RuntimeElementInfo getElementInfo( Class scope, QName name );
     Map<QName,? extends RuntimeElementInfo> getElementMappings( Class scope );
     Iterable<? extends RuntimeElementInfo> getAllElements();
-    ReflectionNavigator getNavigator();
 }
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ClassBeanInfoImpl.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ClassBeanInfoImpl.java	Wed Feb 05 08:57:33 2014 -0800
@@ -48,7 +48,6 @@
 import com.sun.xml.internal.bind.v2.ClassFactory;
 import com.sun.xml.internal.bind.v2.WellKnownNamespace;
 import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimeClassInfo;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
 import com.sun.xml.internal.bind.v2.runtime.property.AttributeProperty;
@@ -347,7 +346,7 @@
                 } else if (isThereAnOverridingProperty) {
                     // need to double check the override - it should be safe to do after the model has been created because it's targeted to override properties only
                     Class beanClass = bean.getClass();
-                    if (Navigator.REFLECTION.getDeclaredField(beanClass, p.getFieldName()) == null) {
+                    if (Utils.REFLECTION_NAVIGATOR.getDeclaredField(beanClass, p.getFieldName()) == null) {
                         p.serializeBody(bean, target, null);
                     }
                 }
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/ElementBeanInfoImpl.java	Wed Feb 05 08:57:33 2014 -0800
@@ -36,7 +36,6 @@
 
 import com.sun.xml.internal.bind.api.AccessorException;
 import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimeElementInfo;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
 import com.sun.xml.internal.bind.v2.runtime.property.Property;
@@ -81,10 +80,10 @@
         this.property = PropertyFactory.create(grammar,rei.getProperty());
 
         tagName = rei.getElementName();
-        expectedType = Navigator.REFLECTION.erasure(rei.getContentInMemoryType());
+        expectedType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(rei.getContentInMemoryType());
         scope = rei.getScope()==null ? JAXBElement.GlobalScope.class : rei.getScope().getClazz();
 
-        Class type = Navigator.REFLECTION.erasure(rei.getType());
+        Class type = (Class) Utils.REFLECTION_NAVIGATOR.erasure(rei.getType());
         if(type==JAXBElement.class)
             constructor = null;
         else {
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java	Wed Feb 05 08:57:33 2014 -0800
@@ -65,7 +65,6 @@
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerConfigurationException;
 import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.sax.SAXResult;
 import javax.xml.transform.sax.SAXTransformerFactory;
 import javax.xml.transform.sax.TransformerHandler;
 
@@ -90,7 +89,6 @@
 import com.sun.xml.internal.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl;
 import com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder;
 import com.sun.xml.internal.bind.v2.model.nav.Navigator;
-import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimeArrayInfo;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimeBuiltinLeafInfo;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimeClassInfo;
@@ -118,7 +116,6 @@
 import org.w3c.dom.Node;
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXParseException;
-import org.xml.sax.helpers.DefaultHandler;
 
 /**
  * This class provides the implementation of JAXBContext.
@@ -363,7 +360,7 @@
             beanInfoMap.put( e.getKey(), beanInfoMap.get(e.getValue()) );
 
         // build bridges
-        ReflectionNavigator nav = typeSet.getNavigator();
+        Navigator<Type, Class, Field, Method> nav = typeSet.getNavigator();
 
         for (TypeReference tr : typeRefs) {
             XmlJavaTypeAdapter xjta = tr.get(XmlJavaTypeAdapter.class);
@@ -371,7 +368,7 @@
             XmlList xl = tr.get(XmlList.class);
 
             // eventually compute the in-memory type
-            Class erasedType = nav.erasure(tr.type);
+            Class erasedType = (Class) nav.erasure(tr.type);
 
             if(xjta!=null) {
                 a = new Adapter<Type,Class>(xjta.value(),nav);
@@ -382,7 +379,7 @@
             }
 
             if(a!=null) {
-                erasedType = nav.erasure(a.defaultType);
+                erasedType = (Class) nav.erasure(a.defaultType);
             }
 
             Name name = nameBuilder.createElementName(tr.tagName);
@@ -877,7 +874,7 @@
                 // this is a special class we introduced for JAX-WS that we *don't* want in the schema
             } else {
                 NonElement<Type,Class> typeInfo = getXmlType(tis,tr);
-                xsdgen.add(tr.tagName, !Navigator.REFLECTION.isPrimitive(tr.type),typeInfo);
+                xsdgen.add(tr.tagName, !tis.getNavigator().isPrimitive(tr.type),typeInfo);
             }
         }
         return xsdgen;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Utils.java	Wed Feb 05 08:57:33 2014 -0800
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.bind.v2.runtime;
+
+import com.sun.xml.internal.bind.v2.model.nav.Navigator;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Utils class.
+ * Has *package private* access to avoid inappropriate usage.
+ */
+/* package */ final class Utils {
+
+    private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
+
+    /**
+     * static ReflectionNavigator field to avoid usage of reflection every time we use it.
+     */
+    /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
+
+    static { // we statically initializing REFLECTION_NAVIGATOR property
+        Class refNav = null;
+        try {
+            refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
+            //noinspection unchecked
+            Method getInstance = refNav.getDeclaredMethod("getInstance");
+            getInstance.setAccessible(true);
+            //noinspection unchecked
+            REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
+        } catch (ClassNotFoundException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("Can't find ReflectionNavigator class");
+        } catch (InvocationTargetException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
+        } catch (NoSuchMethodException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
+        } catch (IllegalAccessException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
+        } catch (SecurityException e) {
+            LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
+            throw e;
+        }
+    }
+
+    /**
+     * private constructor to avoid util class instantiating
+     */
+    private Utils() {
+    }
+}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayProperty.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/ArrayProperty.java	Wed Feb 05 08:57:33 2014 -0800
@@ -27,7 +27,6 @@
 
 
 import com.sun.xml.internal.bind.api.AccessorException;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
 import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
 import com.sun.xml.internal.bind.v2.runtime.reflect.Accessor;
@@ -49,7 +48,7 @@
 
         assert prop.isCollection();
         lister = Lister.create(
-            Navigator.REFLECTION.erasure(prop.getRawType()),prop.id(),prop.getAdapter());
+            Utils.REFLECTION_NAVIGATOR.erasure(prop.getRawType()),prop.id(),prop.getAdapter());
         assert lister!=null;
         acc = prop.getAccessor().optimize(context);
         assert acc!=null;
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/SingleMapNodeProperty.java	Wed Feb 05 08:57:33 2014 -0800
@@ -42,7 +42,6 @@
 import com.sun.xml.internal.bind.v2.ClassFactory;
 import com.sun.xml.internal.bind.v2.util.QNameMap;
 import com.sun.xml.internal.bind.v2.model.core.PropertyKind;
-import com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimeMapPropertyInfo;
 import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
 import com.sun.xml.internal.bind.v2.runtime.JaxBeanInfo;
@@ -98,7 +97,8 @@
         this.valueBeanInfo = context.getOrCreate(prop.getValueType());
 
         // infer the implementation class
-        Class<ValueT> sig = ReflectionNavigator.REFLECTION.erasure(prop.getRawType());
+        //noinspection unchecked
+        Class<ValueT> sig = (Class<ValueT>) Utils.REFLECTION_NAVIGATOR.erasure(prop.getRawType());
         mapImplClass = ClassFactory.inferImplClass(sig,knownImplClasses);
         // TODO: error check for mapImplClass==null
         // what is the error reporting path for this part of the code?
@@ -140,23 +140,22 @@
      */
     private final Loader itemsLoader = new Loader(false) {
 
-        private ThreadLocal<Stack<BeanT>> target = new ThreadLocal<Stack<BeanT>>();
-        private ThreadLocal<Stack<ValueT>> map = new ThreadLocal<Stack<ValueT>>();
+        private ThreadLocal<BeanT> target = new ThreadLocal<BeanT>();
+        private ThreadLocal<ValueT> map = new ThreadLocal<ValueT>();
+        private int depthCounter = 0; // needed to clean ThreadLocals
 
         @Override
         public void startElement(UnmarshallingContext.State state, TagName ea) throws SAXException {
             // create or obtain the Map object
             try {
-                BeanT target = (BeanT) state.prev.target;
-                ValueT mapValue = acc.get(target);
-                if(mapValue == null)
-                    mapValue = ClassFactory.create(mapImplClass);
-                else
-                    mapValue.clear();
-
-                Stack.push(this.target, target);
-                Stack.push(map, mapValue);
-                state.target = mapValue;
+                target.set((BeanT)state.prev.target);
+                map.set(acc.get(target.get()));
+                depthCounter++;
+                if(map.get() == null) {
+                    map.set(ClassFactory.create(mapImplClass));
+                }
+                map.get().clear();
+                state.target = map.get();
             } catch (AccessorException e) {
                 // recover from error by setting a dummy Map that receives and discards the values
                 handleGenericException(e,true);
@@ -168,7 +167,11 @@
         public void leaveElement(State state, TagName ea) throws SAXException {
             super.leaveElement(state, ea);
             try {
-                acc.set(Stack.pop(target), Stack.pop(map));
+                acc.set(target.get(), map.get());
+                if (--depthCounter == 0) {
+                    target.remove();
+                    map.remove();
+                }
             } catch (AccessorException ex) {
                 handleGenericException(ex,true);
             }
@@ -286,36 +289,4 @@
             return acc;
         return null;
     }
-
-    private static final class Stack<T> {
-        private Stack<T> parent;
-        private T value;
-
-        private Stack(Stack<T> parent, T value) {
-            this.parent = parent;
-            this.value = value;
-        }
-
-        private Stack(T value) {
-            this.value = value;
-        }
-
-        private static <T> void push(ThreadLocal<Stack<T>> holder, T value) {
-            Stack<T> parent = holder.get();
-            if (parent == null)
-                holder.set(new Stack<T>(value));
-            else
-                holder.set(new Stack<T>(parent, value));
-        }
-
-        private static <T> T pop(ThreadLocal<Stack<T>> holder) {
-            Stack<T> current = holder.get();
-            if (current.parent == null)
-                holder.remove();
-            else
-                holder.set(current.parent);
-            return current.value;
-        }
-
-    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Utils.java	Wed Feb 05 08:57:33 2014 -0800
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.bind.v2.runtime.property;
+
+import com.sun.xml.internal.bind.v2.model.nav.Navigator;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Utils class.
+ * Has *package private* access to avoid inappropriate usage.
+ */
+/* package */ final class Utils {
+
+    private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
+
+    /**
+     * static ReflectionNavigator field to avoid usage of reflection every time we use it.
+     */
+    /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
+
+    static { // we statically initializing REFLECTION_NAVIGATOR property
+        Class refNav = null;
+        try {
+            refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
+            //noinspection unchecked
+            Method getInstance = refNav.getDeclaredMethod("getInstance");
+            getInstance.setAccessible(true);
+            //noinspection unchecked
+            REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
+        } catch (ClassNotFoundException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("Can't find ReflectionNavigator class");
+        } catch (InvocationTargetException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
+        } catch (NoSuchMethodException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
+        } catch (IllegalAccessException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
+        } catch (SecurityException e) {
+            LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
+            throw e;
+        }
+    }
+
+    /**
+     * private constructor to avoid util class instantiating
+     */
+    private Utils() {
+    }
+}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Accessor.java	Wed Feb 05 08:57:33 2014 -0800
@@ -46,7 +46,6 @@
 import com.sun.xml.internal.bind.api.JAXBRIContext;
 import com.sun.xml.internal.bind.v2.model.core.Adapter;
 import com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
 import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl;
 import com.sun.xml.internal.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory;
 import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
@@ -198,7 +197,7 @@
 
     public final <T> Accessor<BeanT, T> adapt(Adapter<Type, Class> adapter) {
         return new AdaptedAccessor<BeanT, ValueT, T>(
-                (Class<T>) Navigator.REFLECTION.erasure(adapter.defaultType),
+                (Class<T>) Utils.REFLECTION_NAVIGATOR.erasure(adapter.defaultType),
                 this,
                 adapter.adapterType);
     }
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Lister.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Lister.java	Wed Feb 05 08:57:33 2014 -0800
@@ -51,7 +51,6 @@
 import com.sun.xml.internal.bind.v2.TODO;
 import com.sun.xml.internal.bind.v2.model.core.Adapter;
 import com.sun.xml.internal.bind.v2.model.core.ID;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
 import com.sun.xml.internal.bind.v2.runtime.XMLSerializer;
 import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Patcher;
 import com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext;
@@ -116,7 +115,7 @@
     public static <BeanT,PropT,ItemT,PackT>
         Lister<BeanT,PropT,ItemT,PackT> create(Type fieldType,ID idness, Adapter<Type,Class> adapter) {
 
-        Class rawType = Navigator.REFLECTION.erasure(fieldType);
+        Class rawType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(fieldType);
         Class itemType;
 
         Lister l;
@@ -125,9 +124,9 @@
             l = getArrayLister(itemType);
         } else
         if( Collection.class.isAssignableFrom(rawType) ) {
-            Type bt = Navigator.REFLECTION.getBaseClass(fieldType,Collection.class);
+            Type bt = Utils.REFLECTION_NAVIGATOR.getBaseClass(fieldType,Collection.class);
             if(bt instanceof ParameterizedType)
-                itemType = Navigator.REFLECTION.erasure(((ParameterizedType)bt).getActualTypeArguments()[0]);
+                itemType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)bt).getActualTypeArguments()[0]);
             else
                 itemType = Object.class;
             l = new CollectionLister(getImplClass(rawType));
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/TransducedAccessor.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/TransducedAccessor.java	Wed Feb 05 08:57:33 2014 -0800
@@ -39,7 +39,6 @@
 import com.sun.xml.internal.bind.api.AccessorException;
 import com.sun.xml.internal.bind.v2.model.core.ID;
 import com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder;
-import com.sun.xml.internal.bind.v2.model.nav.Navigator;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimeNonElementRef;
 import com.sun.xml.internal.bind.v2.model.runtime.RuntimePropertyInfo;
 import com.sun.xml.internal.bind.v2.runtime.Name;
@@ -144,8 +143,7 @@
 
         if(prop.isCollection()) {
             return new ListTransducedAccessorImpl(xducer,prop.getAccessor(),
-                    Lister.create(Navigator.REFLECTION.erasure(prop.getRawType()),prop.id(),
-                    prop.getAdapter()));
+                    Lister.create(Utils.REFLECTION_NAVIGATOR.erasure(prop.getRawType()), prop.id(), prop.getAdapter()));
         }
 
         if(prop.id()==ID.IDREF)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Utils.java	Wed Feb 05 08:57:33 2014 -0800
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.bind.v2.runtime.reflect;
+
+import com.sun.xml.internal.bind.v2.model.nav.Navigator;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Utils class.
+ * Has *package private* access to avoid inappropriate usage.
+ */
+/* package */ final class Utils {
+
+    private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
+
+    /**
+     * static ReflectionNavigator field to avoid usage of reflection every time we use it.
+     */
+    /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
+
+    static { // we statically initializing REFLECTION_NAVIGATOR property
+        Class refNav = null;
+        try {
+            refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
+            //noinspection unchecked
+            Method getInstance = refNav.getDeclaredMethod("getInstance");
+            getInstance.setAccessible(true);
+            //noinspection unchecked
+            REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
+        } catch (ClassNotFoundException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("Can't find ReflectionNavigator class");
+        } catch (InvocationTargetException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
+        } catch (NoSuchMethodException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
+        } catch (IllegalAccessException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
+        } catch (SecurityException e) {
+            LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
+            throw e;
+        }
+    }
+
+    /**
+     * private constructor to avoid util class instantiating
+     */
+    private Utils() {
+    }
+}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -58,6 +58,12 @@
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
+import java.lang.reflect.ReflectPermission;
+import java.security.AccessControlContext;
+import java.security.AccessController;
+import java.security.Permissions;
+import java.security.PrivilegedAction;
+import java.security.ProtectionDomain;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.logging.Level;
@@ -556,11 +562,40 @@
             // ignore
         }
         captureStackTrace = tmpVal;
+        JAXB_CONTEXT = createJAXBContext();
+    }
 
-        try {
-            JAXB_CONTEXT = JAXBContext.newInstance(SOAP11Fault.class, SOAP12Fault.class);
-        } catch (JAXBException e) {
-            throw new Error(e); // this must be a bug in our code
+    private static JAXBContext createJAXBContext() {
+
+        // in jdk runtime doPrivileged is necessary since JAX-WS internal classes are in restricted packages
+        if (isJDKRuntime()) {
+            Permissions permissions = new Permissions();
+            permissions.add(new RuntimePermission("accessClassInPackage.com.sun." + "xml.internal.ws.fault"));
+            permissions.add(new ReflectPermission("suppressAccessChecks"));
+            return AccessController.doPrivileged(
+                    new PrivilegedAction<JAXBContext>() {
+                        @Override
+                        public JAXBContext run() {
+                            try {
+                                return JAXBContext.newInstance(SOAP11Fault.class, SOAP12Fault.class);
+                            } catch (JAXBException e) {
+                                throw new Error(e);
+                            }
+                        }
+                    },
+                    new AccessControlContext(new ProtectionDomain[]{new ProtectionDomain(null, permissions)})
+            );
+
+        } else {
+            try {
+                return JAXBContext.newInstance(SOAP11Fault.class, SOAP12Fault.class);
+            } catch (JAXBException e) {
+                throw new Error(e);
+            }
         }
     }
+
+    private static boolean isJDKRuntime() {
+        return SOAPFaultBuilder.class.getName().contains("internal");
+    }
 }
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java	Wed Feb 05 08:57:33 2014 -0800
@@ -45,7 +45,6 @@
 import com.sun.xml.internal.ws.resources.ModelerMessages;
 import com.sun.xml.internal.ws.resources.ServerMessages;
 import com.sun.xml.internal.ws.spi.db.BindingContext;
-import com.sun.xml.internal.ws.spi.db.BindingHelper;
 import com.sun.xml.internal.ws.spi.db.TypeInfo;
 import com.sun.xml.internal.ws.spi.db.WrapperComposite;
 
@@ -886,7 +885,7 @@
             //set the actual type argument of Holder in the TypeReference
             if (isHolder) {
                 if(clazzType==Holder.class){
-                    clazzType = BindingHelper.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]);
+                    clazzType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]);
                 }
             }
             Mode paramMode = isHolder ? Mode.INOUT : Mode.IN;
@@ -1101,7 +1100,7 @@
             //set the actual type argument of Holder in the TypeReference
             if (isHolder) {
                 if (clazzType==Holder.class)
-                    clazzType = BindingHelper.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]);
+                    clazzType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]);
             }
             Mode paramMode = isHolder ? Mode.INOUT : Mode.IN;
             for (Annotation annotation : pannotations[pos]) {
@@ -1347,7 +1346,7 @@
             //set the actual type argument of Holder in the TypeReference
             if (isHolder) {
                 if (clazzType==Holder.class)
-                    clazzType = BindingHelper.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]);
+                    clazzType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]);
             }
 
             Mode paramMode = isHolder ? Mode.INOUT : Mode.IN;
@@ -1435,14 +1434,14 @@
     private Class getAsyncReturnType(Method method, Class returnType) {
         if(Response.class.isAssignableFrom(returnType)){
             Type ret = method.getGenericReturnType();
-            return BindingHelper.erasure(((ParameterizedType)ret).getActualTypeArguments()[0]);
+            return (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)ret).getActualTypeArguments()[0]);
         }else{
             Type[] types = method.getGenericParameterTypes();
             Class[] params = method.getParameterTypes();
             int i = 0;
             for(Class cls : params){
                 if(AsyncHandler.class.isAssignableFrom(cls)){
-                    return BindingHelper.erasure(((ParameterizedType)types[i]).getActualTypeArguments()[0]);
+                    return (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)types[i]).getActualTypeArguments()[0]);
                 }
                 i++;
             }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Utils.java	Wed Feb 05 08:57:33 2014 -0800
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.ws.model;
+
+import com.sun.xml.internal.bind.v2.model.nav.Navigator;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Utils class.
+ *
+ * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages.
+ *
+ * Has *package private* access to avoid inappropriate usage.
+ */
+/* package */ final class Utils {
+
+    private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
+
+    /**
+     * static ReflectionNavigator field to avoid usage of reflection every time we use it.
+     */
+    /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
+
+    static { // we statically initializing REFLECTION_NAVIGATOR property
+        Class refNav = null;
+        try {
+            refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
+            //noinspection unchecked
+            Method getInstance = refNav.getDeclaredMethod("getInstance");
+            getInstance.setAccessible(true);
+            //noinspection unchecked
+            REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
+        } catch (ClassNotFoundException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("Can't find ReflectionNavigator class");
+        } catch (InvocationTargetException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
+        } catch (NoSuchMethodException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
+        } catch (IllegalAccessException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
+        } catch (SecurityException e) {
+            LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
+            throw e;
+        }
+    }
+
+    /**
+     * private constructor to avoid util class instantiating
+     */
+    private Utils() {
+    }
+}
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java	Wed Feb 05 08:57:33 2014 -0800
@@ -61,7 +61,7 @@
 
     private static final AbstractWrapperBeanGenerator RUNTIME_GENERATOR =
             new RuntimeWrapperBeanGenerator(new RuntimeInlineAnnotationReader(),
-                    Navigator.REFLECTION, FIELD_FACTORY);
+                    (Navigator<java.lang.reflect.Type, Class, ?, Method>) Utils.REFLECTION_NAVIGATOR, FIELD_FACTORY);
 
     private static final class RuntimeWrapperBeanGenerator extends AbstractWrapperBeanGenerator<java.lang.reflect.Type, Class, java.lang.reflect.Method, Field> {
 
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingHelper.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingHelper.java	Wed Feb 05 08:57:33 2014 -0800
@@ -136,10 +136,10 @@
      * @since 2.0 FCS
      */
     public static @Nullable Type getBaseType(@NotNull Type type, @NotNull Class baseType) {
-        return Navigator.REFLECTION.getBaseClass(type,baseType);
+        return Utils.REFLECTION_NAVIGATOR.getBaseClass(type,baseType);
     }
 
     public static <T> Class<T> erasure(Type t) {
-        return Navigator.REFLECTION.erasure(t);
+        return (Class<T>) Utils.REFLECTION_NAVIGATOR.erasure(t);
     }
 }
--- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/TypeInfo.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/TypeInfo.java	Wed Feb 05 08:57:33 2014 -0800
@@ -119,12 +119,11 @@
         // if we are to reinstitute this check, check JAXB annotations only
         // assert annotations.length==0;   // not designed to work with adapters.
         Type t = (genericType != null)? genericType : type;
-        Type base = Navigator.REFLECTION.getBaseClass(t, Collection.class);
+        Type base = Utils.REFLECTION_NAVIGATOR.getBaseClass(t, Collection.class);
         if(base==null)
             return this;    // not a collection
 
-        return new TypeInfo(tagName,
-            Navigator.REFLECTION.getTypeArgument(base,0));
+        return new TypeInfo(tagName, Utils.REFLECTION_NAVIGATOR.getTypeArgument(base,0));
     }
 
     public Map<String, Object> properties() {
@@ -188,9 +187,9 @@
         }
 //        if (type instanceof Class && java.util.Collection.class.isAssignableFrom((Class)type)) {
         Type t = (genericType != null)? genericType : type;
-        Type base = Navigator.REFLECTION.getBaseClass(t, Collection.class);
+        Type base = Utils.REFLECTION_NAVIGATOR.getBaseClass(t, Collection.class);
         if ( base != null)  {
-            return new TypeInfo(tagName, Navigator.REFLECTION.getTypeArgument(base,0), annotations);
+            return new TypeInfo(tagName, Utils.REFLECTION_NAVIGATOR.getTypeArgument(base,0), annotations);
         }
         return null;
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/Utils.java	Wed Feb 05 08:57:33 2014 -0800
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.xml.internal.ws.spi.db;
+
+import com.sun.xml.internal.bind.v2.model.nav.Navigator;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Utils class.
+ *
+ * WARNING: If you are doing any changes don't forget to change other Utils classes in different packages.
+ *
+ * Has *package private* access to avoid inappropriate usage.
+ */
+/* package */ final class Utils {
+
+    private static final Logger LOGGER = Logger.getLogger(Utils.class.getName());
+
+    /**
+     * static ReflectionNavigator field to avoid usage of reflection every time we use it.
+     */
+    /* package */ static final Navigator<Type, Class, Field, Method> REFLECTION_NAVIGATOR;
+
+    static { // we statically initializing REFLECTION_NAVIGATOR property
+        Class refNav = null;
+        try {
+            refNav = Class.forName("com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator");
+            //noinspection unchecked
+            Method getInstance = refNav.getDeclaredMethod("getInstance");
+            getInstance.setAccessible(true);
+            //noinspection unchecked
+            REFLECTION_NAVIGATOR = (Navigator<Type, Class, Field, Method>) getInstance.invoke(null);
+        } catch (ClassNotFoundException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("Can't find ReflectionNavigator class");
+        } catch (InvocationTargetException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance throws the exception");
+        } catch (NoSuchMethodException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance can't be found");
+        } catch (IllegalAccessException e) {
+            e.printStackTrace();
+            throw new IllegalStateException("ReflectionNavigator.getInstance method is inaccessible");
+        } catch (SecurityException e) {
+            LOGGER.log(Level.FINE, "Unable to access ReflectionNavigator.getInstance", e);
+            throw e;
+        }
+    }
+
+    /**
+     * private constructor to avoid util class instantiating
+     */
+    private Utils() {
+    }
+}
--- a/jaxws/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jaxws/src/share/jaxws_classes/javax/xml/bind/TypeConstraintException.java	Wed Feb 05 08:57:33 2014 -0800
@@ -59,6 +59,7 @@
      */
     private volatile Throwable linkedException;
 
+    static final long serialVersionUID = -3059799699420143848L;
 
     /**
      * Construct a TypeConstraintException with the specified detail message.  The
--- a/jdk/.hgtags	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/.hgtags	Wed Feb 05 08:57:33 2014 -0800
@@ -243,3 +243,4 @@
 e4499a6529e8c3e762ba86f45cdd774c92a8e7bc jdk8-b119
 d31cd980e1da31fa496a359caaf1a165aeb5791a jdk8-b120
 27b384262cba51dd0fe3e3534820189b46abc8cb jdk9-b00
+3b4ac8d1b76fc6bec9815f0ab714f15b552e4c7b jdk9-b01
--- a/jdk/make/CompileJavaClasses.gmk	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/make/CompileJavaClasses.gmk	Wed Feb 05 08:57:33 2014 -0800
@@ -274,11 +274,6 @@
       $(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java \
       $(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java
 
-  # JObjC.jar contains 1.5 byte-code...so skip it here :-(
-  # MACOSX_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/jobjc/src
-  # EXCLUDES += tests/java/com/apple/jobjc
-
-  EXCLUDES += com/apple/jobjc
 endif
 
 # The security classes should not end up in the classes directory as that will prevent them
@@ -354,44 +349,6 @@
 
 ##########################################################################################
 
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-  #
-  # JObjC.jar is compiled with BOOT_JAVAC which (may) not support the "-h" flag.
-  # so we first compile classes with BOOT_JAVAC and then with JDK_JAVAC :-(
-  #
-  $(eval $(call SetupJavaCompiler,GENERATE_15BYTECODE, \
-      JAVAC := $(JAVAC), \
-      FLAGS := -source 1.5 -target 1.5 -g -bootclasspath $(BOOT_RTJAR) -cp $(JDK_OUTPUTDIR)/../langtools/dist/lib/classes.jar $(DISABLE_WARNINGS), \
-      SERVER_DIR := $(SJAVAC_SERVER_DIR), \
-      SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
-
-  $(eval $(call SetupJavaCompilation,BUILD_JOBJC, \
-      SETUP := GENERATE_15BYTECODE, \
-      DISABLE_SJAVAC := true, \
-      SRC := $(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \
-          $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \
-          $(JDK_OUTPUTDIR)/gensrc_jobjc/src, \
-      INCLUDES := com/apple/jobjc, \
-      EXCLUDES := tests/java/com/apple/jobjc, \
-      BIN := $(JDK_OUTPUTDIR)/jobjc_classes, \
-      JAR := $(JDK_OUTPUTDIR)/lib/JObjC.jar, \
-      JARINDEX := true))
-
-  $(BUILD_JOBJC): $(BUILD_JDK)
-
-  $(eval $(call SetupJavaCompilation,BUILD_JOBJC_HEADERS, \
-      SETUP := GENERATE_JDKBYTECODE, \
-      SRC := $(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \
-          $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \
-          $(JDK_OUTPUTDIR)/gensrc_jobjc/src, \
-      INCLUDES := com/apple/jobjc, \
-      EXCLUDES := tests/java/com/apple/jobjc, \
-      BIN := $(JDK_OUTPUTDIR)/jobjc_classes_headers, \
-      HEADERS := $(JDK_OUTPUTDIR)/gensrc_headers_jobjc))
-
-$(BUILD_JOBJC_HEADERS): $(BUILD_JDK)
-
-endif
 
 ##########################################################################################
 
--- a/jdk/make/CompileLaunchers.gmk	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/make/CompileLaunchers.gmk	Wed Feb 05 08:57:33 2014 -0800
@@ -437,6 +437,7 @@
 ifeq ($(OPENJDK_TARGET_OS), solaris)
   UNPACKEXE_LANG := C++
 endif
+UNPACKEXE_DEBUG_SYMBOLS := true
 # On windows, unpack200 is linked completely differently to all other
 # executables, using the compiler with the compiler arguments.
 # It's also linked incrementally, producing a .ilk file that needs to
@@ -445,6 +446,9 @@
   BUILD_UNPACKEXE_LDEXE := $(CC)
   EXE_OUT_OPTION_save := $(EXE_OUT_OPTION)
   EXE_OUT_OPTION := -Fe
+  # With the current way unpack200 is built, debug symbols aren't supported
+  # anyway.
+  UNPACKEXE_DEBUG_SYMBOLS :=
 endif
 $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
     SRC := $(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack, \
@@ -474,7 +478,7 @@
         -D "JDK_FNAME=unpack200.exe" \
         -D "JDK_INTERNAL_NAME=unpack200" \
         -D "JDK_FTYPE=0x1L", \
-    DEBUG_SYMBOLS := true, \
+    DEBUG_SYMBOLS := $(UNPACKEXE_DEBUG_SYMBOLS), \
     MANIFEST := $(JDK_TOPDIR)/src/windows/resource/unpack200_proto.exe.manifest))
 
 ifeq ($(OPENJDK_TARGET_OS), windows)
--- a/jdk/make/CreateJars.gmk	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/make/CreateJars.gmk	Wed Feb 05 08:57:33 2014 -0800
@@ -668,13 +668,6 @@
 
 ##########################################################################################
 
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-  $(eval $(call SetupArchive,BUILD_JOBJC_JAR, , \
-      SRCS := $(JDK_OUTPUTDIR)/jobjc_classes, \
-      JAR := $(IMAGES_OUTPUTDIR)/lib/JObjC.jar, \
-      JARINDEX := true))
-endif
-
 # This file is imported from hotspot in Import.gmk. Copying it into images/lib so that
 # all jars can be found in one place when creating images in Images.gmk. It needs to be
 # done here so that clean targets can be simple and accurate.
--- a/jdk/make/GenerateSources.gmk	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/make/GenerateSources.gmk	Wed Feb 05 08:57:33 2014 -0800
@@ -85,11 +85,6 @@
 include gensrc/GensrcSwing.gmk
 GENSRC += $(GENSRC_SWING_BEANINFO) $(GENSRC_SWING_NIMBUS)
 
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-  include gensrc/GensrcJObjC.gmk
-  GENSRC += $(GENSRC_JOBJC)
-endif
-
 $(GENSRC): $(BUILD_TOOLS)
 
 all: $(GENSRC)
--- a/jdk/make/Images.gmk	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/make/Images.gmk	Wed Feb 05 08:57:33 2014 -0800
@@ -283,14 +283,13 @@
 	$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $@
 
-# In the old build, JObjC.jar is not part of the meta-index
 $(JRE_IMAGE_DIR)/lib/meta-index: $(JRE_LIB_TARGETS)
 	$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index `$(LS) *.jar | $(SED) 's/JObjC\.jar//g'`
+	$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar
 
 $(JDK_IMAGE_DIR)/jre/lib/meta-index: $(JDKJRE_LIB_TARGETS)
 	$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
-	$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index `$(LS) *.jar | $(SED) 's/JObjC\.jar//g'`
+	$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar
 
 $(JRE_IMAGE_DIR)/lib/ext/meta-index: $(JRE_LIB_TARGETS)
 	$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
--- a/jdk/make/Profiles.gmk	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/make/Profiles.gmk	Wed Feb 05 08:57:33 2014 -0800
@@ -105,10 +105,6 @@
   ALL_JARS += $(IMAGES_OUTPUTDIR)/lib/ext/sunmscapi.jar
 endif
 
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-  ALL_JARS += $(IMAGES_OUTPUTDIR)/lib/JObjC.jar
-endif
-
 ifeq ($(PROFILE), profile_1)
   PROFILE_JARS := $(PROFILE_1_JARS)
 else ifeq ($(PROFILE), profile_2)
--- a/jdk/make/Setup.gmk	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/make/Setup.gmk	Wed Feb 05 08:57:33 2014 -0800
@@ -27,7 +27,7 @@
 
 # To build with all warnings enabled, do the following:
 # make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
-JAVAC_WARNINGS := -Xlint:-unchecked,-deprecation,-overrides,auxiliaryclass,classfile,dep-ann,divzero,empty,try,varargs -Werror
+JAVAC_WARNINGS := -Xlint:-unchecked,-deprecation,-overrides,auxiliaryclass,classfile,dep-ann,divzero,empty,overloads,try,varargs -Werror
 
 # Any java code executed during a JDK build to build other parts of the JDK must be 
 # executed by the bootstrap JDK (probably with -Xbootclasspath/p: ) and for this 
--- a/jdk/make/data/mainmanifest/manifest.mf	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/make/data/mainmanifest/manifest.mf	Wed Feb 05 08:57:33 2014 -0800
@@ -1,6 +1,6 @@
 Manifest-Version: 1.0
 Specification-Title: Java Platform API Specification
-Specification-Version: 1.8
+Specification-Version: 1.9
 Specification-Vendor: Oracle Corporation
 Implementation-Title: Java Runtime Environment
 Implementation-Version: @@RELEASE@@
--- a/jdk/make/gensrc/GensrcSwing.gmk	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/make/gensrc/GensrcSwing.gmk	Wed Feb 05 08:57:33 2014 -0800
@@ -77,7 +77,7 @@
 	$(ECHO) Generating beaninfo
 	$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing
 	$(JAVA) -Djava.awt.headless=true $(NEW_JAVADOC) \
-	    -sourcepath "$(JDK_TOPDIR)/src/share/classes$(PATH_SEP)$(JDK_OUTPUTDIR)/gensrc" \
+	    -sourcepath "$(JDK_TOPDIR)/src/share/classes$(PATH_SEP)$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes$(PATH_SEP)$(JDK_OUTPUTDIR)/gensrc" \
 	    -doclet build.tools.swingbeaninfo.GenDocletBeanInfo \
 	    -x $(SWINGBEAN_DEBUG_FLAG) -d $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing \
 	    -t $(DOCLET_DATA_DIR)/SwingBeanInfo.template -docletpath $(JDK_OUTPUTDIR)/btclasses \
--- a/jdk/make/lib/CoreLibraries.gmk	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/make/lib/CoreLibraries.gmk	Wed Feb 05 08:57:33 2014 -0800
@@ -310,16 +310,6 @@
 
 BUILD_LIBRARIES += $(BUILD_LIBUNPACK)
 
-ifeq ($(OPENJDK_TARGET_OS), windows)
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack.map: $(BUILD_LIBUNPACK)
-	$(ECHO) Copying $(@F)
-	$(CP) $(patsubst %$(SHARED_LIBRARY_SUFFIX), %.map, $<) $@
-
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)unpack.pdb: $(BUILD_LIBUNPACK)
-	$(ECHO) Copying $(@F)
-	$(CP) $(patsubst %$(SHARED_LIBRARY_SUFFIX), %.pdb, $<) $@
-endif
-
 ##########################################################################################
 
 BUILD_LIBJLI_SRC_DIRS := $(JDK_TOPDIR)/src/share/bin $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin
--- a/jdk/make/lib/NetworkingLibraries.gmk	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/make/lib/NetworkingLibraries.gmk	Wed Feb 05 08:57:33 2014 -0800
@@ -25,6 +25,7 @@
 
 LIBNET_SRC_DIRS := $(JDK_TOPDIR)/src/share/native/java/net \
     $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/net \
+    $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/ \
     $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/dns \
     $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/spi
 
--- a/jdk/make/lib/PlatformLibraries.gmk	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/make/lib/PlatformLibraries.gmk	Wed Feb 05 08:57:33 2014 -0800
@@ -136,64 +136,6 @@
 
 ##########################################################################################
 
-ifeq ($(OPENJDK_TARGET_OS), macosx)
-
-  $(eval $(call SetupNativeCompilation,BUILD_LIBJOBJC32, \
-      LIBRARY := JObjC, \
-      OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/libjobjc32, \
-      SRC := $(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/native \
-          $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/native, \
-      LANG := C, \
-      OPTIMIZATION := LOW, \
-      CFLAGS := -fpascal-strings \
-          -fobjc-gc \
-          -gdwarf-2 \
-          $(CFLAGS_JDKLIB) -I$(JDK_OUTPUTDIR)/gensrc_headers_jobjc \
-          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-          -m32, \
-      LDFLAGS := $(LDFLAGS_JDKLIB) \
-          -m32, \
-      LDFLAGS_SUFFIX := -framework Foundation -framework JavaVM \
-          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-          -framework JavaNativeFoundation \
-          -lffi, \
-      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjobjc32, \
-      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
-
-  $(eval $(call SetupNativeCompilation,BUILD_LIBJOBJC64, \
-      LIBRARY := JObjC, \
-      OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/libjobjc64, \
-      SRC := $(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/native \
-          $(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/native, \
-      LANG := C, \
-      OPTIMIZATION := LOW, \
-      CFLAGS := -fpascal-strings \
-          -fobjc-gc \
-          -gdwarf-2 \
-          $(CFLAGS_JDKLIB) -I$(JDK_OUTPUTDIR)/gensrc_headers_jobjc \
-          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-          , \
-      LDFLAGS := -fpascal-strings \
-          -fobjc-gc \
-          -gdwarf-2 \
-          $(LDFLAGS_JDKLIB) \
-          $(call SET_SHARED_LIBRARY_ORIGIN), \
-      LDFLAGS_SUFFIX := -framework Foundation -framework JavaVM \
-          -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-          -framework JavaNativeFoundation \
-          -lffi, \
-      OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjobjc64, \
-      DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
-
-  $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)JObjC$(SHARED_LIBRARY_SUFFIX): $(BUILD_LIBJOBJC32) $(BUILD_LIBJOBJC64)
-	$(LIPO) -create -output $@ $(BUILD_LIBJOBJC32) $(BUILD_LIBJOBJC64)
-
-  BUILD_LIBRARIES += $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)JObjC$(SHARED_LIBRARY_SUFFIX)
-
-endif
-
-##########################################################################################
-
 ifndef OPENJDK
   ifeq ($(OPENJDK_TARGET_OS), windows)
 
--- a/jdk/make/mapfiles/libjava/mapfile-vers	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/make/mapfiles/libjava/mapfile-vers	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -273,7 +273,6 @@
                 Java_sun_misc_Version_getJdkSpecialVersion;
                 Java_sun_misc_Version_getJvmVersionInfo;
                 Java_sun_misc_Version_getJvmSpecialVersion;
-                Java_sun_misc_VM_getThreadStateValues;
 		Java_sun_misc_VM_latestUserDefinedLoader;
                 Java_sun_misc_VM_initialize;
 		Java_sun_misc_VMSupport_initAgentProperties;
--- a/jdk/make/mapfiles/libnet/mapfile-vers	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/make/mapfiles/libnet/mapfile-vers	Wed Feb 05 08:57:33 2014 -0800
@@ -86,6 +86,8 @@
 		Java_java_net_PlainSocketImpl_socketConnect;
 		Java_java_net_PlainDatagramSocketImpl_getTimeToLive;
 		Java_java_net_PlainDatagramSocketImpl_setTimeToLive;
+		Java_sun_net_PortConfig_getUpper0;
+		Java_sun_net_PortConfig_getLower0;
 		Java_sun_net_dns_ResolverConfigurationImpl_localDomain0;
 		Java_sun_net_dns_ResolverConfigurationImpl_fallbackDomain0;
 		Java_sun_net_sdp_SdpSupport_convert0;
--- a/jdk/src/macosx/native/sun/awt/splashscreen/splashscreen_sys.m	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/macosx/native/sun/awt/splashscreen/splashscreen_sys.m	Wed Feb 05 08:57:33 2014 -0800
@@ -290,8 +290,8 @@
         SplashUnlock(splash);
         rc = poll(pfd, 1, timeout);
         SplashLock(splash);
-        if (splash->isVisible>0 && SplashTime() >= splash->time +
-                splash->frames[splash->currentFrame].delay) {
+        if (splash->isVisible > 0 && splash->currentFrame >= 0 &&
+                SplashTime() >= splash->time + splash->frames[splash->currentFrame].delay) {
             SplashNextFrame(splash);
             SplashRedrawWindow(splash);
         }
--- a/jdk/src/share/bin/java.c	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/bin/java.c	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -345,6 +345,13 @@
         } \
     } while (JNI_FALSE)
 
+#define CHECK_EXCEPTION_RETURN(CER_return_value) \
+    do { \
+        if ((*env)->ExceptionOccurred(env)) { \
+            return CER_return_value; \
+        } \
+    } while (JNI_FALSE)
+
 int JNICALL
 JavaMain(void * _args)
 {
@@ -1233,8 +1240,9 @@
                 "checkAndLoadMain",
                 "(ZILjava/lang/String;)Ljava/lang/Class;"));
 
-    str = NewPlatformString(env, name);
-    result = (*env)->CallStaticObjectMethod(env, cls, mid, USE_STDERR, mode, str);
+    NULL_CHECK0(str = NewPlatformString(env, name));
+    NULL_CHECK0(result = (*env)->CallStaticObjectMethod(env, cls, mid,
+                                                        USE_STDERR, mode, str));
 
     if (JLI_IsTraceLauncher()) {
         end   = CounterGet();
@@ -1480,7 +1488,7 @@
     NULL_CHECK(cls);
     NULL_CHECK(showSettingsID = (*env)->GetStaticMethodID(env, cls,
             "showSettings", "(ZLjava/lang/String;JJJZ)V"));
-    joptString = (*env)->NewStringUTF(env, optString);
+    NULL_CHECK(joptString = (*env)->NewStringUTF(env, optString));
     (*env)->CallStaticVoidMethod(env, cls, showSettingsID,
                                  USE_STDERR,
                                  joptString,
@@ -1521,31 +1529,35 @@
     NULL_CHECK(printHelp = (*env)->GetStaticMethodID(env, cls,
                                         "printHelpMessage", "(Z)V"));
 
-    jprogname = (*env)->NewStringUTF(env, _program_name);
+    NULL_CHECK(jprogname = (*env)->NewStringUTF(env, _program_name));
 
     /* Initialize the usage message with the usual preamble */
     (*env)->CallStaticVoidMethod(env, cls, initHelp, jprogname);
+    CHECK_EXCEPTION_RETURN();
 
 
     /* Assemble the other variant part of the usage */
     if ((knownVMs[0].flag == VM_KNOWN) ||
         (knownVMs[0].flag == VM_IF_SERVER_CLASS)) {
-      vm1 = (*env)->NewStringUTF(env, knownVMs[0].name);
-      vm2 =  (*env)->NewStringUTF(env, knownVMs[0].name+1);
+      NULL_CHECK(vm1 = (*env)->NewStringUTF(env, knownVMs[0].name));
+      NULL_CHECK(vm2 =  (*env)->NewStringUTF(env, knownVMs[0].name+1));
       (*env)->CallStaticVoidMethod(env, cls, vmSelect, vm1, vm2);
+      CHECK_EXCEPTION_RETURN();
     }
     for (i=1; i<knownVMsCount; i++) {
       if (knownVMs[i].flag == VM_KNOWN) {
-        vm1 =  (*env)->NewStringUTF(env, knownVMs[i].name);
-        vm2 =  (*env)->NewStringUTF(env, knownVMs[i].name+1);
+        NULL_CHECK(vm1 =  (*env)->NewStringUTF(env, knownVMs[i].name));
+        NULL_CHECK(vm2 =  (*env)->NewStringUTF(env, knownVMs[i].name+1));
         (*env)->CallStaticVoidMethod(env, cls, vmSelect, vm1, vm2);
+        CHECK_EXCEPTION_RETURN();
       }
     }
     for (i=1; i<knownVMsCount; i++) {
       if (knownVMs[i].flag == VM_ALIASED_TO) {
-        vm1 =  (*env)->NewStringUTF(env, knownVMs[i].name);
-        vm2 =  (*env)->NewStringUTF(env, knownVMs[i].alias+1);
+        NULL_CHECK(vm1 =  (*env)->NewStringUTF(env, knownVMs[i].name));
+        NULL_CHECK(vm2 =  (*env)->NewStringUTF(env, knownVMs[i].alias+1));
         (*env)->CallStaticVoidMethod(env, cls, vmSynonym, vm1, vm2);
+        CHECK_EXCEPTION_RETURN();
       }
     }
 
@@ -1558,8 +1570,9 @@
         defaultVM = knownVMs[0].server_class+1;
       }
 
-      vm1 =  (*env)->NewStringUTF(env, defaultVM);
+      NULL_CHECK(vm1 =  (*env)->NewStringUTF(env, defaultVM));
       (*env)->CallStaticVoidMethod(env, cls, vmErgo, isServerClassMachine,  vm1);
+      CHECK_EXCEPTION_RETURN();
     }
 
     /* Complete the usage message and print to stderr*/
--- a/jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/com/sun/beans/decoder/DocumentHandler.java	Wed Feb 05 08:57:33 2014 -0800
@@ -29,6 +29,7 @@
 import java.beans.ExceptionListener;
 
 import java.io.IOException;
+import java.io.StringReader;
 
 import java.lang.ref.Reference;
 import java.lang.ref.WeakReference;
@@ -246,6 +247,14 @@
     }
 
     /**
+     * Disables any external entities.
+     */
+    @Override
+    public InputSource resolveEntity(String publicId, String systemId) {
+        return new InputSource(new StringReader(""));
+    }
+
+    /**
      * Prepares this handler to read objects from XML document.
      */
     @Override
--- a/jdk/src/share/classes/com/sun/crypto/provider/TlsRsaPremasterSecretGenerator.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/com/sun/crypto/provider/TlsRsaPremasterSecretGenerator.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -72,13 +72,17 @@
             throw new IllegalStateException(
                 "TlsRsaPremasterSecretGenerator must be initialized");
         }
-        if (random == null) {
-            random = new SecureRandom();
+        byte[] b = spec.getEncodedSecret();
+        if (b == null) {
+            if (random == null) {
+                random = new SecureRandom();
+            }
+            b = new byte[48];
+            random.nextBytes(b);
+            b[0] = (byte)spec.getMajorVersion();
+            b[1] = (byte)spec.getMinorVersion();
         }
-        byte[] b = new byte[48];
-        random.nextBytes(b);
-        b[0] = (byte)spec.getMajorVersion();
-        b[1] = (byte)spec.getMinorVersion();
+
         return new SecretKeySpec(b, "TlsRsaPremasterSecret");
     }
 
--- a/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibEntry.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibEntry.java	Wed Feb 05 08:57:33 2014 -0800
@@ -27,17 +27,9 @@
 
 // java imports
 //
+import com.sun.jmx.snmp.SnmpDefinitions;
 import java.io.Serializable;
-import java.util.Hashtable;
-import java.util.Enumeration;
-
-// jmx imports
-//
-import com.sun.jmx.snmp.SnmpValue;
-import com.sun.jmx.snmp.SnmpVarBind;
 import com.sun.jmx.snmp.SnmpStatusException;
-import com.sun.jmx.snmp.agent.SnmpMibOid;
-import com.sun.jmx.snmp.agent.SnmpMibNode;
 
 /**
  * Represents a node in an SNMP MIB which corresponds to a table entry
@@ -99,7 +91,9 @@
      */
     public void validateVarId(long arc, Object userData)
         throws SnmpStatusException {
-        if (isVariable(arc) == false) throw noSuchNameException;
+        if (isVariable(arc) == false) {
+            throw new SnmpStatusException(SnmpDefinitions.snmpRspNoSuchName);
+        }
     }
 
     /**
--- a/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibGroup.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibGroup.java	Wed Feb 05 08:57:33 2014 -0800
@@ -108,8 +108,9 @@
      */
     public void validateVarId(long arc, Object userData)
         throws SnmpStatusException {
-        if (isVariable(arc) == false)
-            throw noSuchObjectException;
+        if (isVariable(arc) == false) {
+            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
+        }
     }
 
 
@@ -360,17 +361,20 @@
             validateVarId(arc, data);
 
             // The trailing .0 is missing in the OID
-            if (depth+2 > length)
-                throw noSuchInstanceException;
+            if (depth+2 > length) {
+                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
+            }
 
             // There are too many arcs left in the OID (there should remain
             // a single trailing .0)
-            if (depth+2 < length)
-                throw noSuchInstanceException;
+            if (depth+2 < length) {
+                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
+            }
 
             // The last trailing arc is not .0
-            if (oid[depth+1] != 0L)
-                throw noSuchInstanceException;
+            if (oid[depth+1] != 0L) {
+                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
+            }
 
             // It's one of our variable, register this node.
             handlers.add(this,depth,varbind);
@@ -389,12 +393,13 @@
         int length = oid.length;
         SnmpMibNode node = null;
 
-        if (handlers == null)
+        if (handlers == null) {
             // This should be considered as a genErr, but we do not want to
             // abort the whole request, so we're going to throw
             // a noSuchObject...
             //
-            throw noSuchObjectException;
+            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
+        }
 
         final Object data = handlers.getUserData();
         final int pduVersion = handlers.getRequestPduVersion();
@@ -430,7 +435,7 @@
                                                         depth+1,handlers,
                                                         checker);
                 }catch(SnmpStatusException ex) {
-                    throw noSuchObjectException;
+                    throw new SnmpStatusException(SnmpStatusException.noSuchObject);
                 } finally {
                     checker.remove(depth);
                 }
@@ -455,7 +460,7 @@
                     try {
                         checker.checkCurrentOid();
                     } catch(SnmpStatusException e) {
-                        throw noSuchObjectException;
+                        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
                     } finally {
                         checker.remove(depth,2);
                     }
@@ -500,7 +505,7 @@
             // The oid is not valid, we will throw an exception in order
             // to try with the next valid identifier...
             //
-            throw noSuchObjectException;
+            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
 
         } catch (SnmpStatusException e) {
             // We didn't find anything at the given arc, so we're going
--- a/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibNode.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibNode.java	Wed Feb 05 08:57:33 2014 -0800
@@ -155,7 +155,7 @@
                           long[] oid, int depth,
                           SnmpRequestTree handlers)
         throws SnmpStatusException {
-        throw noSuchObjectException;
+        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
     }
 
     /**
@@ -183,7 +183,7 @@
                                  long[] oid, int pos, int depth,
                                  SnmpRequestTree handlers, AcmChecker checker)
         throws SnmpStatusException {
-        throw noSuchObjectException;
+        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
     }
 
     /**
@@ -346,8 +346,9 @@
         final int[] a = table;
         final int val= (int) value;
 
-        if (a == null)
-            throw noSuchObjectException;
+        if (a == null) {
+            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
+        }
 
         int low= 0;
         int max= a.length;
@@ -356,11 +357,13 @@
 
         // Basic check
         //
-        if (max < 1)
-            throw noSuchObjectException;
+        if (max < 1) {
+            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
+        }
 
-        if (a[max-1] <= val)
-            throw noSuchObjectException;
+        if (a[max-1] <= val) {
+            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
+        }
 
         while (low <= max) {
             elmt= a[curr];
@@ -400,15 +403,4 @@
      * Contains the list of variable identifiers.
      */
     protected int[] varList;
-
-    /**
-     * Contains a predefined exception that is often fired when an
-     * object is not found in the MIB.
-     */
-    static final protected SnmpStatusException noSuchInstanceException =
-        new SnmpStatusException(SnmpStatusException.noSuchInstance);
-    static final protected SnmpStatusException noSuchObjectException =
-        new SnmpStatusException(SnmpStatusException.noSuchObject);
-    static final protected SnmpStatusException noSuchNameException =
-        new SnmpStatusException(SnmpDefinitions.snmpRspNoSuchName);
 }
--- a/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibOid.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibOid.java	Wed Feb 05 08:57:33 2014 -0800
@@ -160,12 +160,10 @@
 
         if (depth > length) {
             // Nothing is left... the oid is not valid
-            throw noSuchObjectException;
-
+            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
         } else if (depth == length) {
             // The oid is not complete...
-            throw noSuchInstanceException;
-
+            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
         } else {
             // Some children variable or subobject is being querried
             // getChild() will raise an exception if no child is found.
@@ -205,12 +203,13 @@
         final int length = oid.length;
         SnmpMibNode node = null;
         long[] result = null;
-        if (handlers == null)
+        if (handlers == null) {
             // This should be considered as a genErr, but we do not want to
             // abort the whole request, so we're going to throw
             // a noSuchObject...
             //
-            throw noSuchObjectException;
+            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
+        }
 
         final Object data = handlers.getUserData();
         final int pduVersion = handlers.getRequestPduVersion();
@@ -235,7 +234,7 @@
                 // SnmpOid result = null;
                 if (child == null) {
                     // shouldn't happen
-                    throw noSuchObjectException;
+                    throw new SnmpStatusException(SnmpStatusException.noSuchObject);
                     // validateVarId(index);
                     // handlers.add(this,varbind,depth);
                     // result = new SnmpOid(0);
@@ -444,11 +443,13 @@
         // first we need to retrieve the identifier in the list of children
         //
         final int pos= getInsertAt(id);
-        if (pos >= nbChildren)
-            throw noSuchObjectException;
+        if (pos >= nbChildren) {
+            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
+        }
 
-        if (varList[pos] != (int) id)
-            throw noSuchObjectException;
+        if (varList[pos] != (int) id) {
+            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
+        }
 
         // Access the node
         //
@@ -456,10 +457,11 @@
         try {
             child = children.elementAtNonSync(pos);
         } catch(ArrayIndexOutOfBoundsException e) {
-            throw noSuchObjectException;
+            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
         }
-        if (child == null)
-            throw noSuchInstanceException;
+        if (child == null) {
+            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
+        }
         return child;
     }
 
--- a/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibTable.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibTable.java	Wed Feb 05 08:57:33 2014 -0800
@@ -280,7 +280,7 @@
             SnmpVarBind var;
             for (Enumeration<SnmpVarBind> e= r.getElements(); e.hasMoreElements();) {
                 var = e.nextElement();
-                r.registerGetException(var,noSuchInstanceException);
+                r.registerGetException(var,new SnmpStatusException(SnmpStatusException.noSuchInstance));
             }
         }
 
@@ -1607,8 +1607,9 @@
     protected SnmpOid getNextOid(SnmpOid oid, Object userData)
         throws SnmpStatusException {
 
-        if (size == 0)
-            throw noSuchInstanceException;
+        if (size == 0) {
+            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
+        }
 
         final SnmpOid resOid = oid;
 
@@ -1619,7 +1620,7 @@
         if (last.equals(resOid)) {
             // Last element of the table ...
             //
-            throw noSuchInstanceException;
+            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
         }
 
         // First find the oid. This will allow to speed up retrieval process
@@ -1641,12 +1642,12 @@
                 // XX last = (SnmpOid) oids.elementAt(newPos);
                 last = tableoids[newPos];
             } catch(ArrayIndexOutOfBoundsException e) {
-                throw noSuchInstanceException;
+                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
             }
         } else {
             // We are dealing with the last element of the table ..
             //
-            throw noSuchInstanceException;
+            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
         }
 
 
@@ -1668,8 +1669,9 @@
      */
     protected SnmpOid getNextOid(Object userData)
         throws SnmpStatusException {
-        if (size == 0)
-            throw noSuchInstanceException;
+        if (size == 0) {
+            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
+        }
         // XX return (SnmpOid) oids.firstElement();
         return tableoids[0];
     }
@@ -1875,10 +1877,10 @@
         // not support creation.
         // We know that the entry does not exists if (isentry == false).
         if (!hasEntry) {
-            if (!handlers.isCreationAllowed())
+            if (!handlers.isCreationAllowed()) {
                 // we're not doing a set
-                throw noSuchInstanceException;
-            else if (!isCreationEnabled())
+                throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
+            } else if (!isCreationEnabled())
                 // we're doing a set but creation is disabled.
                 throw new
                     SnmpStatusException(SnmpStatusException.snmpRspNoAccess);
@@ -1922,12 +1924,13 @@
 
             int length = oid.length;
 
-            if (handlers == null)
-            // This should be considered as a genErr, but we do not want to
-            // abort the whole request, so we're going to throw
-            // a noSuchObject...
-            //
-            throw noSuchObjectException;
+            if (handlers == null) {
+                // This should be considered as a genErr, but we do not want to
+                // abort the whole request, so we're going to throw
+                // a noSuchObject...
+                //
+                throw new SnmpStatusException(SnmpStatusException.noSuchObject);
+            }
 
             final Object data = handlers.getUserData();
             final int pduVersion = handlers.getRequestPduVersion();
@@ -1961,7 +1964,7 @@
                 // so we won't find the next element in this table... (any
                 // element in this table will have a smaller OID)
                 //
-                throw noSuchObjectException;
+                throw new SnmpStatusException(SnmpStatusException.noSuchObject);
             } else if (oid[pos] < nodeId) {
                 // we must return the first leaf under the first columnar
                 // object, so we are back to our first case where pos was
@@ -2051,8 +2054,9 @@
                     //     in tables can't be properly supported (all rows
                     //     must have the same holes)
                     //
-                    if (skipEntryVariable(entryoid,var,data,pduVersion))
-                        throw noSuchObjectException;
+                    if (skipEntryVariable(entryoid,var,data,pduVersion)) {
+                        throw new SnmpStatusException(SnmpStatusException.noSuchObject);
+                    }
                 } catch(SnmpStatusException se) {
                     entryoid = getNextOid(data);
                     var = getNextVarEntryId(entryoid,var,data,pduVersion);
@@ -2085,8 +2089,9 @@
             // So we throw the exception.
             // => will skip to next node in the MIB tree.
             //
-            if (entryoid == null || var == -1 ) throw noSuchObjectException;
-
+            if (entryoid == null || var == -1 ) {
+                throw new SnmpStatusException(SnmpStatusException.noSuchObject);
+            }
 
             // So here we know both the row (entryoid) and the column (var)
             //
@@ -2097,8 +2102,9 @@
                 // for this specific entry, it is not readable for any
                 // other entry => skip to next column.
                 //
-                if (!isReadableEntryId(entryoid,var,data))
-                    throw noSuchObjectException;
+                if (!isReadableEntryId(entryoid,var,data)) {
+                    throw new SnmpStatusException(SnmpStatusException.noSuchObject);
+                }
 
                 // Prepare the result and the ACM checker.
                 //
@@ -2161,8 +2167,9 @@
             // No need to continue, we throw an exception.
             // => will skip to next node in the MIB tree.
             //
-            if (entryoid == null || var == -1 )
-                throw noSuchObjectException;
+            if (entryoid == null || var == -1 ) {
+                throw new SnmpStatusException(SnmpStatusException.noSuchObject);
+            }
         }
     }
 
@@ -2182,14 +2189,15 @@
 
         // Control the length of the oid
         //
-        if (pos +2 >= length)
-            throw noSuchInstanceException;
+        if (pos +2 >= length) {
+            throw new SnmpStatusException(SnmpStatusException.noSuchInstance);
+        }
 
         // Check that the entry identifier is specified
         //
-        if (oid[pos] != nodeId)
-            throw noSuchObjectException;
-
+        if (oid[pos] != nodeId) {
+            throw new SnmpStatusException(SnmpStatusException.noSuchObject);
+        }
     }
 
     // ----------------------------------------------------------------------
--- a/jdk/src/share/classes/com/sun/jmx/snmp/daemon/SnmpRequestHandler.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/com/sun/jmx/snmp/daemon/SnmpRequestHandler.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1146,7 +1146,4 @@
 
     static final private String InterruptSysCallMsg =
         "Interrupted system call";
-
-    static final private SnmpStatusException noSuchNameException =
-        new SnmpStatusException(SnmpDefinitions.snmpRspNoSuchName) ;
 }
--- a/jdk/src/share/classes/com/sun/management/VMOption.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/com/sun/management/VMOption.java	Wed Feb 05 08:57:33 2014 -0800
@@ -97,6 +97,11 @@
          */
         ERGONOMIC,
         /**
+         * The VM option was set using the attach framework.
+         * @since 1.9
+         */
+        ATTACH_ON_DEMAND,
+        /**
          * The VM option was set via some other mechanism.
          */
         OTHER
--- a/jdk/src/share/classes/com/sun/naming/internal/FactoryEnumeration.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/com/sun/naming/internal/FactoryEnumeration.java	Wed Feb 05 08:57:33 2014 -0800
@@ -56,9 +56,12 @@
      * references so as not to prevent GC of the class loader.  Each
      * weak reference is tagged with the factory's class name so the
      * class can be reloaded if the reference is cleared.
-
+     *
      * @param factories A non-null list
      * @param loader    The class loader of the list's contents
+     *
+     * This internal method is used with Thread Context Class Loader (TCCL),
+     * please don't expose this method as public.
      */
     FactoryEnumeration(List<NamedWeakReference<Object>> factories,
                        ClassLoader loader) {
@@ -79,7 +82,8 @@
 
             try {
                 if (answer == null) {   // reload class if weak ref cleared
-                    answer = Class.forName(className, true, loader);
+                    Class<?> cls = Class.forName(className, true, loader);
+                    answer = cls;
                 }
                 // Instantiate Class to get factory
                 answer = ((Class) answer).newInstance();
--- a/jdk/src/share/classes/com/sun/naming/internal/VersionHelper12.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/com/sun/naming/internal/VersionHelper12.java	Wed Feb 05 08:57:33 2014 -0800
@@ -53,21 +53,24 @@
 
 final class VersionHelper12 extends VersionHelper {
 
-    private boolean getSystemPropsFailed = false;
-
-    VersionHelper12() {} // Disallow external from creating one of these.
+    // Disallow external from creating one of these.
+    VersionHelper12() {
+    }
 
     public Class<?> loadClass(String className) throws ClassNotFoundException {
-        ClassLoader cl = getContextClassLoader();
-        return Class.forName(className, true, cl);
+        return loadClass(className, getContextClassLoader());
     }
 
     /**
-      * Package private.
-      */
+     * Package private.
+     *
+     * This internal method is used with Thread Context Class Loader (TCCL),
+     * please don't expose this method as public.
+     */
     Class<?> loadClass(String className, ClassLoader cl)
         throws ClassNotFoundException {
-        return Class.forName(className, true, cl);
+        Class<?> cls = Class.forName(className, true, cl);
+        return cls;
     }
 
     /**
@@ -75,13 +78,13 @@
      * @param codebase A non-null, space-separated list of URL strings.
      */
     public Class<?> loadClass(String className, String codebase)
-        throws ClassNotFoundException, MalformedURLException {
-        ClassLoader cl;
+            throws ClassNotFoundException, MalformedURLException {
 
         ClassLoader parent = getContextClassLoader();
-        cl = URLClassLoader.newInstance(getUrlArray(codebase), parent);
+        ClassLoader cl =
+                 URLClassLoader.newInstance(getUrlArray(codebase), parent);
 
-        return Class.forName(className, true, cl);
+        return loadClass(className, cl);
     }
 
     String getJndiProperty(final int i) {
@@ -99,16 +102,12 @@
     }
 
     String[] getJndiProperties() {
-        if (getSystemPropsFailed) {
-            return null;        // after one failure, don't bother trying again
-        }
         Properties sysProps = AccessController.doPrivileged(
             new PrivilegedAction<Properties>() {
                 public Properties run() {
                     try {
                         return System.getProperties();
                     } catch (SecurityException e) {
-                        getSystemPropsFailed = true;
                         return null;
                     }
                 }
@@ -173,17 +172,32 @@
         return new InputStreamEnumeration(urls);
     }
 
+    /**
+     * Package private.
+     *
+     * This internal method returns Thread Context Class Loader (TCCL),
+     * if null, returns the system Class Loader.
+     *
+     * Please don't expose this method as public.
+     */
     ClassLoader getContextClassLoader() {
+
         return AccessController.doPrivileged(
             new PrivilegedAction<ClassLoader>() {
                 public ClassLoader run() {
-                    return Thread.currentThread().getContextClassLoader();
+                    ClassLoader loader =
+                            Thread.currentThread().getContextClassLoader();
+                    if (loader == null) {
+                        // Don't use bootstrap class loader directly!
+                        loader = ClassLoader.getSystemClassLoader();
+                    }
+
+                    return loader;
                 }
             }
         );
     }
 
-
     /**
      * Given an enumeration of URLs, an instance of this class represents
      * an enumeration of their InputStreams.  Each operation on the URL
--- a/jdk/src/share/classes/com/sun/nio/sctp/SctpChannel.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/com/sun/nio/sctp/SctpChannel.java	Wed Feb 05 08:57:33 2014 -0800
@@ -276,6 +276,11 @@
      *
      * @throws  IOException
      *          If some other I/O error occurs
+     *
+     * @throws  SecurityException
+     *          If a security manager has been installed and its
+     *          {@link SecurityManager#checkListen checkListen} method denies
+     *          the operation
      */
     public abstract SctpChannel bind(SocketAddress local)
         throws IOException;
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer11.java	Wed Feb 05 08:57:33 2014 -0800
@@ -382,7 +382,8 @@
             } else if (!isVisible(xmlns)) {
                 //There is a definition but the xmlns is not selected by the xpath.
                 //then xmlns=""
-                n = ns.addMappingAndRender(XMLNS, "", nullNode);
+                n = ns.addMappingAndRender(
+                        XMLNS, "", getNullNode(xmlns.getOwnerDocument()));
             }
             //output the xmlns def if needed.
             if (n != null) {
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315.java	Wed Feb 05 08:57:33 2014 -0800
@@ -327,7 +327,8 @@
             } else if (!isVisible(xmlns)) {
                 //There is a definition but the xmlns is not selected by the xpath.
                 //then xmlns=""
-                n = ns.addMappingAndRender(XMLNS, "", nullNode);
+                n = ns.addMappingAndRender(
+                        XMLNS, "", getNullNode(xmlns.getOwnerDocument()));
             }
             //output the xmlns def if needed.
             if (n != null) {
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315Excl.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/Canonicalizer20010315Excl.java	Wed Feb 05 08:57:33 2014 -0800
@@ -292,7 +292,7 @@
             if (xmlns != null && !isVisible(xmlns)) {
                 // There is a definition but the xmlns is not selected by the
                 // xpath. then xmlns=""
-                ns.addMapping(XMLNS, "", nullNode);
+                ns.addMapping(XMLNS, "", getNullNode(xmlns.getOwnerDocument()));
             }
 
             String prefix = null;
--- a/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/c14n/implementations/CanonicalizerBase.java	Wed Feb 05 08:57:33 2014 -0800
@@ -34,8 +34,6 @@
 import java.util.Map;
 import java.util.Set;
 
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 
 import com.sun.org.apache.xml.internal.security.c14n.CanonicalizationException;
@@ -49,6 +47,7 @@
 import org.w3c.dom.Attr;
 import org.w3c.dom.Comment;
 import org.w3c.dom.Element;
+import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 import org.w3c.dom.ProcessingInstruction;
@@ -64,8 +63,9 @@
     public static final String XMLNS = "xmlns";
 
     protected static final AttrCompare COMPARE = new AttrCompare();
-    protected static final Attr nullNode;
 
+    // Make sure you clone the following mutable arrays before passing to
+    // potentially untrusted objects such as OutputStreams.
     private static final byte[] END_PI = {'?','>'};
     private static final byte[] BEGIN_PI = {'<','?'};
     private static final byte[] END_COMM = {'-','-','>'};
@@ -78,27 +78,17 @@
     private static final byte[] LT = {'&','l','t',';'};
     private static final byte[] END_TAG = {'<','/'};
     private static final byte[] AMP = {'&','a','m','p',';'};
-    private static final byte[] equalsStr = {'=','\"'};
+    private static final byte[] EQUALS_STR = {'=','\"'};
 
     protected static final int NODE_BEFORE_DOCUMENT_ELEMENT = -1;
     protected static final int NODE_NOT_BEFORE_OR_AFTER_DOCUMENT_ELEMENT = 0;
     protected static final int NODE_AFTER_DOCUMENT_ELEMENT = 1;
 
-    static {
-        // The null xmlns definition.
-        try {
-            DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
-            nullNode = documentBuilder.newDocument().createAttributeNS(Constants.NamespaceSpecNS, XMLNS);
-            nullNode.setValue("");
-        } catch (Exception e) {
-            throw new RuntimeException("Unable to create nullNode: " + e);
-        }
-    }
-
     private List<NodeFilter> nodeFilter;
 
     private boolean includeComments;
     private Set<Node> xpathNodeSet;
+
     /**
      * The node to be skipped/excluded from the DOM tree
      * in subtree canonicalizations.
@@ -107,6 +97,11 @@
     private OutputStream writer = new ByteArrayOutputStream();
 
     /**
+     * The null xmlns definition.
+     */
+    private Attr nullNode;
+
+    /**
      * Constructor CanonicalizerBase
      *
      * @param includeComments
@@ -310,7 +305,7 @@
                 writer.write('>');
                 sibling = currentNode.getFirstChild();
                 if (sibling == null) {
-                    writer.write(END_TAG);
+                    writer.write(END_TAG.clone());
                     UtfHelpper.writeStringToUtf8(name, writer);
                     writer.write('>');
                     //We finished with this level, pop to the previous definitions.
@@ -328,7 +323,7 @@
                 break;
             }
             while (sibling == null && parentNode != null) {
-                writer.write(END_TAG);
+                writer.write(END_TAG.clone());
                 UtfHelpper.writeByte(((Element)parentNode).getTagName(), writer, cache);
                 writer.write('>');
                 //We finished with this level, pop to the previous definitions.
@@ -488,7 +483,7 @@
 
                 if (sibling == null) {
                     if (currentNodeIsVisible) {
-                        writer.write(END_TAG);
+                        writer.write(END_TAG.clone());
                         UtfHelpper.writeByte(name, writer, cache);
                         writer.write('>');
                         //We finished with this level, pop to the previous definitions.
@@ -510,7 +505,7 @@
             }
             while (sibling == null && parentNode != null) {
                 if (isVisible(parentNode)) {
-                    writer.write(END_TAG);
+                    writer.write(END_TAG.clone());
                     UtfHelpper.writeByte(((Element)parentNode).getTagName(), writer, cache);
                     writer.write('>');
                     //We finished with this level, pop to the previous definitions.
@@ -641,8 +636,9 @@
         parents.clear();
         Attr nsprefix;
         if (((nsprefix = ns.getMappingWithoutRendered(XMLNS)) != null)
-            && "".equals(nsprefix.getValue())) {
-            ns.addMappingAndRender(XMLNS, "", nullNode);
+                && "".equals(nsprefix.getValue())) {
+            ns.addMappingAndRender(
+                    XMLNS, "", getNullNode(nsprefix.getOwnerDocument()));
         }
     }
 
@@ -696,7 +692,7 @@
     ) throws IOException {
         writer.write(' ');
         UtfHelpper.writeByte(name, writer, cache);
-        writer.write(equalsStr);
+        writer.write(EQUALS_STR.clone());
         byte[] toWrite;
         final int length = value.length();
         int i = 0;
@@ -706,27 +702,27 @@
             switch (c) {
 
             case '&' :
-                toWrite = AMP;
+                toWrite = AMP.clone();
                 break;
 
             case '<' :
-                toWrite = LT;
+                toWrite = LT.clone();
                 break;
 
             case '"' :
-                toWrite = QUOT;
+                toWrite = QUOT.clone();
                 break;
 
             case 0x09 :    // '\t'
-                toWrite = X9;
+                toWrite = X9.clone();
                 break;
 
             case 0x0A :    // '\n'
-                toWrite = XA;
+                toWrite = XA.clone();
                 break;
 
             case 0x0D :    // '\r'
-                toWrite = XD;
+                toWrite = XD.clone();
                 break;
 
             default :
@@ -756,7 +752,7 @@
         if (position == NODE_AFTER_DOCUMENT_ELEMENT) {
             writer.write('\n');
         }
-        writer.write(BEGIN_PI);
+        writer.write(BEGIN_PI.clone());
 
         final String target = currentPI.getTarget();
         int length = target.length();
@@ -764,7 +760,7 @@
         for (int i = 0; i < length; i++) {
             char c = target.charAt(i);
             if (c == 0x0D) {
-                writer.write(XD);
+                writer.write(XD.clone());
             } else {
                 if (c < 0x80) {
                     writer.write(c);
@@ -784,14 +780,14 @@
             for (int i = 0; i < length; i++) {
                 char c = data.charAt(i);
                 if (c == 0x0D) {
-                    writer.write(XD);
+                    writer.write(XD.clone());
                 } else {
                     UtfHelpper.writeCharToUtf8(c, writer);
                 }
             }
         }
 
-        writer.write(END_PI);
+        writer.write(END_PI.clone());
         if (position == NODE_BEFORE_DOCUMENT_ELEMENT) {
             writer.write('\n');
         }
@@ -810,7 +806,7 @@
         if (position == NODE_AFTER_DOCUMENT_ELEMENT) {
             writer.write('\n');
         }
-        writer.write(BEGIN_COMM);
+        writer.write(BEGIN_COMM.clone());
 
         final String data = currentComment.getData();
         final int length = data.length();
@@ -818,7 +814,7 @@
         for (int i = 0; i < length; i++) {
             char c = data.charAt(i);
             if (c == 0x0D) {
-                writer.write(XD);
+                writer.write(XD.clone());
             } else {
                 if (c < 0x80) {
                     writer.write(c);
@@ -828,7 +824,7 @@
             }
         }
 
-        writer.write(END_COMM);
+        writer.write(END_COMM.clone());
         if (position == NODE_BEFORE_DOCUMENT_ELEMENT) {
             writer.write('\n');
         }
@@ -852,19 +848,19 @@
             switch (c) {
 
             case '&' :
-                toWrite = AMP;
+                toWrite = AMP.clone();
                 break;
 
             case '<' :
-                toWrite = LT;
+                toWrite = LT.clone();
                 break;
 
             case '>' :
-                toWrite = GT;
+                toWrite = GT.clone();
                 break;
 
             case 0xD :
-                toWrite = XD;
+                toWrite = XD.clone();
                 break;
 
             default :
@@ -879,4 +875,18 @@
         }
     }
 
+    // The null xmlns definition.
+    protected Attr getNullNode(Document ownerDocument) {
+        if (nullNode == null) {
+            try {
+                nullNode = ownerDocument.createAttributeNS(
+                                    Constants.NamespaceSpecNS, XMLNS);
+                nullNode.setValue("");
+            } catch (Exception e) {
+                throw new RuntimeException("Unable to create nullNode: " + e);
+            }
+        }
+        return nullNode;
+    }
+
 }
--- a/jdk/src/share/classes/com/sun/rowset/internal/XmlReaderContentHandler.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/com/sun/rowset/internal/XmlReaderContentHandler.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -660,7 +660,7 @@
                      //Added the handling for Class tags to take care of maps
                      //Makes an entry into the map upon end of class tag
                      try{
-                          typeMap.put(Key_map,Class.forName(Value_map));
+                          typeMap.put(Key_map,sun.reflect.misc.ReflectUtil.forName(Value_map));
 
                         }catch(ClassNotFoundException ex) {
                           throw new SAXException(MessageFormat.format(resBundle.handleGetObject("xmlrch.errmap").toString(), ex.getMessage()));
--- a/jdk/src/share/classes/java/awt/AWTEventMulticaster.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/AWTEventMulticaster.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -609,6 +609,7 @@
      * @param b window-state-listener-b
      * @since 1.4
      */
+    @SuppressWarnings("overloads")
     public static WindowStateListener add(WindowStateListener a,
                                           WindowStateListener b) {
         return (WindowStateListener)addInternal(a, b);
@@ -632,6 +633,7 @@
      * @param a action-listener-a
      * @param b action-listener-b
      */
+    @SuppressWarnings("overloads")
     public static ActionListener add(ActionListener a, ActionListener b) {
         return (ActionListener)addInternal(a, b);
     }
@@ -642,6 +644,7 @@
      * @param a item-listener-a
      * @param b item-listener-b
      */
+    @SuppressWarnings("overloads")
     public static ItemListener add(ItemListener a, ItemListener b) {
         return (ItemListener)addInternal(a, b);
     }
@@ -652,9 +655,11 @@
      * @param a adjustment-listener-a
      * @param b adjustment-listener-b
      */
+    @SuppressWarnings("overloads")
     public static AdjustmentListener add(AdjustmentListener a, AdjustmentListener b) {
         return (AdjustmentListener)addInternal(a, b);
     }
+    @SuppressWarnings("overloads")
     public static TextListener add(TextListener a, TextListener b) {
         return (TextListener)addInternal(a, b);
     }
@@ -676,6 +681,7 @@
      * @param b hierarchy-listener-b
      * @since 1.3
      */
+    @SuppressWarnings("overloads")
      public static HierarchyListener add(HierarchyListener a, HierarchyListener b) {
         return (HierarchyListener)addInternal(a, b);
      }
@@ -698,6 +704,7 @@
      * @param b mouse-wheel-listener-b
      * @since 1.4
      */
+    @SuppressWarnings("overloads")
     public static MouseWheelListener add(MouseWheelListener a,
                                          MouseWheelListener b) {
         return (MouseWheelListener)addInternal(a, b);
@@ -780,6 +787,7 @@
      * @param oldl the window-state-listener being removed
      * @since 1.4
      */
+    @SuppressWarnings("overloads")
     public static WindowStateListener remove(WindowStateListener l,
                                              WindowStateListener oldl) {
         return (WindowStateListener) removeInternal(l, oldl);
@@ -803,6 +811,7 @@
      * @param l action-listener-l
      * @param oldl the action-listener being removed
      */
+    @SuppressWarnings("overloads")
     public static ActionListener remove(ActionListener l, ActionListener oldl) {
         return (ActionListener) removeInternal(l, oldl);
     }
@@ -813,6 +822,7 @@
      * @param l item-listener-l
      * @param oldl the item-listener being removed
      */
+    @SuppressWarnings("overloads")
     public static ItemListener remove(ItemListener l, ItemListener oldl) {
         return (ItemListener) removeInternal(l, oldl);
     }
@@ -823,9 +833,11 @@
      * @param l adjustment-listener-l
      * @param oldl the adjustment-listener being removed
      */
+    @SuppressWarnings("overloads")
     public static AdjustmentListener remove(AdjustmentListener l, AdjustmentListener oldl) {
         return (AdjustmentListener) removeInternal(l, oldl);
     }
+    @SuppressWarnings("overloads")
     public static TextListener remove(TextListener l, TextListener oldl) {
         return (TextListener) removeInternal(l, oldl);
     }
@@ -847,6 +859,7 @@
      * @param oldl the hierarchy-listener being removed
      * @since 1.3
      */
+    @SuppressWarnings("overloads")
     public static HierarchyListener remove(HierarchyListener l, HierarchyListener oldl) {
         return (HierarchyListener) removeInternal(l, oldl);
     }
@@ -870,6 +883,7 @@
      * @param oldl the mouse-wheel-listener being removed
      * @since 1.4
      */
+    @SuppressWarnings("overloads")
     public static MouseWheelListener remove(MouseWheelListener l,
                                             MouseWheelListener oldl) {
       return (MouseWheelListener) removeInternal(l, oldl);
--- a/jdk/src/share/classes/java/awt/Graphics2D.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/Graphics2D.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,7 +44,7 @@
  * control over geometry, coordinate transformations, color management,
  * and text layout.  This is the fundamental class for rendering
  * 2-dimensional shapes, text and images on the  Java(tm) platform.
- * <p>
+ *
  * <h2>Coordinate Spaces</h2>
  * All coordinates passed to a <code>Graphics2D</code> object are specified
  * in a device-independent coordinate system called User Space, which is
@@ -229,7 +229,7 @@
  *
  * <h2>Default Rendering Attributes</h2>
  * The default values for the <code>Graphics2D</code> rendering attributes are:
- * <dl compact>
+ * <dl>
  * <dt><i><code>Paint</code></i>
  * <dd>The color of the <code>Component</code>.
  * <dt><i><code>Font</code></i>
@@ -351,7 +351,7 @@
  * fill(new Rectangle(x, y, w, h));
  * </pre>
  * is called.
- * <p>
+ *
  * <li>
  * Similarly, for draw operations, including <code>drawLine</code>,
  * <code>drawRect</code>, <code>drawRoundRect</code>,
@@ -363,7 +363,7 @@
  * draw(new Rectangle(x, y, w, h));
  * </pre>
  * is called.
- * <p>
+ *
  * <li>
  * The <code>draw3DRect</code> and <code>fill3DRect</code> methods were
  * implemented in terms of the <code>drawLine</code> and
--- a/jdk/src/share/classes/java/awt/MediaTracker.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/MediaTracker.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -65,7 +65,7 @@
  *
  * <p>
  * Here is an example of using <code>MediaTracker</code>:
- * <p>
+ *
  * <hr><blockquote><pre>{@code
  * import java.applet.Applet;
  * import java.awt.Color;
--- a/jdk/src/share/classes/java/awt/Toolkit.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/Toolkit.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -2299,6 +2299,7 @@
             super(a, b);
         }
 
+        @SuppressWarnings("overloads")
         static AWTEventListener add(AWTEventListener a,
                                     AWTEventListener b) {
             if (a == null)  return b;
@@ -2306,6 +2307,7 @@
             return new ToolkitEventMulticaster(a, b);
         }
 
+        @SuppressWarnings("overloads")
         static AWTEventListener remove(AWTEventListener l,
                                        AWTEventListener oldl) {
             return (AWTEventListener) removeInternal(l, oldl);
--- a/jdk/src/share/classes/java/awt/datatransfer/Clipboard.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/datatransfer/Clipboard.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -54,7 +54,13 @@
 
     String name;
 
+    /**
+     * The owner of the clipboard.
+     */
     protected ClipboardOwner owner;
+    /**
+     * Contents of the clipboard.
+     */
     protected Transferable contents;
 
     /**
@@ -75,7 +81,7 @@
 
     /**
      * Creates a clipboard object.
-     *
+     * @param name for the clipboard
      * @see java.awt.Toolkit#getSystemClipboard
      */
     public Clipboard(String name) {
@@ -84,6 +90,7 @@
 
     /**
      * Returns the name of this clipboard object.
+     * @return the name of this clipboard object
      *
      * @see java.awt.Toolkit#getSystemClipboard
      */
--- a/jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1184,16 +1184,24 @@
 
    /**
     * Does the <code>DataFlavor</code> represent a serialized object?
+    * @return whether or not a serialized object is represented
     */
-
     public boolean isMimeTypeSerializedObject() {
         return isMimeTypeEqual(javaSerializedObjectMimeType);
     }
 
+    /**
+     * Returns the default representation class.
+     * @return the default representation class
+     */
     public final Class<?> getDefaultRepresentationClass() {
         return ioInputStreamClass;
     }
 
+    /**
+     * Returns the name of the default representation class.
+     * @return the name of the default representation class
+     */
     public final String getDefaultRepresentationClassAsString() {
         return getDefaultRepresentationClass().getName();
     }
@@ -1201,8 +1209,9 @@
    /**
     * Does the <code>DataFlavor</code> represent a
     * <code>java.io.InputStream</code>?
+    * @return whether or not this {@code DataFlavor} represent a
+    * {@code java.io.InputStream}
     */
-
     public boolean isRepresentationClassInputStream() {
         return ioInputStreamClass.isAssignableFrom(representationClass);
     }
@@ -1211,6 +1220,9 @@
      * Returns whether the representation class for this
      * <code>DataFlavor</code> is <code>java.io.Reader</code> or a subclass
      * thereof.
+     * @return whether or not the representation class for this
+     * {@code DataFlavor} is {@code java.io.Reader} or a subclass
+     * thereof
      *
      * @since 1.4
      */
@@ -1222,6 +1234,9 @@
      * Returns whether the representation class for this
      * <code>DataFlavor</code> is <code>java.nio.CharBuffer</code> or a
      * subclass thereof.
+     * @return whether or not the representation class for this
+     * {@code DataFlavor} is {@code java.nio.CharBuffer} or a subclass
+     * thereof
      *
      * @since 1.4
      */
@@ -1233,6 +1248,9 @@
      * Returns whether the representation class for this
      * <code>DataFlavor</code> is <code>java.nio.ByteBuffer</code> or a
      * subclass thereof.
+     * @return whether or not the representation class for this
+     * {@code DataFlavor} is {@code java.nio.ByteBuffer} or a subclass
+     * thereof
      *
      * @since 1.4
      */
@@ -1408,6 +1426,9 @@
     *
     * This method is never invoked by this implementation from 1.1 onwards.
     *
+    * @param parameterName the parameter name
+    * @param parameterValue the parameter value
+    * @return the parameter value
     * @deprecated
     */
     @Deprecated
@@ -1424,6 +1445,8 @@
     *
     * This method is never invoked by this implementation from 1.1 onwards.
     *
+    * @param mimeType the mime type
+    * @return the mime type
     * @deprecated
     */
     @Deprecated
--- a/jdk/src/share/classes/java/awt/datatransfer/StringSelection.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/datatransfer/StringSelection.java	Wed Feb 05 08:57:33 2014 -0800
@@ -57,6 +57,7 @@
     /**
      * Creates a <code>Transferable</code> capable of transferring
      * the specified <code>String</code>.
+     * @param data the string to be transferred
      */
     public StringSelection(String data) {
         this.data = data;
--- a/jdk/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -181,6 +181,7 @@
 
     /**
      * Returns the default FlavorMap for this thread's ClassLoader.
+     * @return the default FlavorMap for this thread's ClassLoader
      */
     public static FlavorMap getDefaultFlavorMap() {
         ClassLoader contextClassLoader =
@@ -1309,6 +1310,8 @@
      * @param nat the <code>String</code> to decode
      * @return the decoded <code>DataFlavor</code>, or <code>null</code> if
      *         nat is not an encoded <code>String</code> native
+     * @throws ClassNotFoundException if the class of the data flavor
+     * is not loaded
      */
     public static DataFlavor decodeDataFlavor(String nat)
         throws ClassNotFoundException
--- a/jdk/src/share/classes/java/awt/datatransfer/Transferable.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/datatransfer/Transferable.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -62,6 +62,7 @@
      * of the object returned is defined by the representation class of the flavor.
      *
      * @param flavor the requested flavor for the data
+     * @return an object which represents the data to be transferred
      * @see DataFlavor#getRepresentationClass
      * @exception IOException                if the data is no longer available
      *              in the requested flavor.
--- a/jdk/src/share/classes/java/awt/dnd/DnDEventMulticaster.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/dnd/DnDEventMulticaster.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -141,6 +141,7 @@
      * @param a drag-source-motion-listener-a
      * @param b drag-source-motion-listener-b
      */
+    @SuppressWarnings("overloads")
     public static DragSourceMotionListener add(DragSourceMotionListener a,
                                                DragSourceMotionListener b) {
         return (DragSourceMotionListener)addInternal(a, b);
@@ -166,6 +167,7 @@
      * @param l drag-source-motion-listener-l
      * @param ol the drag-source-motion-listener being removed
      */
+    @SuppressWarnings("overloads")
     public static DragSourceMotionListener remove(DragSourceMotionListener l,
                                                   DragSourceMotionListener ol) {
         return (DragSourceMotionListener)removeInternal(l, ol);
--- a/jdk/src/share/classes/java/awt/dnd/DragSource.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/dnd/DragSource.java	Wed Feb 05 08:57:33 2014 -0800
@@ -495,6 +495,7 @@
      * and <code>DragGestureListener</code> on
      * the newly created object.
      * <P>
+     * @param <T> the type of {@code DragGestureRecognizer} to create
      * @param recognizerAbstractClass the requested abstract type
      * @param actions                 the permitted source drag actions
      * @param c                       the <code>Component</code> target
@@ -669,6 +670,7 @@
      * <code><em>Foo</em>Listener</code>s are registered using the
      * <code>add<em>Foo</em>Listener</code> method.
      *
+     * @param <T> the type of listener objects
      * @param listenerType the type of listeners requested; this parameter
      *          should specify an interface that descends from
      *          <code>java.util.EventListener</code>
--- a/jdk/src/share/classes/java/awt/dnd/DropTarget.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/dnd/DropTarget.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -566,6 +566,7 @@
      * DropTargetContextPeer as a drag operation encounters this
      * DropTarget. Accessing the Context while no Drag is current
      * has undefined results.
+     * @return the DropTargetContext associated with this DropTarget
      */
 
     protected DropTargetContext createDropTargetContext() {
@@ -766,9 +767,10 @@
 
     /**
      * create an embedded autoscroller
-     * <P>
+     *
      * @param c the <code>Component</code>
      * @param p the <code>Point</code>
+     * @return an embedded autoscroller
      */
 
     protected DropTargetAutoScroller createDropTargetAutoScroller(Component c, Point p) {
--- a/jdk/src/share/classes/java/awt/dnd/peer/DragSourceContextPeer.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/dnd/peer/DragSourceContextPeer.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,18 +47,24 @@
 
     /**
      * start a drag
+     * @param dsc the DragSourceContext
+     * @param c the cursor
+     * @param dragImage the image to be dragged
+     * @param imageOffset the offset
      */
 
     void startDrag(DragSourceContext dsc, Cursor c, Image dragImage, Point imageOffset) throws InvalidDnDOperationException;
 
     /**
      * return the current drag cursor
+     * @return the current drag cursor
      */
 
     Cursor getCursor();
 
     /**
      * set the current drag cursor
+     * @param c the cursor
      */
 
     void setCursor(Cursor c) throws InvalidDnDOperationException;
--- a/jdk/src/share/classes/java/awt/dnd/peer/DropTargetContextPeer.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/dnd/peer/DropTargetContextPeer.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,35 +44,42 @@
 
     /**
      * update the peer's notion of the Target's actions
+     * @param actions the actions
      */
 
     void setTargetActions(int actions);
 
     /**
      * get the current Target actions
+     * @return the current Target actions
      */
 
     int getTargetActions();
 
     /**
      * get the DropTarget associated with this peer
+     * @return the DropTarget associated with this peer
      */
 
     DropTarget getDropTarget();
 
     /**
      * get the (remote) DataFlavors from the peer
+     * @return the (remote) DataFlavors from the peer
      */
 
     DataFlavor[] getTransferDataFlavors();
 
     /**
      * get an input stream to the remote data
+     * @return an input stream to the remote data
      */
 
     Transferable getTransferable() throws InvalidDnDOperationException;
 
     /**
+     * Return whether or not the DragSource Transferable is in the
+     * same JVM as the Target.
      * @return if the DragSource Transferable is in the same JVM as the Target
      */
 
@@ -80,6 +87,7 @@
 
     /**
      * accept the Drag
+     * @param dragAction the drag action
      */
 
     void acceptDrag(int dragAction);
@@ -92,6 +100,7 @@
 
     /**
      * accept the Drop
+     * @param dropAction the drop action
      */
 
     void acceptDrop(int dropAction);
@@ -104,6 +113,7 @@
 
     /**
      * signal complete
+     * @param success the signal
      */
 
     void dropComplete(boolean success);
--- a/jdk/src/share/classes/java/awt/event/AWTEventListener.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/event/AWTEventListener.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -56,6 +56,7 @@
 
     /**
      * Invoked when an event is dispatched in the AWT.
+     * @param event the event to be processed
      */
     public void eventDispatched(AWTEvent event);
 
--- a/jdk/src/share/classes/java/awt/event/ActionListener.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/event/ActionListener.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,6 +46,7 @@
 
     /**
      * Invoked when an action occurs.
+     * @param e the event to be processed
      */
     public void actionPerformed(ActionEvent e);
 
--- a/jdk/src/share/classes/java/awt/event/AdjustmentListener.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/event/AdjustmentListener.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,7 @@
 
     /**
      * Invoked when the value of the adjustable has changed.
+     * @param e the event to be processed
      */
     public void adjustmentValueChanged(AdjustmentEvent e);
 
--- a/jdk/src/share/classes/java/awt/event/ComponentListener.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/event/ComponentListener.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -54,21 +54,25 @@
 public interface ComponentListener extends EventListener {
     /**
      * Invoked when the component's size changes.
+     * @param e the event to be processed
      */
     public void componentResized(ComponentEvent e);
 
     /**
      * Invoked when the component's position changes.
+     * @param e the event to be processed
      */
     public void componentMoved(ComponentEvent e);
 
     /**
      * Invoked when the component has been made visible.
+     * @param e the event to be processed
      */
     public void componentShown(ComponentEvent e);
 
     /**
      * Invoked when the component has been made invisible.
+     * @param e the event to be processed
      */
     public void componentHidden(ComponentEvent e);
 }
--- a/jdk/src/share/classes/java/awt/event/ContainerListener.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/event/ContainerListener.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -55,11 +55,13 @@
 public interface ContainerListener extends EventListener {
     /**
      * Invoked when a component has been added to the container.
+     * @param e the event to be processed
      */
     public void componentAdded(ContainerEvent e);
 
     /**
      * Invoked when a component has been removed from the container.
+     * @param e the event to be processed
      */
     public void componentRemoved(ContainerEvent e);
 
--- a/jdk/src/share/classes/java/awt/event/FocusListener.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/event/FocusListener.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -51,11 +51,13 @@
 
     /**
      * Invoked when a component gains the keyboard focus.
+     * @param e the event to be processed
      */
     public void focusGained(FocusEvent e);
 
     /**
      * Invoked when a component loses the keyboard focus.
+     * @param e the event to be processed
      */
     public void focusLost(FocusEvent e);
 }
--- a/jdk/src/share/classes/java/awt/event/HierarchyBoundsListener.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/event/HierarchyBoundsListener.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,11 +52,13 @@
 public interface HierarchyBoundsListener extends EventListener {
     /**
      * Called when an ancestor of the source is moved.
+     * @param e the event to be processed
      */
     public void ancestorMoved(HierarchyEvent e);
 
     /**
      * Called when an ancestor of the source is resized.
+     * @param e the event to be processed
      */
     public void ancestorResized(HierarchyEvent e);
 }
--- a/jdk/src/share/classes/java/awt/event/HierarchyListener.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/event/HierarchyListener.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -51,6 +51,7 @@
      * Called when the hierarchy has been changed. To discern the actual
      * type of change, call <code>HierarchyEvent.getChangeFlags()</code>.
      *
+     * @param e the event to be processed
      * @see HierarchyEvent#getChangeFlags()
      */
     public void hierarchyChanged(HierarchyEvent e);
--- a/jdk/src/share/classes/java/awt/event/InputEvent.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/event/InputEvent.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -233,7 +233,8 @@
      * This limit is defined by the relevant number
      * of buttons that may hypothetically exist on the mouse but it is greater than the
      * {@link java.awt.MouseInfo#getNumberOfButtons() MouseInfo.getNumberOfButtons()}.
-     * <p>
+     *
+     * @return a mask for an existing mouse button.
      * @throws IllegalArgumentException if {@code button} is less than zero or greater than the number
      *         of button masks reserved for buttons
      * @since 7.0
@@ -368,6 +369,7 @@
 
     /**
      * Returns whether or not the Shift modifier is down on this event.
+     * @return whether or not the Shift modifier is down on this event
      */
     public boolean isShiftDown() {
         return (modifiers & SHIFT_MASK) != 0;
@@ -375,6 +377,7 @@
 
     /**
      * Returns whether or not the Control modifier is down on this event.
+     * @return whether or not the Control modifier is down on this event
      */
     public boolean isControlDown() {
         return (modifiers & CTRL_MASK) != 0;
@@ -382,6 +385,7 @@
 
     /**
      * Returns whether or not the Meta modifier is down on this event.
+     * @return whether or not the Meta modifier is down on this event
      */
     public boolean isMetaDown() {
         return (modifiers & META_MASK) != 0;
@@ -389,6 +393,7 @@
 
     /**
      * Returns whether or not the Alt modifier is down on this event.
+     * @return whether or not the Alt modifier is down on this event
      */
     public boolean isAltDown() {
         return (modifiers & ALT_MASK) != 0;
@@ -396,6 +401,7 @@
 
     /**
      * Returns whether or not the AltGraph modifier is down on this event.
+     * @return whether or not the AltGraph modifier is down on this event
      */
     public boolean isAltGraphDown() {
         return (modifiers & ALT_GRAPH_MASK) != 0;
@@ -404,6 +410,7 @@
     /**
      * Returns the difference in milliseconds between the timestamp of when this event occurred and
      * midnight, January 1, 1970 UTC.
+     * @return the difference in milliseconds between the timestamp and midnight, January 1, 1970 UTC
      */
     public long getWhen() {
         return when;
@@ -411,6 +418,7 @@
 
     /**
      * Returns the modifier mask for this event.
+     * @return the modifier mask for this event
      */
     public int getModifiers() {
         return modifiers & (JDK_1_3_MODIFIERS | HIGH_MODIFIERS);
@@ -451,6 +459,7 @@
      * </PRE>
      * The above code will work even if new modifiers are added.
      *
+     * @return the extended modifier mask for this event
      * @since 1.4
      */
     public int getModifiersEx() {
@@ -467,6 +476,7 @@
 
     /**
      * Returns whether or not this event has been consumed.
+     * @return whether or not this event has been consumed
      * @see #consume
      */
     public boolean isConsumed() {
@@ -487,6 +497,9 @@
      * Zero parameter means that no modifiers were passed and will
      * cause the returning an empty string.
      *
+     * @return a String describing the extended modifier keys and
+     * mouse buttons
+     *
      * @param modifiers a modifier mask describing the extended
      *                modifier keys and mouse buttons for the event
      * @return a text description of the combination of extended
--- a/jdk/src/share/classes/java/awt/event/InputMethodEvent.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/event/InputMethodEvent.java	Wed Feb 05 08:57:33 2014 -0800
@@ -277,6 +277,7 @@
 
     /**
      * Gets the number of committed characters in the text.
+     * @return the number of committed characters in the text
      */
     public int getCommittedCharacterCount() {
         return committedCharacterCount;
--- a/jdk/src/share/classes/java/awt/event/InputMethodListener.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/event/InputMethodListener.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,17 +40,17 @@
  * @see java.awt.im.InputMethodRequests
  * @since 1.2
  */
-
 public interface InputMethodListener extends EventListener {
 
     /**
      * Invoked when the text entered through an input method has changed.
+     * @param event the event to be processed
      */
     void inputMethodTextChanged(InputMethodEvent event);
 
     /**
      * Invoked when the caret within composed text has changed.
+     * @param event the event to be processed
      */
     void caretPositionChanged(InputMethodEvent event);
-
 }
--- a/jdk/src/share/classes/java/awt/event/ItemListener.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/event/ItemListener.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -50,6 +50,7 @@
      * Invoked when an item has been selected or deselected by the user.
      * The code written for this method performs the operations
      * that need to occur when an item is selected (or deselected).
+     * @param e the event to be processed
      */
     void itemStateChanged(ItemEvent e);
 
--- a/jdk/src/share/classes/java/awt/event/KeyEvent.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/event/KeyEvent.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -132,7 +132,7 @@
  * <p>
  * WARNING: Aside from those keys that are defined by the Java language
  * (VK_ENTER, VK_BACK_SPACE, and VK_TAB), do not rely on the values of the VK_
- * constants.  Sun reserves the right to change these values as needed
+ * constants.  The platform steward reserves the right to change these values as needed
  * to accommodate a wider range of keyboards in the future.
  * <p>
  * An unspecified behavior will be caused if the {@code id} parameter
@@ -194,21 +194,52 @@
 
     /* Virtual key codes. */
 
+    /** Constant for the ENTER virtual key. */
     public static final int VK_ENTER          = '\n';
+
+    /** Constant for the BACK_SPACE virtual key. */
     public static final int VK_BACK_SPACE     = '\b';
+
+    /** Constant for the TAB virtual key. */
     public static final int VK_TAB            = '\t';
+
+    /** Constant for the CANCEL virtual key. */
     public static final int VK_CANCEL         = 0x03;
+
+    /** Constant for the CLEAR virtual key. */
     public static final int VK_CLEAR          = 0x0C;
+
+    /** Constant for the SHIFT virtual key. */
     public static final int VK_SHIFT          = 0x10;
+
+    /** Constant for the CONTROL virtual key. */
     public static final int VK_CONTROL        = 0x11;
+
+    /** Constant for the ALT virtual key. */
     public static final int VK_ALT            = 0x12;
+
+    /** Constant for the PAUSE virtual key. */
     public static final int VK_PAUSE          = 0x13;
+
+    /** Constant for the CAPS_LOCK virtual key. */
     public static final int VK_CAPS_LOCK      = 0x14;
+
+    /** Constant for the ESCAPE virtual key. */
     public static final int VK_ESCAPE         = 0x1B;
+
+    /** Constant for the SPACE virtual key. */
     public static final int VK_SPACE          = 0x20;
+
+    /** Constant for the PAGE_UP virtual key. */
     public static final int VK_PAGE_UP        = 0x21;
+
+    /** Constant for the PAGE_DOWN virtual key. */
     public static final int VK_PAGE_DOWN      = 0x22;
+
+    /** Constant for the END virtual key. */
     public static final int VK_END            = 0x23;
+
+    /** Constant for the HOME virtual key. */
     public static final int VK_HOME           = 0x24;
 
     /**
@@ -257,15 +288,35 @@
     public static final int VK_SLASH          = 0x2F;
 
     /** VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
+
+    /** Constant for the "0" key. */
     public static final int VK_0              = 0x30;
+
+    /** Constant for the "1" key. */
     public static final int VK_1              = 0x31;
+
+    /** Constant for the "2" key. */
     public static final int VK_2              = 0x32;
+
+    /** Constant for the "3" key. */
     public static final int VK_3              = 0x33;
+
+    /** Constant for the "4" key. */
     public static final int VK_4              = 0x34;
+
+    /** Constant for the "5" key. */
     public static final int VK_5              = 0x35;
+
+    /** Constant for the "6" key. */
     public static final int VK_6              = 0x36;
+
+    /** Constant for the "7" key. */
     public static final int VK_7              = 0x37;
+
+    /** Constant for the "8" key. */
     public static final int VK_8              = 0x38;
+
+    /** Constant for the "9" key. */
     public static final int VK_9              = 0x39;
 
     /**
@@ -279,31 +330,83 @@
     public static final int VK_EQUALS         = 0x3D;
 
     /** VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
+
+    /** Constant for the "A" key. */
     public static final int VK_A              = 0x41;
+
+    /** Constant for the "B" key. */
     public static final int VK_B              = 0x42;
+
+    /** Constant for the "C" key. */
     public static final int VK_C              = 0x43;
+
+    /** Constant for the "D" key. */
     public static final int VK_D              = 0x44;
+
+    /** Constant for the "E" key. */
     public static final int VK_E              = 0x45;
+
+    /** Constant for the "F" key. */
     public static final int VK_F              = 0x46;
+
+    /** Constant for the "G" key. */
     public static final int VK_G              = 0x47;
+
+    /** Constant for the "H" key. */
     public static final int VK_H              = 0x48;
+
+    /** Constant for the "I" key. */
     public static final int VK_I              = 0x49;
+
+    /** Constant for the "J" key. */
     public static final int VK_J              = 0x4A;
+
+    /** Constant for the "K" key. */
     public static final int VK_K              = 0x4B;
+
+    /** Constant for the "L" key. */
     public static final int VK_L              = 0x4C;
+
+    /** Constant for the "M" key. */
     public static final int VK_M              = 0x4D;
+
+    /** Constant for the "N" key. */
     public static final int VK_N              = 0x4E;
+
+    /** Constant for the "O" key. */
     public static final int VK_O              = 0x4F;
+
+    /** Constant for the "P" key. */
     public static final int VK_P              = 0x50;
+
+    /** Constant for the "Q" key. */
     public static final int VK_Q              = 0x51;
+
+    /** Constant for the "R" key. */
     public static final int VK_R              = 0x52;
+
+    /** Constant for the "S" key. */
     public static final int VK_S              = 0x53;
+
+    /** Constant for the "T" key. */
     public static final int VK_T              = 0x54;
+
+    /** Constant for the "U" key. */
     public static final int VK_U              = 0x55;
+
+    /** Constant for the "V" key. */
     public static final int VK_V              = 0x56;
+
+    /** Constant for the "W" key. */
     public static final int VK_W              = 0x57;
+
+    /** Constant for the "X" key. */
     public static final int VK_X              = 0x58;
+
+    /** Constant for the "Y" key. */
     public static final int VK_Y              = 0x59;
+
+    /** Constant for the "Z" key. */
     public static final int VK_Z              = 0x5A;
 
     /**
@@ -321,17 +424,40 @@
      */
     public static final int VK_CLOSE_BRACKET  = 0x5D;
 
+    /** Constant for the number pad "0" key. */
     public static final int VK_NUMPAD0        = 0x60;
+
+    /** Constant for the number pad "1" key. */
     public static final int VK_NUMPAD1        = 0x61;
+
+    /** Constant for the number pad "2" key. */
     public static final int VK_NUMPAD2        = 0x62;
+
+    /** Constant for the number pad "3" key. */
     public static final int VK_NUMPAD3        = 0x63;
+
+    /** Constant for the number pad "4" key. */
     public static final int VK_NUMPAD4        = 0x64;
+
+    /** Constant for the number pad "5" key. */
     public static final int VK_NUMPAD5        = 0x65;
+
+    /** Constant for the number pad "6" key. */
     public static final int VK_NUMPAD6        = 0x66;
+
+    /** Constant for the number pad "7" key. */
     public static final int VK_NUMPAD7        = 0x67;
+
+    /** Constant for the number pad "8" key. */
     public static final int VK_NUMPAD8        = 0x68;
+
+    /** Constant for the number pad "9" key. */
     public static final int VK_NUMPAD9        = 0x69;
+
+    /** Constant for the number pad multiply key. */
     public static final int VK_MULTIPLY       = 0x6A;
+
+    /** Constant for the number pad add key. */
     public static final int VK_ADD            = 0x6B;
 
     /**
@@ -347,11 +473,22 @@
      */
     public static final int VK_SEPARATOR      = VK_SEPARATER;
 
+    /** Constant for the number pad subtract key. */
     public static final int VK_SUBTRACT       = 0x6D;
+
+    /** Constant for the number pad decimal point key. */
     public static final int VK_DECIMAL        = 0x6E;
+
+    /** Constant for the number pad divide key. */
     public static final int VK_DIVIDE         = 0x6F;
+
+    /** Constant for the delete key. */
     public static final int VK_DELETE         = 0x7F; /* ASCII DEL */
+
+    /** Constant for the NUM_LOCK key. */
     public static final int VK_NUM_LOCK       = 0x90;
+
+    /** Constant for the SCROLL_LOCK key. */
     public static final int VK_SCROLL_LOCK    = 0x91;
 
     /** Constant for the F1 function key. */
@@ -463,12 +600,22 @@
      */
     public static final int VK_F24            = 0xF00B;
 
+    /**  Constant for the PRINTSCREEN key. */
     public static final int VK_PRINTSCREEN    = 0x9A;
+
+    /**  Constant for the INSERT key. */
     public static final int VK_INSERT         = 0x9B;
+
+    /**  Constant for the HELP key. */
     public static final int VK_HELP           = 0x9C;
+
+    /**  Constant for the META key. */
     public static final int VK_META           = 0x9D;
 
+    /**  Constant for the BACK_QUOTE  key. */
     public static final int VK_BACK_QUOTE     = 0xC0;
+
+    /**  Constant for the QUOTE key. */
     public static final int VK_QUOTE          = 0xDE;
 
     /**
@@ -638,6 +785,7 @@
     /* for input method support on Asian Keyboards */
 
     /* not clear what this means - listed in Microsoft Windows API */
+    /** Constant for the FINAL key. */
     public static final int VK_FINAL                    = 0x0018;
 
     /** Constant for the Convert function key. */
@@ -653,14 +801,23 @@
     public static final int VK_ACCEPT                   = 0x001E;
 
     /* not clear what this means - listed in Microsoft Windows API */
+    /** Constant for the MODECHANGE key. */
     public static final int VK_MODECHANGE               = 0x001F;
 
     /* replaced by VK_KANA_LOCK for Microsoft Windows and Solaris;
        might still be used on other platforms */
+    /**
+     * Constant for the KANA lock key.
+     * @see #VK_KANA_LOCK
+     **/
     public static final int VK_KANA                     = 0x0015;
 
     /* replaced by VK_INPUT_METHOD_ON_OFF for Microsoft Windows and Solaris;
        might still be used for other platforms */
+    /**
+     * Constant for KANJI.
+     * @see #VK_INPUT_METHOD_ON_OFF
+     */
     public static final int VK_KANJI                    = 0x0019;
 
     /**
@@ -1085,7 +1242,25 @@
     }
 
     /**
-     * @deprecated as of JDK1.1
+     * @deprecated as of JDK1.1; use {@link #KeyEvent(Component, int, long, int, int, char)} instead
+     * @param source    The <code>Component</code> that originated the event
+     * @param id              An integer indicating the type of event.
+     *                  For information on allowable values, see
+     *                  the class description for {@link KeyEvent}
+     * @param when      A long integer that specifies the time the event
+     *                  occurred.
+     *                     Passing negative or zero value
+     *                     is not recommended
+     * @param modifiers The modifier keys down during event (shift, ctrl,
+     *                  alt, meta).
+     *                     Passing negative value
+     *                     is not recommended.
+     *                     Zero value means that no modifiers were passed.
+     *                  Use either an extended _DOWN_MASK or old _MASK modifiers,
+     *                  however do not mix models in the one event.
+     *                  The extended modifiers are preferred for using
+     * @param keyCode   The integer code for an actual key, or VK_UNDEFINED
+     *                  (for a key-typed event)
      */
     @Deprecated
     public KeyEvent(Component source, int id, long when, int modifiers,
@@ -1184,6 +1359,7 @@
      * Returns a String describing the keyCode, such as "HOME", "F1" or "A".
      * These strings can be localized by changing the awt.properties file.
      *
+     * @param keyCode the key whose description is to be returned
      * @return a string containing a text description for a physical key,
      *         identified by its keyCode
      */
@@ -1376,6 +1552,7 @@
      * <code>InputEvent.BUTTON3_MASK</code> have the same value,
      * so the string "Meta" is returned for both modifiers.
      *
+     * @param modifiers the modifier mask to be processed
      * @return string a text description of the combination of modifier
      *                keys that were held down during the event
      * @see InputEvent#getModifiersExText(int)
@@ -1612,8 +1789,8 @@
      * Pressing the same key in a regular Russian layout gives another code, unique for the
      * letter "Cyrillic I short".
      *
+     * @return an extended key code for the event
      * @since 1.7
-     *
      */
     public  int getExtendedKeyCode() {
         return (int)extendedKeyCode;
@@ -1621,6 +1798,7 @@
     /**
      * Returns an extended key code for a unicode character.
      *
+     * @param c the unicode character to be processed
      * @return for a unicode character with a corresponding {@code VK_} constant -- this
      *   {@code VK_} constant; for a character appearing on the primary
      *   level of a known keyboard layout -- a unique integer.
@@ -1628,7 +1806,6 @@
      *   {@code VK_UNDEFINED} is returned.
      *
      * @since 1.7
-     *
      */
     public static int getExtendedKeyCodeForChar(int c) {
         // Return a keycode (if any) associated with a character.
--- a/jdk/src/share/classes/java/awt/event/KeyListener.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/event/KeyListener.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -54,6 +54,7 @@
      * Invoked when a key has been typed.
      * See the class description for {@link KeyEvent} for a definition of
      * a key typed event.
+     * @param e the event to be processed
      */
     public void keyTyped(KeyEvent e);
 
@@ -61,6 +62,7 @@
      * Invoked when a key has been pressed.
      * See the class description for {@link KeyEvent} for a definition of
      * a key pressed event.
+     * @param e the event to be processed
      */
     public void keyPressed(KeyEvent e);
 
@@ -68,6 +70,7 @@
      * Invoked when a key has been released.
      * See the class description for {@link KeyEvent} for a definition of
      * a key released event.
+     * @param e the event to be processed
      */
     public void keyReleased(KeyEvent e);
 }
--- a/jdk/src/share/classes/java/awt/event/MouseListener.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/event/MouseListener.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -59,26 +59,31 @@
     /**
      * Invoked when the mouse button has been clicked (pressed
      * and released) on a component.
+     * @param e the event to be processed
      */
     public void mouseClicked(MouseEvent e);
 
     /**
      * Invoked when a mouse button has been pressed on a component.
+     * @param e the event to be processed
      */
     public void mousePressed(MouseEvent e);
 
     /**
      * Invoked when a mouse button has been released on a component.
+     * @param e the event to be processed
      */
     public void mouseReleased(MouseEvent e);
 
     /**
      * Invoked when the mouse enters a component.
+     * @param e the event to be processed
      */
     public void mouseEntered(MouseEvent e);
 
     /**
      * Invoked when the mouse exits a component.
+     * @param e the event to be processed
      */
     public void mouseExited(MouseEvent e);
 }
--- a/jdk/src/share/classes/java/awt/event/MouseMotionListener.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/event/MouseMotionListener.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -63,12 +63,14 @@
      * Due to platform-dependent Drag&amp;Drop implementations,
      * <code>MOUSE_DRAGGED</code> events may not be delivered during a native
      * Drag&amp;Drop operation.
+     * @param e the event to be processed
      */
     public void mouseDragged(MouseEvent e);
 
     /**
      * Invoked when the mouse cursor has been moved onto a component
      * but no buttons have been pushed.
+     * @param e the event to be processed
      */
     public void mouseMoved(MouseEvent e);
 
--- a/jdk/src/share/classes/java/awt/event/MouseWheelListener.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/event/MouseWheelListener.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,6 +52,7 @@
 
     /**
      * Invoked when the mouse wheel is rotated.
+     * @param e the event to be processed
      * @see MouseWheelEvent
      */
     public void mouseWheelMoved(MouseWheelEvent e);
--- a/jdk/src/share/classes/java/awt/event/PaintEvent.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/event/PaintEvent.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -108,6 +108,8 @@
     /**
      * Returns the rectangle representing the area which needs to be
      * repainted in response to this event.
+     * @return the rectangle representing the area which needs to be
+     * repainted in response to this event
      */
     public Rectangle getUpdateRect() {
         return updateRect;
--- a/jdk/src/share/classes/java/awt/event/TextListener.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/event/TextListener.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -49,6 +49,8 @@
      * Invoked when the value of the text has changed.
      * The code written for this method performs the operations
      * that need to occur when text changes.
+     *
+     * @param e the event to be processed
      */
     public void textValueChanged(TextEvent e);
 
--- a/jdk/src/share/classes/java/awt/event/WindowFocusListener.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/event/WindowFocusListener.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -57,6 +57,7 @@
      * Invoked when the Window is set to be the focused Window, which means
      * that the Window, or one of its subcomponents, will receive keyboard
      * events.
+     * @param e the event to be processed
      */
     public void windowGainedFocus(WindowEvent e);
 
@@ -64,6 +65,7 @@
      * Invoked when the Window is no longer the focused Window, which means
      * that keyboard events will no longer be delivered to the Window or any of
      * its subcomponents.
+     * @param e the event to be processed
      */
     public void windowLostFocus(WindowEvent e);
 }
--- a/jdk/src/share/classes/java/awt/event/WindowListener.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/event/WindowListener.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -51,18 +51,21 @@
 public interface WindowListener extends EventListener {
     /**
      * Invoked the first time a window is made visible.
+     * @param e the event to be processed
      */
     public void windowOpened(WindowEvent e);
 
     /**
      * Invoked when the user attempts to close the window
      * from the window's system menu.
+     * @param e the event to be processed
      */
     public void windowClosing(WindowEvent e);
 
     /**
      * Invoked when a window has been closed as the result
      * of calling dispose on the window.
+     * @param e the event to be processed
      */
     public void windowClosed(WindowEvent e);
 
@@ -71,6 +74,7 @@
      * minimized state. For many platforms, a minimized window
      * is displayed as the icon specified in the window's
      * iconImage property.
+     * @param e the event to be processed
      * @see java.awt.Frame#setIconImage
      */
     public void windowIconified(WindowEvent e);
@@ -78,6 +82,7 @@
     /**
      * Invoked when a window is changed from a minimized
      * to a normal state.
+     * @param e the event to be processed
      */
     public void windowDeiconified(WindowEvent e);
 
@@ -88,6 +93,7 @@
      * as a highlighted title bar. The active Window is always either the
      * focused Window, or the first Frame or Dialog that is an owner of the
      * focused Window.
+     * @param e the event to be processed
      */
     public void windowActivated(WindowEvent e);
 
@@ -98,6 +104,7 @@
      * highlighted title bar. The active Window is always either the focused
      * Window, or the first Frame or Dialog that is an owner of the focused
      * Window.
+     * @param e the event to be processed
      */
     public void windowDeactivated(WindowEvent e);
 }
--- a/jdk/src/share/classes/java/awt/event/WindowStateListener.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/event/WindowStateListener.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -50,6 +50,7 @@
 public interface WindowStateListener extends EventListener {
     /**
      * Invoked when window state is changed.
+     * @param e the event to be processed
      */
     public void windowStateChanged(WindowEvent e);
 }
--- a/jdk/src/share/classes/java/awt/font/TextAttribute.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/font/TextAttribute.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -65,7 +65,7 @@
  *   <LI>the valid values if there are limitations
  *   <LI>a description of the effect.
  * </UL>
- * <p>
+ *
  * <H3>Values</H3>
  * <UL>
  *   <LI>The values of attributes must always be immutable.
@@ -95,7 +95,6 @@
  * </UL>
  *
  * <h4>Summary of attributes</h4>
- * <p>
  * <table style="float:center" border="0" cellspacing="0" cellpadding="2" width="%95"
  *     summary="Key, value type, principal constants, and default value
  *     behavior of all TextAttributes">
--- a/jdk/src/share/classes/java/awt/peer/ComponentPeer.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/peer/ComponentPeer.java	Wed Feb 05 08:57:33 2014 -0800
@@ -457,8 +457,6 @@
      * @param caps the buffer capabilities
      *
      * @throws AWTException if flip buffering is not supported
-     *
-     * @see Component.FlipBufferStrategy#createBuffers
      */
     void createBuffers(int numBuffers, BufferCapabilities caps)
          throws AWTException;
@@ -467,8 +465,6 @@
      * Returns the back buffer as image.
      *
      * @return the back buffer as image
-     *
-     * @see Component.FlipBufferStrategy#getBackBuffer
      */
     Image getBackBuffer();
 
@@ -480,15 +476,11 @@
      * @param x2 the area to be flipped, lower right X coordinate
      * @param y2 the area to be flipped, lower right Y coordinate
      * @param flipAction the flip action to perform
-     *
-     * @see Component.FlipBufferStrategy#flip
      */
     void flip(int x1, int y1, int x2, int y2, BufferCapabilities.FlipContents flipAction);
 
     /**
      * Destroys all created buffers.
-     *
-     * @see Component.FlipBufferStrategy#destroyBuffers
      */
     void destroyBuffers();
 
--- a/jdk/src/share/classes/java/awt/peer/DialogPeer.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/peer/DialogPeer.java	Wed Feb 05 08:57:33 2014 -0800
@@ -64,7 +64,6 @@
      * @param windows the windows to block
      *
      * @see Dialog#modalShow()
-     * @see Dialog#blockWindows()
      */
     void blockWindows(java.util.List<Window> windows);
 }
--- a/jdk/src/share/classes/java/awt/peer/KeyboardFocusManagerPeer.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/peer/KeyboardFocusManagerPeer.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
 package java.awt.peer;
 
 import java.awt.Component;
+import java.awt.KeyboardFocusManager;
 import java.awt.Window;
 
 /**
@@ -71,7 +72,7 @@
     /**
      * Clears the current global focus owner.
      *
-     * @param activeWindow
+     * @param activeWindow the active window
      *
      * @see KeyboardFocusManager#clearGlobalFocusOwner()
      */
--- a/jdk/src/share/classes/java/awt/peer/MouseInfoPeer.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/peer/MouseInfoPeer.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,8 +29,8 @@
 import java.awt.Point;
 
 /**
- * Peer interface for {@link MouseInfo}. This is used to get some additional
- * information about the mouse.
+ * Peer interface for {@link java.awt.MouseInfo}. This is used to get
+ * some additional information about the mouse.
  *
  * The peer interfaces are intended only for use in porting
  * the AWT. They are not intended for use by application
--- a/jdk/src/share/classes/java/awt/peer/PanelPeer.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/peer/PanelPeer.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 package java.awt.peer;
 
 /**
- * The peer interface for {@link Panel}. This is a subinterface of
+ * The peer interface for {@link java.awt.Panel}. This is a subinterface of
  * ContainerPeer and does not declare any additional methods because a Panel
  * is just that, a concrete Container.
  *
--- a/jdk/src/share/classes/java/awt/peer/TextAreaPeer.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/peer/TextAreaPeer.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
 import java.awt.TextArea;
 
 /**
- * The peer interface for {@link TexTArea}.
+ * The peer interface for {@link TextArea}.
  *
  * The peer interfaces are intended only for use in porting
  * the AWT. They are not intended for use by application
--- a/jdk/src/share/classes/java/awt/peer/WindowPeer.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/peer/WindowPeer.java	Wed Feb 05 08:57:33 2014 -0800
@@ -57,7 +57,7 @@
      * Sets if the window should always stay
      * on top of all other windows or not.
      *
-     * @see Window#getAlwaysOnTop()
+     * @see Window#isAlwaysOnTop()
      * @see Window#setAlwaysOnTop(boolean)
      */
     void updateAlwaysOnTopState();
--- a/jdk/src/share/classes/java/awt/print/Paper.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/print/Paper.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,6 @@
  * are compatible.  For example, if the paper size is changed from
  * 11 x 17 to 8.5 x 11, the application might need to reduce the
  * imageable area so that whatever is printed fits on the page.
- * <p>
  * @see #setSize(double, double)
  * @see #setImageableArea(double, double, double, double)
  */
--- a/jdk/src/share/classes/java/awt/print/Printable.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/awt/print/Printable.java	Wed Feb 05 08:57:33 2014 -0800
@@ -94,7 +94,6 @@
  * <code>Pageable</code> then the client may provide different PageFormats
  * for each page index. Calculations of page breaks must account for this.
  * </ul>
- * <p>
  * @see java.awt.print.Pageable
  * @see java.awt.print.PageFormat
  * @see java.awt.print.PrinterJob
--- a/jdk/src/share/classes/java/beans/XMLEncoder.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/beans/XMLEncoder.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -150,7 +150,6 @@
  * Although all object graphs may be written using just these three
  * tags, the following definitions are included so that common
  * data structures can be expressed more concisely:
- * <p>
  * <ul>
  * <li>
  * The default method name is "new".
--- a/jdk/src/share/classes/java/beans/beancontext/BeanContextSupport.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/beans/beancontext/BeanContextSupport.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -351,7 +351,8 @@
      * methods that add children to the set.
      * </p>
      * @param targetChild the child to create the Child on behalf of
-     * @param peer        the peer if the tragetChild and the peer are related by an implementation of BeanContextProxy     * @return Subtype-specific subclass of Child without overriding collection methods
+     * @param peer        the peer if the tragetChild and the peer are related by an implementation of BeanContextProxy
+     * @return Subtype-specific subclass of Child without overriding collection methods
      */
 
     protected BCSChild createBCSChild(Object targetChild, Object peer) {
--- a/jdk/src/share/classes/java/lang/Double.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/lang/Double.java	Wed Feb 05 08:57:33 2014 -0800
@@ -833,14 +833,10 @@
      * @return the bits that represent the floating-point number.
      */
     public static long doubleToLongBits(double value) {
-        long result = doubleToRawLongBits(value);
-        // Check for NaN based on values of bit fields, maximum
-        // exponent and nonzero significand.
-        if ( ((result & DoubleConsts.EXP_BIT_MASK) ==
-              DoubleConsts.EXP_BIT_MASK) &&
-             (result & DoubleConsts.SIGNIF_BIT_MASK) != 0L)
-            result = 0x7ff8000000000000L;
-        return result;
+        if (!isNaN(value)) {
+            return doubleToRawLongBits(value);
+        }
+        return 0x7ff8000000000000L;
     }
 
     /**
--- a/jdk/src/share/classes/java/lang/Float.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/lang/Float.java	Wed Feb 05 08:57:33 2014 -0800
@@ -741,14 +741,10 @@
      * @return the bits that represent the floating-point number.
      */
     public static int floatToIntBits(float value) {
-        int result = floatToRawIntBits(value);
-        // Check for NaN based on values of bit fields, maximum
-        // exponent and nonzero significand.
-        if ( ((result & FloatConsts.EXP_BIT_MASK) ==
-              FloatConsts.EXP_BIT_MASK) &&
-             (result & FloatConsts.SIGNIF_BIT_MASK) != 0)
-            result = 0x7fc00000;
-        return result;
+        if (!isNaN(value)) {
+            return floatToRawIntBits(value);
+        }
+        return 0x7fc00000;
     }
 
     /**
--- a/jdk/src/share/classes/java/lang/Long.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/lang/Long.java	Wed Feb 05 08:57:33 2014 -0800
@@ -700,21 +700,58 @@
                     throw new NumberFormatException("Bad digit at end of " + s);
                 }
                 long result = first * radix + second;
-                if (compareUnsigned(result, first) < 0) {
+
+                /*
+                 * Test leftmost bits of multiprecision extension of first*radix
+                 * for overflow. The number of bits needed is defined by
+                 * GUARD_BIT = ceil(log2(Character.MAX_RADIX)) + 1 = 7. Then
+                 * int guard = radix*(int)(first >>> (64 - GUARD_BIT)) and
+                 * overflow is tested by splitting guard in the ranges
+                 * guard < 92, 92 <= guard < 128, and 128 <= guard, where
+                 * 92 = 128 - Character.MAX_RADIX. Note that guard cannot take
+                 * on a value which does not include a prime factor in the legal
+                 * radix range.
+                 */
+                int guard = radix * (int) (first >>> 57);
+                if (guard >= 128 ||
+                    (result >= 0 && guard >= 128 - Character.MAX_RADIX)) {
                     /*
-                     * The maximum unsigned value, (2^64)-1, takes at
-                     * most one more digit to represent than the
-                     * maximum signed value, (2^63)-1.  Therefore,
-                     * parsing (len - 1) digits will be appropriately
-                     * in-range of the signed parsing.  In other
-                     * words, if parsing (len -1) digits overflows
-                     * signed parsing, parsing len digits will
-                     * certainly overflow unsigned parsing.
+                     * For purposes of exposition, the programmatic statements
+                     * below should be taken to be multi-precision, i.e., not
+                     * subject to overflow.
                      *
-                     * The compareUnsigned check above catches
-                     * situations where an unsigned overflow occurs
-                     * incorporating the contribution of the final
-                     * digit.
+                     * A) Condition guard >= 128:
+                     * If guard >= 128 then first*radix >= 2^7 * 2^57 = 2^64
+                     * hence always overflow.
+                     *
+                     * B) Condition guard < 92:
+                     * Define left7 = first >>> 57.
+                     * Given first = (left7 * 2^57) + (first & (2^57 - 1)) then
+                     * result <= (radix*left7)*2^57 + radix*(2^57 - 1) + second.
+                     * Thus if radix*left7 < 92, radix <= 36, and second < 36,
+                     * then result < 92*2^57 + 36*(2^57 - 1) + 36 = 2^64 hence
+                     * never overflow.
+                     *
+                     * C) Condition 92 <= guard < 128:
+                     * first*radix + second >= radix*left7*2^57 + second
+                     * so that first*radix + second >= 92*2^57 + 0 > 2^63
+                     *
+                     * D) Condition guard < 128:
+                     * radix*first <= (radix*left7) * 2^57 + radix*(2^57 - 1)
+                     * so
+                     * radix*first + second <= (radix*left7) * 2^57 + radix*(2^57 - 1) + 36
+                     * thus
+                     * radix*first + second < 128 * 2^57 + 36*2^57 - radix + 36
+                     * whence
+                     * radix*first + second < 2^64 + 2^6*2^57 = 2^64 + 2^63
+                     *
+                     * E) Conditions C, D, and result >= 0:
+                     * C and D combined imply the mathematical result
+                     * 2^63 < first*radix + second < 2^64 + 2^63. The lower
+                     * bound is therefore negative as a signed long, but the
+                     * upper bound is too small to overflow again after the
+                     * signed long overflows to positive above 2^64 - 1. Hence
+                     * result >= 0 implies overflow given C and D.
                      */
                     throw new NumberFormatException(String.format("String value %s exceeds " +
                                                                   "range of unsigned long.", s));
--- a/jdk/src/share/classes/java/lang/SecurityManager.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/lang/SecurityManager.java	Wed Feb 05 08:57:33 2014 -0800
@@ -1106,11 +1106,8 @@
      * calling thread is not allowed to wait for a connection request on
      * the specified local port number.
      * <p>
-     * If port is not 0, this method calls
-     * <code>checkPermission</code> with the
+     * This method calls <code>checkPermission</code> with the
      * <code>SocketPermission("localhost:"+port,"listen")</code>.
-     * If port is zero, this method calls <code>checkPermission</code>
-     * with <code>SocketPermission("localhost:1024-","listen").</code>
      * <p>
      * If you override this method, then you should make a call to
      * <code>super.checkListen</code>
@@ -1123,12 +1120,8 @@
      * @see        #checkPermission(java.security.Permission) checkPermission
      */
     public void checkListen(int port) {
-        if (port == 0) {
-            checkPermission(SecurityConstants.LOCAL_LISTEN_PERMISSION);
-        } else {
-            checkPermission(new SocketPermission("localhost:"+port,
-                SecurityConstants.SOCKET_LISTEN_ACTION));
-        }
+        checkPermission(new SocketPermission("localhost:"+port,
+            SecurityConstants.SOCKET_LISTEN_ACTION));
     }
 
     /**
--- a/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java	Wed Feb 05 08:57:33 2014 -0800
@@ -611,7 +611,7 @@
             mv.visitVarInsn(ALOAD, 1);
             mv.visitVarInsn(ALOAD, 2);
 
-            mv.visitMethodInsn(INVOKESPECIAL, BMH, "<init>", makeSignature("", true));
+            mv.visitMethodInsn(INVOKESPECIAL, BMH, "<init>", makeSignature("", true), false);
 
             for (int i = 0, j = 0; i < types.length(); ++i, ++j) {
                 // i counts the arguments, j counts corresponding argument slots
@@ -662,7 +662,7 @@
             // put fields on the stack
             emitPushFields(types, className, mv);
             // finally, invoke the constructor and return
-            mv.visitMethodInsn(INVOKEVIRTUAL, MH, "invokeBasic", makeSignature(types, false));
+            mv.visitMethodInsn(INVOKEVIRTUAL, MH, "invokeBasic", makeSignature(types, false), false);
             mv.visitInsn(ARETURN);
             mv.visitMaxs(0, 0);
             mv.visitEnd();
@@ -678,7 +678,7 @@
                 int iconstInsn = ICONST_0 + extensionIndex(t);
                 assert(iconstInsn <= ICONST_5);
                 mv.visitInsn(iconstInsn);
-                mv.visitMethodInsn(INVOKEVIRTUAL, SPECIES_DATA, "extendWithIndex", BMHSPECIES_DATA_EWI_SIG);
+                mv.visitMethodInsn(INVOKEVIRTUAL, SPECIES_DATA, "extendWithIndex", BMHSPECIES_DATA_EWI_SIG, false);
                 mv.visitFieldInsn(GETFIELD, SPECIES_DATA, "constructor", "[" + MH_SIG);
                 mv.visitInsn(ICONST_0);
                 mv.visitInsn(AALOAD);
@@ -690,7 +690,7 @@
                 // put narg on stack
                 mv.visitVarInsn(typeLoadOp(t), 3);
                 // finally, invoke the constructor and return
-                mv.visitMethodInsn(INVOKEVIRTUAL, MH, "invokeBasic", makeSignature(types + t, false));
+                mv.visitMethodInsn(INVOKEVIRTUAL, MH, "invokeBasic", makeSignature(types + t, false), false);
                 mv.visitInsn(ARETURN);
                 mv.visitMaxs(0, 0);
                 mv.visitEnd();
@@ -701,7 +701,7 @@
             mv.visitCode();
             mv.visitLdcInsn(types);
             mv.visitLdcInsn(Type.getObjectType(className));
-            mv.visitMethodInsn(INVOKESTATIC, SPECIES_DATA, "getForClass", BMHSPECIES_DATA_GFC_SIG);
+            mv.visitMethodInsn(INVOKESTATIC, SPECIES_DATA, "getForClass", BMHSPECIES_DATA_GFC_SIG, false);
             mv.visitFieldInsn(PUTSTATIC, className, "SPECIES_DATA", SPECIES_DATA_SIG);
             mv.visitInsn(RETURN);
             mv.visitMaxs(0, 0);
--- a/jdk/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java	Thu Jan 30 14:01:45 2014 +0100
+++ b/jdk/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java	Wed Feb 05 08:57:33 2014 -0800
@@ -193,10 +193,10 @@
     CallSite buildCallSite() throws LambdaConversionException {
         final Class<?> innerClass = spinInnerClass();
         if (invokedType.parameterCount() == 0) {
-            final Constructor[] ctrs = AccessController.doPrivileged(
-                    new PrivilegedAction<Constructor[]>() {
+            final Constructor<?>[] ctrs = AccessController.doPrivileged(
+                    new PrivilegedAction<Constructor<?>[]>() {
                 @Override
-                public Constructor[] run() {
+                public Constructor<?>[] run() {
                     Constructor<?>[] ctrs = innerClass.getDeclaredConstructors();
                     if (ctrs.length == 1) {
                         // The lambda implementing inner class constructor is private, set
@@ -338,7 +338,7 @@
             m.visitVarInsn(getLoadOpcode(argType), varIndex);
             varIndex += getParameterSize(argType);
         }
-        m.visitMethodInsn(INVOKESPECIAL, lambdaClassName, NAME_CTOR, constructorType.toMethodDescriptorString());
+        m.visitMethodInsn(INVOKESPECIAL, lambdaClassName, NAME_CTOR, constructorType.toMethodDescriptorString(), false);
         m.visitInsn(ARETURN);
         m.visitMaxs(-1, -1);
         m.visitEnd();
@@ -354,7 +354,7 @@
         ctor.visitCode();
         ctor.visitVarInsn(ALOAD, 0);
         ctor.visitMethodInsn(INVOKESPECIAL, JAVA_LANG_OBJECT, NAME_CTOR,
-                             METHOD_DESCRIPTOR_VOID);
+                             METHOD_DESCRIPTOR_VOID, false);