Ticket #20598: 20598.3.patch
| File 20598.3.patch, 1.8 KB (added by , 5 years ago) |
|---|
-
src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java
105 105 106 106 @Override 107 107 public int hashCode() { 108 return Objects.hash(super.hashCode(), thumbnail );108 return Objects.hash(super.hashCode(), thumbnail, dataSet); 109 109 } 110 110 111 111 @Override -
test/unit/org/openstreetmap/josm/gui/layer/geoimage/ImageEntryTest.java
4 4 import static org.junit.jupiter.api.Assertions.assertNotNull; 5 5 6 6 import java.io.File; 7 import java.util.ArrayList; 7 8 8 9 import org.junit.jupiter.api.Test; 9 10 import org.openstreetmap.josm.TestUtils; 11 import org.openstreetmap.josm.data.ImageData; 10 12 import org.openstreetmap.josm.data.gpx.GpxImageEntry; 11 13 12 14 import nl.jqno.equalsverifier.EqualsVerifier; … … 34 36 void testEqualsContract() { 35 37 TestUtils.assumeWorkingEqualsVerifier(); 36 38 EqualsVerifier.forClass(ImageEntry.class).usingGetClass() 37 .suppress(Warning.NONFINAL_FIELDS) 38 .withPrefabValues(GpxImageEntry.class, new GpxImageEntry(new File("foo")), new GpxImageEntry(new File("bar"))) 39 .suppress(Warning.NONFINAL_FIELDS) 40 .withPrefabValues(GpxImageEntry.class, 41 new GpxImageEntry(new File("foo")), 42 new GpxImageEntry(new File("bar"))) 43 .withPrefabValues(ImageData.class, new ImageData(), new ImageData(new ArrayList<>())) 39 44 .verify(); 40 45 } 41 46 }
