Skip to content

Commit 779ee25

Browse files
authored
Merge pull request github#17824 from michaelnebel/java/maptoobj
Java: Add manual models for `mapToObj`.
2 parents 086e0c6 + caa0804 commit 779ee25

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ extensions:
99
- ["java.util.stream", "BaseStream", True, "sequential", "()", "", "Argument[this].Element", "ReturnValue.Element", "value", "manual"]
1010
- ["java.util.stream", "BaseStream", True, "spliterator", "()", "", "Argument[this].Element", "ReturnValue.Element", "value", "manual"]
1111
- ["java.util.stream", "BaseStream", True, "unordered", "()", "", "Argument[this].Element", "ReturnValue.Element", "value", "manual"]
12+
- ["java.util.stream", "DoubleStream", True, "mapToObj", "(IntFunction)", "", "Argument[0].ReturnValue", "ReturnValue.Element", "value", "manual"]
13+
- ["java.util.stream", "IntStream", True, "mapToObj", "(IntFunction)", "", "Argument[0].ReturnValue", "ReturnValue.Element", "value", "manual"]
14+
- ["java.util.stream", "LongStream", True, "mapToObj", "(IntFunction)", "", "Argument[0].ReturnValue", "ReturnValue.Element", "value", "manual"]
1215
- ["java.util.stream", "Stream", True, "allMatch", "(Predicate)", "", "Argument[this].Element", "Argument[0].Parameter[0]", "value", "manual"]
1316
- ["java.util.stream", "Stream", True, "anyMatch", "(Predicate)", "", "Argument[this].Element", "Argument[0].Parameter[0]", "value", "manual"]
1417
- ["java.util.stream", "Stream", True, "collect", "(Supplier,BiConsumer,BiConsumer)", "", "Argument[this].Element", "Argument[1].Parameter[1]", "value", "manual"]
@@ -101,5 +104,4 @@ extensions:
101104

102105
# The below APIs have numeric flow and are currently being stored as neutral models.
103106
# These may be changed to summary models with kinds "value-numeric" and "taint-numeric" (or similar) in the future.
104-
- ["java.util.stream", "IntStream", "mapToObj", "(IntFunction)", "summary", "manual"] # taint-numeric
105107
- ["java.util.stream", "IntStream", "range", "(int,int)", "summary", "manual"] # taint-numeric

java/ql/test/query-tests/Metrics/GeneratedVsManualCoverage/TopJdkApisTest/TopJdkApisTest.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@
2020
| java.util.function | 0 | 0 | 0 | 1 | 1 | 0.0 | 0.0 | 0.0 | NaN | NaN | 1.0 |
2121
| java.util.logging | 0 | 0 | 1 | 1 | 2 | 0.5 | 0.0 | 0.5 | 0.0 | NaN | 0.5 |
2222
| java.util.regex | 0 | 0 | 3 | 1 | 4 | 0.75 | 0.0 | 0.75 | 0.0 | NaN | 0.25 |
23-
| java.util.stream | 0 | 0 | 18 | 8 | 26 | 0.6923076923076923 | 0.0 | 0.6923076923076923 | 0.0 | NaN | 0.3076923076923077 |
23+
| java.util.stream | 0 | 0 | 19 | 7 | 26 | 0.7307692307692307 | 0.0 | 0.7307692307692307 | 0.0 | NaN | 0.2692307692307692 |

0 commit comments

Comments
 (0)