< 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,11 +582,11 @@
throw new ClassNotFoundException(cn);
return c;
}
/**
- * A variation of {@code loadCass} to load a class with the specified
+ * 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,20 +631,20 @@
return c;
}
}
/**
- * A variation of {@code loadCass} to load a class with the specified
+ * 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);
}
/**
- * Find the candidate loaded module for the given class name.
+ * 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,11 +654,11 @@
String pn = cn.substring(0, pos);
return packageToModule.get(pn);
}
/**
- * Find the candidate loaded module for the given class name
+ * 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,12 +830,12 @@
}
return pkg;
}
/**
- * Get the Package with the specified package name. If defined
- * then verify that it against the manifest and code source.
+ * 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,11 +857,11 @@
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.
+ * 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,11 +974,11 @@
// -- miscellaneous supporting methods
/**
- * Returns the ModuleReader for the given module, creating it if needed
+ * 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 >