Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix annotation test for null marked inner classes #11826

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions paper-api/src/test/java/org/bukkit/AnnotationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,16 @@ private static void collectClasses(@NotNull File from, @NotNull Map<String, Clas

// 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) {
Expand Down
Loading