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 2014/01/30 09:49:33 UTC

svn commit: r1562724 - in /tomcat/trunk: java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java webapps/docs/changelog.xml

Author: kfujino
Date: Thu Jan 30 08:49:32 2014
New Revision: 1562724

URL: http://svn.apache.org/r1562724
Log:
Simplify the code of o.a.c.ha.tcp.SimpleTcpCluster.createManager(String).
Remove unnecessary class cast.

Modified:
    tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
    tomcat/trunk/webapps/docs/changelog.xml

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=1562724&r1=1562723&r2=1562724&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java Thu Jan 30 08:49:32 2014
@@ -405,15 +405,15 @@ public class SimpleTcpCluster extends Li
             log.debug("Creating ClusterManager for context " + name +
                     " using class " + getManagerTemplate().getClass().getName());
         }
-        Manager manager = null;
+        ClusterManager manager = null;
         try {
             manager = managerTemplate.cloneFromTemplate();
-            ((ClusterManager)manager).setName(name);
+            manager.setName(name);
         } catch (Exception x) {
             log.error("Unable to clone cluster manager, defaulting to org.apache.catalina.ha.session.DeltaManager", x);
             manager = new org.apache.catalina.ha.session.DeltaManager();
         } finally {
-            if ( manager != null && (manager instanceof ClusterManager)) ((ClusterManager)manager).setCluster(this);
+            if ( manager != null) manager.setCluster(this);
         }
         return manager;
     }

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1562724&r1=1562723&r2=1562724&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Jan 30 08:49:32 2014
@@ -52,6 +52,15 @@
       <code>IllegalArgumentException</code>. (markt)
     </changelog>
   </subsection>
+  <subsection name="Cluster">
+    <changelog>
+      <scode>
+        Simplify the code of
+        <code>o.a.c.ha.tcp.SimpleTcpCluster.createManager(String)</code>.
+        Remove unnecessary class cast. (kfujino)
+      </scode>
+    </changelog>
+  </subsection>
 </section>
 <section name="Tomcat 8.0.1 (markt)">
   <subsection name="Catalina">



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