Replace !Optional.isPresent() with isEmpty() for readability.

Closes #3648
This commit is contained in:
jeonghyeon00
2024-10-22 22:27:16 +09:00
committed by Mark Paluch
parent 8c690555fc
commit 7461b1b3c5

View File

@@ -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)));