Skip to content

Commit 6348f5c

Browse files
zakkakloicottet
authored andcommitted
Avoid NPEs in includeAnnotation when annotationValue is null
Fixes issue introduced by #4614
1 parent f33384d commit 6348f5c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

substratevm/src/com.oracle.svm.reflect/src/com/oracle/svm/reflect/hosted/ReflectionDataBuilder.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,9 @@ private void registerTypesForAnnotationDefault(DuringAnalysisAccessImpl access,
608608
}
609609

610610
private static boolean includeAnnotation(DuringAnalysisAccessImpl access, AnnotationValue annotationValue) {
611+
if (annotationValue == null) {
612+
return false;
613+
}
611614
for (Class<?> type : annotationValue.getTypes()) {
612615
if (type == null || SubstitutionReflectivityFilter.shouldExclude(type, access.getMetaAccess(), access.getUniverse())) {
613616
return false;

0 commit comments

Comments
 (0)