mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
findbugs: move assert to a place where it still makes sense
Signed-off-by: Daan Hoogland <daan@onecht.net>
This commit is contained in:
parent
82ecc1aa06
commit
e8984d16ed
@ -127,10 +127,10 @@ public class BaremetalPxeElement extends AdapterBase implements NetworkElement {
|
||||
}
|
||||
|
||||
VMInstanceVO vo = _vmDao.findById(vm.getId());
|
||||
assert vo != null : "Where ths nic " + nic.getId() + " going???";
|
||||
if (vo.getLastHostId() == null) {
|
||||
nic.setMacAddress(dest.getHost().getPrivateMacAddress());
|
||||
NicVO nicVo = _nicDao.findById(nic.getId());
|
||||
assert vo != null : "Where ths nic " + nic.getId() + " going???";
|
||||
nicVo.setMacAddress(nic.getMacAddress());
|
||||
_nicDao.update(nicVo.getId(), nicVo);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user