You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kf...@apache.org on 2013/05/15 07:27:26 UTC

svn commit: r1482683 - /tomcat/trunk/java/org/apache/catalina/ha/tcp/ReplicationValve.java

Author: kfujino
Date: Wed May 15 05:27:26 2013
New Revision: 1482683

URL: http://svn.apache.org/r1482683
Log:
Reduce nest.

Modified:
    tomcat/trunk/java/org/apache/catalina/ha/tcp/ReplicationValve.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=1482683&r1=1482682&r2=1482683&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/tcp/ReplicationValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/tcp/ReplicationValve.java Wed May 15 05:27:26 2013
@@ -319,21 +319,19 @@ public class ReplicationValve
                 crossContextSessions.set(new ArrayList<DeltaSession>());
             }
             getNext().invoke(request, response);
-            if(context != null && cluster != null) {
-                Manager manager = context.getManager();
-                if (manager != null && manager instanceof ClusterManager) {
-                    ClusterManager clusterManager = (ClusterManager) manager;
-
-                    // valve cluster can access manager - other cluster handle replication
-                    // at host level - hopefully!
-                    if(cluster.getManager(clusterManager.getName()) == null) {
-                        return ;
-                    }
-                    if(cluster.hasMembers()) {
-                        sendReplicationMessage(request, totalstart, isCrossContext, clusterManager, cluster);
-                    } else {
-                        resetReplicationRequest(request,isCrossContext);
-                    }
+            if(context != null && cluster != null
+                    && context.getManager() instanceof ClusterManager) {
+                ClusterManager clusterManager = (ClusterManager) context.getManager();
+
+                // valve cluster can access manager - other cluster handle replication
+                // at host level - hopefully!
+                if(cluster.getManager(clusterManager.getName()) == null) {
+                    return ;
+                }
+                if(cluster.hasMembers()) {
+                    sendReplicationMessage(request, totalstart, isCrossContext, clusterManager, cluster);
+                } else {
+                    resetReplicationRequest(request,isCrossContext);
                 }
             }
         } finally {



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