Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Help: warning at MyAspect.aj:11 can not resolve this member: returnType clasName.methodName() [Xlint:unresolvableMember]

Hi, 

When I run AspectJ in my project, I get above warning for thousands of
times, since it times how many pointcuts I have in my aspect file.

I am using jar files I built from AspectJ1.2 top tree pulled on Aug 16th
2004. 


So I simplify my aspect file to contain just one pointcut, like this:
------------------------- MyAspect.aj
-------------------------------------

import com.bea.jpd.ProcessDefinition;

// ProcessDefinition Aspect

public aspect MyAspect {

    int count;

    pointcut invokeRequestQuote(ProcessDefinition t) 
	: call(* com.bea.jpd.ProcessDefinition+.*(..)) && target(t);

    before(ProcessDefinition targetObj) : invokeRequestQuote(targetObj)
{

	System.out.println("before >>>>  " + count + " >>>>>>>" +
targetObj.toString());
	count++;
    }
}
------------------------------------------------------------------------
--------

I still get almost 300 these warnings in process to bring BEA Weblogic
app server up. It works okay, println does dump something on the console
as expected when I invoke a sample application.

So I investigated these warning situations, they are in different
categories:


1) className is an interface, methodName is public abstract. It accounts
for 80% of warnings.
Example:
warning at C:\test\AspectJ\MyAspect.aj:11 can not resolve this member:
boolean
com.bea.wli.calendar.beans.entity.CalendarBean_m4sbdw_Intf.__WL_beanIsLo
aded() [Xlint:unresolvableMember]


2) className is an interface, methodName is nowhere to be found in that
interface. Possibly the methodName is defined in one of its subclasses.
It accouts for 15% of all warnings.
Example:
warning at C:\test\AspectJ\MyAspect.aj:11 can not resolve this member:
int
com.bea.wli.calendar.beans.entity.CalendarBean_m4sbdw_Intf.__WL_getMetho
dState() [Xlint:unresolvableMember]


3) className is final class, methodName is nowhere to be found. Maybe in
JDK, like clone here. It accouts for less than 5%.
Examples:
warning at C:\test\AspectJ\MyAspect.aj:11 can not resolve this member:
java.lang.Object
com.bea.wli.calendar.beans.entity.CalendarBean_m4sbdw__WebLogic_CMP_RDBM
S_maps_Set.clone() [Xlint:unresolvableMember]
warning at C:\test\AspectJ\MyAspect.aj:11 can not resolve this member:
void
com.bea.wli.calendar.beans.entity.CalendarBean_m4sbdw__WebLogic_CMP_RDBM
S_maps_Set.clear(boolean) [Xlint:unresolvableMember]


As a matter of fact, all these are situations that I really don't care.
But I do't want to disable warning messages, fearing that it would
eliminate some REALLY HELPFUL messages.

Could somebody please provide some insight regarding this warning? What
does it really mean here?

Any help is greatly greatly appreciated.

Larry




Back to the top