Ignore:
Timestamp:
2014-04-26T17:39:23+02:00 (10 years ago)
Author:
Don-vip
Message:

see #8465 - use diamond operator where applicable

File:
1 edited

Legend:

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

    r7004 r7005  
    7575     */
    7676    public MultiFetchServerObjectReader() {
    77         nodes = new LinkedHashSet<Long>();
    78         ways = new LinkedHashSet<Long>();
    79         relations = new LinkedHashSet<Long>();
     77        nodes = new LinkedHashSet<>();
     78        ways = new LinkedHashSet<>();
     79        relations = new LinkedHashSet<>();
    8080        this.outputDataSet = new DataSet();
    81         this.missingPrimitives = new LinkedHashSet<PrimitiveId>();
     81        this.missingPrimitives = new LinkedHashSet<>();
    8282    }
    8383
     
    238238     */
    239239    protected Set<Long> extractIdPackage(Set<Long> ids) {
    240         HashSet<Long> pkg = new HashSet<Long>();
     240        HashSet<Long> pkg = new HashSet<>();
    241241        if (ids.isEmpty())
    242242            return pkg;
     
    333333        progressMonitor.setTicks(0);
    334334        // The complete set containg all primitives to fetch
    335         Set<Long> toFetch = new HashSet<Long>(ids);
     335        Set<Long> toFetch = new HashSet<>(ids);
    336336        // Build a list of fetchers that will  download smaller sets containing only MAX_IDS_PER_REQUEST (200) primitives each.
    337337        // we will run up to MAX_DOWNLOAD_THREADS concurrent fetchers.
     
    339339        threadsNumber = Math.min(Math.max(threadsNumber, 1), OsmApi.MAX_DOWNLOAD_THREADS);
    340340        Executor exec = Executors.newFixedThreadPool(threadsNumber);
    341         CompletionService<FetchResult> ecs = new ExecutorCompletionService<FetchResult>(exec);
    342         List<Future<FetchResult>> jobs = new ArrayList<Future<FetchResult>>();
     341        CompletionService<FetchResult> ecs = new ExecutorCompletionService<>(exec);
     342        List<Future<FetchResult>> jobs = new ArrayList<>();
    343343        while (!toFetch.isEmpty()) {
    344344            jobs.add(ecs.submit(new Fetcher(type, extractIdPackage(toFetch), progressMonitor)));
     
    388388        progressMonitor.beginTask(trn("Downloading {0} object from ''{1}''", "Downloading {0} objects from ''{1}''", n, n, OsmApi.getOsmApi().getBaseUrl()));
    389389        try {
    390             missingPrimitives = new HashSet<PrimitiveId>();
     390            missingPrimitives = new HashSet<>();
    391391            if (isCanceled()) return null;
    392392            fetchPrimitives(ways,OsmPrimitiveType.WAY, progressMonitor);
Note: See TracChangeset for help on using the changeset viewer.