Browse Source

SPR-7729 - MediaType incorrectly calls the toString() method instead of name() method causing RestTemplate on Android to fail

pull/7/head
Arjen Poutsma 14 years ago
parent
commit
465e093bfb
  1. 2
      org.springframework.web/src/main/java/org/springframework/http/MediaType.java

2
org.springframework.web/src/main/java/org/springframework/http/MediaType.java

@ -215,7 +215,7 @@ public class MediaType implements Comparable<MediaType> { @@ -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()));
}
/**

Loading…
Cancel
Save