Changeset 19063 in josm


Ignore:
Timestamp:
2024-04-27T09:11:12+02:00 (7 months ago)
Author:
GerdP
Message:

see #21881: revert unintended change for different ticket

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java

    r19062 r19063  
    1010import java.util.ArrayList;
    1111import java.util.Collection;
    12 import java.util.Iterator;
    1312import java.util.LinkedHashSet;
    1413import java.util.List;
     
    1716
    1817import org.openstreetmap.josm.data.osm.Changeset;
    19 import org.openstreetmap.josm.data.osm.ChangesetCache;
    2018import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2119import org.openstreetmap.josm.data.osm.PrimitiveId;
     
    232230            OsmServerChangesetReader changesetReader = new OsmServerChangesetReader();
    233231            List<Long> changesetIds = new ArrayList<>(ds.getChangesetIds());
    234             Iterator<Long> iter = changesetIds.iterator();
    235             while (iter.hasNext()) {
    236                 long id = iter.next();
    237                 Changeset cs = ChangesetCache.getInstance().get((int) id);
    238                 if (cs != null && !cs.isOpen()) {
    239                     ds.putChangeset(cs);
    240                     iter.remove();
    241                 }
    242             }
    243232
    244233            // query changesets 100 by 100 (OSM API limit)
    245234            int n = ChangesetQuery.MAX_CHANGESETS_NUMBER;
    246235            for (int i = 0; i < changesetIds.size(); i += n) {
    247                 List<Changeset> downloadedCS = new ArrayList<>(changesetIds.size());
    248236                for (Changeset c : changesetReader.queryChangesets(
    249237                        new ChangesetQuery().forChangesetIds(changesetIds.subList(i, Math.min(i + n, changesetIds.size()))),
    250238                        progressMonitor.createSubTaskMonitor(1, false))) {
    251239                    ds.putChangeset(c);
    252                     downloadedCS.add(c);
    253240                }
    254                 ChangesetCache.getInstance().update(downloadedCS);
    255241            }
    256242        }
Note: See TracChangeset for help on using the changeset viewer.