[
http://jira.jboss.com/jira/browse/JBAOP-415?page=all ]
Flavia Rainone closed JBAOP-415.
--------------------------------
Resolution: Done
Generics information cannot currently be retrieved for @Target and @Caller.
To understand why, consider the following class:
public class MyClass<A>
{
public void method()
{}
}
When we intercept an execution of method, we have access to a target of type MyClass. To
know the generics type of the target, we would need some method like Object.getType(),
which we do not have.
The same explanation goes to @Caller on call pointcuts.
And for @Target on call joinpoints, we would also need some way to know the type of the
object being called. Despite the difference that now we are in the context of the call,
and not inside the method being executed, we cannot access the generics target type
information for the same reasons as we cant in a method execution joinpoint.
Advice Matching algorithm is ignoring generics
----------------------------------------------
Key: JBAOP-415
URL:
http://jira.jboss.com/jira/browse/JBAOP-415
Project: JBoss AOP
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 2.0.0.alpha4
Reporter: Flavia Rainone
Assigned To: Flavia Rainone
Fix For: 2.0.0.beta2
Advice Matching does not takes into account generic types; it is working with the old
reflection API instead (Class instead of Type).
To modifiy this, we need to update code in classes:
- org.jboss.aop.advice.annotation.AdviceInfo
- org.jboss.aop.advice.annotation.AnnotatedParameterAdviceInfo
- org.jboss.aop.advice.AdviceMethodProperties
- joinpoint generators that pass the return, arguments and exception types to
AdviceMethodProperties instances.
This includes updating the assignability degree algorithm of
org.jboss.aop.advice.annotation package.
The methods for this task are partly written in
org.jboss.test.aop.beforeafterArgs.ArgAspectGenerics.
Tests for generic return types are also necessary, and need to be written.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira