Ignore:
Timestamp:
2017-07-30T17:07:42+02:00 (7 years ago)
Author:
Don-vip
Message:

partial revert of r12537

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoaderJob.java

    r12537 r12542  
    5151    // we need another deduplication of Tile Loader listeners, as for each submit, new TMSCachedTileLoaderJob was created
    5252    // that way, we reduce calls to tileLoadingFinished, and general CPU load due to surplus Map repaints
    53     private static final ConcurrentMap<String, Set<TileLoaderListener>> IN_PROGRESS = new ConcurrentHashMap<>();
     53    private static final ConcurrentMap<String, Set<TileLoaderListener>> inProgress = new ConcurrentHashMap<>();
    5454
    5555    /**
     
    7171        if (listener != null) {
    7272            String deduplicationKey = getCacheKey();
    73             synchronized (IN_PROGRESS) {
    74                 Set<TileLoaderListener> newListeners = IN_PROGRESS.get(deduplicationKey);
     73            synchronized (inProgress) {
     74                Set<TileLoaderListener> newListeners = inProgress.get(deduplicationKey);
    7575                if (newListeners == null) {
    7676                    newListeners = new HashSet<>();
    77                     IN_PROGRESS.put(deduplicationKey, newListeners);
     77                    inProgress.put(deduplicationKey, newListeners);
    7878                }
    7979                newListeners.add(listener);
     
    162162        this.attributes = attributes; // as we might get notification from other object than our selfs, pass attributes along
    163163        Set<TileLoaderListener> listeners;
    164         synchronized (IN_PROGRESS) {
    165             listeners = IN_PROGRESS.remove(getCacheKey());
     164        synchronized (inProgress) {
     165            listeners = inProgress.remove(getCacheKey());
    166166        }
    167167        boolean status = result.equals(LoadResult.SUCCESS);
Note: See TracChangeset for help on using the changeset viewer.