Revision 67518a48
Added by Andreas Müller over 3 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/taxon/Taxon.java | ||
---|---|---|
1709 | 1709 |
result = (Taxon)super.clone(); |
1710 | 1710 |
|
1711 | 1711 |
result.setRelationsFromThisTaxon(new HashSet<>()); |
1712 |
result.setRelationsToThisTaxon(new HashSet<>()); |
|
1712 | 1713 |
|
1713 | 1714 |
if (withTaxonRelations){ |
1714 | 1715 |
for (TaxonRelationship fromRelationship : this.getRelationsFromThisTaxon()){ |
... | ... | |
1717 | 1718 |
result.relationsFromThisTaxon.add(newRelationship); |
1718 | 1719 |
} |
1719 | 1720 |
|
1720 |
result.setRelationsToThisTaxon(new HashSet<>()); |
|
1721 | 1721 |
for (TaxonRelationship toRelationship : this.getRelationsToThisTaxon()){ |
1722 | 1722 |
TaxonRelationship newRelationship = toRelationship.clone(); |
1723 | 1723 |
newRelationship.setRelatedTo(result); |
Also available in: Unified diff
ref #4866, ref #9228 implement subtree clone (cont., fix taxon cloning)