[jboss-jira] [JBoss JIRA] Commented: (JBAOP-431) Avoid excessive casting in generated joinpoint classes

Flavia Rainone (JIRA) jira-events at lists.jboss.org
Fri Jul 13 11:05:04 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBAOP-431?page=comments#action_12368891 ] 
            
Flavia Rainone commented on JBAOP-431:
--------------------------------------

I've found out that the casting when the method is overloaded to avoid that calls are made using Java Language method selection.
Look at this scenario:

Object advice(@Invocation MethodCalledByMethodInvocation, @Caller SuperClass) throws Throwable
Object advice(@Target Object, @Caller CallerType) throws Throwable

When we generate a call to the first version, which is highest priority, the call is actually performed to the second version.

We are currently performing casts on all methods. If we decide it is necessary, we can, in a future moment, generate casts only on parameters/methods that require it.

> Avoid excessive casting in generated joinpoint classes
> ------------------------------------------------------
>
>                 Key: JBAOP-431
>                 URL: http://jira.jboss.com/jira/browse/JBAOP-431
>             Project: JBoss AOP
>          Issue Type: Sub-task
>      Security Level: Public(Everyone can see) 
>            Reporter: Kabir Khan
>         Assigned To: Flavia Rainone
>             Fix For: 2.0.0.beta
>
>
> in JoinPoint.invoke() and invokeNext() we do not need to cast the joinpoint argument
> around.around(this);
> is noticably faster than 
> around.around((MethodInvocation)this);

-- 
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

        



More information about the jboss-jira mailing list