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:43:30 UTC

[sling-org-apache-sling-scripting-sightly] branch SLING-11601-use-LazyBindings created (now 655d5f9)

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-sightly.git


      at 655d5f9  SLING-11601 use LazyBindings

This branch includes the following new commits:

     new 655d5f9  SLING-11601 use LazyBindings

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-sightly] 01/01: SLING-11601 use LazyBindings

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-sightly.git

commit 655d5f956857ae6be91b5a263300b6e28e10120d
Author: Joerg Hoh <jo...@apache.org>
AuthorDate: Thu Sep 29 12:42:53 2022 +0200

    SLING-11601 use LazyBindings
---
 .../sling/scripting/sightly/impl/engine/SightlyCompiledScript.java    | 4 ++--
 .../org/apache/sling/scripting/sightly/impl/utils/BindingsUtils.java  | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/sling/scripting/sightly/impl/engine/SightlyCompiledScript.java b/src/main/java/org/apache/sling/scripting/sightly/impl/engine/SightlyCompiledScript.java
index 7013430..b1d264c 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/impl/engine/SightlyCompiledScript.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/impl/engine/SightlyCompiledScript.java
@@ -24,9 +24,9 @@ import javax.script.Bindings;
 import javax.script.CompiledScript;
 import javax.script.ScriptContext;
 import javax.script.ScriptEngine;
-import javax.script.SimpleBindings;
 
 import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.scripting.LazyBindings;
 import org.apache.sling.api.scripting.SlingBindings;
 import org.apache.sling.scripting.sightly.SightlyException;
 import org.apache.sling.scripting.sightly.impl.engine.runtime.RenderContextImpl;
@@ -58,7 +58,7 @@ public class SightlyCompiledScript extends CompiledScript {
             RenderContext renderContext = new RenderContextImpl(scriptEngine.getConfiguration(),
                     scriptEngine.getExtensionRegistryService(), context);
             PrintWriter out = new PrintWriter(context.getWriter());
-            renderUnit.render(out, renderContext, new SimpleBindings());
+            renderUnit.render(out, renderContext, new LazyBindings());
         } finally {
             request.setAttribute(SlingBindings.class.getName(), oldBindings);
         }
diff --git a/src/main/java/org/apache/sling/scripting/sightly/impl/utils/BindingsUtils.java b/src/main/java/org/apache/sling/scripting/sightly/impl/utils/BindingsUtils.java
index 8de2121..8d3706e 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/impl/utils/BindingsUtils.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/impl/utils/BindingsUtils.java
@@ -17,7 +17,6 @@
 package org.apache.sling.scripting.sightly.impl.utils;
 
 import javax.script.Bindings;
-import javax.script.SimpleBindings;
 
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.SlingHttpServletResponse;