diff --git a/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/force_sequential_test_execution new file mode 100644 index 000000000000..dd90439bca59 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-dependency-different-repository/force_sequential_test_execution @@ -0,0 +1 @@ +# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially diff --git a/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/force_sequential_test_execution new file mode 100644 index 000000000000..dd90439bca59 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-inherit-trust-store/force_sequential_test_execution @@ -0,0 +1 @@ +# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/force_sequential_test_execution new file mode 100644 index 000000000000..dd90439bca59 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-maven-multimodule/force_sequential_test_execution @@ -0,0 +1 @@ +# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven-tolerate-unavailable-dependency/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/buildless-maven-tolerate-unavailable-dependency/force_sequential_test_execution new file mode 100644 index 000000000000..dd90439bca59 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-maven-tolerate-unavailable-dependency/force_sequential_test_execution @@ -0,0 +1 @@ +# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially diff --git a/java/ql/integration-tests/all-platforms/java/buildless-maven/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/buildless-maven/force_sequential_test_execution new file mode 100644 index 000000000000..dd90439bca59 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-maven/force_sequential_test_execution @@ -0,0 +1 @@ +# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially diff --git a/java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/force_sequential_test_execution new file mode 100644 index 000000000000..dd90439bca59 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-proxy-maven/force_sequential_test_execution @@ -0,0 +1 @@ +# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially diff --git a/java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/force_sequential_test_execution new file mode 100644 index 000000000000..dd90439bca59 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/buildless-snapshot-repository/force_sequential_test_execution @@ -0,0 +1 @@ +# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially diff --git a/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/Diagnostics.expected b/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/Diagnostics.expected new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/Diagnostics.ql b/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/Diagnostics.ql new file mode 100644 index 000000000000..60ef9109b180 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/Diagnostics.ql @@ -0,0 +1,4 @@ +import semmle.code.java.Diagnostics + +from Diagnostic d +select d, d.getSeverity(), d.getMessage() diff --git a/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/Test.java b/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/Test.java new file mode 100644 index 000000000000..bf3acc181751 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/Test.java @@ -0,0 +1,9 @@ +public enum Test { + + A("A"), B("B"), C("C"); + + private Test(@Ann String x) { } + +} + +@interface Ann {} diff --git a/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/Test2.java b/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/Test2.java new file mode 100644 index 000000000000..a5aed7a1e278 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/Test2.java @@ -0,0 +1,2 @@ + +public class Test2 { Test t; } diff --git a/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/test.expected b/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/test.expected new file mode 100644 index 000000000000..b648b5762fdb --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/test.expected @@ -0,0 +1 @@ +| Test.java:5:16:5:28 | x | Test.java:5:16:5:19 | Ann | diff --git a/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/test.py b/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/test.py new file mode 100644 index 000000000000..40313e2654a3 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/test.py @@ -0,0 +1,8 @@ +import urllib.request +from create_database_utils import * + +urllib.request.urlretrieve("https://repo1.maven.org/maven2/org/eclipse/jdt/ecj/3.38.0/ecj-3.38.0.jar", "ecj.jar") + +# This tests the case where ECJ emits a RuntimeIn/VisibleAnnotations attribute that isn't the same size as the corresponding method argument list, in particular due to forgetting to include the synthetic parameters added to explicit enumeration constructors. + +run_codeql_database_create(["java -cp ecj.jar org.eclipse.jdt.internal.compiler.batch.Main Test.java -d out -source 8", "java -cp ecj.jar org.eclipse.jdt.internal.compiler.batch.Main Test2.java -cp out -source 8"], lang="java") diff --git a/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/test.ql b/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/test.ql new file mode 100644 index 000000000000..836ccc7564f2 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/test.ql @@ -0,0 +1,4 @@ +import java + +from Parameter p +select p, p.getAnAnnotation() diff --git a/java/ql/integration-tests/all-platforms/java/java-web-jsp/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/java-web-jsp/force_sequential_test_execution new file mode 100644 index 000000000000..dd90439bca59 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/java-web-jsp/force_sequential_test_execution @@ -0,0 +1 @@ +# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially diff --git a/java/ql/integration-tests/all-platforms/java/maven-enforcer/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/maven-enforcer/force_sequential_test_execution new file mode 100644 index 000000000000..dd90439bca59 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-enforcer/force_sequential_test_execution @@ -0,0 +1 @@ +# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-extract-properties/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/maven-sample-extract-properties/force_sequential_test_execution new file mode 100644 index 000000000000..dd90439bca59 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-sample-extract-properties/force_sequential_test_execution @@ -0,0 +1 @@ +# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-large-xml-files/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/maven-sample-large-xml-files/force_sequential_test_execution new file mode 100644 index 000000000000..dd90439bca59 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-sample-large-xml-files/force_sequential_test_execution @@ -0,0 +1 @@ +# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-small-xml-files/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/maven-sample-small-xml-files/force_sequential_test_execution new file mode 100644 index 000000000000..dd90439bca59 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-sample-small-xml-files/force_sequential_test_execution @@ -0,0 +1 @@ +# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-all/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-all/force_sequential_test_execution new file mode 100644 index 000000000000..dd90439bca59 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-all/force_sequential_test_execution @@ -0,0 +1 @@ +# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-byname/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-byname/force_sequential_test_execution new file mode 100644 index 000000000000..dd90439bca59 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-byname/force_sequential_test_execution @@ -0,0 +1 @@ +# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-disabled/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-disabled/force_sequential_test_execution new file mode 100644 index 000000000000..dd90439bca59 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-disabled/force_sequential_test_execution @@ -0,0 +1 @@ +# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-smart/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-smart/force_sequential_test_execution new file mode 100644 index 000000000000..dd90439bca59 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-sample-xml-mode-smart/force_sequential_test_execution @@ -0,0 +1 @@ +# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially diff --git a/java/ql/integration-tests/all-platforms/java/maven-sample/force_sequential_test_execution b/java/ql/integration-tests/all-platforms/java/maven-sample/force_sequential_test_execution new file mode 100644 index 000000000000..dd90439bca59 --- /dev/null +++ b/java/ql/integration-tests/all-platforms/java/maven-sample/force_sequential_test_execution @@ -0,0 +1 @@ +# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially