mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Fix DefaultResponseErrorHandler method visibility
Prior to this commit, the `setMessageConverters` method would have private visibility. But `initBodyConvertFunction`, which is `protected`, relies on the message converters being set in the first place. While this works with `RestTemplate` because this is done automatically, the `RestClient` does offer a builder method to configure a `ResponseErrorHandler` and this makes it impossible to configure converters in this case. This commit aligns the method visibility by making it protected. Closes gh-36434
This commit is contained in:
+1
-2
@@ -69,11 +69,10 @@ public class DefaultResponseErrorHandler implements ResponseErrorHandler {
|
||||
* to use to decode error content.
|
||||
* @since 6.0
|
||||
*/
|
||||
void setMessageConverters(List<HttpMessageConverter<?>> converters) {
|
||||
protected void setMessageConverters(List<HttpMessageConverter<?>> converters) {
|
||||
this.messageConverters = Collections.unmodifiableList(converters);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Delegates to {@link #hasError(HttpStatusCode)} with the response status code.
|
||||
* @see ClientHttpResponse#getStatusCode()
|
||||
|
||||
Reference in New Issue
Block a user