tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keiichi Fujino <kfuj...@apache.org>
Subject Re: svn commit: r1447145 - /tomcat/trunk/java/org/apache/catalina/storeconfig/CatalinaClusterSF.java
Date Tue, 19 Feb 2013 01:15:40 GMT
2013/2/18 Konstantin Kolinko <knst.kolinko@gmail.com>:
> 2013/2/18  <kfujino@apache.org>:
>> Author: kfujino
>> Date: Mon Feb 18 08:15:02 2013
>> New Revision: 1447145
>>
>> URL: http://svn.apache.org/r1447145
>> Log:
>> Avoid duplicated store of ClusterDeployer.
>> FarmWarDeployer extends ClusterListener and implements ClusterDeployer.
>>
>> Modified:
>>     tomcat/trunk/java/org/apache/catalina/storeconfig/CatalinaClusterSF.java
>>
>> Modified: tomcat/trunk/java/org/apache/catalina/storeconfig/CatalinaClusterSF.java
>> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/storeconfig/CatalinaClusterSF.java?rev=1447145&r1=1447144&r2=1447145&view=diff
>> ==============================================================================
>> --- tomcat/trunk/java/org/apache/catalina/storeconfig/CatalinaClusterSF.java (original)
>> +++ tomcat/trunk/java/org/apache/catalina/storeconfig/CatalinaClusterSF.java Mon
Feb 18 08:15:02 2013
>> @@ -18,6 +18,8 @@
>>  package org.apache.catalina.storeconfig;
>>
>>  import java.io.PrintWriter;
>> +import java.util.ArrayList;
>> +import java.util.List;
>>
>>  import org.apache.catalina.LifecycleListener;
>>  import org.apache.catalina.Valve;
>> @@ -25,6 +27,7 @@ import org.apache.catalina.ha.CatalinaCl
>>  import org.apache.catalina.ha.ClusterDeployer;
>>  import org.apache.catalina.ha.ClusterListener;
>>  import org.apache.catalina.ha.ClusterManager;
>> +import org.apache.catalina.ha.deploy.FarmWarDeployer;
>>  import org.apache.catalina.ha.tcp.SimpleTcpCluster;
>>  import org.apache.catalina.tribes.Channel;
>>
>> @@ -81,7 +84,13 @@ public class CatalinaClusterSF extends S
>>                  storeElementArray(aWriter, indent, listeners);
>>                  // Store nested <ClusterListener> elements
>>                  ClusterListener mlisteners[] = ((SimpleTcpCluster)cluster).findClusterListeners();
>> -                storeElementArray(aWriter, indent, mlisteners);
>> +                List<ClusterListener> clusterListeners = new ArrayList<>();
>> +                for (ClusterListener clusterListener : mlisteners) {
>> +                    if (!(clusterListener instanceof FarmWarDeployer)) {
>
> Maybe be more generic, like
> "if (clusterListener != deployer)" ?
>

Done.
Thanks of the comment.



-- 
Keiichi.Fujino

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


Mime
View raw message