You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2012/06/03 15:50:22 UTC

[jira] [Commented] (SLING-2500) NPE in SortingServiceTracker#getSortedServices

    [ https://issues.apache.org/jira/browse/SLING-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13288160#comment-13288160 ] 

Carsten Ziegeler commented on SLING-2500:
-----------------------------------------

The method #getSortedServiceReferences had the same problem, this is now fixed as well
                
> NPE in SortingServiceTracker#getSortedServices
> ----------------------------------------------
>
>                 Key: SLING-2500
>                 URL: https://issues.apache.org/jira/browse/SLING-2500
>             Project: Sling
>          Issue Type: Bug
>          Components: Installer
>    Affects Versions: Installer Core 3.3.6
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>             Fix For: Installer Core 3.3.8
>
>
> If the sorting service tracker is called by different threads, this can lead to a NPE in getSortedServices() or any
> downstream clients.
> The method first checks whether this.sortedServiceCache is null, if not (or if it is outdated), it is created
> However if duing method execution a new service is added (or removed), this.sortedServiceCache gets
> set null, which may result in NPEs

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira