On Wed, 14 Apr 2021 00:35:38 GMT, Claes Redestad <redes...@openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/invoke/VarForm.java line 130: >> >>> 128: } catch (NoSuchMethodException | IllegalAccessException e) { >>> 129: throw new UnsupportedOperationException(); >>> 130: } >> >> Suggestion: >> >> } catch (ReflectiveOperationException e) { >> throw newInternalError("Failed resolving VarHandle member >> name", ex); >> } > > 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). ------------- PR: https://git.openjdk.java.net/jdk/pull/3472