Index: trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- trunk/src/org/openstreetmap/josm/Main.java	(revision 8355)
+++ trunk/src/org/openstreetmap/josm/Main.java	(revision 8356)
@@ -160,5 +160,5 @@
      * Command-line arguments used to run the application.
      */
-    public static String[] commandLineArgs;
+    protected static final List<String> COMMAND_LINE_ARGS = new ArrayList<>();
 
     /**
@@ -1645,4 +1645,13 @@
 
     /**
+     * Returns the command-line arguments used to run the application.
+     * @return the command-line arguments used to run the application
+     * @since 8356
+     */
+    public static List<String> getCommandLineArgs() {
+        return Collections.unmodifiableList(COMMAND_LINE_ARGS);
+    }
+
+    /**
      * Returns the JOSM website URL.
      * @return the josm website URL
Index: trunk/src/org/openstreetmap/josm/actions/RestartAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/RestartAction.java	(revision 8355)
+++ trunk/src/org/openstreetmap/josm/actions/RestartAction.java	(revision 8356)
@@ -11,5 +11,4 @@
 import java.lang.management.ManagementFactory;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 
@@ -137,5 +136,5 @@
                 }
                 // finally add program arguments
-                cmd.addAll(Arrays.asList(Main.commandLineArgs));
+                cmd.addAll(Main.getCommandLineArgs());
             }
             Main.info("Restart "+cmd);
Index: trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java	(revision 8355)
+++ trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java	(revision 8356)
@@ -132,6 +132,7 @@
             // Ignore exception
         }
-        if (Main.commandLineArgs.length > 0) {
-            text.append("Program arguments: "+ Arrays.toString(Main.commandLineArgs));
+        List<String> commandLineArgs = Main.getCommandLineArgs();
+        if (!commandLineArgs.isEmpty()) {
+            text.append("Program arguments: "+ Arrays.toString(commandLineArgs.toArray()));
             text.append("\n");
         }
Index: trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 8355)
+++ trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 8356)
@@ -16,6 +16,6 @@
 import java.io.InputStream;
 import java.net.Authenticator;
+import java.net.Inet6Address;
 import java.net.InetAddress;
-import java.net.Inet6Address;
 import java.net.ProxySelector;
 import java.net.URL;
@@ -202,10 +202,10 @@
         ;
 
-        private String name;
-        private boolean requiresArgument;
+        private final String name;
+        private final boolean requiresArg;
 
         private Option(boolean requiresArgument) {
             this.name = name().toLowerCase().replace("_", "-");
-            this.requiresArgument = requiresArgument;
+            this.requiresArg = requiresArgument;
         }
 
@@ -223,5 +223,5 @@
          */
         public boolean requiresArgument() {
-            return requiresArgument;
+            return requiresArg;
         }
 
@@ -336,5 +336,5 @@
         Main.platform.preStartupHook();
 
-        Main.commandLineArgs = Utils.copyArray(argArray);
+        Main.COMMAND_LINE_ARGS.addAll(Arrays.asList(argArray));
 
         if (args.containsKey(Option.VERSION)) {
@@ -569,5 +569,5 @@
         }
     }
-    
+
     private static class GuiFinalizationWorker implements Runnable {
 
Index: trunk/test/unit/org/openstreetmap/josm/tools/BugReportExceptionHandlerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/BugReportExceptionHandlerTest.java	(revision 8355)
+++ trunk/test/unit/org/openstreetmap/josm/tools/BugReportExceptionHandlerTest.java	(revision 8356)
@@ -28,5 +28,4 @@
     @Before
     public void setUp() {
-        Main.commandLineArgs = new String[0];
         JOSMFixture.createUnitTestFixture().init();
     }
