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

Glavo duke at openjdk.org
Thu Feb 2 11:41:36 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?

This pull request has now been integrated.

Changeset: fa4884c3
Author:    Glavo <zjx001202 at gmail.com>
Committer: Nir Lisker <nlisker at openjdk.org>
URL:       https://git.openjdk.org/jfx/commit/fa4884c3c43c43da8dd555441ca5658898e807cb
Stats:     61 lines in 3 files changed: 3 ins; 38 del; 20 mod

8301604: Replace Collections.unmodifiableList with List.of

Reviewed-by: nlisker

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

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


More information about the openjfx-dev mailing list