Change in ovirt-engine[master]: restapi: Check dispatcher in version filter

juan.hernandez at redhat.com juan.hernandez at redhat.com
Mon Mar 7 11:50:34 UTC 2016


Juan Hernandez has submitted this change and it was merged.

Change subject: restapi: Check dispatcher in version filter
......................................................................


restapi: Check dispatcher in version filter

Currently the version filter doesn't check the result of the
"getRequestDispatcher" method, which may be null when there is no such
dispatcher. If this happens that will generate a NPE. That isn't a
serious problem, as it will result in an HTTP 500 (internal server error)
code sent to the client for a request that is incorrect anyhow. But it
is better to check it, write a message in the log, and send to the
client a HTTP 404 (not found) code.

Change-Id: Ib73a6ef557f079f667bbddca6596799a08c5ddad
Coverity-Id: 1352163
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
---
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/invocation/VersionFilter.java
1 file changed, 13 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/54371
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib73a6ef557f079f667bbddca6596799a08c5ddad
Gerrit-PatchSet: 4
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