Skip to content

Commit 7daeff0

Browse files
committed
fix: VariationNode::stealChildrenOf once again
We have to create a copy of the children list because it is cleared by some implementations of removeAllChildren(). So effectively, no children were added via addChildren.
1 parent db2fccf commit 7daeff0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/org/variantsync/diffdetective/variation/tree/VariationNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ public void drop() {
282282
* @see removeAllChildren
283283
*/
284284
public void stealChildrenOf(final T other) {
285-
List<T> children = other.getChildren();
285+
List<T> children = new ArrayList<>(other.getChildren());
286286
other.removeAllChildren();
287287
addChildren(children);
288288
}

0 commit comments

Comments
 (0)