Skip to content

Commit

Permalink
'#39: fix DecisionNode clone method call
Browse files Browse the repository at this point in the history
  • Loading branch information
lfcnassif committed Apr 12, 2024
1 parent 8c88e00 commit 02c580f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,15 @@ public void invert() {
this.inverted = !inverted;
}

@Override
public DecisionNode clone() {
DecisionNode clone = new DecisionNode();
clone.parent = this.parent;
clone.inverted = this.inverted;
for (DecisionNode child : this.children) {
clone.children.add(child.clone());
}
return clone;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public boolean importData(TransferSupport support) {
OperandNode operand = (OperandNode) data.getTransferData(operandNodeFlavor);
if (operand != null) {
if (support.getDropAction() == COPY) {
DecisionNode dn = (DecisionNode) clone(operand);
DecisionNode dn = operand.clone();
if (dn != null) {
dest.addDecisionNode(dn);
} else {
Expand All @@ -224,8 +224,4 @@ public boolean importData(TransferSupport support) {

}

private Object clone(Object object) {
return object;
}

}

0 comments on commit 02c580f

Please sign in to comment.