incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r618958 - /incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingHttpServletRequestImpl.java
Date Wed, 06 Feb 2008 10:58:16 GMT
Author: fmeschbe
Date: Wed Feb  6 02:58:12 2008
New Revision: 618958

URL: http://svn.apache.org/viewvc?rev=618958&view=rev
Log:
Do not create a RequestDispatcher if path or resource is null

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

Modified: incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingHttpServletRequestImpl.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingHttpServletRequestImpl.java?rev=618958&r1=618957&r2=618958&view=diff
==============================================================================
--- incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingHttpServletRequestImpl.java
(original)
+++ incubator/sling/trunk/sling/core/src/main/java/org/apache/sling/core/impl/SlingHttpServletRequestImpl.java
Wed Feb  6 02:58:12 2008
@@ -91,27 +91,33 @@
     }
 
     /**
-     * @see org.apache.sling.api.SlingHttpServletRequest#getRequestDispatcher(org.apache.sling.api.resource.Resource)
+     * Returns <code>null</code> if <code>resource</code> is <code>null</code>.
      */
     public RequestDispatcher getRequestDispatcher(Resource resource) {
         return getRequestDispatcher(resource, null);
     }
 
+    /**
+     * Returns <code>null</code> if <code>resource</code> is <code>null</code>.
+     */
     public RequestDispatcher getRequestDispatcher(Resource resource,
             RequestDispatcherOptions options) {
-        return new SlingRequestDispatcher(resource, options);
+        return (resource != null) ? new SlingRequestDispatcher(resource, options) : null;
     }
 
     /**
-     * @see javax.servlet.ServletRequestWrapper#getRequestDispatcher(java.lang.String)
+     * Returns <code>null</code> if <code>path</code> is <code>null</code>.
      */
     public RequestDispatcher getRequestDispatcher(String path) {
-        return new SlingRequestDispatcher(path, null);
+        return getRequestDispatcher(path, null);
     }
 
+    /**
+     * Returns <code>null</code> if <code>path</code> is <code>null</code>.
+     */
     public RequestDispatcher getRequestDispatcher(String path,
             RequestDispatcherOptions options) {
-        return new SlingRequestDispatcher(path, options);
+        return (path != null) ? new SlingRequestDispatcher(path, options) : null;
     }
     
     /**



Mime
View raw message