Index: /trunk/src/org/openstreetmap/josm/tools/ShapeClipper.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ShapeClipper.java	(revision 14585)
+++ /trunk/src/org/openstreetmap/josm/tools/ShapeClipper.java	(revision 14586)
@@ -69,6 +69,6 @@
                 points[num++] = x;
                 points[num++] = y;
-            } else if (type != PathIterator.SEG_CLOSE) {
-                    //Logging.warn("unhandled path iterator");
+                // } else if (type != PathIterator.SEG_CLOSE) {
+                //Logging.warn("unhandled path iterator");
             }
             pit.next();
@@ -116,6 +116,7 @@
         if (num < 2)
             return null;
-        if (points[0] == points[num - 2] && points[1] == points[num - 1])
+        if (Double.compare(points[0], points[num - 2]) == 0 && Double.compare(points[1], points[num - 1]) == 0) {
             num -= 2;
+        }
         if (num < 6)
             return null;
@@ -154,7 +155,8 @@
 
         int countVals = num;
-        if (points[0] == points[num - 2] && points[1] == points[num - 1]) {
+        if (Double.compare(points[0], points[num - 2]) == 0 && Double.compare(points[1], points[num - 1]) == 0) {
             countVals -= 2;
         }
+
         double[] outputList = points;
         double[] input;
