Skip to content

Commit a85bf31

Browse files
committed
Remove APIs deprecated for removal in 6.2
This commit removes the following obsolete and deprecated APIs. - org.springframework.util.Base64Utils - org.springframework.cache.jcache.interceptor.JCacheOperationSourcePointcut - org.springframework.http.client.AbstractClientHttpResponse - org.springframework.http.client.ClientHttpResponse.getRawStatusCode() - org.springframework.http.client.observation.ClientHttpObservationDocumentation.HighCardinalityKeyNames.CLIENT_NAME - org.springframework.web.reactive.function.client.ClientHttpObservationDocumentation.HighCardinalityKeyNames.CLIENT_NAME - org.springframework.web.filter.reactive.ServerWebExchangeContextFilter.get(Context) - org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler.handleBindException(...) - org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver.handleBindException(...) Closes gh-30608
1 parent 6d5bf6d commit a85bf31

File tree

12 files changed

+4
-371
lines changed

12 files changed

+4
-371
lines changed

spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/JCacheOperationSourcePointcut.java

Lines changed: 0 additions & 68 deletions
This file was deleted.

spring-core/src/main/java/org/springframework/util/Base64Utils.java

Lines changed: 0 additions & 132 deletions
This file was deleted.

spring-web/src/main/java/org/springframework/http/client/AbstractClientHttpResponse.java

Lines changed: 0 additions & 39 deletions
This file was deleted.

spring-web/src/main/java/org/springframework/http/client/ClientHttpResponse.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -42,20 +42,6 @@ public interface ClientHttpResponse extends HttpInputMessage, Closeable {
4242
*/
4343
HttpStatusCode getStatusCode() throws IOException;
4444

45-
/**
46-
* Get the HTTP status code as an integer.
47-
* @return the HTTP status as an integer value
48-
* @throws IOException in case of I/O errors
49-
* @since 3.1.1
50-
* @see #getStatusCode()
51-
* @deprecated as of 6.0, in favor of {@link #getStatusCode()}; scheduled for
52-
* removal in 6.2
53-
*/
54-
@Deprecated(since = "6.0", forRemoval = true)
55-
default int getRawStatusCode() throws IOException {
56-
return getStatusCode().value();
57-
}
58-
5945
/**
6046
* Get the HTTP status text of the response.
6147
* @return the HTTP status text

spring-web/src/main/java/org/springframework/http/client/observation/ClientHttpObservationDocumentation.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -135,20 +135,6 @@ public enum HighCardinalityKeyNames implements KeyName {
135135
public String asString() {
136136
return "http.url";
137137
}
138-
},
139-
140-
/**
141-
* Client name derived from the request URI host.
142-
* @deprecated in favor of {@link LowCardinalityKeyNames#CLIENT_NAME};
143-
* scheduled for removal in 6.2. This will be available both as a low and
144-
* high cardinality key value.
145-
*/
146-
@Deprecated(since = "6.0.5", forRemoval = true)
147-
CLIENT_NAME {
148-
@Override
149-
public String asString() {
150-
return "client.name";
151-
}
152138
}
153139

154140
}

spring-web/src/main/java/org/springframework/web/filter/reactive/ServerWebExchangeContextFilter.java

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -64,19 +64,4 @@ public static Optional<ServerWebExchange> getExchange(ContextView contextView) {
6464
return contextView.getOrEmpty(EXCHANGE_CONTEXT_ATTRIBUTE);
6565
}
6666

67-
/**
68-
* Access the {@link ServerWebExchange} from a Reactor {@link Context},
69-
* if available, which is generally the case when
70-
* {@link ServerWebExchangeContextFilter} is present in the filter chain.
71-
* @param context the context to get the exchange from
72-
* @return an {@link Optional} with the exchange if found
73-
* @deprecated in favor of using {@link #getExchange(ContextView)} which
74-
* accepts a {@link ContextView} instead of {@link Context}, reflecting the
75-
* fact that the {@code ContextView} is needed only for reading.
76-
*/
77-
@Deprecated(since = "6.0.6", forRemoval = true)
78-
public static Optional<ServerWebExchange> get(Context context) {
79-
return context.getOrEmpty(EXCHANGE_CONTEXT_ATTRIBUTE);
80-
}
81-
8267
}

spring-web/src/test/java/org/springframework/web/client/RestTemplateTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,6 @@ private void mockResponseStatus(HttpStatus responseStatus) throws Exception {
768768
given(request.execute()).willReturn(response);
769769
given(errorHandler.hasError(response)).willReturn(responseStatus.isError());
770770
given(response.getStatusCode()).willReturn(responseStatus);
771-
given(response.getRawStatusCode()).willReturn(responseStatus.value());
772771
given(response.getStatusText()).willReturn(responseStatus.getReasonPhrase());
773772
}
774773

spring-webflux/src/main/java/org/springframework/web/reactive/function/client/ClientHttpObservationDocumentation.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -132,20 +132,6 @@ public enum HighCardinalityKeyNames implements KeyName {
132132
public String asString() {
133133
return "http.url";
134134
}
135-
},
136-
137-
/**
138-
* Client name derived from the request URI host.
139-
* @deprecated in favor of {@link LowCardinalityKeyNames#CLIENT_NAME};
140-
* scheduled for removal in 6.2. This will be available both as a low and
141-
* high cardinality key value.
142-
*/
143-
@Deprecated(since = "6.0.5", forRemoval = true)
144-
CLIENT_NAME {
145-
@Override
146-
public String asString() {
147-
return "client.name";
148-
}
149135
}
150136

151137
}

0 commit comments

Comments
 (0)