Assert preconditions for MergedAnnotations.from() factory methods #25568
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
If
null
values are supplied for theRepeatableContainers
orAnnotationFilter
arguments tofrom()
factory methods inMergedAnnotations
, certain operations will eventually result in aNullPointerException
.This is to be expected; however, the
NullPointerException
is often swallowed and only logged atINFO
level with an exception message similar to the following.In such cases, the
INFO
log message is not helpful in diagnosing the problem. Furthermore, since the exception is swallowed, the desired operation (e.g.,MergedAnnotations.stream(...)
) simply returns noresults, and the user is left wondering what happened.
The text was updated successfully, but these errors were encountered: