Modify

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#2153 closed defect (fixed)

Changing the interface and not controlling it

Reported by: luvar@… Owned by: framm
Priority: trivial Milestone:
Component: Core Version: latest
Keywords: old plugin, changed interface Cc:

Description

I am uppset, because of changing interface "PreferenceSetting" and its method ok, which now should return boolean value. Do you try to catch problems, if someone try to use old plugin? NO! Generated exception is somehow nothing teller.

Please in class org.openstreetmap.josm.gui.preferences.PreferenceDialog rewrite method ok to this:

[code]

public void ok() {

boolean requiresRestart = false;
for (PreferenceSetting setting : settings)
{

try {

if(setting.ok())

requiresRestart = true;

} catch(AbstractMethodError ex) {

ex.printStackTrace(System.err);
System.err.println("Preferences of type: " + setting.getClass().getName() + " had probably problem with obsolete interface.");

}

}
if (requiresRestart)

JOptionPane.showMessageDialog(Main.parent,tr("You have to restart JOSM for some settings to take effect."));

Main.parent.repaint();

}

[code]

Attachments (0)

Change History (3)

comment:1 by anonymous, 16 years ago

Priority: criticaltrivial

comment:2 by anonymous, 16 years ago

Resolution: fixed
Status: newclosed

Update your plugins. There are updates for all of them except gpsbabelgui.

I wont add a special check for only one error of many which are possible.

in reply to:  2 comment:3 by anonymous, 16 years ago

Replying to anonymous:

Update your plugins. There are updates for all of them except gpsbabelgui.

I wont add a special check for only one error of many which are possible.

What about plugin developer? I saw just error, that something is wrong and nothing else. Imho this is not good. In josm is no way how to make good bug report. No logging, no try/catch. That means too strange and meanless exceptions.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain framm.
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.