Ticket #2430: ticket_2430.diff

File ticket_2430.diff, 1.6 KB (added by hampelratte, 17 years ago)
  • src/org/openstreetmap/josm/plugins/PluginSelection.java

    ### Eclipse Workspace Patch 1.0
    #P core
     
    88import java.awt.Insets;
    99import java.awt.event.ActionEvent;
    1010import java.awt.event.ActionListener;
    11 
    1211import java.io.File;
    1312import java.io.FileReader;
    1413import java.io.IOException;
     
    3029import javax.swing.JEditorPane;
    3130import javax.swing.JOptionPane;
    3231import javax.swing.JPanel;
     32import javax.swing.UIManager;
    3333import javax.swing.event.HyperlinkEvent;
    3434import javax.swing.event.HyperlinkListener;
    3535import javax.swing.event.HyperlinkEvent.EventType;
    36 import javax.swing.UIManager;
    3736
    3837import org.openstreetmap.josm.Main;
    3938import org.openstreetmap.josm.gui.ExtendedDialog;
     
    132131
    133132        if (pluginMap == null)
    134133            pluginMap = new HashMap<String, Boolean>();
    135         else
     134        else {
    136135            // Keep the map in bounds; possibly slightly pointless.
    137             for (final String pname : pluginMap.keySet())
    138                 if (availablePlugins.get(pname) == null) pluginMap.remove(pname);
     136            Set<String> pluginsToRemove = new HashSet<String>();
     137            for (final String pname : pluginMap.keySet()) {
     138                if (availablePlugins.get(pname) == null) pluginsToRemove.add(pname);
     139            }
     140           
     141            for (String pname : pluginsToRemove) {
     142                pluginMap.remove(pname);
     143            }
     144        }
    139145
    140146        pluginPanel.removeAll();
    141147