Author: kfujino Date: Thu Jan 30 08:50:55 2014 New Revision: 1562726 URL: http://svn.apache.org/r1562726 Log: Simplify the code of o.a.c.ha.tcp.SimpleTcpCluster.createManager(String). Remove unnecessary class cast.
Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java?rev=1562726&r1=1562725&r2=1562726&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java Thu Jan 30 08:50:55 2014 @@ -533,15 +533,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/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1562726&r1=1562725&r2=1562726&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Jan 30 08:50:55 2014 @@ -191,6 +191,15 @@ </fix> </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> <subsection name="WebSocket"> <changelog> Do not return an empty string for the <code>Sec-WebSocket-Protocol</code> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org