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, 04 Apr 2003 19:43:47 GMT
fhanik      2003/04/04 11:43:47

  Modified:    modules/cluster/src/share/org/apache/catalina/cluster/session
                        ReplicatedSession.java
  Log:
  servlet 2.4 spec requires setAttribute to throw an exception if attribute is not serializable
  
  Revision  Changes    Path
  1.4       +5 -5      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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ReplicatedSession.java	18 Mar 2003 05:16:42 -0000	1.3
  +++ ReplicatedSession.java	4 Apr 2003 19:43:47 -0000	1.4
  @@ -141,10 +141,10 @@
        */
       public void setAttribute(String name, Object value)
       {
  +        if (!(value instanceof java.io.Serializable))
  +            throw new java.lang.IllegalArgumentException("Value for attribute "+name+"
is not serializable.");
           setIsDirty(true);
           super.setAttribute(name,value);
  -        if (!(value instanceof java.io.Serializable))
  -            log("WARNING! Replication will fail, value for attribute "+name+" is not serializable.");
       }
   
   
  
  
  

---------------------------------------------------------------------
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