hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1426243 - /httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/util/EntityUtils.java
Date Thu, 27 Dec 2012 16:20:34 GMT
Author: olegk
Date: Thu Dec 27 16:20:34 2012
New Revision: 1426243

URL: http://svn.apache.org/viewvc?rev=1426243&view=rev
Log:
HTTPCORE-324: EntityUtils#toString(HttpEntity, String) throws IllegalArgumentException if
defaultCharset is null

Modified:
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/util/EntityUtils.java

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/util/EntityUtils.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/util/EntityUtils.java?rev=1426243&r1=1426242&r2=1426243&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/util/EntityUtils.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/util/EntityUtils.java
Thu Dec 27 16:20:34 2012
@@ -265,7 +265,7 @@ public final class EntityUtils {
      */
     public static String toString(
             final HttpEntity entity, final String defaultCharset) throws IOException, ParseException
{
-        return toString(entity, Charset.forName(defaultCharset));
+        return toString(entity, defaultCharset != null ? Charset.forName(defaultCharset)
: null);
     }
 
     /**



Mime
View raw message