diff options
author | acolyer <acolyer> | 2003-09-19 08:16:17 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2003-09-19 08:16:17 +0000 |
commit | 53570863fa77364052937376a0ff65ce2fa37842 (patch) | |
tree | 80bf1404427ee613b4c4a9ffb3c2ffcdfdc4e17c /tests | |
parent | fc0d2af02cc6b6f8a4d9425e3c1cdd166957dde9 (diff) | |
download | aspectj-53570863fa77364052937376a0ff65ce2fa37842.tar.gz aspectj-53570863fa77364052937376a0ff65ce2fa37842.zip |
bug 43033 - NPE in concretize error path for ReferencePointcut
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ajcTests.xml | 12 | ||||
-rw-r--r-- | tests/bugs/concretizeNpe/base/ExceptionHandling.java | 6 | ||||
-rw-r--r-- | tests/bugs/concretizeNpe/model/ModelExceptionHandling.java | 13 |
3 files changed, 31 insertions, 0 deletions
diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml index 9fd028f8f..cd3310c0c 100644 --- a/tests/ajcTests.xml +++ b/tests/ajcTests.xml @@ -6763,4 +6763,16 @@ <compile files="AdviceInteraction.java"/> <run class="AdviceInteraction"/> </ajc-test> + + <ajc-test dir="bugs/concretizeNpe" pr="43033" + title="NPE in concretization error path"> + <compile files="base/ExceptionHandling.java,model/ModelExceptionHandling.java"> + <message line="5" kind="error" text="pointcut base.ExceptionHandling.scope() is abstract"/> + <message line="4" kind="error" text="inherited abstract pointcut base.ExceptionHandling.scope() is not made concrete"/> + <message line="8" kind="error" text="inherited abstract pointcut base.ExceptionHandling.scope() is not made concrete"/> + <message line="12" kind="error" text="Unmatched bracket"/> + <message line="13" kind="error" text="Syntax error on token"/> + </compile> + </ajc-test> + </suite> diff --git a/tests/bugs/concretizeNpe/base/ExceptionHandling.java b/tests/bugs/concretizeNpe/base/ExceptionHandling.java new file mode 100644 index 000000000..5f63ad61a --- /dev/null +++ b/tests/bugs/concretizeNpe/base/ExceptionHandling.java @@ -0,0 +1,6 @@ +package base; + +public abstract aspect ExceptionHandling { + public abstract pointcut scope(); + declare soft: Exception: scope(); +} diff --git a/tests/bugs/concretizeNpe/model/ModelExceptionHandling.java b/tests/bugs/concretizeNpe/model/ModelExceptionHandling.java new file mode 100644 index 000000000..0778aec22 --- /dev/null +++ b/tests/bugs/concretizeNpe/model/ModelExceptionHandling.java @@ -0,0 +1,13 @@ + +package model; + +import java.lang.RuntimeException; + +import base.ExceptionHandling; + +public aspect ModelExceptionHandling extends ExceptionHandling { + public pointcut scope() : within(*); + + protected RuntimeException convertCheckedException(Throwable t) { + return new RuntimeException(t.getMessage(),t +} |