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.10
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-sightly-js-provider.git

commit 35a74131da438ff18e721a8df784866ebb44630a
Author: Radu Cotescu <[email protected]>
AuthorDate: Wed Sep 2 13:21:42 2015 +0000

    SLING-4989 - The JavaScript Use Provider fails to correctly load script 
using inheritance
    
    * made sure that an included script can successfully call an inherited 
script
    
    git-svn-id: 
https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/js-use-provider@1700810
 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/java/org/apache/sling/scripting/sightly/js/impl/Utils.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/src/main/java/org/apache/sling/scripting/sightly/js/impl/Utils.java 
b/src/main/java/org/apache/sling/scripting/sightly/js/impl/Utils.java
index 3c7a4cf..48d06e0 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/js/impl/Utils.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/js/impl/Utils.java
@@ -61,7 +61,7 @@ public class Utils {
             }
         }
         if (scriptResource == null) {
-            throw new SightlyException("Required script resource could not be 
located: " + path);
+            throw new SightlyException("Required script resource could not be 
located: " + path + ". The caller is " + caller.getPath());
         }
         return scriptResource;
     }
@@ -81,6 +81,9 @@ public class Utils {
             String parentResourceType = resourceA.getResourceType();
             if ("nt:file".equals(parentResourceType)) {
                 parentResourceType = 
ResourceUtil.getParent(resourceA.getPath());
+                if (parentResourceType.equals(resourceB.getPath())) {
+                    return true;
+                }
             }
             Resource parentB = resolver.getResource(resourceBSuperType);
             while (parentB != null && !"/".equals(parentB.getPath()) && 
StringUtils.isNotEmpty(resourceBSuperType)) {

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to