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
This commit is contained in:
Arjen Poutsma
2011-01-10 15:45:42 +00:00
parent 38282a38bf
commit 1c0263d1cc
@@ -215,7 +215,7 @@ public class MediaType implements Comparable<MediaType> {
* @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()));
}
/**