diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2022-03-27 12:57:19 +0700 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2022-03-27 12:57:19 +0700 |
commit | 8a933427ec77859a40c5cd9c55226bbe6f9d736a (patch) | |
tree | 414f4971c8c26e5f8ddd5627ef2b81760feaa2fb /tests | |
parent | dddefd99b1d5e7078e0212343fdce3230f2aec18 (diff) | |
download | aspectj-8a933427ec77859a40c5cd9c55226bbe6f9d736a.tar.gz aspectj-8a933427ec77859a40c5cd9c55226bbe6f9d736a.zip |
Add test case + experimental fix for AJC option '--add-exports'
I am expecting the test case to pass, but other tests to fail. This
temporary commit is meant to create feedback from GitHub CI test runs.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'tests')
3 files changed, 30 insertions, 0 deletions
diff --git a/tests/bugs199/add_exports/Application.java b/tests/bugs199/add_exports/Application.java new file mode 100644 index 000000000..88bd177aa --- /dev/null +++ b/tests/bugs199/add_exports/Application.java @@ -0,0 +1,17 @@ +import sun.security.x509.X509CertInfo; + +import java.security.cert.CertificateParsingException; + +/** + * https://github.com/mojohaus/aspectj-maven-plugin/issues/139 + */ +public class Application { + public static void main(String[] args) { + try { + new X509CertInfo(new byte[0]); + } + catch (CertificateParsingException e) { + System.out.println(e); + } + } +} diff --git a/tests/src/test/java/org/aspectj/systemtest/ajc199/Bugs199Tests.java b/tests/src/test/java/org/aspectj/systemtest/ajc199/Bugs199Tests.java index b83448935..a9f7f3023 100644 --- a/tests/src/test/java/org/aspectj/systemtest/ajc199/Bugs199Tests.java +++ b/tests/src/test/java/org/aspectj/systemtest/ajc199/Bugs199Tests.java @@ -61,6 +61,10 @@ public class Bugs199Tests extends XMLBasedAjcTestCase { runTest("asynchronous proceed for nested around-advice (native, thread pool)"); } + public void testAddExports() { + runTest("use --add-exports"); + } + public static Test suite() { return XMLBasedAjcTestCase.loadSuite(Bugs199Tests.class); } diff --git a/tests/src/test/resources/org/aspectj/systemtest/ajc199/ajc199.xml b/tests/src/test/resources/org/aspectj/systemtest/ajc199/ajc199.xml index 7baeea086..9a9ac2d47 100644 --- a/tests/src/test/resources/org/aspectj/systemtest/ajc199/ajc199.xml +++ b/tests/src/test/resources/org/aspectj/systemtest/ajc199/ajc199.xml @@ -515,4 +515,13 @@ </run> </ajc-test> + <ajc-test dir="bugs199/add_exports" title="use --add-exports" vm="9"> + <compile files="Application.java" options="-11 --add-exports java.base/sun.security.x509=ALL-UNNAMED" /> + <run class="Application" vmargs="--add-exports java.base/sun.security.x509=ALL-UNNAMED"> + <stdout> + <line text="java.security.cert.CertificateParsingException: java.io.IOException"/> + </stdout> + </run> + </ajc-test> + </suite> |