Tomas Jelinek has posted comments on this change. Change subject: engine: Cache spice support for os/compatibility version ......................................................................
Patch Set 2: (2 comments) .................................................... File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java Line 3083: Line 3084: return osNames.get(osId); Line 3085: } Line 3086: Line 3087: public static Boolean hasSpiceSupport(int osId, Version version) { please don't use int osId but Integer with a null check - there is a fair chance that it will be null so it could fail on NPE (we already faced this). Line 3088: return spiceSupportMatrix.get(osId).get(version); Line 3089: } Line 3090: Line 3091: private static void initHasSpiceSupport() { .................................................... File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/ConsoleModelsCache.java Line 73: Line 74: final boolean isWindowsExplorer = parentModel.getConfigurator().isClientWindowsExplorer(); Line 75: Line 76: Boolean hasSpiceSupport = AsyncDataProvider.hasSpiceSupport(vm.getOs(), vm.getVdsGroupCompatibilityVersion()); Line 77: if (isWindowsExplorer && hasSpiceSupport != null && hasSpiceSupport.booleanValue()) { no need to call booleanValue() Line 78: cachedModels.get(RDP_INDEX).setUserSelected(true); Line 79: } else { Line 80: determineConsoleModelFromVm(vm, cachedModels).setUserSelected(true); Line 81: } -- To view, visit http://gerrit.ovirt.org/19137 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib97d68ccd0d30fd07e8d1a7d1322f731aef220f7 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Frank Kobzik <fkob...@redhat.com> Gerrit-Reviewer: Frank Kobzik <fkob...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches