diff options
author | jhugunin <jhugunin> | 2004-01-14 15:24:06 +0000 |
---|---|---|
committer | jhugunin <jhugunin> | 2004-01-14 15:24:06 +0000 |
commit | 5834de97836ebcc056415736c17c46e8b1dfaf5a (patch) | |
tree | a7b87ccc35e25aafe73d24d17f08cc33f62b22c4 /runtime/testsrc | |
parent | 7bbd1f419239dc9e8b46e7fd912b2bc007bbd76a (diff) | |
download | aspectj-5834de97836ebcc056415736c17c46e8b1dfaf5a.tar.gz aspectj-5834de97836ebcc056415736c17c46e8b1dfaf5a.zip |
Fix for Bugzilla Bug 44587
Erroneous exception conversion
and Bugzilla Bug 34206
before():execution(new(..)) does not throw NoAspectBoundException
All exceptions that occur during the static intialization of a persingleton
aspect will be swallowed. When using that aspect (via aspectOf())
a NoAspectBoundException will be thrown with the original exception
from the staitc initializer as the cause.
Diffstat (limited to 'runtime/testsrc')
-rw-r--r-- | runtime/testsrc/RuntimeModuleTests.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/testsrc/RuntimeModuleTests.java b/runtime/testsrc/RuntimeModuleTests.java index fe36f3055..a426025c5 100644 --- a/runtime/testsrc/RuntimeModuleTests.java +++ b/runtime/testsrc/RuntimeModuleTests.java @@ -14,6 +14,8 @@ // default package +import org.aspectj.lang.NoAspectBoundException; + import junit.framework.*; public class RuntimeModuleTests extends TestCase { @@ -27,4 +29,10 @@ public class RuntimeModuleTests extends TestCase { public RuntimeModuleTests(String name) { super(name); } public void testNothing() {} + + public void testNoAspectBoundException() { + RuntimeException fun = new RuntimeException("fun"); + NoAspectBoundException nab = new NoAspectBoundException("Foo", fun); + assertEquals(fun,nab.getCause()); + } } |