Juan Hernandez has submitted this change and it was merged.
Change subject: restapi: Avoid NPE when enum has no value
......................................................................
restapi: Avoid NPE when enum has no value
The mechanism that we currently use to validate enum values donsn't take
into account that the values may be null. When this happens a NPE is
triggered and logged, instead of generating a user friendly message.
This patch changes the validation logic so that it will generate a
reasonable error message.
Change-Id: Ie8e2ba41729bcbbf5b24a64e51dd258c039bed4e
Signed-off-by: Juan Hernandez <juan.hernandez(a)redhat.com>
---
M
backend/manager/modules/restapi/interface/common/jaxrs/src/main/java/org/ovirt/engine/api/common/util/EnumValidator.java
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Shahar Havivi: Looks good to me, approved
Juan Hernandez: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/36080
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie8e2ba41729bcbbf5b24a64e51dd258c039bed4e
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server