You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2017/05/09 20:03:02 UTC
[11/50] httpcomponents-core git commit: HTTPCORE-324:
EntityUtils#toString(HttpEntity,
String) throws IllegalArgumentException if defaultCharset is null
HTTPCORE-324: EntityUtils#toString(HttpEntity, String) throws IllegalArgumentException if defaultCharset is null
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.2.x@1426242 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/a64b98c0
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/a64b98c0
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/a64b98c0
Branch: refs/heads/4.2.x
Commit: a64b98c0aace359b85f3ba634a4c380bafa6a160
Parents: e8063d9
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Thu Dec 27 16:20:00 2012 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Thu Dec 27 16:20:00 2012 +0000
----------------------------------------------------------------------
httpcore/src/main/java/org/apache/http/util/EntityUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/a64b98c0/httpcore/src/main/java/org/apache/http/util/EntityUtils.java
----------------------------------------------------------------------
diff --git a/httpcore/src/main/java/org/apache/http/util/EntityUtils.java b/httpcore/src/main/java/org/apache/http/util/EntityUtils.java
index 83918c5..8739cdd 100644
--- a/httpcore/src/main/java/org/apache/http/util/EntityUtils.java
+++ b/httpcore/src/main/java/org/apache/http/util/EntityUtils.java
@@ -252,7 +252,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);
}
/**