I'm struggling with evaluation expression that contains some Stream API methods. Example:
sample.reads.stream().filter(s -> s.l.length() < 10)
This doesn't work as well:
sample.reads.stream().filter(s -> s.l.length() < 10).collect(Collectors.toList())
gives:
However, sample.reads.stream().count() or sample.reads.stream().toArray() works fine as well as any other expression(and if I put stream API call into code it also works fine)
Config: Java: jdk1.8.0_144
Idea: IntelliJ IDEA 2017.3.1 (Community Edition) Build #IC-173.3942.27, built on December 11, 2017 JRE: 1.8.0_152-release-1024-b8 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Windows 10 10.0
UPDATE
Sorry, for confusion. Even terminal commands don't work. I showed this example because I found that examption is thrown on filter method, not on collect. If I add .collect() I'll see the same error
UPDATE 2 I don't think it's something with classes. Even this gives me the same error:
IntStream.range(0, 100).filter(i -> i%2 == 0).toArray()



Collectorsclass? - Makoto