Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#2153 closed defect (fixed)

Changing the interface and not controlling it

Reported by: luvar@… Owned by: framm
Priority: trivial 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 Changed 4 years ago by anonymous

  • Priority changed from critical to trivial

comment:2 follow-up: Changed 4 years ago by anonymous

  • Resolution set to fixed
  • Status changed from new to closed

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.

comment:3 in reply to: ↑ 2 Changed 4 years ago by anonymous

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.