Replace !Optional.isPresent() with isEmpty() for readability.
Closes #3648
This commit is contained in:
committed by
Mark Paluch
parent
8c690555fc
commit
7461b1b3c5
@@ -139,7 +139,7 @@ public class QueryByExamplePredicateBuilder {
|
||||
Optional<Object> optionalValue = transformer
|
||||
.apply(Optional.ofNullable(beanWrapper.getPropertyValue(attribute.getName())));
|
||||
|
||||
if (!optionalValue.isPresent()) {
|
||||
if (optionalValue.isEmpty()) {
|
||||
|
||||
if (exampleAccessor.getNullHandler().equals(ExampleMatcher.NullHandler.INCLUDE)) {
|
||||
predicates.add(cb.isNull(from.get(attribute)));
|
||||
|
||||
Reference in New Issue
Block a user