prevent concurrent modification exception while copying node tree

This commit is contained in:
Craig Raw 2022-07-14 15:30:39 +02:00
parent c4d2041a77
commit 67bc479ae9

View file

@ -325,7 +325,7 @@ public class WalletNode extends Persistable implements Comparable<WalletNode> {
copy.setId(getId());
copy.setLabel(label);
for(WalletNode child : getChildren()) {
for(WalletNode child : new ArrayList<>(getChildren())) {
copy.children.add(child.copy(walletCopy));
}