< prev index next >

src/java.base/share/classes/jdk/internal/loader/BuiltinClassLoader.java

Print this page
8200125: Fix some classloader/module typos
Reviewed-by: alanb

*** 582,592 **** throw new ClassNotFoundException(cn); return c; } /** ! * A variation of {@code loadCass} to load a class with the specified * binary name. This method returns {@code null} when the class is not * found. */ protected Class<?> loadClassOrNull(String cn, boolean resolve) { synchronized (getClassLoadingLock(cn)) { --- 582,592 ---- throw new ClassNotFoundException(cn); return c; } /** ! * A variation of {@code loadClass} to load a class with the specified * binary name. This method returns {@code null} when the class is not * found. */ protected Class<?> loadClassOrNull(String cn, boolean resolve) { synchronized (getClassLoadingLock(cn)) {
*** 631,650 **** return c; } } /** ! * A variation of {@code loadCass} to load a class with the specified * binary name. This method returns {@code null} when the class is not * found. */ protected Class<?> loadClassOrNull(String cn) { return loadClassOrNull(cn, false); } /** ! * Find the candidate loaded module for the given class name. * Returns {@code null} if none of the modules defined to this * class loader contain the API package for the class. */ private LoadedModule findLoadedModule(String cn) { int pos = cn.lastIndexOf('.'); --- 631,650 ---- return c; } } /** ! * A variation of {@code loadClass} to load a class with the specified * binary name. This method returns {@code null} when the class is not * found. */ protected Class<?> loadClassOrNull(String cn) { return loadClassOrNull(cn, false); } /** ! * Finds the candidate loaded module for the given class name. * Returns {@code null} if none of the modules defined to this * class loader contain the API package for the class. */ private LoadedModule findLoadedModule(String cn) { int pos = cn.lastIndexOf('.');
*** 654,664 **** String pn = cn.substring(0, pos); return packageToModule.get(pn); } /** ! * Find the candidate loaded module for the given class name * in the named module. Returns {@code null} if the named module * is not defined to this class loader or does not contain * the API package for the class. */ private LoadedModule findLoadedModule(String mn, String cn) { --- 654,664 ---- String pn = cn.substring(0, pos); return packageToModule.get(pn); } /** ! * Finds the candidate loaded module for the given class name * in the named module. Returns {@code null} if the named module * is not defined to this class loader or does not contain * the API package for the class. */ private LoadedModule findLoadedModule(String mn, String cn) {
*** 830,841 **** } return pkg; } /** ! * Get the Package with the specified package name. If defined ! * then verify that it against the manifest and code source. * * @throws SecurityException if there is a sealing violation (JAR spec) */ private Package getAndVerifyPackage(String pn, Manifest man, URL url) { Package pkg = getDefinedPackage(pn); --- 830,841 ---- } return pkg; } /** ! * Gets the Package with the specified package name. If defined ! * then verifies it against the manifest and code source. * * @throws SecurityException if there is a sealing violation (JAR spec) */ private Package getAndVerifyPackage(String pn, Manifest man, URL url) { Package pkg = getDefinedPackage(pn);
*** 857,867 **** return pkg; } /** * Defines a new package in this ClassLoader. The attributes in the specified ! * Manifest are use to get the package version and sealing information. * * @throws IllegalArgumentException if the package name duplicates an * existing package either in this class loader or one of its ancestors */ private Package definePackage(String pn, Manifest man, URL url) { --- 857,867 ---- return pkg; } /** * Defines a new package in this ClassLoader. The attributes in the specified ! * Manifest are used to get the package version and sealing information. * * @throws IllegalArgumentException if the package name duplicates an * existing package either in this class loader or one of its ancestors */ private Package definePackage(String pn, Manifest man, URL url) {
*** 974,984 **** // -- miscellaneous supporting methods /** ! * Returns the ModuleReader for the given module, creating it if needed */ private ModuleReader moduleReaderFor(ModuleReference mref) { ModuleReader reader = moduleToReader.get(mref); if (reader == null) { // avoid method reference during startup --- 974,984 ---- // -- miscellaneous supporting methods /** ! * Returns the ModuleReader for the given module, creating it if needed. */ private ModuleReader moduleReaderFor(ModuleReference mref) { ModuleReader reader = moduleToReader.get(mref); if (reader == null) { // avoid method reference during startup
< prev index next >