Index: trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- trunk/src/org/openstreetmap/josm/Main.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/Main.java	(revision 8513)
@@ -934,4 +934,7 @@
                     } catch (ClassNotFoundException ex) {
                         // Do nothing
+                        if (Main.isTraceEnabled()) {
+                            Main.trace(ex.getMessage());
+                        }
                     }
                 }
Index: trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java	(revision 8513)
@@ -248,11 +248,15 @@
         // Search first fixed node
         int startPosition = 0;
-        for (startPosition = 0; startPosition < nodeCount; startPosition++)
-            if (fixNodes.contains(nodes.get(startPosition % nodeCount))) break;
+        for (startPosition = 0; startPosition < nodeCount; startPosition++) {
+            if (fixNodes.contains(nodes.get(startPosition % nodeCount)))
+                break;
+        }
         int i = startPosition; // Start position for current arc
         int j; // End position for current arc
         while (i < startPosition + nodeCount) {
-            for (j = i + 1; j < startPosition + nodeCount; j++)
-                if (fixNodes.contains(nodes.get(j % nodeCount))) break;
+            for (j = i + 1; j < startPosition + nodeCount; j++) {
+                if (fixNodes.contains(nodes.get(j % nodeCount)))
+                    break;
+            }
             Node first = nodes.get(i % nodeCount);
             PolarCoor pcFirst = new PolarCoor(first.getEastNorth(), center, 0);
@@ -289,8 +293,11 @@
     private List<Node> collectNodesWithExternReferers(List<Way> ways) {
         List<Node> withReferrers = new ArrayList<>();
-        for (Way w: ways)
-            for (Node n: w.getNodes())
-                if (n.getReferrers().size() > 1)
+        for (Way w: ways) {
+            for (Node n: w.getNodes()) {
+                if (n.getReferrers().size() > 1) {
                     withReferrers.add(n);
+                }
+            }
+        }
         return withReferrers;
     }
@@ -312,6 +319,7 @@
                 if (way.firstNode() == lastNode) {
                     List<Node> wayNodes = way.getNodes();
-                    for (int i = 0; i < wayNodes.size() - 1; i++)
+                    for (int i = 0; i < wayNodes.size() - 1; i++) {
                         nodes.add(wayNodes.get(i));
+                    }
                     lastNode = way.lastNode();
                     lastWay = way;
@@ -320,6 +328,7 @@
                 if (way.lastNode() == lastNode) {
                     List<Node> wayNodes = way.getNodes();
-                    for (int i = wayNodes.size() - 1; i > 0; i--)
+                    for (int i = wayNodes.size() - 1; i > 0; i--) {
                         nodes.add(wayNodes.get(i));
+                    }
                     lastNode = way.firstNode();
                     lastWay = way;
@@ -348,9 +357,10 @@
     private boolean actionAllowed(Collection<Node> nodes) {
         boolean outside = false;
-        for (Node n: nodes)
+        for (Node n: nodes) {
             if (n.isOutsideDownloadArea()) {
                 outside = true;
                 break;
             }
+        }
         if (outside)
             new Notification(
Index: trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java	(revision 8513)
@@ -219,7 +219,8 @@
         Collection<Command> cmds = new ArrayList<>(nodes.size());
         Line line = new Line(anchors[0], anchors[1]);
-        for (Node node: nodes)
+        for (Node node: nodes) {
             if (node != anchors[0] && node != anchors[1])
                 cmds.add(line.projectionCommand(node));
+        }
         return new SequenceCommand(tr("Align Nodes in Line"), cmds);
     }
@@ -245,7 +246,8 @@
         for (Node n: nodes) {
             referers.clear();
-            for (OsmPrimitive o: n.getReferrers())
+            for (OsmPrimitive o: n.getReferrers()) {
                 if (ways.contains(o))
                     referers.add((Way) o);
+            }
             if (referers.size() == 1) {
                 Way way = referers.get(0);
@@ -274,9 +276,10 @@
             List<Node> nodes = way.getNodes();
             neighbors.clear();
-            for (int i = 1; i < nodes.size()-1; i++)
+            for (int i = 1; i < nodes.size()-1; i++) {
                 if (nodes.get(i) == node) {
                     neighbors.add(nodes.get(i-1));
                     neighbors.add(nodes.get(i+1));
                 }
+            }
             if (neighbors.isEmpty())
                 continue;
Index: trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 8513)
@@ -103,4 +103,6 @@
 
         // TODO: convert this to switch/case and make sure the parsing still works
+        // CHECKSTYLE.OFF: LeftCurly
+        // CHECKSTYLE.OFF: RightCurly
         /* leave as single line for shortcut overview parsing! */
         if (mode.equals("data")) { shortcut = KeyEvent.VK_1; }
@@ -112,4 +114,6 @@
         else if (mode.equals("previous")) { shortcut = KeyEvent.VK_8; }
         else if (mode.equals("next")) { shortcut = KeyEvent.VK_9; }
+        // CHECKSTYLE.ON: LeftCurly
+        // CHECKSTYLE.ON: RightCurly
 
         return shortcut;
Index: trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java	(revision 8513)
@@ -244,8 +244,9 @@
     protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) {
         int numWays = 0;
-        for (OsmPrimitive osm : selection)
+        for (OsmPrimitive osm : selection) {
             if (osm instanceof Way) {
                 numWays++;
             }
+        }
         setEnabled(numWays >= 2);
     }
Index: trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java	(revision 8513)
@@ -87,7 +87,8 @@
         while (assign < nodesCount) {
             int imax = 0;
-            for (int i = 1; i < angles.length; i++)
+            for (int i = 1; i < angles.length; i++) {
                 if (remainder[i] > remainder[imax])
                     imax = i;
+            }
             count[imax]++;
             remainder[imax] = 0;
Index: trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/actions/CreateMultipolygonAction.java	(revision 8513)
@@ -369,16 +369,23 @@
 
         // filter out empty key conflicts - we need second iteration
-        if (!Main.pref.getBoolean("multipoly.alltags", false))
-            for (RelationMember m : relation.getMembers())
-                if (m.hasRole() && "outer".equals(m.getRole()) && m.isWay())
-                    for (String key : values.keySet())
-                        if (!m.getWay().hasKey(key) && !relation.hasKey(key))
+        if (!Main.pref.getBoolean("multipoly.alltags", false)) {
+            for (RelationMember m : relation.getMembers()) {
+                if (m.hasRole() && "outer".equals(m.getRole()) && m.isWay()) {
+                    for (String key : values.keySet()) {
+                        if (!m.getWay().hasKey(key) && !relation.hasKey(key)) {
                             conflictingKeys.add(key);
-
-        for (String key : conflictingKeys)
+                        }
+                    }
+                }
+            }
+        }
+
+        for (String key : conflictingKeys) {
             values.remove(key);
-
-        for (String linearTag : Main.pref.getCollection("multipoly.lineartagstokeep", DEFAULT_LINEAR_TAGS))
+        }
+
+        for (String linearTag : Main.pref.getCollection("multipoly.lineartagstokeep", DEFAULT_LINEAR_TAGS)) {
             values.remove(linearTag);
+        }
 
         if ("coastline".equals(values.get("natural")))
Index: trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java	(revision 8513)
@@ -239,4 +239,7 @@
                 } catch (NumberFormatException nfe) {
                     // we repaint offset numbers in any case
+                    if (Main.isTraceEnabled()) {
+                        Main.trace(nfe.getMessage());
+                    }
                 }
             }
Index: trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java	(revision 8513)
@@ -165,6 +165,7 @@
          */
         public void reverse() {
-            for (WayInPolygon way: ways)
+            for (WayInPolygon way: ways) {
                 way.insideToTheRight = !way.insideToTheRight;
+            }
             Collections.reverse(ways);
         }
@@ -266,8 +267,10 @@
             double angle = Math.atan2(en3.getY() - en1.getY(), en3.getX() - en1.getX()) -
                     Math.atan2(en2.getY() - en1.getY(), en2.getX() - en1.getX());
-            while (angle >= 2*Math.PI)
+            while (angle >= 2*Math.PI) {
                 angle -= 2*Math.PI;
-            while (angle < 0)
+            }
+            while (angle < 0) {
                 angle += 2*Math.PI;
+            }
             return angle;
         }
@@ -1070,9 +1073,10 @@
         // Remove all of these way to make the next work.
         List<WayInPolygon> cleanMultigonWays = new ArrayList<>();
-        for (WayInPolygon way: multigonWays)
+        for (WayInPolygon way: multigonWays) {
             if (way.way.getNodesCount() == 2 && way.way.isClosed())
                 discardedWays.add(way);
             else
                 cleanMultigonWays.add(way);
+        }
 
         WayTraverser traverser = new WayTraverser(cleanMultigonWays);
@@ -1105,6 +1109,7 @@
                         // Invalid ring (2 nodes) -> remove
                         traverser.removeWays(path);
-                        for (WayInPolygon way: path)
+                        for (WayInPolygon way: path) {
                             discardedResult.add(way.way);
+                        }
                     } else {
                         // Close ring -> add
@@ -1465,8 +1470,9 @@
             for (RelationRole r : multiouters) {
                 // Add members
-                for (RelationMember rm : r.rel.getMembers())
+                for (RelationMember rm : r.rel.getMembers()) {
                     if (!newRel.getMembers().contains(rm)) {
                         newRel.addMember(rm);
                     }
+                }
                 // Add tags
                 for (String key : r.rel.keySet()) {
Index: trunk/src/org/openstreetmap/josm/actions/JumpToAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/JumpToAction.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/actions/JumpToAction.java	(revision 8513)
@@ -51,22 +51,34 @@
     class OsmURLListener implements DocumentListener {
         @Override
-        public void changedUpdate(DocumentEvent e) { parseURL(); }
-
-        @Override
-        public void insertUpdate(DocumentEvent e) { parseURL(); }
-
-        @Override
-        public void removeUpdate(DocumentEvent e) { parseURL(); }
+        public void changedUpdate(DocumentEvent e) {
+            parseURL();
+        }
+
+        @Override
+        public void insertUpdate(DocumentEvent e) {
+            parseURL();
+        }
+
+        @Override
+        public void removeUpdate(DocumentEvent e) {
+            parseURL();
+        }
     }
 
     class OsmLonLatListener implements DocumentListener {
         @Override
-        public void changedUpdate(DocumentEvent e) { updateUrl(false); }
-
-        @Override
-        public void insertUpdate(DocumentEvent e) { updateUrl(false); }
-
-        @Override
-        public void removeUpdate(DocumentEvent e) { updateUrl(false); }
+        public void changedUpdate(DocumentEvent e) {
+            updateUrl(false);
+        }
+
+        @Override
+        public void insertUpdate(DocumentEvent e) {
+            updateUrl(false);
+        }
+
+        @Override
+        public void removeUpdate(DocumentEvent e) {
+            updateUrl(false);
+        }
     }
 
Index: trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java	(revision 8513)
@@ -206,7 +206,6 @@
                     // to exactly one occurrence of the merged target node
                     newNodes.add(targetNode);
-                } else {
-                    // drop the node
-                }
+                }
+                // else: drop the node
             }
             if (newNodes.size() < 2) {
Index: trunk/src/org/openstreetmap/josm/actions/PasteAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/PasteAction.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/actions/PasteAction.java	(revision 8513)
@@ -72,8 +72,16 @@
                     double east = n.getEastNorth().east();
                     double north = n.getEastNorth().north();
-                    if (east > maxEast) { maxEast = east; }
-                    if (east < minEast) { minEast = east; }
-                    if (north > maxNorth) { maxNorth = north; }
-                    if (north < minNorth) { minNorth = north; }
+                    if (east > maxEast) {
+                        maxEast = east;
+                    }
+                    if (east < minEast) {
+                        minEast = east;
+                    }
+                    if (north > maxNorth) {
+                        maxNorth = north;
+                    }
+                    if (north < minNorth) {
+                        minNorth = north;
+                    }
                 }
             }
Index: trunk/src/org/openstreetmap/josm/actions/SearchNotesDownloadAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SearchNotesDownloadAction.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/actions/SearchNotesDownloadAction.java	(revision 8513)
@@ -84,4 +84,7 @@
             return;
         } catch (NumberFormatException ignore) {
+            if (Main.isTraceEnabled()) {
+                Main.trace(ignore.getMessage());
+            }
         }
 
Index: trunk/src/org/openstreetmap/josm/actions/SelectNonBranchingWaySequences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/SelectNonBranchingWaySequences.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/actions/SelectNonBranchingWaySequences.java	(revision 8513)
@@ -41,6 +41,7 @@
             outerNodes = new TreeSet<>();
 
-            for (Way way : ways)
+            for (Way way : ways) {
                 addNodes(way);
+            }
         }
     }
@@ -150,6 +151,7 @@
 
         selection = new LinkedList<>();
-        for (OsmPrimitive primitive : currentSelection)
+        for (OsmPrimitive primitive : currentSelection) {
             selection.add(primitive);
+        }
 
         do {
Index: trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java	(revision 8513)
@@ -129,4 +129,7 @@
         } catch (SecurityException e) {
             // Ignore exception
+            if (Main.isTraceEnabled()) {
+                Main.trace(e.getMessage());
+            }
         }
         List<String> commandLineArgs = Main.getCommandLineArgs();
Index: trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java	(revision 8513)
@@ -411,8 +411,9 @@
         List<Command> cmds = new LinkedList<>();
         Way way = null;
-        for (Way w: OsmPrimitive.getFilteredList(selectedNode.getReferrers(), Way.class))
+        for (Way w: OsmPrimitive.getFilteredList(selectedNode.getReferrers(), Way.class)) {
             if (w.isUsable() && w.getNodesCount() >= 1) {
                 way = w;
             }
+        }
         List<Node> oldNodes = way.getNodes();
         List<Node> newNodes = new ArrayList<>(oldNodes.size());
Index: trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java	(revision 8513)
@@ -141,7 +141,8 @@
      */
     protected boolean hasPrimitivesToDelete(Collection<OsmPrimitive> primitives) {
-        for (OsmPrimitive p: primitives)
+        for (OsmPrimitive p: primitives) {
             if (p.isDeleted() && p.isModified() && !p.isNew())
                 return true;
+        }
         return false;
     }
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 8513)
@@ -539,8 +539,9 @@
                 if (way != null) {
                     int nodeCount = 0;
-                    for (Node p : way.getNodes())
+                    for (Node p : way.getNodes()) {
                         if (p.equals(n0)) {
                             nodeCount++;
                         }
+                    }
                     if (nodeCount > 1) {
                         way = null;
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWayAction.java	(revision 8513)
@@ -258,6 +258,7 @@
             } else if (matchesCurrentModifiers(toggleSelectedModifierCombo)) {
                 newCursor = ImageProvider.getCursor("normal", "parallel"); // FIXME
-            } else {
+            } else if (Main.isDebugEnabled()) {
                 // TODO: set to a cursor indicating an error
+                Main.debug("TODO: set an error cursor");
             }
             break;
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWays.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWays.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWays.java	(revision 8513)
@@ -79,6 +79,7 @@
                 if (sortedNodesPath.get(i+1).getCoor().equals(n.getCoor())) {
                     removedNodes.add(n);
-                    for (Way w : ways)
+                    for (Way w : ways) {
                         w.removeNode(n);
+                    }
                     continue;
                 }
Index: trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 8513)
@@ -1067,4 +1067,7 @@
         } catch (NumberFormatException e) {
             // fall out
+            if (Main.isTraceEnabled()) {
+                Main.trace(e.getMessage());
+            }
         }
         return def;
@@ -1082,4 +1085,7 @@
         } catch (NumberFormatException e) {
             // fall out
+            if (Main.isTraceEnabled()) {
+                Main.trace(e.getMessage());
+            }
         }
         return def;
@@ -1095,4 +1101,7 @@
         } catch (NumberFormatException e) {
             // fall out
+            if (Main.isTraceEnabled()) {
+                Main.trace(e.getMessage());
+            }
         }
         return def;
@@ -1108,4 +1117,7 @@
         } catch (NumberFormatException e) {
             // fall out
+            if (Main.isTraceEnabled()) {
+                Main.trace(e.getMessage());
+            }
         }
         return def;
@@ -1472,4 +1484,7 @@
         } catch (Exception e) {
             // Ignore all exceptions
+            if (Main.isTraceEnabled()) {
+                Main.trace(e.getMessage());
+            }
         }
         // Workaround to fix a Java "feature"
Index: trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java	(revision 8513)
@@ -441,4 +441,7 @@
             } catch (NumberFormatException e) {
                 // ignore malformed Cache-Control headers
+                if (Main.isTraceEnabled()) {
+                    Main.trace(e.getMessage());
+                }
             }
         }
Index: trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java	(revision 8513)
@@ -665,6 +665,7 @@
                 Matcher m = Pattern.compile(".*\\{PROJ\\(([^)}]+)\\)\\}.*").matcher(url.toUpperCase(Locale.ENGLISH));
                 if (m.matches()) {
-                    for (String p : m.group(1).split(","))
+                    for (String p : m.group(1).split(",")) {
                         serverProjections.add(p);
+                    }
                 }
             } catch (Exception e) {
Index: trunk/src/org/openstreetmap/josm/data/oauth/OAuthParameters.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/oauth/OAuthParameters.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/data/oauth/OAuthParameters.java	(revision 8513)
@@ -79,4 +79,7 @@
             } catch (MalformedURLException e) {
                 // Ignored
+                if (Main.isTraceEnabled()) {
+                    Main.trace(e.getMessage());
+                }
             }
         }
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/AllNodesVisitor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/AllNodesVisitor.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/AllNodesVisitor.java	(revision 8513)
@@ -37,6 +37,7 @@
     public void visit(Way w) {
         if (w.isIncomplete()) return;
-        for (Node n : w.getNodes())
+        for (Node n : w.getNodes()) {
             visit(n);
+        }
     }
 
@@ -48,6 +49,7 @@
     @Override
     public void visit(Relation e) {
-        for (RelationMember m : e.getMembers())
+        for (RelationMember m : e.getMembers()) {
             if (m.isNode()) visit(m.getNode());
+        }
     }
 
@@ -59,6 +61,7 @@
     public static Collection<Node> getAllNodes(Collection<? extends OsmPrimitive> osms) {
         AllNodesVisitor v = new AllNodesVisitor();
-        for (OsmPrimitive osm : osms)
+        for (OsmPrimitive osm : osms) {
             osm.accept(v);
+        }
         return v.nodes;
     }
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRenderer.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRenderer.java	(revision 8513)
@@ -144,4 +144,7 @@
             // On read, it would first check, if the way still has firstIdx+2 nodes, then check if the corresponding way nodes are still the same
             // and report changes in a more controlled manner.
+            if (Main.isTraceEnabled()) {
+                Main.trace(e.getMessage());
+            }
         }
     }
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java	(revision 8513)
@@ -214,6 +214,7 @@
         List<RelationMember> rMembers = r.getMembers();
         Map<String, String> rkeys = r.getKeys();
-        for (String key : ignoreKeys)
+        for (String key : ignoreKeys) {
             rkeys.remove(key);
+        }
         RelationPair rKey = new RelationPair(rMembers, rkeys);
         relations.put(rKey, r);
@@ -231,8 +232,9 @@
         Set<Relation> relFix = new HashSet<>();
 
-        for (OsmPrimitive osm : sel)
+        for (OsmPrimitive osm : sel) {
             if (osm instanceof Relation && !osm.isDeleted()) {
                 relFix.add((Relation) osm);
             }
+        }
 
         if (relFix.size() < 2)
@@ -294,8 +296,9 @@
         Set<Relation> relations = new HashSet<>();
 
-        for (OsmPrimitive osm : sel)
+        for (OsmPrimitive osm : sel) {
             if (osm instanceof Relation) {
                 relations.add((Relation) osm);
             }
+        }
 
         if (relations.size() < 2)
Index: trunk/src/org/openstreetmap/josm/data/validation/util/Entities.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/util/Entities.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/data/validation/util/Entities.java	(revision 8513)
@@ -384,6 +384,7 @@
                         if (mapNameToValue == null) {
                             mapNameToValue = new HashMap<>();
-                            for (String[] pair : ARRAY)
+                            for (String[] pair : ARRAY) {
                                 mapNameToValue.put(pair[0], pair[1]);
+                            }
                         }
                         String value = mapNameToValue.get(entityContent);
Index: trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java	(revision 8513)
@@ -202,8 +202,7 @@
             if (userName != null && !userName.equals(this.userName)) {
                 setPartiallyIdentified(userName);
-            } else {
-                // same name in the preferences as JOSM already knows about.
-                // keep the state, be it partially or fully identified
-            }
+            }
+            // else: same name in the preferences as JOSM already knows about.
+            // keep the state, be it partially or fully identified
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/MapStatus.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 8513)
@@ -727,4 +727,7 @@
         } catch (SecurityException e) {
             // Don't care, awtListener probably wasn't registered anyway
+            if (Main.isTraceEnabled()) {
+                Main.trace(e.getMessage());
+            }
         }
         mv.removeMouseMotionListener(mouseMotionListener);
Index: trunk/src/org/openstreetmap/josm/gui/SplashScreen.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/SplashScreen.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/SplashScreen.java	(revision 8513)
@@ -361,4 +361,7 @@
             } catch (NullPointerException ignore) {
                 // NullPointerException at javax.swing.text.html.StyleSheet$ListPainter.paint
+                if (Main.isTraceEnabled()) {
+                    Main.trace(ignore.getMessage());
+                }
             }
         }
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/MergedTableCellRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/MergedTableCellRenderer.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/MergedTableCellRenderer.java	(revision 8513)
@@ -57,9 +57,6 @@
                 setText(item.getTheirTagValue());
                 setToolTipText(item.getTheirTagValue());
-            } else {
-                // should not happen
             }
         }
     }
-
 }
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeItem.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeItem.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeItem.java	(revision 8513)
@@ -109,6 +109,4 @@
                 primitive.put(key, myTagValue);
             }
-        } else {
-           // should not happen
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java	(revision 8513)
@@ -267,7 +267,6 @@
                 // (only if both primitives are tagged)
                 decision.keepOne(values.get(0));
-            } else {
-                // Do not suggest to keep all values in order to reduce the wrong usage of semicolon values, see #9104!
-            }
+            }
+            // else: Do not suggest to keep all values in order to reduce the wrong usage of semicolon values, see #9104!
         }
         rebuild();
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/AdvancedChangesetQueryPanel.java	(revision 8513)
@@ -1095,4 +1095,7 @@
                 } catch (ParseException e) {
                     // Try next format
+                    if (Main.isTraceEnabled()) {
+                        Main.trace(e.getMessage());
+                    }
                 }
             }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 8513)
@@ -842,4 +842,7 @@
             } catch (AddAbortException ex) {
                 // do nothing
+                if (Main.isTraceEnabled()) {
+                    Main.trace(ex.getMessage());
+                }
             }
         }
@@ -869,4 +872,7 @@
             } catch (AddAbortException ex) {
                 // do nothing
+                if (Main.isTraceEnabled()) {
+                    Main.trace(ex.getMessage());
+                }
             }
         }
@@ -879,4 +885,7 @@
 
     class AddSelectedBeforeSelection extends AddFromSelectionAction implements TableModelListener, ListSelectionListener {
+        /**
+         * Constructs a new {@code AddSelectedBeforeSelection}.
+         */
         public AddSelectedBeforeSelection() {
             putValue(SHORT_DESCRIPTION,
@@ -899,6 +908,8 @@
             } catch (AddAbortException ex) {
                 // do nothing
-            }
-
+                if (Main.isTraceEnabled()) {
+                    Main.trace(ex.getMessage());
+                }
+            }
         }
 
@@ -935,4 +946,7 @@
             } catch (AddAbortException ex) {
                 // do nothing
+                if (Main.isTraceEnabled()) {
+                    Main.trace(ex.getMessage());
+                }
             }
         }
