incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r724312 - /incubator/sling/trunk/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/resource/ServletResourceIterator.java
Date Mon, 08 Dec 2008 11:36:41 GMT
Author: fmeschbe
Date: Mon Dec  8 03:36:40 2008
New Revision: 724312

URL: http://svn.apache.org/viewvc?rev=724312&view=rev
Log:
SLING-761 As of Rev. 724311 the JcrResourceResolver implementation never
returns null for resources along the path to a provided servlet, so
we actually return what the ResourceResolver provides. Still we check
whether the resource resolver actually returns anything for older
implementations and return a synthetic resource in this case.

Modified:
    incubator/sling/trunk/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/resource/ServletResourceIterator.java

Modified: incubator/sling/trunk/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/resource/ServletResourceIterator.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/resource/ServletResourceIterator.java?rev=724312&r1=724311&r2=724312&view=diff
==============================================================================
--- incubator/sling/trunk/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/resource/ServletResourceIterator.java
(original)
+++ incubator/sling/trunk/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/resource/ServletResourceIterator.java
Mon Dec  8 03:36:40 2008
@@ -86,11 +86,13 @@
                 path = path.substring(0, nextSlash);
                 if (!visited.contains(path)) {
                     visited.add(path);
-                    if (parentResource.getResourceResolver().getResource(path) == null) {
-                        return new SyntheticResource(
+                    Resource res =  parentResource.getResourceResolver().getResource(path);
+                    if (res == null) {
+                        res = new SyntheticResource(
                             parentResource.getResourceResolver(), path,
                             ResourceProvider.RESOURCE_TYPE_SYNTHETIC);
                     }
+                    return res;
                 }
             }
         }



Mime
View raw message