Eli Mesika has submitted this change and it was merged.
Change subject: fix issues found by Coverity
......................................................................
fix issues found by Coverity
Fixes the following issue (and in addition similiar one that from some
reason is not reported by is exactly the same)
*** CID 1306702: Null pointer dereferences (NULL_RETURNS)
/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/StorageDomainAdditionalStatusColumn.java:
43 in
org.ovirt.engine.ui.webadmin.widget.table.column.StorageDomainAdditionalStatusColumn.getSafeHtmlStringMap(org.ovirt.engine.core.common.businessentities.StorageDomain)()
37
38 private Map<SafeHtml, String>
getSafeHtmlStringMap(StorageDomain
object) {
39 StorageDomain storageDomain = getEntityObject(object);
40 Map<SafeHtml, String> imagesToText = new
LinkedHashMap<>();
41
42 if (storageDomain.getExternalStatus() !=
ExternalStatus.Ok) {
>>> CID 1306702: Null pointer dereferences (NULL_RETURNS)
>>> Assigning: "statusImage" = null return value from
>>> "getStatusImage".
43 ImageResource statusImage =
getStatusImage(storageDomain.getExternalStatus());
44 imagesToText.put(getImageSafeHtml(statusImage),
45 constants.ExternalStatus() +
storageDomain.getExternalStatus().name());
46 }
47 return imagesToText;
48 }
Change-Id: I500e4680dbae310cc3027cedff1fc54df353ece2
Signed-off-by: emesika <emesika(a)redhat.com>
---
M
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/HostAdditionalStatusColumn.java
M
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/StorageDomainAdditionalStatusColumn.java
2 files changed, 8 insertions(+), 6 deletions(-)
Approvals:
Eli Mesika: Verified; Passed CI tests
Daniel Erez: Looks good to me, approved
Allon Mureinik: Looks good to me, but someone else must approve
Oved Ourfali: Looks good to me, but someone else must approve
--
To view, visit
https://gerrit.ovirt.org/42595
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I500e4680dbae310cc3027cedff1fc54df353ece2
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Oved Ourfali <oourfali(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org