Polishing

This commit is contained in:
Sam Brannen
2023-03-13 21:16:02 +01:00
parent 9cf7b0e230
commit b617e16d8d
10 changed files with 22 additions and 34 deletions

View File

@@ -80,7 +80,7 @@ public class DeferredResult<T> {
* Create a DeferredResult.
*/
public DeferredResult() {
this(null, () -> RESULT_NONE);
this(null);
}
/**
@@ -101,8 +101,7 @@ public class DeferredResult<T> {
* @param timeoutResult the result to use
*/
public DeferredResult(@Nullable Long timeoutValue, Object timeoutResult) {
this.timeoutValue = timeoutValue;
this.timeoutResult = () -> timeoutResult;
this(timeoutValue, () -> timeoutResult);
}
/**

View File

@@ -78,7 +78,7 @@ public interface DeferredResultProcessingInterceptor {
* timeout result.
* @param request the current request
* @param deferredResult the DeferredResult for the current request
* @param concurrentResult the result to which the {@code DeferredResult}
* @param concurrentResult the concurrent result
* @throws Exception in case of errors
*/
default <T> void postProcess(NativeWebRequest request, DeferredResult<T> deferredResult,