You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/03/02 21:48:17 UTC

svn commit: r1573368 - in /tomcat/trunk: java/org/apache/catalina/webresources/Cache.java webapps/docs/changelog.xml

Author: markt
Date: Sun Mar  2 20:48:17 2014
New Revision: 1573368

URL: http://svn.apache.org/r1573368
Log:
Avoid NPE in resource cache when making an invalid request for a resource outside of the web application.

Modified:
    tomcat/trunk/java/org/apache/catalina/webresources/Cache.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/webresources/Cache.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/Cache.java?rev=1573368&r1=1573367&r2=1573368&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/webresources/Cache.java (original)
+++ tomcat/trunk/java/org/apache/catalina/webresources/Cache.java Sun Mar  2 20:48:17 2014
@@ -145,9 +145,7 @@ public class Cache {
 
     private boolean noCache(String path) {
         // Don't cache resources used by the class loader (it has its own cache)
-        // TODO. Review these exclusions once class loader resource handling is
-        // complete
-        if (path.startsWith("/WEB-INF/classes") ||
+        if (path == null || path.startsWith("/WEB-INF/classes") ||
                 path.startsWith("/WEB-INF/lib")) {
             return true;
         }

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1573368&r1=1573367&r2=1573368&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Sun Mar  2 20:48:17 2014
@@ -74,6 +74,10 @@
         elements and attributes supported by the Servlet version of the merged
         file. (markt)
       </fix>
+      <fix>
+        Avoid <code>NullPointerException</code> in resource cache when making an
+        invalid request for a resource outside of the web application. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org