fix platform's bug
This commit is contained in:
@@ -62,7 +62,7 @@ public enum OS {
|
||||
OperatingSystemMXBean o = (OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean();
|
||||
return o.getTotalPhysicalMemorySize();
|
||||
} catch(Throwable t) {
|
||||
HMCLog.warn("Failed to get total physical memory size", t);
|
||||
HMCLog.warn("Failed to get total physical memory size");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,6 @@ public enum Platform {
|
||||
public abstract String getBit();
|
||||
|
||||
public static Platform getPlatform() {
|
||||
String arch = System.getProperty("os.arch");
|
||||
return arch.contains("64") ? Platform.BIT_64 : Platform.BIT_32;
|
||||
return System.getProperty("os.arch").contains("64") ? BIT_64 : BIT_32;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user