From 1c0263d1ccd15adf82cf9d120d5e345d9ce10b7b Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Mon, 10 Jan 2011 15:45:42 +0000 Subject: [PATCH] SPR-7729 - MediaType incorrectly calls the toString() method instead of name() method causing RestTemplate on Android to fail git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3899 50f2f4bb-b051-0410-bef5-90022cba6387 --- .../src/main/java/org/springframework/http/MediaType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.springframework.web/src/main/java/org/springframework/http/MediaType.java b/org.springframework.web/src/main/java/org/springframework/http/MediaType.java index 185e9e6cab5..8a495548719 100644 --- a/org.springframework.web/src/main/java/org/springframework/http/MediaType.java +++ b/org.springframework.web/src/main/java/org/springframework/http/MediaType.java @@ -215,7 +215,7 @@ public class MediaType implements Comparable { * @throws IllegalArgumentException if any of the parameters contain illegal characters */ public MediaType(String type, String subtype, Charset charSet) { - this(type, subtype, Collections.singletonMap(PARAM_CHARSET, charSet.toString())); + this(type, subtype, Collections.singletonMap(PARAM_CHARSET, charSet.name())); } /**