Browse Source

Polishing.

Use ObjectUtils for empty check.

See #3623
Original pull request: #3625.
pull/3632/head
Mark Paluch 5 years ago
parent
commit
a2a33390b6
No known key found for this signature in database
GPG Key ID: 4406B84C1661DCD1
  1. 3
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/query/AggregationUtils.java

3
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/query/AggregationUtils.java

@ -33,6 +33,7 @@ import org.springframework.data.repository.query.QueryMethodEvaluationContextPro @@ -33,6 +33,7 @@ import org.springframework.data.repository.query.QueryMethodEvaluationContextPro
import org.springframework.expression.ExpressionParser;
import org.springframework.lang.Nullable;
import org.springframework.util.ClassUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
/**
@ -165,7 +166,7 @@ abstract class AggregationUtils { @@ -165,7 +166,7 @@ abstract class AggregationUtils {
@Nullable
static <T> T extractSimpleTypeResult(@Nullable Document source, Class<T> targetType, MongoConverter converter) {
if (source == null || source.isEmpty()) {
if (ObjectUtils.isEmpty(source)) {
return null;
}

Loading…
Cancel
Save