You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Robert Munteanu (Jira)" <ji...@apache.org> on 2020/09/22 14:23:00 UTC
[jira] [Assigned] (SLING-9722) AbstractSlingRepositoryManager.stop
throws NullPointerExceptions if invoked multiple times
[ https://issues.apache.org/jira/browse/SLING-9722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Munteanu reassigned SLING-9722:
--------------------------------------
Assignee: Robert Munteanu
> AbstractSlingRepositoryManager.stop throws NullPointerExceptions if invoked multiple times
> ------------------------------------------------------------------------------------------
>
> Key: SLING-9722
> URL: https://issues.apache.org/jira/browse/SLING-9722
> Project: Sling
> Issue Type: Bug
> Components: JCR
> Affects Versions: JCR Base 3.1.4
> Reporter: Robert Munteanu
> Assignee: Robert Munteanu
> Priority: Major
> Fix For: JCR Base 3.1.6
>
>
> The stop method has a check for the currentThread
> {code:java}
> if ( startupThread != Thread.currentThread() ) {
> waitForStartupThreadToComplete();
> startupThread = null;
> }
> {code}
> On the first invocation, the {{startupThread}} is not null, the if block is entered and the field is then set to null. On subsequent invocations, the condition will also be true, since {{startupThread == null}}, which will cause an NPE in the {{waitForStartupThreadToComplete}} method.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)