Java: remove model for Collectors.joining

This commit is contained in:
Jami Cogswell
2023-01-11 10:30:49 -05:00
parent 181a711f04
commit ac064ac2a7
4 changed files with 5 additions and 7 deletions

View File

@@ -9,7 +9,6 @@ extensions:
- ["java.util.stream", "BaseStream", True, "sequential", "()", "", "Argument[-1].Element", "ReturnValue.Element", "value", "manual"]
- ["java.util.stream", "BaseStream", True, "spliterator", "()", "", "Argument[-1].Element", "ReturnValue.Element", "value", "manual"]
- ["java.util.stream", "BaseStream", True, "unordered", "()", "", "Argument[-1].Element", "ReturnValue.Element", "value", "manual"]
- ["java.util.stream", "Collectors", False, "joining", "(CharSequence)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["java.util.stream", "Stream", True, "allMatch", "(Predicate)", "", "Argument[-1].Element", "Argument[0].Parameter[0]", "value", "manual"]
- ["java.util.stream", "Stream", True, "anyMatch", "(Predicate)", "", "Argument[-1].Element", "Argument[0].Parameter[0]", "value", "manual"]
- ["java.util.stream", "Stream", True, "collect", "(Supplier,BiConsumer,BiConsumer)", "", "Argument[-1].Element", "Argument[1].Parameter[1]", "value", "manual"]

View File

@@ -129,9 +129,6 @@ public class Test {
AtomicReference ar = new AtomicReference(source());
sink(ar.get()); // $hasValueFlow
// java.util.stream
sink(Collectors.joining((CharSequence)source())); // $hasTaintFlow
// java.util.concurrent
CountDownLatch cdl = new CountDownLatch((int)source());
sink(cdl.getCount()); // $hasValueFlow

View File

@@ -143,9 +143,10 @@ class TopJdkApi extends SummarizedCallableBase {
predicate hasManualMadModel() { this.hasManualSummary() or this.hasManualNeutral() }
/*
* Note: the following top-100 APIs are not modeled with MaD:
* java.util.stream.Stream#collect(Collector) : handled separately on a case-by-case basis as it is too complex for MaD
* java.lang.String#valueOf(Object) : also a complex case; an alias for `Object.toString`, except the dispatch is hidden
* java.lang.Throwable#printStackTrace() : should probably not be a general step, but there might be specialised queries that care
* `java.util.stream.Stream#collect(Collector)`: handled separately on a case-by-case basis as it is too complex for MaD
* `java.util.stream.Collectors#joining(CharSequence)`: cannot be modeled completely without a model for `java.util.stream.Stream#collect(Collector)` as well
* `java.lang.String#valueOf(Object)`: also a complex case; an alias for `Object.toString`, except the dispatch is hidden
* `java.lang.Throwable#printStackTrace()`: should probably not be a general step, but there might be specialised queries that care
*/
}

View File

@@ -1,3 +1,4 @@
| java.lang.String#valueOf(Object) | no manual model |
| java.lang.Throwable#printStackTrace() | no manual model |
| java.util.stream.Collectors#joining(CharSequence) | no manual model |
| java.util.stream.Stream#collect(Collector) | no manual model |