Piotr Kliczewski has uploaded a new change for review.

Change subject: core: NPE when getVMFullList returns no vm information
......................................................................

core: NPE when getVMFullList returns no vm information

When getVMFullList fetches no information the code fails with NPE.


Bug-Url: https://bugzilla.redhat.com/1135959
Change-Id: Ifa1971f1181489e50877d080aec36ebc6d715f74
Signed-off-by: pkliczewski <piotr.kliczew...@gmail.com>
---
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/64/32264/1

diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
index f0ceb0b..ba2bff7 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
@@ -1669,6 +1669,9 @@
         if (!vmsToQuery.isEmpty()) {
             // Query VDSM for VMs info, and creating a proper VMStatic to be 
used when importing them
             Map[] vmsInfo = getVmInfo(vmsToQuery);
+            if (vmsInfo == null) {
+                return;
+            }
             for (Map vmInfo : vmsInfo) {
                 Guid vmId = Guid.createGuidFromString((String) 
vmInfo.get(VdsProperties.vm_guid));
                 VmStatic vmStatic = new VmStatic();


-- 
To view, visit http://gerrit.ovirt.org/32264
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa1971f1181489e50877d080aec36ebc6d715f74
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczew...@gmail.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to