Skip to content

Commit d06c822

Browse files
committed
Refactor for fear of bad optimization
1 parent 224e0c0 commit d06c822

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

java/ql/lib/semmle/code/java/dataflow/ListOfConstantsSanitizer.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,14 @@ module Collection {
160160
private predicate noUnsafeCalls(Expr e) {
161161
forall(MethodCall mc, int arg, Expr x |
162162
DataFlow::localExprFlow(x, e) and
163+
x != e and
163164
(
164165
arg = -1 and x = mc.getQualifier()
165166
or
166167
x = mc.getArgument(arg)
167168
)
168169
|
169-
x = e or arg = mc.(SafeCall).getArg()
170+
arg = mc.(SafeCall).getArg()
170171
)
171172
}
172173

0 commit comments

Comments
 (0)