Piotr Kliczewski has posted comments on this change.

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


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/32276/1/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java:

Line 1680:         // and marking the VMs for addition
Line 1681:         if (!vmsToQuery.isEmpty()) {
Line 1682:             // Query VDSM for VMs info, and creating a proper 
VMStatic to be used when importing them
Line 1683:             Map[] vmsInfo = getVmInfo(vmsToQuery);
Line 1684:             if (vmsInfo == null) {
> this is not the place to handle it. 
We had long conversation with Oved about where it should be and have decided to 
have it here. 

Actually when you take a look at the code the array is created and populated in 
VMListReturnForXmlRpc.java. There is a check:

        if (temp != null) {

so the author assumed that vmlist can be empty. I did not want o change the 
contract there. Instead we need to make sure that array of maps in not null 
here.
Line 1685:                 return;
Line 1686:             }
Line 1687:             for (Map vmInfo : vmsInfo) {
Line 1688:                 Guid vmId = Guid.createGuidFromString((String) 
vmInfo.get(VdsProperties.vm_guid));


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifa1971f1181489e50877d080aec36ebc6d715f74
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Piotr Kliczewski <piotr.kliczew...@gmail.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to