On Mon, 11 Apr 2022 09:26:12 GMT, ExE Boss <d...@openjdk.java.net> wrote:
>> Claes Redestad has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Simplified as suggested by @ExE-Boss > > src/java.base/share/classes/java/lang/invoke/VarHandle.java line 2075: > >> 2073: >> 2074: @DontInline >> 2075: final void >> throwWrongMethodTypeException(VarHandle.AccessDescriptor ad) { > > This can actually be `private` and `static`: > Suggestion: > > private static final void > throwWrongMethodTypeException(VarHandle.AccessDescriptor ad) { `private` yes. `static` would require to pass the `MethodType` and since this is an exceptional slow-path it doesn't make sense to keep the complexity contained inside the `throw...` method. ------------- PR: https://git.openjdk.java.net/jdk/pull/8160