You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by iv...@apache.org on 2011/06/10 09:33:26 UTC

svn commit: r1134214 - /wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ThreadContext.java

Author: ivaynberg
Date: Fri Jun 10 07:33:26 2011
New Revision: 1134214

URL: http://svn.apache.org/viewvc?rev=1134214&view=rev
Log:
add convenience exists() to threadcontext

Modified:
    wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ThreadContext.java

Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ThreadContext.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ThreadContext.java?rev=1134214&r1=1134213&r2=1134214&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ThreadContext.java (original)
+++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ThreadContext.java Fri Jun 10 07:33:26 2011
@@ -51,6 +51,16 @@ public class ThreadContext
 	}
 
 	/**
+	 * Checks if {@link ThreadContext} exists for the current thread
+	 * 
+	 * @return {@code true} if {@link ThreadContext} exists for the current thread
+	 */
+	public static boolean exists()
+	{
+		return get(false) != null;
+	}
+
+	/**
 	 * @return {@link Application} bound to current thread
 	 */
 	public static Application getApplication()