Skip to content

Commit 077721b

Browse files
committed
Remove outdated notes on forwarded headers.
Closes gh-34625
1 parent b7654dd commit 077721b

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilder.java

-35
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,6 @@ public static MvcUriComponentsBuilder relativeTo(UriComponentsBuilder baseUrl) {
151151
* Create a {@link UriComponentsBuilder} from the mapping of a controller class
152152
* and current request information including Servlet mapping. If the controller
153153
* contains multiple mappings, only the first one is used.
154-
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
155-
* and "X-Forwarded-*" headers if found. See class-level docs.
156154
* @param controllerType the controller to build a URI for
157155
* @return a UriComponentsBuilder instance (never {@code null})
158156
*/
@@ -165,8 +163,6 @@ public static UriComponentsBuilder fromController(Class<?> controllerType) {
165163
* {@code UriComponentsBuilder} representing the base URL. This is useful
166164
* when using MvcUriComponentsBuilder outside the context of processing a
167165
* request or to apply a custom baseUrl not matching the current request.
168-
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
169-
* and "X-Forwarded-*" headers if found. See class-level docs.
170166
* @param builder the builder for the base URL; the builder will be cloned
171167
* and therefore not modified and may be re-used for further calls.
172168
* @param controllerType the controller to build a URI for
@@ -192,8 +188,6 @@ public static UriComponentsBuilder fromController(@Nullable UriComponentsBuilder
192188
* Create a {@link UriComponentsBuilder} from the mapping of a controller
193189
* method and an array of method argument values. This method delegates
194190
* to {@link #fromMethod(Class, Method, Object...)}.
195-
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
196-
* and "X-Forwarded-*" headers if found. See class-level docs.
197191
* @param controllerType the controller
198192
* @param methodName the method name
199193
* @param args the argument values
@@ -213,8 +207,6 @@ public static UriComponentsBuilder fromMethodName(Class<?> controllerType,
213207
* accepts a {@code UriComponentsBuilder} representing the base URL. This is
214208
* useful when using MvcUriComponentsBuilder outside the context of processing
215209
* a request or to apply a custom baseUrl not matching the current request.
216-
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
217-
* and "X-Forwarded-*" headers if found. See class-level docs.
218210
* @param builder the builder for the base URL; the builder will be cloned
219211
* and therefore not modified and may be re-used for further calls.
220212
* @param controllerType the controller
@@ -239,8 +231,6 @@ public static UriComponentsBuilder fromMethodName(UriComponentsBuilder builder,
239231
* {@link org.springframework.web.method.support.UriComponentsContributor
240232
* UriComponentsContributor}) while remaining argument values are ignored and
241233
* can be {@code null}.
242-
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
243-
* and "X-Forwarded-*" headers if found. See class-level docs.
244234
* @param controllerType the controller type
245235
* @param method the controller method
246236
* @param args argument values for the controller method
@@ -257,8 +247,6 @@ public static UriComponentsBuilder fromMethod(Class<?> controllerType, Method me
257247
* This is useful when using MvcUriComponentsBuilder outside the context of
258248
* processing a request or to apply a custom baseUrl not matching the
259249
* current request.
260-
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
261-
* and "X-Forwarded-*" headers if found. See class-level docs.
262250
* @param baseUrl the builder for the base URL; the builder will be cloned
263251
* and therefore not modified and may be re-used for further calls.
264252
* @param controllerType the controller type
@@ -305,8 +293,6 @@ public static UriComponentsBuilder fromMethod(UriComponentsBuilder baseUrl,
305293
* controller.getAddressesForCountry("US")
306294
* builder = MvcUriComponentsBuilder.fromMethodCall(controller);
307295
* </pre>
308-
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
309-
* and "X-Forwarded-*" headers if found. See class-level docs.
310296
* @param info either the value returned from a "mock" controller
311297
* invocation or the "mock" controller itself after an invocation
312298
* @return a UriComponents instance
@@ -327,8 +313,6 @@ public static UriComponentsBuilder fromMethodCall(Object info) {
327313
* {@code UriComponentsBuilder} representing the base URL. This is useful
328314
* when using MvcUriComponentsBuilder outside the context of processing a
329315
* request or to apply a custom baseUrl not matching the current request.
330-
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
331-
* and "X-Forwarded-*" headers if found. See class-level docs.
332316
* @param builder the builder for the base URL; the builder will be cloned
333317
* and therefore not modified and may be re-used for further calls.
334318
* @param info either the value returned from a "mock" controller
@@ -354,8 +338,6 @@ public static UriComponentsBuilder fromMethodCall(UriComponentsBuilder builder,
354338
* <pre class="code">
355339
* MvcUriComponentsBuilder.fromMethodCall(on(FooController.class).getFoo(1)).build();
356340
* </pre>
357-
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
358-
* and "X-Forwarded-*" headers if found. See class-level docs.
359341
* @param controllerType the target controller
360342
*/
361343
public static <T> T on(Class<T> controllerType) {
@@ -378,8 +360,6 @@ public static <T> T on(Class<T> controllerType) {
378360
* fooController.saveFoo(2, null);
379361
* builder = MvcUriComponentsBuilder.fromMethodCall(fooController);
380362
* </pre>
381-
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
382-
* and "X-Forwarded-*" headers if found. See class-level docs.
383363
* @param controllerType the target controller
384364
*/
385365
public static <T> T controller(Class<T> controllerType) {
@@ -422,9 +402,6 @@ public static <T> T controller(Class<T> controllerType) {
422402
* </pre>
423403
* <p>Note that it's not necessary to specify all arguments. Only the ones
424404
* required to prepare the URL, mainly {@code @RequestParam} and {@code @PathVariable}).
425-
*
426-
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
427-
* and "X-Forwarded-*" headers if found. See class-level docs.
428405
* @param mappingName the mapping name
429406
* @return a builder to prepare the URI String
430407
* @throws IllegalArgumentException if the mapping name is not found or
@@ -440,8 +417,6 @@ public static MethodArgumentBuilder fromMappingName(String mappingName) {
440417
* {@code UriComponentsBuilder} representing the base URL. This is useful
441418
* when using MvcUriComponentsBuilder outside the context of processing a
442419
* request or to apply a custom baseUrl not matching the current request.
443-
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
444-
* and "X-Forwarded-*" headers if found. See class-level docs.
445420
* @param builder the builder for the base URL; the builder will be cloned
446421
* and therefore not modified and may be re-used for further calls.
447422
* @param name the mapping name
@@ -481,8 +456,6 @@ else if (handlerMethods.size() != 1) {
481456
/**
482457
* An alternative to {@link #fromController(Class)} for use with an instance
483458
* of this class created via a call to {@link #relativeTo}.
484-
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
485-
* and "X-Forwarded-*" headers if found. See class-level docs.
486459
* @since 4.2
487460
*/
488461
public UriComponentsBuilder withController(Class<?> controllerType) {
@@ -492,8 +465,6 @@ public UriComponentsBuilder withController(Class<?> controllerType) {
492465
/**
493466
* An alternative to {@link #fromMethodName(Class, String, Object...)}} for
494467
* use with an instance of this class created via {@link #relativeTo}.
495-
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
496-
* and "X-Forwarded-*" headers if found. See class-level docs.
497468
* @since 4.2
498469
*/
499470
public UriComponentsBuilder withMethodName(Class<?> controllerType, String methodName, Object... args) {
@@ -503,8 +474,6 @@ public UriComponentsBuilder withMethodName(Class<?> controllerType, String metho
503474
/**
504475
* An alternative to {@link #fromMethodCall(Object)} for use with an instance
505476
* of this class created via {@link #relativeTo}.
506-
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
507-
* and "X-Forwarded-*" headers if found. See class-level docs.
508477
* @since 4.2
509478
*/
510479
public UriComponentsBuilder withMethodCall(Object invocationInfo) {
@@ -514,8 +483,6 @@ public UriComponentsBuilder withMethodCall(Object invocationInfo) {
514483
/**
515484
* An alternative to {@link #fromMappingName(String)} for use with an instance
516485
* of this class created via {@link #relativeTo}.
517-
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
518-
* and "X-Forwarded-*" headers if found. See class-level docs.
519486
* @since 4.2
520487
*/
521488
public MethodArgumentBuilder withMappingName(String mappingName) {
@@ -525,8 +492,6 @@ public MethodArgumentBuilder withMappingName(String mappingName) {
525492
/**
526493
* An alternative to {@link #fromMethod(Class, Method, Object...)}
527494
* for use with an instance of this class created via {@link #relativeTo}.
528-
* <p><strong>Note:</strong> This method extracts values from "Forwarded"
529-
* and "X-Forwarded-*" headers if found. See class-level docs.
530495
* @since 4.2
531496
*/
532497
public UriComponentsBuilder withMethod(Class<?> controllerType, Method method, Object... args) {

0 commit comments

Comments
 (0)