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/02/16 22:42:26 UTC

svn commit: r628382 - /myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/conversation/ConversationManager.java

Author: skitching
Date: Sat Feb 16 13:42:26 2008
New Revision: 628382

URL: http://svn.apache.org/viewvc?rev=628382&view=rev
Log:
Resolve findbugs issues, add docs.

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=628382&r1=628381&r2=628382&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 Sat Feb 16 13:42:26 2008
@@ -121,13 +121,19 @@
 	/**
 	 * Get the current, or create a new unique conversationContextId.
 	 * <p>
-	 * The current conversationContextId will retrieved from the request parameters. If no such parameter is
-	 * present then a new id will be allocated and a new ConversationContext created.
+	 * The current conversationContextId will be retrieved from the request
+	 * parameters. If no such parameter is present then a new id will be
+	 * allocated and a new ConversationContext created.
 	 * <p>
-	 * In either case the result will be stored within the request for faster lookup.
+	 * In either case the result will be stored within the request for
+	 * faster lookup.
 	 * <p>
-	 * Note that there is no security flaw regarding injection of fake context ids; the id must match one already
-	 * in the session and there is no security problem with two windows in the same session exchanging ids.
+	 * Note that there is no security flaw regarding injection of fake
+	 * context ids; the id must match one already in the session and there
+	 * is no security problem with two windows in the same session exchanging
+	 * ids.
+	 * <p>
+	 * This method <i>never</i> returns null.
 	 */
 	public Long getConversationContextId()
 	{
@@ -190,11 +196,6 @@
 	public void clearCurrentConversationContext()
 	{
 		Long conversationContextId = getConversationContextId();
-		if (conversationContextId == null)
-		{
-			return;
-		}
-
 		ConversationContext conversationContext = getConversationContext(conversationContextId);
 		if (conversationContext != null)
 		{
@@ -295,11 +296,6 @@
 	public ConversationContext getCurrentConversationContext()
 	{
 		Long conversationContextId = getConversationContextId();
-		if (conversationContextId == null)
-		{
-			return null;
-		}
-
 		ConversationContext conversationContext = getConversationContext(conversationContextId);
 		return conversationContext;
 	}