Project

General

Profile

Revision 676ed1a9

ID676ed1a9e5972df1d331d67f1bb1f045e0dccb9f
Parent 8b77816d
Child 59734b3b

Added by Andreas Müller over 2 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

Add picture from clipboard (Maximum size: 40 MB)