I am having issues with Java 8 method reference combined with generic types. I have simplified my problem to make it clear where the problem lies. The following code fails:<
Currently you're trying to use the raw mapper type, which erases all kinds of things.
As soon as you start using the generic type, all is fine - and type inference can help you:
new Mapper<>(TestEvent::setId);
Adding <> is all that's required to make your code compile.
<>