void () { Stream<String> stream = Stream.of("x"); try { stream.forEach(System.out::println); } catch (Exception e) { <warning descr="Stream has already been linked or consumed">stream</warning>.forEach(System.out::println); } }