Suppress deprecation warnings
This commit is contained in:
@@ -43,6 +43,7 @@ public class Netty4ClientHttpRequestFactoryTests extends AbstractHttpRequestFact
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
protected ClientHttpRequestFactory createRequestFactory() {
|
||||
return new Netty4ClientHttpRequestFactory(eventLoopGroup);
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ import static org.mockito.Mockito.verify;
|
||||
* @author Phillip Webb
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class BasicAuthorizationInterceptorTests {
|
||||
|
||||
@Test
|
||||
|
||||
@@ -105,6 +105,7 @@ public class CauchoRemotingTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("deprecation")
|
||||
public void simpleHessianServiceExporter() throws IOException {
|
||||
final int port = SocketUtils.findAvailableTcpPort();
|
||||
|
||||
|
||||
@@ -39,10 +39,7 @@ import org.springframework.http.HttpRequest;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.http.client.AsyncClientHttpRequestExecution;
|
||||
import org.springframework.http.client.AsyncClientHttpRequestInterceptor;
|
||||
import org.springframework.http.client.ClientHttpResponse;
|
||||
import org.springframework.http.client.HttpComponentsAsyncClientHttpRequestFactory;
|
||||
import org.springframework.util.LinkedMultiValueMap;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
import org.springframework.util.concurrent.ListenableFuture;
|
||||
@@ -65,7 +62,7 @@ import static org.junit.Assert.fail;
|
||||
public class AsyncRestTemplateIntegrationTests extends AbstractMockWebServerTestCase {
|
||||
|
||||
private final AsyncRestTemplate template = new AsyncRestTemplate(
|
||||
new HttpComponentsAsyncClientHttpRequestFactory());
|
||||
new org.springframework.http.client.HttpComponentsAsyncClientHttpRequestFactory());
|
||||
|
||||
|
||||
@Test
|
||||
@@ -637,7 +634,7 @@ public class AsyncRestTemplateIntegrationTests extends AbstractMockWebServerTest
|
||||
}
|
||||
|
||||
|
||||
private static class RequestInterceptor implements AsyncClientHttpRequestInterceptor {
|
||||
private static class RequestInterceptor implements org.springframework.http.client.AsyncClientHttpRequestInterceptor {
|
||||
|
||||
private final CountDownLatch latch = new CountDownLatch(1);
|
||||
|
||||
@@ -647,7 +644,7 @@ public class AsyncRestTemplateIntegrationTests extends AbstractMockWebServerTest
|
||||
|
||||
@Override
|
||||
public ListenableFuture<ClientHttpResponse> intercept(HttpRequest request, byte[] body,
|
||||
AsyncClientHttpRequestExecution execution) throws IOException {
|
||||
org.springframework.http.client.AsyncClientHttpRequestExecution execution) throws IOException {
|
||||
|
||||
ListenableFuture<ClientHttpResponse> future = execution.executeAsync(request, body);
|
||||
future.addCallback(
|
||||
@@ -662,4 +659,5 @@ public class AsyncRestTemplateIntegrationTests extends AbstractMockWebServerTest
|
||||
return future;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -48,7 +48,6 @@ import org.springframework.http.RequestEntity;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.http.client.ClientHttpRequestFactory;
|
||||
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
|
||||
import org.springframework.http.client.Netty4ClientHttpRequestFactory;
|
||||
import org.springframework.http.client.OkHttp3ClientHttpRequestFactory;
|
||||
import org.springframework.http.client.SimpleClientHttpRequestFactory;
|
||||
import org.springframework.http.converter.json.MappingJacksonValue;
|
||||
@@ -83,7 +82,7 @@ public class RestTemplateIntegrationTests extends AbstractMockWebServerTestCase
|
||||
return Arrays.asList(
|
||||
new SimpleClientHttpRequestFactory(),
|
||||
new HttpComponentsClientHttpRequestFactory(),
|
||||
new Netty4ClientHttpRequestFactory(),
|
||||
new org.springframework.http.client.Netty4ClientHttpRequestFactory(),
|
||||
new OkHttp3ClientHttpRequestFactory()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.server.reactive.ServerHttpRequest;
|
||||
import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest;
|
||||
import org.springframework.mock.web.test.server.MockServerWebExchange;
|
||||
import org.springframework.web.filter.reactive.ForwardedHeaderFilter;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
@@ -92,6 +91,7 @@ public class CorsUtilsTests {
|
||||
}
|
||||
|
||||
@Test // SPR-16362
|
||||
@SuppressWarnings("deprecation")
|
||||
public void isSameOriginWithDifferentSchemes() {
|
||||
MockServerHttpRequest request = MockServerHttpRequest
|
||||
.get("http://mydomain1.com")
|
||||
@@ -100,6 +100,7 @@ public class CorsUtilsTests {
|
||||
assertFalse(CorsUtils.isSameOrigin(request));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void testWithXForwardedHeaders(String serverName, int port,
|
||||
String forwardedProto, String forwardedHost, int forwardedPort, String originHeader) {
|
||||
|
||||
@@ -123,6 +124,7 @@ public class CorsUtilsTests {
|
||||
assertTrue(CorsUtils.isSameOrigin(request));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void testWithForwardedHeader(String serverName, int port,
|
||||
String forwardedHeader, String originHeader) {
|
||||
|
||||
@@ -140,10 +142,11 @@ public class CorsUtilsTests {
|
||||
}
|
||||
|
||||
// SPR-16668
|
||||
@SuppressWarnings("deprecation")
|
||||
private ServerHttpRequest adaptFromForwardedHeaders(MockServerHttpRequest.BaseBuilder<?> builder) {
|
||||
AtomicReference<ServerHttpRequest> requestRef = new AtomicReference<>();
|
||||
MockServerWebExchange exchange = MockServerWebExchange.from(builder);
|
||||
new ForwardedHeaderFilter().filter(exchange, exchange2 -> {
|
||||
new org.springframework.web.filter.reactive.ForwardedHeaderFilter().filter(exchange, exchange2 -> {
|
||||
requestRef.set(exchange2.getRequest());
|
||||
return Mono.empty();
|
||||
}).block();
|
||||
|
||||
Reference in New Issue
Block a user