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
This commit is contained in:
Sam Brannen
2024-02-16 15:46:37 +01:00
parent 6d5bf6d9b3
commit a85bf3185e
12 changed files with 4 additions and 371 deletions

View File

@@ -1,39 +0,0 @@
/*
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.http.client;
import java.io.IOException;
import org.springframework.http.HttpStatusCode;
/**
* Abstract base for {@link ClientHttpResponse}.
*
* @author Arjen Poutsma
* @since 3.1.1
* @deprecated as of 6.0, with no direct replacement; scheduled for removal in 6.2
*/
@Deprecated(since = "6.0", forRemoval = true)
public abstract class AbstractClientHttpResponse implements ClientHttpResponse {
@Override
@SuppressWarnings("removal")
public HttpStatusCode getStatusCode() throws IOException {
return HttpStatusCode.valueOf(getRawStatusCode());
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,20 +42,6 @@ public interface ClientHttpResponse extends HttpInputMessage, Closeable {
*/
HttpStatusCode getStatusCode() throws IOException;
/**
* Get the HTTP status code as an integer.
* @return the HTTP status as an integer value
* @throws IOException in case of I/O errors
* @since 3.1.1
* @see #getStatusCode()
* @deprecated as of 6.0, in favor of {@link #getStatusCode()}; scheduled for
* removal in 6.2
*/
@Deprecated(since = "6.0", forRemoval = true)
default int getRawStatusCode() throws IOException {
return getStatusCode().value();
}
/**
* Get the HTTP status text of the response.
* @return the HTTP status text

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -135,20 +135,6 @@ public enum ClientHttpObservationDocumentation implements ObservationDocumentati
public String asString() {
return "http.url";
}
},
/**
* Client name derived from the request URI host.
* @deprecated in favor of {@link LowCardinalityKeyNames#CLIENT_NAME};
* scheduled for removal in 6.2. This will be available both as a low and
* high cardinality key value.
*/
@Deprecated(since = "6.0.5", forRemoval = true)
CLIENT_NAME {
@Override
public String asString() {
return "client.name";
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -64,19 +64,4 @@ public class ServerWebExchangeContextFilter implements WebFilter {
return contextView.getOrEmpty(EXCHANGE_CONTEXT_ATTRIBUTE);
}
/**
* Access the {@link ServerWebExchange} from a Reactor {@link Context},
* if available, which is generally the case when
* {@link ServerWebExchangeContextFilter} is present in the filter chain.
* @param context the context to get the exchange from
* @return an {@link Optional} with the exchange if found
* @deprecated in favor of using {@link #getExchange(ContextView)} which
* accepts a {@link ContextView} instead of {@link Context}, reflecting the
* fact that the {@code ContextView} is needed only for reading.
*/
@Deprecated(since = "6.0.6", forRemoval = true)
public static Optional<ServerWebExchange> get(Context context) {
return context.getOrEmpty(EXCHANGE_CONTEXT_ATTRIBUTE);
}
}