Project

General

Profile

« Previous | Next » 

Revision 676ed1a9

Added by Andreas Müller almost 6 years ago

ref #7388 fix error in new removeRelationWithTaxonName

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/TaxonName.java
1784 1784

  
1785 1785
    public void removeRelationWithTaxonName(TaxonName otherTaxonName, Direction direction, NameRelationshipType type) {
1786 1786

  
1787
        for(NameRelationship nameRelationship : relationsWithThisName(direction)) {
1787
        Set<NameRelationship> tmpRels = new HashSet<>(relationsWithThisName(direction));
1788
        for(NameRelationship nameRelationship : tmpRels) {
1788 1789
            if (direction.equals(Direction.relatedFrom) && nameRelationship.getToName().equals(otherTaxonName) ||
1789 1790
                    direction.equals(Direction.relatedTo) && nameRelationship.getFromName().equals(otherTaxonName)) {
1790
                this.removeNameRelationship(nameRelationship);
1791
                if (type == null || type.equals(nameRelationship.getType())){
1792
                    this.removeNameRelationship(nameRelationship);
1793
                }
1791 1794
            }
1792 1795
        }
1793 1796
    }

Also available in: Unified diff