RFR: 8354556: Expand value-based class warnings to java.lang.ref API [v11]
Archie Cobbs
acobbs at openjdk.org
Sat May 10 20:04:52 UTC 2025
On Sat, 10 May 2025 19:32:16 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Vicente Romero has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - additional changes from Archie
>> - removing dead code
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java line 422:
>
>> 420: ArrayList<String> optionList = new ArrayList<>(1 + aliases.length);
>> 421: optionList.add(option);
>> 422: Stream.of(aliases).forEach(optionList::add);
>
> Suggestion:
>
> Collections.addAll(optionList, aliases);
Wow, somehow I never knew `Collections.addAll()` existed. Thanks for the tip - that's simpler.
(I'll let @vicente-romero-oracle fix it.)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24746#discussion_r2083280028
More information about the core-libs-dev
mailing list