On Wed, 15 Mar 2023 16:37:54 GMT, Adam Sotona <asot...@openjdk.org> wrote:

>> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java
>>  line 614:
>> 
>>> 612:         private void genConstructor(ClassBuilder clb) {
>>> 613:             clb.withMethod("<init>", MethodTypeDesc.of(CD_void),
>>> 614:                     ACC_PUBLIC, mb -> 
>>> mb.withFlags(ACC_PUBLIC).withCode( cob -> {
>> 
>> Why `withFlags(ACC_PUBLIC)` when the flags is already given in 
>> `withMethod`'s 3rd argument? Same for occurrences below.
>
> It has been redundant, now more effective `withMethodBody` method is used.

I also had the same comment in PR 
[12945](https://github.com/openjdk/jdk/pull/12945).   Similar change should 
apply to PR 12945.

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

PR: https://git.openjdk.org/jdk/pull/12944

Reply via email to