From 41a94551a155d4862770def8725065d4cad125f2 Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 16 Mar 2009 04:53:47 +0000 Subject: [PATCH] 268689: test and fix for npe in generic aspect --- tests/bugs164/pr268689/ConcreteAspect.aj | 12 ++++++++++++ tests/bugs164/pr268689/GenericAspect.aj | 16 ++++++++++++++++ .../aspectj/systemtest/ajc164/Ajc164Tests.java | 4 ++++ .../src/org/aspectj/systemtest/ajc164/ajc164.xml | 6 ++++++ 4 files changed, 38 insertions(+) create mode 100644 tests/bugs164/pr268689/ConcreteAspect.aj create mode 100644 tests/bugs164/pr268689/GenericAspect.aj diff --git a/tests/bugs164/pr268689/ConcreteAspect.aj b/tests/bugs164/pr268689/ConcreteAspect.aj new file mode 100644 index 000000000..10da726d9 --- /dev/null +++ b/tests/bugs164/pr268689/ConcreteAspect.aj @@ -0,0 +1,12 @@ +/** + * + */ +package none; + +/** + * @author Dawid Pytel + * + */ +public aspect ConcreteAspect extends GenericAspect { + +} diff --git a/tests/bugs164/pr268689/GenericAspect.aj b/tests/bugs164/pr268689/GenericAspect.aj new file mode 100644 index 000000000..c102dc328 --- /dev/null +++ b/tests/bugs164/pr268689/GenericAspect.aj @@ -0,0 +1,16 @@ +/** + * + */ +package none; + +/** + * @author Dawid Pytel + * + */ +public abstract aspect GenericAspect { + + interface SomeInterface { + } + + pointcut SomeConstructor(SomeInterface var) : execution(* SomeInterface(..)) && this(var); +} diff --git a/tests/src/org/aspectj/systemtest/ajc164/Ajc164Tests.java b/tests/src/org/aspectj/systemtest/ajc164/Ajc164Tests.java index 14356587c..1afbf4b42 100644 --- a/tests/src/org/aspectj/systemtest/ajc164/Ajc164Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc164/Ajc164Tests.java @@ -34,6 +34,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase; public class Ajc164Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + public void testGenericAspectsNpe_pr268689() { + runTest("generics aspects npe"); + } + public void testGenericsItdNpe_pr267559() { runTest("generics and itd npe"); } diff --git a/tests/src/org/aspectj/systemtest/ajc164/ajc164.xml b/tests/src/org/aspectj/systemtest/ajc164/ajc164.xml index 373d4b711..ae770bbae 100644 --- a/tests/src/org/aspectj/systemtest/ajc164/ajc164.xml +++ b/tests/src/org/aspectj/systemtest/ajc164/ajc164.xml @@ -1,6 +1,12 @@ + + + + + + -- 2.39.5