tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session ReplicatedSession.java
Date Fri, 14 Nov 2003 21:32:23 GMT
fhanik      2003/11/14 13:32:23

  Modified:    modules/cluster/src/share/org/apache/catalina/cluster/session
                        ReplicatedSession.java
  Log:
  if null is passed into the value of setAttribute, then remove it
  
  Revision  Changes    Path
  1.8       +8 -4      jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/ReplicatedSession.java
  
  Index: ReplicatedSession.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/ReplicatedSession.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ReplicatedSession.java	9 Sep 2003 22:21:18 -0000	1.7
  +++ ReplicatedSession.java	14 Nov 2003 21:32:23 -0000	1.8
  @@ -123,7 +123,7 @@
       public void setLastAccessWasDistributed(long time) {
           lastAccessWasDistributed = time;
       }
  -    
  +
       public long getLastAccessWasDistributed() {
           return lastAccessWasDistributed;
       }
  @@ -149,6 +149,10 @@
        */
       public void setAttribute(String name, Object value)
       {
  +        if ( value == null ) {
  +          removeAttribute(name);
  +          return;
  +        }
           if (!(value instanceof java.io.Serializable))
               throw new java.lang.IllegalArgumentException("Value for attribute "+name+"
is not serializable.");
           setIsDirty(true);
  
  
  

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


Mime
View raw message