From 512e9eacadb56bc7199c59781c0ae797eb481f45 Mon Sep 17 00:00:00 2001 From: Michael Wirth Date: Sat, 24 Jun 2017 01:08:38 +0200 Subject: [PATCH] =?UTF-8?q?DATAES-363=20-=20Fixed=20CrudRepository.existsB?= =?UTF-8?q?yId(=E2=80=A6)=20implementation.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Properly use Optional.isPresent() over a null check. Original pull request: #183. --- .../support/AbstractElasticsearchRepository.java | 3 ++- .../support/SimpleElasticsearchRepositoryTests.java | 13 +++++++++++++ .../support/UUIDElasticsearchRepositoryTests.java | 13 +++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/springframework/data/elasticsearch/repository/support/AbstractElasticsearchRepository.java b/src/main/java/org/springframework/data/elasticsearch/repository/support/AbstractElasticsearchRepository.java index 065d85f8e..92d0ae0c5 100644 --- a/src/main/java/org/springframework/data/elasticsearch/repository/support/AbstractElasticsearchRepository.java +++ b/src/main/java/org/springframework/data/elasticsearch/repository/support/AbstractElasticsearchRepository.java @@ -55,6 +55,7 @@ import org.springframework.util.Assert; * @author Kevin Leturc * @author Mark Paluch * @author Christoph Strobl + * @author Michael Wirth */ public abstract class AbstractElasticsearchRepository implements ElasticsearchRepository { @@ -188,7 +189,7 @@ public abstract class AbstractElasticsearchRepository