You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2014/06/03 15:04:02 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=14016472#comment-14016472 ]
ASF GitHub Bot commented on KARAF-3017:
---------------------------------------
GitHub user grgrzybek opened a pull request:
https://github.com/apache/karaf/pull/40
[KARAF-3017] Return snapshot of repositories - fixes NPE in features:listurl
There were concurrency issues when both `features:listurl` and `features:removeurl` were invoked concurrently
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/grgrzybek/karaf KARAF-3017
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/karaf/pull/40.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #40
----
commit 023cede904ec501bbea5dea9107ad3cff2941279
Author: Grzegorz Grzybek <gr...@gmail.com>
Date: 2014-06-03T12:58:02Z
[KARAF-3017] Return snapshot of repositories - fixes NPE in features:listurl
----
> 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
>
> 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)