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")
|
||||
|
||||
@@ -301,6 +301,7 @@ class DefaultClientResponseTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("deprecation")
|
||||
void createException() {
|
||||
byte[] bytes = "foo".getBytes(StandardCharsets.UTF_8);
|
||||
DataBuffer dataBuffer = DefaultDataBufferFactory.sharedInstance.wrap(bytes);
|
||||
@@ -379,6 +380,7 @@ class DefaultClientResponseTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("deprecation")
|
||||
void createError() {
|
||||
byte[] bytes = "foo".getBytes(StandardCharsets.UTF_8);
|
||||
DataBuffer dataBuffer = DefaultDataBufferFactory.sharedInstance.wrap(bytes);
|
||||
|
||||
@@ -196,8 +196,8 @@ public class MvcNamespaceTests {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
void testDefaultConfig() throws Exception {
|
||||
loadBeanDefinitions("mvc-config.xml");
|
||||
|
||||
@@ -381,8 +381,8 @@ public class MvcNamespaceTests {
|
||||
assertThat(chain.getInterceptorList()).hasSize(3);
|
||||
}
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
void testResources() throws Exception {
|
||||
loadBeanDefinitions("mvc-config-resources.xml");
|
||||
|
||||
@@ -428,8 +428,8 @@ public class MvcNamespaceTests {
|
||||
.isInstanceOf(NoResourceFoundException.class);
|
||||
}
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
void testUseDeprecatedPathMatcher() throws Exception {
|
||||
loadBeanDefinitions("mvc-config-deprecated-path-matcher.xml");
|
||||
Map<String, AbstractHandlerMapping> handlerMappings = appContext.getBeansOfType(AbstractHandlerMapping.class);
|
||||
@@ -441,8 +441,8 @@ public class MvcNamespaceTests {
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
void testUsePathPatternParser() throws Exception {
|
||||
loadBeanDefinitions("mvc-config-custom-pattern-parser.xml");
|
||||
|
||||
@@ -470,8 +470,8 @@ public class MvcNamespaceTests {
|
||||
assertThat(handler.getCacheSeconds()).isEqualTo(3600);
|
||||
}
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
void testResourcesWithResolversTransformers() {
|
||||
loadBeanDefinitions("mvc-config-resources-chain.xml");
|
||||
|
||||
@@ -621,8 +621,8 @@ public class MvcNamespaceTests {
|
||||
assertThat(interceptor2.getParamName()).isEqualTo("style");
|
||||
}
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
void testViewControllers() throws Exception {
|
||||
loadBeanDefinitions("mvc-config-view-controllers.xml");
|
||||
|
||||
@@ -918,8 +918,8 @@ public class MvcNamespaceTests {
|
||||
assertThat(compositeResolver.getOrder()).isEqualTo(123);
|
||||
}
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
void testPathMatchingHandlerMappings() {
|
||||
loadBeanDefinitions("mvc-config-path-matching-mappings.xml");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user