Change in ovirt-engine[master]: restapi: Avoid potential NPE in event mapper

juan.hernandez at redhat.com juan.hernandez at redhat.com
Mon Mar 7 12:25:31 UTC 2016


Juan Hernandez has submitted this change and it was merged.

Change subject: restapi: Avoid potential NPE in event mapper
......................................................................


restapi: Avoid potential NPE in event mapper

The mapper for events doesn't take into account that the severity can be
null if the user provides an incorrect value. If that happens, a NPE is
generated when extracting the name from the null enum value. To avoid
that this patch adds a null check.

Change-Id: Id299521c59baf49e27ef6381b1be872338fd1982
Coverity-Id: 1201913
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
---
M backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/EventMapper.java
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Juan Hernandez: Verified; Looks good to me, approved
  Jenkins CI: Passed CI tests
  Allon Mureinik: Looks good to me, but someone else must approve



-- 
To view, visit https://gerrit.ovirt.org/54372
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id299521c59baf49e27ef6381b1be872338fd1982
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: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Ori Liel <oliel at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list