Tomas Jelinek has uploaded a new change for review.

Change subject: webadmin: NPE while login if there are some running tasks
......................................................................

webadmin: NPE while login if there are some running tasks

The new SimpleActionTable() in the AlertsEventsFooterView's constructor
triggers the TaskModelProvider.updateDataProvider() which in case there are at
least one started job, triggers the
taskHandler.onRunningTasksCountChange(count). This in turn triggers the call to
AlertsEventsFooterView.setAlertCount() which expects the buttons to be already
inited. But this fields are inited at the end of the constructor which causes
NPE.

Fixed by calling the updateButtonResources() which inits this buttons sooner.

This bug happens in development mode only.

Change-Id: I3315802e33d0bc21ae1810802d1466464e8321b4
Signed-off-by: Tomas Jelinek <tjeli...@redhat.com>
---
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/footer/AlertsEventsFooterView.java
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/89/37289/1

diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/footer/AlertsEventsFooterView.java
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/footer/AlertsEventsFooterView.java
index 1f1b540..0d6a406 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/footer/AlertsEventsFooterView.java
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/footer/AlertsEventsFooterView.java
@@ -149,6 +149,8 @@
         tasksTree = new TasksTree(resources, constants, templates);
         tasksTree.updateTree(taskModelProvider.getModel());
 
+        updateButtonResources();
+
         _tasksTable =
                 new SimpleActionTable<Job>(taskModelProvider, 
getTableResources(), eventBus, clientStorage);
         makeSingleRowTable(_tasksTable);
@@ -175,7 +177,6 @@
         // no body is invoking the alert search (timer)
         taskModelProvider.getModel().search();
 
-        updateButtonResources();
         updateEventsButton();
         updateTaskButton(0);
         setAlertCount(0);


-- 
To view, visit http://gerrit.ovirt.org/37289
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3315802e33d0bc21ae1810802d1466464e8321b4
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