mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
PatternAnnotation.getString() should only be field reads
This commit is contained in:
@@ -182,7 +182,7 @@ class PatternAnnotation extends Annotation, RegexExecutionExpr::Range {
|
|||||||
|
|
||||||
override Expr getString() {
|
override Expr getString() {
|
||||||
// Annotation on field accessed by direct read - value of field will match regexp
|
// Annotation on field accessed by direct read - value of field will match regexp
|
||||||
result = this.getAnnotatedElement().(Field).getAnAccess()
|
result.(FieldRead).getField() = this.getAnnotatedElement()
|
||||||
or
|
or
|
||||||
// Annotation on field accessed by getter - value of field will match regexp
|
// Annotation on field accessed by getter - value of field will match regexp
|
||||||
result.(MethodCall).getMethod().(GetterMethod).getField() = this.getAnnotatedElement()
|
result.(MethodCall).getMethod().(GetterMethod).getField() = this.getAnnotatedElement()
|
||||||
|
|||||||
Reference in New Issue
Block a user