Changeset 5840 in josm
- Timestamp:
- 2013-04-11T20:01:30+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
r5833 r5840 9 9 import java.awt.event.KeyEvent; 10 10 import java.lang.management.ManagementFactory; 11 import java.util.ArrayList; 11 12 import java.util.Arrays; 12 13 import java.util.HashSet; 13 14 import java.util.List; 15 import java.util.ListIterator; 14 16 import java.util.Map; 15 17 import java.util.Map.Entry; … … 29 31 import org.openstreetmap.josm.tools.Utils; 30 32 31 32 33 /** 33 34 * @author xeen … … 37 38 */ 38 39 public final class ShowStatusReportAction extends JosmAction { 40 41 /** 42 * Constructs a new {@code ShowStatusReportAction} 43 */ 39 44 public ShowStatusReportAction() { 40 45 super( … … 70 75 text.append("\n"); 71 76 try { 72 List<String> vmArguments = ManagementFactory.getRuntimeMXBean().getInputArguments(); 77 // Build a new list of VM parameters to modify it below if needed (default implementation returns an UnmodifiableList instance) 78 List<String> vmArguments = new ArrayList<String>(ManagementFactory.getRuntimeMXBean().getInputArguments()); 79 // Hide some parameters for privacy concerns 80 for (ListIterator<String> it = vmArguments.listIterator(); it.hasNext(); ) { 81 String value = it.next(); 82 if (value.contains("=") && value.toLowerCase().startsWith("-dproxy")) { 83 it.set(value.split("=")[0]+"=xxx"); 84 } 85 } 73 86 if (!vmArguments.isEmpty()) { 74 87 text.append("VM arguments: "+ vmArguments.toString().replace("\\\\", "\\"));
Note:
See TracChangeset
for help on using the changeset viewer.