tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1175155 - /tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java
Date Sat, 24 Sep 2011 11:02:41 GMT
Author: rjung
Date: Sat Sep 24 11:02:41 2011
New Revision: 1175155

URL: http://svn.apache.org/viewvc?rev=1175155&view=rev
Log:
Use setters when cloning attributes.
Should be more safe in most cases.

Example: setting name directly was wrong,
because name in base class was something else
then in the sub classes.

Not using the setter for maxActiveSessions,
because it will also call property change
listeners.

Modified:
    tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java

Modified: tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java?rev=1175155&r1=1175154&r2=1175155&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/ClusterManagerBase.java Sat Sep 24 11:02:41
2011
@@ -181,10 +181,10 @@ public abstract class ClusterManagerBase
     }
 
     protected void clone(ClusterManagerBase copy) {
-        copy.name = "Clone-from-" + getName();
-        copy.cluster = getCluster();
+        copy.setName("Clone-from-" + getName());
+        copy.setCluster(getCluster());
         copy.maxActiveSessions = getMaxActiveSessions();
-        copy.notifyListenersOnReplication = isNotifyListenersOnReplication();
+        copy.setNotifyListenersOnReplication(isNotifyListenersOnReplication());
         copy.setSessionAttributeFilter(getSessionAttributeFilter());
     }
 



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


Mime
View raw message