Robert Munteanu created SLING-9722:
--------------------------------------

             Summary: 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
             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)

Reply via email to