Daniel Erez has uploaded a new change for review. Change subject: webadmin: snapshot sub-tab - avoid redundant update ......................................................................
webadmin: snapshot sub-tab - avoid redundant update VmSnapshotListModel -> updateActionAvailability: avoid update when getItems is null (to prevent an NPE). Change-Id: If3469c20f2a4caceb96b40bbf542baacbadcf30e Bug-Url: https://bugzilla.redhat.com/1058618 Signed-off-by: Daniel Erez <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/35/25535/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java index fa8fb71..f5534b9 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java @@ -639,6 +639,11 @@ public void updateActionAvailability() { + if (getItems() == null) { + // no need to update action availability + return; + } + VM vm = (VM) getEntity(); Snapshot snapshot = (Snapshot) getSelectedItem(); List<VM> vmList = vm != null ? Collections.singletonList(vm) : Collections.<VM> emptyList(); -- To view, visit http://gerrit.ovirt.org/25535 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If3469c20f2a4caceb96b40bbf542baacbadcf30e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Daniel Erez <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
