On Thu, 13 Jun 2024 08:27:47 GMT, Claes Redestad <[email protected]> wrote:
>> Chen Liang has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> More rename and code style cleanup
>
> src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java line 676:
>
>> 674: * @param method The method for which to create a proxy
>> 675: */
>> 676: private ProxyMethod(Method method, String methodFieldName) {
>
> Could we pass the `FieldRefEntry` directly? I don't see when we'd create a
> `ProxyMethod` without later calling `methodField()`. I think this would also
> remove the need to make `ProxyMethod` non-static.
Good suggestion. However, ProxyMethod will stay non-static, for the field ref
is still bound to class Constant Pool and bytecode generation reuses many
non-static CP items from ProxyGenerator. Will update the patch in gist as I
push too.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19615#discussion_r1638272389