diff --git a/substratevm/src/com.oracle.svm.reflect/src/com/oracle/svm/reflect/hosted/ReflectionDataBuilder.java b/substratevm/src/com.oracle.svm.reflect/src/com/oracle/svm/reflect/hosted/ReflectionDataBuilder.java index 386096c667d3..59560be09d81 100644 --- a/substratevm/src/com.oracle.svm.reflect/src/com/oracle/svm/reflect/hosted/ReflectionDataBuilder.java +++ b/substratevm/src/com.oracle.svm.reflect/src/com/oracle/svm/reflect/hosted/ReflectionDataBuilder.java @@ -608,6 +608,9 @@ private void registerTypesForAnnotationDefault(DuringAnalysisAccessImpl access, } private static boolean includeAnnotation(DuringAnalysisAccessImpl access, AnnotationValue annotationValue) { + if (annotationValue == null) { + return false; + } for (Class type : annotationValue.getTypes()) { if (type == null || SubstitutionReflectivityFilter.shouldExclude(type, access.getMetaAccess(), access.getUniverse())) { return false;