Skip to content

Commit

Permalink
Remove APIs deprecated for removal in 6.2
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sbrannen committed Feb 16, 2024
1 parent 6d5bf6d commit a85bf31
Show file tree
Hide file tree
Showing 12 changed files with 4 additions and 371 deletions.

This file was deleted.

132 changes: 0 additions & 132 deletions spring-core/src/main/java/org/springframework/util/Base64Utils.java

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -135,20 +135,6 @@ public enum HighCardinalityKeyNames implements KeyName {
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";
}
}

}
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -64,19 +64,4 @@ public static Optional<ServerWebExchange> getExchange(ContextView contextView) {
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);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,6 @@ private void mockResponseStatus(HttpStatus responseStatus) throws Exception {
given(request.execute()).willReturn(response);
given(errorHandler.hasError(response)).willReturn(responseStatus.isError());
given(response.getStatusCode()).willReturn(responseStatus);
given(response.getRawStatusCode()).willReturn(responseStatus.value());
given(response.getStatusText()).willReturn(responseStatus.getReasonPhrase());
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -132,20 +132,6 @@ public enum HighCardinalityKeyNames implements KeyName {
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";
}
}

}
Expand Down
Loading

0 comments on commit a85bf31

Please sign in to comment.