@@ -950,4 +964,7 @@
 
     class RemoveSelectedAction extends AbstractAction implements TableModelListener {
+        /**
+         * Constructs a new {@code RemoveSelectedAction}.
+         */
         public RemoveSelectedAction() {
             putValue(SHORT_DESCRIPTION, tr("Remove all members referring to one of the selected objects"));
@@ -1777,4 +1794,7 @@
             } catch (AddAbortException ex) {
                 // Do nothing
+                if (Main.isTraceEnabled()) {
+                    Main.trace(ex.getMessage());
+                }
             }
         }
Index: trunk/src/org/openstreetmap/josm/gui/help/HelpContentReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/help/HelpContentReader.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/help/HelpContentReader.java	(revision 8513)
@@ -10,4 +10,5 @@
 import java.nio.charset.StandardCharsets;
 
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.WikiReader;
@@ -62,4 +63,7 @@
                 } catch (IOException e1) {
                     // ignore
+                    if (Main.isTraceEnabled()) {
+                        Main.trace(e1.getMessage());
+                    }
                 }
             }
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java	(revision 8513)
@@ -315,4 +315,7 @@
         } catch (NumberFormatException e) {
             // don't save invalid value to preferences
+            if (Main.isTraceEnabled()) {
+                Main.trace(e.getMessage());
+            }
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/layer/CustomizeColor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/CustomizeColor.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/layer/CustomizeColor.java	(revision 8513)
@@ -78,12 +78,14 @@
         switch (answer) {
         case 0:
-            for (Layer layer : layers)
+            for (Layer layer : layers) {
                 Main.pref.putColor("layer "+layer.getName(), c.getColor());
+            }
             break;
         case 1:
             return;
         case 2:
-            for (Layer layer : layers)
+            for (Layer layer : layers) {
                 Main.pref.putColor("layer "+layer.getName(), null);
+            }
             break;
         }
Index: trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 8513)
@@ -932,7 +932,8 @@
     private boolean isDataSetEmpty() {
         if (data != null) {
-            for (OsmPrimitive osm : data.allNonDeletedPrimitives())
+            for (OsmPrimitive osm : data.allNonDeletedPrimitives()) {
                 if (!osm.isDeleted() || !osm.isNewOrUndeleted())
                     return false;
+            }
         }
         return true;
Index: trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java	(revision 8513)
@@ -155,4 +155,7 @@
                 } catch (IOException e) {
                     // silence exceptions
+                    if (Main.isTraceEnabled()) {
+                        Main.trace(e.getMessage());
+                    }
                 }
 
Index: trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java	(revision 8513)
@@ -490,9 +490,10 @@
     public void visitBoundingBox(BoundingXYVisitor v) {
         for (int x = 0; x < dax; ++x) {
-            for (int y = 0; y < day; ++y)
+            for (int y = 0; y < day; ++y) {
                 if (images[x][y].getImage() != null) {
                     v.visit(images[x][y].getMin());
                     v.visit(images[x][y].getMax());
                 }
+            }
         }
     }
Index: trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/AudioMarker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/AudioMarker.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/AudioMarker.java	(revision 8513)
@@ -67,5 +67,7 @@
      *
      */
-    public void play() { play(0.0); }
+    public void play() {
+        play(0.0);
+    }
 
     public void adjustOffset(double adjustment) {
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/NodeElemStyle.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/NodeElemStyle.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/NodeElemStyle.java	(revision 8513)
@@ -127,4 +127,7 @@
                         rotationAngle = RotationAngle.buildStaticRotation(rotationKW.val);
                     } catch (IllegalArgumentException ignore) {
+                        if (Main.isTraceEnabled()) {
+                            Main.trace(ignore.getMessage());
+                        }
                     }
                 }
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/xml/AreaPrototype.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/xml/AreaPrototype.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/xml/AreaPrototype.java	(revision 8513)
@@ -18,5 +18,7 @@
     }
 
-    public AreaPrototype() { init(); }
+    public AreaPrototype() {
+        init();
+    }
 
     public final void init() {
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/xml/IconPrototype.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/xml/IconPrototype.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/xml/IconPrototype.java	(revision 8513)
@@ -18,5 +18,10 @@
     }
 
-    public IconPrototype() { init(); }
+    /**
+     * Constructs a new {@code IconPrototype}.
+     */
+    public IconPrototype() {
+        init();
+    }
 
     public final void init() {
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/xml/LinePrototype.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/xml/LinePrototype.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/xml/LinePrototype.java	(revision 8513)
@@ -30,5 +30,10 @@
     }
 
-    public LinePrototype() { init(); }
+    /**
+     * Constructs a new {@code LinePrototype}.
+     */
+    public LinePrototype() {
+        init();
+    }
 
     public void init() {
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/xml/LinemodPrototype.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/xml/LinemodPrototype.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/xml/LinemodPrototype.java	(revision 8513)
@@ -17,5 +17,10 @@
     }
 
-    public LinemodPrototype() { init(); }
+    /**
+     * Constructs a new {@code LinemodPrototype}.
+     */
+    public LinemodPrototype() {
+        init();
+    }
 
     @Override
Index: trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 8513)
@@ -1371,4 +1371,7 @@
                                 } catch (NumberFormatException e) {
                                     // ignore
+                                    if (Main.isTraceEnabled()) {
+                                        Main.trace(e.getMessage());
+                                    }
                                 }
                             }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryPanel.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/imagery/AddImageryPanel.java	(revision 8513)
@@ -54,5 +54,8 @@
     protected final void registerValidableComponent(AbstractButton component) {
         component.addChangeListener(new ChangeListener() {
-            @Override public void stateChanged(ChangeEvent e) { notifyListeners(); }
+            @Override
+            public void stateChanged(ChangeEvent e) {
+                notifyListeners();
+            }
         });
     }
Index: trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java	(revision 8513)
@@ -72,4 +72,7 @@
                         } catch (SAXException e) {
                             // We will handle this in step with validation
+                            if (Main.isTraceEnabled()) {
+                                Main.trace(e.getMessage());
+                            }
                         }
 
Index: trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java	(revision 8513)
@@ -196,4 +196,7 @@
             } catch (NumberFormatException e) {
                 // ignore - load from preference pluginmanager.time-based-update.interval
+                if (Main.isTraceEnabled()) {
+                    Main.trace(e.getMessage());
+                }
             }
             if (days <= 0) {
Index: trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMFranceDOMProjectionChoice.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMFranceDOMProjectionChoice.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/projection/UTMFranceDOMProjectionChoice.java	(revision 8513)
@@ -68,9 +68,9 @@
     @Override
     public Collection<String> getPreferencesFromCode(String code) {
-        for (int i = 0; i < utmEPSGs.length; i++)
+        for (int i = 0; i < utmEPSGs.length; i++) {
             if (("EPSG:" + utmEPSGs[i]).equals(code))
                 return Collections.singleton(Integer.toString(i+1));
+        }
         return null;
     }
-
 }
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(revision 8513)
@@ -657,4 +657,7 @@
                     } catch (NumberFormatException ex) {
                         // Ignore - cannot auto-increment if last was non-numeric
+                        if (Main.isTraceEnabled()) {
+                            Main.trace(ex.getMessage());
+                        }
                     }
                 } else if (!usage.hadKeys() || PROP_FILL_DEFAULT.get() || "force".equals(use_last_as_default)) {
@@ -890,8 +893,9 @@
                 if (def && !PROP_FILL_DEFAULT.get()) {
                     // default is set and filling default values feature is disabled - check if all primitives are untagged
-                    for (OsmPrimitive s : sel)
+                    for (OsmPrimitive s : sel) {
                         if (s.hasKeys()) {
                             def = false;
                         }
+                    }
                 }
 
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java	(revision 8513)
@@ -221,9 +221,18 @@
         edSearchText = new JosmTextField();
         edSearchText.getDocument().addDocumentListener(new DocumentListener() {
-            @Override public void removeUpdate(DocumentEvent e) { filterPresets(); }
-
-            @Override public void insertUpdate(DocumentEvent e) { filterPresets(); }
-
-            @Override public void changedUpdate(DocumentEvent e) { filterPresets(); }
+            @Override
+            public void removeUpdate(DocumentEvent e) {
+                filterPresets();
+            }
+
+            @Override
+            public void insertUpdate(DocumentEvent e) {
+                filterPresets();
+            }
+
+            @Override
+            public void changedUpdate(DocumentEvent e) {
+                filterPresets();
+            }
         });
         edSearchText.addKeyListener(new KeyAdapter() {
Index: trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingTextField.java	(revision 8513)
@@ -91,4 +91,7 @@
                 } catch (NumberFormatException e) {
                     // either the new text or the current text isn't a number. We continue with autocompletion
+                    if (Main.isTraceEnabled()) {
+                        Main.trace(e.getMessage());
+                    }
                 }
             }
Index: trunk/src/org/openstreetmap/josm/gui/widgets/BoundingBoxSelectionPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/BoundingBoxSelectionPanel.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/BoundingBoxSelectionPanel.java	(revision 8513)
@@ -206,11 +206,17 @@
     class OsmUrlRefresher implements DocumentListener {
         @Override
-        public void changedUpdate(DocumentEvent e) { parseURL(); }
-
-        @Override
-        public void insertUpdate(DocumentEvent e) { parseURL(); }
-
-        @Override
-        public void removeUpdate(DocumentEvent e) { parseURL(); }
+        public void changedUpdate(DocumentEvent e) {
+            parseURL();
+        }
+
+        @Override
+        public void insertUpdate(DocumentEvent e) {
+            parseURL();
+        }
+
+        @Override
+        public void removeUpdate(DocumentEvent e) {
+            parseURL();
+        }
     }
 }
