Changeset 17580 in josm for trunk


Ignore:
Timestamp:
2021-03-17T18:58:40+01:00 (4 years ago)
Author:
Don-vip
Message:

fix #20598 - fix ImageEntryTest.testEqualsContract (patch by taylor.smock)

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java

    r17579 r17580  
    106106    @Override
    107107    public int hashCode() {
    108         return Objects.hash(super.hashCode(), thumbnail);
     108        return Objects.hash(super.hashCode(), thumbnail, dataSet);
    109109    }
    110110
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/ImageEntryTest.java

    r17275 r17580  
    55
    66import java.io.File;
     7import java.util.ArrayList;
    78
    89import org.junit.jupiter.api.Test;
    910import org.openstreetmap.josm.TestUtils;
     11import org.openstreetmap.josm.data.ImageData;
    1012import org.openstreetmap.josm.data.gpx.GpxImageEntry;
    1113
     
    3739            .suppress(Warning.NONFINAL_FIELDS)
    3840            .withPrefabValues(GpxImageEntry.class, new GpxImageEntry(new File("foo")), new GpxImageEntry(new File("bar")))
     41            .withPrefabValues(ImageData.class, new ImageData(), new ImageData(new ArrayList<>()))
    3942            .verify();
    4043    }
Note: See TracChangeset for help on using the changeset viewer.