Changeset 17860 in josm for trunk


Ignore:
Timestamp:
2021-05-04T21:01:14+02:00 (4 years ago)
Author:
simon04
Message:

fix #20841 - Fix NPE at org.openstreetmap.josm.data.osm.Storage$1.getHashCode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/Storage.java

    r17787 r17860  
    99import java.util.Map;
    1010import java.util.NoSuchElementException;
     11import java.util.Objects;
    1112import java.util.Set;
    1213
     
    402403            @Override
    403404            public int getHashCode(O t) {
    404                 return t.hashCode();
     405                return Objects.hashCode(t);
    405406            }
    406407
    407408            @Override
    408409            public boolean equals(O t1, O t2) {
    409                 return t1.equals(t2);
     410                return Objects.equals(t1, t2);
    410411            }
    411412        };
Note: See TracChangeset for help on using the changeset viewer.