Community
Participate
Working Groups
Build Identifier: Version: 2.0.3.e35x-20100410-1900, AspectJ version: 1.6.9.20100408142000 java.lang.IllegalStateException at org.aspectj.weaver.ResolvedMemberImpl.parameterizedWith(ResolvedMemberImpl.java:676) at org.aspectj.weaver.ResolvedMemberImpl.parameterizedWith(ResolvedMemberImpl.java:664) at org.aspectj.weaver.ReferenceType.getDeclaredMethods(ReferenceType.java:772) at org.aspectj.weaver.ResolvedType.lookupMethod(ResolvedType.java:534) at org.aspectj.weaver.World.resolve(World.java:617) at org.aspectj.weaver.MemberI ... : ICONST_0 IRETURN end public final boolean retainAll(java.util.Collection) end public class com.argilsoft.xstm.core.TSet Reproducible: Sometimes Steps to Reproduce: 1. Change an aspect in Eclipse 2. Rebuild project 3. Modify a few java files 4. Popup appears with this error
no doubt a regression related to the refactoring of generics handling. Unfortunately all my tests work just fine and a sample project to try and recreate this works too. Are you at all able to share the project with me (doesn't have to be in a public area like bugzilla) so that I can try to fix it? Or distill down a small failing sample?
With help from Cyprien I now have a minimal failing testcase. With these types: Middle.java public abstract class Middle<E> extends Top<E> { class IteratorImpl extends TopInner { } } Top.java public class Top<K> { class TopInner { public void hhh() { } } } Zzz.java public abstract class Zzz<E> extends Middle<E> { void removeAll() { IteratorImpl it = new IteratorImpl(); it.hhh(); } } Aspy.aj public aspect Aspy { before(): call(* *(..)) { } } and this command line: ajc -1.5 Aspy.aj Zzz.java Top.java Middle.java java.lang.IllegalStateException: Can't ask to parameterize a member of non-generic type: Top$TopInner kind(simple) at org.aspectj.weaver.ResolvedMemberImpl.parameterizedWith(ResolvedMemberImpl.java:676) at org.aspectj.weaver.ResolvedMemberImpl.parameterizedWith(ResolvedMemberImpl.java:664) at org.aspectj.weaver.ReferenceType.getDeclaredMethods(ReferenceType.java:772) at org.aspectj.weaver.ResolvedType.lookupMethod(ResolvedType.java:534) I believe it is caused by the fact that the inner type is non directly generic but as it is the inner type of a generic type, it shouldn't be triggering the IllegalStateException (since it inherits the type variables).
fixed - allows for this scenario now, it won't trigger the illegalstate.