Changeset 13647 in josm for trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
- Timestamp:
- 2018-04-19T20:37:16+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
r13434 r13647 4 4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 5 import static org.openstreetmap.josm.tools.I18n.tr; 6 import static org.openstreetmap.josm.tools.Utils.getSystemEnv; 7 import static org.openstreetmap.josm.tools.Utils.getSystemProperty; 6 8 7 9 import java.awt.Dimension; … … 84 86 public static String getReportHeader() { 85 87 StringBuilder text = new StringBuilder(256); 86 String runtimeVersion = System.getProperty("java.runtime.version");88 String runtimeVersion = getSystemProperty("java.runtime.version"); 87 89 text.append(Version.getInstance().getReleaseAttributes()) 88 90 .append("\nIdentification: ").append(Version.getInstance().getAgentString()); … … 98 100 .append(Runtime.getRuntime().freeMemory()/1024/1024) 99 101 .append(" MB allocated, but free)\nJava version: ") 100 .append(runtimeVersion != null ? runtimeVersion : System.getProperty("java.version")).append(", ")101 .append( System.getProperty("java.vendor")).append(", ")102 .append( System.getProperty("java.vm.name"))102 .append(runtimeVersion != null ? runtimeVersion : getSystemProperty("java.version")).append(", ") 103 .append(getSystemProperty("java.vendor")).append(", ") 104 .append(getSystemProperty("java.vm.name")) 103 105 .append("\nScreen: "); 104 106 if (!GraphicsEnvironment.isHeadless()) { … … 227 229 */ 228 230 private static String paramCleanup(String param) { 229 final String envJavaHome = System.getenv("JAVA_HOME");231 final String envJavaHome = getSystemEnv("JAVA_HOME"); 230 232 final String envJavaHomeAlt = Main.isPlatformWindows() ? "%JAVA_HOME%" : "${JAVA_HOME}"; 231 final String propJavaHome = System.getProperty("java.home");233 final String propJavaHome = getSystemProperty("java.home"); 232 234 final String propJavaHomeAlt = "<java.home>"; 233 235 final String prefDir = Config.getDirs().getPreferencesDirectory(false).toString(); … … 237 239 final String userCacheDir = Config.getDirs().getCacheDirectory(false).toString(); 238 240 final String userCacheDirAlt = "<josm.cache>"; 239 final String userHomeDir = System.getProperty("user.home");241 final String userHomeDir = getSystemProperty("user.home"); 240 242 final String userHomeDirAlt = Main.isPlatformWindows() ? "%UserProfile%" : "${HOME}"; 241 final String userName = System.getProperty("user.name");243 final String userName = getSystemProperty("user.name"); 242 244 final String userNameAlt = "<user.name>"; 243 245 … … 250 252 val = paramReplace(val, userCacheDir, userCacheDirAlt); 251 253 val = paramReplace(val, userHomeDir, userHomeDirAlt); 252 if (userName .length() >= 3) {254 if (userName != null && userName.length() >= 3) { 253 255 val = paramReplace(val, userName, userNameAlt); 254 256 }
Note:
See TracChangeset
for help on using the changeset viewer.