void () { Stream<String> stream = Stream.of("x"); boolean b = Math.random() > 0.5; if (b) { Spliterator<String> spliterator = stream.spliterator(); } if (!b) { Iterator<String> iterator = stream.iterator(); } }