Community
Participate
Working Groups
Only seems to happen when I use braces in the .map lambda: public Stream<String> getStream(List<String> list) { return list.stream() .map(s1 -> { return s1.length() > 3 ? s1 : null; }) .filter(Objects::nonNull); } Description Resource Path Location Type Type mismatch: cannot convert from Stream<Object> to Stream<String> BrokenStreamFilter.java /sandbox/src/main/java/sandbox line 19 Java Problem
Bug 469753 is also one where lambda block vs lambda expression makes a difference for inference results.
I can reproduce in 4.5. This has already been fixed via bug 463728 (4.6 M1). *** This bug has been marked as a duplicate of bug 463728 ***
Verified for Eclipse Neon 4.6 M1 Build id: I20150803-2000