Skip to content

Commit f493a88

Browse files
committed
Fix improper null/emptiness check.
See #3170
1 parent 44d119b commit f493a88

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/springframework/data/util/NullableUtils.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import org.springframework.core.annotation.MergedAnnotations;
3838
import org.springframework.lang.NonNullApi;
3939
import org.springframework.util.ClassUtils;
40+
import org.springframework.util.CollectionUtils;
4041
import org.springframework.util.MultiValueMap;
4142

4243
/**
@@ -234,7 +235,7 @@ private static <T> boolean test(Annotation annotation, String metaAnnotationName
234235
MultiValueMap<String, @Nullable Object> attributes = AnnotatedElementUtils
235236
.getAllAnnotationAttributes(annotation.annotationType(), metaAnnotationName);
236237

237-
if (attributes.isEmpty()) {
238+
if (CollectionUtils.isEmpty(attributes)) {
238239
return false;
239240
}
240241

0 commit comments

Comments
 (0)