sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject [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.
Date Tue, 07 Nov 2017 10:04:04 GMT
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 <cziegeler@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" <commits@sling.apache.org>.

Mime
View raw message