diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java index 57792b2e6a..60fb8a3e5e 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java @@ -104,10 +104,10 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker * {@link Mono}/{@link Flux} will be specifically processed for asynchronous * caching of their produced values rather than trying to cache the returned * {@code Publisher} instances themselves. - *

Switch this flag to "true" in order to ignore Reactive Streams Publishers - * and process them as regular return values through synchronous caching, - * restoring 6.0 behavior. Note that this is not recommended and only works in - * very limited scenarios, e.g. with manual `Mono.cache()`/`Flux.cache()` calls. + *

Switch this flag to "true" in order to ignore Reactive Streams Publishers and + * process them as regular return values through synchronous caching, restoring 6.0 + * behavior. Note that this is not recommended and only works in very limited + * scenarios, e.g. with manual {@code Mono.cache()}/{@code Flux.cache()} calls. * @since 6.1.3 * @see org.reactivestreams.Publisher */ diff --git a/spring-web/src/test/java/org/springframework/http/client/SimpleClientHttpRequestFactoryTests.java b/spring-web/src/test/java/org/springframework/http/client/SimpleClientHttpRequestFactoryTests.java index 36ca6ca323..00984e7bff 100644 --- a/spring-web/src/test/java/org/springframework/http/client/SimpleClientHttpRequestFactoryTests.java +++ b/spring-web/src/test/java/org/springframework/http/client/SimpleClientHttpRequestFactoryTests.java @@ -105,13 +105,15 @@ public class SimpleClientHttpRequestFactoryTests extends AbstractHttpRequestFact } } - @Test // SPR-13225 + @Test // SPR-13225 public void headerWithNullValue() { HttpURLConnection urlConnection = mock(); given(urlConnection.getRequestMethod()).willReturn("GET"); + HttpHeaders headers = new HttpHeaders(); headers.set("foo", null); SimpleClientHttpRequest.addHeaders(urlConnection, headers); + verify(urlConnection, times(1)).addRequestProperty("foo", ""); }