-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17137 from smowton/smowton/admin/ecj-annotations-…
…bug-test Java: Add test for ECJ compiling an enum with a constructor parameter annotation
- Loading branch information
Showing
24 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
...-platforms/java/buildless-dependency-different-repository/force_sequential_test_execution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially |
1 change: 1 addition & 0 deletions
1
...on-tests/all-platforms/java/buildless-inherit-trust-store/force_sequential_test_execution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially |
1 change: 1 addition & 0 deletions
1
...tion-tests/all-platforms/java/buildless-maven-multimodule/force_sequential_test_execution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially |
1 change: 1 addition & 0 deletions
1
...orms/java/buildless-maven-tolerate-unavailable-dependency/force_sequential_test_execution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially |
1 change: 1 addition & 0 deletions
1
java/ql/integration-tests/all-platforms/java/buildless-maven/force_sequential_test_execution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially |
1 change: 1 addition & 0 deletions
1
...ntegration-tests/all-platforms/java/buildless-proxy-maven/force_sequential_test_execution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially |
1 change: 1 addition & 0 deletions
1
...on-tests/all-platforms/java/buildless-snapshot-repository/force_sequential_test_execution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially |
Empty file.
4 changes: 4 additions & 0 deletions
4
java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/Diagnostics.ql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import semmle.code.java.Diagnostics | ||
|
||
from Diagnostic d | ||
select d, d.getSeverity(), d.getMessage() |
9 changes: 9 additions & 0 deletions
9
java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
public enum Test { | ||
|
||
A("A"), B("B"), C("C"); | ||
|
||
private Test(@Ann String x) { } | ||
|
||
} | ||
|
||
@interface Ann {} |
2 changes: 2 additions & 0 deletions
2
java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/Test2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
public class Test2 { Test t; } |
1 change: 1 addition & 0 deletions
1
java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/test.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
| Test.java:5:16:5:28 | x | Test.java:5:16:5:19 | Ann | |
8 changes: 8 additions & 0 deletions
8
java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/test.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |
4 changes: 4 additions & 0 deletions
4
java/ql/integration-tests/all-platforms/java/ecj-tolerate-enum-annotations/test.ql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import java | ||
|
||
from Parameter p | ||
select p, p.getAnAnnotation() |
1 change: 1 addition & 0 deletions
1
java/ql/integration-tests/all-platforms/java/java-web-jsp/force_sequential_test_execution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially |
1 change: 1 addition & 0 deletions
1
java/ql/integration-tests/all-platforms/java/maven-enforcer/force_sequential_test_execution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially |
1 change: 1 addition & 0 deletions
1
...-tests/all-platforms/java/maven-sample-extract-properties/force_sequential_test_execution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially |
1 change: 1 addition & 0 deletions
1
...ion-tests/all-platforms/java/maven-sample-large-xml-files/force_sequential_test_execution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially |
1 change: 1 addition & 0 deletions
1
...ion-tests/all-platforms/java/maven-sample-small-xml-files/force_sequential_test_execution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially |
1 change: 1 addition & 0 deletions
1
...ration-tests/all-platforms/java/maven-sample-xml-mode-all/force_sequential_test_execution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially |
1 change: 1 addition & 0 deletions
1
...ion-tests/all-platforms/java/maven-sample-xml-mode-byname/force_sequential_test_execution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially |
1 change: 1 addition & 0 deletions
1
...n-tests/all-platforms/java/maven-sample-xml-mode-disabled/force_sequential_test_execution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially |
1 change: 1 addition & 0 deletions
1
...tion-tests/all-platforms/java/maven-sample-xml-mode-smart/force_sequential_test_execution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially |
1 change: 1 addition & 0 deletions
1
java/ql/integration-tests/all-platforms/java/maven-sample/force_sequential_test_execution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Concurrent Maven processes using ~/.m2/repository is not safe, so this test must run sequentially |