Use new methods on the Streams API

Inspections can show us new features from Java 16

Java 16 introduced some new methods on the Streams API. IntelliJ IDEA shows us places that can use the new methods and can automatically convert the code to use these new methods.

The code will be highlighted in yellow as a warning. Press ⌥⏎ (macOS) or Alt+Enter (Windows/Linux) and choose "Replace collect(toUnmodifiableList()) with toList()".

Note that this is only available if you're using a language level of Java 16 or above.