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:11:06 UTC

[sling-org-apache-sling-scripting-sightly-js-provider] 09/18: SLING-4304 Refactor the ResourceResolution class and improve its JavaDoc

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

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

commit c6b94f4a01e2eaf83ec25830ff9bec35b815e341
Author: Felix Meschberger <fm...@apache.org>
AuthorDate: Fri Jan 16 14:04:55 2015 +0000

    SLING-4304 Refactor the ResourceResolution class and improve its JavaDoc
    
    Apply patch by Radu Cotescu (thanks a lot)
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/scripting/sightly/js-use-provider@1652411 13f79535-47bb-0310-9956-ffa450edef68
---
 .../org/apache/sling/scripting/sightly/js/impl/JsEnvironment.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/sling/scripting/sightly/js/impl/JsEnvironment.java b/src/main/java/org/apache/sling/scripting/sightly/js/impl/JsEnvironment.java
index ffaeeb8..859accc 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/impl/JsEnvironment.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/JsEnvironment.java
@@ -87,12 +87,12 @@ public class JsEnvironment {
     public void run(Resource caller, String path, Bindings globalBindings, Bindings arguments, UnaryCallback callback) {
         Resource scriptResource = caller.getChild(path);
         SlingScriptHelper scriptHelper = (SlingScriptHelper) globalBindings.get(SlingBindings.SLING);
-        Resource componentCaller = ResourceResolution.resolveComponentForRequest(caller.getResourceResolver(), scriptHelper.getRequest());
+        Resource componentCaller = ResourceResolution.getResourceForRequest(caller.getResourceResolver(), scriptHelper.getRequest());
         if (scriptResource == null) {
-            scriptResource = ResourceResolution.resolveComponentRelative(caller.getResourceResolver(), componentCaller, path);
+            scriptResource = ResourceResolution.getResourceFromSearchPath(componentCaller, path);
         }
         if (scriptResource == null) {
-            scriptResource = ResourceResolution.resolveComponentRelative(caller.getResourceResolver(), caller, path);
+            scriptResource = ResourceResolution.getResourceFromSearchPath(caller, path);
         }
         if (scriptResource == null) {
             throw new SightlyException("Required script resource could not be located: " + path);

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