RFR 8169435 : ClassLoader.isParallelCapable is final and conflicting method may get VerifyError
Mandy Chung
mandy.chung at oracle.com
Wed Nov 9 23:30:07 UTC 2016
> On Nov 9, 2016, at 2:53 PM, Brent Christian <brent.christian at oracle.com> wrote:
>
> 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/
+1
Mandy
More information about the core-libs-dev
mailing list