Added proper hanling of null values for provision device key
This commit is contained in:
parent
414087c090
commit
d95c2b88b0
@ -61,7 +61,9 @@ public class DeviceProfileMsgConstructor {
|
|||||||
if (deviceProfile.getProvisionType() != null) {
|
if (deviceProfile.getProvisionType() != null) {
|
||||||
builder.setProvisionType(getStringValue(deviceProfile.getProvisionType().name()));
|
builder.setProvisionType(getStringValue(deviceProfile.getProvisionType().name()));
|
||||||
}
|
}
|
||||||
builder.setProvisionDeviceKey(getStringValue(deviceProfile.getProvisionDeviceKey()));
|
if (deviceProfile.getProvisionDeviceKey() != null) {
|
||||||
|
builder.setProvisionDeviceKey(getStringValue(deviceProfile.getProvisionDeviceKey()));
|
||||||
|
}
|
||||||
if (deviceProfile.getImage() != null) {
|
if (deviceProfile.getImage() != null) {
|
||||||
builder.setImage(getBytesValue(ByteString.copyFrom(deviceProfile.getImage().getBytes(StandardCharsets.UTF_8))));
|
builder.setImage(getBytesValue(ByteString.copyFrom(deviceProfile.getImage().getBytes(StandardCharsets.UTF_8))));
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user