Index: trunk/src/org/openstreetmap/josm/gui/widgets/ChangesetIdTextField.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/ChangesetIdTextField.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/ChangesetIdTextField.java	(revision 8513)
@@ -5,4 +5,6 @@
 
 import javax.swing.text.JTextComponent;
+
+import org.openstreetmap.josm.Main;
 
 /**
@@ -26,5 +28,5 @@
         return validator.id;
     }
-    
+
     /**
      * Reads the changeset id.
@@ -36,10 +38,10 @@
         return validator.readChangesetId();
     }
-    
+
     /**
      * Validator for a changeset ID entered in a {@link JTextComponent}.
      */
     public static class ChangesetIdValidator extends AbstractTextComponentValidator {
-        
+
         private int id = 0;
 
@@ -65,5 +67,5 @@
             }
         }
-        
+
         /**
          * Reads the changeset id.
@@ -82,4 +84,7 @@
                 } catch (NumberFormatException e) {
                     // Ignored
+                    if (Main.isTraceEnabled()) {
+                        Main.trace(e.getMessage());
+                    }
                 }
             }
Index: trunk/src/org/openstreetmap/josm/gui/widgets/PopupMenuLauncher.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/PopupMenuLauncher.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/PopupMenuLauncher.java	(revision 8513)
@@ -53,8 +53,12 @@
 
     @Override
-    public void mousePressed(MouseEvent e) { processEvent(e); }
+    public void mousePressed(MouseEvent e) {
+        processEvent(e);
+    }
 
     @Override
-    public void mouseReleased(MouseEvent e) { processEvent(e); }
+    public void mouseReleased(MouseEvent e) {
+        processEvent(e);
+    }
 
     private void processEvent(MouseEvent e) {
Index: trunk/src/org/openstreetmap/josm/gui/widgets/QuadStateCheckBox.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/QuadStateCheckBox.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/QuadStateCheckBox.java	(revision 8513)
@@ -182,35 +182,71 @@
             }
         }
-        /** Filter: No one may change the armed/selected/pressed status except us. */
-        @Override public void setArmed(boolean b) { }
-
-        @Override public void setSelected(boolean b) { }
-
-        @Override public void setPressed(boolean b) { }
+
+        // ----------------------------------------------------------------------
+        // Filter: No one may change the armed/selected/pressed status except us.
+        // ----------------------------------------------------------------------
+
+        @Override
+        public void setArmed(boolean b) { }
+
+        @Override
+        public void setSelected(boolean b) { }
+
+        @Override
+        public void setPressed(boolean b) { }
 
         /** We disable focusing on the component when it is not enabled. */
-        @Override public void setEnabled(boolean b) {
+        @Override
+        public void setEnabled(boolean b) {
             setFocusable(b);
             other.setEnabled(b);
         }
-        /** All these methods simply delegate to the "other" model
-         * that is being decorated. */
-        @Override public boolean isArmed() { return other.isArmed(); }
-
-        @Override public boolean isSelected() { return other.isSelected(); }
-
-        @Override public boolean isEnabled() { return other.isEnabled(); }
-
-        @Override public boolean isPressed() { return other.isPressed(); }
-
-        @Override public boolean isRollover() { return other.isRollover(); }
-
-        @Override public void setRollover(boolean b) { other.setRollover(b); }
-
-        @Override public void setMnemonic(int key) { other.setMnemonic(key); }
-
-        @Override public int getMnemonic() { return other.getMnemonic(); }
-
-        @Override public void setActionCommand(String s) {
+
+        // -------------------------------------------------------------------------------
+        // All these methods simply delegate to the "other" model that is being decorated.
+        // -------------------------------------------------------------------------------
+
+        @Override
+        public boolean isArmed() {
+            return other.isArmed();
+        }
+
+        @Override
+        public boolean isSelected() {
+            return other.isSelected();
+        }
+
+        @Override
+        public boolean isEnabled() {
+            return other.isEnabled();
+        }
+
+        @Override
+        public boolean isPressed() {
+            return other.isPressed();
+        }
+
+        @Override
+        public boolean isRollover() {
+            return other.isRollover();
+        }
+
+        @Override
+        public void setRollover(boolean b) {
+            other.setRollover(b);
+        }
+
+        @Override
+        public void setMnemonic(int key) {
+            other.setMnemonic(key);
+        }
+
+        @Override
+        public int getMnemonic() {
+            return other.getMnemonic();
+        }
+
+        @Override
+        public void setActionCommand(String s) {
             other.setActionCommand(s);
         }
Index: trunk/src/org/openstreetmap/josm/io/OsmApiException.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmApiException.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/io/OsmApiException.java	(revision 8513)
@@ -2,4 +2,6 @@
 package org.openstreetmap.josm.io;
 import static org.openstreetmap.josm.tools.I18n.tr;
+
+import org.openstreetmap.josm.Main;
 
 /**
@@ -144,4 +146,7 @@
         } catch (Exception e) {
             // Ignored
+            if (Main.isTraceEnabled()) {
+                Main.trace(e.getMessage());
+            }
         }
         try {
@@ -154,4 +159,7 @@
         } catch (Exception e) {
             // Ignored
+            if (Main.isTraceEnabled()) {
+                Main.trace(e.getMessage());
+            }
         }
         return sb.toString();
Index: trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionImporter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionImporter.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/io/session/GeoImageSessionImporter.java	(revision 8513)
@@ -10,4 +10,5 @@
 import java.util.List;
 
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.gui.layer.GpxLayer;
@@ -87,5 +88,8 @@
                                 // TODO: handle thumbnail loading
                             } catch (NumberFormatException e) {
-                                // nothing
+                                // do nothing
+                                if (Main.isTraceEnabled()) {
+                                    Main.trace(e.getMessage());
+                                }
                             }
                         }
Index: trunk/src/org/openstreetmap/josm/plugins/Plugin.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/Plugin.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/plugins/Plugin.java	(revision 8513)
@@ -93,5 +93,7 @@
      * if any available.
      */
-    public PreferenceSetting getPreferenceSetting() { return null; }
+    public PreferenceSetting getPreferenceSetting() {
+        return null;
+    }
 
     /**
Index: trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 8513)
@@ -1124,7 +1124,8 @@
      */
     public static Object getPlugin(String name) {
-        for (PluginProxy plugin : pluginList)
+        for (PluginProxy plugin : pluginList) {
             if (plugin.getPluginInformation().name.equals(name))
                 return plugin.plugin;
+        }
         return null;
     }
Index: trunk/src/org/openstreetmap/josm/tools/Diff.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Diff.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/tools/Diff.java	(revision 8513)
@@ -267,5 +267,5 @@
                             int k;
 
-                            for (k = 1; xvec[x - k] == yvec[y - k]; k++)
+                            for (k = 1; xvec[x - k] == yvec[y - k]; k++) {
                                 if (k == SNAKE_LIMIT) {
                                     best = v;
@@ -273,4 +273,5 @@
                                     break;
                                 }
+                            }
                         }
                     }
