Fix Eclipse warnings in this package. No functional change.
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 21 Jun 2010 11:54:13 +0000 (11:54 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 21 Jun 2010 11:54:13 +0000 (11:54 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@956537 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/http11/filters/BufferedInputFilter.java
java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java
java/org/apache/coyote/http11/filters/GzipOutputFilter.java
java/org/apache/coyote/http11/filters/SavedRequestInputFilter.java
java/org/apache/coyote/http11/filters/VoidInputFilter.java
java/org/apache/coyote/http11/filters/VoidOutputFilter.java

index 8795531..cb7ed66 100644 (file)
@@ -89,11 +89,11 @@ public class BufferedInputFilter implements InputFilter {
     public int doRead(ByteChunk chunk, Request request) throws IOException {
         if (hasRead || buffered.getLength() <= 0) {
             return -1;
-        } else {
-            chunk.setBytes(buffered.getBytes(), buffered.getStart(),
-                           buffered.getLength());
-            hasRead = true;
         }
+
+        chunk.setBytes(buffered.getBytes(), buffered.getStart(),
+                buffered.getLength());
+        hasRead = true;
         return chunk.getLength();
     }
 
index 7e488f2..1e4bfc5 100644 (file)
@@ -176,6 +176,7 @@ public class ChunkedInputFilter implements InputFilter {
      * Read the content length from the request.
      */
     public void setRequest(Request request) {
+        // NOOP: Request isn't used so ignore it
     }
 
 
@@ -187,6 +188,7 @@ public class ChunkedInputFilter implements InputFilter {
 
         // Consume extra bytes : parse the stream until the end chunk is found
         while (doRead(readChunk, null) >= 0) {
+            // NOOP: Just consume the input
         }
 
         // Return the number of extra bytes which were consumed
@@ -275,6 +277,7 @@ public class ChunkedInputFilter implements InputFilter {
             }
 
             if (buf[pos] == Constants.CR) {
+                // FIXME: Improve parsing to check for CRLF 
             } else if (buf[pos] == Constants.LF) {
                 eol = true;
             } else if (buf[pos] == Constants.SEMI_COLON) {
index e0b18e3..650781d 100644 (file)
@@ -142,6 +142,7 @@ public class ChunkedOutputFilter implements OutputFilter {
      * after the response header processing is complete.
      */
     public void setResponse(Response response) {
+        // NOOP: No need for parameters from response in this filter
     }
 
 
@@ -172,6 +173,7 @@ public class ChunkedOutputFilter implements OutputFilter {
      * Make the filter ready to process the next request.
      */
     public void recycle() {
+        // NOOP: Nothing to recycle
     }
 
 
index 9006662..01873db 100644 (file)
@@ -99,6 +99,7 @@ public class GzipOutputFilter implements OutputFilter {
      * after the response header processing is complete.
      */
     public void setResponse(Response response) {
+        // NOOP: No need for parameters from response in this filter
     }
 
 
@@ -166,9 +167,9 @@ public class GzipOutputFilter implements OutputFilter {
             buffer.doWrite(outputChunk, null);
         }
         @Override
-        public void flush() throws IOException {}
+        public void flush() throws IOException {/*NOOP*/}
         @Override
-        public void close() throws IOException {}
+        public void close() throws IOException {/*NOOP*/}
     }
 
 
index 60aef9a..d6b2eda 100644 (file)
@@ -91,6 +91,7 @@ public class SavedRequestInputFilter implements InputFilter {
      * Set the next buffer in the filter pipeline (has no effect).
      */
     public void setBuffer(InputBuffer buffer) {
+        // NOOP since this filter will be providing the request body
     }
 
     /**
index 5d1c0c2..dec7fe6 100644 (file)
@@ -75,6 +75,7 @@ public class VoidInputFilter implements InputFilter {
      * Set the associated request.
      */
     public void setRequest(Request request) {
+        // NOOP: Request isn't used so ignore it
     }
 
 
@@ -82,6 +83,7 @@ public class VoidInputFilter implements InputFilter {
      * Set the next buffer in the filter pipeline.
      */
     public void setBuffer(InputBuffer buffer) {
+        // NOOP: No body to read
     }
 
 
@@ -89,6 +91,7 @@ public class VoidInputFilter implements InputFilter {
      * Make the filter ready to process the next request.
      */
     public void recycle() {
+        // NOOP: Nothing to recycle
     }
 
 
index 72569c5..5a3d353 100644 (file)
@@ -83,6 +83,7 @@ public class VoidOutputFilter implements OutputFilter {
      * after the response header processing is complete.
      */
     public void setResponse(Response response) {
+        // NOOP: No need for parameters from response in this filter
     }
 
 
@@ -98,6 +99,7 @@ public class VoidOutputFilter implements OutputFilter {
      * Make the filter ready to process the next request.
      */
     public void recycle() {
+        // NOOP: Nothing to recycle
     }