return new parent copy in merge

This commit is contained in:
Keith Donald
2009-04-07 22:44:11 +00:00
parent 0570108b8c
commit 301722dbb2

View File

@@ -90,7 +90,11 @@ public abstract class AbstractModel implements Model {
*/
protected LinkedList merge(LinkedList child, LinkedList parent, boolean addAtEnd) {
if (child == null) {
return parent;
if (parent == null) {
return null;
} else {
return new LinkedList(parent);
}
} else if (parent == null) {
return child;
} else {