Index: trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java	(revision 9877)
+++ trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java	(revision 9880)
@@ -202,9 +202,5 @@
             double distanceFirst = firstPosition.distance(refPoint);
             double distanceSecond = secondPosition.distance(refPoint);
-            double difference =  distanceFirst - distanceSecond;
-
-            if (difference > 0.0) return 1;
-            if (difference < 0.0) return -1;
-            return 0;
+            return Double.compare(distanceFirst, distanceSecond);
         }
     }
Index: trunk/src/org/openstreetmap/josm/data/osm/NodePositionComparator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/NodePositionComparator.java	(revision 9877)
+++ trunk/src/org/openstreetmap/josm/data/osm/NodePositionComparator.java	(revision 9880)
@@ -20,13 +20,6 @@
             return 0;
 
-        double dLat = n1.getCoor().lat() - n2.getCoor().lat();
-        if (dLat > 0)
-            return 1;
-        if (dLat < 0)
-            return -1;
-        double dLon = n1.getCoor().lon() - n2.getCoor().lon();
-        if (dLon == 0)
-            return 0;
-        return dLon > 0 ? 1 : -1;
+        int dLat = Double.compare(n1.getCoor().lat(), n2.getCoor().lat());
+        return dLat != 0 ? dLat : Double.compare(n1.getCoor().lon(), n2.getCoor().lon());
     }
 }
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 9877)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 9880)
@@ -1478,6 +1478,6 @@
 
         Pair<Timezone, Offset> splitOutTimezone() {
-            // In hours, rounded to two decimal places
-            double tz = (withoutDayOffset().getSeconds() * 100L / 3600.0) / 100.0;
+            // In hours
+            double tz = withoutDayOffset().getSeconds() / 3600.0;
 
             // Due to imprecise clocks we might get a "+3:28" timezone, which should obviously be 3:30 with
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java	(revision 9877)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java	(revision 9880)
@@ -100,9 +100,5 @@
         @Override
         public int compare(TrackLength l0, TrackLength l1) {
-            if (l0.value < l1.value)
-                return -1;
-            else if (l0.value > l1.value)
-                return 1;
-            return 0;
+            return Double.compare(l0.value, l1.value);
         }
     }
