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/20 16:08:05 UTC

svn commit: r629498 - /myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/ContextLockRequestHandler.java

Author: skitching
Date: Wed Feb 20 07:08:00 2008
New Revision: 629498

URL: http://svn.apache.org/viewvc?rev=629498&view=rev
Log:
Fix NullPointerException on first access to an application.

Modified:
    myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/ContextLockRequestHandler.java

Modified: myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/ContextLockRequestHandler.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/ContextLockRequestHandler.java?rev=629498&r1=629497&r2=629498&view=diff
==============================================================================
--- myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/ContextLockRequestHandler.java (original)
+++ myfaces/orchestra/trunk/core/src/main/java/org/apache/myfaces/orchestra/lib/jsf/ContextLockRequestHandler.java Wed Feb 20 07:08:00 2008
@@ -50,13 +50,16 @@
 			if (manager != null)
 			{
 				context = manager.getCurrentConversationContext();
-				try
+				if (context != null)
 				{
-					context.lockInterruptablyForCurrentThread();
-				}
-				catch(InterruptedException e)
-				{
-					throw new FacesException(e);
+					try
+					{
+						context.lockInterruptablyForCurrentThread();
+					}
+					catch(InterruptedException e)
+					{
+						throw new FacesException(e);
+					}
 				}
 			}
 		}