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



##########
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 can't think of any workaround to do that in a better way 😕 




----------------------------------------------------------------
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:
[email protected]


Reply via email to