On Wed, 14 Apr 2021 00:46:36 GMT, Paul Sandoz <psan...@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

Reply via email to