Remove unwanted connection

remotes/1727234365523951797/master
Oshani Silva 1 month ago
parent 70f5a99e60
commit a2b8b8bda2

@ -1177,7 +1177,6 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
public double generateCost(List<Device> allDevices, Timestamp startDate, Timestamp endDate, Cost tenantCost, List<Device> deviceStatusNotAvailable, double totalCost) throws DeviceManagementException {
List<DeviceStatus> deviceStatus;
try {
DeviceManagementDAOFactory.getConnection();
for (Device device : allDevices) {
long dateDiff = 0;
int tenantId = this.getTenantId();
@ -1228,10 +1227,6 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
String msg = "Error occurred in retrieving status history for a device in billing.";
log.error(msg, e);
throw new DeviceManagementException(msg, e);
} catch (SQLException e) {
String msg = "Error occurred while opening a connection to the data source";
log.info(msg, e);
throw new DeviceManagementException(msg, e);
}
return totalCost;
}

Loading…
Cancel
Save