[ 
https://issues.apache.org/jira/browse/FELIX-3461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13255459#comment-13255459
 ] 

Göktürk Gezer commented on FELIX-3461:
--------------------------------------

No the FELIX-3461-GSA.patch didn't work. And it can't work actually. By 
skipping all manipulated methods and fields at re-manipulation time,You are 
loosing all annotations those are moved to generated ones at first manipulation 
time. So you loose properties, transition methods, dependency ids, almost 
everything on both components and handlers. 

If you want to do it in ClassChecking time instead of rendering time, you have 
to make sure all annotations of ipojo are sticked to the original methods and 
fields, which clearly brokes IPojo's documented behaviour. And to do that also 
you have to introduce lots of custom codes into ClassCheckers and 
GeneratorAdaptors, because you can not do that to every annotation, you have to 
do that for only ipojo specific annotations.

The only bad-apple here is constructors, because they add an additional 
InstanceManager argument to generated constructor. To do that they must be 
manipulated in a way that renderer can handle them at re-manipulation time 
along with the others. And in case of rendering, the ManipulationMetadataFilter 
is not a viable solution. First of all it is searching all the attributes of 
all Elements against special headers, which is not performance wise. And it 
does not work correctly because you have to establish a match between 
manipulation methods and fields before blindly deleting them by looking at 
their method name. Also there is a TODO comment at the 
ManipulationMetadataFilter which depicts that. Also this is what 
ManipulationMetadataFixer at first patch is intended to do.


                
> Re-manipulation with annotated component produces corrupted MANIFEST
> --------------------------------------------------------------------
>
>                 Key: FELIX-3461
>                 URL: https://issues.apache.org/jira/browse/FELIX-3461
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>            Reporter: Göktürk Gezer
>              Labels: ipojo-manipulator
>         Attachments: FELIX-3461-GSA.patch, 
> org.apache.felix.ipojo.manipulator.patch
>
>
> As the manipulation process alters the annotations of original classes on 
> generated ones. It leaves it in inconsistent state for re-manipulation. While 
> re-manipulation process does not touch classes, re-manipulated bundle is 
> unable to function because of a corrupted MANIFEST.
> Broken MANIFEST is missing some handler declarations because of the filters 
> and have entries in manipulation section those should have been hided.

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


Reply via email to