From comment : #17259 (comment).
During the JDK 17 upgrade(#17168), IntelliJ has identified 70 instances where collect(Collectors.toUnmodifiableList()) can be simplified to toList() using Java 16+ syntax. This is a JDK 16+ language feature (JEP 269) and should be addressed after the JDK 17 migration.
Before:
List<String> result = stream.collect(Collectors.toUnmodifiableList());
After:
List<String> result = stream.toList();
From comment : #17259 (comment).
During the JDK 17 upgrade(#17168), IntelliJ has identified 70 instances where collect(Collectors.toUnmodifiableList()) can be simplified to toList() using Java 16+ syntax. This is a JDK 16+ language feature (JEP 269) and should be addressed after the JDK 17 migration.
Before:
List<String> result = stream.collect(Collectors.toUnmodifiableList());After:
List<String> result = stream.toList();