Skip to content

Commit 10f6329

Browse files
committed
Add manual neutral models for java.util.stream
See comment in java/ql/src/Metrics/Summaries/TopJdkApis.qll * Note: the following top JDK APIs are not modeled with MaD: * `java.util.stream.Collectors#joining(CharSequence)`: cannot be modeled completely without a model for `java.util.stream.Stream#collect(Collector)` as well * `java.util.stream.Collectors#toMap(Function,Function)`: specialized collectors flow * `java.util.stream.Stream#collect(Collector)`: handled separately on a case-by-case basis as it is too complex for MaD
1 parent f907fd2 commit 10f6329

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

java/ql/lib/ext/java.util.stream.model.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,11 @@ extensions:
9292
pack: codeql/java-all
9393
extensible: neutralModel
9494
data:
95+
- ["java.util.stream", "Collectors", "joining", "", "summary", "manual"] # cannot be modeled completely without a model for `java.util.stream.Stream#collect(Collector)` as well
9596
- ["java.util.stream", "Collectors", "toList", "()", "summary", "manual"]
97+
- ["java.util.stream", "Collectors", "toMap", "", "summary", "manual"] # specialized collectors flow
9698
- ["java.util.stream", "Collectors", "toSet", "()", "summary", "manual"]
99+
- ["java.util.stream", "Stream", "collect", "(Collector)", "summary", "manual"] # handled separately on a case-by-case basis as it is too complex for MaD
97100
- ["java.util.stream", "Stream", "count", "()", "summary", "manual"]
98101

99102
# The below APIs have numeric flow and are currently being stored as neutral models.

0 commit comments

Comments
 (0)