diff --git a/spring-core/src/main/java/org/springframework/util/ReflectionUtils.java b/spring-core/src/main/java/org/springframework/util/ReflectionUtils.java index e00fef835c..8cd1b54202 100644 --- a/spring-core/src/main/java/org/springframework/util/ReflectionUtils.java +++ b/spring-core/src/main/java/org/springframework/util/ReflectionUtils.java @@ -831,9 +831,11 @@ public abstract class ReflectionUtils { *
If this filter does not match, the next filter will not be applied. * @param next the next {@code MethodFilter} * @return a composite {@code MethodFilter} + * @throws IllegalArgumentException if method's argument is {@code null} * @since 5.3.2 */ default MethodFilter and(MethodFilter next) { + Assert.notNull(next, "Next MethodFilter must not be null!"); return method -> matches(method) && next.matches(method); } }