Ignore:
Timestamp:
2009-12-19T10:47:49+01:00 (10 years ago)
Author:
jttt
Message:

Fixed #4161 Major slowdown in recent versions, used correct pattern for listeners realized using CopyOnWriteArrayList

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java

    r2512 r2655  
    4242
    4343    public void addConflictListener(IConflictListener listener) {
    44         if (listener != null && ! listeners.contains(listener)) {
    45             listeners.add(listener);
     44        if (listener != null) {
     45            listeners.addIfAbsent(listener);
    4646        }
    4747    }
    4848
    4949    public void removeConflictListener(IConflictListener listener) {
    50         if (listener != null) {
    51             listeners.remove(listener);
    52         }
     50        listeners.remove(listener);
    5351    }
    5452
Note: See TracChangeset for help on using the changeset viewer.