Clean up warnings
This commit is contained in:
@@ -54,6 +54,7 @@ class HttpEntityTests {
|
||||
MultiValueMap<String, String> map = new LinkedMultiValueMap<>();
|
||||
map.set("Content-Type", "text/plain");
|
||||
String body = "foo";
|
||||
@SuppressWarnings("deprecation")
|
||||
HttpEntity<String> entity = new HttpEntity<>(body, map);
|
||||
assertThat(entity.getBody()).isEqualTo(body);
|
||||
assertThat(entity.getHeaders().getContentType()).isEqualTo(MediaType.TEXT_PLAIN);
|
||||
|
||||
@@ -123,6 +123,7 @@ class HeadersAdaptersTests {
|
||||
}
|
||||
|
||||
@ParameterizedPopulatedHeadersTest
|
||||
@SuppressWarnings("deprecation")
|
||||
void copyUsingEntrySetPutRemovesDuplicates(MultiValueMap<String, String> headers) {
|
||||
HttpHeaders headers2 = new HttpHeaders();
|
||||
for (Map.Entry<String, List<String>> entry : headers.entrySet()) {
|
||||
@@ -141,6 +142,7 @@ class HeadersAdaptersTests {
|
||||
}
|
||||
|
||||
@ParameterizedPopulatedHeadersTest
|
||||
@SuppressWarnings("deprecation")
|
||||
void copyUsingPutAllRemovesDuplicates(MultiValueMap<String, String> headers) {
|
||||
HttpHeaders headers2 = new HttpHeaders();
|
||||
headers2.putAll(headers);
|
||||
|
||||
@@ -33,6 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
class ErrorResponseTests {
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("deprecation")
|
||||
void createWithHttpHeader() {
|
||||
ErrorResponse response = ErrorResponse.builder(new IllegalStateException(), HttpStatus.BAD_REQUEST, "test")
|
||||
.header("header", "value").build();
|
||||
@@ -40,6 +41,7 @@ class ErrorResponseTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("deprecation")
|
||||
void createWithHttpHeadersConsumer() {
|
||||
ErrorResponse response = ErrorResponse.builder(new IllegalStateException(), HttpStatus.BAD_REQUEST, "test")
|
||||
.header("header", "value")
|
||||
|
||||
Reference in New Issue
Block a user