Ignore:
Timestamp:
2016-11-28T21:18:55+01:00 (3 years ago)
Author:
simon04
Message:

Loop can be replaced with Collection.removeIf()

File:
1 edited

Legend:

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

    r11288 r11339  
    547547            // Build list of plugins to download
    548548            Set<PluginInformation> toDownload = new HashSet<>(pluginInfoDownloadTask.getAvailablePlugins());
    549             for (Iterator<PluginInformation> it = toDownload.iterator(); it.hasNext();) {
    550                 PluginInformation info = it.next();
    551                 if (!missingRequiredPlugin.contains(info.getName())) {
    552                     it.remove();
    553                 }
    554             }
     549            toDownload.removeIf(info -> !missingRequiredPlugin.contains(info.getName()));
    555550            // Check if something has still to be downloaded
    556551            if (!toDownload.isEmpty()) {
Note: See TracChangeset for help on using the changeset viewer.