Skip to content

Commit cc5a404

Browse files
committed
Add more test cases
1 parent 226103b commit cc5a404

File tree

1 file changed

+18
-1
lines changed
  • java/ql/test/library-tests/dataflow/stream-read

1 file changed

+18
-1
lines changed

java/ql/test/library-tests/dataflow/stream-read/A.java

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,24 @@ public static void testWrapCall() {
103103
sink(wrapStream(source())); // $ hasTaintFlow
104104
}
105105

106-
public static void testLocalClass() {
106+
public static void testLocal() {
107+
108+
class LocalInputStream extends InputStream {
109+
@Override
110+
public int read() throws IOException {
111+
return 0;
112+
}
113+
114+
@Override
115+
public int read(byte[] b) throws IOException {
116+
InputStream in = source();
117+
return in.read(b);
118+
}
119+
}
120+
sink(new LocalInputStream()); // $ hasTaintFlow
121+
}
122+
123+
public static void testLocalVarCapture() {
107124
InputStream in = source();
108125

109126
class LocalInputStream extends InputStream {

0 commit comments

Comments
 (0)