From 6a4e1c830cfc2ac3db8053ef18f0e49e264114c7 Mon Sep 17 00:00:00 2001 From: CaiHQ Date: Thu, 30 Mar 2023 23:55:31 +0800 Subject: [PATCH] fix hardwareinfo missing in docker --- src/main/base/org/bdware/sc/encrypt/HardwareInfo.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/base/org/bdware/sc/encrypt/HardwareInfo.java b/src/main/base/org/bdware/sc/encrypt/HardwareInfo.java index f98aa88..b43a80b 100644 --- a/src/main/base/org/bdware/sc/encrypt/HardwareInfo.java +++ b/src/main/base/org/bdware/sc/encrypt/HardwareInfo.java @@ -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(); }