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

Carsten Ziegeler commented on SLING-3522:
-----------------------------------------

I think the methods of the ResourceChangeListener should not modify the state 
directly but wait a cycle - like we do with new/updated resources.

> NPE on startup in ChangeStateTask.getSortKey
> --------------------------------------------
>
>                 Key: SLING-3522
>                 URL: https://issues.apache.org/jira/browse/SLING-3522
>             Project: Sling
>          Issue Type: Bug
>          Components: Installer
>    Affects Versions: Installer Core 3.5.0
>            Reporter: Philipp Marx
>            Assignee: Carsten Ziegeler
>             Fix For: Installer Core 3.5.2
>
>
> ChangeStateTask.getSortKey will internally call getResource().getEntityId(), 
> whereas getResource() might return null.
> I tracked this down on my system to be a concurrency issue where the 
> ResourceState of the task is being updated from UNINSTALL to INSTALLED by an 
> update event. Since the state is now INSTALLED getResource() will return null 
> since it is checking for resource in state UNINSTALL oder INSTALL.



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

Reply via email to