From 3c2b8b77881c721b5c274db939a30bcb3130a401 Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Thu, 19 Jun 2014 09:24:38 -0700 Subject: [PATCH] 433351: first fix. inpath weaving of decp on generic interface --- .../src/org/aspectj/weaver/ReferenceType.java | 6 ++++++ tests/bugs181/433351/Extender.aj | 10 ++++++++++ tests/bugs181/433351/InterfaceProj1.java | 7 +++++++ tests/bugs181/433351/InterfaceProj2.java | 7 +++++++ .../src/org/aspectj/systemtest/ajc181/Ajc181Tests.java | 4 ++++ tests/src/org/aspectj/systemtest/ajc181/ajc181.xml | 7 +++++++ 6 files changed, 41 insertions(+) create mode 100644 tests/bugs181/433351/Extender.aj create mode 100644 tests/bugs181/433351/InterfaceProj1.java create mode 100644 tests/bugs181/433351/InterfaceProj2.java diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java b/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java index d97497faf..538bd940f 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java @@ -1163,6 +1163,12 @@ public class ReferenceType extends ResolvedType { if (getDelegate() != null) { delegate.ensureConsistent(); } + if (isRawType()) { + ReferenceType genericType = getGenericType(); + if (genericType != null) { + genericType.ensureConsistent(); + } + } } @Override diff --git a/tests/bugs181/433351/Extender.aj b/tests/bugs181/433351/Extender.aj new file mode 100644 index 000000000..433275660 --- /dev/null +++ b/tests/bugs181/433351/Extender.aj @@ -0,0 +1,10 @@ +package test.extender; +import test.*; + +public aspect Extender { + + declare parents: InterfaceProj1 extends InterfaceProj2; + +// declare parents: test.ClassProj1 extends ClassProj2; + +} diff --git a/tests/bugs181/433351/InterfaceProj1.java b/tests/bugs181/433351/InterfaceProj1.java new file mode 100644 index 000000000..7d90bef54 --- /dev/null +++ b/tests/bugs181/433351/InterfaceProj1.java @@ -0,0 +1,7 @@ +package test; + +public interface InterfaceProj1 { + + public abstract int aMethod(); + +} diff --git a/tests/bugs181/433351/InterfaceProj2.java b/tests/bugs181/433351/InterfaceProj2.java new file mode 100644 index 000000000..b6846f54c --- /dev/null +++ b/tests/bugs181/433351/InterfaceProj2.java @@ -0,0 +1,7 @@ +package test.extender; + +public interface InterfaceProj2 { + + public abstract int bMethod(); + +} \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc181/Ajc181Tests.java b/tests/src/org/aspectj/systemtest/ajc181/Ajc181Tests.java index 57ed6b6df..24c07b03f 100644 --- a/tests/src/org/aspectj/systemtest/ajc181/Ajc181Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc181/Ajc181Tests.java @@ -22,6 +22,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase; */ public class Ajc181Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + public void testJarWeaving_433351() { + runTest("jar weaving"); + } + public void testParameterNamesAttribute_436531() { runTest("parameter names attribute"); } diff --git a/tests/src/org/aspectj/systemtest/ajc181/ajc181.xml b/tests/src/org/aspectj/systemtest/ajc181/ajc181.xml index 1a8b1acfc..314aaf712 100644 --- a/tests/src/org/aspectj/systemtest/ajc181/ajc181.xml +++ b/tests/src/org/aspectj/systemtest/ajc181/ajc181.xml @@ -2,6 +2,13 @@ + + + + + + + -- 2.39.5