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 2014/04/28 15:33:15 UTC

[jira] [Commented] (SLING-3522) NPE on startup in ChangeStateTask.getSortKey

    [ 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)