-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Closed
Copy link
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: bugA general bugA general bug
Milestone
Description
Sven Zethelius opened SPR-14249 and commented
If the AsyncResult was created with AsyncResult.forExecutionException(Throwable), then you try to add callback with AsyncResult.addCallback(ListenableFutureCallback<? super V>), onSuccess(null) is called instead of onFailure(throwable).
@Override
public void addCallback(SuccessCallback<? super V> successCallback, FailureCallback failureCallback) {
try {
// This needs to check if this.executionException != null here and call onFailure instead
successCallback.onSuccess(this.value);
}
catch (Throwable ex) {
failureCallback.onFailure(ex);
}
}
Affects: 4.2.5
Issue Links:
- ListenableFutureAdapter.addCallback may or may not propagate failures from a FailureCallback in the calling thread [SPR-13785] #18358 ListenableFutureAdapter.addCallback may or may not propagate failures from a FailureCallback in the calling thread
- AsyncResult implementation does not allow for throwing ExecutionException [SPR-13076] #17668 AsyncResult implementation does not allow for throwing ExecutionException
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: bugA general bugA general bug