Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3de0044

Browse files
committed
Review feeback for OpenStream
1 parent 5e62a6b commit 3de0044

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

java/ql/src/experimental/Security/CWE/CWE-036/OpenStream.ql

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@ class URLConstructor extends ClassInstanceExpr {
1616

1717
Expr stringArg() {
1818
// Query only in URL's that were constructed by calling the single parameter string constructor.
19-
if
20-
this.getConstructor().getNumberOfParameters() = 1 and
21-
this.getConstructor().getParameter(0).getType().getName() = "String"
22-
then result = this.getArgument(0)
23-
else none()
19+
this.getConstructor().getNumberOfParameters() = 1 and
20+
this.getConstructor().getParameter(0).getType() instanceof TypeString
21+
and result = this.getArgument(0)
2422
}
2523
}
2624

0 commit comments

Comments
 (0)