Fix Eclipse warnings
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 27 Feb 2011 23:08:45 +0000 (23:08 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 27 Feb 2011 23:08:45 +0000 (23:08 +0000)
Remove unused code

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1075176 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/connector/CometEventImpl.java
java/org/apache/catalina/connector/Connector.java
java/org/apache/catalina/connector/Constants.java
java/org/apache/catalina/connector/CoyoteInputStream.java
java/org/apache/catalina/connector/CoyotePrincipal.java
java/org/apache/catalina/connector/InputBuffer.java
java/org/apache/catalina/connector/OutputBuffer.java

index 49d43ee..f5e4fdc 100644 (file)
@@ -88,6 +88,7 @@ public class CometEventImpl implements CometEvent {
         this.eventSubType = eventSubType;
     }
     
+    @Override
     public void close() throws IOException {
         if (request == null) {
             throw new IllegalStateException(sm.getString("cometEvent.nullRequest"));
@@ -98,22 +99,27 @@ public class CometEventImpl implements CometEvent {
         if (iscomet) request.cometClose();
     }
 
+    @Override
     public EventSubType getEventSubType() {
         return eventSubType;
     }
 
+    @Override
     public EventType getEventType() {
         return eventType;
     }
 
+    @Override
     public HttpServletRequest getHttpServletRequest() {
         return request.getRequest();
     }
 
+    @Override
     public HttpServletResponse getHttpServletResponse() {
         return response.getResponse();
     }
 
+    @Override
     public void setTimeout(int timeout) throws IOException, ServletException,
             UnsupportedOperationException {
         if (request.getAttribute("org.apache.tomcat.comet.timeout.support") == Boolean.TRUE) {
index 98fbc1c..e4e5c4e 100644 (file)
@@ -1005,8 +1005,6 @@ public class Connector extends LifecycleMBeanBase  {
 
     // -------------------- JMX registration  --------------------
 
-    private ObjectName onameProtocolHandler;
-    
     @Override
     protected String getDomainInternal() {
         return MBeanUtils.getDomain(getService());
index eebdfc1..34fd656 100644 (file)
@@ -23,11 +23,4 @@ public final class Constants {
 
     public static final String Package = "org.apache.catalina.connector";
 
-    public static final int DEFAULT_CONNECTION_LINGER = -1;
-    public static final int DEFAULT_CONNECTION_TIMEOUT = 60000;
-    public static final int DEFAULT_CONNECTION_UPLOAD_TIMEOUT = 300000;
-    public static final int DEFAULT_SERVER_SOCKET_TIMEOUT = 0;
-
-    public static final int PROCESSOR_IDLE = 0;
-    public static final int PROCESSOR_ACTIVE = 1;
 }
index 4b76f7d..9d26cb9 100644 (file)
@@ -88,6 +88,7 @@ public class CoyoteInputStream
                     AccessController.doPrivileged(
                         new PrivilegedExceptionAction<Integer>(){
 
+                            @Override
                             public Integer run() throws IOException{
                                 Integer integer = Integer.valueOf(ib.readByte());
                                 return integer;
@@ -117,6 +118,7 @@ public class CoyoteInputStream
                     AccessController.doPrivileged(
                         new PrivilegedExceptionAction<Integer>(){
 
+                            @Override
                             public Integer run() throws IOException{
                                 Integer integer = Integer.valueOf(ib.available());
                                 return integer;
@@ -146,6 +148,7 @@ public class CoyoteInputStream
                     AccessController.doPrivileged(
                         new PrivilegedExceptionAction<Integer>(){
 
+                            @Override
                             public Integer run() throws IOException{
                                 Integer integer = 
                                     Integer.valueOf(ib.read(b, 0, b.length));
@@ -178,6 +181,7 @@ public class CoyoteInputStream
                     AccessController.doPrivileged(
                         new PrivilegedExceptionAction<Integer>(){
 
+                            @Override
                             public Integer run() throws IOException{
                                 Integer integer = 
                                     Integer.valueOf(ib.read(b, off, len));
@@ -219,6 +223,7 @@ public class CoyoteInputStream
                 AccessController.doPrivileged(
                     new PrivilegedExceptionAction<Void>(){
 
+                        @Override
                         public Void run() throws IOException{
                             ib.close();
                             return null;
index 66fcb14..54373da 100644 (file)
@@ -51,6 +51,7 @@ public class CoyotePrincipal implements Principal, Serializable {
      */
     protected String name = null;
 
+    @Override
     public String getName() {
         return (this.name);
     }
index 6e18a14..4d03bb2 100644 (file)
@@ -272,6 +272,7 @@ public class InputBuffer extends Reader
      * 
      * @throws IOException An underlying IOException occurred
      */
+    @Override
     public int realReadBytes(byte cbuf[], int off, int len)
             throws IOException {
 
@@ -319,6 +320,7 @@ public class InputBuffer extends Reader
      * been read before, they are ignored. If a mark was set, then the
      * mark is lost.
      */
+    @Override
     public void realWriteChars(char c[], int off, int len) 
         throws IOException {
         markPos = -1;
@@ -332,6 +334,7 @@ public class InputBuffer extends Reader
     }
 
 
+    @Override
     public int realReadChars(char cbuf[], int off, int len)
         throws IOException {
 
@@ -518,6 +521,7 @@ public class InputBuffer extends Reader
                     conv = AccessController.doPrivileged(
                             new PrivilegedExceptionAction<B2CConverter>(){
 
+                                @Override
                                 public B2CConverter run() throws IOException {
                                     return new B2CConverter(enc);
                                 }
index 7ab8d26..d58bfd5 100644 (file)
@@ -546,16 +546,6 @@ public class OutputBuffer extends Writer
     // --------------------  BufferedOutputStream compatibility
 
 
-    /**
-     * Real write - this buffer will be sent to the client
-     */
-    public void flushBytes()
-        throws IOException {
-
-        bb.flushBuffer();
-
-    }
-
     public long getContentWritten() {
         return bytesWritten + charsWritten;
     }