You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Modestas Vainius (JIRA)" <ji...@apache.org> on 2014/09/18 18:35:33 UTC

[jira] [Issue Comment Deleted] (FELIX-4647) Incorrect check of the NO_LOCAL_RESOURCES flag in ResolverImpl:resolve()

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

Modestas Vainius updated FELIX-4647:
------------------------------------
    Comment: was deleted

(was: Likewise:

{code:title=ResolverImpl:547}
if ((flags & NO_OPTIONAL_RESOURCES) == 0)
{
    resources = getOptionalResources();
    for (int i = 0; (resources != null) && (i < resources.length); i++)
    {
        deployMap.put(resources[i], resources[i]);
    }
}
{code}

should be:

{code}
 if ((flags & NO_OPTIONAL_RESOURCES) != 0)
{code}

I suppose)

> Incorrect check of the NO_LOCAL_RESOURCES flag in ResolverImpl:resolve()
> ------------------------------------------------------------------------
>
>                 Key: FELIX-4647
>                 URL: https://issues.apache.org/jira/browse/FELIX-4647
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.6.6
>            Reporter: Modestas Vainius
>
> Hello,
> if I understand correctly, the following code is wrong
> {code:title=ResolverImpl.java:227}
> if ((flags & NO_LOCAL_RESOURCES) == 0)
> {
>     m_requiredSet.removeAll(Arrays.asList(locals));
> }
> {code}
> {code:title=ResolverImpl.java:233}
> if ((flags & NO_LOCAL_RESOURCES) == 0)
> {
>     m_optionalSet.removeAll(Arrays.asList(locals));
> }
> {code}
> I believe, in both cases the conditional should be:
> {code}
> if ((flags & NO_LOCAL_RESOURCES) != 0)
> {code}
> Due to this bug I'm seeing some important bundles getting auto-uninstalled from ServiceMix container when they are not supposed be. This breaks feature uninstall.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)