You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2004/07/13 11:43:59 UTC

cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http BaseRequest.java

remm        2004/07/13 02:43:59

  Modified:    modules/cluster/src/share/org/apache/catalina/cluster/tcp
                        TcpReplicationThread.java ThreadPool.java
                        Jdk13ReplicationListener.java
                        PooledSocketSender.java ReplicationListener.java
                        SimpleTcpCluster.java
               catalina/src/share/org/apache/catalina/core
                        StandardWrapperValve.java
               catalina/src/share/org/apache/catalina/realm
                        UserDatabaseRealm.java
               util/java/org/apache/tomcat/util/net PoolTcpEndpoint.java
               util/java/org/apache/tomcat/util/net/jsse JSSE14Support.java
               util/java/org/apache/tomcat/util/http BaseRequest.java
  Log:
  - Fix a number of warnings.
  
  Revision  Changes    Path
  1.12      +1 -4      jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/TcpReplicationThread.java
  
  Index: TcpReplicationThread.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/TcpReplicationThread.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- TcpReplicationThread.java	15 Apr 2004 14:12:37 -0000	1.11
  +++ TcpReplicationThread.java	13 Jul 2004 09:43:58 -0000	1.12
  @@ -17,13 +17,10 @@
   package org.apache.catalina.cluster.tcp;
   import java.nio.ByteBuffer;
   import java.nio.channels.SelectionKey;
  -import java.nio.channels.Selector;
  -import java.util.List;
   import java.io.IOException;
   import java.nio.channels.SocketChannel;
   import org.apache.catalina.cluster.io.ObjectReader;
   
  -import java.util.LinkedList;
   /**
        * A worker thread class which can drain channels and echo-back
        * the input.  Each instance is constructed with a reference to
  @@ -58,7 +55,7 @@
               } catch (InterruptedException e) {
                   log.info("TCP worker thread interrupted in cluster",e);
                   // clear interrupt status
  -                this.interrupted();
  +                Thread.interrupted();
               }
               if (key == null) {
                   continue;	// just in case
  
  
  
  1.8       +1 -1      jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ThreadPool.java
  
  Index: ThreadPool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ThreadPool.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ThreadPool.java	7 Apr 2004 19:02:31 -0000	1.7
  +++ ThreadPool.java	13 Jul 2004 09:43:58 -0000	1.8
  @@ -17,7 +17,7 @@
   package org.apache.catalina.cluster.tcp;
   import java.util.List;
   import java.util.LinkedList;
  -import java.io.IOException;
  +
   /**
    * <p>Title: </p>
    * <p>Description: </p>
  
  
  
  1.4       +1 -3      jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/Jdk13ReplicationListener.java
  
  Index: Jdk13ReplicationListener.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/Jdk13ReplicationListener.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Jdk13ReplicationListener.java	27 Feb 2004 14:58:56 -0000	1.3
  +++ Jdk13ReplicationListener.java	13 Jul 2004 09:43:58 -0000	1.4
  @@ -22,11 +22,9 @@
   import java.net.Socket;
   import java.net.ServerSocket;
   import java.net.InetSocketAddress;
  -import java.nio.ByteBuffer;
  -import java.util.Iterator;
   import org.apache.catalina.cluster.io.ListenCallback;
   import org.apache.catalina.cluster.io.Jdk13ObjectReader;
  -import org.apache.catalina.cluster.io.XByteBuffer;
  +
   /**
    */
   public class Jdk13ReplicationListener implements Runnable
  
  
  
  1.7       +1 -3      jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/PooledSocketSender.java
  
  Index: PooledSocketSender.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/PooledSocketSender.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PooledSocketSender.java	27 Feb 2004 14:58:56 -0000	1.6
  +++ PooledSocketSender.java	13 Jul 2004 09:43:58 -0000	1.7
  @@ -18,8 +18,6 @@
   import java.net.InetAddress ;
   import java.net.Socket;
   import java.util.LinkedList;
  -import java.util.List;
  -import java.util.Collections;
   
   /**
    * <p>Title: </p>
  @@ -176,7 +174,7 @@
                           try {
                               mutex.wait(timeout);
                           }catch ( Exception x ) {
  -                            parent.log.warn("PoolSocketSender.senderQueue.getSender failed",x);
  +                            PooledSocketSender.log.warn("PoolSocketSender.senderQueue.getSender failed",x);
                           }//catch
                       }//end if
                       if ( sender != null ) {
  
  
  
  1.16      +1 -4      jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationListener.java
  
  Index: ReplicationListener.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ReplicationListener.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ReplicationListener.java	8 Apr 2004 14:58:11 -0000	1.15
  +++ ReplicationListener.java	13 Jul 2004 09:43:58 -0000	1.16
  @@ -17,20 +17,17 @@
   package org.apache.catalina.cluster.tcp;
   
   
  -import java.nio.ByteBuffer;
   import java.nio.channels.ServerSocketChannel;
   import java.nio.channels.SocketChannel;
   import java.nio.channels.Selector;
   import java.nio.channels.SelectionKey;
   import java.nio.channels.SelectableChannel;
   
  -import java.net.Socket;
   import java.net.ServerSocket;
   import java.net.InetSocketAddress;
   import java.util.Iterator;
   import org.apache.catalina.cluster.io.ListenCallback;
   import org.apache.catalina.cluster.io.ObjectReader;
  -import org.apache.catalina.cluster.io.XByteBuffer;
   import org.apache.catalina.cluster.CatalinaCluster;
   import org.apache.catalina.cluster.ClusterReceiver;
   /**
  @@ -145,7 +142,7 @@
                       if (key.isReadable()) {
                           readDataFromSocket(key);
                       } else {
  -                        key.interestOps(key.interestOps() & (~key.OP_WRITE));
  +                        key.interestOps(key.interestOps() & (~SelectionKey.OP_WRITE));
                       }
   
                       // remove key from selected set, it's been handled
  
  
  
  1.44      +2 -27     jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java
  
  Index: SimpleTcpCluster.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- SimpleTcpCluster.java	27 Jun 2004 23:56:22 -0000	1.43
  +++ SimpleTcpCluster.java	13 Jul 2004 09:43:59 -0000	1.44
  @@ -134,12 +134,6 @@
   
   
       /**
  -     * The debug level for this Container
  -     */
  -    protected int debug = 0;
  -
  -
  -    /**
        * The context name <-> manager association for distributed contexts.
        */
       protected HashMap managers = new HashMap();
  @@ -183,28 +177,9 @@
        * <code>&lt;description&gt;/&lt;version&gt;</code>.
        */
       public String getInfo() {
  -        return(this.info);
  +        return(info);
       }
   
  -
  -    /**
  -     * Set the debug level for this component
  -     *
  -     * @param debug The debug level
  -     */
  -    public void setDebug(int debug) {
  -        this.debug = debug;
  -    }
  -
  -
  -    /**
  -     * Get the debug level for this component
  -     *
  -     * @return The debug level
  -     */
  -    public int getDebug() {
  -        return(this.debug);
  -    }
   
       /**
        * Set the name of the cluster to join, if no cluster with
  
  
  
  1.32      +1 -2      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardWrapperValve.java
  
  Index: StandardWrapperValve.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardWrapperValve.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- StandardWrapperValve.java	7 Jul 2004 16:32:59 -0000	1.31
  +++ StandardWrapperValve.java	13 Jul 2004 09:43:59 -0000	1.32
  @@ -24,7 +24,6 @@
   import javax.management.ObjectName;
   import javax.servlet.Servlet;
   import javax.servlet.ServletException;
  -import javax.servlet.ServletRequest;
   import javax.servlet.UnavailableException;
   import javax.servlet.http.HttpServletResponse;
   
  
  
  
  1.8       +1 -2      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/UserDatabaseRealm.java
  
  Index: UserDatabaseRealm.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/UserDatabaseRealm.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- UserDatabaseRealm.java	3 Jul 2004 04:16:41 -0000	1.7
  +++ UserDatabaseRealm.java	13 Jul 2004 09:43:59 -0000	1.8
  @@ -19,7 +19,6 @@
   
   
   import java.security.Principal;
  -import java.util.ArrayList;
   import java.util.Iterator;
   
   import javax.naming.Context;
  
  
  
  1.38      +2 -3      jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java
  
  Index: PoolTcpEndpoint.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- PoolTcpEndpoint.java	27 May 2004 16:12:46 -0000	1.37
  +++ PoolTcpEndpoint.java	13 Jul 2004 09:43:59 -0000	1.38
  @@ -444,10 +444,9 @@
                               msg = sm.getString("endpoint.err.fatal",
                                                  serverSocket, t);
                               log.error(msg, t);
  -                        } finally {
  -                            // Current thread is now invalid: kill it
  -                            throw new ThreadDeath();
                           }
  +                        // Current thread is now invalid: kill it
  +                        throw new ThreadDeath();
                       }
                   }
               }
  
  
  
  1.9       +0 -1      jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse/JSSE14Support.java
  
  Index: JSSE14Support.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/jsse/JSSE14Support.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- JSSE14Support.java	19 Mar 2004 06:26:41 -0000	1.8
  +++ JSSE14Support.java	13 Jul 2004 09:43:59 -0000	1.9
  @@ -27,7 +27,6 @@
   import javax.net.ssl.HandshakeCompletedEvent;
   import javax.net.ssl.HandshakeCompletedListener;
   import javax.net.ssl.SSLException;
  -import javax.net.ssl.SSLPeerUnverifiedException;
   import javax.net.ssl.SSLSession;
   import javax.net.ssl.SSLSocket;
   
  
  
  
  1.7       +13 -13    jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/BaseRequest.java
  
  Index: BaseRequest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/BaseRequest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- BaseRequest.java	24 Feb 2004 08:50:04 -0000	1.6
  +++ BaseRequest.java	13 Jul 2004 09:43:59 -0000	1.7
  @@ -41,26 +41,26 @@
       public static final String SCHEME_HTTPS = "https";
   
       // request attributes
  -    MessageBytes method = new MessageBytes();
  -    MessageBytes protocol = new MessageBytes();
  -    MessageBytes requestURI = new MessageBytes();
  -    MessageBytes remoteAddr = new MessageBytes();
  -    MessageBytes remoteHost = new MessageBytes();
  -    MessageBytes serverName = new MessageBytes();
  +    MessageBytes method = MessageBytes.newInstance();
  +    MessageBytes protocol = MessageBytes.newInstance();
  +    MessageBytes requestURI = MessageBytes.newInstance();
  +    MessageBytes remoteAddr = MessageBytes.newInstance();
  +    MessageBytes remoteHost = MessageBytes.newInstance();
  +    MessageBytes serverName = MessageBytes.newInstance();
       int serverPort = 80;
  -    MessageBytes remoteUser = new MessageBytes();
  -    MessageBytes authType = new MessageBytes();
  -    MessageBytes queryString = new MessageBytes();
  -    MessageBytes authorization = new MessageBytes();
  +    MessageBytes remoteUser = MessageBytes.newInstance();
  +    MessageBytes authType = MessageBytes.newInstance();
  +    MessageBytes queryString = MessageBytes.newInstance();
  +    MessageBytes authorization = MessageBytes.newInstance();
       String scheme = SCHEME_HTTP;
       boolean secure = false;
       int contentLength = 0;
  -    MessageBytes contentType = new MessageBytes();
  +    MessageBytes contentType = MessageBytes.newInstance();
       MimeHeaders headers = new MimeHeaders();
       Cookies cookies = new Cookies();
       HashMap attributes = new HashMap();
   
  -    MessageBytes tomcatInstanceId = new MessageBytes();
  +    MessageBytes tomcatInstanceId = MessageBytes.newInstance();
       
       /**
        * Recycles this object and readies it further use.
  
  
  

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