fix annotation test for null marked inner classes (#11826)

This commit is contained in:
Yannick Lamprecht 2024-12-26 19:22:00 +01:00 committed by GitHub
parent a8f850a128
commit a14c06bbd8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -205,14 +205,16 @@ public class AnnotationTest {
// Paper start - skip class if it's @NullMarked
private static boolean isClassNullMarked(@NotNull ClassNode clazz, @NotNull Map<String, ClassNode> allClasses) {
if (isClassNullMarked0(clazz)) {
return true;
}
if (clazz.nestHostClass != null) {
final ClassNode nestHostNode = allClasses.get(clazz.nestHostClass);
if (nestHostNode != null) {
return isClassNullMarked0(nestHostNode);
return isClassNullMarked(nestHostNode, allClasses);
}
}
return isClassNullMarked0(clazz);
return false;
}
private static boolean isClassNullMarked0(@NotNull ClassNode clazz) {