You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2008/03/11 08:10:46 UTC

[jira] Updated: (FELIX-468) Duplicate Bind and Unbind methods may be created

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

Carsten Ziegeler updated FELIX-468:
-----------------------------------

    Affects Version/s:     (was: felix-1.0.2)
                       maven-scr-plugin-1.0.2
        Fix Version/s:     (was: felix-1.0.3)
                       maven-scr-plugin-1.0.3

> 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: maven-scr-plugin-1.0.2
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: maven-scr-plugin-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.