@@ -295,5 +296,5 @@
                             int k;
 
-                            for (k = 0; xvec[x + k] == yvec[y + k]; k++)
+                            for (k = 0; xvec[x + k] == yvec[y + k]; k++) {
                                 if (k == SNAKE_LIMIT) {
                                     best = v;
@@ -301,4 +302,5 @@
                                     break;
                                 }
+                            }
                         }
                     }
@@ -723,5 +725,5 @@
                         /* Cancel any subrun of MINIMUM or more provisionals
                            within the larger run.  */
-                        for (j = 0, consec = 0; j < length; j++)
+                        for (j = 0, consec = 0; j < length; j++) {
                             if (discards[i + j] != 2) {
                                 consec = 0;
@@ -732,4 +734,5 @@
                                 discards[i + j] = 0;
                             }
+                        }
 
                         /* Scan from beginning of run
@@ -783,5 +786,5 @@
             final int end = bufferedLines;
             int j = 0;
-            for (int i = 0; i < end; ++i)
+            for (int i = 0; i < end; ++i) {
                 if (noDiscards || discards[i] == 0) {
                     undiscarded[j] = equivs[i];
@@ -790,4 +793,5 @@
                     changedFlag[1+i] = true;
                 }
+            }
             nondiscardedLines = j;
         }
Index: trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 8513)
@@ -442,4 +442,7 @@
         } catch (MalformedURLException ex) {
             // shouldn't happen
+            if (Main.isTraceEnabled()) {
+                Main.trace(e.getMessage());
+            }
         }
 
@@ -602,4 +605,7 @@
         } catch (MalformedURLException ex) {
             // shouldn't happen
+            if (Main.isTraceEnabled()) {
+                Main.trace(e.getMessage());
+            }
         }
 
Index: trunk/src/org/openstreetmap/josm/tools/I18n.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 8513)
@@ -482,4 +482,7 @@
         } catch (IOException e) {
             // Ignore
+            if (Main.isTraceEnabled()) {
+                Main.trace(e.getMessage());
+            }
         }
     }
@@ -511,4 +514,7 @@
         } catch (IOException e) {
             // Ignore exception
+            if (Main.isTraceEnabled()) {
+                Main.trace(e.getMessage());
+            }
         }
         return false;
Index: trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 8513)
@@ -131,7 +131,8 @@
     public void initSystemShortcuts() {
         // TODO: Insert system shortcuts here. See Windows and especially OSX to see how to.
-        for (int i = KeyEvent.VK_F1; i <= KeyEvent.VK_F12; ++i)
+        for (int i = KeyEvent.VK_F1; i <= KeyEvent.VK_F12; ++i) {
             Shortcut.registerSystemShortcut("screen:toogle"+i, tr("reserved"),
                     i, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic();
+        }
         Shortcut.registerSystemShortcut("system:reset", tr("reserved"),
                 KeyEvent.VK_DELETE, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic();
@@ -374,4 +375,7 @@
                     } catch (IOException e) {
                         // Ignore
+                        if (Main.isTraceEnabled()) {
+                            Main.trace(e.getMessage());
+                        }
                     }
                 }
Index: trunk/src/org/openstreetmap/josm/tools/TextTagParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/TextTagParser.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/tools/TextTagParser.java	(revision 8513)
@@ -62,9 +62,17 @@
             while (true) {
                 skipEmpty();
-                if (pos == n) { break; }
+                if (pos == n) {
+                    break;
+                }
                 k = parseString("\n\r\t= ");
-                if (pos == n) { tags.clear();  break; }
+                if (pos == n) {
+                    tags.clear();
+                    break;
+                }
                 skipSign();
-                if (pos == n) { tags.clear();  break; }
+                if (pos == n) {
+                    tags.clear();
+                    break;
+                }
                 v = parseString("\n\r\t ");
                 tags.put(k, v);
Index: trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 8513)
@@ -1301,7 +1301,8 @@
     public static boolean hasExtension(String filename, String ... extensions) {
         String name = filename.toLowerCase(Locale.ENGLISH);
-        for (String ext : extensions)
+        for (String ext : extensions) {
             if (name.endsWith("."+ext.toLowerCase(Locale.ENGLISH)))
                 return true;
+        }
         return false;
     }
Index: trunk/src/org/openstreetmap/josm/tools/date/FallbackDateParser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/date/FallbackDateParser.java	(revision 8512)
+++ trunk/src/org/openstreetmap/josm/tools/date/FallbackDateParser.java	(revision 8513)
@@ -8,4 +8,6 @@
 import java.util.Date;
 import java.util.List;
+
+import org.openstreetmap.josm.Main;
 
 /**
@@ -101,4 +103,7 @@
             } catch (ParseException pe) {
                 // Ignore parsing errors and try the next pattern.
+                if (Main.isTraceEnabled()) {
+                    Main.trace(pe.getMessage());
+                }
             }
         }
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryWayTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryWayTest.java	(revision 8512)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryWayTest.java	(revision 8513)
@@ -10,4 +10,5 @@
 
 import org.junit.Test;
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
 import org.openstreetmap.josm.data.osm.User;
@@ -73,4 +74,7 @@
         } catch (IndexOutOfBoundsException e) {
             // OK
+            if (Main.isTraceEnabled()) {
+                Main.trace(e.getMessage());
+            }
         }
 
Index: trunk/test/unit/org/openstreetmap/josm/data/projection/SwissGridTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/projection/SwissGridTest.java	(revision 8512)
+++ trunk/test/unit/org/openstreetmap/josm/data/projection/SwissGridTest.java	(revision 8513)
@@ -79,107 +79,87 @@
     @Test
     public void a_latlon2eastNorth_test() {
-        {
-            LatLon ll = new LatLon(46.518, 6.567);
-            EastNorth en = Main.getProjection().latlon2eastNorth(ll);
-            if (debug) {
-                System.out.println(en);
-            }
-            assertTrue("Lausanne", Math.abs(en.east() - 533111.69) < 0.1);
-            assertTrue("Lausanne", Math.abs(en.north() - 152227.85) < 0.1);
-        }
-
-        {
-            LatLon ll = new LatLon(47.78, 8.58);
-            EastNorth en = Main.getProjection().latlon2eastNorth(ll);
-            if (debug) {
-                System.out.println(en);
-            }
-            assertTrue("Schafouse", Math.abs(en.east() - 685544.16) < 0.1);
-            assertTrue("Schafouse", Math.abs(en.north() - 292782.91) < 0.1);
-        }
-
-        {
-            LatLon ll = new LatLon(46.58, 10.48);
-            EastNorth en = Main.getProjection().latlon2eastNorth(ll);
-            if (debug) {
-                System.out.println(en);
-            }
-            assertTrue("Grinson", Math.abs(en.east() - 833068.04) < 0.1);
-            assertTrue("Grinson", Math.abs(en.north() - 163265.39) < 0.1);
-        }
-
-        {
-            LatLon ll = new LatLon(46.0 + 57.0 / 60 + 3.89813884505 / 3600, 7.0 + 26.0 / 60 + 19.076595154147 / 3600);
-            EastNorth en = Main.getProjection().latlon2eastNorth(ll);
-            if (debug) {
-                System.out.println(en);
-            }
-            assertTrue("Berne", Math.abs(en.east() - 600000.0) < 0.1);
-            assertTrue("Berne", Math.abs(en.north() - 200000.0) < 0.1);
-        }
-        {
-            LatLon ll = new LatLon(46.0 + 2.0 / 60 + 38.87 / 3600, 8.0 + 43.0 / 60 + 49.79 / 3600);
-            EastNorth en = Main.getProjection().latlon2eastNorth(ll);
-            if (debug) {
-                System.out.println(en);
-            }
-            assertTrue("Ref", Math.abs(en.east() - 700000.0) < 0.1);
-            assertTrue("Ref", Math.abs(en.north() - 100000.0) < 0.1);
-        }
+        LatLon ll = new LatLon(46.518, 6.567);
+        EastNorth en = Main.getProjection().latlon2eastNorth(ll);
+        if (debug) {
+            System.out.println(en);
+        }
+        assertTrue("Lausanne", Math.abs(en.east() - 533111.69) < 0.1);
+        assertTrue("Lausanne", Math.abs(en.north() - 152227.85) < 0.1);
+
+        ll = new LatLon(47.78, 8.58);
+        en = Main.getProjection().latlon2eastNorth(ll);
+        if (debug) {
+            System.out.println(en);
+        }
+        assertTrue("Schafouse", Math.abs(en.east() - 685544.16) < 0.1);
+        assertTrue("Schafouse", Math.abs(en.north() - 292782.91) < 0.1);
+
+        ll = new LatLon(46.58, 10.48);
+        en = Main.getProjection().latlon2eastNorth(ll);
+        if (debug) {
+            System.out.println(en);
+        }
+        assertTrue("Grinson", Math.abs(en.east() - 833068.04) < 0.1);
+        assertTrue("Grinson", Math.abs(en.north() - 163265.39) < 0.1);
+
+        ll = new LatLon(46.0 + 57.0 / 60 + 3.89813884505 / 3600, 7.0 + 26.0 / 60 + 19.076595154147 / 3600);
+        en = Main.getProjection().latlon2eastNorth(ll);
+        if (debug) {
+            System.out.println(en);
+        }
+        assertTrue("Berne", Math.abs(en.east() - 600000.0) < 0.1);
+        assertTrue("Berne", Math.abs(en.north() - 200000.0) < 0.1);
+
+        ll = new LatLon(46.0 + 2.0 / 60 + 38.87 / 3600, 8.0 + 43.0 / 60 + 49.79 / 3600);
+        en = Main.getProjection().latlon2eastNorth(ll);
+        if (debug) {
+            System.out.println(en);
+        }
+        assertTrue("Ref", Math.abs(en.east() - 700000.0) < 0.1);
+        assertTrue("Ref", Math.abs(en.north() - 100000.0) < 0.1);
     }
 
     @Test
     public void b_eastNorth2latlon_test() {
-        {
-            EastNorth en = new EastNorth(533111.69, 152227.85);
-            LatLon ll = Main.getProjection().eastNorth2latlon(en);
-            if (debug) {
-                System.out.println(ll);
-            }
-            assertTrue("Lausanne", Math.abs(ll.lat() - 46.518) < 0.00001);
-            assertTrue("Lausanne", Math.abs(ll.lon() - 6.567) < 0.00001);
-        }
-
-        {
-            EastNorth en = new EastNorth(685544.16, 292782.91);
-            LatLon ll = Main.getProjection().eastNorth2latlon(en);
-            if (debug) {
-                System.out.println(ll);
-            }
-            assertTrue("Schafouse", Math.abs(ll.lat() - 47.78) < 0.00001);
-            assertTrue("Schafouse", Math.abs(ll.lon() - 8.58) < 0.00001);
-        }
-
-        {
-            EastNorth en = new EastNorth(833068.04, 163265.39);
-            LatLon ll = Main.getProjection().eastNorth2latlon(en);
-            if (debug) {
-                System.out.println(ll);
-            }
-            assertTrue("Grinson", Math.abs(ll.lat() - 46.58) < 0.00001);
-            assertTrue("Grinson", Math.abs(ll.lon() - 10.48) < 0.00001);
-        }
-
-        {
-            EastNorth en = new EastNorth(600000.0, 200000.0);
-            LatLon ll = Main.getProjection().eastNorth2latlon(en);
-            if (debug) {
-                System.out.println(ll);
-            }
-            assertTrue("Berne", Math.abs(ll.lat() - (46.0 + 57.0 / 60 + 3.89813884505 / 3600)) < 0.00001);
-            assertTrue("Berne", Math.abs(ll.lon() - (7.0 + 26.0 / 60 + 19.076595154147 / 3600)) < 0.00001);
-        }
-
-        {
-            EastNorth en = new EastNorth(700000.0, 100000.0);
-            LatLon ll = Main.getProjection().eastNorth2latlon(en);
-            if (debug) {
-                System.out.println(ll);
-            }
-            assertTrue("Ref", Math.abs(ll.lat() - (46.0 + 2.0 / 60 + 38.87 / 3600)) < 0.00001);
-            assertTrue("Ref", Math.abs(ll.lon() - (8.0 + 43.0 / 60 + 49.79 / 3600)) < 0.00001);
-        }
-    }
-
+        EastNorth en = new EastNorth(533111.69, 152227.85);
+        LatLon ll = Main.getProjection().eastNorth2latlon(en);
+        if (debug) {
+            System.out.println(ll);
+        }
+        assertTrue("Lausanne", Math.abs(ll.lat() - 46.518) < 0.00001);
+        assertTrue("Lausanne", Math.abs(ll.lon() - 6.567) < 0.00001);
+
+        en = new EastNorth(685544.16, 292782.91);
+        ll = Main.getProjection().eastNorth2latlon(en);
+        if (debug) {
+            System.out.println(ll);
+        }
+        assertTrue("Schafouse", Math.abs(ll.lat() - 47.78) < 0.00001);
+        assertTrue("Schafouse", Math.abs(ll.lon() - 8.58) < 0.00001);
+
+        en = new EastNorth(833068.04, 163265.39);
+        ll = Main.getProjection().eastNorth2latlon(en);
+        if (debug) {
+            System.out.println(ll);
+        }
+        assertTrue("Grinson", Math.abs(ll.lat() - 46.58) < 0.00001);
+        assertTrue("Grinson", Math.abs(ll.lon() - 10.48) < 0.00001);
+
+        en = new EastNorth(600000.0, 200000.0);
+        ll = Main.getProjection().eastNorth2latlon(en);
+        if (debug) {
+            System.out.println(ll);
+        }
+        assertTrue("Berne", Math.abs(ll.lat() - (46.0 + 57.0 / 60 + 3.89813884505 / 3600)) < 0.00001);
+        assertTrue("Berne", Math.abs(ll.lon() - (7.0 + 26.0 / 60 + 19.076595154147 / 3600)) < 0.00001);
+
+        en = new EastNorth(700000.0, 100000.0);
+        ll = Main.getProjection().eastNorth2latlon(en);
+        if (debug) {
+            System.out.println(ll);
+        }
+        assertTrue("Ref", Math.abs(ll.lat() - (46.0 + 2.0 / 60 + 38.87 / 3600)) < 0.00001);
+        assertTrue("Ref", Math.abs(ll.lon() - (8.0 + 43.0 / 60 + 49.79 / 3600)) < 0.00001);
+    }
 
     /**
@@ -188,73 +168,63 @@
     @Test
     public void c_sendandreturn_test() {
-        {
-            EastNorth en = new EastNorth(533111.69, 152227.85);
-            LatLon ll = Main.getProjection().eastNorth2latlon(en);
-            EastNorth en2 = Main.getProjection().latlon2eastNorth(ll);
-            if (debug) {
-                System.out.println(en.east() - en2.east());
-            }
-            if (debug) {
-                System.out.println(en.north() - en2.north());
-            }
-            assertTrue("Lausanne", Math.abs(en.east() - en2.east()) < 0.002);
-            assertTrue("Lausanne", Math.abs(en.north() - en2.north()) < 0.002);
-        }
-
-        {
-            EastNorth en = new EastNorth(685544.16, 292782.91);
-            LatLon ll = Main.getProjection().eastNorth2latlon(en);
-            EastNorth en2 = Main.getProjection().latlon2eastNorth(ll);
-            if (debug) {
-                System.out.println(en.east() - en2.east());
-            }
-            if (debug) {
-                System.out.println(en.north() - en2.north());
-            }
-            assertTrue("Schafouse", Math.abs(en.east() - en2.east()) < 0.002);
-            assertTrue("Schafouse", Math.abs(en.north() - en2.north()) < 0.002);
-        }
-
-        {
-            EastNorth en = new EastNorth(833068.04, 163265.39);
-            LatLon ll = Main.getProjection().eastNorth2latlon(en);
-            EastNorth en2 = Main.getProjection().latlon2eastNorth(ll);
-            if (debug) {
-                System.out.println(en.east() - en2.east());
-            }
-            if (debug) {
-                System.out.println(en.north() - en2.north());
-            }
-            assertTrue("Grinson", Math.abs(en.east() - en2.east()) < 0.002);
-            assertTrue("Grinson", Math.abs(en.north() - en2.north()) < 0.002);
-        }
-
-        {
-            EastNorth en = new EastNorth(600000.0, 200000.0);
-            LatLon ll = Main.getProjection().eastNorth2latlon(en);
-            EastNorth en2 = Main.getProjection().latlon2eastNorth(ll);
-            if (debug) {
-                System.out.println(en.east() - en2.east());
-            }
-            if (debug) {
-                System.out.println(en.north() - en2.north());
-            }
-            assertTrue("Berne", Math.abs(en.east() - en2.east()) < 0.002);
-            assertTrue("Berne", Math.abs(en.north() - en2.north()) < 0.002);
-        }
-
-        {
-            EastNorth en = new EastNorth(700000.0, 100000.0);
-            LatLon ll = Main.getProjection().eastNorth2latlon(en);
-            EastNorth en2 = Main.getProjection().latlon2eastNorth(ll);
-            if (debug) {
-                System.out.println(en.east() - en2.east());
-            }
-            if (debug) {
-                System.out.println(en.north() - en2.north());
-            }
-            assertTrue("Ref", Math.abs(en.east() - en2.east()) < 0.002);
-            assertTrue("Ref", Math.abs(en.north() - en2.north()) < 0.002);
-        }
+        EastNorth en = new EastNorth(533111.69, 152227.85);
+        LatLon ll = Main.getProjection().eastNorth2latlon(en);
+        EastNorth en2 = Main.getProjection().latlon2eastNorth(ll);
+        if (debug) {
+            System.out.println(en.east() - en2.east());
+        }
+        if (debug) {
+            System.out.println(en.north() - en2.north());
+        }
+        assertTrue("Lausanne", Math.abs(en.east() - en2.east()) < 0.002);
+        assertTrue("Lausanne", Math.abs(en.north() - en2.north()) < 0.002);
+
+        en = new EastNorth(685544.16, 292782.91);
+        ll = Main.getProjection().eastNorth2latlon(en);
+        en2 = Main.getProjection().latlon2eastNorth(ll);
+        if (debug) {
+            System.out.println(en.east() - en2.east());
+        }
+        if (debug) {
+            System.out.println(en.north() - en2.north());
+        }
+        assertTrue("Schafouse", Math.abs(en.east() - en2.east()) < 0.002);
+        assertTrue("Schafouse", Math.abs(en.north() - en2.north()) < 0.002);
+
+        en = new EastNorth(833068.04, 163265.39);
+        ll = Main.getProjection().eastNorth2latlon(en);
+        en2 = Main.getProjection().latlon2eastNorth(ll);
+        if (debug) {
+            System.out.println(en.east() - en2.east());
+        }
+        if (debug) {
+            System.out.println(en.north() - en2.north());
+        }
+        assertTrue("Grinson", Math.abs(en.east() - en2.east()) < 0.002);
+        assertTrue("Grinson", Math.abs(en.north() - en2.north()) < 0.002);
+
+        en = new EastNorth(600000.0, 200000.0);
+        ll = Main.getProjection().eastNorth2latlon(en);
+        en2 = Main.getProjection().latlon2eastNorth(ll);
+        if (debug) {
+            System.out.println(en.east() - en2.east());
+        }
+        if (debug) {
+            System.out.println(en.north() - en2.north());
+        }
+        assertTrue("Berne", Math.abs(en.east() - en2.east()) < 0.002);
+        assertTrue("Berne", Math.abs(en.north() - en2.north()) < 0.002);
+
+        en = new EastNorth(700000.0, 100000.0);
+        ll = Main.getProjection().eastNorth2latlon(en);
+        en2 = Main.getProjection().latlon2eastNorth(ll);
+        if (debug) {
+            System.out.println(en.east() - en2.east());
+        }
+        if (debug) {
+            System.out.println(en.north() - en2.north());
+        }
+        assertTrue("Ref", Math.abs(en.east() - en2.east()) < 0.002);
+        assertTrue("Ref", Math.abs(en.north() - en2.north()) < 0.002);
     }
 }
Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/nodes/NodeListMergeModelTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/nodes/NodeListMergeModelTest.java	(revision 8512)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/nodes/NodeListMergeModelTest.java	(revision 8513)
@@ -21,4 +21,5 @@
 import org.junit.Test;
 import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.osm.DatasetFactory;
 import org.openstreetmap.josm.data.osm.Node;
@@ -357,4 +358,7 @@
         } catch (IllegalArgumentException e) {
             // OK
+            if (Main.isTraceEnabled()) {
+                Main.trace(e.getMessage());
+            }
         }
 
@@ -364,4 +368,7 @@
         } catch (IllegalArgumentException e) {
             // OK
+            if (Main.isTraceEnabled()) {
+                Main.trace(e.getMessage());
+            }
         }
     }
Index: trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/TagMergeItemTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/TagMergeItemTest.java	(revision 8512)
+++ trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/TagMergeItemTest.java	(revision 8513)
@@ -9,4 +9,5 @@
 import org.junit.Test;
 import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.gui.conflict.pair.MergeDecisionType;
@@ -87,4 +88,7 @@
         } catch (IllegalArgumentException e) {
             // OK
+            if (Main.isTraceEnabled()) {
+                Main.trace(e.getMessage());
+            }
         }
     }
@@ -133,4 +137,7 @@
         } catch (IllegalStateException e) {
             // OK
+            if (Main.isTraceEnabled()) {
+                Main.trace(e.getMessage());
+            }
         }
     }
@@ -145,4 +152,7 @@
         } catch (IllegalArgumentException e) {
             // OK
+            if (Main.isTraceEnabled()) {
+                Main.trace(e.getMessage());
+            }
         }
     }
Index: trunk/test/unit/org/openstreetmap/josm/tools/OsmUrlToBoundsTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/OsmUrlToBoundsTest.java	(revision 8512)
+++ trunk/test/unit/org/openstreetmap/josm/tools/OsmUrlToBoundsTest.java	(revision 8513)
@@ -4,4 +4,5 @@
 import org.junit.Assert;
 import org.junit.Test;
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.Bounds;
 
@@ -71,4 +72,7 @@
             } catch (IllegalArgumentException e) {
                 // Ignore. check if bounds is null after
+                if (Main.isTraceEnabled()) {
+                    Main.trace(e.getMessage());
+                }
             }
             Assert.assertEquals(item.url, item.bounds, bounds);
Index: trunk/tools/checkstyle/josm_checks.xml
===================================================================
--- trunk/tools/checkstyle/josm_checks.xml	(revision 8512)
+++ trunk/tools/checkstyle/josm_checks.xml	(revision 8513)
@@ -75,4 +75,19 @@
     <module name="ModifierOrder"/>
     <module name="RedundantModifier"/>
+    <module name="AvoidNestedBlocks">
+      <property name="allowInSwitchCase" value="true"/>
+    </module>
+    <module name="EmptyBlock">
+      <property name="tokens" value="LITERAL_TRY,LITERAL_CATCH,LITERAL_FINALLY,LITERAL_DO,LITERAL_ELSE,LITERAL_FOR,INSTANCE_INIT,STATIC_INIT,LITERAL_SWITCH"/>
+    </module>
+    <module name="EmptyCatchBlock"/>
+    <module name="LeftCurly">
+      <property name="maxLineLength" value="140"/>
+    </module>
+    <module name="RightCurly"/>
+    <module name="NeedBraces">
+      <property name="tokens" value="LITERAL_DO,LITERAL_FOR,LITERAL_WHILE"/>
+      <property name="allowSingleLineStatement" value="true"/>
+    </module>
   </module>
   <module name="Header">
