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

Loading…
Cancel
Save