From e27315201326ea692f0378e70e5034d3a074d5b7 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 26 Apr 2017 17:14:17 +0200 Subject: [PATCH] =?UTF-8?q?DATACOUCH-293=20-=20Adopt=20SimpleReactiveCouch?= =?UTF-8?q?baseRepository.findOne(=E2=80=A6)=20to=20Reactor=203.1.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adapt to API changes, missed this one in the previous change. Related ticket: spring-projects/spring-data-build#333 --- .../repository/support/SimpleReactiveCouchbaseRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/springframework/data/couchbase/repository/support/SimpleReactiveCouchbaseRepository.java b/src/main/java/org/springframework/data/couchbase/repository/support/SimpleReactiveCouchbaseRepository.java index 5bacc02c..d461e72b 100644 --- a/src/main/java/org/springframework/data/couchbase/repository/support/SimpleReactiveCouchbaseRepository.java +++ b/src/main/java/org/springframework/data/couchbase/repository/support/SimpleReactiveCouchbaseRepository.java @@ -119,7 +119,7 @@ public class SimpleReactiveCouchbaseRepository imple public Mono 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();