You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Freeman Fang (JIRA)" <ji...@apache.org> on 2014/07/04 10:47:33 UTC

[jira] [Resolved] (KARAF-3017) Concurrency issues in FeaturesService related to add/remove/list operations

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

Freeman Fang resolved KARAF-3017.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3.6
                   3.0.2
                   2.4.0

apply patch on behalf of Grzegorz Grzybek with thanks
http://git-wip-us.apache.org/repos/asf/karaf/commit/b8141fd7 for karaf-2.x branch
http://git-wip-us.apache.org/repos/asf/karaf/commit/61109a0b for karaf-2.3.x branch
http://git-wip-us.apache.org/repos/asf/karaf/commit/d487bfe8 for karaf-3.0.x branch

> Concurrency issues in FeaturesService related to add/remove/list operations
> ---------------------------------------------------------------------------
>
>                 Key: KARAF-3017
>                 URL: https://issues.apache.org/jira/browse/KARAF-3017
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 3.0.1, 2.3.5
>            Reporter: Grzegorz Grzybek
>            Assignee: Freeman Fang
>             Fix For: 2.4.0, 3.0.2, 2.3.6
>
>
> I have concurrent scripts (using shell {{bin/client.sh}} commands) which invoke {{features:listurl}}, {{features:addurl}} and {{features:removeurl}}.
> Sometimes I get {{NullPointerException}} here:
> {code:java}
>     public Repository[] listRepositories() {
>         Collection<Repository> repos = repositories.values();
>         return repos.toArray(new Repository[repos.size()]);
>     }
> {code}
> when {{org.apache.karaf.features.internal.FeaturesServiceImpl#removeRepository(java.net.URI)}} is invoked between {{repos.size()}} and {{repos.toArray()}}.



--
This message was sent by Atlassian JIRA
(v6.2#6252)