Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] ReflectionWorld.resolve(String) and Dynamic Proxy Classes

Also, here is the relevant method which calls resolve() is PointcutExpressionImpl:

public boolean couldMatchJoinPointsInType(Class aClass) {
ResolvedType matchType = world.resolve(aClass.getName());
}

Thanks,
Dustin Schultz
From: Dustin Schultz <dustin.schultz@xxxxxxxx>
Reply-To: "aspectj-users@xxxxxxxxxxx" <aspectj-users@xxxxxxxxxxx>
Date: Friday, January 4, 2013 11:23 AM
To: "aspectj-users@xxxxxxxxxxx" <aspectj-users@xxxxxxxxxxx>
Subject: [aspectj-users] ReflectionWorld.resolve(String) and Dynamic Proxy Classes

Hi,

I was going to file a bug about this but wanted to ask first before doing so: 

Is there any particular reason that ReflectionWorld.resolve(String) tries to resolve dynamic proxy classes by name? Class.getName() for dynamic proxies always returns $Proxy# and ReflectionWorld can never resolve them which always results in a cantFindType error.

Granted, I can turn down cantFindType to warning, the default in Xlint.properties is error. We're currently experiencing this when Spring goes looking for beans to advise. It runs into a bean that is already proxied (an OSGi service reference) and then blows up.

Thanks,
Dustin Schultz

Back to the top