]> source.dussan.org Git - aspectj.git/commitdiff
433351: first fix. inpath weaving of decp on generic interface
authorAndy Clement <aclement@gopivotal.com>
Thu, 19 Jun 2014 16:24:38 +0000 (09:24 -0700)
committerAndy Clement <aclement@gopivotal.com>
Thu, 19 Jun 2014 16:24:38 +0000 (09:24 -0700)
org.aspectj.matcher/src/org/aspectj/weaver/ReferenceType.java
tests/bugs181/433351/Extender.aj [new file with mode: 0644]
tests/bugs181/433351/InterfaceProj1.java [new file with mode: 0644]
tests/bugs181/433351/InterfaceProj2.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc181/Ajc181Tests.java
tests/src/org/aspectj/systemtest/ajc181/ajc181.xml

index d97497fafdbe3043445201a1147654a2ea9ce653..538bd940fd499ed2dbcbb6bb11c701164c93630a 100644 (file)
@@ -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 (file)
index 0000000..4332756
--- /dev/null
@@ -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 (file)
index 0000000..7d90bef
--- /dev/null
@@ -0,0 +1,7 @@
+package test;
+
+public interface InterfaceProj1<T> {
+
+       public abstract int aMethod();
+       
+}
diff --git a/tests/bugs181/433351/InterfaceProj2.java b/tests/bugs181/433351/InterfaceProj2.java
new file mode 100644 (file)
index 0000000..b6846f5
--- /dev/null
@@ -0,0 +1,7 @@
+package test.extender;
+
+public interface InterfaceProj2<T> {
+
+       public abstract int bMethod();
+       
+}
\ No newline at end of file
index 57ed6b6dfc1da56522aaa485bbe872cf09d29e47..24c07b03f5c35ab05ec5d0c11b95b620ea472d4b 100644 (file)
@@ -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");
        }
index 1a8b1acfcb538cb13d6f241c8dd02bfa718bef8d..314aaf712e4306e013079c90ce5b0c06d20c3494 100644 (file)
@@ -2,6 +2,13 @@
 
 <suite>
 
+       <ajc-test dir="bugs181/433351" title="jar weaving">
+               <compile options="-1.5" files="InterfaceProj1.java" outjar="code.jar"/>
+               <compile options="-1.5 -showWeaveInfo" inpath="code.jar" files="Extender.aj InterfaceProj2.java">
+               <message kind="weave" text="Extending interface set for type 'test.InterfaceProj1' (InterfaceProj1.java) to include 'test.extender.InterfaceProj2' (Extender.aj)"/>
+               </compile>
+       </ajc-test>
+
        <ajc-test dir="bugs181/436531" title="parameter names attribute">
                <compile options="-1.8" files="Azpect.java" inpath="code.jar"/>
        </ajc-test>