Skip to content

Commit e26c161

Browse files
committed
Clean up warnings
1 parent 087641c commit e26c161

File tree

5 files changed

+14
-7
lines changed

5 files changed

+14
-7
lines changed

spring-web/src/test/java/org/springframework/http/HttpEntityTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ void multiValueMap() {
5454
MultiValueMap<String, String> map = new LinkedMultiValueMap<>();
5555
map.set("Content-Type", "text/plain");
5656
String body = "foo";
57+
@SuppressWarnings("deprecation")
5758
HttpEntity<String> entity = new HttpEntity<>(body, map);
5859
assertThat(entity.getBody()).isEqualTo(body);
5960
assertThat(entity.getHeaders().getContentType()).isEqualTo(MediaType.TEXT_PLAIN);

spring-web/src/test/java/org/springframework/http/server/reactive/HeadersAdaptersTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ void copyUsingHeaderSetAddAllIsCaseInsensitive(MultiValueMap<String, String> hea
123123
}
124124

125125
@ParameterizedPopulatedHeadersTest
126+
@SuppressWarnings("deprecation")
126127
void copyUsingEntrySetPutRemovesDuplicates(MultiValueMap<String, String> headers) {
127128
HttpHeaders headers2 = new HttpHeaders();
128129
for (Map.Entry<String, List<String>> entry : headers.entrySet()) {
@@ -141,6 +142,7 @@ void copyUsingEntrySetPutRemovesDuplicates(MultiValueMap<String, String> headers
141142
}
142143

143144
@ParameterizedPopulatedHeadersTest
145+
@SuppressWarnings("deprecation")
144146
void copyUsingPutAllRemovesDuplicates(MultiValueMap<String, String> headers) {
145147
HttpHeaders headers2 = new HttpHeaders();
146148
headers2.putAll(headers);

spring-web/src/test/java/org/springframework/web/ErrorResponseTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@
3333
class ErrorResponseTests {
3434

3535
@Test
36+
@SuppressWarnings("deprecation")
3637
void createWithHttpHeader() {
3738
ErrorResponse response = ErrorResponse.builder(new IllegalStateException(), HttpStatus.BAD_REQUEST, "test")
3839
.header("header", "value").build();
3940
assertThat(response.getHeaders().asMultiValueMap()).containsOnly(entry("header", List.of("value")));
4041
}
4142

4243
@Test
44+
@SuppressWarnings("deprecation")
4345
void createWithHttpHeadersConsumer() {
4446
ErrorResponse response = ErrorResponse.builder(new IllegalStateException(), HttpStatus.BAD_REQUEST, "test")
4547
.header("header", "value")

spring-webflux/src/test/java/org/springframework/web/reactive/function/client/DefaultClientResponseTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ void toEntityListTypeReference() {
301301
}
302302

303303
@Test
304+
@SuppressWarnings("deprecation")
304305
void createException() {
305306
byte[] bytes = "foo".getBytes(StandardCharsets.UTF_8);
306307
DataBuffer dataBuffer = DefaultDataBufferFactory.sharedInstance.wrap(bytes);
@@ -379,6 +380,7 @@ void createExceptionAndDecodeWithoutContent() {
379380
}
380381

381382
@Test
383+
@SuppressWarnings("deprecation")
382384
void createError() {
383385
byte[] bytes = "foo".getBytes(StandardCharsets.UTF_8);
384386
DataBuffer dataBuffer = DefaultDataBufferFactory.sharedInstance.wrap(bytes);

spring-webmvc/src/test/java/org/springframework/web/servlet/config/MvcNamespaceTests.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ void setup() throws Exception {
196196
}
197197

198198

199-
@SuppressWarnings("removal")
200199
@Test
200+
@SuppressWarnings("removal")
201201
void testDefaultConfig() throws Exception {
202202
loadBeanDefinitions("mvc-config.xml");
203203

@@ -381,8 +381,8 @@ void testInterceptors() throws Exception {
381381
assertThat(chain.getInterceptorList()).hasSize(3);
382382
}
383383

384-
@SuppressWarnings("removal")
385384
@Test
385+
@SuppressWarnings("removal")
386386
void testResources() throws Exception {
387387
loadBeanDefinitions("mvc-config-resources.xml");
388388

@@ -428,8 +428,8 @@ void testResources() throws Exception {
428428
.isInstanceOf(NoResourceFoundException.class);
429429
}
430430

431-
@SuppressWarnings("removal")
432431
@Test
432+
@SuppressWarnings("removal")
433433
void testUseDeprecatedPathMatcher() throws Exception {
434434
loadBeanDefinitions("mvc-config-deprecated-path-matcher.xml");
435435
Map<String, AbstractHandlerMapping> handlerMappings = appContext.getBeansOfType(AbstractHandlerMapping.class);
@@ -441,8 +441,8 @@ void testUseDeprecatedPathMatcher() throws Exception {
441441
});
442442
}
443443

444-
@SuppressWarnings("removal")
445444
@Test
445+
@SuppressWarnings("removal")
446446
void testUsePathPatternParser() throws Exception {
447447
loadBeanDefinitions("mvc-config-custom-pattern-parser.xml");
448448

@@ -470,8 +470,8 @@ void testResourcesWithOptionalAttributes() {
470470
assertThat(handler.getCacheSeconds()).isEqualTo(3600);
471471
}
472472

473-
@SuppressWarnings("removal")
474473
@Test
474+
@SuppressWarnings("removal")
475475
void testResourcesWithResolversTransformers() {
476476
loadBeanDefinitions("mvc-config-resources-chain.xml");
477477

@@ -621,8 +621,8 @@ void testBeanDecoration() throws Exception {
621621
assertThat(interceptor2.getParamName()).isEqualTo("style");
622622
}
623623

624-
@SuppressWarnings("removal")
625624
@Test
625+
@SuppressWarnings("removal")
626626
void testViewControllers() throws Exception {
627627
loadBeanDefinitions("mvc-config-view-controllers.xml");
628628

@@ -918,8 +918,8 @@ void testViewResolutionWithOrderSet() {
918918
assertThat(compositeResolver.getOrder()).isEqualTo(123);
919919
}
920920

921-
@SuppressWarnings("removal")
922921
@Test
922+
@SuppressWarnings("removal")
923923
void testPathMatchingHandlerMappings() {
924924
loadBeanDefinitions("mvc-config-path-matching-mappings.xml");
925925

0 commit comments

Comments
 (0)