Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 14614)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 14615)
@@ -227,27 +227,28 @@
                         }
                         try {
-                        String key = line.substring(0, 2);
-                        line = line.substring(2);
-
-                        switch (key) {
-                        case "S:":
-                            ignoreDataStartsWith.add(line);
-                            break;
-                        case "E:":
-                            ignoreDataEquals.add(line);
-                            break;
-                        case "F:":
-                            ignoreDataEndsWith.add(line);
-                            break;
-                        case "K:":
-                            ignoreDataTag.add(Tag.ofString(line));
-                            break;
-                        default:
-                            if (!key.startsWith(";")) {
-                                Logging.warn("Unsupported TagChecker key: " + key);
+                            String key = line.substring(0, 2);
+                            line = line.substring(2);
+
+                            switch (key) {
+                            case "S:":
+                                ignoreDataStartsWith.add(line);
+                                break;
+                            case "E:":
+                                ignoreDataEquals.add(line);
+                                break;
+                            case "F:":
+                                ignoreDataEndsWith.add(line);
+                                break;
+                            case "K:":
+                                ignoreDataTag.add(Tag.ofString(line));
+                                break;
+                            default:
+                                if (!key.startsWith(";")) {
+                                    Logging.warn("Unsupported TagChecker key: " + key);
+                                }
                             }
-                        }
                         } catch (IllegalArgumentException e) {
                             Logging.error("Invalid line in {0} : {1}", source, e.getMessage());
+                            Logging.trace(e);
                         }
                     } else if (tagcheckerfile) {
Index: /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 14614)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 14615)
@@ -514,63 +514,60 @@
 
         ImageEntry e = data.getSelectedImage();
