curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CURATOR-395) Potential null dereference in PersistentNode
Date Tue, 18 Apr 2017 00:01:24 GMT

    [ https://issues.apache.org/jira/browse/CURATOR-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15971857#comment-15971857
] 

ASF GitHub Bot commented on CURATOR-395:
----------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/curator/pull/213


> 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
>             Fix For: 3.3.1, 2.12.1
>
>
> {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)

Mime
View raw message