Skip to content

Commit e8984d1

Browse files
committed
findbugs: move assert to a place where it still makes sense
Signed-off-by: Daan Hoogland <daan@onecht.net>
1 parent 82ecc1a commit e8984d1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeElement.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ public boolean prepare(Network network, NicProfile nic, VirtualMachineProfile vm
127127
}
128128

129129
VMInstanceVO vo = _vmDao.findById(vm.getId());
130+
assert vo != null : "Where ths nic " + nic.getId() + " going???";
130131
if (vo.getLastHostId() == null) {
131132
nic.setMacAddress(dest.getHost().getPrivateMacAddress());
132133
NicVO nicVo = _nicDao.findById(nic.getId());
133-
assert vo != null : "Where ths nic " + nic.getId() + " going???";
134134
nicVo.setMacAddress(nic.getMacAddress());
135135
_nicDao.update(nicVo.getId(), nicVo);
136136

0 commit comments

Comments
 (0)