Add other @Override annotations identified by Eclipse
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 5 Nov 2009 01:28:51 +0000 (01:28 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 5 Nov 2009 01:28:51 +0000 (01:28 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@832961 13f79535-47bb-0310-9956-ffa450edef68

26 files changed:
java/org/apache/tomcat/util/net/NioBlockingSelector.java
webapps/examples/WEB-INF/classes/CookieExample.java
webapps/examples/WEB-INF/classes/HelloWorldExample.java
webapps/examples/WEB-INF/classes/RequestHeaderExample.java
webapps/examples/WEB-INF/classes/RequestInfoExample.java
webapps/examples/WEB-INF/classes/RequestParamExample.java
webapps/examples/WEB-INF/classes/SessionExample.java
webapps/examples/WEB-INF/classes/async/Stockticker.java
webapps/examples/WEB-INF/classes/chat/ChatServlet.java
webapps/examples/WEB-INF/classes/compressionFilters/CompressionFilterTestServlet.java
webapps/examples/WEB-INF/classes/compressionFilters/CompressionResponseStream.java
webapps/examples/WEB-INF/classes/compressionFilters/CompressionServletResponseWrapper.java
webapps/examples/WEB-INF/classes/examples/ExampleTagBase.java
webapps/examples/WEB-INF/classes/examples/FooTag.java
webapps/examples/WEB-INF/classes/examples/FooTagExtraInfo.java
webapps/examples/WEB-INF/classes/examples/LogTag.java
webapps/examples/WEB-INF/classes/examples/ShowSource.java
webapps/examples/WEB-INF/classes/filters/ExampleFilter.java
webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/EchoAttributesTag.java
webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/FindBookSimpleTag.java
webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/HelloWorldSimpleTag.java
webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/RepeatSimpleTag.java
webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/ShuffleSimpleTag.java
webapps/examples/WEB-INF/classes/jsp2/examples/simpletag/TileSimpleTag.java
webapps/examples/WEB-INF/classes/servletToJsp.java
webapps/examples/WEB-INF/classes/validators/DebugValidator.java

index 73d634e..0305f80 100644 (file)
@@ -303,6 +303,7 @@ public class NioBlockingSelector {
             return result;
         }
 
+        @Override
         public void run() {
             while (run) {
                 try {
index c60d1c0..37320a9 100644 (file)
@@ -35,6 +35,7 @@ public class CookieExample extends HttpServlet {
 
     ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
     
+    @Override
     public void doGet(HttpServletRequest request,
                       HttpServletResponse response)
         throws IOException, ServletException
@@ -109,6 +110,7 @@ public class CookieExample extends HttpServlet {
         out.println("</html>");
     }
 
+    @Override
     public void doPost(HttpServletRequest request,
                       HttpServletResponse response)
         throws IOException, ServletException
index c364ccb..74fbb1d 100644 (file)
@@ -32,6 +32,7 @@ import javax.servlet.http.*;
 public class HelloWorldExample extends HttpServlet {
 
 
+    @Override
     public void doGet(HttpServletRequest request,
                       HttpServletResponse response)
         throws IOException, ServletException
index f73f8a5..756e207 100644 (file)
@@ -35,6 +35,7 @@ public class RequestHeaderExample extends HttpServlet {
 
     ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
     
+    @Override
     public void doGet(HttpServletRequest request,
                       HttpServletResponse response)
         throws IOException, ServletException
@@ -79,6 +80,7 @@ public class RequestHeaderExample extends HttpServlet {
         out.println("</table>");
     }
 
+    @Override
     public void doPost(HttpServletRequest request,
                       HttpServletResponse response)
         throws IOException, ServletException
index 4040619..a0fcb84 100644 (file)
@@ -36,6 +36,7 @@ public class RequestInfoExample extends HttpServlet {
 
     ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
 
+    @Override
     public void doGet(HttpServletRequest request,
                       HttpServletResponse response)
         throws IOException, ServletException
@@ -103,6 +104,7 @@ public class RequestInfoExample extends HttpServlet {
        
     }
 
+    @Override
     public void doPost(HttpServletRequest request,
                       HttpServletResponse response)
         throws IOException, ServletException
index e64e2ca..218b4b0 100644 (file)
@@ -36,6 +36,7 @@ public class RequestParamExample extends HttpServlet {
 
     ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
     
+    @Override
     public void doGet(HttpServletRequest request,
                       HttpServletResponse response)
         throws IOException, ServletException
@@ -96,6 +97,7 @@ public class RequestParamExample extends HttpServlet {
         out.println("</html>");
     }
 
+    @Override
     public void doPost(HttpServletRequest request,
                       HttpServletResponse response)
         throws IOException, ServletException
index deeaab5..f988e6d 100644 (file)
@@ -35,6 +35,7 @@ public class SessionExample extends HttpServlet {
 
     ResourceBundle rb = ResourceBundle.getBundle("LocalStrings");
     
+    @Override
     public void doGet(HttpServletRequest request,
                       HttpServletResponse response)
         throws IOException, ServletException
@@ -130,6 +131,7 @@ public class SessionExample extends HttpServlet {
         out.println("</html>");
     }
 
+    @Override
     public void doPost(HttpServletRequest request,
                       HttpServletResponse response)
         throws IOException, ServletException
index d02b3ad..96206c1 100644 (file)
@@ -151,10 +151,12 @@ public class Stockticker implements Runnable {
             return df.format(lastchange);
         }
 
+        @Override
         public int hashCode() {
             return symbol.hashCode();
         }
 
+        @Override
         public boolean equals(Object other) {
             if (other instanceof Stock) {
                 return this.symbol.equals(((Stock) other).symbol);
@@ -163,6 +165,7 @@ public class Stockticker implements Runnable {
             }
         }
 
+        @Override
         public String toString() {
             StringBuilder buf = new StringBuilder("STOCK#");
             buf.append(getSymbol());
@@ -176,6 +179,7 @@ public class Stockticker implements Runnable {
 
         }
 
+        @Override
         public Object clone() {
             Stock s = new Stock(this.getSymbol(), this.getValue());
             s.setLastChange(this.getLastChange());
index 84c2c06..8028f40 100644 (file)
@@ -43,6 +43,7 @@ public class ChatServlet
         new ArrayList<HttpServletResponse>();
     protected MessageSender messageSender = null;
     
+    @Override
     public void init() throws ServletException {
         messageSender = new MessageSender();
         Thread messageSenderThread = 
@@ -51,6 +52,7 @@ public class ChatServlet
         messageSenderThread.start();
     }
 
+    @Override
     public void destroy() {
         connections.clear();
         messageSender.stop();
@@ -162,6 +164,7 @@ public class ChatServlet
         }
     }
 
+    @Override
     protected void service(HttpServletRequest request, HttpServletResponse response)
         throws IOException, ServletException {
         // Compatibility method: equivalent method using the regular connection model
index daf861d..72617be 100644 (file)
@@ -30,6 +30,7 @@ import javax.servlet.http.*;
 
 public class CompressionFilterTestServlet extends HttpServlet {
 
+    @Override
     public void doGet(HttpServletRequest request, HttpServletResponse response)
         throws ServletException, IOException {
 
index 1ec0215..e89c6ca 100644 (file)
@@ -130,6 +130,7 @@ public class CompressionResponseStream
      * Close this output stream, causing any buffered data to be flushed and
      * any further output data to throw an IOException.
      */
+    @Override
     public void close() throws IOException {
 
         if (debug > 1) {
@@ -164,6 +165,7 @@ public class CompressionResponseStream
      * Flush any buffered data for this output stream, which also causes the
      * response to be committed.
      */
+    @Override
     public void flush() throws IOException {
 
         if (debug > 1) {
@@ -201,6 +203,7 @@ public class CompressionResponseStream
      *
      * @exception IOException if an input/output error occurs
      */
+    @Override
     public void write(int b) throws IOException {
 
         if (debug > 1) {
@@ -226,6 +229,7 @@ public class CompressionResponseStream
      *
      * @exception IOException if an input/output error occurs
      */
+    @Override
     public void write(byte b[]) throws IOException {
 
         write(b, 0, b.length);
@@ -243,6 +247,7 @@ public class CompressionResponseStream
      *
      * @exception IOException if an input/output error occurs
      */
+    @Override
     public void write(byte b[], int off, int len) throws IOException {
 
         if (debug > 1) {
index 559d6d9..05c019f 100644 (file)
@@ -100,6 +100,7 @@ public class CompressionServletResponseWrapper extends HttpServletResponseWrappe
     /**
      * Set content type
      */
+    @Override
     public void setContentType(String contentType) {
         if (debug > 1) {
             System.out.println("setContentType to "+contentType);
@@ -173,6 +174,7 @@ public class CompressionServletResponseWrapper extends HttpServletResponseWrappe
      *
      * @exception IOException if an input/output error occurs
      */
+    @Override
     public void flushBuffer() throws IOException {
         if (debug > 1) {
             System.out.println("flush buffer @ CompressionServletResponseWrapper");
@@ -188,6 +190,7 @@ public class CompressionServletResponseWrapper extends HttpServletResponseWrappe
      *  already been called for this response
      * @exception IOException if an input/output error occurs
      */
+    @Override
     public ServletOutputStream getOutputStream() throws IOException {
 
         if (writer != null)
@@ -210,6 +213,7 @@ public class CompressionServletResponseWrapper extends HttpServletResponseWrappe
      *  already been called for this response
      * @exception IOException if an input/output error occurs
      */
+    @Override
     public PrintWriter getWriter() throws IOException {
 
         if (writer != null)
@@ -239,7 +243,7 @@ public class CompressionServletResponseWrapper extends HttpServletResponseWrappe
 
     }
 
-
+    @Override
     public void setContentLength(int length) {
         // Don't, as compression will change it
     }
index 5d4fbc9..23eb192 100644 (file)
@@ -21,40 +21,49 @@ import javax.servlet.jsp.tagext.*;
 
 public abstract class ExampleTagBase extends BodyTagSupport {
 
+    @Override
     public void setParent(Tag parent) {
         this.parent = parent;
     }
 
+    @Override
     public void setBodyContent(BodyContent bodyOut) {
         this.bodyOut = bodyOut;
     }
 
+    @Override
     public void setPageContext(PageContext pageContext) {
         this.pageContext = pageContext;
     }
 
+    @Override
     public Tag getParent() {
         return this.parent;
     }
     
+    @Override
     public int doStartTag() throws JspException {
         return SKIP_BODY;
     }
 
+    @Override
     public int doEndTag() throws JspException {
         return EVAL_PAGE;
     }
     
 
+    @Override
     public void doInitBody() throws JspException {
         // Default implementations for BodyTag methods as well
         // just in case a tag decides to implement BodyTag.
     }
 
+    @Override
     public int doAfterBody() throws JspException {
         return SKIP_BODY;
     }
 
+    @Override
     public void release() {
         bodyOut = null;
         pageContext = null;
index b48d254..8e8dc72 100644 (file)
@@ -53,16 +53,19 @@ public class FooTag
      *
      * @return EVAL_BODY_INCLUDE
      */
+    @Override
     public int doStartTag() throws JspException {
         i = 0;
        return EVAL_BODY_BUFFERED;
     }
 
+    @Override
     public void doInitBody() throws JspException {
         pageContext.setAttribute("member", atts[i]);
         i++;
     }
     
+    @Override
     public int doAfterBody() throws JspException {
         try {
             if (i == 3) {
index 6733efd..9aaa628 100644 (file)
@@ -19,6 +19,7 @@ package examples;
 import javax.servlet.jsp.tagext.*;
 
 public class FooTagExtraInfo extends TagExtraInfo {
+    @Override
     public VariableInfo[] getVariableInfo(TagData data) {
         return new VariableInfo[] 
             {
index 9756679..04ebd09 100644 (file)
@@ -38,10 +38,12 @@ public class LogTag
             toBrowser = false;
     }
 
+    @Override
     public int doStartTag() throws JspException {
         return EVAL_BODY_BUFFERED;
     }
     
+    @Override
     public int doAfterBody() throws JspException {
         try {
             String s = bodyOut.getString();
index 4de7231..a700d11 100644 (file)
@@ -34,6 +34,7 @@ public class ShowSource
         this.jspFile = jspFile;
     }
 
+    @Override
     public int doEndTag() throws JspException {
        if ((jspFile.indexOf( ".." ) >= 0) ||
             (jspFile.toUpperCase().indexOf("/WEB-INF/") != 0) ||
index d61b2d9..01b32ff 100644 (file)
@@ -123,6 +123,7 @@ public final class ExampleFilter implements Filter {
     /**
      * Return a String representation of this object.
      */
+    @Override
     public String toString() {
 
        if (filterConfig == null)
index 232cf60..97d9e0e 100644 (file)
@@ -35,6 +35,7 @@ public class EchoAttributesTag
     private ArrayList<String> keys = new ArrayList<String>();
     private ArrayList<Object> values = new ArrayList<Object>();
 
+    @Override
     public void doTag() throws JspException, IOException {
        JspWriter out = getJspContext().getOut();
        for( int i = 0; i < keys.size(); i++ ) {
index 5386706..9cccdac 100644 (file)
@@ -33,6 +33,7 @@ public class FindBookSimpleTag extends SimpleTagSupport {
     private static final String BOOK_AUTHOR = "J. R. R. Tolkein";
     private static final String BOOK_ISBN = "0618002251";
 
+    @Override
     public void doTag() throws JspException {
         BookBean book = new BookBean( BOOK_TITLE, BOOK_AUTHOR, BOOK_ISBN );
         getJspContext().setAttribute( this.var, book );
index b8e3aa3..38a6cd3 100644 (file)
@@ -26,6 +26,7 @@ import java.io.IOException;
  * SimpleTag handler that prints "Hello, world!"
  */
 public class HelloWorldSimpleTag extends SimpleTagSupport {
+    @Override
     public void doTag() throws JspException, IOException {
        getJspContext().getOut().write( "Hello, world!" );
     }
index db9861c..5d4c5b1 100644 (file)
@@ -29,6 +29,7 @@ import java.io.IOException;
 public class RepeatSimpleTag extends SimpleTagSupport {
     private int num;
 
+    @Override
     public void doTag() throws JspException, IOException {
         for (int i=0; i<num; i++) {
             getJspContext().setAttribute("count", String.valueOf( i + 1 ) );
index 11124fa..896b3f8 100644 (file)
@@ -32,6 +32,7 @@ public class ShuffleSimpleTag extends SimpleTagSupport {
     private JspFragment fragment2;
     private JspFragment fragment3;
 
+    @Override
     public void doTag() throws JspException, IOException {
         switch( (int)(Math.random() * 6) ) {
             case 0:
index 0c2cee5..3737611 100644 (file)
@@ -29,6 +29,7 @@ public class TileSimpleTag extends SimpleTagSupport {
     private String color;
     private String label;
 
+    @Override
     public void doTag() throws JspException, IOException {
        getJspContext().getOut().write( 
            "<td width=\"32\" height=\"32\" bgcolor=\"" + this.color + 
index fc535bd..c67d599 100644 (file)
@@ -18,6 +18,7 @@ import javax.servlet.http.*;
 
 public class servletToJsp extends HttpServlet {
 
+    @Override
     public void doGet (HttpServletRequest request,
                       HttpServletResponse response) {
 
index 8357c68..2e45821 100644 (file)
@@ -57,6 +57,7 @@ public class DebugValidator extends TagLibraryValidator {
      * @param uri The value of the URI argument in this directive
      * @param page The page data for this page
      */
+    @Override
     public ValidationMessage[] validate(String prefix, String uri,
                                         PageData page) {