Non-short-circuit operation consumes infinite stream
Reports non-short-circuit operations consuming an infinite stream. Such operations can be completed only by throwing an exception.
Example:
Stream.iterate(0, i -> i + 1).collect(Collectors.toList())
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Java, 233.SNAPSHOT |
Last modified: 13 July 2023