mirror of
https://github.com/github/codeql.git
synced 2026-02-12 13:11:20 +01:00
Java: Make loop classes extend LoopStmt and use getBody instead of getStmt.
This commit is contained in:
@@ -37,12 +37,12 @@ class EmptyLoop extends Stmt {
|
||||
exists(ForStmt stmt | stmt = this |
|
||||
not exists(stmt.getAnInit()) and
|
||||
not exists(stmt.getAnUpdate()) and
|
||||
stmt.getStmt() instanceof Empty
|
||||
stmt.getBody() instanceof Empty
|
||||
)
|
||||
or
|
||||
this.(WhileStmt).getStmt() instanceof Empty
|
||||
this.(WhileStmt).getBody() instanceof Empty
|
||||
or
|
||||
this.(DoStmt).getStmt() instanceof Empty
|
||||
this.(DoStmt).getBody() instanceof Empty
|
||||
}
|
||||
|
||||
Expr getCondition() {
|
||||
|
||||
Reference in New Issue
Block a user