mirror of
https://github.com/github/codeql.git
synced 2026-01-17 08:24:46 +01:00
Merge pull request #15778 from smowton/smowton/admin/test-multi-release-jars
Java: Add tests for multi-release jars under Java 11 and 17
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
| Annotation processors enabled: true | 1 |
|
||||
| Number of calls with call target | 1 |
|
||||
| Number of calls with missing call target | 0 |
|
||||
| Number of expressions with known type | 1 |
|
||||
| Number of expressions with unknown type | 0 |
|
||||
| Number of files | 543 |
|
||||
| Number of files with extension class | 538 |
|
||||
| Number of files with extension jar | 1 |
|
||||
| Number of files with extension java | 2 |
|
||||
| Number of files with extension properties | 1 |
|
||||
| Number of lines of code | 7 |
|
||||
| Number of lines of code with extension java | 7 |
|
||||
| Percentage of calls with call target | 100 |
|
||||
| Percentage of expressions with known type | 100 |
|
||||
| Total number of lines | 12 |
|
||||
| Total number of lines with extension java | 12 |
|
||||
| Used annotation processor: lombok.launch.AnnotationProcessorHider$AnnotationProcessor | 1 |
|
||||
| Used annotation processor: lombok.launch.AnnotationProcessorHider$ClaimingProcessor | 1 |
|
||||
@@ -0,0 +1 @@
|
||||
Telemetry/ExtractorInformation.ql
|
||||
@@ -0,0 +1,3 @@
|
||||
package mod1pkg;
|
||||
|
||||
public class Mod1Class { }
|
||||
@@ -0,0 +1,5 @@
|
||||
module moduleone {
|
||||
|
||||
exports mod1pkg;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import mod1pkg.Mod1Class;
|
||||
|
||||
public class User {
|
||||
|
||||
private Mod1Class m1c;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
module moduletwo {
|
||||
|
||||
requires moduleone;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import sys
|
||||
|
||||
from create_database_utils import *
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
try_use_java11()
|
||||
|
||||
os.mkdir("mod1obj")
|
||||
os.mkdir("mod2obj")
|
||||
|
||||
subprocess.check_call(["javac", "mod1/module-info.java", "mod1/mod1pkg/Mod1Class.java", "-d", "mod1obj"])
|
||||
subprocess.check_call(["jar", "-c", "-f", "mod1.jar", "-C", "mod1obj", "mod1pkg/Mod1Class.class", "--release", "9", "-C", "mod1obj", "module-info.class"])
|
||||
|
||||
run_codeql_database_create(["javac mod2/mod2pkg/User.java mod2/module-info.java -d mod2obj -p mod1.jar"], lang="java")
|
||||
@@ -0,0 +1,18 @@
|
||||
| Annotation processors enabled: true | 1 |
|
||||
| Number of calls with call target | 1 |
|
||||
| Number of calls with missing call target | 0 |
|
||||
| Number of expressions with known type | 1 |
|
||||
| Number of expressions with unknown type | 0 |
|
||||
| Number of files | 610 |
|
||||
| Number of files with extension class | 605 |
|
||||
| Number of files with extension jar | 1 |
|
||||
| Number of files with extension java | 2 |
|
||||
| Number of files with extension properties | 1 |
|
||||
| Number of lines of code | 7 |
|
||||
| Number of lines of code with extension java | 7 |
|
||||
| Percentage of calls with call target | 100 |
|
||||
| Percentage of expressions with known type | 100 |
|
||||
| Total number of lines | 12 |
|
||||
| Total number of lines with extension java | 12 |
|
||||
| Used annotation processor: lombok.launch.AnnotationProcessorHider$AnnotationProcessor | 1 |
|
||||
| Used annotation processor: lombok.launch.AnnotationProcessorHider$ClaimingProcessor | 1 |
|
||||
@@ -0,0 +1 @@
|
||||
Telemetry/ExtractorInformation.ql
|
||||
@@ -0,0 +1,3 @@
|
||||
package mod1pkg;
|
||||
|
||||
public class Mod1Class { }
|
||||
@@ -0,0 +1,5 @@
|
||||
module moduleone {
|
||||
|
||||
exports mod1pkg;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import mod1pkg.Mod1Class;
|
||||
|
||||
public class User {
|
||||
|
||||
private Mod1Class m1c;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
module moduletwo {
|
||||
|
||||
requires moduleone;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import sys
|
||||
|
||||
from create_database_utils import *
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
os.mkdir("mod1obj")
|
||||
os.mkdir("mod2obj")
|
||||
|
||||
subprocess.check_call(["javac", "mod1/module-info.java", "mod1/mod1pkg/Mod1Class.java", "-d", "mod1obj"])
|
||||
subprocess.check_call(["jar", "-c", "-f", "mod1.jar", "-C", "mod1obj", "mod1pkg/Mod1Class.class", "--release", "9", "-C", "mod1obj", "module-info.class"])
|
||||
|
||||
run_codeql_database_create(["javac mod2/mod2pkg/User.java mod2/module-info.java -d mod2obj -p mod1.jar"], lang="java")
|
||||
Reference in New Issue
Block a user