void () { Stream<String> stream = Stream.of("x"); stream.forEach(System.out::println); if (Math.random() > 0.5) { Iterator<String> iterator = <warning descr="Stream has already been linked or consumed">stream</warning>.iterator(); } }