Eclipse still has problems with its own compiler (especially in terms of output type) and Java 8 features. In this case, when you encounter such a problem, first try compiling javac. If it compiles, then this is definitely an Eclipse problem.
Eclipse, , , ECJ (Eclipse-), , ( , java- ).
Eclipse (, ), java 8 .
- IntelliJ, javac, , Java 8...
, :
Map<String, Integer> transform(Map<Integer, List<String>> old) {
return old.entrySet().stream()
.flatMap(e -> e.getValue().stream().map(s -> new SimpleEntry<>(s.toLowerCase(), e.getKey())))
.collect(toMap(SimpleEntry::getKey, SimpleEntry::getValue));
}