You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2012/07/14 00:20:19 UTC

svn commit: r1361421 - in /tomcat/trunk/java/org/apache/catalina/ha/tcp: ReplicationValve.java SendMessageData.java SimpleTcpCluster.java

Author: markt
Date: Fri Jul 13 22:20:19 2012
New Revision: 1361421

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

Modified:
    tomcat/trunk/java/org/apache/catalina/ha/tcp/ReplicationValve.java
    tomcat/trunk/java/org/apache/catalina/ha/tcp/SendMessageData.java
    tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java

Modified: tomcat/trunk/java/org/apache/catalina/ha/tcp/ReplicationValve.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/tcp/ReplicationValve.java?rev=1361421&r1=1361420&r2=1361421&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/tcp/ReplicationValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/tcp/ReplicationValve.java Fri Jul 13 22:20:19 2012
@@ -85,8 +85,8 @@ public class ReplicationValve
     /**
      * crossContext session container
      */
-    protected ThreadLocal<ArrayList<DeltaSession>> crossContextSessions =
-        new ThreadLocal<ArrayList<DeltaSession>>() ;
+    protected final ThreadLocal<ArrayList<DeltaSession>> crossContextSessions =
+        new ThreadLocal<>() ;
 
     /**
      * doProcessingStats (default = off)

Modified: tomcat/trunk/java/org/apache/catalina/ha/tcp/SendMessageData.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/tcp/SendMessageData.java?rev=1361421&r1=1361420&r2=1361421&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/tcp/SendMessageData.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/tcp/SendMessageData.java Fri Jul 13 22:20:19 2012
@@ -50,33 +50,15 @@ public class SendMessageData {
         return destination;
     }
     /**
-     * @param destination The destination to set.
-     */
-    public void setDestination(Member destination) {
-        this.destination = destination;
-    }
-    /**
      * @return Returns the exception.
      */
     public Exception getException() {
         return exception;
     }
     /**
-     * @param exception The exception to set.
-     */
-    public void setException(Exception exception) {
-        this.exception = exception;
-    }
-    /**
      * @return Returns the message.
      */
     public Object getMessage() {
         return message;
     }
-    /**
-     * @param message The message to set.
-     */
-    public void setMessage(Object message) {
-        this.message = message;
-    }
 }

Modified: tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java?rev=1361421&r1=1361420&r2=1361421&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java Fri Jul 13 22:20:19 2012
@@ -108,11 +108,6 @@ public class SimpleTcpCluster extends Li
 
 
     /**
-     * Name for logging purpose
-     */
-    protected String clusterImpName = "SimpleTcpCluster";
-
-    /**
      * The string manager for this package.
      */
     protected static final StringManager sm = StringManager.getManager(Constants.Package);
@@ -136,24 +131,23 @@ public class SimpleTcpCluster extends Li
     /**
      * The property change support for this component.
      */
-    protected PropertyChangeSupport support = new PropertyChangeSupport(this);
+    protected final PropertyChangeSupport support = new PropertyChangeSupport(this);
 
     /**
      * The context name <->manager association for distributed contexts.
      */
-    protected Map<String, ClusterManager> managers =
-        new HashMap<String, ClusterManager>();
+    protected final Map<String, ClusterManager> managers = new HashMap<>();
 
     protected ClusterManager managerTemplate = new DeltaManager();
 
-    private List<Valve> valves = new ArrayList<Valve>();
+    private final List<Valve> valves = new ArrayList<>();
 
     private org.apache.catalina.ha.ClusterDeployer clusterDeployer;
 
     /**
      * Listeners of messages
      */
-    protected List<ClusterListener> clusterListeners = new ArrayList<ClusterListener>();
+    protected final List<ClusterListener> clusterListeners = new ArrayList<>();
 
     /**
      * Comment for <code>notifyLifecycleListenerOnFailure</code>
@@ -163,7 +157,7 @@ public class SimpleTcpCluster extends Li
     /**
      * dynamic sender <code>properties</code>
      */
-    private Map<String, Object> properties = new HashMap<String, Object>();
+    private final Map<String, Object> properties = new HashMap<>();
 
     private int channelSendOptions = Channel.SEND_OPTIONS_ASYNCHRONOUS;
 



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