diff --git a/spring-context/src/test/java/org/springframework/cache/annotation/ReactiveCachingTests.java b/spring-context/src/test/java/org/springframework/cache/annotation/ReactiveCachingTests.java index 5c04f80a51..06130951af 100644 --- a/spring-context/src/test/java/org/springframework/cache/annotation/ReactiveCachingTests.java +++ b/spring-context/src/test/java/org/springframework/cache/annotation/ReactiveCachingTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2024 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. @@ -51,7 +51,9 @@ class ReactiveCachingTests { LateCacheHitDeterminationConfig.class, LateCacheHitDeterminationWithValueWrapperConfig.class}) void cacheHitDetermination(Class> configClass) { - AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(configClass, ReactiveCacheableService.class); + + AnnotationConfigApplicationContext ctx = + new AnnotationConfigApplicationContext(configClass, ReactiveCacheableService.class); ReactiveCacheableService service = ctx.getBean(ReactiveCacheableService.class); Object key = new Object(); @@ -117,7 +119,9 @@ class ReactiveCachingTests { LateCacheHitDeterminationConfig.class, LateCacheHitDeterminationWithValueWrapperConfig.class}) void fluxCacheDoesntDependOnFirstRequest(Class> configClass) { - AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(configClass, ReactiveCacheableService.class); + + AnnotationConfigApplicationContext ctx = + new AnnotationConfigApplicationContext(configClass, ReactiveCacheableService.class); ReactiveCacheableService service = ctx.getBean(ReactiveCacheableService.class); Object key = new Object(); @@ -135,6 +139,7 @@ class ReactiveCachingTests { ctx.close(); } + @CacheConfig(cacheNames = "first") static class ReactiveCacheableService { diff --git a/spring-web/src/main/java/org/springframework/http/client/JdkClientHttpRequestFactory.java b/spring-web/src/main/java/org/springframework/http/client/JdkClientHttpRequestFactory.java index 3d0d0c0819..6597048cb1 100644 --- a/spring-web/src/main/java/org/springframework/http/client/JdkClientHttpRequestFactory.java +++ b/spring-web/src/main/java/org/springframework/http/client/JdkClientHttpRequestFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2023-2023 the original author or authors. + * Copyright 2023-2024 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. @@ -28,8 +28,7 @@ import org.springframework.lang.Nullable; import org.springframework.util.Assert; /** - * {@link ClientHttpRequestFactory} implementation based on the Java - * {@link HttpClient}. + * {@link ClientHttpRequestFactory} implementation based on the Java {@link HttpClient}. * * @author Marten Deinum * @author Arjen Poutsma @@ -89,13 +88,11 @@ public class JdkClientHttpRequestFactory implements ClientHttpRequestFactory { } /** - * Set the underlying {@code HttpClient}'s read timeout as a - * {@code Duration}. + * Set the underlying {@code HttpClient}'s read timeout as a {@code Duration}. *
Default is the system's default timeout. * @see java.net.http.HttpRequest.Builder#timeout */ public void setReadTimeout(Duration readTimeout) { - Assert.notNull(readTimeout, "ReadTimeout must not be null"); this.readTimeout = readTimeout; }