On Sat, 2005-05-07 at 19:38 +1200, Simon Kitching wrote:
> Hi Robert,
>
> I've found a small but critical problem with the "demonstration" harness
> in class ClassLoaderRunner. When the test is *not* using a
> context-classloader, the previous test's setting is not being cleared.
>
> Without this patch, the following tests report "Log4JLogger does not
> implement Log":
> 5, 6, 9, 10, 13, 14, 20, 21, 22, 24, 25, 26, 28, 29, 30, 32
>
> With this patch, the following tests report this error:
> 17, 20, 21, 24, 28, 32
>
> ClassLoaderRunner.java:
> if (setContextClassloader) {
> Thread.currentThread().setContextClassLoader(child);
> + } else {
> + Thread.currentThread().setContextClassLoader(parent);
> }
>
Hmm..if we do this instead
} else {
ClassLoader system = ClassLoader.getSystemClassLoader();
Thread.currentThread().setContextClassLoader(system);
}
Then cases 17 and 21 also pass. Interesting. I wonder what might
possibly be causing this difference in behaviour!
Note by the way that with either patch to the demonstration code, *every
single parent-first case* succeeds with the current JCL.
Regards,
Simon
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]