|
|
@ -202,8 +202,11 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void setMessageConverters(List<HttpMessageConverter<?>> messageConverters) { |
|
|
|
public void setMessageConverters(List<HttpMessageConverter<?>> messageConverters) { |
|
|
|
Assert.notEmpty(messageConverters, "'messageConverters' must not be empty"); |
|
|
|
Assert.notEmpty(messageConverters, "'messageConverters' must not be empty"); |
|
|
|
this.messageConverters.clear(); |
|
|
|
// Take getMessageConverters() List as-is when passed in here
|
|
|
|
this.messageConverters.addAll(messageConverters); |
|
|
|
if (this.messageConverters != messageConverters) { |
|
|
|
|
|
|
|
this.messageConverters.clear(); |
|
|
|
|
|
|
|
this.messageConverters.addAll(messageConverters); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|