You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Clement Escoffier (JIRA)" <ji...@apache.org> on 2013/02/04 13:36:25 UTC

[jira] [Closed] (FELIX-3574) IPojo bytecode manipulation looses method argument names

     [ https://issues.apache.org/jira/browse/FELIX-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Clement Escoffier closed FELIX-3574.
------------------------------------

    
> IPojo bytecode manipulation looses method argument names
> --------------------------------------------------------
>
>                 Key: FELIX-3574
>                 URL: https://issues.apache.org/jira/browse/FELIX-3574
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>    Affects Versions: ipojo-manipulator-1.8.6
>            Reporter: Francois Valdy
>            Assignee: Clement Escoffier
>             Fix For: ipojo-manipulator-1.8.6
>
>         Attachments: FELIX-3574-patch.diff
>
>
> When IPojo creates its wrapper methods (instead of the ones it renames with '__' prefix), it doesn't keep the local variable table information, hence loosing parameter names.
> Reflection isn't impacted (as you can't access them through reflection anyway), but many tools are:
> - decompilers will display proper names for prefixed (private) methods, but not on the non-prefixed ones
> - IDEs won't display the names if you don't have javadoc|source attachment
> - some tools that are reading bytecode won't work (http://paranamer.codehaus.org/ in my case)
> Fix is pretty easy, I'll attach a patch later on:
> We need to store the local variables definition on the methods (only those which correspond to a parameter, we discard those that apply to method code variables) in the MethodDescriptor.
> Then when generating the wrapping code, we put them back, with a "start label" = 0, and "end label" = "end of wrapping code", as it seems to be the convention.
> I tested the changes on 1.6.4 and they work fine, but I'll provide a patch for the trunk.
> Thx

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira