Allon Mureinik has uploaded a new change for review. Change subject: ui: DiskModelByAliasComparer: null disk treatment ......................................................................
ui: DiskModelByAliasComparer: null disk treatment DiskModelByAliasComparer was checking DiskModel.getDisk() for being null, but then ignoring the check, and performing the same operation (DiskModel.getDisk().getDiskAlias()) regardless. This is obviously wrong, since if the disk is null, this will result in a NullPointerException. This patch assigns a default (empty String) as the disk alias in case the disk is null. Change-Id: I2d060a5b9d87dc3ec7bcc382d90a4f2825ca9a05 Signed-off-by: Allon Mureinik <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/46/12346/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java index 7462ec6..83e0a8a 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java @@ -15,6 +15,7 @@ import org.ovirt.engine.core.common.businessentities.DiskImage; import org.ovirt.engine.core.common.businessentities.ServerCpu; import org.ovirt.engine.core.common.businessentities.Snapshot; +import org.ovirt.engine.core.common.businessentities.StorageDomain; import org.ovirt.engine.core.common.businessentities.StorageDomainSharedStatus; import org.ovirt.engine.core.common.businessentities.StorageDomainStatus; import org.ovirt.engine.core.common.businessentities.StorageDomainType; @@ -23,11 +24,10 @@ import org.ovirt.engine.core.common.businessentities.VDSGroup; import org.ovirt.engine.core.common.businessentities.VDSStatus; import org.ovirt.engine.core.common.businessentities.VM; +import org.ovirt.engine.core.common.businessentities.VmPool; import org.ovirt.engine.core.common.businessentities.VmTemplate; import org.ovirt.engine.core.common.businessentities.VolumeType; -import org.ovirt.engine.core.common.businessentities.StorageDomain; import org.ovirt.engine.core.common.businessentities.storage_pool; -import org.ovirt.engine.core.common.businessentities.VmPool; import org.ovirt.engine.core.common.businessentities.network.Network; import org.ovirt.engine.core.common.businessentities.network.NetworkInterface; import org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface; @@ -208,9 +208,9 @@ public int compare(DiskModel x, DiskModel y) { String xAlias = x.getDisk() != null ? - x.getDisk().getDiskAlias() : x.getDisk().getDiskAlias(); + x.getDisk().getDiskAlias() : ""; String yAlias = y.getDisk() != null ? - y.getDisk().getDiskAlias() : y.getDisk().getDiskAlias(); + y.getDisk().getDiskAlias() : ""; if (xAlias == null) { -- To view, visit http://gerrit.ovirt.org/12346 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2d060a5b9d87dc3ec7bcc382d90a4f2825ca9a05 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Allon Mureinik <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
