Skip to content

Commit 26ffe6c

Browse files
author
Benjamin Muskalla
committed
Add tests for telemetry queries
1 parent 6287e6d commit 26ffe6c

File tree

7 files changed

+34
-0
lines changed

7 files changed

+34
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
| java.time;?;Duration;ofMillis;(long) | 1 |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Telemetry/ExternalAPIUsages.ql
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import java.time.Duration;
2+
import java.util.ArrayList;
3+
import java.util.HashMap;
4+
import java.util.List;
5+
import java.util.Map;
6+
7+
class ExternalApiUsage {
8+
public static void main(String[] args) {
9+
List<?> foo = new ArrayList(); // already supported
10+
Map<String, Object> map = new HashMap<>();
11+
map.put("foo", new Object());
12+
13+
Duration d = java.time.Duration.ofMillis(1000); // not supported
14+
15+
long l = "foo".length(); // not interesting
16+
17+
System.out.println(d);
18+
System.out.println(map);
19+
System.out.println(foo);
20+
}
21+
}
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rt.jar | 3 |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Telemetry/ExternalLibraryUsage.ql
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import java.util.List;
2+
import java.util.ArrayList;
3+
4+
class ExternalLibraryUsage {
5+
public static void main(String[] args) {
6+
List<?> foo = new ArrayList(); // Java Runtime
7+
System.out.println(foo);
8+
}
9+
}

0 commit comments

Comments
 (0)