You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "mreutegg (via GitHub)" <gi...@apache.org> on 2023/07/10 08:29:57 UTC

[GitHub] [jackrabbit-oak] mreutegg commented on a diff in pull request #1017: OAK-10340: Child order not updated on source after move

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


##########
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:
   Right. I forgot to mention this. I'll add a note to the JIRA issue.



-- 
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: dev-unsubscribe@jackrabbit.apache.org

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