You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by jo...@apache.org on 2022/09/29 10:33:15 UTC

[sling-org-apache-sling-scripting-api] branch SLING-11601-use-LazyBindings created (now f0dc6be)

This is an automated email from the ASF dual-hosted git repository.

joerghoh pushed a change to branch SLING-11601-use-LazyBindings
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git


      at f0dc6be  SLING-11601 use LazyBindings instead of the SimpleBindings

This branch includes the following new commits:

     new f0dc6be  SLING-11601 use LazyBindings instead of the SimpleBindings

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[sling-org-apache-sling-scripting-api] 01/01: SLING-11601 use LazyBindings instead of the SimpleBindings

Posted by jo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

joerghoh pushed a commit to branch SLING-11601-use-LazyBindings
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-api.git

commit f0dc6be2b4178625a89db3579aadf251dcb2a031
Author: Joerg Hoh <jo...@apache.org>
AuthorDate: Thu Sep 29 12:31:45 2022 +0200

    SLING-11601 use LazyBindings instead of the SimpleBindings
---
 pom.xml                                                              | 2 +-
 .../org/apache/sling/scripting/api/AbstractSlingScriptEngine.java    | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index 50d2de3..eae83db 100644
--- a/pom.xml
+++ b/pom.xml
@@ -51,7 +51,7 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.api</artifactId>
-            <version>2.16.0</version>
+            <version>2.21.0</version>
             <scope>provided</scope>
         </dependency>
     </dependencies>
diff --git a/src/main/java/org/apache/sling/scripting/api/AbstractSlingScriptEngine.java b/src/main/java/org/apache/sling/scripting/api/AbstractSlingScriptEngine.java
index 520f268..2586bbc 100644
--- a/src/main/java/org/apache/sling/scripting/api/AbstractSlingScriptEngine.java
+++ b/src/main/java/org/apache/sling/scripting/api/AbstractSlingScriptEngine.java
@@ -25,7 +25,8 @@ import javax.script.Bindings;
 import javax.script.ScriptContext;
 import javax.script.ScriptEngineFactory;
 import javax.script.ScriptException;
-import javax.script.SimpleBindings;
+
+import org.apache.sling.api.scripting.LazyBindings;
 
 public abstract class AbstractSlingScriptEngine extends AbstractScriptEngine {
 
@@ -36,7 +37,7 @@ public abstract class AbstractSlingScriptEngine extends AbstractScriptEngine {
     }
 
     public Bindings createBindings() {
-        return new SimpleBindings();
+        return new LazyBindings();
     }
 
     public Object eval(String script, ScriptContext context) throws ScriptException {