Index: /trunk/src/org/openstreetmap/josm/actions/RestartAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/RestartAction.java	(revision 12272)
+++ /trunk/src/org/openstreetmap/josm/actions/RestartAction.java	(revision 12273)
@@ -56,4 +56,25 @@
     @Override
     public void actionPerformed(ActionEvent e) {
+        try {
+            restartJOSM();
+        } catch (IOException ex) {
+            Main.error(ex);
+        }
+    }
+
+    /**
+     * Determines if restarting the application should be possible on this platform.
+     * @return {@code true} if the mandatory system property {@code sun.java.command} is defined, {@code false} otherwise.
+     * @since 5951
+     */
+    public static boolean isRestartSupported() {
+        return System.getProperty("sun.java.command") != null;
+    }
+
+    /**
+     * Restarts the current Java application.
+     * @throws IOException in case of any I/O error
+     */
+    public static void restartJOSM() throws IOException {
         // If JOSM has been started with property 'josm.restart=true' this means
         // it is executed by a start script that can handle restart.
@@ -64,25 +85,4 @@
         }
 
-        try {
-            restartJOSM();
-        } catch (IOException ex) {
-            Main.error(ex);
-        }
-    }
-
-    /**
-     * Determines if restarting the application should be possible on this platform.
-     * @return {@code true} if the mandatory system property {@code sun.java.command} is defined, {@code false} otherwise.
-     * @since 5951
-     */
-    public static boolean isRestartSupported() {
-        return System.getProperty("sun.java.command") != null;
-    }
-
-    /**
-     * Restarts the current Java application.
-     * @throws IOException in case of any I/O error
-     */
-    public static void restartJOSM() throws IOException {
         if (isRestartSupported() && !Main.exitJosm(false, 0, SaveLayersDialog.Reason.RESTART)) return;
         final List<String> cmd;
Index: /trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 12272)
+++ /trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 12273)
@@ -498,5 +498,9 @@
                     Main.info(tr("Detected no useable IPv6 network, prefering IPv4 over IPv6 after next restart."));
                     Main.pref.put("validated.ipv6", hasv6); // be sure it is stored before the restart!
-                    new RestartAction().actionPerformed(null);
+                    try {
+                        RestartAction.restartJOSM();
+                    } catch (IOException e) {
+                        Main.error(e);
+                    }
                 }
                 Main.pref.put("validated.ipv6", hasv6);
Index: /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 12272)
+++ /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 12273)
@@ -610,5 +610,9 @@
                         Main.pref.putCollection("plugins", plugins);
                         // restart
-                        new RestartAction().actionPerformed(null);
+                        try {
+                            RestartAction.restartJOSM();
+                        } catch (IOException e) {
+                            Main.error(e);
+                        }
                     } else {
                         Main.warn("No plugin downloaded, restart canceled");
