incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1144175 - /sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/SlingServletResolver.java
Date Fri, 08 Jul 2011 06:47:10 GMT
Author: cziegeler
Date: Fri Jul  8 06:47:10 2011
New Revision: 1144175

URL: http://svn.apache.org/viewvc?rev=1144175&view=rev
Log:
SLING-2099 - fixing NPE in SlingServletResolver 

Modified:
    sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/SlingServletResolver.java

Modified: sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/SlingServletResolver.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/SlingServletResolver.java?rev=1144175&r1=1144174&r2=1144175&view=diff
==============================================================================
--- sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/SlingServletResolver.java
(original)
+++ sling/trunk/bundles/servlets/resolver/src/main/java/org/apache/sling/servlets/resolver/internal/SlingServletResolver.java
Fri Jul  8 06:47:10 2011
@@ -162,7 +162,7 @@ public class SlingServletResolver implem
      * @scr.property values="html"
      */
     public static final String PROP_DEFAULT_EXTENSIONS = "servletresolver.defaultExtensions";
-    
+
     private static final String[] DEFAULT_DEFAULT_EXTENSIONS = new String[] {"html"};
 
     /** @scr.reference */
@@ -225,7 +225,7 @@ public class SlingServletResolver implem
      * The allowed execution paths.
      */
     private String[] executionPaths;
-    
+
     /**
      * The default extensions
      */
@@ -587,7 +587,7 @@ public class SlingServletResolver implem
             final ResourceCollector locationUtil = ResourceCollector.create(request, workspaceName,
this.executionPaths, this.defaultExtensions);
             servlet = getServlet(locationUtil, request, resolver);
 
-            if (log.isDebugEnabled()) {
+            if (servlet != null && log.isDebugEnabled()) {
                 log.debug("getServlet returns servlet {}", RequestUtil.getServletName(servlet));
             }
         }



Mime
View raw message