mirror of
https://github.com/github/codeql.git
synced 2026-02-23 18:33:42 +01: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() {
|
||||
// Annotation on field accessed by direct read - value of field will match regexp
|
||||
result = this.getAnnotatedElement().(Field).getAnAccess()
|
||||
result.(FieldRead).getField() = this.getAnnotatedElement()
|
||||
or
|
||||
// Annotation on field accessed by getter - value of field will match regexp
|
||||
result.(MethodCall).getMethod().(GetterMethod).getField() = this.getAnnotatedElement()
|
||||
|
||||
Reference in New Issue
Block a user