Index: trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyHelper.java	(revision 8371)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyHelper.java	(revision 8372)
@@ -57,8 +57,5 @@
         }
 
-        candidate = Main.map.mapView.getNearestWay(p,
-                OsmPrimitive.isSelectablePredicate);
-
-        return candidate;
+        return Main.map.mapView.getNearestWay(p, OsmPrimitive.isSelectablePredicate);
     }
 
@@ -145,9 +142,9 @@
             EastNorth a = wpp.a.getEastNorth();
             EastNorth b = wpp.b.getEastNorth();
-            
+
             // Finding intersection of the segment with its altitude from p
             EastNorth altitudeIntersection = Geometry.closestPointToSegment(a, b, pEN);
             currentDistance = pEN.distance(altitudeIntersection);
-            
+
             if (!altitudeIntersection.equals(a) && !altitudeIntersection.equals(b)) {
                 // If the segment intersects with the altitude from p,
Index: trunk/src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java	(revision 8371)
+++ trunk/src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java	(revision 8372)
@@ -100,5 +100,5 @@
 
     /**
-     *
+     * Constructs a new {@code CoordinateInfoViewer}.
      * @param model the model. Must not be null.
      * @throws IllegalArgumentException if model is null
@@ -173,4 +173,7 @@
         private transient HistoryBrowserModel model;
         private PointInTimeType role;
+
+        protected LatLon coord;
+        protected LatLon oppositeCoord;
 
         protected HistoryOsmPrimitive getPrimitive() {
@@ -249,14 +252,19 @@
         }
 
-        protected void refresh() {
+        protected final boolean prepareRefresh() {
             HistoryOsmPrimitive p = getPrimitive();
             HistoryOsmPrimitive  opposite = getOppositePrimitive();
-            if (!(p instanceof HistoryNode)) return;
-            if (!(opposite instanceof HistoryNode)) return;
+            if (!(p instanceof HistoryNode)) return false;
+            if (!(opposite instanceof HistoryNode)) return false;
             HistoryNode node = (HistoryNode)p;
             HistoryNode oppositeNode = (HistoryNode) opposite;
 
-            LatLon coord = node.getCoords();
-            LatLon oppositeCoord = oppositeNode.getCoords();
+            coord = node.getCoords();
+            oppositeCoord = oppositeNode.getCoords();
+            return true;
+        }
+
+        protected void refresh() {
+            if (!prepareRefresh()) return;
 
             // display the coordinates
@@ -323,13 +331,5 @@
         @Override
         protected void refresh() {
-            HistoryOsmPrimitive p = getPrimitive();
-            HistoryOsmPrimitive opposite = getOppositePrimitive();
-            if (!(p instanceof HistoryNode)) return;
-            if (!(opposite instanceof HistoryNode)) return;
-            HistoryNode node = (HistoryNode) p;
-            HistoryNode oppositeNode = (HistoryNode) opposite;
-
-            LatLon coord = node.getCoords();
-            LatLon oppositeCoord = oppositeNode.getCoords();
+            if (!prepareRefresh()) return;
 
             // update distance
Index: trunk/src/org/openstreetmap/josm/tools/date/PrimaryDateParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/date/PrimaryDateParser.java	(revision 8371)
+++ trunk/src/org/openstreetmap/josm/tools/date/PrimaryDateParser.java	(revision 8372)
@@ -183,17 +183,10 @@
 
     private Date parseShortStandardDate(String date) {
-        int year;
-        int month;
-        int day;
-        int hour;
-        int minute;
-        int second;
-
-        year = Integer.parseInt(date.substring(0, 4));
-        month = Integer.parseInt(date.substring(5, 7));
-        day = Integer.parseInt(date.substring(8, 10));
-        hour = Integer.parseInt(date.substring(11, 13));
-        minute = Integer.parseInt(date.substring(14, 16));
-        second = Integer.parseInt(date.substring(17, 19));
+        int year = Integer.parseInt(date.substring(0, 4));
+        int month = Integer.parseInt(date.substring(5, 7));
+        int day = Integer.parseInt(date.substring(8, 10));
+        int hour = Integer.parseInt(date.substring(11, 13));
+        int minute = Integer.parseInt(date.substring(14, 16));
+        int second = Integer.parseInt(date.substring(17, 19));
 
         calendar.clear();
@@ -209,19 +202,11 @@
 
     private Date parseLongStandardDate(String date) {
-        int year;
-        int month;
-        int day;
-        int hour;
-        int minute;
-        int second;
-        int millisecond;
-
-        year = Integer.parseInt(date.substring(0, 4));
-        month = Integer.parseInt(date.substring(5, 7));
-        day = Integer.parseInt(date.substring(8, 10));
-        hour = Integer.parseInt(date.substring(11, 13));
-        minute = Integer.parseInt(date.substring(14, 16));
-        second = Integer.parseInt(date.substring(17, 19));
-        millisecond = Integer.parseInt(date.substring(20, 23));
+        int year = Integer.parseInt(date.substring(0, 4));
+        int month = Integer.parseInt(date.substring(5, 7));
+        int day = Integer.parseInt(date.substring(8, 10));
+        int hour = Integer.parseInt(date.substring(11, 13));
+        int minute = Integer.parseInt(date.substring(14, 16));
+        int second = Integer.parseInt(date.substring(17, 19));
+        int millisecond = Integer.parseInt(date.substring(20, 23));
 
         calendar.clear();
