Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2014-07-16 18:25:49 -0400
committerGreg Wilkins2014-07-16 18:31:08 -0400
commit937ef10718bfb1960e7a4f5b48d454112c824759 (patch)
tree8c1d4b1fe9d0f29183c5082e7ec485ccd34dfc43 /jetty-servlet
parent5be27516a4bd9793e217b7ef77ef1447309b0f0e (diff)
downloadorg.eclipse.jetty.project-937ef10718bfb1960e7a4f5b48d454112c824759.tar.gz
org.eclipse.jetty.project-937ef10718bfb1960e7a4f5b48d454112c824759.tar.xz
org.eclipse.jetty.project-937ef10718bfb1960e7a4f5b48d454112c824759.zip
[FindBugs] outer if statement alreayd catches max_cached_files
Diffstat (limited to 'jetty-servlet')
-rw-r--r--jetty-servlet/src/main/java/org/eclipse/jetty/servlet/DefaultServlet.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/DefaultServlet.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/DefaultServlet.java
index ed5d330f7e..cf22ca3b4c 100644
--- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/DefaultServlet.java
+++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/DefaultServlet.java
@@ -263,11 +263,11 @@ public class DefaultServlet extends HttpServlet implements ResourceFactory
try
{
- if (_cache==null && max_cached_files>0)
+ if (_cache==null && (max_cached_files!=-2 || max_cache_size!=-2 || max_cached_file_size!=-2))
{
_cache= new ResourceCache(null,this,_mimeTypes,_useFileMappedBuffer,_etags);
- if (max_cache_size>0)
+ if (max_cache_size>=0)
_cache.setMaxCacheSize(max_cache_size);
if (max_cached_file_size>=-1)
_cache.setMaxCachedFileSize(max_cached_file_size);
@@ -294,19 +294,19 @@ public class DefaultServlet extends HttpServlet implements ResourceFactory
}
}
else
- {
- //.svgz files are gzipped svg files and must be served with Content-Encoding:gzip
- _gzipEquivalentFileExtensions.add(".svgz");
- }
+ {
+ //.svgz files are gzipped svg files and must be served with Content-Encoding:gzip
+ _gzipEquivalentFileExtensions.add(".svgz");
+ }
- _servletHandler= _contextHandler.getChildHandlerByClass(ServletHandler.class);
- for (ServletHolder h :_servletHandler.getServlets())
- if (h.getServletInstance()==this)
- _defaultHolder=h;
+ _servletHandler= _contextHandler.getChildHandlerByClass(ServletHandler.class);
+ for (ServletHolder h :_servletHandler.getServlets())
+ if (h.getServletInstance()==this)
+ _defaultHolder=h;
-
- if (LOG.isDebugEnabled())
- LOG.debug("resource base = "+_resourceBase);
+
+ if (LOG.isDebugEnabled())
+ LOG.debug("resource base = "+_resourceBase);
}
/**

Back to the top