Skip to content

Commit ac4176f

Browse files
jeonghyeon00mp911de
authored andcommitted
Replace !Optional.isPresent() with isEmpty() for readability.
Closes #3648
1 parent abbbc69 commit ac4176f

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)