Ignore:
Timestamp:
2020-05-17T17:02:28+02:00 (4 years ago)
Author:
simon04
Message:

see #19251 - Java 8: use Stream

File:
1 edited

Legend:

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

    r14273 r16445  
    239239    @Override
    240240    public synchronized int hashCode() {
    241         int h = 0;
    242         if (hash != null) {
    243             for (T t : this) {
    244                 h += hash.getHashCode(t);
    245             }
    246         }
    247         return h;
     241        if (hash == null) {
     242            return 0;
     243        }
     244        return this.stream().mapToInt(hash::getHashCode).sum();
    248245    }
    249246
Note: See TracChangeset for help on using the changeset viewer.