Piotr Kliczewski has submitted this change and it was merged. Change subject: restapi: Fix NPE in request for CDROMs of wrong VM ...................................................................... restapi: Fix 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 HTTP code 404 (not found) in those cases. Change-Id: I55d4742649d8d260ae4d7c924c1a9b91efbcea6b Bug-Url: https://bugzilla.redhat.com/1150953 Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com> (cherry picked from commit 8d5aa3646e2402a48f88a0532a70d9bb50347e57) --- M backend/manager/modules/restapi/jaxrs/pom.xml M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendReadOnlyDevicesResource.java M backend/manager/modules/restapi/jaxrs/src/main/modules/org/ovirt/engine/api/restapi-jaxrs/main/module.xml 3 files changed, 17 insertions(+), 1 deletion(-) Approvals: Juan Hernandez: Verified; Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/34426 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I55d4742649d8d260ae4d7c924c1a9b91efbcea6b Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.5 Gerrit-Owner: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski@gmail.com> Gerrit-Reviewer: automation@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server