Project: AspectJ
Bug 124808 [generics] detecting field-get of field of parameterized type.
Reported: 2006-01-22 11:12:27 | Status: resolved fixed

Hi, Here is the second generics issue: Java code: ========== public class Test<T extends Integer> { Set<T> ints = new HashSet<T>(); public Set<T> foo() { return ints; } public static void main(String[] args) { Test<Integer> t = new Test<Integer>(); Set<Integer> ints = t.foo(); } } Aspect: ======= public privileged aspect TestAspect { pointcut gettingMemberCollection(Test t) : target(t) && get(!public Set<Number+> com.mprv.secsph.*.*) && !within(TestAspect); after (Test test) : gettingMemberCollection(test) { System.out.println("GO Aspects!"); } } Compiler output: ================ warning at after (Test test) : gettingMemberCollection(test) { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /root/IdeaProjects/aspectsTest/src/com/mprv/secsph/TestAspect.aj:19:0::0 advice defined in com.mprv.secsph.TestAspect has not been applied [Xlint:adviceDidNotMatch] I would expect "gettingMemberCollection" to catch access to "ints" member of "Test" ... Thanks a lot! Misha.

Files changed in fix:
tests/bugs151/pr124808/Test.java tests/bugs151/pr124808/TestAspect.java tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java weaver/src/org/aspectj/weaver/patterns/ExactTypePattern.java weaver/src/org/aspectj/weaver/patterns/TypePattern.java