#2330 closed defect (fixed)
opening preferences raises a null pointer exception with Java1.5
| Reported by: | anonymous | Owned by: | team |
|---|---|---|---|
| Priority: | major | Component: | Core |
| Version: | latest | Keywords: | |
| Cc: |
Description
when opening preferences window on recent versions, we get the following exception:
java.lang.NullPointerException
at org.openstreetmap.josm.gui.preferences.ColorPreference$5.valueChanged(ColorPreference.java:197)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
at javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
at javax.swing.DefaultListSelectionModel.removeSelectionIntervalImpl(Unknown Source)
at javax.swing.DefaultListSelectionModel.removeSelectionInterval(Unknown Source)
at javax.swing.JTable.checkLeadAnchor(Unknown Source)
at javax.swing.JTable.tableChanged(Unknown Source)
at javax.swing.JTable.setModel(Unknown Source)
at javax.swing.JTable.<init>(Unknown Source)
at javax.swing.JTable.<init>(Unknown Source)
at org.openstreetmap.josm.gui.preferences.ColorPreference$5.<init>(ColorPreference.java:191)
at org.openstreetmap.josm.gui.preferences.ColorPreference.addGui(ColorPreference.java:191)
at org.openstreetmap.josm.gui.preferences.PreferenceDialog.<init>(PreferenceDialog.java:110)
at org.openstreetmap.josm.actions.PreferencesAction.actionPerformed(PreferencesAction.java:39)
at javax.swing.SwingUtilities.notifyAction(Unknown Source)
The file ColorPreference.java is rev.1445
Attachments (0)
Change History (8)
comment:1 Changed 4 years ago by pieren3@…
comment:2 Changed 4 years ago by stoecker
Please attach your config file.
comment:3 Changed 4 years ago by pieren3@…
I also tried without the preferences file (removed), so starting with all defaults. And the same happens.
comment:4 Changed 4 years ago by stoecker
Does help removing "colors." in the line 197? It is superflous anyway.
comment:5 Changed 4 years ago by stoecker
- Resolution set to fixed
- Status changed from new to closed
In r1504. Please reopen when not fixed.
comment:6 Changed 4 years ago by pieren3@…
- Resolution fixed deleted
- Status changed from closed to reopened
This solves the exception . But the first color (background) is not editable. When selecting the first line in the table, the buttons "choose" and "set to default" are disabled. All other colors are ok.
comment:7 Changed 4 years ago by stoecker
- Resolution set to fixed
- Status changed from reopened to closed
In r1505.
comment:8 Changed 4 years ago by pieren3@…
Works fine now. Thanks !



(forgot to sign)