Change in ovirt-engine[master]: restapi: Avoid NPE in request for CDROMs of wrong VM

juan.hernandez at redhat.com juan.hernandez at redhat.com
Fri Nov 7 16:31:03 UTC 2014


Juan Hernandez has submitted this change and it was merged.

Change subject: restapi: Avoid NPE in request for CDROMs of wrong VM
......................................................................


restapi: Avoid NPE in request for CDROMs of wrong VM

Currently when we receive a request for the collection of CDROMs of a VM
we don't take into account that the query performed to find the VM can
return null if there isn't such a VM (the identifier is wrong, or the VM
has been removed). To avoid that NPE this patch checks the result of the
query and will respond with an empty list in those cases.

Change-Id: Id17ef36193c21e113d4abafeee0c769a2a948bd3
Bug-Url: https://bugzilla.redhat.com/1150953
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
---
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendReadOnlyDevicesResource.java
1 file changed, 8 insertions(+), 6 deletions(-)

Approvals:
  Juan Hernandez: Verified; Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id17ef36193c21e113d4abafeee0c769a2a948bd3
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list