Changeset 8356 in josm
- Timestamp:
- 2015-05-15T22:50:00+02:00 (10 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r8345 r8356 160 160 * Command-line arguments used to run the application. 161 161 */ 162 p ublicstaticString[] commandLineArgs;162 protected static final List<String> COMMAND_LINE_ARGS = new ArrayList<>(); 163 163 164 164 /** … … 1645 1645 1646 1646 /** 1647 * Returns the command-line arguments used to run the application. 1648 * @return the command-line arguments used to run the application 1649 * @since 8356 1650 */ 1651 public static List<String> getCommandLineArgs() { 1652 return Collections.unmodifiableList(COMMAND_LINE_ARGS); 1653 } 1654 1655 /** 1647 1656 * Returns the JOSM website URL. 1648 1657 * @return the josm website URL -
trunk/src/org/openstreetmap/josm/actions/RestartAction.java
r7937 r8356 11 11 import java.lang.management.ManagementFactory; 12 12 import java.util.ArrayList; 13 import java.util.Arrays;14 13 import java.util.List; 15 14 … … 137 136 } 138 137 // finally add program arguments 139 cmd.addAll( Arrays.asList(Main.commandLineArgs));138 cmd.addAll(Main.getCommandLineArgs()); 140 139 } 141 140 Main.info("Restart "+cmd); -
trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
r8061 r8356 132 132 // Ignore exception 133 133 } 134 if (Main.commandLineArgs.length > 0) { 135 text.append("Program arguments: "+ Arrays.toString(Main.commandLineArgs)); 134 List<String> commandLineArgs = Main.getCommandLineArgs(); 135 if (!commandLineArgs.isEmpty()) { 136 text.append("Program arguments: "+ Arrays.toString(commandLineArgs.toArray())); 136 137 text.append("\n"); 137 138 } -
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r8298 r8356 16 16 import java.io.InputStream; 17 17 import java.net.Authenticator; 18 import java.net.Inet6Address; 18 19 import java.net.InetAddress; 19 import java.net.Inet6Address;20 20 import java.net.ProxySelector; 21 21 import java.net.URL; … … 202 202 ; 203 203 204 private String name; 205 private boolean requiresArg ument;204 private final String name; 205 private final boolean requiresArg; 206 206 207 207 private Option(boolean requiresArgument) { 208 208 this.name = name().toLowerCase().replace("_", "-"); 209 this.requiresArg ument= requiresArgument;209 this.requiresArg = requiresArgument; 210 210 } 211 211 … … 223 223 */ 224 224 public boolean requiresArgument() { 225 return requiresArg ument;225 return requiresArg; 226 226 } 227 227 … … 336 336 Main.platform.preStartupHook(); 337 337 338 Main. commandLineArgs = Utils.copyArray(argArray);338 Main.COMMAND_LINE_ARGS.addAll(Arrays.asList(argArray)); 339 339 340 340 if (args.containsKey(Option.VERSION)) { … … 569 569 } 570 570 } 571 571 572 572 private static class GuiFinalizationWorker implements Runnable { 573 573 -
trunk/test/unit/org/openstreetmap/josm/tools/BugReportExceptionHandlerTest.java
r7937 r8356 28 28 @Before 29 29 public void setUp() { 30 Main.commandLineArgs = new String[0];31 30 JOSMFixture.createUnitTestFixture().init(); 32 31 }
Note:
See TracChangeset
for help on using the changeset viewer.