stream has already been operated upon or closed
아래와 같이 Stream을 재사용하는 경우에 발생함. @Test void test() { IntStream intStream = IntStream.rangeClosed(1, 100); intStream.forEach(System.out::println); intStream.forEach(System.out::println); } A Stream should be operated on (invoking an intermediate or terminal stream operation) only once. A Stream implementation may throw IllegalStateException if it detects that the Stream is being reused. 재사용이 필요한 곳에서..
개발
2022. 6. 20. 15:06