Uploaded image for project: 'Apache Curator'
  1. Apache Curator
  2. CURATOR-395

Potential null dereference in PersistentNode

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 4.0.0, 2.13.0
    • None
    • None

    Description

                  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());
      

      Before calling withMode(), localCreateMethod should be checked against null.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            randgalt Jordan Zimmerman
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment