Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/ReconstructPolygonAction.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/ReconstructPolygonAction.java	(revision 36126)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/ReconstructPolygonAction.java	(revision 36132)
@@ -174,5 +174,5 @@
                                 candidateWay = tmp;
                             }
-                            commands.add(new DeleteCommand(w));
+                            commands.add(DeleteCommand.delete(Collections.singleton(w)));
                         }
                     }
@@ -204,5 +204,5 @@
     }
 
-    private boolean isSuitableRelation(Relation newRelation) {
+    private static boolean isSuitableRelation(Relation newRelation) {
         return newRelation != null && "multipolygon".equals(newRelation.get("type")) && newRelation.getMembersCount() != 0;
     }
Index: applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/TheRing.java
===================================================================
--- applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/TheRing.java	(revision 36126)
+++ applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/TheRing.java	(revision 36132)
@@ -6,4 +6,5 @@
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
@@ -39,5 +40,5 @@
     private final Way source;
     private final List<RingSegment> segments;
-    private Relation relation = null;
+    private Relation relation;
 
     public TheRing(Way source) {
@@ -212,5 +213,5 @@
     }
 
-    private boolean areSegmentsEqual(RingSegment seg1, RingSegment seg2) {
+    private static boolean areSegmentsEqual(RingSegment seg1, RingSegment seg2) {
         List<Node> nodes1 = seg1.getNodes();
         List<Node> nodes2 = seg2.getNodes();
@@ -262,5 +263,5 @@
      * Tries to arrange segments in order for each ring to have at least one.
      * Also, sets source way for all rings.
-     *
+     * <p>
      * If this method is not called, do not forget to call {@link #putSourceWayFirst()} for all rings.
      */
@@ -338,5 +339,5 @@
                     continue;
                 }
-                if (key.equals("natural") && sourceCopy.get("natural").equals("coastline")) {
+                if ("natural".equals(key) && "coastline".equals(sourceCopy.get("natural"))) {
                     continue;
                 }
@@ -387,6 +388,7 @@
                 foundOwnWay = true;
             } else {
-                for (Relation rel : referencingRelations.keySet()) {
-                    int relIndex = referencingRelations.get(rel);
+                for (Map.Entry<Relation, Integer> entry : referencingRelations.entrySet()) {
+                    Relation rel = entry.getKey();
+                    int relIndex = entry.getValue();
                     rel.addMember(new RelationMember(rel.getMember(relIndex).getRole(), w));
                 }
@@ -397,5 +399,5 @@
         }
         if (!foundOwnWay) {
-            commands.add(new DeleteCommand(source));
+            commands.add(DeleteCommand.delete(Collections.singleton(source)));
         }
         commands.addAll(relationCommands);
@@ -407,6 +409,6 @@
 
     public static void updateCommandsWithRelations(List<Command> commands, Map<Relation, Relation> relationCache) {
-        for (Relation src : relationCache.keySet()) {
-            commands.add(new ChangeCommand(src, relationCache.get(src)));
+        for (Map.Entry<Relation, Relation> entry : relationCache.entrySet()) {
+            commands.add(new ChangeCommand(entry.getKey(), entry.getValue()));
         }
     }
@@ -441,6 +443,6 @@
         private List<Node> nodes;
         private RingSegment references;
-        private Way resultingWay = null;
-        private boolean wasTemplateApplied = false;
+        private Way resultingWay;
+        private boolean wasTemplateApplied;
         private boolean isRing;
 
