The GitHub Actions job "Pull Requests" on pekko.git/feature/java17-unmodifiable-collections has succeeded. Run started by GitHub user He-Pin (triggered by He-Pin).
Head commit for run: 41633f23fa6012f079c39e6ded6d374df6965249 / 虎鸣 <[email protected]> refactor: migrate Collections.unmodifiable* to List.copyOf/Set.copyOf/Map.copyOf (Java 10+) Motivation: Java 10 introduced List.copyOf, Set.copyOf, and Map.copyOf as concise, type-safe replacements for Collections.unmodifiable* wrappers. These methods produce truly immutable snapshots rather than views, and align with the broader Java 17 modernization effort across Pekko. Modification: - Replace Collections.unmodifiableList(x) with List.copyOf(x) - Replace Collections.unmodifiableSet(new HashSet<>(Arrays.asList(...))) with Set.of(...) - Replace Collections.unmodifiableSet(x) with Set.copyOf(x) - Replace Collections.unmodifiableMap(x) with Map.copyOf(x) - Remove now-unused imports (Collections, HashSet, Arrays where applicable) - Applied across 14 test files in 6 modules Result: Cleaner, more idiomatic Java 17 code. Immutable snapshots instead of unmodifiable views. Net reduction of 17 lines across 14 files. Tests: sbt validatePullRequest References: https://javaalmanac.io/jdk/17/apidiff/8/ Report URL: https://github.com/apache/pekko/actions/runs/28233437003 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
