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


Ignore:
Timestamp:
2021-09-12T02:57:52+02:00 (3 years ago)
Author:
Don-vip
Message:

coverity - Explicit null dereferenced

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
4 edited

Legend:

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

    r16073 r18215  
    4848    public Component getListCellRendererComponent(JList<? extends IPrimitive> list, IPrimitive value, int index,
    4949            boolean isSelected, boolean cellHasFocus) {
    50         Component def = defaultListCellRenderer.getListCellRendererComponent(list, null, index, isSelected, cellHasFocus);
     50        Component def = defaultListCellRenderer.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
    5151        return renderer(def, value, list.getModel().getSize() > 1000);
    5252    }
  • trunk/src/org/openstreetmap/josm/gui/SplashScreen.java

    r18211 r18215  
    238238                final MeasurableTask task = new MeasurableTask(title);
    239239                tasks.add(task);
    240                 listener.stateChanged(null);
     240                listener.stateChanged(new ChangeEvent(this));
    241241            }
    242242        }
     
    267267            latestSubtask = new SplashProgressMonitor(title, listener);
    268268            tasks.add(latestSubtask);
    269             listener.stateChanged(null);
     269            listener.stateChanged(new ChangeEvent(this));
    270270        }
    271271
     
    300300            taskOptional.ifPresent(task -> {
    301301                ((MeasurableTask) task).finish();
    302                 listener.stateChanged(null);
     302                listener.stateChanged(new ChangeEvent(this));
    303303            });
    304304        }
  • trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java

    r18208 r18215  
    801801            focus = addFocusAdapter(autocomplete, DEFAULT_AC_ITEM_COMPARATOR);
    802802            // fire focus event in advance or otherwise the popup list will be too small at first
    803             focus.focusGained(null);
     803            focus.focusGained(new FocusEvent(this, FocusEvent.FOCUS_GAINED));
    804804
    805805            addUpdateIconListener();
     
    974974                        keys.setSelectedItem(t.getKey());
    975975                        // fix #7951, #8298 - update list of values before setting value (?)
    976                         focus.focusGained(null);
     976                        focus.focusGained(new FocusEvent(AddTagsDialog.this, FocusEvent.FOCUS_GAINED));
    977977                        values.setSelectedItem(t.getValue());
    978978                        selectValuesCombobox();
  • trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongPanel.java

    r16155 r18215  
    1414import javax.swing.JSpinner;
    1515import javax.swing.SpinnerNumberModel;
     16import javax.swing.event.ChangeEvent;
    1617import javax.swing.event.ChangeListener;
    1718
     
    161162        cbDownloadGpxData.addChangeListener(listener);
    162163        cbDownloadOsmData.addChangeListener(listener);
    163         listener.stateChanged(null);
     164        listener.stateChanged(new ChangeEvent(this));
    164165    }
    165166
Note: See TracChangeset for help on using the changeset viewer.