RFR: 8282662: Use List/Set.of() factory methods to reduce memory consumption
Claes Redestad
redestad at openjdk.java.net
Mon Mar 7 16:09:58 UTC 2022
On Mon, 7 Mar 2022 15:54:02 GMT, liach <duke at openjdk.java.net> wrote:
> Notice list.of will have the downside of copying the input array when the size is not small while arrays aslist does not. Is the tradeoff worth it?
A good observation. In a couple of these places we could probably use `JavaUtilCollectionAccess.listFromTrustedArray` to avoid such copies.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7729
More information about the security-dev
mailing list