RFR (S) : 8004967 - Default method cause java.lang.VerifyError: Illegal use of nonvirtual function call
Vladimir Kozlov
vladimir.kozlov at oracle.com
Thu Dec 27 09:49:00 PST 2012
Bharadwaj,
I would check for < jdk8 instead of !>=, it is more clear :
+ if (! (_major_version >= JAVA_8_VERSION)) {
Next should be one line "} else {":
+ }
+ else {
I would move the legality table comment inside "if (is_interface)". Why
is_public and is_abstract in your table are illegal before jdk5? The
conditions check the opposite.
Should you also check for (is_protected) for versions before jdk8? It
may be not defined for those versions but for condition completeness we
should check. Also I don't see checks for is_bridge, is_varargs,
is_synthetic. And what about pre jdk5? I would split >=jdk5 and pre
versions to follow the table:
if (major_gte_8) {
...
} else if (major_gte_15) {
...
} else {
...
}
Thanks,
Vladimir
On 12/24/12 7:44 AM, Bharadwaj Yadavalli wrote:
> I updated legality verification of default methods of a Java 8
> interfaces. This update
> fixes JDK-8004967 and three other failures in Lambda's test-ng tests.
>
> I also cleaned up the legality verification of interface methods of
> pre-Java 8 interface
> methods. I refactored the code by separating the checks depending on the
> version
> being pre-Java 8 or Java 8 and later.
>
> Please review the changes at
> http://cr.openjdk.java.net/~bharadwaj/8004967/hotspot/webrev/
>
> Ran api, lang and vm JCK tests; no new failures.
>
> Thanks,
>
> Bharadwaj
>
More information about the hotspot-runtime-dev
mailing list