Changeset 14212 in josm
- Timestamp:
- 2018-08-31T23:45:00+02:00 (6 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java
r14206 r14212 327 327 @Override 328 328 public void otherDatasetChange(AbstractDatasetChangedEvent event) { 329 if ( !DatasetEventType.FILTERS_CHANGED.equals(event.getType())) {329 if (DatasetEventType.FILTERS_CHANGED != event.getType()) { 330 330 filterModel.executeFilters(); 331 331 } -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r14209 r14212 759 759 760 760 @Override 761 public void layerRemoving(LayerRemoveEvent e) {} 762 763 @Override 764 public void layerOrderChanged(LayerOrderChangeEvent e) {} 761 public void layerRemoving(LayerRemoveEvent e) { 762 // Not used 763 } 764 765 @Override 766 public void layerOrderChanged(LayerOrderChangeEvent e) { 767 // Not used 768 } 765 769 } 766 770 -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java
r14205 r14212 5 5 import java.io.File; 6 6 import java.util.Collections; 7 import java.util.Objects; 7 8 8 9 import org.openstreetmap.josm.data.gpx.GpxImageEntry; … … 63 64 } 64 65 } 66 67 @Override 68 public int hashCode() { 69 return 31 * super.hashCode() + ((thumbnail == null) ? 0 : thumbnail.hashCode()); 70 } 71 72 @Override 73 public boolean equals(Object obj) { 74 if (this == obj) 75 return true; 76 if (!super.equals(obj) || getClass() != obj.getClass()) 77 return false; 78 ImageEntry other = (ImageEntry) obj; 79 return Objects.equals(thumbnail, other.thumbnail); 80 } 65 81 } -
trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/ImageEntryTest.java
r9669 r14212 8 8 import org.junit.Test; 9 9 import org.openstreetmap.josm.TestUtils; 10 import org.openstreetmap.josm.data.gpx.GpxImageEntry; 11 12 import nl.jqno.equalsverifier.EqualsVerifier; 13 import nl.jqno.equalsverifier.Warning; 10 14 11 15 /** … … 23 27 assertNotNull(e.getExifTime()); 24 28 } 29 30 /** 31 * Unit test of methods {@link ImageEntry#equals} and {@link ImageEntry#hashCode}. 32 */ 33 @Test 34 public void testEqualsContract() { 35 TestUtils.assumeWorkingEqualsVerifier(); 36 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 .verify(); 40 } 25 41 }
Note:
See TracChangeset
for help on using the changeset viewer.