From 854b8dfd316a80ac3df84890c7bd4f2816405c39 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Wed, 27 Jan 2016 14:58:56 +0300 Subject: [PATCH] [ui] correct file for Edit Custom VM Options action (IDEA-150830) --- .../src/com/intellij/diagnostic/VMOptions.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/diagnostic/VMOptions.java b/platform/platform-impl/src/com/intellij/diagnostic/VMOptions.java index 68038e1133b7..d1252e8fc0fe 100644 --- a/platform/platform-impl/src/com/intellij/diagnostic/VMOptions.java +++ b/platform/platform-impl/src/com/intellij/diagnostic/VMOptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -218,10 +218,12 @@ public class VMOptions { @NotNull public static String getCustomFileName() { - String name = ApplicationNamesInfo.getInstance().getProductName().toLowerCase(Locale.US); - String platformSuffix = SystemInfo.is64Bit ? "64" : ""; - String osSuffix = SystemInfo.isWindows ? ".exe" : ""; - return name + platformSuffix + osSuffix + ".vmoptions"; + StringBuilder sb = new StringBuilder(32); + sb.append(ApplicationNamesInfo.getInstance().getProductName().toLowerCase(Locale.US)); + if (SystemInfo.is64Bit && !SystemInfo.isMac) sb.append("64"); + if (SystemInfo.isWindows) sb.append(".exe"); + sb.append(".vmoptions"); + return sb.toString(); } private static String ourTestPath;