Index: trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java	(revision 11240)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java	(revision 11241)
@@ -81,4 +81,7 @@
     public static final int RINGS_SHARE_NODES = 1617;
 
+    private static final int FOUND_INSIDE = 1;
+    private static final int FOUND_OUTSIDE = 2;
+
     private final Set<String> keysCheckedByAnotherTest = new HashSet<>();
 
@@ -89,8 +92,4 @@
         super(tr("Multipolygon"),
                 tr("This test checks if multipolygons are valid."));
-    }
-
-    @Override
-    public void initialize() {
     }
 
@@ -137,11 +136,9 @@
             checkOuterWay(r);
             boolean hasRepeatedMembers = checkRepeatedWayMembers(r);
-            if (!hasRepeatedMembers) {
-                // Rest of checks is only for complete multipolygon
-                if (!r.hasIncompleteMembers()) {
-                    Multipolygon polygon = new Multipolygon(r);
-                    checkStyleConsistency(r, polygon);
-                    checkGeometryAndRoles(r, polygon);
-                }
+            // Rest of checks is only for complete multipolygon
+            if (!hasRepeatedMembers && !r.hasIncompleteMembers()) {
+                Multipolygon polygon = new Multipolygon(r);
+                checkStyleConsistency(r, polygon);
+                checkGeometryAndRoles(r, polygon);
             }
         }
@@ -285,5 +282,5 @@
                     PolyData pd2 = allPolygons.get(j);
                     if (!checkProblemMap(crossingPolyMap, pd1, pd2)) {
-                        checkPolygonsForSharedNodes(r, pd1, pd2, sharedNodes, wayMap);
+                        checkPolygonsForSharedNodes(r, pd1, pd2, sharedNodes);
                     }
                 }
@@ -310,5 +307,5 @@
      * @return List of nodes were ways intersect
      */
-    private Set<Node> findIntersectionNodes(Relation r) {
+    private static Set<Node> findIntersectionNodes(Relation r) {
         Set<Node> intersectionNodes = new HashSet<>();
         Map<Node, List<Way>> nodeMap = new HashMap<>();
@@ -344,6 +341,5 @@
     }
 
-    private void checkPolygonsForSharedNodes(Relation r, PolyData pd1, PolyData pd2, Set<Node> allSharedNodes,
-            Map<Long, RelationMember> wayMap) {
+    private void checkPolygonsForSharedNodes(Relation r, PolyData pd1, PolyData pd2, Set<Node> allSharedNodes) {
         Set<Node> sharedByPolygons = new HashSet<>(allSharedNodes);
         sharedByPolygons.retainAll(pd1.getNodes());
@@ -391,11 +387,9 @@
     }
 
-    private ExtPolygonIntersection checkOverlapAtSharedNodes(Set<Node> shared, PolyData pd1, PolyData pd2) {
+    private static ExtPolygonIntersection checkOverlapAtSharedNodes(Set<Node> shared, PolyData pd1, PolyData pd2) {
         // Idea: if two polygons share one or more nodes they can either just touch or share segments or intersect.
         // The insideness test is complex, so we try to reduce the number of these tests.
         // There is no need to check all nodes, we only have to check the node following a shared node.
 
-        final int FOUND_INSIDE = 1;
-        final int FOUND_OUTSIDE = 2;
         int[] flags = new int[2];
         for (int loop = 0; loop < flags.length; loop++) {
@@ -447,6 +441,6 @@
      */
     private static class PolygonLevel {
-        public final int level; // nesting level, even for outer, odd for inner polygons.
-        public final PolyData outerWay;
+        final int level; // nesting level, even for outer, odd for inner polygons.
+        final PolyData outerWay;
 
         PolygonLevel(PolyData pd, int level) {
@@ -504,5 +498,5 @@
     private static boolean checkIfNodeIsInsidePolygon(Node n, PolyData p) {
         EastNorth en = n.getEastNorth();
-        return (en != null && p.get().contains(en.getX(), en.getY()));
+        return en != null && p.get().contains(en.getX(), en.getY());
     }
 
@@ -530,5 +524,5 @@
 
             for (Way w : r.getMemberPrimitives(Way.class)) {
-                findIntersectingWay(w, r, cellSegments, problemWays, loop == 1);
+                findIntersectingWay(w, cellSegments, problemWays, loop == 1);
             }
 
@@ -587,10 +581,9 @@
      * Find ways which are crossing without sharing a node.
      * @param w way that is member of the relation
-     * @param r the relation (used for error messages)
      * @param cellSegments map with already collected way segments
      * @param crossingWays list to collect crossing ways
      * @param findSharedWaySegments true: find shared way segments instead of crossings
      */
-    private void findIntersectingWay(Way w, Relation r, Map<Point2D, List<WaySegment>> cellSegments,
+    private static void findIntersectingWay(Way w, Map<Point2D, List<WaySegment>> cellSegments,
             Map<List<Way>, List<WaySegment>> crossingWays, boolean findSharedWaySegments) {
         int nodesSize = w.getNodesCount();
@@ -637,12 +630,11 @@
      * @return true if the combination of polygons is found in the map
      */
-    private boolean checkProblemMap(Map<PolyData, List<PolyData>> problemPolyMap, PolyData pd1, PolyData pd2) {
+    private static boolean checkProblemMap(Map<PolyData, List<PolyData>> problemPolyMap, PolyData pd1, PolyData pd2) {
         List<PolyData> crossingWithFirst = problemPolyMap.get(pd1);
-        if (crossingWithFirst != null) {
-            if (crossingWithFirst.contains(pd2))
-                return true;
+        if (crossingWithFirst != null && crossingWithFirst.contains(pd2)) {
+            return true;
         }
         List<PolyData> crossingWith2nd = problemPolyMap.get(pd2);
-        return (crossingWith2nd != null && crossingWith2nd.contains(pd1));
+        return crossingWith2nd != null && crossingWith2nd.contains(pd1);
     }
 
@@ -795,5 +787,5 @@
         }
 
-        public List<PolygonLevel> findOuterWays(List<PolyData> allPolygons) {
+        List<PolygonLevel> findOuterWays(List<PolyData> allPolygons) {
             return findOuterWaysRecursive(0, allPolygons);
         }
Index: trunk/src/org/openstreetmap/josm/tools/Shortcut.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Shortcut.java	(revision 11240)
+++ trunk/src/org/openstreetmap/josm/tools/Shortcut.java	(revision 11241)
@@ -284,5 +284,5 @@
         }
 
-        public void replace(Shortcut newShortcut) {
+        void replace(Shortcut newShortcut) {
             final Optional<Shortcut> existing = findShortcutByKeyOrShortText(-1, NONE, newShortcut.shortText);
             if (existing.isPresent()) {
