Skip to content

Commit 94d7aa2

Browse files
committed
Suppress deprecation warnings
1 parent 934394e commit 94d7aa2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-web/src/test/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactoryTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ void assertCustomConfig() throws Exception {
7070
URI uri = URI.create(baseUrl + "/status/ok");
7171
HttpComponentsClientHttpRequest request = (HttpComponentsClientHttpRequest) hrf.createRequest(uri, HttpMethod.GET);
7272

73+
@SuppressWarnings("deprecation") // HttpClientContext.REQUEST_CONFIG
7374
Object config = request.getHttpContext().getAttribute(HttpClientContext.REQUEST_CONFIG);
7475
assertThat(config).as("Request config should be set").isNotNull();
7576
assertThat(config).as("Wrong request config type " + config.getClass().getName()).isInstanceOf(RequestConfig.class);
@@ -184,7 +185,7 @@ static Stream<HttpMethod> safeHttpMethods() {
184185
return Stream.of(HttpMethod.GET, HttpMethod.OPTIONS, HttpMethod.TRACE);
185186
}
186187

187-
@SuppressWarnings("deprecation")
188+
@SuppressWarnings("deprecation") // HttpClientContext.REQUEST_CONFIG
188189
private RequestConfig retrieveRequestConfig(HttpComponentsClientHttpRequestFactory factory) throws Exception {
189190
URI uri = URI.create(baseUrl + "/status/ok");
190191
HttpComponentsClientHttpRequest request = (HttpComponentsClientHttpRequest)

0 commit comments

Comments
 (0)