Skip to content

Commit 24640c3

Browse files
committed
Java: Make a testcase for wrappers of sources.
1 parent 66fe0e7 commit 24640c3

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

java/ql/test/utils/model-generator/CaptureSourceModels.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
| p;Sources;true;socketStream;();;ReturnValue;remote |
33
| p;Sources;true;sourceToParameter;(InputStream[],List);;Argument[0].ArrayElement;remote |
44
| p;Sources;true;sourceToParameter;(InputStream[],List);;Argument[1].Element;remote |
5+
| p;Sources;true;wrappedSocketStream;();;ReturnValue;remote |

java/ql/test/utils/model-generator/p/Sources.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ public InputStream socketStream() throws IOException {
1919
return socket.accept().getInputStream();
2020
}
2121

22+
public InputStream wrappedSocketStream() throws IOException {
23+
return socketStream();
24+
}
25+
2226
public void sourceToParameter(InputStream[] streams, List<InputStream> otherStreams) throws IOException {
2327
ServerSocket socket = new ServerSocket(123);
2428
streams[0] = socket.accept().getInputStream();

0 commit comments

Comments
 (0)