[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-541) ConversationEntry reports the wrong description
by Norman Richards (JIRA)
ConversationEntry reports the wrong description
-----------------------------------------------
Key: JBSEAM-541
URL: http://jira.jboss.com/jira/browse/JBSEAM-541
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 1.1.0.CR1
Reporter: Norman Richards
Assigned To: Gavin King
The linked forum post shows one example of this bug, though it is not directly the issue the poster is complaining of.
Using the forum application as a guide, start a conversation and then start a nested conversation. End the nested conversation. The description of the parent conversation in the converstion list on will be incorrect. (it will have the name of the current conversation that just ended)
This happens because of the following code:
public String getDescription()
{
if ( isCurrent() )
{
String desc = Conversation.instance().description;
if (desc!=null) return desc;
}
return description;
}
public boolean isCurrent()
{
Manager manager = Manager.instance();
if ( manager.isLongRunningConversation() )
{
return id.equals( manager.getCurrentConversationId() );
}
else if ( manager.isNestedConversation() )
{
return id.equals( manager.getParentConversationId() );
}
else
{
return false;
}
}
The parent conversation entry is considered "current". (isLongRunning() is false and isNestedConversation() is true) Because of this, the ConversationEntry description is ignored in favor of Conversation.instance().description. (Again, Conversation.instance(), is the nested conversation that just ended)
Subsequent requests display the conversation description correctly since they are done in the context of the correct conversation.
The isNestedConversation() check looks to be the source of the problem. I can't figure out what case that would make sense for.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira