Ignore:
Timestamp:
2017-03-08T21:18:57+01:00 (7 years ago)
Author:
Don-vip
Message:

more usages of Utils.clamp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java

    r11386 r11702  
    323323        // we will run up to MAX_DOWNLOAD_THREADS concurrent fetchers.
    324324        int threadsNumber = Main.pref.getInteger("osm.download.threads", OsmApi.MAX_DOWNLOAD_THREADS);
    325         threadsNumber = Math.min(Math.max(threadsNumber, 1), OsmApi.MAX_DOWNLOAD_THREADS);
     325        threadsNumber = Utils.clamp(threadsNumber, 1, OsmApi.MAX_DOWNLOAD_THREADS);
    326326        final ExecutorService exec = Executors.newFixedThreadPool(
    327327                threadsNumber, Utils.newThreadFactory(getClass() + "-%d", Thread.NORM_PRIORITY));
Note: See TracChangeset for help on using the changeset viewer.