Avoid deprecated usingWhen method in Reactor 3.3

Closes gh-23562
This commit is contained in:
Juergen Hoeller 2019-09-20 21:54:18 +02:00
parent 393a81d4a9
commit a48c13ae73
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ final class TransactionalOperatorImpl implements TransactionalOperator {
// Need re-wrapping of ReactiveTransaction until we get hold of the exception
// through usingWhen.
return status.flatMap(it -> Mono.usingWhen(Mono.just(it), ignore -> mono,
this.transactionManager::commit, s -> Mono.empty())
this.transactionManager::commit, (res, err) -> Mono.empty(), s -> Mono.empty())
.onErrorResume(ex -> rollbackOnException(it, ex).then(Mono.error(ex))));
})
.subscriberContext(TransactionContextManager.getOrCreateContext())