Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] UnsupportedPointcutPrimitiveException

I don’t honestly know about Spring AOP and using if() like that. From the documentation:


That lists the supported designators and if() is not on the list I’m afraid.

Could be worth asking on stack overflow about how to achieve what you want in Spring AOP.

cheers,
Andy

On Sep 19, 2016, at 6:42 AM, Mohan Radhakrishnan <radhakrishnan.mohan@xxxxxxxxx> wrote:

Hi,
             This should be supported. Isn't it. I use Spring Tool Suite and @EnableAspectJAutoProxy

Thanks,
Mohan

@Pointcut("execution(* com.pearson.nextgen.enterprise.service.CourseService.getCoursesByInstitutionId(String)) && if()")
    public static boolean courseSearch() {
    return Boolean.getBoolean( mockOrNot.get() ); 
    }


Caused by: org.aspectj.weaver.tools.UnsupportedPointcutPrimitiveException: Point
cut _expression_ 'execution(* com.pearson.nextgen.enterprise.service.CourseService
.getCoursesByInstitutionId(String)) && if()' contains unsupported pointcut primi
tive 'if'
        at org.aspectj.weaver.tools.PointcutParser.validateAgainstSupportedPrimi
tives(PointcutParser.java:435)
        at org.aspectj.weaver.tools.PointcutParser.validateAgainstSupportedPrimi
tives(PointcutParser.java:413)
        at org.aspectj.weaver.tools.PointcutParser.resolvePointcutExpression(Poi
ntcutParser.java:311)
        at org.aspectj.weaver.reflect.InternalUseOnlyPointcutParser.resolvePoint
cutExpression(InternalUseOnlyPointcutParser.java:36)
        at org.aspectj.weaver.reflect.Java15ReflectionBasedReferenceTypeDelegate
.getDeclaredPointcuts(Java15ReflectionBasedReferenceTypeDelegate.java:307)
        at org.aspectj.weaver.ReferenceType.getDeclaredPointcuts(ReferenceType.j
ava:884)
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top