Fix findbugs RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE in VirtualMachineManagerImpl.java Removed two unnecessary null checks as this piece of code will only run if answer is not null, as satified in condition stated in line #1253

Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #445
This commit is contained in:
Rafael da Fonseca 2015-06-14 21:21:51 +02:00 committed by Daan Hoogland
parent d702b63bfb
commit d056c3d279

View File

@ -1266,8 +1266,8 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
if (gpuDevice != null) {
_resourceMgr.updateGPUDetails(vm.getHostId(), gpuDevice.getGroupDetails());
}
if (answer == null || !answer.getResult()) {
final String details = answer != null ? answer.getDetails() : "null answer returned";
if (!answer.getResult()) {
final String details = answer.getDetails();
s_logger.debug("Unable to stop VM due to " + details);
return false;
}