mreutegg commented on code in PR #1017:
URL: https://github.com/apache/jackrabbit-oak/pull/1017#discussion_r1257949982


##########
oak-core/src/main/java/org/apache/jackrabbit/oak/core/MutableTree.java:
##########
@@ -264,11 +264,14 @@ void setParentAndName(@NotNull MutableTree parent, 
@NotNull String name) {
      * @param newName   new name for this tree
      */
     boolean moveTo(@NotNull MutableTree newParent, @NotNull String newName) {
-        name = checkNotNull(newName);
-        parent = checkNotNull(newParent);
+        checkNotNull(newName);
+        checkNotNull(newParent);
+        MutableTree oldParent = parent;
         boolean success = nodeBuilder.moveTo(newParent.nodeBuilder, newName);
         if (success) {
-            parent.updateChildOrder(false);
+            name = newName;
+            parent = newParent;

Review Comment:
   Done with 
https://github.com/apache/jackrabbit-oak/pull/1017/commits/f23db0f19ea64d82f7fb771467ba75626f63aaf7



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to