You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sk...@apache.org on 2008/11/13 11:51:50 UTC
svn commit: r713702 -
/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java
Author: skitching
Date: Thu Nov 13 02:51:49 2008
New Revision: 713702
URL: http://svn.apache.org/viewvc?rev=713702&view=rev
Log:
Fix ORCHESTRA-32: NullPointerException when deserializing an HttpSession
containing a ConversationManager instance.
Modified:
myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java
Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java?rev=713702&r1=713701&r2=713702&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java Thu Nov 13 02:51:49 2008
@@ -652,7 +652,10 @@
private Object readResolve() throws ObjectStreamException
{
- // do not return a real object, that way on first request a new conversation manager will be created
- return null;
+ // Note: Returning null here is not a good idea (for Tomcat 6.0.16 at least). Null objects are
+ // not permitted within an HttpSession; calling HttpSession.setAttribute(name, null) is defined as
+ // removing the attribute. So returning null here when deserializing an object from the session
+ // can cause problems.
+ return new ConversationManager();
}
}