RFR: 8265135: Reduce work initializing VarForms [v3]

Claes Redestad redestad at openjdk.java.net
Wed Apr 14 11:35:14 UTC 2021


On Wed, 14 Apr 2021 00:46:36 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> Thanks for reviewing!
>> 
>> Is there's a way to provoke this exception through the public API? If not then the suggested behavior change seems reasonable.
>
> No, since VarHandles are not publicly extensible, the exception should not occur unless something has gone very wrong (the correspondence between access mode and implementing method is broken).

Unfortunately the change to InternalError breaks a number of tests, since the UOE does bubble up through the public API. I also found a few failing tests I had overlooked due VarHandle.isAccessModeSupported throwing rather than returning false, so I had to slightly rework the patch.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3472


More information about the core-libs-dev mailing list