Ignore:
Timestamp:
2023-01-17T14:13:17+01:00 (22 months ago)
Author:
taylor.smock
Message:

Fix #22626: Geotagged images from GPX files cannot be closed when rotated by exif data

This is due to the initial implementation of RemoteEntry#equals using the
width and height fields for calculating hashCode and equals. Since we may
set those two fields when showing the image, it does not make sense to use
them for hashCode or equals.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/RemoteEntryTest.java

    r18622 r18635  
    2020                () -> null, () -> null, () -> null, () -> null);
    2121        EqualsVerifier.simple().forClass(RemoteEntry.class).usingGetClass()
    22                 .withIgnoredFields("firstImage", "lastImage", "nextImage", "previousImage")
     22                .withIgnoredFields("firstImage", "lastImage", "nextImage", "previousImage" /* These suppliers don't have good == semantics */,
     23                        "width", "height" /* Width and height can be corrected later, although it is originally from exif, see #22626 */)
    2324                .withNonnullFields("uri")
    2425                .withPrefabValues(RemoteEntry.class, remoteEntryA, remoteEntryB)
Note: See TracChangeset for help on using the changeset viewer.