void (Stream<Object> stream) { stream.forEach(System.out::println); String text = "noError"; try { <warning descr="Stream has already been linked or consumed">stream</warning>.forEach(System.out::println); } catch (IllegalStateException e) { text = "IllegalStateException"; } catch (RuntimeException e) { text = "RuntimeException"; } if (<warning descr="Condition 'text.equals(\"IllegalStateException\")' is always 'true'">text.equals("IllegalStateException")</warning>) { System.out.println("error"); } }