Allow use of TYPE_USE annotations

This commit is contained in:
Riley Park 2021-06-21 09:55:17 -07:00
parent 88cd18de34
commit b7b70f682f
2 changed files with 38 additions and 9 deletions

View file

@ -3722,15 +3722,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
"Lorg/jetbrains/annotations/Nullable;",
"Lorg/jetbrains/annotations/NotNull;",
"Lorg/jetbrains/annotations/Contract;",
@@ -0,0 +0,0 @@ public class AnnotationTest {
continue;
}
- if (mustBeAnnotated(Type.getReturnType(method.desc)) && !isWellAnnotated(method.invisibleAnnotations)) {
+ if (mustBeAnnotated(Type.getReturnType(method.desc)) && !isWellAnnotated(method.invisibleAnnotations) && !isWellAnnotated(method.visibleTypeAnnotations)) { // Paper - also check visible type annotations
warn(errors, clazz, method, "return value");
}
@@ -0,0 +0,0 @@ public class AnnotationTest {
return true;
}