fix platform's bug

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

No files matched your search

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