We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c9c5c0 commit a74d423Copy full SHA for a74d423
java/ql/src/Likely Bugs/Reflection/AnnotationPresentCheck.ql
@@ -19,9 +19,8 @@ where
19
m.getNumberOfParameters() = 1 and
20
c.getArgument(0).getType() = p and
21
p.getATypeArgument() = t and
22
- not exists(Annotation a |
+ not exists(RetentionAnnotation a |
23
t.getAnAnnotation() = a and
24
- a.getType().hasQualifiedName("java.lang.annotation", "Retention") and
25
a.getAValue().(VarAccess).getVariable().hasName("RUNTIME")
26
)
27
select c, "Call to isAnnotationPresent where no annotation has the RUNTIME retention policy."
0 commit comments