[
https://issues.apache.org/jira/browse/SLING-8737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Radu Cotescu reassigned SLING-8737:
-----------------------------------
Assignee: Radu Cotescu
> Add support for lazily-evaluated bindings
> -----------------------------------------
>
> Key: SLING-8737
> URL: https://issues.apache.org/jira/browse/SLING-8737
> Project: Sling
> Issue Type: New Feature
> Components: Scripting
> Reporter: Radu Cotescu
> Assignee: Radu Cotescu
> Priority: Major
> Fix For: Scripting Core 2.1.0
>
>
> The {{org.apache.sling.scripting.core}} module provides support for passing a
> {{javax.script.Bindings}} to script engines. The current implementation
> relies directly on {{javax.script.SimpleBindings}}, which means that the
> values with which the map is populated have to be computed before insertion.
> In some cases these computations are not trivial, however there's no
> guarantee that the value will actually be used.
> In order to optimise the {{Bindings}} usage, given that Java 8 and above
> provide the
> [{{Supplier}}|https://docs.oracle.com/javase/8/docs/api/java/util/function/Supplier.html]
> functional interface, the {{org.apache.sling.scripting.core}} module should
> optionally allow {{BindingsValuesProvider}}s to provide {{Supplier}}s, which
> are invoked on-demand.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)