RFR: 8301604: Replace Collections.unmodifiableList with List.of

Glavo duke at openjdk.org
Wed Feb 1 11:25:50 UTC 2023


On Wed, 1 Feb 2023 11:03:32 GMT, Ao Qi <aoqi at openjdk.org> wrote:

>> `List.of` is cleaner, and can slightly reduce the memory footprint for lists of one or two elements.
>> 
>> Because `List.of` can only store non-null elements, I have only replaced a few usage.
>> 
>> Can someone open an Issue on JBS for me?
>
> Filed: https://bugs.openjdk.org/browse/JDK-8301604. Please let me know if the issue is not reported correctly.

@theaoqi Thank you very much!

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

PR: https://git.openjdk.org/jfx/pull/1012


More information about the openjfx-dev mailing list