You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by GitBox <gi...@apache.org> on 2021/03/09 01:50:27 UTC

[GitHub] [curator] Randgalt commented on a change in pull request #380: [CURATOR-590] Add option to disable parent creation for PersistentNode

Randgalt commented on a change in pull request #380:
URL: https://github.com/apache/curator/pull/380#discussion_r589879901



##########
File path: curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/PersistentNode.java
##########
@@ -462,7 +484,12 @@ else if ( existingPath != null && mode.isSequential() )
             if ( localCreateMethod == null )
             {
                 CreateBuilderMain createBuilder = mode.isTTL() ? client.create().withTtl(ttl) : client.create();
-                CreateModable<ACLBackgroundPathAndBytesable<String>> tempCreateMethod = useProtection ? createBuilder.creatingParentContainersIfNeeded().withProtection() : createBuilder.creatingParentContainersIfNeeded();
+                CreateModable<ACLBackgroundPathAndBytesable<String>> tempCreateMethod;
+                if (useParentCreation) {
+                    tempCreateMethod = useProtection ? createBuilder.creatingParentContainersIfNeeded().withProtection() : createBuilder.creatingParentContainersIfNeeded();

Review comment:
       I've done things like that before. It seems OK




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org