Community
Participate
Working Groups
Build ID: M20090211-1700 Steps To Reproduce: 1. Create Aspect 2. Specify pointcut: @Pointcut("execution(!void<?>[] *(..))") void pointCutError() {} 3. Save/Build More information: org.aspectj.weaver.BCException at org.aspectj.weaver.ResolvedType.getGenericType(ResolvedType.java:1956) at org.aspectj.weaver.patterns.WildTypePattern.verifyTypeParameters(WildTypePattern.java:945) at org.aspectj.weaver.patterns.WildTypePattern.resolveParameterizedType(WildTypePattern.java:819) at org.aspectj.weaver.patterns.WildTypePattern.resolveBindingsForExactType(WildTypePattern.java:765) at org.aspectj.weaver.patterns.WildTypePat ... unmscapi.jar;C:\Program Files\Java\jdk1.6.0_12\jre\lib\ext\sunpkcs11.jar;C:\eclipse\\plugins\org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar; I was try to use @Pointcut("execution(!void *(..))") to advise: public Collection<?>[] getCollectionArray() { return collectionArray; } But the pointcut failed to pickout the desired join point. Changing the pointcut to @Pointcut("execution(!void[] *(..))") also fails to pickout the join point. @Pointcut("execution(!void<?>[] *(..))") and @Pointcut("execution(!void<?> *(..))") both lead to internal compiler errors.
i'll grab that bug
BCException is now fixed. Additionally: @Pointcut("execution(!void *(..))") works for me. @Pointcut("execution(!void[] *(..))") also works for me. --- import java.util.*; import org.aspectj.lang.annotation.*; @Aspect class Iffy2 { @Before("execution(!void[] *(..))") public void advice1() {} @Before("execution(!void[] *(..))") public void advice2() {} public Collection<?>[] getCollectionArray() { return null; } } --- ajc -1.5 -showWeaveInfo Iffy2.java Join point 'method-execution(java.util.Collection[] Iffy2.getCollectionArray())' in Type 'Iffy2' (Iffy2.java:13) advised by before advice from 'Iffy2' (Iffy2.java:11) Join point 'method-execution(java.util.Collection[] Iffy2.getCollectionArray())' in Type 'Iffy2' (Iffy2.java:13) advised by before advice from 'Iffy2' (Iffy2.java:8) What is different in your scenario from what I show above?
fixed the exception - please reopen if you still have trouble writing the pointcut.