Make it possible to use javax.el.LambdaExpression in place of java se 8 functional interfaces
Since EL Lambdas predate Java functional interfaces, custom EL resolvers must be used to as bridge between javax.el.LambdaExpression, and actual method with a accepting functional interface parameter.
Java EE 8 revision of EL should either
- bring sufficient support for all Java SE methods accepting functional interfaces, or
- offer implicit type conversion from LambdaExpression to appropriate types defined in java.util.function, or
- offer implicit conversion to any Functional interface conforming to §9.8 of JLS.
Example implementation of the first approach for java.util.Optional can be seen here
Reported by pdudits
kchung said: Again, this is in the plan for EL 3.1.
It would be straight forward to support the conversions to all the known functions in java.util.functions, approach 2 above, but it will be difficult to support general functional interfaces, since it involves calling methods with Lambda expressions as arguments in reflection, which is hard to get right. So approach 3 is unlikely to be supported in EL 3.1.
Was assigned to kchung
This issue was imported from java.net JIRA EL_SPEC-22