1
0

Merge in the allow-flawed branch, as there were no objections.

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@190565 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Simon Kitching
2005-06-14 10:03:48 +00:00
parent ca0188c41e
commit a3f8e5302a
4 changed files with 475 additions and 197 deletions

View File

@@ -60,22 +60,8 @@ public class NullClassLoaderTest extends TestCase{
* log object when called multiple times with the same name.
*/
public void testSameLogObject() throws Exception {
ClassLoader oldContextClassLoader = Thread.currentThread().getContextClassLoader();
try {
// emulate an app (not a webapp) running code loaded via the
// "null" classloader (bootclassloader for JDK1.2+, or
// systemclassloader for jdk1.1).
Thread.currentThread().setContextClassLoader(null);
Log log1 = LogFactory.getLog("foo");
Log log2 = LogFactory.getLog("foo");
assertSame(
"Calling getLog twice with the same category " +
"resulted in different objects!",
log1, log2);
} finally {
Thread.currentThread().setContextClassLoader(oldContextClassLoader);
}
// unfortunately, there just isn't any way to emulate JCL being
// accessable via the null classloader in "standard" systems, so
// we can't include this test in our standard unit tests.
}
}