Browse Source
Prior to this commit, if null values were supplied for the RepeatableContainers or AnnotationFilter arguments to `from()` factory methods in MergedAnnotations, certain operations would eventually result in a NullPointerException. This is to be expected; however, the NullPointerException is often swallowed and only logged at INFO level with an exception message similar to the following. > Failed to introspect annotations on org.example.MyClass: NullPointerException 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 no results. This commit improves the user experience by eagerly asserting non-null preconditions for required arguments in MergedAnnotations.from() factory methods. Closes gh-25568pull/25798/head
2 changed files with 26 additions and 0 deletions
Loading…
Reference in new issue