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

Ao Qi aoqi at openjdk.org
Wed Feb 1 11:25:48 UTC 2023


On Thu, 26 Jan 2023 05:30:56 GMT, Glavo <duke 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.

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

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


More information about the openjfx-dev mailing list