--- old/src/java.base/share/classes/java/io/ObjectInputStream.java 2016-12-06 12:20:55.579135319 +0000 +++ new/src/java.base/share/classes/java/io/ObjectInputStream.java 2016-12-06 12:20:55.411138796 +0000 @@ -657,12 +657,11 @@ *
* Class.forName(desc.getName(), false, loader) *- * where
loader
is determined as follows: if there is a
- * method on the current thread's stack whose declaring class is not a
- *
- * platform class, then loader
is
- * the class loader of such class; otherwise, loader
- * is the {@linkplain ClassLoader#getPlatformClassLoader()
+ * where loader
is the first class loader on the current
+ * thread's stack (starting from the currently executing method) that is
+ * neither the
+ * platform class loader nor its ancestor; otherwise,
+ * loader
is the {@linkplain ClassLoader#getPlatformClassLoader()
* platform class loader}. If this call results in a
* ClassNotFoundException
and the name of the passed
* ObjectStreamClass
instance is the Java language keyword
@@ -721,12 +720,11 @@
* * Class.forName(i, false, loader) *- * where
loader
is determined as follows: if there is a
- * method on the current thread's stack whose declaring class is not a
- *
- * platform class, then loader
is
- * the class loader of such class; otherwise, loader
- * is the {@linkplain ClassLoader#getPlatformClassLoader()
+ * where loader
is the first class loader on the current
+ * thread's stack (starting from the currently executing method) that is
+ * neither the
+ * platform class loader nor its ancestor; otherwise,
+ * loader
is the {@linkplain ClassLoader#getPlatformClassLoader()
* platform class loader}.
* Unless any of the resolved interfaces are non-public, this same value
* of loader
is also the class loader passed to
@@ -2370,16 +2368,10 @@
int ndoubles);
/**
- * Returns the first non-null and non-platform class loader
- * (not counting class loaders of generated reflection implementation classes)
- * up the execution stack, or null if only code from the bootstrap and
- * platform class loader is on the stack.
- * This method is also called via reflection by the following RMI-IIOP class:
- *
- * com.sun.corba.se.internal.util.JDKClassLoader
- *
- * This method should not be removed or its signature changed without
- * corresponding modifications to the above class.
+ * Returns the first non-null and non-platform class loader (not counting
+ * class loaders of generated reflection implementation classes) up the
+ * execution stack, or the platform class loader if only code from the
+ * bootstrap and platform class loader is on the stack.
*/
private static ClassLoader latestUserDefinedLoader() {
return jdk.internal.misc.VM.latestUserDefinedLoader();