Changeset 7079 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2014-05-08T15:15:11+02:00 (11 years ago)
Author:
Don-vip
Message:

fix some unit tests

File:
1 edited

Legend:

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

    r7005 r7079  
    4646
    4747    /** the cached changesets */
    48     private final Map<Integer, Changeset> cache  = new HashMap<>();
     48    private final Map<Integer, Changeset> cache = new HashMap<>();
    4949
    5050    private final CopyOnWriteArrayList<ChangesetCacheListener> listeners =
     
    5656
    5757    public void addChangesetCacheListener(ChangesetCacheListener listener) {
    58         listeners.addIfAbsent(listener);
     58        if (listener != null) {
     59            listeners.addIfAbsent(listener);
     60        }
    5961    }
    6062
    6163    public void removeChangesetCacheListener(ChangesetCacheListener listener) {
    62         listeners.remove(listener);
     64        if (listener != null) {
     65            listeners.remove(listener);
     66        }
    6367    }
    6468
Note: See TracChangeset for help on using the changeset viewer.