RFR 8169435 : ClassLoader.isParallelCapable is final and conflicting method may get VerifyError

Brent Christian brent.christian at oracle.com
Wed Nov 9 22:53:32 UTC 2016


Hi,

It seems that the method name used in 8165793[1], "isParallelCapable", 
was a little *too* intuitive.  An existing use of that method name has 
been uncovered (via NetBeans, in Eclipse Equinox).

Because the newly added method was marked final, the pre-existing method 
results in a VerifyError under JDK 9 (for overriding a final method).

Please review my fix, which makes ClassLoader.isParallelCapable() 
non-final.  The semantics of such a boolean-returning isXXXX method are 
clear - it's unlikely that existing methods would use different semantics.

I've included an @apiNote (ala ClassLoader.getName()) explaining that 
the non-final-ness here is strictly for compatibility.

Bug:
https://bugs.openjdk.java.net/browse/JDK-8169435
Webrev:
http://cr.openjdk.java.net/~bchristi/8169435/webrev.0/

Thanks,
-Brent

1. https://bugs.openjdk.java.net/browse/JDK-8165793



More information about the core-libs-dev mailing list