#2153 closed defect (fixed)
Changing the interface and not controlling it
Reported by: | 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 , 16 years ago
Priority: | critical → trivial |
---|
follow-up: 3 comment:2 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 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.
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.