It's a well known JDK 8 limitation: http://jdk8-dev.openjdk.java.narkive.com/bSPiKxap/jdk-8-lambda-reflection-issues
Other projects or specs had to find some trick to solve this issue: https://java.net/jira/browse/WEBSOCKET_SPEC-226
We should consider adding the declared type of the event (at the injection point) to the set of event type for observer resolution. Right now we only analyze the payload object to get its type closure, which doesn't work for lambdas since Class#getGenericInterfaces() and Class#getGenericSuperclass() always return raw types.
|