Skip to content

Commit 9374048

Browse files
committed
Java: Add further examples that are now supported.
1 parent 39ee1e2 commit 9374048

File tree

1 file changed

+14
-20
lines changed
  • java/ql/test/utils/model-generator/typebasedflow/p

1 file changed

+14
-20
lines changed

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

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -72,27 +72,23 @@ public void forEachOrdered(Consumer<? super T> action) {
7272
throw null;
7373
}
7474

75-
// Issue with model generator. Return value is not correctly identified as a
76-
// collection like type.
77-
// public static <T> Stream<T> generate(Supplier<T> s) {
78-
// throw null;
79-
// }
75+
public static <T> Stream<T> generate(Supplier<T> s) {
76+
throw null;
77+
}
8078

81-
// Issue with model generator. Return value is not correctly identified as a
82-
// collection like type.
83-
// public static <T> Stream<T> iterate(T seed, UnaryOperator<T> f) {
84-
// throw null;
85-
// }
79+
// Model generator adds a couple of extra models, which can't be
80+
// dismissed based on the type information.
81+
public static <T> Stream<T> iterate(T seed, UnaryOperator<T> f) {
82+
throw null;
83+
}
8684

8785
public Stream<T> limit(long maxSize) {
8886
throw null;
8987
}
9088

91-
// Issue with model generator. Return value is not correctly identified as a
92-
// collection like type and also the type parameter is not correctly identified.
93-
// public <R> Stream<R> map(Function<? super T, ? extends R> mapper) {
94-
// throw null;
95-
// }
89+
public <R> Stream<R> map(Function<? super T, ? extends R> mapper) {
90+
throw null;
91+
}
9692

9793
public DoubleStream mapToDouble(ToDoubleFunction<? super T> mapper) {
9894
throw null;
@@ -123,11 +119,9 @@ public boolean noneMatch(Predicate<? super T> predicate) {
123119
// throw null;
124120
// }
125121

126-
// Issue with model generator. Return value is not correctly identified as a
127-
// collection like type and also the type parameter is not correctly identified.
128-
// public static <T> Stream<T> of(T t) {
129-
// throw null;
130-
// }
122+
public static <T> Stream<T> of(T t) {
123+
throw null;
124+
}
131125

132126
public Stream<T> peek(Consumer<? super T> action) {
133127
throw null;

0 commit comments

Comments
 (0)