Index: trunk/src/org/openstreetmap/josm/tools/Geometry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 9059)
+++ trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 9062)
@@ -352,5 +352,4 @@
         double a2 = p4.getY() - p3.getY();
         double b2 = p3.getX() - p4.getX();
-        double c2 = (p4.getX() - p1.getX()) * (p3.getY() - p1.getY()) - (p3.getX() - p1.getX()) * (p4.getY() - p1.getY());
 
         // Solve the equations
@@ -358,4 +357,6 @@
         if (det == 0)
             return null; // Lines are parallel
+
+        double c2 = (p4.getX() - p1.getX()) * (p3.getY() - p1.getY()) - (p3.getX() - p1.getX()) * (p4.getY() - p1.getY());
 
         return new EastNorth(b1 * c2 / det + p1.getX(), -a1 * c2 / det + p1.getY());
@@ -573,13 +574,13 @@
             return false;
 
+        //iterate each side of the polygon, start with the last segment
+        Node oldPoint = polygonNodes.get(polygonNodes.size() - 1);
+
+        if (!oldPoint.isLatLonKnown()) {
+            return false;
+        }
+
         boolean inside = false;
         Node p1, p2;
-
-        //iterate each side of the polygon, start with the last segment
-        Node oldPoint = polygonNodes.get(polygonNodes.size() - 1);
-
-        if (!oldPoint.isLatLonKnown()) {
-            return false;
-        }
 
         for (Node newPoint : polygonNodes) {
@@ -708,9 +709,9 @@
      */
     public static boolean isClockwise(List<Node> nodes) {
-        double area2 = 0.;
         int nodesCount = nodes.size();
         if (nodesCount < 3 || nodes.get(0) != nodes.get(nodesCount - 1)) {
             throw new IllegalArgumentException("Way must be closed to check orientation.");
         }
+        double area2 = 0.;
 
         for (int node = 1; node <= /*sic! consider last-first as well*/ nodesCount; node++) {
Index: trunk/src/org/openstreetmap/josm/tools/I18n.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 9059)
+++ trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 9062)
@@ -583,5 +583,4 @@
                     }
                     String[] enstrings = new String[ennum];
-                    String[] trstrings = new String[trnum];
                     for (int i = 0; i < ennum; ++i) {
                         int val = ens.read(enlen);
@@ -597,4 +596,5 @@
                         enstrings[i] = new String(str, 0, val, StandardCharsets.UTF_8);
                     }
+                    String[] trstrings = new String[trnum];
                     for (int i = 0; i < trnum; ++i) {
                         int val = trs.read(trlen);
Index: trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 9059)
+++ trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 9062)
@@ -836,5 +836,4 @@
         Matcher m = dataUrlPattern.matcher(url);
         if (m.matches()) {
-            String mediatype = m.group(1);
             String base64 = m.group(2);
             String data = m.group(3);
@@ -850,4 +849,5 @@
                 }
             }
+            String mediatype = m.group(1);
             if ("image/svg+xml".equals(mediatype)) {
                 String s = new String(bytes, StandardCharsets.UTF_8);
Index: trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java	(revision 9059)
+++ trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java	(revision 9062)
@@ -93,5 +93,4 @@
         }
         int zoom;
-        double lat, lon;
         try {
             zoom = Integer.parseInt(parts[0]);
@@ -100,4 +99,5 @@
             return null;
         }
+        double lat, lon;
         try {
             lat = Double.parseDouble(parts[1]);
Index: trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java	(revision 9059)
+++ trunk/src/org/openstreetmap/josm/tools/WindowGeometry.java	(revision 9062)
@@ -67,5 +67,4 @@
      */
     public static WindowGeometry centerInWindow(Component reference, Dimension extent) {
-        Window parentWindow = null;
         while (reference != null && !(reference instanceof Window)) {
             reference = reference.getParent();
@@ -73,5 +72,5 @@
         if (reference == null)
             return new WindowGeometry(new Point(0, 0), extent);
-        parentWindow = (Window) reference;
+        Window parentWindow = (Window) reference;
         Point topLeft = new Point(
                 Math.max(0, (parentWindow.getSize().width - extent.width) /2),
Index: trunk/src/org/openstreetmap/josm/tools/date/PrimaryDateParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/date/PrimaryDateParser.java	(revision 9059)
+++ trunk/src/org/openstreetmap/josm/tools/date/PrimaryDateParser.java	(revision 9062)
@@ -41,5 +41,4 @@
 
     private static boolean isDateInShortStandardFormat(String date) {
-        char[] dateChars;
         // We can only parse the date if it is in a very specific format.
         // eg. 2007-09-23T08:25:43Z
@@ -49,5 +48,5 @@
         }
 
-        dateChars = date.toCharArray();
+        char[] dateChars = date.toCharArray();
 
         // Make sure any fixed characters are in the correct place.
@@ -108,5 +107,4 @@
 
     private static boolean isDateInLongStandardFormat(String date) {
-        char[] dateChars;
         // We can only parse the date if it is in a very specific format.
         // eg. 2007-09-23T08:25:43.000Z
@@ -116,5 +114,5 @@
         }
 
-        dateChars = date.toCharArray();
+        char[] dateChars = date.toCharArray();
 
         // Make sure any fixed characters are in the correct place.
