Alexander Wels has posted comments on this change. Change subject: userportal: VM endless loading ......................................................................
Patch Set 1: (2 comments) http://gerrit.ovirt.org/#/c/35251/1/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalItemModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalItemModel.java: Line 384: VM thisVm = (VM) getEntity(); Line 385: VM otherVm = (VM) other.getEntity(); Line 386: boolean consoleUsersEqual = (thisVm.getConsoleCurentUserName() != null Line 387: && thisVm.getConsoleCurentUserName().equals(otherVm.getConsoleCurentUserName())) || Line 388: (thisVm.getConsoleCurentUserName() == null && otherVm.getConsoleCurentUserName() == null); > Consider using Java 7's static Objects.equals() API to make code more reada Thanks, I had fruitlessly searched for that method, I knew I had seen it somewhere before. Line 389: Line 390: return thisVm.getDynamicData().getStatus().equals(otherVm.getDynamicData().getStatus()) Line 391: && consoleUsersEqual Line 392: && thisVm.getStaticData().equals(otherVm.getStaticData()); http://gerrit.ovirt.org/#/c/35251/1/frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/presenter/tab/extended/SideTabExtendedVirtualMachinePresenter.java File frontend/webadmin/modules/userportal-gwtp/src/main/java/org/ovirt/engine/ui/userportal/section/main/presenter/tab/extended/SideTabExtendedVirtualMachinePresenter.java: Line 74: Line 75: @Override Line 76: public void onHide() { Line 77: super.onHide(); Line 78: ((AbstractUserPortalListProvider<UserPortalListModel>)modelProvider).clearCurrentItems(); > I think we should avoid explicit type casts whenever possible. Except that the templates don't have the render optimization, so its not useful for templates right now. Also there are never no templates (there is a default one). So one of the issue described will never happen for templates. Line 79: } Line 80: Line 81: /** Line 82: * This method is a hack which enables to have pool and VM subtabs to be bound with the same title -- To view, visit http://gerrit.ovirt.org/35251 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iae7bc8fcf9b4d875e99f7b4a6264a54ceed9fb7e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alexander Wels <[email protected]> Gerrit-Reviewer: Alexander Wels <[email protected]> Gerrit-Reviewer: Einav Cohen <[email protected]> Gerrit-Reviewer: Vojtech Szocs <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
