AnnotationUtils.isCandidateClass(Class<?> clazz, Class<? extends Annotation> annotationType) is being called from isCandidateClass(Class<?> clazz, Collection<Class<? extends Annotation>> annotationTypes) where the elements can potentially be null, for example in the case of incomplete InitDestroyAnnotationPostProcessor setup. The implementation should therefore defensively tolerate a null argument there and simply return false for it.