This is an automated email from the ASF dual-hosted git repository.
radu pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-sightly-js-provider.git
The following commit(s) were added to refs/heads/master by this push:
new ffb84be SLING-9599 - Incomplete non-existing resource check
ffb84be is described below
commit ffb84be43e9e5dee4ce8b8cd3c4d179251840ccc
Author: Radu Cotescu <[email protected]>
AuthorDate: Tue Jul 21 18:44:49 2020 +0200
SLING-9599 - Incomplete non-existing resource check
* also look at the resource type when checking if a certain resource
is a non-existing resource
---
.../apache/sling/scripting/sightly/js/impl/use/DependencyResolver.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/src/main/java/org/apache/sling/scripting/sightly/js/impl/use/DependencyResolver.java
b/src/main/java/org/apache/sling/scripting/sightly/js/impl/use/DependencyResolver.java
index f3f502a..c586b78 100644
---
a/src/main/java/org/apache/sling/scripting/sightly/js/impl/use/DependencyResolver.java
+++
b/src/main/java/org/apache/sling/scripting/sightly/js/impl/use/DependencyResolver.java
@@ -95,7 +95,8 @@ public class DependencyResolver {
if (normalizedPath != null) {
servletResource =
scriptingResourceResolver.resolve(normalizedPath);
- if (!(servletResource instanceof
NonExistingResource)) {
+ if (!(servletResource instanceof
NonExistingResource) &&
+
!Resource.RESOURCE_TYPE_NON_EXISTING.equalsIgnoreCase(servletResource.getResourceType()))
{
break;
}
}