tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1370385 - in /tomcat/trunk/java/org/apache/catalina/tribes/transport/bio: BioSender.java MultipointBioSender.java
Date Tue, 07 Aug 2012 17:42:22 GMT
Author: markt
Date: Tue Aug  7 17:42:22 2012
New Revision: 1370385

URL: http://svn.apache.org/viewvc?rev=1370385&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/bio/BioSender.java
    tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/MultipointBioSender.java

Modified: tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/BioSender.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/BioSender.java?rev=1370385&r1=1370384&r2=1370385&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/BioSender.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/BioSender.java Tue Aug  7 17:42:22
2012
@@ -58,7 +58,8 @@ public class BioSender extends AbstractS
     private OutputStream soOut = null;
     private InputStream soIn = null;
 
-    protected XByteBuffer ackbuf = new XByteBuffer(Constants.ACK_COMMAND.length,true);
+    protected final XByteBuffer ackbuf =
+            new XByteBuffer(Constants.ACK_COMMAND.length, true);
 
 
     // ------------------------------------------------------------- Constructor

Modified: tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/MultipointBioSender.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/MultipointBioSender.java?rev=1370385&r1=1370384&r2=1370385&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/MultipointBioSender.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/MultipointBioSender.java Tue
Aug  7 17:42:22 2012
@@ -41,9 +41,8 @@ public class MultipointBioSender extends
         // NO-OP
     }
 
-    protected long selectTimeout = 1000;
-    protected HashMap<Member, BioSender> bioSenders =
-        new HashMap<Member, BioSender>();
+    protected final long selectTimeout = 1000;
+    protected final HashMap<Member, BioSender> bioSenders = new HashMap<>();
 
     @Override
     public synchronized void sendMessage(Member[] destination, ChannelMessage msg) throws
ChannelException {
@@ -140,9 +139,7 @@ public class MultipointBioSender extends
 
     @Override
     public boolean keepalive() {
-        //throw new UnsupportedOperationException("Method ParallelBioSender.checkKeepAlive()
not implemented");
         boolean result = false;
-        @SuppressWarnings("unchecked") // bioSenders is of type HashMap<Member, BioSender>
         Map.Entry<Member,BioSender>[] entries = bioSenders.entrySet().toArray(new Map.Entry[bioSenders.size()]);
         for ( int i=0; i<entries.length; i++ ) {
             BioSender sender = entries[i].getValue();



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


Mime
View raw message