void () { Stream<String> stream = Stream.of("x"); int x = new Random().nextInt(10); if (x < 2) { Iterator<String> iterator = stream.iterator(); } if (x < 1) { Spliterator<String> spliterator = <warning descr="Stream has already been linked or consumed">stream</warning>.spliterator(); } }