Fix spelling
This commit is contained in:
@@ -112,7 +112,7 @@ public class ServletContextCleaner implements ServletContextListener {
|
|||||||
loader = null;
|
loader = null;
|
||||||
} catch (final IllegalAccessException ex) {
|
} catch (final IllegalAccessException ex) {
|
||||||
// This is not expected; every ancestor class should be accessible
|
// This is not expected; every ancestor class should be accessible
|
||||||
System.err.println("LogFactory instance found which is not accessable!");
|
System.err.println("LogFactory instance found which is not accessible!");
|
||||||
loader = null;
|
loader = null;
|
||||||
} catch (final InvocationTargetException ex) {
|
} catch (final InvocationTargetException ex) {
|
||||||
// This is not expected
|
// This is not expected
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class NullClassLoaderTestCase extends TestCase {
|
|||||||
*/
|
*/
|
||||||
public void testSameLogObject() throws Exception {
|
public void testSameLogObject() throws Exception {
|
||||||
// unfortunately, there just isn't any way to emulate JCL being
|
// unfortunately, there just isn't any way to emulate JCL being
|
||||||
// accessable via the null classloader in "standard" systems, so
|
// accessible via the null classloader in "standard" systems, so
|
||||||
// we can't include this test in our standard unit tests.
|
// we can't include this test in our standard unit tests.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class CustomConfigAPITestCase extends CustomConfigTestCase {
|
|||||||
final PathableClassLoader parent = new PathableClassLoader(null);
|
final PathableClassLoader parent = new PathableClassLoader(null);
|
||||||
parent.useExplicitLoader("junit.", Test.class.getClassLoader());
|
parent.useExplicitLoader("junit.", Test.class.getClassLoader());
|
||||||
|
|
||||||
// the TestHandler class must be accessable from the System classloader
|
// the TestHandler class must be accessible from the System classloader
|
||||||
// in order for java.util.logging.LogManager.readConfiguration to
|
// in order for java.util.logging.LogManager.readConfiguration to
|
||||||
// be able to instantiate it. And this test case must see the same
|
// be able to instantiate it. And this test case must see the same
|
||||||
// class in order to be able to access its data. Yes this is ugly
|
// class in order to be able to access its data. Yes this is ugly
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public class CustomConfigFullTestCase extends CustomConfigTestCase {
|
|||||||
final PathableClassLoader parent = new PathableClassLoader(null);
|
final PathableClassLoader parent = new PathableClassLoader(null);
|
||||||
parent.useExplicitLoader("junit.", Test.class.getClassLoader());
|
parent.useExplicitLoader("junit.", Test.class.getClassLoader());
|
||||||
|
|
||||||
// the TestHandler class must be accessable from the System classloader
|
// the TestHandler class must be accessible from the System classloader
|
||||||
// in order for java.util.logging.LogManager.readConfiguration to
|
// in order for java.util.logging.LogManager.readConfiguration to
|
||||||
// be able to instantiate it. And this test case must see the same
|
// be able to instantiate it. And this test case must see the same
|
||||||
// class in order to be able to access its data. Yes this is ugly
|
// class in order to be able to access its data. Yes this is ugly
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ public class CustomConfigTestCase extends DefaultConfigTestCase {
|
|||||||
final PathableClassLoader cl = new PathableClassLoader(null);
|
final PathableClassLoader cl = new PathableClassLoader(null);
|
||||||
cl.useExplicitLoader("junit.", Test.class.getClassLoader());
|
cl.useExplicitLoader("junit.", Test.class.getClassLoader());
|
||||||
|
|
||||||
// the TestHandler class must be accessable from the System classloader
|
// the TestHandler class must be accessible from the System classloader
|
||||||
// in order for java.util.logging.LogManager.readConfiguration to
|
// in order for java.util.logging.LogManager.readConfiguration to
|
||||||
// be able to instantiate it. And this test case must see the same
|
// be able to instantiate it. And this test case must see the same
|
||||||
// class in order to be able to access its data. Yes this is ugly
|
// class in order to be able to access its data. Yes this is ugly
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ public class ChildFirstTestCase extends TestCase {
|
|||||||
|
|
||||||
// junit classes should be visible; their classloader is not
|
// junit classes should be visible; their classloader is not
|
||||||
// in the hierarchy of parent classloaders for this class,
|
// in the hierarchy of parent classloaders for this class,
|
||||||
// though it is accessable due to trickery in the PathableClassLoader.
|
// though it is accessible due to trickery in the PathableClassLoader.
|
||||||
final Class junitTest = contextLoader.loadClass("junit.framework.Test");
|
final Class junitTest = contextLoader.loadClass("junit.framework.Test");
|
||||||
final Set ancestorCLs = getAncestorCLs();
|
final Set ancestorCLs = getAncestorCLs();
|
||||||
assertFalse("Junit not loaded by ancestor classloader",
|
assertFalse("Junit not loaded by ancestor classloader",
|
||||||
@@ -215,15 +215,15 @@ public class ChildFirstTestCase extends TestCase {
|
|||||||
resource = childLoader.getResource("nosuchfile");
|
resource = childLoader.getResource("nosuchfile");
|
||||||
assertNull("Non-null URL returned for invalid resource name", resource);
|
assertNull("Non-null URL returned for invalid resource name", resource);
|
||||||
|
|
||||||
// getResource where it is accessable only to parent classloader
|
// getResource where it is accessible only to parent classloader
|
||||||
resource = childLoader.getResource("org/apache/commons/logging/Log.class");
|
resource = childLoader.getResource("org/apache/commons/logging/Log.class");
|
||||||
assertNotNull("Unable to locate Log.class resource", resource);
|
assertNotNull("Unable to locate Log.class resource", resource);
|
||||||
|
|
||||||
// getResource where it is accessable only to child classloader
|
// getResource where it is accessible only to child classloader
|
||||||
resource = childLoader.getResource("org/apache/commons/logging/PathableTestSuite.class");
|
resource = childLoader.getResource("org/apache/commons/logging/PathableTestSuite.class");
|
||||||
assertNotNull("Unable to locate PathableTestSuite.class resource", resource);
|
assertNotNull("Unable to locate PathableTestSuite.class resource", resource);
|
||||||
|
|
||||||
// getResource where it is accessable to both classloaders. The one visible
|
// getResource where it is accessible to both classloaders. The one visible
|
||||||
// to the child should be returned. The URL returned will be of form
|
// 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
|
// 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
|
// of form commons-logging-adapters-nnnn.jar, not commons-logging-nnnn.jar
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ public class ParentFirstTestCase extends TestCase {
|
|||||||
|
|
||||||
// junit classes should be visible; their classloader is not
|
// junit classes should be visible; their classloader is not
|
||||||
// in the hierarchy of parent classloaders for this class,
|
// in the hierarchy of parent classloaders for this class,
|
||||||
// though it is accessable due to trickery in the PathableClassLoader.
|
// though it is accessible due to trickery in the PathableClassLoader.
|
||||||
final Class junitTest = contextLoader.loadClass("junit.framework.Test");
|
final Class junitTest = contextLoader.loadClass("junit.framework.Test");
|
||||||
final Set ancestorCLs = getAncestorCLs();
|
final Set ancestorCLs = getAncestorCLs();
|
||||||
assertFalse("Junit not loaded by ancestor classloader",
|
assertFalse("Junit not loaded by ancestor classloader",
|
||||||
@@ -213,15 +213,15 @@ public class ParentFirstTestCase extends TestCase {
|
|||||||
resource = childLoader.getResource("nosuchfile");
|
resource = childLoader.getResource("nosuchfile");
|
||||||
assertNull("Non-null URL returned for invalid resource name", resource);
|
assertNull("Non-null URL returned for invalid resource name", resource);
|
||||||
|
|
||||||
// getResource where it is accessable only to parent classloader
|
// getResource where it is accessible only to parent classloader
|
||||||
resource = childLoader.getResource("org/apache/commons/logging/Log.class");
|
resource = childLoader.getResource("org/apache/commons/logging/Log.class");
|
||||||
assertNotNull("Unable to locate Log.class resource", resource);
|
assertNotNull("Unable to locate Log.class resource", resource);
|
||||||
|
|
||||||
// getResource where it is accessable only to child classloader
|
// getResource where it is accessible only to child classloader
|
||||||
resource = childLoader.getResource("org/apache/commons/logging/PathableTestSuite.class");
|
resource = childLoader.getResource("org/apache/commons/logging/PathableTestSuite.class");
|
||||||
assertNotNull("Unable to locate PathableTestSuite.class resource", resource);
|
assertNotNull("Unable to locate PathableTestSuite.class resource", resource);
|
||||||
|
|
||||||
// getResource where it is accessable to both classloaders. The one visible
|
// getResource where it is accessible to both classloaders. The one visible
|
||||||
// to the parent should be returned. The URL returned will be of form
|
// 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
|
// 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
|
// of form commons-logging-nnnn.jar, not commons-logging-adapters-nnnn.jar
|
||||||
|
|||||||
@@ -136,8 +136,8 @@ public class TcclDisabledTestCase extends TestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verify that the custom Log implementation which is only accessable
|
* Verify that the custom Log implementation which is only accessible
|
||||||
* via the TCCL has NOT been loaded. Because this is only accessable via the
|
* via the TCCL has NOT been loaded. Because this is only accessible via the
|
||||||
* TCCL, and we've use a commons-logging.properties that disables TCCL loading,
|
* TCCL, and we've use a commons-logging.properties that disables TCCL loading,
|
||||||
* we should see the default Log rather than the custom one.
|
* we should see the default Log rather than the custom one.
|
||||||
*/
|
*/
|
||||||
@@ -151,7 +151,7 @@ public class TcclDisabledTestCase extends TestCase {
|
|||||||
try {
|
try {
|
||||||
final Log log = instance.getInstance("test");
|
final Log log = instance.getInstance("test");
|
||||||
fail("Unexpectedly succeeded in loading a custom Log class"
|
fail("Unexpectedly succeeded in loading a custom Log class"
|
||||||
+ " that is only accessable via the tccl.");
|
+ " that is only accessible via the tccl.");
|
||||||
assertNotNull(log); // silence compiler warning about unused var
|
assertNotNull(log); // silence compiler warning about unused var
|
||||||
} catch (final LogConfigurationException ex) {
|
} catch (final LogConfigurationException ex) {
|
||||||
// ok, expected
|
// ok, expected
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ public class TcclEnabledTestCase extends TestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verify that the custom Log implementation which is only accessable
|
* Verify that the custom Log implementation which is only accessible
|
||||||
* via the TCCL has successfully been loaded as specified in the config file.
|
* via the TCCL has successfully been loaded as specified in the config file.
|
||||||
* This proves that the TCCL was used to load that class.
|
* This proves that the TCCL was used to load that class.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -138,8 +138,8 @@ public class TcclDisabledTestCase extends TestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verify that the custom LogFactory implementation which is only accessable
|
* Verify that the custom LogFactory implementation which is only accessible
|
||||||
* via the TCCL has NOT been loaded. Because this is only accessable via the
|
* via the TCCL has NOT been loaded. Because this is only accessible via the
|
||||||
* TCCL, and we've use a commons-logging.properties that disables TCCL loading,
|
* TCCL, and we've use a commons-logging.properties that disables TCCL loading,
|
||||||
* we should see the default LogFactoryImpl rather than the custom one.
|
* we should see the default LogFactoryImpl rather than the custom one.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ public class TcclEnabledTestCase extends TestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verify that the custom LogFactory implementation which is only accessable
|
* Verify that the custom LogFactory implementation which is only accessible
|
||||||
* via the TCCL has successfully been loaded as specified in the config file.
|
* via the TCCL has successfully been loaded as specified in the config file.
|
||||||
* This proves that the TCCL was used to load that class.
|
* This proves that the TCCL was used to load that class.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user