Skip to content

Commit e31b66d

Browse files
committed
refactor: replace !isPresent() with isEmpty() for readability
1 parent ae2aa63 commit e31b66d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-data-jpa/src/main/java/org/springframework/data/jpa/convert/QueryByExamplePredicateBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ static List<Predicate> getPredicates(String path, CriteriaBuilder cb, Path<?> fr
139139
Optional<Object> optionalValue = transformer
140140
.apply(Optional.ofNullable(beanWrapper.getPropertyValue(attribute.getName())));
141141

142-
if (!optionalValue.isPresent()) {
142+
if (optionalValue.isEmpty()) {
143143

144144
if (exampleAccessor.getNullHandler().equals(ExampleMatcher.NullHandler.INCLUDE)) {
145145
predicates.add(cb.isNull(from.get(attribute)));

0 commit comments

Comments
 (0)