mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
Cleanup (arrangement)
This commit is contained in:
@@ -49,26 +49,10 @@ public class VMOptions {
|
||||
@NonNls private static final Pattern PERM_GEN_PATTERN = Pattern.compile(PERM_GEN_OPTION + MEM_SIZE_EXPR);
|
||||
@NonNls private static final Pattern CODE_CACHE_PATTERN = Pattern.compile(CODE_CACHE_OPTION + MEM_SIZE_EXPR);
|
||||
|
||||
private static String ourTestPath;
|
||||
|
||||
@TestOnly
|
||||
static void setTestFile(String path) {
|
||||
ourTestPath = path;
|
||||
}
|
||||
|
||||
@TestOnly
|
||||
static void clearTestFile() {
|
||||
ourTestPath = null;
|
||||
}
|
||||
|
||||
public static int readXmx() {
|
||||
return readOption(XMX_PATTERN);
|
||||
}
|
||||
|
||||
public static void writeXmx(int value) {
|
||||
writeOption(XMX_OPTION, value, XMX_PATTERN);
|
||||
}
|
||||
|
||||
public static int readMaxPermGen() {
|
||||
return readOption(PERM_GEN_PATTERN);
|
||||
}
|
||||
@@ -77,6 +61,10 @@ public class VMOptions {
|
||||
return readOption(CODE_CACHE_PATTERN);
|
||||
}
|
||||
|
||||
public static void writeXmx(int value) {
|
||||
writeOption(XMX_OPTION, value, XMX_PATTERN);
|
||||
}
|
||||
|
||||
public static void writeMaxPermGen(int value) {
|
||||
writeOption(PERM_GEN_OPTION, value, PERM_GEN_PATTERN);
|
||||
}
|
||||
@@ -244,4 +232,16 @@ public class VMOptions {
|
||||
final String osSuffix = SystemInfo.isWindows ? ".exe" : "";
|
||||
return PathManager.getBinPath() + File.separatorChar + productName + platformSuffix + osSuffix + ".vmoptions";
|
||||
}
|
||||
|
||||
private static String ourTestPath;
|
||||
|
||||
@TestOnly
|
||||
static void setTestFile(String path) {
|
||||
ourTestPath = path;
|
||||
}
|
||||
|
||||
@TestOnly
|
||||
static void clearTestFile() {
|
||||
ourTestPath = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user