Changeset 29833 in osm for applications/editors/josm


Ignore:
Timestamp:
2013-08-06T22:20:53+02:00 (11 years ago)
Author:
donvip
Message:

[josm_czechaddress] fix #josm8932 - ConcurrentModificationException

Location:
applications/editors/josm/plugins/czechaddress
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/CzechAddressPlugin.java

    r29784 r29833  
    6464
    6565        String filename = getPluginDir() + "-log.xml";
    66         /*final Logger[] loggers = new Logger[]
    67             {logger, Reasoner.logger, ConflictResolver.logger};*/
    6866
    6967        try {
     
    176174    }
    177175
    178     static private Set<StatusListener> listeners = new HashSet<StatusListener>();
    179     static public void addStatusListener(StatusListener l)    {listeners.add(l);}
    180     static public void removeStatusListener(StatusListener l) {listeners.remove(l);}
    181     static public void broadcastStatusChange(int statusMessage) {
     176    static private final Set<StatusListener> listeners = new HashSet<StatusListener>();
     177    static public synchronized void addStatusListener(StatusListener l)    {listeners.add(l);}
     178    static public synchronized void removeStatusListener(StatusListener l) {listeners.remove(l);}
     179    static public synchronized void broadcastStatusChange(int statusMessage) {
    182180        for (StatusListener listener : listeners)
    183181            listener.pluginStatusChanged(statusMessage);
Note: See TracChangeset for help on using the changeset viewer.