From 7d7d7bccedcb71f228c094244f7c54361b347809 Mon Sep 17 00:00:00 2001 From: galingerv <33348397+galingerv@users.noreply.github.com> Date: Thu, 25 May 2023 11:15:47 +0300 Subject: [PATCH 1/2] Fix typos in Javadoc for ExchangeFilterFunction Closes gh-30543 --- .../web/reactive/function/client/ExchangeFilterFunction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/ExchangeFilterFunction.java b/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/ExchangeFilterFunction.java index 7203b38e9a..a030767615 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/ExchangeFilterFunction.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/ExchangeFilterFunction.java @@ -37,7 +37,7 @@ public interface ExchangeFilterFunction { * Apply this filter to the given request and exchange function. *

The given {@linkplain ExchangeFunction} represents the next entity * in the chain, to be invoked via - * {@linkplain ExchangeFunction#exchange(ClientRequest) invoked} in order to + * {@linkplain ExchangeFunction#exchange(ClientRequest) exchange} in order to * proceed with the exchange, or not invoked to shortcut the chain. * *

Note: When a filter handles the response after the From cfb3a45479d75c03ec82667f4a01b96f40cf920a Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Thu, 25 May 2023 13:47:37 +0200 Subject: [PATCH 2/2] Improve Javadoc for ExchangeFilterFunction See gh-30543 --- .../client/ExchangeFilterFunction.java | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/ExchangeFilterFunction.java b/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/ExchangeFilterFunction.java index a030767615..b10af0d165 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/ExchangeFilterFunction.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/function/client/ExchangeFilterFunction.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * 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. @@ -24,6 +24,7 @@ import org.springframework.util.Assert; /** * Represents a function that filters an {@linkplain ExchangeFunction exchange function}. + * *

The filter is executed when a {@code Subscriber} subscribes to the * {@code Publisher} returned by the {@code WebClient}. * @@ -35,15 +36,13 @@ public interface ExchangeFilterFunction { /** * Apply this filter to the given request and exchange function. - *

The given {@linkplain ExchangeFunction} represents the next entity - * in the chain, to be invoked via - * {@linkplain ExchangeFunction#exchange(ClientRequest) exchange} in order to - * proceed with the exchange, or not invoked to shortcut the chain. - * + *

The given {@link ExchangeFunction} represents the next entity in the + * chain, to be invoked via {@link ExchangeFunction#exchange} in order to + * proceed with the exchange, or not invoked to short-circuit the chain. *

Note: When a filter handles the response after the - * call to {@link ExchangeFunction#exchange}, extra care must be taken to - * always consume its content or otherwise propagate it downstream for - * further handling, for example by the {@link WebClient}. Please, see the + * call to {@code ExchangeFunction.exchange(...)}, extra care must be taken + * to always consume its content or otherwise propagate it downstream for + * further handling, for example by the {@link WebClient}. Please see the * reference documentation for more details on this. * @param request the current request * @param next the next exchange function in the chain @@ -52,8 +51,8 @@ public interface ExchangeFilterFunction { Mono filter(ClientRequest request, ExchangeFunction next); /** - * Return a composed filter function that first applies this filter, and - * then applies the given {@code "after"} filter. + * Return a composed filter function that first applies this filter and + * then applies the given {@code afterFilter}. * @param afterFilter the filter to apply after this filter * @return the composed filter */