Browse Source

Refactor upgradeVersionHashMap to use only Update service for update, do not hardcode

pull/9688/head
Andrii Landiak 3 years ago
parent
commit
1a23673df8
  1. 9
      application/src/main/java/org/thingsboard/server/service/edge/instructions/DefaultEdgeUpgradeInstructionsService.java

9
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<String, UpgradeInfo> 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<String, UpgradeInfo> upgradeVersionHashMap = new HashMap<>();
private static final String EDGE_DIR = "edge";
private static final String INSTRUCTIONS_DIR = "instructions";

Loading…
Cancel
Save