Polishing

This commit is contained in:
Juergen Hoeller 2023-12-22 13:06:29 +01:00
parent 5caf714ff4
commit 232225b2aa
2 changed files with 7 additions and 5 deletions

View File

@ -104,10 +104,10 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
* {@link Mono}/{@link Flux} will be specifically processed for asynchronous * {@link Mono}/{@link Flux} will be specifically processed for asynchronous
* caching of their produced values rather than trying to cache the returned * caching of their produced values rather than trying to cache the returned
* {@code Publisher} instances themselves. * {@code Publisher} instances themselves.
* <p>Switch this flag to "true" in order to ignore Reactive Streams Publishers * <p>Switch this flag to "true" in order to ignore Reactive Streams Publishers and
* and process them as regular return values through synchronous caching, * process them as regular return values through synchronous caching, restoring 6.0
* restoring 6.0 behavior. Note that this is not recommended and only works in * behavior. Note that this is not recommended and only works in very limited
* very limited scenarios, e.g. with manual `Mono.cache()`/`Flux.cache()` calls. * scenarios, e.g. with manual {@code Mono.cache()}/{@code Flux.cache()} calls.
* @since 6.1.3 * @since 6.1.3
* @see org.reactivestreams.Publisher * @see org.reactivestreams.Publisher
*/ */

View File

@ -105,13 +105,15 @@ public class SimpleClientHttpRequestFactoryTests extends AbstractHttpRequestFact
} }
} }
@Test // SPR-13225 @Test // SPR-13225
public void headerWithNullValue() { public void headerWithNullValue() {
HttpURLConnection urlConnection = mock(); HttpURLConnection urlConnection = mock();
given(urlConnection.getRequestMethod()).willReturn("GET"); given(urlConnection.getRequestMethod()).willReturn("GET");
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
headers.set("foo", null); headers.set("foo", null);
SimpleClientHttpRequest.addHeaders(urlConnection, headers); SimpleClientHttpRequest.addHeaders(urlConnection, headers);
verify(urlConnection, times(1)).addRequestProperty("foo", ""); verify(urlConnection, times(1)).addRequestProperty("foo", "");
} }