tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1370396 - in /tomcat/trunk/java/org/apache/catalina/tribes/transport/nio: NioReceiver.java NioReplicationTask.java NioSender.java ParallelNioSender.java
Date Tue, 07 Aug 2012 17:50:46 GMT
Author: markt
Date: Tue Aug  7 17:50:46 2012
New Revision: 1370396

URL: http://svn.apache.org/viewvc?rev=1370396&view=rev
Log:
Partial code clean-up for o.a.catalina.tribes
 - Add final prompted by UCDetector
 - Java 7 use of <>

Modified:
    tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
    tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReplicationTask.java
    tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioSender.java
    tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java

Modified: tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java?rev=1370396&r1=1370395&r2=1370396&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java Tue Aug  7
17:50:46 2012
@@ -51,13 +51,14 @@ public class NioReceiver extends Receive
     /**
      * The string manager for this package.
      */
-    protected static final StringManager sm = StringManager.getManager(Constants.Package);
+    protected static final StringManager sm =
+            StringManager.getManager(Constants.Package);
 
     private Selector selector = null;
     private ServerSocketChannel serverChannel = null;
     private DatagramChannel datagramChannel = null;
 
-    protected LinkedList<Runnable> events = new LinkedList<Runnable>();
+    protected final LinkedList<Runnable> events = new LinkedList<>();
 
     public NioReceiver() {
     }

Modified: tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReplicationTask.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReplicationTask.java?rev=1370396&r1=1370395&r2=1370396&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReplicationTask.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReplicationTask.java Tue
Aug  7 17:50:46 2012
@@ -59,9 +59,9 @@ public class NioReplicationTask extends 
     private ByteBuffer buffer = null;
     private SelectionKey key;
     private int rxBufSize;
-    private NioReceiver receiver;
-    public NioReplicationTask (ListenCallback callback, NioReceiver receiver)
-    {
+    private final NioReceiver receiver;
+
+    public NioReplicationTask (ListenCallback callback, NioReceiver receiver) {
         super(callback);
         this.receiver = receiver;
     }

Modified: tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioSender.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioSender.java?rev=1370396&r1=1370395&r2=1370396&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioSender.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioSender.java Tue Aug  7 17:50:46
2012
@@ -63,7 +63,7 @@ public class NioSender extends AbstractS
     protected ByteBuffer readbuf = null;
     protected ByteBuffer writebuf = null;
     protected byte[] current = null;
-    protected XByteBuffer ackbuf = new XByteBuffer(128,true);
+    protected final XByteBuffer ackbuf = new XByteBuffer(128,true);
     protected int remaining = 0;
     protected boolean complete;
 

Modified: tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java?rev=1370396&r1=1370395&r2=1370396&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java Tue
Aug  7 17:50:46 2012
@@ -53,10 +53,9 @@ import org.apache.juli.logging.LogFactor
 public class ParallelNioSender extends AbstractSender implements MultiPointSender {
 
     private static final Log log = LogFactory.getLog(ParallelNioSender.class);
-    protected long selectTimeout = 5000; //default 5 seconds, same as send timeout
-    protected Selector selector;
-    protected HashMap<Member, NioSender> nioSenders =
-        new HashMap<Member, NioSender>();
+    protected final long selectTimeout = 5000; //default 5 seconds, same as send timeout
+    protected final Selector selector;
+    protected final HashMap<Member, NioSender> nioSenders = new HashMap<>();
 
     public ParallelNioSender() throws IOException {
         synchronized (Selector.class) {



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


Mime
View raw message