diff --git a/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot/src/main/java/org/wso2/carbon/device/mgt/iot/devicetype/DeviceTypeConfigServiceImpl.java b/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot/src/main/java/org/wso2/carbon/device/mgt/iot/devicetype/DeviceTypeConfigServiceImpl.java index 113015fce..fbdc9b37f 100644 --- a/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot/src/main/java/org/wso2/carbon/device/mgt/iot/devicetype/DeviceTypeConfigServiceImpl.java +++ b/components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot/src/main/java/org/wso2/carbon/device/mgt/iot/devicetype/DeviceTypeConfigServiceImpl.java @@ -34,7 +34,7 @@ public class DeviceTypeConfigServiceImpl implements DeviceTypeConfigService { String deviceType = deviceManagementConfiguration.getDeviceType(); String tenantDomain = deviceManagementConfiguration.getDeviceManagementConfigRepository() .getProvisioningConfig().getTenantDomain(); - if ( deviceType != null && !deviceType.isEmpty() && tenantDomain != null + if (deviceType != null && !deviceType.isEmpty() && tenantDomain != null && !tenantDomain.isEmpty()) { deviceTypeConfigurationMap.put(new DeviceTypeConfigIdentifier(deviceType, tenantDomain), deviceManagementConfiguration);