Skip to content

Commit

Permalink
Merge pull request #17824 from michaelnebel/java/maptoobj
Browse files Browse the repository at this point in the history
Java: Add manual models for `mapToObj`.
  • Loading branch information
michaelnebel authored Oct 23, 2024
2 parents 086e0c6 + caa0804 commit 779ee25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion java/ql/lib/ext/java.util.stream.model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ extensions:
- ["java.util.stream", "BaseStream", True, "sequential", "()", "", "Argument[this].Element", "ReturnValue.Element", "value", "manual"]
- ["java.util.stream", "BaseStream", True, "spliterator", "()", "", "Argument[this].Element", "ReturnValue.Element", "value", "manual"]
- ["java.util.stream", "BaseStream", True, "unordered", "()", "", "Argument[this].Element", "ReturnValue.Element", "value", "manual"]
- ["java.util.stream", "DoubleStream", True, "mapToObj", "(IntFunction)", "", "Argument[0].ReturnValue", "ReturnValue.Element", "value", "manual"]
- ["java.util.stream", "IntStream", True, "mapToObj", "(IntFunction)", "", "Argument[0].ReturnValue", "ReturnValue.Element", "value", "manual"]
- ["java.util.stream", "LongStream", True, "mapToObj", "(IntFunction)", "", "Argument[0].ReturnValue", "ReturnValue.Element", "value", "manual"]
- ["java.util.stream", "Stream", True, "allMatch", "(Predicate)", "", "Argument[this].Element", "Argument[0].Parameter[0]", "value", "manual"]
- ["java.util.stream", "Stream", True, "anyMatch", "(Predicate)", "", "Argument[this].Element", "Argument[0].Parameter[0]", "value", "manual"]
- ["java.util.stream", "Stream", True, "collect", "(Supplier,BiConsumer,BiConsumer)", "", "Argument[this].Element", "Argument[1].Parameter[1]", "value", "manual"]
Expand Down Expand Up @@ -101,5 +104,4 @@ extensions:

# The below APIs have numeric flow and are currently being stored as neutral models.
# These may be changed to summary models with kinds "value-numeric" and "taint-numeric" (or similar) in the future.
- ["java.util.stream", "IntStream", "mapToObj", "(IntFunction)", "summary", "manual"] # taint-numeric
- ["java.util.stream", "IntStream", "range", "(int,int)", "summary", "manual"] # taint-numeric
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
| java.util.function | 0 | 0 | 0 | 1 | 1 | 0.0 | 0.0 | 0.0 | NaN | NaN | 1.0 |
| java.util.logging | 0 | 0 | 1 | 1 | 2 | 0.5 | 0.0 | 0.5 | 0.0 | NaN | 0.5 |
| java.util.regex | 0 | 0 | 3 | 1 | 4 | 0.75 | 0.0 | 0.75 | 0.0 | NaN | 0.25 |
| java.util.stream | 0 | 0 | 18 | 8 | 26 | 0.6923076923076923 | 0.0 | 0.6923076923076923 | 0.0 | NaN | 0.3076923076923077 |
| java.util.stream | 0 | 0 | 19 | 7 | 26 | 0.7307692307692307 | 0.0 | 0.7307692307692307 | 0.0 | NaN | 0.2692307692307692 |

0 comments on commit 779ee25

Please sign in to comment.