From a14c06bbd8d8c5e2ec4b93f05eafe37a46791e8f Mon Sep 17 00:00:00 2001 From: Yannick Lamprecht <1420893+yannicklamprecht@users.noreply.github.com> Date: Thu, 26 Dec 2024 19:22:00 +0100 Subject: [PATCH] fix annotation test for null marked inner classes (#11826) --- paper-api/src/test/java/org/bukkit/AnnotationTest.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/paper-api/src/test/java/org/bukkit/AnnotationTest.java b/paper-api/src/test/java/org/bukkit/AnnotationTest.java index 5b0d26c68f..37feafd626 100644 --- a/paper-api/src/test/java/org/bukkit/AnnotationTest.java +++ b/paper-api/src/test/java/org/bukkit/AnnotationTest.java @@ -205,14 +205,16 @@ public class AnnotationTest { // Paper start - skip class if it's @NullMarked private static boolean isClassNullMarked(@NotNull ClassNode clazz, @NotNull Map 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) {