We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d62639d commit 28fc1e4Copy full SHA for 28fc1e4
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/query/AggregationUtils.java
@@ -39,6 +39,7 @@
39
import org.springframework.expression.spel.standard.SpelExpressionParser;
40
import org.springframework.lang.Nullable;
41
import org.springframework.util.ClassUtils;
42
+import org.springframework.util.ObjectUtils;
43
import org.springframework.util.StringUtils;
44
45
/**
@@ -198,7 +199,7 @@ static void appendLimitAndOffsetIfPresent(List<AggregationOperation> aggregation
198
199
@Nullable
200
static <T> T extractSimpleTypeResult(@Nullable Document source, Class<T> targetType, MongoConverter converter) {
201
- if (source == null || source.isEmpty()) {
202
+ if (ObjectUtils.isEmpty(source)) {
203
return null;
204
}
205
0 commit comments