Changeset 13948 in josm for trunk/src/org/openstreetmap/josm


Ignore:
Timestamp:
2018-06-18T01:12:03+02:00 (13 months ago)
Author:
Don-vip
Message:

fix HistoryHook signature

Location:
trunk/src/org/openstreetmap/josm/gui/history
Files:
2 edited

Legend:

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

    r13947 r13948  
    220220     */
    221221    public void showHistory(final Collection<? extends PrimitiveId> primitives) {
    222         hooks.forEach(h -> h.modifyRequestedIds(primitives));
    223         final Collection<? extends PrimitiveId> notNewPrimitives = SubclassFilteredCollection.filter(primitives, notNewPredicate);
     222        final List<PrimitiveId> realPrimitives = new ArrayList<>(primitives);
     223        hooks.forEach(h -> h.modifyRequestedIds(realPrimitives));
     224        final Collection<? extends PrimitiveId> notNewPrimitives = SubclassFilteredCollection.filter(realPrimitives, notNewPredicate);
    224225        if (notNewPrimitives.isEmpty()) {
    225226            JOptionPane.showMessageDialog(
     
    231232        }
    232233
    233         Collection<? extends PrimitiveId> toLoad = SubclassFilteredCollection.filter(primitives, unloadedHistoryPredicate);
     234        Collection<? extends PrimitiveId> toLoad = SubclassFilteredCollection.filter(realPrimitives, unloadedHistoryPredicate);
    234235        if (!toLoad.isEmpty()) {
    235236            HistoryLoadTask task = new HistoryLoadTask();
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryHook.java

    r13947 r13948  
    22package org.openstreetmap.josm.gui.history;
    33
    4 import java.util.Collection;
     4import java.util.List;
    55
    66import org.openstreetmap.josm.data.osm.PrimitiveId;
     
    2020     * Default implementation is to do no changes.
    2121     * @param ids The current ids to change
     22     * @since 13948
    2223     */
    23     default void modifyRequestedIds(Collection<? extends PrimitiveId> ids) {
     24    default void modifyRequestedIds(List<PrimitiveId> ids) {
    2425    }
    2526}
Note: See TracChangeset for help on using the changeset viewer.