Here is the pointcut:
=========================
  pointcut unauthorizedMethods() :
    within(!@Authorize HttpHandlerType+) && 
    withincode(@(GET || PUT || POST || DELETE) !@Authorize public *
*.*(..));

  
  declare warning : unauthorizedMethods() : "Unauthorized HTTP resource
method";
=========================

It correctly identifies all the methods which are not annotated with the
@Authorize annotations. But it generates the warning for each and ever
statement found in the respective method body! So, for three methods I have
18 warning!

I suspect that the problem is with the withincode join point, but I have no
idea how to fix it.

Thanks.

--
View this message in context: 
http://aspectj.2085585.n4.nabble.com/My-declare-warning-pointcut-generates-too-many-duplicate-warnings-how-to-fix-it-tp4174448p4174448.html
Sent from the AspectJ - users mailing list archive at Nabble.com.
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to