Author: markt Date: Tue Feb 2 17:52:17 2010 New Revision: 905732 URL: http://svn.apache.org/viewvc?rev=905732&view=rev Log: Fix Eclipse warnings
Modified: tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java Modified: tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java?rev=905732&r1=905731&r2=905732&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java (original) +++ tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java Tue Feb 2 17:52:17 2010 @@ -79,7 +79,9 @@ public class DefaultServlet extends HttpServlet { - + + private static final long serialVersionUID = 1L; + // ----------------------------------------------------- Instance Variables @@ -671,10 +673,12 @@ boolean content) throws IOException, ServletException { + boolean serveContent = content; + // Identify the requested resource path String path = getRelativePath(request); if (debug > 0) { - if (content) + if (serveContent) log("DefaultServlet.serveResource: Serving resource '" + path + "' headers and data"); else @@ -779,7 +783,7 @@ // Special case for zero length files, which would cause a // (silent) ISE when setting the output buffer size if (contentLength == 0L) { - content = false; + serveContent = false; } } @@ -787,7 +791,7 @@ ServletOutputStream ostream = null; PrintWriter writer = null; - if (content) { + if (serveContent) { // Trying to retrieve the servlet output stream @@ -834,7 +838,7 @@ InputStream renderResult = null; if (cacheEntry.context != null) { - if (content) { + if (serveContent) { // Serve the directory browser renderResult = render(request.getContextPath(), cacheEntry); @@ -843,7 +847,7 @@ } // Copy the input stream to our output stream (if requested) - if (content) { + if (serveContent) { try { response.setBufferSize(output); } catch (IllegalStateException e) { @@ -888,7 +892,7 @@ response.setContentType(contentType); } - if (content) { + if (serveContent) { try { response.setBufferSize(output); } catch (IllegalStateException e) { @@ -907,7 +911,7 @@ response.setContentType("multipart/byteranges; boundary=" + mimeSeparation); - if (content) { + if (serveContent) { try { response.setBufferSize(output); } catch (IllegalStateException e) { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org