Another reflection bug; compatibility results
gback at cs.utah.edu
Thu Jun 15 10:32:53 PDT 2000
Okay, try it again now.
We now also search superinterfaces if you invoke Class.getMethod() on
an interface class.
However, since there's no notion of superinterfaces at the bytecode level,
there's also no ordering - this means that I believe that the result of
such a getMethod call is not and in fact cannot be well-defined. We may
or may not match what the JDK returns. I hadn't realized that before.
Also, since there no ordering of superinterfaces, there's also no notion
of "overriding" - hence both Kaffe and JDK report methods in all
superinterfaces. However, getMethod will stop looking at the first
match. This leads (in both JDK and Kaffe) to what you call "Non-equality"
in your test.
However, I believe that none of this should have an adverse impact
on the interface compatibility checking you're doing. For instance,
you should be able to easily figure out what's what by checking whether
a class inherits a method or not - one way to find that out is to
check whether getClass().getMethod().getClass() != getClass().
More information about the kaffe