Ignore:
Timestamp:
2016-12-14T15:50:53+01:00 (7 years ago)
Author:
Don-vip
Message:

sonar - squid:S2259 - Null pointers should not be dereferenced

File:
1 edited

Legend:

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

    r11345 r11397  
    891891            Map<String, PluginInformation> infos = loadLocallyAvailablePluginInformation(monitor.createSubTaskMonitor(1, false));
    892892            List<PluginInformation> ret = new LinkedList<>();
    893             for (Iterator<String> it = plugins.iterator(); it.hasNext();) {
    894                 String plugin = it.next();
    895                 if (infos.containsKey(plugin)) {
    896                     ret.add(infos.get(plugin));
    897                     it.remove();
     893            if (infos != null) {
     894                for (Iterator<String> it = plugins.iterator(); it.hasNext();) {
     895                    String plugin = it.next();
     896                    if (infos.containsKey(plugin)) {
     897                        ret.add(infos.get(plugin));
     898                        it.remove();
     899                    }
    898900                }
    899901            }
Note: See TracChangeset for help on using the changeset viewer.