From 1a23673df86162825cbdbcdbde5a50ff711dc03d Mon Sep 17 00:00:00 2001 From: Andrii Landiak Date: Fri, 1 Dec 2023 15:21:06 +0200 Subject: [PATCH] Refactor upgradeVersionHashMap to use only Update service for update, do not hardcode --- .../DefaultEdgeUpgradeInstructionsService.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/application/src/main/java/org/thingsboard/server/service/edge/instructions/DefaultEdgeUpgradeInstructionsService.java b/application/src/main/java/org/thingsboard/server/service/edge/instructions/DefaultEdgeUpgradeInstructionsService.java index 66f12a7ab1..138fae70f2 100644 --- a/application/src/main/java/org/thingsboard/server/service/edge/instructions/DefaultEdgeUpgradeInstructionsService.java +++ b/application/src/main/java/org/thingsboard/server/service/edge/instructions/DefaultEdgeUpgradeInstructionsService.java @@ -39,14 +39,7 @@ import java.util.Map; @TbCoreComponent public class DefaultEdgeUpgradeInstructionsService implements EdgeUpgradeInstructionsService { - private static final Map upgradeVersionHashMap; - - static { - upgradeVersionHashMap = new HashMap<>(); - upgradeVersionHashMap.put("3.6.0", new UpgradeInfo(true, "3.6.1")); - upgradeVersionHashMap.put("3.6.1", new UpgradeInfo(true, "3.6.2")); - upgradeVersionHashMap.put("3.6.2", new UpgradeInfo(true, null)); - } + private static final Map upgradeVersionHashMap = new HashMap<>(); private static final String EDGE_DIR = "edge"; private static final String INSTRUCTIONS_DIR = "instructions";