Skip to content

Commit 37b051a

Browse files
Apply suggestions from code review
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
1 parent 548721a commit 37b051a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/ql/lib/semmle/code/java/frameworks/MyBatis.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class MyBatisInjectionSink extends DataFlow::Node {
125125
a.getType() instanceof MyBatisProvider and
126126
m.getDeclaringType() = a.getValue(["type", "value"]).(TypeLiteral).getTypeName().getType() and
127127
m.hasName(a.getValue("method").(StringLiteral).getValue()) and
128-
this.getEnclosingCallable() = m.getBody().getAStmt().(ReturnStmt).getEnclosingCallable()
128+
exists(ReturnStmt ret | this.asExpr() = ret.getResult() and ret.getEnclosingCallable() = m)
129129
)
130130
}
131131
}

0 commit comments

Comments
 (0)