Better HostnameVerificationCall.isIgnored()

This commit is contained in:
Artem Smotrakov
2022-02-12 15:52:16 +00:00
parent 36e565d673
commit 48604cd7b3

View File

@@ -22,9 +22,9 @@ private class HostnameVerificationCall extends MethodAccess {
/** Holds if the result of the call is not used. */
predicate isIgnored() {
not exists(Expr expr, IfStmt ifStmt, MethodAccess ma |
this = [expr.getAChildExpr(), ifStmt.getCondition(), ma.getAnArgument()]
)
not exists(Expr expr | this = expr.getAChildExpr()) and
not exists(IfStmt ifStmt | this = ifStmt.getCondition()) and
this = any(ExprStmt es).getExpr()
}
}