mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fixed few coverity issues
This commit is contained in:
parent
354756219c
commit
f9e11540c7
@ -100,7 +100,7 @@ public class PropertiesStorage implements StorageComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public synchronized String getName() {
|
||||||
return _name;
|
return _name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3988,11 +3988,14 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
|
|||||||
s_logger.debug("Creating VLAN " + tag + " on host " + _host.ip + " on device " + nPifr.device);
|
s_logger.debug("Creating VLAN " + tag + " on host " + _host.ip + " on device " + nPifr.device);
|
||||||
}
|
}
|
||||||
VLAN vlan = VLAN.create(conn, nPif, tag, vlanNetwork);
|
VLAN vlan = VLAN.create(conn, nPif, tag, vlanNetwork);
|
||||||
VLAN.Record vlanr = vlan.getRecord(conn);
|
if (vlan != null) {
|
||||||
if (s_logger.isDebugEnabled()) {
|
VLAN.Record vlanr = vlan.getRecord(conn);
|
||||||
s_logger.debug("VLAN is created for " + tag + ". The uuid is " + vlanr.uuid);
|
if (vlanr != null) {
|
||||||
|
if (s_logger.isDebugEnabled()) {
|
||||||
|
s_logger.debug("VLAN is created for " + tag + ". The uuid is " + vlanr.uuid);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return vlanNetwork;
|
return vlanNetwork;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -278,10 +278,11 @@ public class AlertManagerImpl extends ManagerBase implements AlertManager, Confi
|
|||||||
// Calculate CPU and RAM capacities
|
// Calculate CPU and RAM capacities
|
||||||
// get all hosts...even if they are not in 'UP' state
|
// get all hosts...even if they are not in 'UP' state
|
||||||
List<HostVO> hosts = _resourceMgr.listAllNotInMaintenanceHostsInOneZone(Host.Type.Routing, null);
|
List<HostVO> hosts = _resourceMgr.listAllNotInMaintenanceHostsInOneZone(Host.Type.Routing, null);
|
||||||
for (HostVO host : hosts) {
|
if (hosts != null) {
|
||||||
_capacityMgr.updateCapacityForHost(host);
|
for (HostVO host : hosts) {
|
||||||
|
_capacityMgr.updateCapacityForHost(host);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s_logger.isDebugEnabled()) {
|
if (s_logger.isDebugEnabled()) {
|
||||||
s_logger.debug("Done executing cpu/ram capacity update");
|
s_logger.debug("Done executing cpu/ram capacity update");
|
||||||
s_logger.debug("Executing storage capacity update");
|
s_logger.debug("Executing storage capacity update");
|
||||||
|
|||||||
@ -1600,7 +1600,9 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
|
|||||||
if (implementedNetwork == null || implementedNetwork.first() == null) {
|
if (implementedNetwork == null || implementedNetwork.first() == null) {
|
||||||
s_logger.warn("Failed to implement the network " + guestNetwork);
|
s_logger.warn("Failed to implement the network " + guestNetwork);
|
||||||
}
|
}
|
||||||
guestNetwork = implementedNetwork.second();
|
if (implementedNetwork != null) {
|
||||||
|
guestNetwork = implementedNetwork.second();
|
||||||
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
s_logger.warn("Failed to implement network " + guestNetwork + " elements and resources as a part of" + " network provision due to ", ex);
|
s_logger.warn("Failed to implement network " + guestNetwork + " elements and resources as a part of" + " network provision due to ", ex);
|
||||||
CloudRuntimeException e = new CloudRuntimeException("Failed to implement network (with specified id)"
|
CloudRuntimeException e = new CloudRuntimeException("Failed to implement network (with specified id)"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user