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

Xue-Lei Andrew Fan xuelei at openjdk.java.net
Wed Dec 16 17:18:03 UTC 2020


The Collections.unmodifiableList() method could be recurring copy on itself and have potential problems. The List.of() method is solid, and could be used instead.

Code cleanup, no new regression text.

Bug: https://bugs.openjdk.java.net/browse/JDK-8258514

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

Commit messages:
 - 8258514: Replace Collections.unmodifiableList with List.of

Changes: https://git.openjdk.java.net/jdk/pull/1804/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1804&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8258514
  Stats: 6 lines in 3 files changed: 0 ins; 3 del; 3 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1804.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1804/head:pull/1804

PR: https://git.openjdk.java.net/jdk/pull/1804



More information about the security-dev mailing list