Index: /applications/editors/josm/plugins/print/.project
===================================================================
--- /applications/editors/josm/plugins/print/.project	(revision 32166)
+++ /applications/editors/josm/plugins/print/.project	(revision 32167)
@@ -11,4 +11,9 @@
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>org.sonarlint.eclipse.core.sonarlintBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
Index: /applications/editors/josm/plugins/print/.settings/org.sonarlint.eclipse.core.prefs
===================================================================
--- /applications/editors/josm/plugins/print/.settings/org.sonarlint.eclipse.core.prefs	(revision 32167)
+++ /applications/editors/josm/plugins/print/.settings/org.sonarlint.eclipse.core.prefs	(revision 32167)
@@ -0,0 +1,5 @@
+autoEnabled=true
+eclipse.preferences.version=1
+extraProperties=
+moduleKey=josm-plugins
+serverId=josm
Index: /applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintPreview.java
===================================================================
--- /applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintPreview.java	(revision 32166)
+++ /applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintPreview.java	(revision 32167)
@@ -40,4 +40,6 @@
 import javax.swing.JPanel;
 import javax.swing.RepaintManager;
+
+import org.openstreetmap.josm.Main;
 
 /**
@@ -58,5 +60,5 @@
      * The PageFormat chosen for printing (and preview)
      */
-    protected PageFormat format = null;
+    protected transient PageFormat format = null;
     
     /**
@@ -79,5 +81,5 @@
      * the printable object for rendering preview contents
      */
-    protected Printable printable = null;
+    protected transient Printable printable = null;
     
     /**
@@ -134,7 +136,7 @@
      */
     public void zoomIn() {
-        double zoom = getZoom();
-        if (zoom < 5.0) {
-            setZoom(2.0 * zoom);
+        double z = getZoom();
+        if (z < 5.0) {
+            setZoom(2.0 * z);
         }
     }
@@ -146,7 +148,7 @@
      */
     public void zoomOut() {
-        double zoom = getZoom();
-        if (zoom > 0.1) {
-            setZoom(0.5 * zoom);
+        double z = getZoom();
+        if (z > 0.1) {
+            setZoom(0.5 * z);
         }
     }
@@ -216,5 +218,5 @@
      */
     public double getZoom() {
-        if (zoomToPage || zoom < 0.01) {
+        if (format != null && (zoomToPage || zoom < 0.01)) {
             // actually this is zoom-to-page 
             Dimension dim = getParent().getSize();
@@ -234,7 +236,7 @@
     public Dimension getZoomedPageDimension() {
         int resolution = Toolkit.getDefaultToolkit().getScreenResolution();
-        double zoom = getZoom();
-        int width = (int)(zoom * resolution * format.getWidth() / 72.0);
-        int height = (int)(zoom * resolution * format.getHeight() / 72.0);
+        double z = getZoom();
+        int width = (int)(z * resolution * format.getWidth() / 72.0);
+        int height = (int)(z * resolution * format.getHeight() / 72.0);
         return new Dimension(width, height);
     }
@@ -248,5 +250,5 @@
     @Override
     public Dimension getPreferredSize() {
-        if (format == null || zoomToPage == true || zoom < 0.01) {
+        if (format == null || zoomToPage || zoom < 0.01) {
             return new Dimension(0,0);
         }
@@ -295,4 +297,5 @@
             catch (PrinterException e) {
                 // should never happen since we are not printing
+                Main.error(e);
             }
         }
@@ -304,4 +307,3 @@
         g2d.setTransform(at);
     }
-
 }
