Ignore:
Timestamp:
2016-08-11T15:26:20+02:00 (8 years ago)
Author:
simon04
Message:

fix #11874 - No progress bar while downloading plugins

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java

    r10768 r10781  
    6767import org.openstreetmap.josm.tools.I18n;
    6868import org.openstreetmap.josm.tools.ImageProvider;
     69import org.openstreetmap.josm.tools.SubclassFilteredCollection;
    6970import org.openstreetmap.josm.tools.Utils;
    7071
     
    986987                // If only some plugins have to be updated, filter the list
    987988                if (pluginsWanted != null && !pluginsWanted.isEmpty()) {
    988                     for (Iterator<PluginInformation> it = plugins.iterator(); it.hasNext();) {
    989                         PluginInformation pi = it.next();
    990                         boolean found = false;
    991                         for (PluginInformation piw : pluginsWanted) {
    992                             if (pi.name.equals(piw.name)) {
    993                                 found = true;
    994                                 break;
    995                             }
    996                         }
    997                         if (!found) {
    998                             it.remove();
    999                         }
    1000                     }
     989                    final Collection<String> pluginsWantedName = Utils.transform(pluginsWanted, piw -> piw.name);
     990                    plugins = SubclassFilteredCollection.filter(plugins, pi -> pluginsWantedName.contains(pi.name));
    1001991                }
    1002992            } catch (RuntimeException e) {
Note: See TracChangeset for help on using the changeset viewer.