From c09964fbdb4d97c60c3fc72b3061518369db5161 Mon Sep 17 00:00:00 2001 From: wisberg Date: Wed, 6 Aug 2003 07:31:16 +0000 Subject: @testcase PR#41175 aspect-declared methods with exception clauses fail in binary libraries Corresponding non-binary passing tests added to ajcTests.xml --- tests/ajcTests.xml | 30 +++++++++ tests/ajcTestsFailing.xml | 30 +++++++++ tests/bugs/interfaceLibrary/ClassClient.java | 14 +++++ tests/bugs/interfaceLibrary/ClassClientCE.java | 9 +++ tests/bugs/interfaceLibrary/Client.java | 14 +++++ tests/bugs/interfaceLibrary/ClientCE.java | 9 +++ tests/bugs/interfaceLibrary/LibraryAspect.java | 8 +++ .../bugs/interfaceLibrary/LibraryClassAspect.java | 8 +++ tests/bugs/interfaceLibrary/build.xml | 70 +++++++++++++++++++++ tests/bugs/interfaceLibrary/lib.jar | Bin 0 -> 1310 bytes tests/bugs/interfaceLibrary/lib/LibraryClass.java | 6 ++ .../interfaceLibrary/lib/LibraryInterface.java | 6 ++ tests/bugs/interfaceLibrary/libClass.jar | Bin 0 -> 1485 bytes 13 files changed, 204 insertions(+) create mode 100644 tests/bugs/interfaceLibrary/ClassClient.java create mode 100644 tests/bugs/interfaceLibrary/ClassClientCE.java create mode 100644 tests/bugs/interfaceLibrary/Client.java create mode 100644 tests/bugs/interfaceLibrary/ClientCE.java create mode 100644 tests/bugs/interfaceLibrary/LibraryAspect.java create mode 100644 tests/bugs/interfaceLibrary/LibraryClassAspect.java create mode 100644 tests/bugs/interfaceLibrary/build.xml create mode 100644 tests/bugs/interfaceLibrary/lib.jar create mode 100644 tests/bugs/interfaceLibrary/lib/LibraryClass.java create mode 100644 tests/bugs/interfaceLibrary/lib/LibraryInterface.java create mode 100644 tests/bugs/interfaceLibrary/libClass.jar (limited to 'tests') diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml index 82d4e6ed4..2ae8559ae 100644 --- a/tests/ajcTests.xml +++ b/tests/ajcTests.xml @@ -6598,5 +6598,35 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/ajcTestsFailing.xml b/tests/ajcTestsFailing.xml index 1e2c145f1..55278a25e 100644 --- a/tests/ajcTestsFailing.xml +++ b/tests/ajcTestsFailing.xml @@ -12,4 +12,34 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/bugs/interfaceLibrary/ClassClient.java b/tests/bugs/interfaceLibrary/ClassClient.java new file mode 100644 index 000000000..b3da33370 --- /dev/null +++ b/tests/bugs/interfaceLibrary/ClassClient.java @@ -0,0 +1,14 @@ + +import java.io.IOException; + +public class ClassClient { + public static void main(String[] a) { + try { + new C().run(); + throw new Error("test failed to throw IOException"); + } catch (IOException e) { + } + } +} + +class C extends lib.LibraryClass {} \ No newline at end of file diff --git a/tests/bugs/interfaceLibrary/ClassClientCE.java b/tests/bugs/interfaceLibrary/ClassClientCE.java new file mode 100644 index 000000000..59006ba74 --- /dev/null +++ b/tests/bugs/interfaceLibrary/ClassClientCE.java @@ -0,0 +1,9 @@ + + +public class ClassClientCE { + public static void main(String[] a) { + new C().run(); // CE 5 expected: declare IOException + } +} + +class C extends lib.LibraryClass {} \ No newline at end of file diff --git a/tests/bugs/interfaceLibrary/Client.java b/tests/bugs/interfaceLibrary/Client.java new file mode 100644 index 000000000..d18163963 --- /dev/null +++ b/tests/bugs/interfaceLibrary/Client.java @@ -0,0 +1,14 @@ + +import java.io.IOException; + +public class Client { + public static void main(String[] a) { + try { + new C().run(); + throw new Error("test failed to throw IOException"); + } catch (IOException e) { + } + } +} + +class C implements lib.LibraryInterface {} \ No newline at end of file diff --git a/tests/bugs/interfaceLibrary/ClientCE.java b/tests/bugs/interfaceLibrary/ClientCE.java new file mode 100644 index 000000000..a92bd522e --- /dev/null +++ b/tests/bugs/interfaceLibrary/ClientCE.java @@ -0,0 +1,9 @@ + + +public class ClientCE { + public static void main(String[] a) { + new C().run(); // CE 5 expected: declare IOException + } +} + +class C implements lib.LibraryInterface {} \ No newline at end of file diff --git a/tests/bugs/interfaceLibrary/LibraryAspect.java b/tests/bugs/interfaceLibrary/LibraryAspect.java new file mode 100644 index 000000000..bf1ddabf0 --- /dev/null +++ b/tests/bugs/interfaceLibrary/LibraryAspect.java @@ -0,0 +1,8 @@ + +import java.io.IOException; + +aspect LibraryAspect { + public void lib.LibraryInterface.run() throws IOException { + throw new IOException("LibraryAspect-defined run() for " + this); + } +} \ No newline at end of file diff --git a/tests/bugs/interfaceLibrary/LibraryClassAspect.java b/tests/bugs/interfaceLibrary/LibraryClassAspect.java new file mode 100644 index 000000000..ff65af6e3 --- /dev/null +++ b/tests/bugs/interfaceLibrary/LibraryClassAspect.java @@ -0,0 +1,8 @@ + +import java.io.IOException; + +aspect LibraryClassAspect { + public void lib.LibraryClass.run() throws IOException { + throw new IOException("LibraryClassAspect-defined run() for " + this); + } +} \ No newline at end of file diff --git a/tests/bugs/interfaceLibrary/build.xml b/tests/bugs/interfaceLibrary/build.xml new file mode 100644 index 000000000..d8d178dc1 --- /dev/null +++ b/tests/bugs/interfaceLibrary/build.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/bugs/interfaceLibrary/lib.jar b/tests/bugs/interfaceLibrary/lib.jar new file mode 100644 index 000000000..496514a29 Binary files /dev/null and b/tests/bugs/interfaceLibrary/lib.jar differ diff --git a/tests/bugs/interfaceLibrary/lib/LibraryClass.java b/tests/bugs/interfaceLibrary/lib/LibraryClass.java new file mode 100644 index 000000000..4fa031640 --- /dev/null +++ b/tests/bugs/interfaceLibrary/lib/LibraryClass.java @@ -0,0 +1,6 @@ + +package lib; + +public class LibraryClass { + +} \ No newline at end of file diff --git a/tests/bugs/interfaceLibrary/lib/LibraryInterface.java b/tests/bugs/interfaceLibrary/lib/LibraryInterface.java new file mode 100644 index 000000000..38f339b08 --- /dev/null +++ b/tests/bugs/interfaceLibrary/lib/LibraryInterface.java @@ -0,0 +1,6 @@ + +package lib; + +public interface LibraryInterface { + +} \ No newline at end of file diff --git a/tests/bugs/interfaceLibrary/libClass.jar b/tests/bugs/interfaceLibrary/libClass.jar new file mode 100644 index 000000000..720435d62 Binary files /dev/null and b/tests/bugs/interfaceLibrary/libClass.jar differ -- cgit v1.2.3