Closed
Description
yan.zhang opened SPR-14978 and commented
!bug.jpg|thumbnail!
It looks like a concurrency bug.
"this.resultHandler.handleResult(this.result);" may be executed twice.
I think it shoule be:
private boolean setResultInternal(Object result) {
synchronized (this) {
if (isSetOrExpired()) {
return false;
}
this.result = result;
if (this.resultHandler != null) {
this.resultHandler.handleResult(this.result);
}
}
return true;
}
Affects: 3.2.17, 4.2.8, 4.3.4, 5.0 M3
Attachments:
Issue Links:
- Deadlocks with DeferredResult timeout handling on Tomcat [SPR-10485] #15118 Deadlocks with DeferredResult timeout handling on Tomcat
- DeferredResult not thread-safe for isSetOrExpired call [SPR-13451] #18031 DeferredResult not thread-safe for isSetOrExpired call