DATACOUCH-293 - Adopt SimpleReactiveCouchbaseRepository.findOne(…) to Reactor 3.1.

Adapt to API changes, missed this one in the previous change.

Related ticket: spring-projects/spring-data-build#333
This commit is contained in:
Mark Paluch
2017-04-26 17:14:17 +02:00
parent 19f7597dc0
commit e273152013

View File

@@ -119,7 +119,7 @@ public class SimpleReactiveCouchbaseRepository<T, ID extends Serializable> imple
public Mono<T> findOne(ID id) {
Assert.notNull(id, "The given id must not be null!");
return mapMono(operations.findById(id.toString(), entityInformation.getJavaType()).toSingle())
.otherwise(throwable -> {
.onErrorResume(throwable -> {
//reactive streams adapter doesn't work with null
if(throwable instanceof NullPointerException) {
return Mono.empty();