You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2010/11/09 19:58:45 UTC

svn commit: r1033156 - /wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/handler/TextRequestHandler.java

Author: mgrigorov
Date: Tue Nov  9 18:58:44 2010
New Revision: 1033156

URL: http://svn.apache.org/viewvc?rev=1033156&view=rev
Log:
Allow 'null' encoding. Actually the another constructor passes 'null' for encoding and getEncoding() reads the request's encoding if the class member is null.

Modified:
    wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/handler/TextRequestHandler.java

Modified: wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/handler/TextRequestHandler.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/handler/TextRequestHandler.java?rev=1033156&r1=1033155&r2=1033156&view=diff
==============================================================================
--- wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/handler/TextRequestHandler.java (original)
+++ wicket/trunk/wicket-request/src/main/java/org/apache/wicket/request/handler/TextRequestHandler.java Tue Nov  9 18:58:44 2010
@@ -76,10 +76,7 @@ public class TextRequestHandler implemen
 		{
 			throw new IllegalArgumentException("Argument contentType must not be null or empty");
 		}
-		if (encoding == null)
-		{
-			throw new IllegalArgumentException("Argument charset must not be null");
-		}
+
 		this.contentType = contentType;
 		this.string = string;
 		this.encoding = encoding;
@@ -112,7 +109,7 @@ public class TextRequestHandler implemen
 
 	/**
 	 * @param requestCycle
-	 * @return
+	 * @return the configured encoding or the request's one as default
 	 */
 	private String getEncoding(IRequestCycle requestCycle)
 	{
@@ -145,5 +142,4 @@ public class TextRequestHandler implemen
 		return string;
 	}
 
-
 }