Resolve comments

pull/384/head
Pramila Niroshan 5 months ago
parent 8de7a00f39
commit 195c48c85e

@ -150,7 +150,9 @@ public class DeviceStatusManagementServiceImpl implements DeviceStatusManagement
public void updateDefaultDeviceStatusFilters(int tenantId, String deviceType, List<String> deviceStatus) throws MetadataManagementException {
try {
if (StringUtils.isEmpty(deviceType)) {
throw new IllegalArgumentException("Device type must not be empty or null");
String msg = "Device type must not be empty or null";
log.error(msg);
throw new IllegalArgumentException(msg);
}
MetadataManagementDAOFactory.beginTransaction();
// Retrieve the current device status metadata
@ -267,7 +269,9 @@ public class DeviceStatusManagementServiceImpl implements DeviceStatusManagement
@Override
public boolean isDeviceStatusValid(String deviceType, String deviceStatus, int tenantId) throws MetadataManagementException {
if (StringUtils.isEmpty(deviceType)) {
throw new IllegalArgumentException("Device type must not be empty or null");
String msg = "Device type must not be empty or null";
log.error(msg);
throw new IllegalArgumentException(msg);
}
MetadataManagementService metadataManagementService = new MetadataManagementServiceImpl();
Metadata metadata = metadataManagementService.retrieveMetadata(MetadataConstants.ALLOWED_DEVICE_STATUS_META_KEY);

Loading…
Cancel
Save