Skip to content

Commit bd4823e

Browse files
committed
Remove deprecated methods scheduled for removal in 6.2
See gh-33123
1 parent 5864f57 commit bd4823e

File tree

2 files changed

+2
-33
lines changed

2 files changed

+2
-33
lines changed

spring-web/src/main/java/org/springframework/http/codec/ResourceHttpMessageWriter.java

-11
Original file line numberDiff line numberDiff line change
@@ -135,17 +135,6 @@ private Mono<Void> writeResource(Resource resource, ResolvableType type, @Nullab
135135
}));
136136
}
137137

138-
/**
139-
* Adds the default headers for the given resource to the given message.
140-
* @since 6.0
141-
* @deprecated since 6.1, in favor of {@link #addDefaultHeaders(ReactiveHttpOutputMessage, Resource, MediaType, Map)},
142-
* for removal = 6.2
143-
*/
144-
@Deprecated(since = "6.1", forRemoval = true)
145-
public void addHeaders(ReactiveHttpOutputMessage message, Resource resource, @Nullable MediaType contentType, Map<String, Object> hints) {
146-
addDefaultHeaders(message, resource, contentType, hints).block();
147-
}
148-
149138
/**
150139
* Adds the default headers for the given resource to the given message.
151140
* @since 6.1

spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java

+2-22
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package org.springframework.web.util;
1818

19-
import java.net.InetSocketAddress;
2019
import java.net.URI;
2120
import java.nio.charset.Charset;
2221
import java.nio.charset.StandardCharsets;
@@ -265,7 +264,8 @@ public static UriComponentsBuilder fromUriString(String uri) throws InvalidUrlEx
265264
* </pre>
266265
* @param httpUrl the source URI
267266
* @return the URI components of the URI
268-
* @deprecated as of 6.2, in favor of {@link #fromUriString(String)}
267+
* @deprecated as of 6.2, in favor of {@link #fromUriString(String)};
268+
* scheduled for removal in 8.0.
269269
*/
270270
@Deprecated(since = "6.2")
271271
public static UriComponentsBuilder fromHttpUrl(String httpUrl) throws InvalidUrlException {
@@ -298,26 +298,6 @@ public static UriComponentsBuilder fromHttpRequest(HttpRequest request) {
298298
return ForwardedHeaderUtils.adaptFromForwardedHeaders(request.getURI(), request.getHeaders());
299299
}
300300

301-
/**
302-
* Parse the first "Forwarded: for=..." or "X-Forwarded-For" header value to
303-
* an {@code InetSocketAddress} representing the address of the client.
304-
* @param request a request with headers that may contain forwarded headers
305-
* @param remoteAddress the current remoteAddress
306-
* @return an {@code InetSocketAddress} with the extracted host and port, or
307-
* {@code null} if the headers are not present.
308-
* @since 5.3
309-
* @deprecated in favor of {@link ForwardedHeaderUtils#parseForwardedFor};
310-
* to be removed in 6.2
311-
*/
312-
@Deprecated(since = "6.1", forRemoval = true)
313-
@Nullable
314-
public static InetSocketAddress parseForwardedFor(
315-
HttpRequest request, @Nullable InetSocketAddress remoteAddress) {
316-
317-
return ForwardedHeaderUtils.parseForwardedFor(
318-
request.getURI(), request.getHeaders(), remoteAddress);
319-
}
320-
321301
/**
322302
* Create an instance by parsing the "Origin" header of an HTTP request.
323303
* @see <a href="https://tools.ietf.org/html/rfc6454">RFC 6454</a>

0 commit comments

Comments
 (0)