Francois Valdy created FELIX-3574:
-------------------------------------
Summary: 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
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:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira