Changeset 19508 in josm for trunk/src/org


Ignore:
Timestamp:
2026-02-11T09:15:31+01:00 (41 hours ago)
Author:
stoecker
Message:

PMD fixes

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/vectortile/mapbox/MapboxVectorCachedTileLoader.java

    r17867 r19508  
    7777        return DEFAULT_DOWNLOAD_JOB_DISPATCHER;
    7878    }
     79   
     80    public static void shutdown() {
     81        DEFAULT_DOWNLOAD_JOB_DISPATCHER.shutdownNow();
     82    }
    7983}
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledTiledMapRenderer.java

    r19220 r19508  
    5252    private int zoom;
    5353    private Consumer<TileZXY> notifier;
    54     private final ExecutorService worker;
    5554
    5655    /**
     
    6665    public StyledTiledMapRenderer(Graphics2D g, NavigatableComponent nc, boolean isInactiveMode) {
    6766        super(g, nc, isInactiveMode);
    68         this.worker = MainApplication.worker;
    6967    }
    7068
     
    7674            return;
    7775        }
    78         final Executor worker = this.worker;
    7976        final BufferedImage tempImage;
    8077        final Graphics2D tempG2d;
     
    132129                // FIXME figure out how to make this thread safe? Probably not necessary, since UI isn't blocked, but it would be a nice to have
    133130                TileLoader loader = new TileLoader(data, tile, tileSize, new ArrayList<>());
    134                 worker.execute(loader);
     131                MainApplication.worker.execute(loader);
    135132                if (tImg == null) {
    136133                    this.cache.put(tile, new ImageCache(null, loader, false));
     
    162159        // Force another render pass if there may be more tiles to render
    163160        if (submittedTile <= 0) {
    164             worker.execute(nc::invalidate);
     161            MainApplication.worker.execute(nc::invalidate);
    165162        }
    166163        final double percentDrawn = 100 * painted / (double) toRender.size();
Note: See TracChangeset for help on using the changeset viewer.