--- old/src/java.base/share/classes/java/lang/Class.java 2019-10-29 10:34:22.000000000 -0700 +++ new/src/java.base/share/classes/java/lang/Class.java 2019-10-29 10:34:22.000000000 -0700 @@ -392,10 +392,6 @@ * * @see java.lang.Class#forName(String) * @see java.lang.ClassLoader - * - * @jls 12.2 Loading of Classes and Interfaces - * @jls 12.3 Linking of Classes and Interfaces - * @jls 12.4 Initialization of Classes and Interfaces * @since 1.2 */ @CallerSensitive @@ -442,10 +438,6 @@ *

This method does not check whether the requested class is * accessible to its caller.

* - *

Note that this method throws errors related to loading and linking as - * specified in Sections 12.2 and 12.3 of The Java Language - * Specification. - * * @apiNote * This method returns {@code null} on failure rather than * throwing a {@link ClassNotFoundException}, as is done by @@ -473,8 +465,6 @@ * in a module. * * - * @jls 12.2 Loading of Classes and Interfaces - * @jls 12.3 Linking of Classes and Interfaces * @since 9 * @spec JPMS */ @@ -498,21 +488,13 @@ cl = module.getClassLoader(); } - Class ret; if (cl != null) { - ret = cl.loadClass(module, name); + return cl.loadClass(module, name); } else { - ret = BootLoader.loadClass(module, name); + return BootLoader.loadClass(module, name); } - if (ret != null) { - // The loaded class should also be linked - linkClass(ret); - } - return ret; } - private static native void linkClass(Class c); - /** * Creates a new instance of the class represented by this {@code Class} * object. The class is instantiated as if by a {@code new}