Update java/ql/src/Likely Bugs/Resource Leaks/CloseType.qll

Co-authored-by: Chris Smowton <smowton@github.com>
This commit is contained in:
Ian Lynagh
2021-10-18 10:12:01 +01:00
committed by GitHub
parent e485a16993
commit 54d2028920

View File

@@ -228,7 +228,7 @@ private predicate closeCalled(Variable v) {
)
or
// The "close" call could happen indirectly inside a helper method of unknown name.
exists(int i | v.getAnAccess().isNthChildOf(e, i) |
exists(int i | e.getArgument(i) = v.getAnAccess() |
exists(Parameter p, int j | p.getPosition() = j and p.getCallable() = e.getMethod() |
closeCalled(p) and i = j
or