-        if (e != null) {
-            if (e.getPos() != null) {
-                Point p = mv.getPoint(e.getPos());
-
-                int imgWidth;
-                int imgHeight;
-                if (useThumbs && e.hasThumbnail()) {
-                    Dimension d = scaledDimension(e.getThumbnail());
-                    if (d != null) {
-                        imgWidth = d.width;
-                        imgHeight = d.height;
-                    } else {
-                        imgWidth = -1;
-                        imgHeight = -1;
-                    }
+        if (e != null && e.getPos() != null) {
+            Point p = mv.getPoint(e.getPos());
+
+            int imgWidth;
+            int imgHeight;
+            if (useThumbs && e.hasThumbnail()) {
+                Dimension d = scaledDimension(e.getThumbnail());
+                if (d != null) {
+                    imgWidth = d.width;
+                    imgHeight = d.height;
                 } else {
-                    imgWidth = selectedIcon.getIconWidth();
-                    imgHeight = selectedIcon.getIconHeight();
-                }
-
-                if (e.getExifImgDir() != null) {
-                    // Multiplier must be larger than sqrt(2)/2=0.71.
-                    double arrowlength = Math.max(25, Math.max(imgWidth, imgHeight) * 0.85);
-                    double arrowwidth = arrowlength / 1.4;
-
-                    double dir = e.getExifImgDir();
-                    // Rotate 90 degrees CCW
-                    double headdir = (dir < 90) ? dir + 270 : dir - 90;
-                    double leftdir = (headdir < 90) ? headdir + 270 : headdir - 90;
-                    double rightdir = (headdir > 270) ? headdir - 270 : headdir + 90;
-
-                    double ptx = p.x + Math.cos(Utils.toRadians(headdir)) * arrowlength;
-                    double pty = p.y + Math.sin(Utils.toRadians(headdir)) * arrowlength;
-
-                    double ltx = p.x + Math.cos(Utils.toRadians(leftdir)) * arrowwidth/2;
-                    double lty = p.y + Math.sin(Utils.toRadians(leftdir)) * arrowwidth/2;
-
-                    double rtx = p.x + Math.cos(Utils.toRadians(rightdir)) * arrowwidth/2;
-                    double rty = p.y + Math.sin(Utils.toRadians(rightdir)) * arrowwidth/2;
-
-                    g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
-                    g.setColor(new Color(255, 255, 255, 192));
-                    int[] xar = {(int) ltx, (int) ptx, (int) rtx, (int) ltx};
-                    int[] yar = {(int) lty, (int) pty, (int) rty, (int) lty};
-                    g.fillPolygon(xar, yar, 4);
-                    g.setColor(Color.black);
-                    g.setStroke(new BasicStroke(1.2f));
-                    g.drawPolyline(xar, yar, 3);
-                }
-
-                if (useThumbs && e.hasThumbnail()) {
-                    g.setColor(new Color(128, 0, 0, 122));
-                    g.fillRect(p.x - imgWidth / 2, p.y - imgHeight / 2, imgWidth, imgHeight);
-                } else {
-                    selectedIcon.paintIcon(mv, g,
-                            p.x - imgWidth / 2,
-                            p.y - imgHeight / 2);
-
-                }
+                    imgWidth = -1;
+                    imgHeight = -1;
+                }
+            } else {
+                imgWidth = selectedIcon.getIconWidth();
+                imgHeight = selectedIcon.getIconHeight();
+            }
+
+            if (e.getExifImgDir() != null) {
+                // Multiplier must be larger than sqrt(2)/2=0.71.
+                double arrowlength = Math.max(25, Math.max(imgWidth, imgHeight) * 0.85);
+                double arrowwidth = arrowlength / 1.4;
+
+                double dir = e.getExifImgDir();
+                // Rotate 90 degrees CCW
+                double headdir = (dir < 90) ? dir + 270 : dir - 90;
+                double leftdir = (headdir < 90) ? headdir + 270 : headdir - 90;
+                double rightdir = (headdir > 270) ? headdir - 270 : headdir + 90;
+
+                double ptx = p.x + Math.cos(Utils.toRadians(headdir)) * arrowlength;
+                double pty = p.y + Math.sin(Utils.toRadians(headdir)) * arrowlength;
+
+                double ltx = p.x + Math.cos(Utils.toRadians(leftdir)) * arrowwidth/2;
+                double lty = p.y + Math.sin(Utils.toRadians(leftdir)) * arrowwidth/2;
+
+                double rtx = p.x + Math.cos(Utils.toRadians(rightdir)) * arrowwidth/2;
+                double rty = p.y + Math.sin(Utils.toRadians(rightdir)) * arrowwidth/2;
+
+                g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+                g.setColor(new Color(255, 255, 255, 192));
+                int[] xar = {(int) ltx, (int) ptx, (int) rtx, (int) ltx};
+                int[] yar = {(int) lty, (int) pty, (int) rty, (int) lty};
+                g.fillPolygon(xar, yar, 4);
+                g.setColor(Color.black);
+                g.setStroke(new BasicStroke(1.2f));
+                g.drawPolyline(xar, yar, 3);
+            }
+
+            if (useThumbs && e.hasThumbnail()) {
+                g.setColor(new Color(128, 0, 0, 122));
+                g.fillRect(p.x - imgWidth / 2, p.y - imgHeight / 2, imgWidth, imgHeight);
+            } else {
+                selectedIcon.paintIcon(mv, g,
+                        p.x - imgWidth / 2,
+                        p.y - imgHeight / 2);
             }
         }
Index: /trunk/src/org/openstreetmap/josm/tools/ShapeClipper.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ShapeClipper.java	(revision 14614)
+++ /trunk/src/org/openstreetmap/josm/tools/ShapeClipper.java	(revision 14615)
@@ -69,6 +69,4 @@
                 points[num++] = x;
                 points[num++] = y;
-                // } else if (type != PathIterator.SEG_CLOSE) {
-                //Logging.warn("unhandled path iterator");
             }
             pit.next();
@@ -125,6 +123,6 @@
         path.moveTo(lastX, lastY);
         int numOut = 1;
-        for (int i = 2; i < num;) {
-            double x = points[i++], y = points[i++];
+        for (int i = 2; i < num; i += 2) {
+            double x = points[i], y = points[i+1];
             if (Double.compare(x, lastX) != 0 || Double.compare(y, lastY) != 0) {
                 path.lineTo(x, y);
Index: /trunk/test/unit/org/openstreetmap/josm/data/ImageDataTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/ImageDataTest.java	(revision 14614)
+++ /trunk/test/unit/org/openstreetmap/josm/data/ImageDataTest.java	(revision 14615)
@@ -51,5 +51,5 @@
 
     @Test
-    public void testmageEntryWithImages() {
+    public void testImageEntryWithImages() {
         assertEquals(1, new ImageData(getOneImage()).getImages().size());
     }
