Index: trunk/src/org/openstreetmap/josm/gui/SideButton.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/SideButton.java	(revision 13186)
+++ trunk/src/org/openstreetmap/josm/gui/SideButton.java	(revision 13187)
@@ -20,4 +20,5 @@
 import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.ImageResource;
+import org.openstreetmap.josm.tools.JosmRuntimeException;
 import org.openstreetmap.josm.tools.Logging;
 
@@ -33,4 +34,6 @@
      * Constructs a new {@code SideButton}.
      * @param action action used to specify the new button
+     * an icon must be provided with {@link ImageResource#attachImageIcon(AbstractAction this, boolean true)}
+     * @throws IllegalArgumentException if no icon provided
      * @since 744
      */
@@ -41,7 +44,6 @@
             setIcon(icon.getImageIconBounded(
                 ImageProvider.ImageSizes.SIDEBUTTON.getImageDimension()));
-        } else if (getIcon() != null) { /* TODO: remove when calling code is fixed, replace by exception */
-            Logging.warn("Old style SideButton usage for action " + action);
-            fixIcon(action);
+        } else {
+            throw new IllegalArgumentException("No icon provided");
         }
         doStyle();
@@ -71,32 +73,4 @@
         setIcon(ImageProvider.get("dialogs", imagename, ImageProvider.ImageSizes.SIDEBUTTON));
         doStyle();
-    }
-
-    /**
-     * Fix icon size
-     * @param action the action
-     * @deprecated This method is old style and will be removed together with the removal
-     * of old constructor code
-     */
-    @Deprecated
-    private void fixIcon(Action action) {
-        // need to listen for changes, so that putValue() that are called after the
-        // SideButton is constructed get the proper icon size
-        if (action != null) {
-            propertyChangeListener = evt -> {
-                if (Action.SMALL_ICON.equals(evt.getPropertyName())) {
-                    fixIcon(null);
-                }
-            };
-            action.addPropertyChangeListener(propertyChangeListener);
-        }
-        int iconHeight = ImageProvider.ImageSizes.SIDEBUTTON.getImageDimension().height;
-        Icon i = getIcon();
-        if (i instanceof ImageIcon && i.getIconHeight() != iconHeight) {
-            Image im = ((ImageIcon) i).getImage();
-            int newWidth = im.getWidth(null) * iconHeight / im.getHeight(null);
-            ImageIcon icon = new ImageIcon(im.getScaledInstance(newWidth, iconHeight, Image.SCALE_SMOOTH));
-            setIcon(icon);
-        }
     }
 
