1
0

Spelling in comments

This commit is contained in:
Gary Gregory
2023-11-20 09:58:59 -05:00
parent 51a3978280
commit 6b11d8ab2e
8 changed files with 37 additions and 37 deletions

View File

@@ -348,7 +348,7 @@ public class PathableClassLoader extends URLClassLoader {
* Checking with the parent first is the normal approach for java, but
* components within containers such as servlet engines can use
* child-first lookup instead, to allow the components to override libs
* which are visible in shared classloaders provided by the container.
* which are visible in shared class loaders provided by the container.
* <p>
* Note that the method getResources always behaves as if parentFirst=true,
* because of limitations in java 1.4; see the javadoc for method
@@ -393,15 +393,15 @@ public class PathableClassLoader extends URLClassLoader {
* <ul>
* <li>If code calls getClassLoader on a class loaded via
* "lookaside", then traces up its inheritance chain, it
* will see the "real" classloaders. When the class is remapped
* will see the "real" class loaders. When the class is remapped
* into this classloader via addLogicalLib, the classloader
* chain seen is this object plus ancestors.
* <li>If two different jars contain classes in the same
* package, then it is not possible to load both jars into
* the same "lookaside" classloader (eg the system classloader)
* then map one of those subsets from here. Of course they could
* be loaded into two different "lookaside" classloaders and
* then a prefix used to map from here to one of those classloaders.
* be loaded into two different "lookaside" class loaders and
* then a prefix used to map from here to one of those class loaders.
* </ul>
*/
public void useExplicitLoader(final String prefix, final ClassLoader loader) {

View File

@@ -58,7 +58,7 @@ import junit.framework.TestSuite;
* <p>
* This class will run each test methods within the specified TestCase using
* the specified context classloader and system classloader. If different
* tests within the same class require different context classloaders,
* tests within the same class require different context class loaders,
* then the context classloader passed to the constructor should be the
* "lowest" one available, and tests that need the context set to some parent
* of this "lowest" classloader can call
@@ -81,7 +81,7 @@ import junit.framework.TestSuite;
* is different from the class whose suite() method was executed to determine
* the classpath. This means that the suite method cannot communicate with
* the test cases simply by setting static variables (for example to make the
* custom classloaders available to the test methods or setUp/tearDown fixtures).
* custom class loaders available to the test methods or setUp/tearDown fixtures).
* If this is really necessary then it is possible to use reflection to invoke
* static methods on the class object passed to the constructor of this class.
* <p>

View File

@@ -107,7 +107,7 @@ public class ChildFirstTestCase extends TestCase {
}
/**
* Utility method to return the set of all classloaders in the
* Utility method to return the set of all class loaders in the
* parent chain starting from the one that loaded the class for
* this object instance.
*/
@@ -123,7 +123,7 @@ public class ChildFirstTestCase extends TestCase {
/**
* Test that the classloader hierarchy is as expected, and that
* calling loadClass() on various classloaders works as expected.
* calling loadClass() on various class loaders works as expected.
* Note that for this test case, parent-first classloading is
* in effect.
*/
@@ -167,7 +167,7 @@ public class ChildFirstTestCase extends TestCase {
systemLoader.getClass().getName()));
// junit classes should be visible; their classloader is not
// in the hierarchy of parent classloaders for this class,
// in the hierarchy of parent class loaders for this class,
// though it is accessible due to trickery in the PathableClassLoader.
final Class junitTest = contextLoader.loadClass("junit.framework.Test");
final Set ancestorCLs = getAncestorCLs();
@@ -180,7 +180,7 @@ public class ChildFirstTestCase extends TestCase {
logClass.getClassLoader(), parentLoader);
// jcl adapter classes should be visible via both parent and child. However
// as the classloaders are child-first we should see the child one.
// as the class loaders are child-first we should see the child one.
final Class log4jClass = contextLoader.loadClass("org.apache.commons.logging.impl.Log4JLogger");
assertSame("Log4JLogger not loaded via child",
log4jClass.getClassLoader(), thisLoader);
@@ -226,7 +226,7 @@ public class ChildFirstTestCase extends TestCase {
resource = childLoader.getResource("org/apache/commons/logging/PathableTestSuite.class");
assertNotNull("Unable to locate PathableTestSuite.class resource", resource);
// getResource where it is accessible to both classloaders. The one visible
// getResource where it is accessible to both class loaders. The one visible
// to the child should be returned. The URL returned will be of form
// jar:file:/x/y.jar!path/to/resource. The file name part should include the jarname
// of form commons-logging-adapters-nnnn.jar, not commons-logging-nnnn.jar

View File

@@ -105,7 +105,7 @@ public class ParentFirstTestCase extends TestCase {
}
/**
* Utility method to return the set of all classloaders in the
* Utility method to return the set of all class loaders in the
* parent chain starting from the one that loaded the class for
* this object instance.
*/
@@ -121,7 +121,7 @@ public class ParentFirstTestCase extends TestCase {
/**
* Test that the classloader hierarchy is as expected, and that
* calling loadClass() on various classloaders works as expected.
* calling loadClass() on various class loaders works as expected.
* Note that for this test case, parent-first classloading is
* in effect.
*/
@@ -164,7 +164,7 @@ public class ParentFirstTestCase extends TestCase {
systemLoader.getClass().getName());
// junit classes should be visible; their classloader is not
// in the hierarchy of parent classloaders for this class,
// in the hierarchy of parent class loaders for this class,
// though it is accessible due to trickery in the PathableClassLoader.
final Class junitTest = contextLoader.loadClass("junit.framework.Test");
final Set ancestorCLs = getAncestorCLs();
@@ -177,7 +177,7 @@ public class ParentFirstTestCase extends TestCase {
logClass.getClassLoader(), parentLoader);
// jcl adapter classes should be visible via both parent and child. However
// as the classloaders are parent-first we should see the parent one.
// as the class loaders are parent-first we should see the parent one.
final Class log4jClass = contextLoader.loadClass("org.apache.commons.logging.impl.Log4JLogger");
assertSame("Log4JLogger not loaded via parent",
log4jClass.getClassLoader(), parentLoader);
@@ -223,7 +223,7 @@ public class ParentFirstTestCase extends TestCase {
resource = childLoader.getResource("org/apache/commons/logging/PathableTestSuite.class");
assertNotNull("Unable to locate PathableTestSuite.class resource", resource);
// getResource where it is accessible to both classloaders. The one visible
// getResource where it is accessible to both class loaders. The one visible
// to the parent should be returned. The URL returned will be of form
// jar:file:/x/y.jar!path/to/resource. The file name part should include the jarname
// of form commons-logging-nnnn.jar, not commons-logging-adapters-nnnn.jar