Changeset 15629 in josm


Ignore:
Timestamp:
2020-01-04T19:40:53+01:00 (4 years ago)
Author:
Don-vip
Message:

fix #18511 - Remove GpxExtension parent from equals contract (patch by Bjoeni)

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/gpx/GpxExtension.java

    r15504 r15629  
    234234    @Override
    235235    public int hashCode() {
    236         return Objects.hash(prefix, key, value, attr, parent, visible, super.hashCode());
     236        return Objects.hash(prefix, key, value, attr, visible, super.hashCode());
    237237    }
    238238
     
    270270        } else if (!attr.equals(other.attr))
    271271            return false;
    272         if (parent == null) {
    273             if (other.parent != null)
    274                 return false;
    275         } else if (!parent.equals(other.parent))
    276             return false;
    277272        return true;
    278273    }
  • trunk/test/unit/org/openstreetmap/josm/data/gpx/GpxExtensionTest.java

    r15496 r15629  
    3939        EqualsVerifier.forClass(GpxExtension.class).usingGetClass()
    4040        .suppress(Warning.NONFINAL_FIELDS)
    41         .withIgnoredFields("qualifiedName")
     41        .withIgnoredFields("qualifiedName", "parent")
    4242        .withPrefabValues(GpxExtensionCollection.class, new GpxExtensionCollection(), col)
    4343        .verify();
Note: See TracChangeset for help on using the changeset viewer.