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

David M. Lloyd david.lloyd at redhat.com
Thu Nov 10 16:42:41 UTC 2016


My original suggestion for the method was to make it static, and 
possibly even caller-sensitive, for just this reason.

On 11/09/2016 04:53 PM, Brent Christian 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/
>
> Thanks,
> -Brent
>
> 1. https://bugs.openjdk.java.net/browse/JDK-8165793
>

-- 
- DML


More information about the core-libs-dev mailing list