This is the mail archive of the
mailing list for the Mauve project.
Re: ClassTest on class.getClassLoader()
- To: sharon wu <lotus_june at yahoo dot com>
- Subject: Re: ClassTest on class.getClassLoader()
- From: Tom Tromey <tromey at cygnus dot com>
- Date: Fri, 14 Jul 2000 00:10:05 -0700 (PDT)
- Cc: mauve-discuss at sourceware dot cygnus dot com
- References: <email@example.com>
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> 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.