Browse Source

Merge pull request #1467 from violetagg/deferred-result-handle-error

Polish - the flag continueProcessing is not needed
pull/1735/head
Juergen Hoeller 7 years ago committed by GitHub
parent
commit
b33d8c6ade
  1. 4
      spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResult.java

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

@ -292,14 +292,12 @@ public class DeferredResult<T> {
} }
@Override @Override
public <S> boolean handleError(NativeWebRequest request, DeferredResult<S> deferredResult, Throwable t) { public <S> boolean handleError(NativeWebRequest request, DeferredResult<S> deferredResult, Throwable t) {
boolean continueProcessing = true;
try { try {
if (errorCallback != null) { if (errorCallback != null) {
errorCallback.accept(t); errorCallback.accept(t);
} }
} }
finally { finally {
continueProcessing = false;
try { try {
setResultInternal(t); setResultInternal(t);
} }
@ -307,7 +305,7 @@ public class DeferredResult<T> {
logger.debug("Failed to handle error result", ex); logger.debug("Failed to handle error result", ex);
} }
} }
return continueProcessing; return false;
} }
@Override @Override
public <S> void afterCompletion(NativeWebRequest request, DeferredResult<S> deferredResult) { public <S> void afterCompletion(NativeWebRequest request, DeferredResult<S> deferredResult) {

Loading…
Cancel
Save