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 2008/11/06 20:08:28 UTC

svn commit: r711946 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java

Author: ivaynberg
Date: Thu Nov  6 11:08:18 2008
New Revision: 711946

URL: http://svn.apache.org/viewvc?rev=711946&view=rev
Log:
unroll WICKET-1910 because it breaks wicket tester, more notes in the jira issue

Modified:
    wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java

Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java?rev=711946&r1=711945&r2=711946&view=diff
==============================================================================
--- wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java (original)
+++ wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebRequest.java Thu Nov  6 11:08:18 2008
@@ -61,12 +61,6 @@
 	private int previousUrlDepth;
 
 	/**
-	 * Marks this request as an ajax request. This is a cache used by and initialized in
-	 * {@link #isAjax()}
-	 */
-	private Boolean ajax;
-
-	/**
 	 * Protected constructor.
 	 * 
 	 * @param httpServletRequest
@@ -419,25 +413,20 @@
 	@Override
 	public boolean isAjax()
 	{
-		if (ajax == null)
+		String ajaxHeader = httpServletRequest.getHeader("Wicket-Ajax");
+		if (Strings.isEmpty(ajaxHeader) == false)
 		{
-			ajax = false;
-
-			String ajaxHeader = httpServletRequest.getHeader("Wicket-Ajax");
-			if (Strings.isEmpty(ajaxHeader) == false)
+			try
 			{
-				try
-				{
-					ajax = Strings.isTrue(ajaxHeader);
-				}
-				catch (StringValueConversionException e)
-				{
-					// We are not interested in this exception but we log it anyway
-					log.debug("Couldn't convert the Wicket-Ajax header: " + ajaxHeader);
-				}
+				return Strings.isTrue(ajaxHeader);
+			}
+			catch (StringValueConversionException e)
+			{
+				// We are not interested in this exception but we log it anyway
+				log.debug("Couldn't convert the Wicket-Ajax header: " + ajaxHeader);
 			}
 		}
-		return ajax;
+		return false;
 	}
 
 	/**