Always construct new exception on error in DefaultWebClient
Always construct new exception on error, otherwise memory leak may occur due to repeated use of singleton exception. Closes gh-28550
This commit is contained in:
@@ -68,7 +68,7 @@ class DefaultWebClient implements WebClient {
|
||||
private static final String URI_TEMPLATE_ATTRIBUTE = WebClient.class.getName() + ".uriTemplate";
|
||||
|
||||
private static final Mono<ClientResponse> NO_HTTP_CLIENT_RESPONSE_ERROR = Mono.error(
|
||||
new IllegalStateException("The underlying HTTP client completed without emitting a response."));
|
||||
() -> new IllegalStateException("The underlying HTTP client completed without emitting a response."));
|
||||
|
||||
|
||||
private final ExchangeFunction exchangeFunction;
|
||||
|
||||
Reference in New Issue
Block a user