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

Kevin Rushforth kcr at openjdk.org
Wed Feb 1 13:20:04 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?

For a refactoring / cleanup fix like this, the question is whether it is worth the effort to test and review it. I don't know that it is, but if you can convince a Reviewer to test and review it, and then sponsor the fix for you, I won't object.

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

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


More information about the openjfx-dev mailing list