fix platform's bug

This commit is contained in:
huanghongxun
2015-06-30 20:43:05 +08:00
parent bba82f5e24
commit 25b6d7297c
6 changed files with 13 additions and 7 deletions

View File

@@ -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;
}
}

View File

@@ -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;
}
}