You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:04:04 UTC

[sling-org-apache-sling-scripting-java] 30/41: SLING-1021 - Use the global scope for the script resource resolver to avoid having this in the bindings for the script.

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

rombert pushed a commit to annotated tag org.apache.sling.scripting.java-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-java.git

commit 76f52ae892cf5fae1f613ec36a0df72157acfa4d
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Jul 23 09:14:15 2009 +0000

    SLING-1021 - Use the global scope for the script resource resolver to avoid having this in the bindings for the script.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/scripting/java@796984 13f79535-47bb-0310-9956-ffa450edef68
---
 .../java/org/apache/sling/scripting/java/JavaScriptEngineFactory.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/scripting/java/JavaScriptEngineFactory.java b/src/main/java/org/apache/sling/scripting/java/JavaScriptEngineFactory.java
index 698937c..1363b5c 100644
--- a/src/main/java/org/apache/sling/scripting/java/JavaScriptEngineFactory.java
+++ b/src/main/java/org/apache/sling/scripting/java/JavaScriptEngineFactory.java
@@ -169,7 +169,7 @@ public class JavaScriptEngineFactory extends AbstractScriptEngineFactory {
                              final SlingScriptHelper scriptHelper,
                              final ScriptContext context) {
         ResourceResolver resolver = (ResourceResolver) context.getAttribute(SlingScriptConstants.ATTR_SCRIPT_RESOURCE_RESOLVER,
-                ScriptContext.ENGINE_SCOPE);
+                ScriptContext.GLOBAL_SCOPE);
         if ( resolver == null ) {
             resolver = scriptHelper.getScript().getScriptResource().getResourceResolver();
         }

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.