3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-21 14:00:11 +01:00
Paper/patches/api/0177-Ignore-package-private-methods-for-nullability-annot.patch

21 Zeilen
1.2 KiB
Diff

2021-06-11 14:02:28 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 24 Mar 2019 18:44:26 -0400
Subject: [PATCH] Ignore package-private methods for nullability annotations
This isn't API
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
2021-06-21 18:55:17 +02:00
index dfd4174c8dca51600c2203e3f4c933507fb827e7..1c6a41644257cd35ced235af6cc60efc925ebc18 100644
2021-06-11 14:02:28 +02:00
--- a/src/test/java/org/bukkit/AnnotationTest.java
+++ b/src/test/java/org/bukkit/AnnotationTest.java
2021-06-21 18:55:17 +02:00
@@ -179,7 +179,7 @@ public class AnnotationTest {
2021-06-11 14:02:28 +02:00
private static boolean isMethodIncluded(@NotNull ClassNode clazz, @NotNull MethodNode method, @NotNull Map<String, ClassNode> allClasses) {
// Exclude private, synthetic and deprecated methods
- if ((method.access & (Opcodes.ACC_PRIVATE | Opcodes.ACC_SYNTHETIC | Opcodes.ACC_DEPRECATED)) != 0) {
+ if ((method.access & (Opcodes.ACC_PRIVATE | Opcodes.ACC_SYNTHETIC | Opcodes.ACC_DEPRECATED)) != 0 || (method.access & (Opcodes.ACC_PRIVATE | Opcodes.ACC_PROTECTED | Opcodes.ACC_PUBLIC)) == 0) { // Paper - ignore package-private
return false;
}