Skip to content

Commit 4cb82ad

Browse files
committed
Java: Explicit import of needed classes from stream and some improvements to comments.
1 parent 62603dd commit 4cb82ad

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

java/ql/test/utils/model-generator/typebasedflow/p/Stream.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@
22

33
import java.util.*;
44
import java.util.function.*;
5-
import java.util.stream.*;
6-
5+
import java.util.stream.LongStream;
6+
import java.util.stream.IntStream;
7+
import java.util.stream.DoubleStream;
8+
import java.util.stream.Collector;
9+
10+
/**
11+
* This is a stub implementation of the Java Stream API.
12+
*/
713
public class Stream<T> {
814

915
// MaD=p;Stream;true;iterator;();;Argument[-1].Element;ReturnValue.Element;value;generated

java/ql/test/utils/model-generator/typebasedflow/p/TypeBasedComplex.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ public Integer apply(Function<T, Integer> f) {
1919
return null;
2020
}
2121

22+
// A method that doesn't mention `T` in its type signature.
23+
// This is for testing that we don't generate a summary that involves the
24+
// implicit field for `T`.
2225
// MaD=p;TypeBasedComplex;true;apply2;(Object,Function);;Argument[0];Argument[1].Parameter[0];value;generated
2326
// MaD=p;TypeBasedComplex;true;apply2;(Object,Function);;Argument[1].ReturnValue;ReturnValue;value;generated
2427
public <T1, T2> T2 apply2(T1 x, Function<T1, T2> f) {

0 commit comments

Comments
 (0)