Skip to content

Commit 8cd3daa

Browse files
committed
Polishing
1 parent 75d751d commit 8cd3daa

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResult.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ public DeferredResult(Long timeoutValue) {
100100
* @param timeoutValue timeout value in milliseconds (ignored if {@code null})
101101
* @param timeoutResult the result to use
102102
*/
103-
public DeferredResult(@Nullable Long timeoutValue, final Object timeoutResult) {
104-
this.timeoutResult = () -> timeoutResult;
103+
public DeferredResult(@Nullable Long timeoutValue, Object timeoutResult) {
105104
this.timeoutValue = timeoutValue;
105+
this.timeoutResult = () -> timeoutResult;
106106
}
107107

108108
/**
@@ -113,8 +113,8 @@ public DeferredResult(@Nullable Long timeoutValue, final Object timeoutResult) {
113113
* @since 5.1.1
114114
*/
115115
public DeferredResult(@Nullable Long timeoutValue, Supplier<?> timeoutResult) {
116-
this.timeoutResult = timeoutResult;
117116
this.timeoutValue = timeoutValue;
117+
this.timeoutResult = timeoutResult;
118118
}
119119

120120

spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/AbstractSockJsService.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,12 @@
6868
*/
6969
public abstract class AbstractSockJsService implements SockJsService, CorsConfigurationSource {
7070

71+
private static final String XFRAME_OPTIONS_HEADER = "X-Frame-Options";
72+
7173
private static final long ONE_YEAR = TimeUnit.DAYS.toSeconds(365);
7274

73-
private static final Random random = new Random();
7475

75-
private static final String XFRAME_OPTIONS_HEADER = "X-Frame-Options";
76+
private static final Random random = new Random();
7677

7778
protected final Log logger = LogFactory.getLog(getClass());
7879

@@ -291,7 +292,7 @@ public void setSuppressCors(boolean suppressCors) {
291292
/**
292293
* Return if automatic addition of CORS headers has been disabled.
293294
* @since 4.1.2
294-
* @see #setSuppressCors(boolean)
295+
* @see #setSuppressCors
295296
*/
296297
public boolean shouldSuppressCors() {
297298
return this.suppressCors;

0 commit comments

Comments
 (0)