Another reflection bug; compatibility results

Stuart Ballard sballard at netreach.net
Wed Jun 14 07:11:26 PDT 2000


Godmar Back wrote:
> 
> > Can anyone confirm that this is or is not a bug? Blackdown JDK 1.1.8
> > does not display this behavior, and I can't think of an easy workaround
> > in my code to get the results I expect.
> 
> Well, yes that's probably a bug.

I worked around this by testing whether
mth.equals(cls.getMethod(mth.getName(), mth.getParameterTypes())). This
seems to expose another bug because on numerous occasions I get a
NoSuchMethodException from this check, which shouldn't ever be
possible... the imaginary conversation between my code and the class
goes something like this:

me: Hi, what methods do you support?
class: I support a method called foo with parameter types {bar, baz}.
me: Okay, give me the method called foo with parameter types {bar, baz}.
class: I have no such method!

I'll see if I can produce a simplified test case for both these bugs.

> > PS Would people here consider a class such as this to be legitimate
> > "reverse engineering" that could be used to monitor Kaffe's progress
> > towards complete JDK compatibility? It seems to me that, since it's all
> > "black box" testing using public APIs, and I'm only using it to obtain
> > information that is publically available in the JavaDoc anyway, there
> > shouldn't be any reason not to make use of it. But I'd rather know what
> > people here think before I post any results to the group and potentially
> > "contaminate" everyone here with knowledge they shouldn't possess.
> 
> I think it's fine.

Well, I've made some changes to the class since I "announced" it here a
while back and put up a homepage at http://stuart.wuffies.net/japi/ .
The reason I mention this is (1) I'd like feedback, and (2) I have the
results of running japicompat between jdk11 and kaffe, and there are 425
reported errors, although most of them are duplicated several times
because they are errors in java.awt.Component or java.awt.event.AWTEvent
and they get reported for every subclass (I'd like to eliminate these
duplicates but I can't think of an easy way to do it). See the results
at http://stuart.wuffies.net/japi/jdk11-kaffe-results.txt . From
skimming the results, it looks like it would be pretty easy to fix the
majority of them; once I finish my to do list on Japize itself, I may
actually try to fix some...

Stuart.


More information about the kaffe mailing list