Skip to content

Commit 0e3db78

Browse files
atorralbaigfoo
authored andcommitted
Make GeneratedFileMarker an instance of JavadocElement
1 parent 4f256d2 commit 0e3db78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/ql/lib/semmle/code/java/GeneratedFiles.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ library class MarkerCommentGeneratedFile extends GeneratedFile {
5151
/**
5252
* A marker comment that indicates that it is in a generated file.
5353
*/
54-
private class GeneratedFileMarker extends Top {
54+
private class GeneratedFileMarker extends Top instanceof JavadocElement {
5555
GeneratedFileMarker() {
56-
exists(string msg | msg = this.(JavadocElement).getText() |
56+
exists(string msg | msg = this.getText() |
5757
msg.regexpMatch("(?i).*\\bGenerated By\\b.*\\bDo not edit\\b.*") or
5858
msg.regexpMatch("(?i).*\\bThis (file|class|interface|art[ei]fact) (was|is|(has been)) (?:auto[ -]?)?gener(e?)ated.*") or
5959
msg.regexpMatch("(?i).*\\bAny modifications to this file will be lost\\b.*") or

0 commit comments

Comments
 (0)