mirror of
https://github.com/github/codeql.git
synced 2026-04-26 01:05:15 +02:00
Java: Rename ReturnStmt.getResult to getExpr.
This commit is contained in:
@@ -41,7 +41,7 @@ private class VulnerableJHipsterRandomUtilMethod extends Method {
|
||||
this.getReturnType() instanceof TypeString and
|
||||
exists(ReturnStmt s |
|
||||
s = this.getBody().(SingletonBlock).getStmt() and
|
||||
s.getResult() instanceof PredictableApacheRandomStringUtilsMethodCall
|
||||
s.getExpr() instanceof PredictableApacheRandomStringUtilsMethodCall
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ predicate probablyNeverEscapes(LocalVariableDecl v) {
|
||||
// Not assigned directly to another variable.
|
||||
not exists(Assignment a | a.getSource() = v.getAnAccess()) and
|
||||
// Not returned.
|
||||
not exists(ReturnStmt r | r.getResult() = v.getAnAccess()) and
|
||||
not exists(ReturnStmt r | r.getExpr() = v.getAnAccess()) and
|
||||
// All assignments are to new instances of a class.
|
||||
forex(Expr e | e = v.getAnAssignedValue() | e instanceof ClassInstanceExpr)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user