Cleanup (inspections)

This commit is contained in:
Roman Shevchenko
2014-03-27 19:08:01 +01:00
parent 0b70f88c0b
commit 71f46d625a
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2012 JetBrains s.r.o.
* Copyright 2000-2014 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.
@@ -28,6 +28,7 @@ import org.jetbrains.annotations.TestOnly;
import java.io.File;
import java.io.IOException;
import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -141,7 +142,8 @@ public class VMOptions {
FileUtil.setReadOnlyAttribute(file.getPath(), false);
}
FileUtil.writeToFile(file, content.getBytes());
@SuppressWarnings("SSBasedInspection") byte[] bytes = content.getBytes();
FileUtil.writeToFile(file, bytes);
}
catch (IOException e) {
LOG.info(e);
@@ -237,7 +239,7 @@ public class VMOptions {
}
}
final String productName = ApplicationNamesInfo.getInstance().getProductName().toLowerCase();
final String productName = ApplicationNamesInfo.getInstance().getProductName().toLowerCase(Locale.US);
final String platformSuffix = SystemInfo.is64Bit ? "64" : "";
final String osSuffix = SystemInfo.isWindows ? ".exe" : "";
return PathManager.getBinPath() + File.separatorChar + productName + platformSuffix + osSuffix + ".vmoptions";