From: markt Date: Tue, 14 Sep 2010 07:23:19 +0000 (+0000) Subject: Add @Override markers to package X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=3e769bd8e2543aedf65200a465a174e1a796817d;p=tomcat7.0 Add @Override markers to package git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@996771 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/coyote/http11/filters/BufferedInputFilter.java b/java/org/apache/coyote/http11/filters/BufferedInputFilter.java index 36e212f88..b79e7eb9e 100644 --- a/java/org/apache/coyote/http11/filters/BufferedInputFilter.java +++ b/java/org/apache/coyote/http11/filters/BufferedInputFilter.java @@ -72,6 +72,7 @@ public class BufferedInputFilter implements InputFilter { /** * Reads the request body and buffers it. */ + @Override public void setRequest(Request request) { // save off the Request body try { @@ -87,6 +88,7 @@ public class BufferedInputFilter implements InputFilter { /** * Fills the given ByteChunk with the buffered request body. */ + @Override public int doRead(ByteChunk chunk, Request request) throws IOException { if (hasRead || buffered.getLength() <= 0) { return -1; @@ -98,10 +100,12 @@ public class BufferedInputFilter implements InputFilter { return chunk.getLength(); } + @Override public void setBuffer(InputBuffer buffer) { this.buffer = buffer; } + @Override public void recycle() { if (buffered != null) { if (buffered.getBuffer().length > 65536) { @@ -115,14 +119,17 @@ public class BufferedInputFilter implements InputFilter { buffer = null; } + @Override public ByteChunk getEncodingName() { return ENCODING; } + @Override public long end() throws IOException { return 0; } + @Override public int available() { return buffered.getLength(); } diff --git a/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java b/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java index 17fff6641..996c0776d 100644 --- a/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java +++ b/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java @@ -116,6 +116,7 @@ public class ChunkedInputFilter implements InputFilter { * whichever is greater. If the filter does not do request body length * control, the returned value should be -1. */ + @Override public int doRead(ByteChunk chunk, Request req) throws IOException { @@ -174,6 +175,7 @@ public class ChunkedInputFilter implements InputFilter { /** * Read the content length from the request. */ + @Override public void setRequest(Request request) { // NOOP: Request isn't used so ignore it } @@ -182,6 +184,7 @@ public class ChunkedInputFilter implements InputFilter { /** * End the current request. */ + @Override public long end() throws IOException { @@ -199,6 +202,7 @@ public class ChunkedInputFilter implements InputFilter { /** * Amount of bytes still available in a buffer. */ + @Override public int available() { return (lastValid - pos); } @@ -207,6 +211,7 @@ public class ChunkedInputFilter implements InputFilter { /** * Set the next buffer in the filter pipeline. */ + @Override public void setBuffer(InputBuffer buffer) { this.buffer = buffer; } @@ -215,6 +220,7 @@ public class ChunkedInputFilter implements InputFilter { /** * Make the filter ready to process the next request. */ + @Override public void recycle() { remaining = 0; pos = 0; @@ -227,6 +233,7 @@ public class ChunkedInputFilter implements InputFilter { * Return the name of the associated encoding; Here, the value is * "identity". */ + @Override public ByteChunk getEncodingName() { return ENCODING; } diff --git a/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java b/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java index 1bf8f559e..cede62331 100644 --- a/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java +++ b/java/org/apache/coyote/http11/filters/ChunkedOutputFilter.java @@ -102,6 +102,7 @@ public class ChunkedOutputFilter implements OutputFilter { * * @return number of bytes written by the filter */ + @Override public int doWrite(ByteChunk chunk, Response res) throws IOException { @@ -140,6 +141,7 @@ public class ChunkedOutputFilter implements OutputFilter { * necessary reading can occur in that method, as this method is called * after the response header processing is complete. */ + @Override public void setResponse(Response response) { // NOOP: No need for parameters from response in this filter } @@ -148,6 +150,7 @@ public class ChunkedOutputFilter implements OutputFilter { /** * Set the next buffer in the filter pipeline. */ + @Override public void setBuffer(OutputBuffer buffer) { this.buffer = buffer; } @@ -157,6 +160,7 @@ public class ChunkedOutputFilter implements OutputFilter { * End the current request. It is acceptable to write extra bytes using * buffer.doWrite during the execution of this method. */ + @Override public long end() throws IOException { @@ -171,6 +175,7 @@ public class ChunkedOutputFilter implements OutputFilter { /** * Make the filter ready to process the next request. */ + @Override public void recycle() { // NOOP: Nothing to recycle } @@ -180,6 +185,7 @@ public class ChunkedOutputFilter implements OutputFilter { * Return the name of the associated encoding; Here, the value is * "identity". */ + @Override public ByteChunk getEncodingName() { return ENCODING; } diff --git a/java/org/apache/coyote/http11/filters/GzipOutputFilter.java b/java/org/apache/coyote/http11/filters/GzipOutputFilter.java index d69133691..652cb2111 100644 --- a/java/org/apache/coyote/http11/filters/GzipOutputFilter.java +++ b/java/org/apache/coyote/http11/filters/GzipOutputFilter.java @@ -85,6 +85,7 @@ public class GzipOutputFilter implements OutputFilter { * * @return number of bytes written by the filter */ + @Override public int doWrite(ByteChunk chunk, Response res) throws IOException { if (compressionStream == null) { @@ -121,6 +122,7 @@ public class GzipOutputFilter implements OutputFilter { * necessary reading can occur in that method, as this method is called * after the response header processing is complete. */ + @Override public void setResponse(Response response) { // NOOP: No need for parameters from response in this filter } @@ -129,6 +131,7 @@ public class GzipOutputFilter implements OutputFilter { /** * Set the next buffer in the filter pipeline. */ + @Override public void setBuffer(OutputBuffer buffer) { this.buffer = buffer; } @@ -138,6 +141,7 @@ public class GzipOutputFilter implements OutputFilter { * End the current request. It is acceptable to write extra bytes using * buffer.doWrite during the execution of this method. */ + @Override public long end() throws IOException { if (compressionStream == null) { @@ -152,6 +156,7 @@ public class GzipOutputFilter implements OutputFilter { /** * Make the filter ready to process the next request. */ + @Override public void recycle() { // Set compression stream to null compressionStream = null; @@ -162,6 +167,7 @@ public class GzipOutputFilter implements OutputFilter { * Return the name of the associated encoding; Here, the value is * "identity". */ + @Override public ByteChunk getEncodingName() { return ENCODING; } diff --git a/java/org/apache/coyote/http11/filters/IdentityInputFilter.java b/java/org/apache/coyote/http11/filters/IdentityInputFilter.java index c2753381e..873f8ea39 100644 --- a/java/org/apache/coyote/http11/filters/IdentityInputFilter.java +++ b/java/org/apache/coyote/http11/filters/IdentityInputFilter.java @@ -105,6 +105,7 @@ public class IdentityInputFilter implements InputFilter { * whichever is greater. If the filter does not do request body length * control, the returned value should be -1. */ + @Override public int doRead(ByteChunk chunk, Request req) throws IOException { @@ -143,6 +144,7 @@ public class IdentityInputFilter implements InputFilter { /** * Read the content length from the request. */ + @Override public void setRequest(Request request) { contentLength = request.getContentLengthLong(); remaining = contentLength; @@ -152,6 +154,7 @@ public class IdentityInputFilter implements InputFilter { /** * End the current request. */ + @Override public long end() throws IOException { @@ -174,6 +177,7 @@ public class IdentityInputFilter implements InputFilter { /** * Amount of bytes still available in a buffer. */ + @Override public int available() { return 0; } @@ -182,6 +186,7 @@ public class IdentityInputFilter implements InputFilter { /** * Set the next buffer in the filter pipeline. */ + @Override public void setBuffer(InputBuffer buffer) { this.buffer = buffer; } @@ -190,6 +195,7 @@ public class IdentityInputFilter implements InputFilter { /** * Make the filter ready to process the next request. */ + @Override public void recycle() { contentLength = -1; remaining = 0; @@ -201,6 +207,7 @@ public class IdentityInputFilter implements InputFilter { * Return the name of the associated encoding; Here, the value is * "identity". */ + @Override public ByteChunk getEncodingName() { return ENCODING; } diff --git a/java/org/apache/coyote/http11/filters/IdentityOutputFilter.java b/java/org/apache/coyote/http11/filters/IdentityOutputFilter.java index 1c3b16f37..fbddde74b 100644 --- a/java/org/apache/coyote/http11/filters/IdentityOutputFilter.java +++ b/java/org/apache/coyote/http11/filters/IdentityOutputFilter.java @@ -95,6 +95,7 @@ public class IdentityOutputFilter implements OutputFilter { * * @return number of bytes written by the filter */ + @Override public int doWrite(ByteChunk chunk, Response res) throws IOException { @@ -140,6 +141,7 @@ public class IdentityOutputFilter implements OutputFilter { * necessary reading can occur in that method, as this method is called * after the response header processing is complete. */ + @Override public void setResponse(Response response) { contentLength = response.getContentLengthLong(); remaining = contentLength; @@ -149,6 +151,7 @@ public class IdentityOutputFilter implements OutputFilter { /** * Set the next buffer in the filter pipeline. */ + @Override public void setBuffer(OutputBuffer buffer) { this.buffer = buffer; } @@ -158,6 +161,7 @@ public class IdentityOutputFilter implements OutputFilter { * End the current request. It is acceptable to write extra bytes using * buffer.doWrite during the execution of this method. */ + @Override public long end() throws IOException { @@ -171,6 +175,7 @@ public class IdentityOutputFilter implements OutputFilter { /** * Make the filter ready to process the next request. */ + @Override public void recycle() { contentLength = -1; remaining = 0; @@ -181,6 +186,7 @@ public class IdentityOutputFilter implements OutputFilter { * Return the name of the associated encoding; Here, the value is * "identity". */ + @Override public ByteChunk getEncodingName() { return ENCODING; } diff --git a/java/org/apache/coyote/http11/filters/SavedRequestInputFilter.java b/java/org/apache/coyote/http11/filters/SavedRequestInputFilter.java index afe7467ab..33289ba49 100644 --- a/java/org/apache/coyote/http11/filters/SavedRequestInputFilter.java +++ b/java/org/apache/coyote/http11/filters/SavedRequestInputFilter.java @@ -46,6 +46,7 @@ public class SavedRequestInputFilter implements InputFilter { /** * Read bytes. */ + @Override public int doRead(ByteChunk chunk, org.apache.coyote.Request request) throws IOException { int writeLength = 0; @@ -69,6 +70,7 @@ public class SavedRequestInputFilter implements InputFilter { /** * Set the content length on the request. */ + @Override public void setRequest(org.apache.coyote.Request request) { request.setContentLength(input.getLength()); } @@ -76,6 +78,7 @@ public class SavedRequestInputFilter implements InputFilter { /** * Make the filter ready to process the next request. */ + @Override public void recycle() { input = null; } @@ -83,6 +86,7 @@ public class SavedRequestInputFilter implements InputFilter { /** * Return the name of the associated encoding; here, the value is null. */ + @Override public ByteChunk getEncodingName() { return null; } @@ -90,6 +94,7 @@ public class SavedRequestInputFilter implements InputFilter { /** * Set the next buffer in the filter pipeline (has no effect). */ + @Override public void setBuffer(InputBuffer buffer) { // NOOP since this filter will be providing the request body } @@ -97,6 +102,7 @@ public class SavedRequestInputFilter implements InputFilter { /** * Amount of bytes still available in a buffer. */ + @Override public int available() { return input.getLength(); } @@ -104,6 +110,7 @@ public class SavedRequestInputFilter implements InputFilter { /** * End the current request (has no effect). */ + @Override public long end() throws IOException { return 0; } diff --git a/java/org/apache/coyote/http11/filters/VoidInputFilter.java b/java/org/apache/coyote/http11/filters/VoidInputFilter.java index e6249cd5d..05571fd2c 100644 --- a/java/org/apache/coyote/http11/filters/VoidInputFilter.java +++ b/java/org/apache/coyote/http11/filters/VoidInputFilter.java @@ -59,6 +59,7 @@ public class VoidInputFilter implements InputFilter { * * @return number of bytes written by the filter */ + @Override public int doRead(ByteChunk chunk, Request req) throws IOException { @@ -73,6 +74,7 @@ public class VoidInputFilter implements InputFilter { /** * Set the associated request. */ + @Override public void setRequest(Request request) { // NOOP: Request isn't used so ignore it } @@ -81,6 +83,7 @@ public class VoidInputFilter implements InputFilter { /** * Set the next buffer in the filter pipeline. */ + @Override public void setBuffer(InputBuffer buffer) { // NOOP: No body to read } @@ -89,6 +92,7 @@ public class VoidInputFilter implements InputFilter { /** * Make the filter ready to process the next request. */ + @Override public void recycle() { // NOOP: Nothing to recycle } @@ -98,6 +102,7 @@ public class VoidInputFilter implements InputFilter { * Return the name of the associated encoding; Here, the value is * "void". */ + @Override public ByteChunk getEncodingName() { return ENCODING; } @@ -112,6 +117,7 @@ public class VoidInputFilter implements InputFilter { * missing bytes, which would indicate an error. * Note: It is recommended that extra bytes be swallowed by the filter. */ + @Override public long end() throws IOException { return 0; @@ -121,6 +127,7 @@ public class VoidInputFilter implements InputFilter { /** * Amount of bytes still available in a buffer. */ + @Override public int available() { return 0; } diff --git a/java/org/apache/coyote/http11/filters/VoidOutputFilter.java b/java/org/apache/coyote/http11/filters/VoidOutputFilter.java index 1febd35eb..f37cdf2dc 100644 --- a/java/org/apache/coyote/http11/filters/VoidOutputFilter.java +++ b/java/org/apache/coyote/http11/filters/VoidOutputFilter.java @@ -65,6 +65,7 @@ public class VoidOutputFilter implements OutputFilter { * * @return number of bytes written by the filter */ + @Override public int doWrite(ByteChunk chunk, Response res) throws IOException { @@ -81,6 +82,7 @@ public class VoidOutputFilter implements OutputFilter { * necessary reading can occur in that method, as this method is called * after the response header processing is complete. */ + @Override public void setResponse(Response response) { // NOOP: No need for parameters from response in this filter } @@ -89,6 +91,7 @@ public class VoidOutputFilter implements OutputFilter { /** * Set the next buffer in the filter pipeline. */ + @Override public void setBuffer(OutputBuffer buffer) { this.buffer = buffer; } @@ -97,6 +100,7 @@ public class VoidOutputFilter implements OutputFilter { /** * Make the filter ready to process the next request. */ + @Override public void recycle() { // NOOP: Nothing to recycle } @@ -106,6 +110,7 @@ public class VoidOutputFilter implements OutputFilter { * Return the name of the associated encoding; Here, the value is * "identity". */ + @Override public ByteChunk getEncodingName() { return ENCODING; } @@ -120,6 +125,7 @@ public class VoidOutputFilter implements OutputFilter { * missing bytes, which would indicate an error. * Note: It is recommended that extra bytes be swallowed by the filter. */ + @Override public long end() throws IOException { return 0;