Ted Yu created CURATOR-395:
------------------------------

             Summary: Potential null dereference in PersistentNode
                 Key: CURATOR-395
                 URL: https://issues.apache.org/jira/browse/CURATOR-395
             Project: Apache Curator
          Issue Type: Bug
            Reporter: Ted Yu
            Assignee: Jordan Zimmerman
            Priority: Minor


{code}
            if ( localCreateMethod == null )
            {
                CreateModable<ACLBackgroundPathAndBytesable<String>> 
tempCreateMethod = useProtection ? 
client.create().creatingParentContainersIfNeeded().withProtection() : 
client.create().creatingParentContainersIfNeeded();
                if ( createMethod.compareAndSet(null, tempCreateMethod) )
                {
                    localCreateMethod = tempCreateMethod;
                }
            }
            localCreateMethod.withMode(getCreateMode(existingPath != 
null)).inBackground(backgroundCallback).forPath(createPath, data.get());
{code}
Before calling withMode(), localCreateMethod should be checked against null.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to