This is the mail archive of the mauve-discuss@sources.redhat.com mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ClassTest on class.getClassLoader()


Sharon> But when I test on jdk1.2.2
Sharon> I get the different result
Sharon> Class name  = java.lang.String
Sharon> Classloader = null
Sharon> Class name  = ClassTest_test_getClassloader
Sharon> Classloader =
Sharon> sun.misc.Launcher$AppClassLoader@e6775003
Sharon> Error: test_getClassLoader failed - 2

Sharon> IT seems to me the customer class and system class
Sharon> should both return null. Does somebody know why i get
Sharon> the different result ? which one is correct?

"Correct", unfortunately, changes over time.

This looks like a change in the JCL.  The online 1.2 docs say this:

    Some implementations may use null to represent the bootstrap class
    loader. This method will return null in such implementations if this
    class was loaded by the bootstrap class loader.

To me this clearly implies that a non-null result is also acceptable.

This is why we have tags in Mauve -- if your implementation doesn't
conform to "JLS1.0" (which is how this test is tagged), then this tag
should be undefined so these tests won't be run.

It would be nice if Mauve's configure script detected the correct tags
for a given jdk installation.  Someone other than me would have to
write the patch, though.

Tom

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]