DATAMONGO-2356 - Move off deprecated Flux/Mono.usingWhen to their replacement overrides.

This commit is contained in:
Mark Paluch
2019-09-04 09:37:59 +02:00
parent e67bacf66c
commit c23c5ae6c6
2 changed files with 3 additions and 2 deletions

View File

@@ -573,7 +573,8 @@ public class ReactiveMongoTemplate implements ReactiveMongoOperations, Applicati
return Flux.usingWhen(Mono.just(session), //
s -> ReactiveMongoTemplate.this.withSession(action, s), //
ClientSession::commitTransaction, //
ClientSession::abortTransaction) //
(sess, err) -> sess.abortTransaction(), //
ClientSession::commitTransaction) //
.doFinally(signalType -> doFinally.accept(session));
});
}

View File

@@ -68,7 +68,7 @@ class DataBufferPublisherAdapter {
state.request(sink, n);
});
});
}, AsyncInputStream::close, AsyncInputStream::close, AsyncInputStream::close) //
}, AsyncInputStream::close, (it, err) -> it.close(), AsyncInputStream::close) //
.concatMap(Flux::just, 1);
}