DATAKV-186 - SimpleKeyValueRepository.existsById(…) now evaluates findById(…) results properly.
ExistsById now evaluates Optional.isPresent() instead of comparing findById result to null. Original Pull Request: #24
This commit is contained in:
committed by
Christoph Strobl
parent
256bb16dba
commit
c5e0d1a26c
@@ -132,7 +132,7 @@ public class SimpleKeyValueRepository<T, ID extends Serializable> implements Key
|
||||
*/
|
||||
@Override
|
||||
public boolean existsById(ID id) {
|
||||
return findById(id) != null;
|
||||
return findById(id).isPresent();
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user