Index: /applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintDialog.java
===================================================================
--- /applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintDialog.java	(revision 32169)
+++ /applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintDialog.java	(revision 32170)
@@ -130,10 +130,10 @@
      * The printer job
      */
-    protected PrinterJob job;
+    protected transient PrinterJob job;
     
     /**
      * The custom printer job attributes
      */
-    PrintRequestAttributeSet attrs = new HashPrintRequestAttributeSet();
+    transient PrintRequestAttributeSet attrs = new HashPrintRequestAttributeSet();
     
     /** 
@@ -152,5 +152,4 @@
         updateFields();
         pack();
-        //setMinimumSize(getPreferredSize());
         setMaximumSize(Toolkit.getDefaultToolkit().getScreenSize());
     }
@@ -241,6 +240,8 @@
         final JSpinner scaleField = new JSpinner(scaleModel);
         scaleField.addChangeListener(new ChangeListener() {
+            @Override
             public void stateChanged(ChangeEvent evt) {
                 SwingUtilities.invokeLater(new Runnable() {
+                    @Override
                     public void run() {
                         try {
@@ -249,7 +250,6 @@
                             mapView.setFixedMapScale(scaleModel.getNumber().intValue());
                             printPreview.repaint();
-                        }
-                        catch (ParseException pe) {
-                            ; // NOP
+                        } catch (ParseException pe) {
+                            Main.error(pe);
                         }
                     }
@@ -269,6 +269,8 @@
         final JSpinner resolutionField = new JSpinner(resolutionModel);
         resolutionField.addChangeListener(new ChangeListener() {
+            @Override
             public void stateChanged(ChangeEvent evt) {
                 SwingUtilities.invokeLater(new Runnable() {
+                    @Override
                     public void run() {
                         try {
@@ -276,7 +278,6 @@
                             Main.pref.put("print.resolution.dpi",resolutionModel.getNumber().toString());
                             printPreview.repaint();
-                        }
-                        catch (ParseException pe) {
-                            ; // NOP
+                        } catch (ParseException pe) {
+                            Main.error(pe);
                         }
                     }
@@ -296,6 +297,8 @@
         attributionText.setWrapStyleWord(true);
         attributionText.getDocument().addDocumentListener(new DocumentListener() {
+            @Override
             public void insertUpdate(DocumentEvent evt) {
                 SwingUtilities.invokeLater(new Runnable() {
+                    @Override
                     public void run() {
                         Main.pref.put("print.attribution", attributionText.getText());
@@ -304,9 +307,11 @@
                 });
             }
+            @Override
             public void removeUpdate(DocumentEvent evt) {
                 this.insertUpdate(evt);
             }
+            @Override
             public void changedUpdate(DocumentEvent evt) {
-                ; // NOP
+                // NOP
             }
         });
@@ -352,5 +357,6 @@
             printPreview.setPrintable(mapView);
         }
-        JScrollPane previewPane = new JScrollPane(printPreview, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+        JScrollPane previewPane = new JScrollPane(printPreview, 
+                JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
         previewPane.setPreferredSize(Main.main != null ? Main.map.mapView.getSize() : new Dimension(210,297));
         add(previewPane, GBC.std(0,0).span(1, GBC.RELATIVE).fill().weight(5.0,5.0));
@@ -378,6 +384,5 @@
             paperField.setText("-");
             orientationField.setText("-");
-        }
-        else {
+        } else {
             printerField.setText(service.getName());
             if (! attrs.containsKey(Media.class)) {
@@ -398,6 +403,8 @@
                 PageFormat pf = job.defaultPage();
                 attrs.add(new MediaPrintableArea(
-                  (float)pf.getImageableX()/72,(float)pf.getImageableY()/72,
-                  (float)pf.getImageableWidth()/72,(float)pf.getImageableHeight()/72,
+                  (float)pf.getImageableX()/72f,
+                  (float)pf.getImageableY()/72f,
+                  (float)pf.getImageableWidth()/72f,
+                  (float)pf.getImageableHeight()/72f,
                   MediaPrintableArea.INCH) );
             }
@@ -413,38 +420,31 @@
      * @param e an ActionEvent with one of the known commands
      */
+    @Override
     public void actionPerformed(ActionEvent e) {
         String cmd = e.getActionCommand();
-        if (cmd.equals("printer-dialog")) {
+        if ("printer-dialog".equals(cmd)) {
             if (job.printDialog(attrs)) {
                 updateFields();
                 savePrintSettings();
             }
-        }
-        else if (cmd.equals("toggle-preview")) {
+        } else if ("toggle-preview".equals(cmd)) {
             Main.pref.put("print.preview.enabled", previewCheckBox.isSelected());
-            if (previewCheckBox.isSelected() == true) {
+            if (previewCheckBox.isSelected()) {
                 printPreview.setPrintable(mapView);
-            }
-            else {
+            } else {
                 printPreview.setPrintable(null);
             }
-        }
-        else if (cmd.equals("zoom-in")) {
+        } else if ("zoom-in".equals(cmd)) {
             printPreview.zoomIn();
-        }
-        else if (cmd.equals("zoom-out")) {
+        } else if ("zoom-out".equals(cmd)) {
             printPreview.zoomOut();
-        }
-        else if (cmd.equals("zoom-to-page")) {
+        } else if ("zoom-to-page".equals(cmd)) {
             printPreview.zoomToPage();
-        }
-        else if (cmd.equals("zoom-to-actual-size")) {
+        } else if ("zoom-to-actual-size".equals(cmd)) {
             printPreview.setZoom(1.0);
-        }
-        else if (cmd.equals("print")) {
+        } else if ("print".equals(cmd)) {
             try {
                 job.print(attrs);
-            }
-            catch (PrinterAbortException ex) {
+            } catch (PrinterAbortException ex) {
                 String msg = ex.getLocalizedMessage();
                 if (msg.length() == 0) {
@@ -454,6 +454,5 @@
                   tr("Printing stopped"),
                   JOptionPane.WARNING_MESSAGE);
-            }
-            catch (PrinterException ex) {
+            } catch (PrinterException ex) {
                 String msg = ex.getLocalizedMessage();
                 if (msg == null || msg.length() == 0) {
@@ -465,6 +464,5 @@
             }
             dispose();
-        }
-        else if (cmd.equals("cancel")) {
+        } else if ("cancel".equals(cmd)) {
             dispose();
         }
@@ -512,6 +510,5 @@
     @SuppressWarnings("unchecked")
     protected Attribute unmarshallPrintSetting(Collection<String> setting) throws 
-        IllegalArgumentException, ClassNotFoundException, SecurityException, NoSuchMethodException, 
-        InstantiationException, IllegalAccessException, InvocationTargetException {
+        ClassNotFoundException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException {
         
         if (setting == null || setting.size() != 4) {
@@ -551,5 +548,5 @@
                     job.setPrintService(PrintServiceLookup.lookupPrintServices(null, new HashPrintServiceAttributeSet(a))[0]);
                 }
-            } catch (Exception e) {
+            } catch (PrinterException | ReflectiveOperationException e) {
                 Main.warn(e.getClass().getSimpleName()+": "+e.getMessage());
             }
@@ -558,5 +555,5 @@
             try {
                 attrs.add(unmarshallPrintSetting(setting));
-            } catch (Exception e) {
+            } catch (ReflectiveOperationException e) {
                 Main.warn(e.getClass().getSimpleName()+": "+e.getMessage());
             }
@@ -564,3 +561,2 @@
     }
 }
-
