Index: /applications/editors/josm/plugins/imagery/src/org/openstreetmap/josm/plugins/imagery/ImageryPreferenceEditor.java
===================================================================
--- /applications/editors/josm/plugins/imagery/src/org/openstreetmap/josm/plugins/imagery/ImageryPreferenceEditor.java	(revision 24574)
+++ /applications/editors/josm/plugins/imagery/src/org/openstreetmap/josm/plugins/imagery/ImageryPreferenceEditor.java	(revision 24575)
@@ -439,6 +439,7 @@
                 return (info.imageryType == ImageryType.WMS) ? (info.pixelPerDegree == 0.0 ? "" : info.pixelPerDegree)
                                                              : (info.maxZoom == 0 ? "" : info.maxZoom);
-            }
-            return null;
+            default:
+                throw new ArrayIndexOutOfBoundsException();
+            }
         }
 
@@ -449,6 +450,8 @@
             case 0:
                 info.name = (String) o;
+                break;
             case 1:
                 info.setURL((String)o);
+                break;
             case 2:
                 info.pixelPerDegree = 0;
@@ -461,4 +464,7 @@
                 } catch (NumberFormatException e) {
                 }
+                break;
+            default:
+                throw new ArrayIndexOutOfBoundsException();
             }
         }
Index: /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPreferenceEditor.java
===================================================================
--- /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPreferenceEditor.java	(revision 24574)
+++ /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPreferenceEditor.java	(revision 24575)
@@ -306,6 +306,8 @@
             case 0:
                 info.name = (String) o;
+                break;
             case 1:
                 info.setURL((String)o);
+                break;
             }
         }
