[ https://issues.apache.org/jira/browse/KARAF-3017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15029637#comment-15029637 ] ASF GitHub Bot commented on KARAF-3017: --------------------------------------- Github user asfgit closed the pull request at: https://github.com/apache/karaf/pull/40 > 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 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.3.4#6332)