Liron Ar has uploaded a new change for review. Change subject: core: ReconstructMasterDomainCommand - avoid NPE for unattached domain ......................................................................
core: ReconstructMasterDomainCommand - avoid NPE for unattached domain When a domain is not attached to the pool, it's status for the pool will be null, leading to a NPE. note: this patch is for solving the NPE, we can inspect the useage of the StorageDomainSharedStatus instead of checking the iso map on future changes. Change-Id: I4ed3c2772bd85c00f10f6e53449a150e5705f166 Signed-off-by: Liron Aravot <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ReconstructMasterDomainCommand.java 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/99/24999/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ReconstructMasterDomainCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ReconstructMasterDomainCommand.java index d977f63..5ca4302 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ReconstructMasterDomainCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ReconstructMasterDomainCommand.java @@ -65,7 +65,8 @@ // This check is done here to handle a race in which the returned domain from // getStorageDomain() is with LOCKED status. Having this domain with LOCKED status might // cause to the command to apply the compensation data and leave the domain as LOCKED. - if (checkIsDomainLocked(getStorageDomain().getStoragePoolIsoMapData())) { + StoragePoolIsoMap storagePoolIsoMap = getStorageDomain().getStoragePoolIsoMapData(); + if (storagePoolIsoMap != null && checkIsDomainLocked(storagePoolIsoMap)) { return false; } -- To view, visit http://gerrit.ovirt.org/24999 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4ed3c2772bd85c00f10f6e53449a150e5705f166 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Ar <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
