Modify

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#2330 closed defect (fixed)

opening preferences raises a null pointer exception with Java1.5

Reported by: anonymous Owned by: team
Priority: major Milestone:
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 by pieren, 16 years ago

(forgot to sign)

comment:2 by stoecker, 16 years ago

Please attach your config file.

comment:3 by pieren, 16 years ago

I also tried without the preferences file (removed), so starting with all defaults. And the same happens.

comment:4 by stoecker, 16 years ago

Does help removing "colors." in the line 197? It is superflous anyway.

comment:5 by stoecker, 16 years ago

Resolution: fixed
Status: newclosed

In r1504. Please reopen when not fixed.

comment:6 by pieren, 16 years ago

Resolution: fixed
Status: closedreopened

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 by stoecker, 16 years ago

Resolution: fixed
Status: reopenedclosed

In r1505.

comment:8 by pieren, 16 years ago

Works fine now. Thanks !

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.