Frank Kobzik has uploaded a new change for review. Change subject: frontend: Fix NPE in os info ......................................................................
frontend: Fix NPE in os info This patch takes care of console-related methods in AsyncDataProvider. NPE can occur when existing vm is edited, but its OS was removed from os info file. Fixed by handling nulls in AsyncDataProvider and handling non-existent OS case in client code (UnitVmModel). Change-Id: I2aef27aee8e079497c9eaa22dfaa6cb9b5502aae Bug-Url: https://bugzilla.redhat.com/1046809 Signed-off-by: Frantisek Kobzik <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/81/32981/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java index 2ff00ab..1ebef3c 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java @@ -2015,6 +2015,10 @@ } List<DisplayType> displayTypes = AsyncDataProvider.getDisplayTypes(osType, cluster.getcompatibility_version()); + if (displayTypes == null) { + Integer defaultOs = AsyncDataProvider.getDefaultOs(cluster.getArchitecture()); + displayTypes = AsyncDataProvider.getDisplayTypes(defaultOs, cluster.getcompatibility_version()); + } initDisplayProtocolWithTypes(displayTypes); } -- To view, visit http://gerrit.ovirt.org/32981 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2aef27aee8e079497c9eaa22dfaa6cb9b5502aae Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.5 Gerrit-Owner: Frank Kobzik <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
