Change in ovirt-engine[ovirt-engine-3.6]: core, restapi: Avoid NPE when there are no provider certific...
tnisan at redhat.com
tnisan at redhat.com
Tue Aug 25 07:22:38 UTC 2015
Tal Nisan 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>
(cherry picked from commit f6af3c25237e4fc8add4f0f0d6be8f5b43cf6366)
---
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:
Juan Hernandez: Verified; Looks good to me, approved
Jenkins CI: Passed CI tests
--
To view, visit https://gerrit.ovirt.org/45237
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie3617dffe56fef88c9267a5471fe41a7ab294254
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.6
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
More information about the Engine-commits
mailing list