fix hardwareinfo missing in docker

This commit is contained in:
CaiHQ 2023-03-30 23:55:31 +08:00
parent 02c1f9a815
commit 6a4e1c830c

View File

@ -4,6 +4,7 @@ import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.UUID;
public class HardwareInfo {
public static OSType type = getOSType();
@ -106,6 +107,9 @@ public class HardwareInfo {
e.printStackTrace();
}
}
if (result.toString().trim().equals("")) {
return UUID.randomUUID().toString();
}
return result.toString().trim();
}