On Friday 19 March 2004 12:05, Sascha Brawer wrote:
> 4. The Mauve tests #5 and #8 fail both on JamVM and on gcj. (Thanks to
> Michael Koch for testing on gcj, by the way). Basically, what happens is
> something like the following:
>
> Class c = myClassLoader.loadClass("name");
> harness.check(c.getClassLoader() == myClassLoader);
>
> Can anyone explain why this fails? myClassLoader is an instance of
> gnu.testlet.gnu.classpath.ServiceFact
> ory.lookupProviders.CustomClassLoader, which doesn't override loadClass.
c.getClassLoader() returns the class loader which defined the class. Since
your CustomClassLoader quite properly uses the default loadClass()
implementation, Class c may be loaded by an ancestor. So your test needs to
match myClassLoader, but also the transitive closure of getParent().
Have fun,
--
Chris Gray /k/ Embedded Java Solutions
Embedded & Mobile Java, OSGi http://www.kiffer.be/k/
[EMAIL PROTECTED] +32 3 216 0369
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath