Change in ovirt-engine[master]: core, restapi: Avoid NPE when there are no provider certific...
juan.hernandez at redhat.com
juan.hernandez at redhat.com
Mon Aug 24 07:24:57 UTC 2015
Juan Hernandez has submitted this change and it was merged.
Change subject: core, restapi: Avoid NPE when there are no provider certificates
......................................................................
core, restapi: Avoid NPE when there are no provider certificates
Currently the backend and the RESTAPI generate a NPE when there are no
certificates available for a provider, for example if it is using HTTP
instead of HTTPS. The backend generates a log error and then returns
null as the result of the query. The RESTAPI takes this and assumes that
it is a list, thus generating the NPE. This patch changes the backend so
that it returns an empty list in this case and the RESTAPI so that it
tolerates null. The result of trying to import certificates after the
patch will be the error message generated by the backend:
<fault>
<reason>Operation Failed</reason>
<detail>[Failed to import provider certificate.]</detail>
</fault>
Change-Id: Ie3617dffe56fef88c9267a5471fe41a7ab294254
Bug-Url: https://bugzilla.redhat.com/1255848
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetProviderCertificateChainQuery.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendExternalProviderResource.java
2 files changed, 13 insertions(+), 8 deletions(-)
Approvals:
Ori Liel: Looks good to me, approved
Juan Hernandez: Verified
Alexander Wels: Looks good to me, but someone else must approve
Jenkins CI: Passed CI tests
--
To view, visit https://gerrit.ovirt.org/45192
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie3617dffe56fef88c9267a5471fe41a7ab294254
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Alexander Wels <awels 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: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
More information about the Engine-commits
mailing list