Remove deprecated methods scheduled for removal in 6.2

See gh-33123
This commit is contained in:
Arjen Poutsma 2024-07-01 16:26:49 +02:00
parent 5864f57198
commit bd4823e3de
2 changed files with 2 additions and 33 deletions

View File

@ -135,17 +135,6 @@ public class ResourceHttpMessageWriter implements HttpMessageWriter<Resource> {
}));
}
/**
* Adds the default headers for the given resource to the given message.
* @since 6.0
* @deprecated since 6.1, in favor of {@link #addDefaultHeaders(ReactiveHttpOutputMessage, Resource, MediaType, Map)},
* for removal = 6.2
*/
@Deprecated(since = "6.1", forRemoval = true)
public void addHeaders(ReactiveHttpOutputMessage message, Resource resource, @Nullable MediaType contentType, Map<String, Object> hints) {
addDefaultHeaders(message, resource, contentType, hints).block();
}
/**
* Adds the default headers for the given resource to the given message.
* @since 6.1

View File

@ -16,7 +16,6 @@
package org.springframework.web.util;
import java.net.InetSocketAddress;
import java.net.URI;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
@ -265,7 +264,8 @@ public class UriComponentsBuilder implements UriBuilder, Cloneable {
* </pre>
* @param httpUrl the source URI
* @return the URI components of the URI
* @deprecated as of 6.2, in favor of {@link #fromUriString(String)}
* @deprecated as of 6.2, in favor of {@link #fromUriString(String)};
* scheduled for removal in 8.0.
*/
@Deprecated(since = "6.2")
public static UriComponentsBuilder fromHttpUrl(String httpUrl) throws InvalidUrlException {
@ -298,26 +298,6 @@ public class UriComponentsBuilder implements UriBuilder, Cloneable {
return ForwardedHeaderUtils.adaptFromForwardedHeaders(request.getURI(), request.getHeaders());
}
/**
* Parse the first "Forwarded: for=..." or "X-Forwarded-For" header value to
* an {@code InetSocketAddress} representing the address of the client.
* @param request a request with headers that may contain forwarded headers
* @param remoteAddress the current remoteAddress
* @return an {@code InetSocketAddress} with the extracted host and port, or
* {@code null} if the headers are not present.
* @since 5.3
* @deprecated in favor of {@link ForwardedHeaderUtils#parseForwardedFor};
* to be removed in 6.2
*/
@Deprecated(since = "6.1", forRemoval = true)
@Nullable
public static InetSocketAddress parseForwardedFor(
HttpRequest request, @Nullable InetSocketAddress remoteAddress) {
return ForwardedHeaderUtils.parseForwardedFor(
request.getURI(), request.getHeaders(), remoteAddress);
}
/**
* Create an instance by parsing the "Origin" header of an HTTP request.
* @see <a href="https://tools.ietf.org/html/rfc6454">RFC 6454</a>