Author: fmeschbe
Date: Thu Feb  7 01:27:23 2008
New Revision: 619318

URL: http://svn.apache.org/viewvc?rev=619318&view=rev
Log:
SLING-222 Have to return after logging the message in case the
included path does not resolve to a resource, otherwise a
NullPointerException is thrown ...

Modified:
    
incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestDispatcher.java

Modified: 
incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestDispatcher.java
URL: 
http://svn.apache.org/viewvc/incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestDispatcher.java?rev=619318&r1=619317&r2=619318&view=diff
==============================================================================
--- 
incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestDispatcher.java
 (original)
+++ 
incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/request/SlingRequestDispatcher.java
 Thu Feb  7 01:27:23 2008
@@ -91,12 +91,12 @@
 
             // resolve the absolute path in the resource resolver, using
             // only those parts of the path as if it would be request path
-            ResourceResolver rr = cRequest.getResourceResolver();
-            resource = rr.resolve(absPath);
+            resource = cRequest.getResourceResolver().resolve(absPath);
             
             // if the resource could not be resolved, fail gracefully
             if (resource == null) {
                 log.error("include: Could not resolve {} to a resource, not 
including", absPath);
+                return;
             }
         }
 


Reply via email to