Copy headers map in RestClientResponseException to ensure serializability
This commit ensures that the HttpHeaders used are serializable by making a copy. Closes gh-31787
This commit is contained in:
@@ -74,7 +74,7 @@ public class DefaultResponseErrorHandlerTests {
|
||||
assertThatExceptionOfType(HttpClientErrorException.class)
|
||||
.isThrownBy(() -> handler.handleError(response))
|
||||
.withMessage("404 Not Found: \"Hello World\"")
|
||||
.satisfies(ex -> assertThat(ex.getResponseHeaders()).isSameAs(headers));
|
||||
.satisfies(ex -> assertThat(ex.getResponseHeaders()).isEqualTo(headers));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user