A couple of days ago, I started refactoring some code to use the new Java 8 Streams library. Unfortunately, I ran into a compile time error when performing Stream::map with a me
A very simple solution is to explicitly provide a type argument for Parameter#execute(..)
.
params.stream().map(p -> p.execute(foo)); // Gives a compile time error.
Without the explicit type argument, it seems like the JDK compiler cannot infer a type argument from the invocation context, though it should. This a bug and should be reported as such. I have now reported it and will update this question with new details when I have them.
Bug Report