Skip to content

Commit e4f680d

Browse files
authored
Merge pull request #15778 from smowton/smowton/admin/test-multi-release-jars
Java: Add tests for multi-release jars under Java 11 and 17
2 parents 48fcec8 + 2321eec commit e4f680d

File tree

14 files changed

+106
-0
lines changed

14 files changed

+106
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
| Annotation processors enabled: true | 1 |
2+
| Number of calls with call target | 1 |
3+
| Number of calls with missing call target | 0 |
4+
| Number of expressions with known type | 1 |
5+
| Number of expressions with unknown type | 0 |
6+
| Number of files | 543 |
7+
| Number of files with extension class | 538 |
8+
| Number of files with extension jar | 1 |
9+
| Number of files with extension java | 2 |
10+
| Number of files with extension properties | 1 |
11+
| Number of lines of code | 7 |
12+
| Number of lines of code with extension java | 7 |
13+
| Percentage of calls with call target | 100 |
14+
| Percentage of expressions with known type | 100 |
15+
| Total number of lines | 12 |
16+
| Total number of lines with extension java | 12 |
17+
| Used annotation processor: lombok.launch.AnnotationProcessorHider$AnnotationProcessor | 1 |
18+
| Used annotation processor: lombok.launch.AnnotationProcessorHider$ClaimingProcessor | 1 |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Telemetry/ExtractorInformation.ql
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package mod1pkg;
2+
3+
public class Mod1Class { }
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module moduleone {
2+
3+
exports mod1pkg;
4+
5+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import mod1pkg.Mod1Class;
2+
3+
public class User {
4+
5+
private Mod1Class m1c;
6+
7+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module moduletwo {
2+
3+
requires moduleone;
4+
5+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import sys
2+
3+
from create_database_utils import *
4+
import subprocess
5+
import os
6+
7+
try_use_java11()
8+
9+
os.mkdir("mod1obj")
10+
os.mkdir("mod2obj")
11+
12+
subprocess.check_call(["javac", "mod1/module-info.java", "mod1/mod1pkg/Mod1Class.java", "-d", "mod1obj"])
13+
subprocess.check_call(["jar", "-c", "-f", "mod1.jar", "-C", "mod1obj", "mod1pkg/Mod1Class.class", "--release", "9", "-C", "mod1obj", "module-info.class"])
14+
15+
run_codeql_database_create(["javac mod2/mod2pkg/User.java mod2/module-info.java -d mod2obj -p mod1.jar"], lang="java")
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
| Annotation processors enabled: true | 1 |
2+
| Number of calls with call target | 1 |
3+
| Number of calls with missing call target | 0 |
4+
| Number of expressions with known type | 1 |
5+
| Number of expressions with unknown type | 0 |
6+
| Number of files | 610 |
7+
| Number of files with extension class | 605 |
8+
| Number of files with extension jar | 1 |
9+
| Number of files with extension java | 2 |
10+
| Number of files with extension properties | 1 |
11+
| Number of lines of code | 7 |
12+
| Number of lines of code with extension java | 7 |
13+
| Percentage of calls with call target | 100 |
14+
| Percentage of expressions with known type | 100 |
15+
| Total number of lines | 12 |
16+
| Total number of lines with extension java | 12 |
17+
| Used annotation processor: lombok.launch.AnnotationProcessorHider$AnnotationProcessor | 1 |
18+
| Used annotation processor: lombok.launch.AnnotationProcessorHider$ClaimingProcessor | 1 |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Telemetry/ExtractorInformation.ql
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package mod1pkg;
2+
3+
public class Mod1Class { }

0 commit comments

Comments
 (0)