Index: trunk/src/org/openstreetmap/josm/command/SplitWayCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/SplitWayCommand.java	(revision 15185)
+++ trunk/src/org/openstreetmap/josm/command/SplitWayCommand.java	(revision 15186)
@@ -43,4 +43,10 @@
     private static volatile Consumer<String> warningNotifier = Logging::warn;
 
+    private static final class RelationInformation {
+        boolean warnme;
+        boolean insert;
+        Relation relation;
+    }
+
     /**
      * Sets the global warning notifier.
@@ -320,7 +326,8 @@
                     boolean insert = true;
                     if (relationSpecialTypes.containsKey(type) && "restriction".equals(relationSpecialTypes.get(type))) {
-                        Map<String, Boolean> rValue = treatAsRestriction(r, rm, c, newWays, way, changedWay);
-                        warnme = rValue.containsKey("warnme") ? rValue.get("warnme") : warnme;
-                        insert = rValue.containsKey("insert") ? rValue.get("insert") : insert;
+                        RelationInformation rValue = treatAsRestriction(r, rm, c, newWays, way, changedWay);
+                        warnme = rValue.warnme;
+                        insert = rValue.insert;
+                        c = rValue.relation;
                     } else if (!("route".equals(type)) && !("multipolygon".equals(type))) {
                         warnme = true;
@@ -410,8 +417,8 @@
     }
 
-    private static Map<String, Boolean> treatAsRestriction(Relation r,
+    private static RelationInformation treatAsRestriction(Relation r,
             RelationMember rm, Relation c, Collection<Way> newWays, Way way,
             Way changedWay) {
-        HashMap<String, Boolean> rMap = new HashMap<>();
+        RelationInformation relationInformation = new RelationInformation();
         /* this code assumes the restriction is correct. No real error checking done */
         String role = rm.getRole();
@@ -448,13 +455,14 @@
                     c.addMember(new RelationMember(role, res));
                     c.removeMembersFor(way);
-                    rMap.put("insert", false);
+                    relationInformation.insert = false;
                 }
             } else {
-                rMap.put("insert", false);
+                relationInformation.insert = false;
             }
         } else if (!"via".equals(role)) {
-            rMap.put("warnme", true);
-        }
-        return rMap;
+            relationInformation.warnme = true;
+        }
+        relationInformation.relation = c;
+        return relationInformation;
     }
 
