Use HttpStatusCode interface

This commit contains changes made because of the introduction of
HttpStatusCode. In general, methods that used to return a HttpStatus
now return HttpStatusCode instead, and methods that returned raw status
codes are now deprecated.

See gh-28214
This commit is contained in:
Arjen Poutsma
2022-03-17 14:21:04 +01:00
parent ca4b6e86a4
commit 28ac0d3883
143 changed files with 1064 additions and 950 deletions

View File

@@ -190,7 +190,7 @@ public class RestTemplateXhrTransportTests {
private ClientHttpResponse response(HttpStatus status, String body) throws IOException {
ClientHttpResponse response = mock(ClientHttpResponse.class);
InputStream inputStream = getInputStream(body);
given(response.getRawStatusCode()).willReturn(status.value());
given(response.getStatusCode()).willReturn(status);
given(response.getBody()).willReturn(inputStream);
return response;
}