Author: markt
Date: Tue Mar 24 13:10:35 2009
New Revision: 757778

URL: http://svn.apache.org/viewvc?rev=757778&view=rev
Log:
Fix some 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=757778&r1=757777&r2=757778&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java Tue Mar 
24 13:10:35 2009
@@ -1131,10 +1131,9 @@
 
         if (xsltInputStream==null) {
             return renderHtml(contextPath, cacheEntry);
-        } else {
-            return renderXml(contextPath, cacheEntry, xsltInputStream);
         }
-
+        return renderXml(contextPath, cacheEntry, xsltInputStream);
+        
     }
 
     /**
@@ -1439,7 +1438,7 @@
      * Get the readme file as a string.
      */
     protected String getReadme(DirContext directory)
-        throws IOException, ServletException {
+        throws IOException {
 
         if (readmeFile != null) {
             try {
@@ -1467,7 +1466,7 @@
      * Return the xsl template inputstream (if possible)
      */
     protected InputStream findXsltInputStream(DirContext directory)
-        throws IOException, ServletException {
+        throws IOException {
 
         if (localXsltFile != null) {
             try {
@@ -1537,9 +1536,8 @@
             }
             request.setAttribute("org.apache.tomcat.sendfile.token", this);
             return true;
-        } else {
-            return false;
         }
+        return false;
     }
     
     
@@ -1599,9 +1597,8 @@
      * processing is stopped
      */
     protected boolean checkIfModifiedSince(HttpServletRequest request,
-                                         HttpServletResponse response,
-                                         ResourceAttributes resourceAttributes)
-        throws IOException {
+            HttpServletResponse response,
+            ResourceAttributes resourceAttributes) {
         try {
             long headerValue = request.getDateHeader("If-Modified-Since");
             long lastModified = resourceAttributes.getLastModified();
@@ -1675,11 +1672,9 @@
                     response.setHeader("ETag", eTag);
 
                     return false;
-                } else {
-                    response.sendError
-                        (HttpServletResponse.SC_PRECONDITION_FAILED);
-                    return false;
                 }
+                response.sendError(HttpServletResponse.SC_PRECONDITION_FAILED);
+                return false;
             }
         }
         return true;



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

Reply via email to