Skip to content

AsyncResult calls SuccessCallback when it should call FailureCallback [SPR-14249] #18822

@spring-projects-issues

Description

@spring-projects-issues

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:

Referenced from: commits 1b1aac9, 5fc0d43

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions