Findbugs' bugs for java8

We know that findbugs is dedicated for code bugs check. It works on many common bug patterns. But today, I found a bug of findbugs, it ignores a bug on java8 codes.

1. The codes

Here we use jdk 1.8, we use streams to travese a string list like this.

        List<String> titles = Arrays.asList("Java7","Java8","Java9");
        Stream<String> s =;
        s.forEach(System.out::println);/*should be a bug here */

As the comments shown, the second line of the s.forEach is a bug, because in java8, one stream object can only be traversed once, so ,if you run the program, you would get this:

Exception in thread "main" java.lang.IllegalStateException: stream has already been operated upon or closed
	at streams.Main1.main(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at com.intellij.rt.execution.application.AppMain.main(

2. Let findbugs check it

Now we call findbugs to check it, just from the context menu, we got this result: The findbugs result You can find that no bugs found by findbugs,but there is one!!!

I think findbugs should fix it ASAP.

You can find detail documents about the java8 here: