John Rose wrote:
> Alex Buckley has been diligently tracking this and dozens of other small
> defects in previous versions of the spec. The results can be seen in
> the Java SE 7 Edition of the JVM Specification. This is in JSR 336's
> Final Release (Annex 3) and at
> http://download.oracle.com/javase/cmn/spec_index.html. It has a modest
> little section called "5.4.5 Method overriding", which documents the
> behavior you are asking about.
Thanks for the link.
Maybe I'm misunderstanding what it says, but I'm thoroughly confused by HotSpot
behavior:
package p1;
class Z { public void foo() { } }
package p2;
class A extends Z { void foo() { } }
package p3;
class C extends A { void foo() { } }
Here A.foo clearly overrides Z.foo and according to my understand of 5.4.5
C.foo should not override A.foo.
Now the weird part, on HotSpot when C has class file version 51 C.foo does
override A.foo, but for earlier class file versions it doesn't.
It looks to me as if the spec documents the pre-7 HotSpot behavior.
Regards,
Jeroen
--
You received this message because you are subscribed to the Google Groups "JVM
Languages" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jvm-languages?hl=en.