Java: update extraction query tests after merging PR #13747

This commit is contained in:
Stephan Brandauer
2023-07-24 17:05:28 +02:00
parent 50603102d1
commit 37b6b46dbf
3 changed files with 4 additions and 5 deletions

View File

@@ -303,7 +303,7 @@ module SharedCharacteristics<CandidateSig Candidate> {
* analyzed.
*/
private class IsSanitizerCharacteristic extends NotASinkCharacteristic {
IsSanitizerCharacteristic() { this = "external" }
IsSanitizerCharacteristic() { this = "known sanitizer" }
override predicate appliesToEndpoint(Candidate::Endpoint e) { Candidate::isSanitizer(e, _) }
}

View File

@@ -12,8 +12,7 @@ class AutomodelApplicationModeExtractCandidates {
public static void main(String[] args) throws Exception {
AtomicReference<String> reference = new AtomicReference<>(); // uninteresting (parameterless constructor)
reference.set(args[0]); // arg[0] is not a candidate (modeled as value flow step)
// ^^^^^^ Argument[this] is a candidate (should no longer be, once a recent PR
// is merged)
// ^^^^^^ Argument[this] is a candidate
}
public static void callSupplier(Supplier<String> supplier) {

View File

@@ -1,2 +1,2 @@
| Test.java:7:10:7:19 | ByteBuffer | class qualifier\nrelated locations: $@.\nmetadata: $@, $@, $@, $@, $@, $@. | Test.java:7:10:8:19 | allocate(...) | CallContext | file://java.nio:1:1:1:1 | java.nio | package | file://ByteBuffer:1:1:1:1 | ByteBuffer | type | file://false:1:1:1:1 | false | subtypes | file://allocate:1:1:1:1 | allocate | name | file://(int):1:1:1:1 | (int) | signature | file://Argument[this]:1:1:1:1 | Argument[this] | input |
| Test.java:8:15:8:18 | size | external\nrelated locations: $@.\nmetadata: $@, $@, $@, $@, $@, $@. | Test.java:7:10:8:19 | allocate(...) | CallContext | file://java.nio:1:1:1:1 | java.nio | package | file://ByteBuffer:1:1:1:1 | ByteBuffer | type | file://false:1:1:1:1 | false | subtypes | file://allocate:1:1:1:1 | allocate | name | file://(int):1:1:1:1 | (int) | signature | file://Argument[0]:1:1:1:1 | Argument[0] | input |
| Test.java:8:15:8:18 | size | known non-sink\nrelated locations: $@.\nmetadata: $@, $@, $@, $@, $@, $@. | Test.java:7:10:8:19 | allocate(...) | CallContext | file://java.nio:1:1:1:1 | java.nio | package | file://ByteBuffer:1:1:1:1 | ByteBuffer | type | file://false:1:1:1:1 | false | subtypes | file://allocate:1:1:1:1 | allocate | name | file://(int):1:1:1:1 | (int) | signature | file://Argument[0]:1:1:1:1 | Argument[0] | input |
| Test.java:8:15:8:18 | size | known sanitizer\nrelated locations: $@.\nmetadata: $@, $@, $@, $@, $@, $@. | Test.java:7:10:8:19 | allocate(...) | CallContext | file://java.nio:1:1:1:1 | java.nio | package | file://ByteBuffer:1:1:1:1 | ByteBuffer | type | file://false:1:1:1:1 | false | subtypes | file://allocate:1:1:1:1 | allocate | name | file://(int):1:1:1:1 | (int) | signature | file://Argument[0]:1:1:1:1 | Argument[0] | input |