void () { Stream<String> stream = Stream.of("x"); double random = Math.random(); if (random > 0.5) { Iterator<String> iterator = stream.iterator(); } if (random > 0.9) { Iterator<String> iterator2 = <warning descr="Stream has already been linked or consumed">stream</warning>.iterator(); } }