blob: 7902e2ec445316fbee3f3f0b79f1f4b1321f5c4c [file]
// "Replace with 'peek'" "true"
import java.util.List;
public class Main {
void test(List<String> list) {
long count = list.stream()
.peek(e -> {
if(e.isEmpty()) {
System.out.println("Empty line passed!");
throw new IllegalArgumentException();
}
// hello
/* in return */
})
.count();
System.out.println(count);
}
}