Tomas Jelinek has uploaded a new change for review.

Change subject: webadmin: NPE in HostPopupView (getGroupedList) if cluster has 
no DC
......................................................................

webadmin: NPE in HostPopupView (getGroupedList) if cluster has no DC

If the cluster had no DC, HostPopupView threw an NPE on
result.put(currentDataCenter, currentClusterList);

This can happe during force remove of a DC which had some clusters.

Change-Id: Ife9d62ed325c35781bff5058564c326bfa45199c
Signed-off-by: Tomas Jelinek <tjeli...@redhat.com>
---
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostPopupView.java
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/88/42388/1

diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostPopupView.java
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostPopupView.java
index 2bb94e0..5506233 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostPopupView.java
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostPopupView.java
@@ -554,7 +554,9 @@
                     if (currentDataCenter == null || 
!currentDataCenter.equals(cluster.getStoragePoolName())) {
                         currentClusterList = new ArrayList<>();
                         currentDataCenter = cluster.getStoragePoolName();
-                        result.put(currentDataCenter, currentClusterList);
+                        if (currentDataCenter != null) {
+                            result.put(currentDataCenter, currentClusterList);
+                        }
                     }
                     if (currentClusterList != null) {
                         currentClusterList.add(cluster);


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife9d62ed325c35781bff5058564c326bfa45199c
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <tjeli...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to