diff --git a/inlong-agent/agent-installer/src/main/java/org/apache/inlong/agent/installer/ModuleManager.java b/inlong-agent/agent-installer/src/main/java/org/apache/inlong/agent/installer/ModuleManager.java index 28c8018407b..5873bcd3217 100755 --- a/inlong-agent/agent-installer/src/main/java/org/apache/inlong/agent/installer/ModuleManager.java +++ b/inlong-agent/agent-installer/src/main/java/org/apache/inlong/agent/installer/ModuleManager.java @@ -264,10 +264,12 @@ public void restoreFromLocalFile(String confPath) { JsonElement tmpElement = JsonParser.parseReader(reader).getAsJsonObject(); ConfigResult curConfig = GSON.fromJson(tmpElement.getAsJsonObject(), ConfigResult.class); if (curConfig.getModuleList() != null) { - if (curConfig.getMd5() != null && curConfig.getVersion() != null) { - currentMd5 = curConfig.getMd5(); - currentVersion = curConfig.getVersion(); - } + if (curConfig.getMd5() != null) { + currentMd5 = curConfig.getMd5(); + } + if (curConfig.getVersion() != null) { + currentVersion = curConfig.getVersion(); + } curConfig.getModuleList().forEach((module) -> { currentModules.put(module.getId(), module); });