[
https://issues.apache.org/jira/browse/JEXL-268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dmitri Blinov closed JEXL-268.
------------------------------
Resolution: Won't Do
> Jexl lambdas as parameters to new Java8 methods
> -----------------------------------------------
>
> Key: JEXL-268
> URL: https://issues.apache.org/jira/browse/JEXL-268
> Project: Commons JEXL
> Issue Type: New Feature
> Affects Versions: 3.1
> Reporter: Dmitri Blinov
> Priority: Minor
> Fix For: Later
>
>
> Java8 introduced functional interfaces, among them {{Function}} and
> {{BiFunction}} interfaces which are used as parameters to method calls, for
> example, {{Map.computeIfAbsent()}} or {{Map.computeIfPresent()}}. In Jexl we
> have lambdas which in theory are good candidates to construct a {{Function}}
> for lambda with one parameter, and a {{BiFunction}} for lambda with two
> parameters.
> The problem is Jexl can not currently support Java8 features and all
> instances of lambda are of single {{internal.Closure}} class, which should
> not try to implement both interfaces at once. One of the solutions, IMO, is
> to have a feature to overload lamda creations to construct custom lambda
> classes without shaking Jexl code tree.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)