Skip to content

Commit 2451bd6

Browse files
committed
Polishing
1 parent 624d6dd commit 2451bd6

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

spring-context/src/test/java/org/springframework/cache/annotation/ReactiveCachingTests.java

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -51,7 +51,9 @@ class ReactiveCachingTests {
5151
LateCacheHitDeterminationConfig.class,
5252
LateCacheHitDeterminationWithValueWrapperConfig.class})
5353
void cacheHitDetermination(Class<?> configClass) {
54-
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(configClass, ReactiveCacheableService.class);
54+
55+
AnnotationConfigApplicationContext ctx =
56+
new AnnotationConfigApplicationContext(configClass, ReactiveCacheableService.class);
5557
ReactiveCacheableService service = ctx.getBean(ReactiveCacheableService.class);
5658

5759
Object key = new Object();
@@ -117,7 +119,9 @@ void cacheHitDetermination(Class<?> configClass) {
117119
LateCacheHitDeterminationConfig.class,
118120
LateCacheHitDeterminationWithValueWrapperConfig.class})
119121
void fluxCacheDoesntDependOnFirstRequest(Class<?> configClass) {
120-
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(configClass, ReactiveCacheableService.class);
122+
123+
AnnotationConfigApplicationContext ctx =
124+
new AnnotationConfigApplicationContext(configClass, ReactiveCacheableService.class);
121125
ReactiveCacheableService service = ctx.getBean(ReactiveCacheableService.class);
122126

123127
Object key = new Object();
@@ -135,6 +139,7 @@ void fluxCacheDoesntDependOnFirstRequest(Class<?> configClass) {
135139
ctx.close();
136140
}
137141

142+
138143
@CacheConfig(cacheNames = "first")
139144
static class ReactiveCacheableService {
140145

spring-web/src/main/java/org/springframework/http/client/JdkClientHttpRequestFactory.java

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2023 the original author or authors.
2+
* Copyright 2023-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,8 +28,7 @@
2828
import org.springframework.util.Assert;
2929

3030
/**
31-
* {@link ClientHttpRequestFactory} implementation based on the Java
32-
* {@link HttpClient}.
31+
* {@link ClientHttpRequestFactory} implementation based on the Java {@link HttpClient}.
3332
*
3433
* @author Marten Deinum
3534
* @author Arjen Poutsma
@@ -89,13 +88,11 @@ public void setReadTimeout(int readTimeout) {
8988
}
9089

9190
/**
92-
* Set the underlying {@code HttpClient}'s read timeout as a
93-
* {@code Duration}.
91+
* Set the underlying {@code HttpClient}'s read timeout as a {@code Duration}.
9492
* <p>Default is the system's default timeout.
9593
* @see java.net.http.HttpRequest.Builder#timeout
9694
*/
9795
public void setReadTimeout(Duration readTimeout) {
98-
Assert.notNull(readTimeout, "ReadTimeout must not be null");
9996
this.readTimeout = readTimeout;
10097
}
10198

0 commit comments

Comments
 (0)