mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2024-11-21 03:10:58 +08:00
Fix MEMINFO_PATTERN is null
This commit is contained in:
parent
0256b8a971
commit
c8ba03ae2b
@ -95,6 +95,8 @@ public enum OperatingSystem {
|
||||
private static final String[] INVALID_RESOURCE_BASENAMES;
|
||||
private static final String[] INVALID_RESOURCE_FULLNAMES;
|
||||
|
||||
private static final Pattern MEMINFO_PATTERN = Pattern.compile("^(?<key>.*?):\\s+(?<value>\\d+) kB?$");
|
||||
|
||||
static {
|
||||
String name = System.getProperty("os.name").toLowerCase(Locale.US);
|
||||
if (name.contains("win"))
|
||||
@ -132,8 +134,6 @@ public enum OperatingSystem {
|
||||
}
|
||||
}
|
||||
|
||||
private static final Pattern MEMINFO_PATTERN = Pattern.compile("^(?<key>.*?):\\s+(?<value>\\d+) kB?$");
|
||||
|
||||
public static Optional<PhysicalMemoryStatus> getPhysicalMemoryStatus() {
|
||||
if (CURRENT_OS == LINUX) {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user