Skip to content

Commit 73c7e15

Browse files
committed
Java: Add back StringInputStream to CloseReader.ql
1 parent 8969da7 commit 73c7e15

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

java/ql/src/Likely Bugs/Resource Leaks/CloseReader.ql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ predicate readerType(RefType t) {
2525
predicate safeReaderType(RefType t) {
2626
exists(RefType sup | sup = t.getASupertype*() |
2727
sup.hasQualifiedName("java.io", ["CharArrayReader", "StringReader", "ByteArrayInputStream"])
28+
or
29+
// Note: It is unclear which specific class this is supposed to match
30+
sup.hasName("StringInputStream")
2831
)
2932
}
3033

0 commit comments

Comments
 (0)