Commit b93a397a23a84350e7610c6e65c6dd1a607a2b75

Authored by Andrii Shvaika
1 parent 5bff4d1a

Fix NPE in the LwM2MClientOtaInfo

@@ -56,7 +56,7 @@ public class LwM2MClientOtaInfo { @@ -56,7 +56,7 @@ public class LwM2MClientOtaInfo {
56 public LwM2MClientOtaInfo(String endpoint, OtaPackageType type, Integer strategyCode, String baseUrl) { 56 public LwM2MClientOtaInfo(String endpoint, OtaPackageType type, Integer strategyCode, String baseUrl) {
57 this.endpoint = endpoint; 57 this.endpoint = endpoint;
58 this.type = type; 58 this.type = type;
59 - this.fwStrategy = LwM2MFirmwareUpdateStrategy.fromStrategyFwByCode(strategyCode); 59 + this.fwStrategy = strategyCode != null ? LwM2MFirmwareUpdateStrategy.fromStrategyFwByCode(strategyCode) : LwM2MFirmwareUpdateStrategy.OBJ_5_BINARY;
60 this.baseUrl = baseUrl; 60 this.baseUrl = baseUrl;
61 } 61 }
62 62