Ignore:
Timestamp:
2013-09-19T02:14:38+02:00 (13 years ago)
Author:
Don-vip
Message:

Sonar - fix recently introduced issues

Location:
trunk/src/org/openstreetmap/josm/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Diff.java

    r6224 r6235  
    945945        final int buffered_lines;
    946946
    947         /** Number of common prefix elements. */
    948         final int prefix_lines = 0;
    949 
    950947        /** Vector, indexed by line number, containing an equivalence code for
    951948           each line.  It is this vector that is actually compared with that
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r6172 r6235  
    116116     * Caches the image data for rotated versions of the same image.
    117117     */
    118     private static final Map<Image, Map<Long, ImageResource>> rotateCache = new HashMap<Image, Map<Long, ImageResource>>();
    119 
    120     private static final ExecutorService imageFetcher = Executors.newSingleThreadExecutor();
     118    private static final Map<Image, Map<Long, ImageResource>> ROTATE_CACHE = new HashMap<Image, Map<Long, ImageResource>>();
     119
     120    private static final ExecutorService IMAGE_FETCHER = Executors.newSingleThreadExecutor();
    121121
    122122    public interface ImageCallback {
     
    339339                }
    340340            };
    341             imageFetcher.submit(fetch);
     341            IMAGE_FETCHER.submit(fetch);
    342342        } else {
    343343            ImageIcon result = get();
     
    856856        ImageResource imageResource = null;
    857857
    858         synchronized (rotateCache) {
    859             Map<Long, ImageResource> cacheByAngle = rotateCache.get(img);
     858        synchronized (ROTATE_CACHE) {
     859            Map<Long, ImageResource> cacheByAngle = ROTATE_CACHE.get(img);
    860860            if (cacheByAngle == null) {
    861                 rotateCache.put(img, cacheByAngle = new HashMap<Long, ImageResource>());
     861                ROTATE_CACHE.put(img, cacheByAngle = new HashMap<Long, ImageResource>());
    862862            }
    863863           
Note: See TracChangeset for help on using the changeset viewer.