Skip to content

Commit ac064ac

Browse files
Jami CogswellJami Cogswell
authored andcommitted
Java: remove model for Collectors.joining
1 parent 181a711 commit ac064ac

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ extensions:
99
- ["java.util.stream", "BaseStream", True, "sequential", "()", "", "Argument[-1].Element", "ReturnValue.Element", "value", "manual"]
1010
- ["java.util.stream", "BaseStream", True, "spliterator", "()", "", "Argument[-1].Element", "ReturnValue.Element", "value", "manual"]
1111
- ["java.util.stream", "BaseStream", True, "unordered", "()", "", "Argument[-1].Element", "ReturnValue.Element", "value", "manual"]
12-
- ["java.util.stream", "Collectors", False, "joining", "(CharSequence)", "", "Argument[0]", "ReturnValue", "taint", "manual"]
1312
- ["java.util.stream", "Stream", True, "allMatch", "(Predicate)", "", "Argument[-1].Element", "Argument[0].Parameter[0]", "value", "manual"]
1413
- ["java.util.stream", "Stream", True, "anyMatch", "(Predicate)", "", "Argument[-1].Element", "Argument[0].Parameter[0]", "value", "manual"]
1514
- ["java.util.stream", "Stream", True, "collect", "(Supplier,BiConsumer,BiConsumer)", "", "Argument[-1].Element", "Argument[1].Parameter[1]", "value", "manual"]

java/ql/test/ext/TestModels/Test.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,6 @@ public void test() throws Exception {
129129
AtomicReference ar = new AtomicReference(source());
130130
sink(ar.get()); // $hasValueFlow
131131

132-
// java.util.stream
133-
sink(Collectors.joining((CharSequence)source())); // $hasTaintFlow
134-
135132
// java.util.concurrent
136133
CountDownLatch cdl = new CountDownLatch((int)source());
137134
sink(cdl.getCount()); // $hasValueFlow

java/ql/test/ext/TopJdkApis/TopJdkApis.qll

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

151152
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
| java.lang.String#valueOf(Object) | no manual model |
22
| java.lang.Throwable#printStackTrace() | no manual model |
3+
| java.util.stream.Collectors#joining(CharSequence) | no manual model |
34
| java.util.stream.Stream#collect(Collector) | no manual model |

0 commit comments

Comments
 (0)