@@ -439,24 +439,27 @@ private Mono<Void> processCommit(TransactionSynchronizationManager synchronizati
439
439
return Mono .empty ();
440
440
})).then (Mono .empty ().onErrorResume (ex -> {
441
441
Mono <Object > propagateException = Mono .error (ex );
442
+ // Store result in a local variable in order to appease the
443
+ // Eclipse compiler with regard to inferred generics.
444
+ Mono <Object > result = propagateException ;
442
445
if (ErrorPredicates .UNEXPECTED_ROLLBACK .test (ex )) {
443
- return triggerAfterCompletion (synchronizationManager , status , TransactionSynchronization .STATUS_ROLLED_BACK ).then (propagateException );
446
+ result = triggerAfterCompletion (synchronizationManager , status , TransactionSynchronization .STATUS_ROLLED_BACK ).then (propagateException );
444
447
}
445
- if (ErrorPredicates .TRANSACTION_EXCEPTION .test (ex )) {
446
- return triggerAfterCompletion (synchronizationManager , status , TransactionSynchronization .STATUS_UNKNOWN ).then (propagateException );
448
+ else if (ErrorPredicates .TRANSACTION_EXCEPTION .test (ex )) {
449
+ result = triggerAfterCompletion (synchronizationManager , status , TransactionSynchronization .STATUS_UNKNOWN ).then (propagateException );
447
450
}
448
- if (ErrorPredicates .RUNTIME_OR_ERROR .test (ex )) {
451
+ else if (ErrorPredicates .RUNTIME_OR_ERROR .test (ex )) {
449
452
Mono <Void > mono ;
450
453
if (!beforeCompletionInvoked .get ()) {
451
454
mono = triggerBeforeCompletion (synchronizationManager , status );
452
455
}
453
456
else {
454
457
mono = Mono .empty ();
455
458
}
456
- return mono .then (doRollbackOnCommitException (synchronizationManager , status , ex )).then (propagateException );
459
+ result = mono .then (doRollbackOnCommitException (synchronizationManager , status , ex )).then (propagateException );
457
460
}
458
461
459
- return propagateException ;
462
+ return result ;
460
463
})).then (Mono .defer (() -> triggerAfterCommit (synchronizationManager , status ).onErrorResume (ex ->
461
464
triggerAfterCompletion (synchronizationManager , status , TransactionSynchronization .STATUS_COMMITTED ).then (Mono .error (ex )))
462
465
.then (triggerAfterCompletion (synchronizationManager , status , TransactionSynchronization .STATUS_COMMITTED ))));
0 commit comments