Community
Participate
Working Groups
Build Identifier: Build id: 20110301-1815 A private method inside an AspectJ classe is underlined as "Method not use" but the method is really called inside the class. Reproducible: Always
Created attachment 191019 [details] Screen capture of the editor that reports the false warning
Created attachment 191020 [details] The verbatim AspectJ source code involved
Distilled it down to this: === package com.ubeker.bv.server.aspects; import org.aspectj.lang.JoinPoint; public aspect LoggingBehavior { pointcut daoLogger() : execution(* *(..)); before() : daoLogger() { buildParameters(thisJoinPoint.getArgs()); } private void buildParameters(Object[] ps) { } } === which shows the same problem. The error only appears in the editor, not in the problems view. That indicates it is a reconciling issue and not a compiler issue. Reassigning this to AJDT.
This problem is arising because of the way that we do reconciling in the AJ editor. We use the Java reconciler, but pass it AJ code. This means that we need to massage a few things. For instance, references to thisJoinPoint need to be ignored by the reconciler, but by doing this, we also ignore the call to the private method that you declared. Thus, the reconciler thinks that there are no calls to the private method.