incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r822623 - /sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver2.java
Date Wed, 07 Oct 2009 08:45:46 GMT
Author: cziegeler
Date: Wed Oct  7 08:45:46 2009
New Revision: 822623

URL: http://svn.apache.org/viewvc?rev=822623&view=rev
Log:
SLING-864 : Parse path info for NonExistingResource - apply patch from Felix

Modified:
    sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver2.java

Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver2.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver2.java?rev=822623&r1=822622&r2=822623&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver2.java
(original)
+++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver2.java
Wed Oct  7 08:45:46 2009
@@ -231,10 +231,19 @@
 
         // if no resource has been found, use a NonExistingResource
         if (res == null) {
+            final String resourcePath = ensureAbsPath(realPathList[0]);
             log.debug(
                 "resolve: Path {} does not resolve, returning NonExistingResource at {}",
-                absPath, realPathList[0]);
-            res = new NonExistingResource(this, ensureAbsPath(realPathList[0]));
+                   absPath, resourcePath);
+
+            res = new NonExistingResource(this, resourcePath);
+            // SLING-864: if the path contains a dot we assume this to be
+            // the start for any selectors, extension, suffix, which may be
+            // used for further request processing.
+            int index = resourcePath.indexOf('.');
+            if (index != -1) {
+                res.getResourceMetadata().setResolutionPathInfo(resourcePath.substring(index));
+            }
         } else {
             log.debug("resolve: Path {} resolves to Resource {}", absPath, res);
         }



Mime
View raw message