[FindBugs] outer if statement alreayd catches max_cached_files

This commit is contained in:
Greg Wilkins 2014-07-17 08:25:49 +10:00
parent 5be27516a4
commit 937ef10718
1 changed files with 13 additions and 13 deletions

View File

@ -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);
}
/**