From 0a8dbdeed13fe79ddfd7a291e2b45b50b9a90579 Mon Sep 17 00:00:00 2001 From: jhugunin Date: Tue, 22 Apr 2003 17:55:13 +0000 Subject: test and fix for Bugzilla Bug 36564 Internal compiler error --- tests/ajcTests.xml | 6 ++++++ tests/bugs/tjpStaticPart/Exceptions.java | 18 ++++++++++++++++++ tests/bugs/tjpStaticPart/Test.java | 14 ++++++++++++++ tests/jimTests.xml | 7 +------ 4 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 tests/bugs/tjpStaticPart/Exceptions.java create mode 100644 tests/bugs/tjpStaticPart/Test.java (limited to 'tests') diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml index 388fafac6..845d21687 100644 --- a/tests/ajcTests.xml +++ b/tests/ajcTests.xml @@ -5828,4 +5828,10 @@ + + + + + diff --git a/tests/bugs/tjpStaticPart/Exceptions.java b/tests/bugs/tjpStaticPart/Exceptions.java new file mode 100644 index 000000000..056443e8b --- /dev/null +++ b/tests/bugs/tjpStaticPart/Exceptions.java @@ -0,0 +1,18 @@ +package tjpStaticPart; + +import java.io.*; + +import org.aspectj.lang.*; + +public aspect Exceptions { + + pointcut exceptionMethods () : + call(java.io.*.new(..) throws FileNotFoundException); + + Object around () throws FileNotFoundException : exceptionMethods() && !within(Exceptions) { + System.err.println("before: " + thisJoinPoint.getStaticPart()); + Object obj = proceed(); + System.err.println("after: " + thisJoinPoint.getStaticPart()); + return obj; + } +} \ No newline at end of file diff --git a/tests/bugs/tjpStaticPart/Test.java b/tests/bugs/tjpStaticPart/Test.java new file mode 100644 index 000000000..1438698f5 --- /dev/null +++ b/tests/bugs/tjpStaticPart/Test.java @@ -0,0 +1,14 @@ +package tjpStaticPart; + +import java.io.*; + +public class Test { + + public static void main(String[] args) throws Exception{ + try { + FileInputStream in = new FileInputStream("file-does-not-exist"); + } catch (FileNotFoundException e) { + } + + } +} diff --git a/tests/jimTests.xml b/tests/jimTests.xml index 3d842760f..7664c3799 100644 --- a/tests/jimTests.xml +++ b/tests/jimTests.xml @@ -1,12 +1,7 @@ - - - - +