[
https://issues.apache.org/jira/browse/FELIX-468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Felix Meschberger closed FELIX-468.
-----------------------------------
Resolution: Fixed
Fix Version/s: 1.0.3
Deployed new SNAPSHOT build 1.0.3-20080122.100638-1.
Scheduling for next SCR plugin release and closing this issue now.
> Duplicate Bind and Unbind methods may be created
> ------------------------------------------------
>
> Key: FELIX-468
> URL: https://issues.apache.org/jira/browse/FELIX-468
> Project: Felix
> Issue Type: Bug
> Components: Maven SCR Plugin
> Affects Versions: 1.0.2
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: 1.0.3
>
> Attachments: FELIX-468.patch
>
>
> Consider an abstract base class BC and a concrete extension CC of the base
> class. The base class BC defines a reference and has the SCR plugin generate
> the bind/unbind methods. The extension class CC inherits the reference
> definition but the bind/unbind methods need not be created as they already
> exist on the base class.
> The SCR plugin correctly handles this situation if the base class BC is
> treated before the extension class CC. If first the extension class CC is
> handled, the base class has not be handled yet, so the bind/unbind methods
> will be generated on the extension class. Next the base class is handled and
> the bind/unbind methods are created again.
> Clearly the definition of the bind/unbind methods on the extension class is
> not needed - and may even result in runtime errors if the bind/unbind methods
> in the extension class are created to access private fields of the base class
> intended for use by the base class bind/unbind methods.
> This only happens if both the base class and the extension class are located
> in the same project. The proposed solution to this issue is to sort the
> classes to be handled according to their inheritence to ensure handling base
> classes before their extensions.
> Will provide a patch for this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.