Source:
<code>public Boolean runInTransaction() { ProceedStorageDomainTreatmentByDomainType(true); if (getParameters().isInactive()) { SetStorageDomainStatus(StorageDomainStatus.InActive); CalcStoragePoolStatusByDomainsStatus(); } if (_isLastMaster) { return stopSpm(); } runVdsCommand(VDSCommandType.MarkPoolInReconstructMode, new MarkPoolInReconstructModeVDSCommandParameters( getStoragePoolId().getValue(), ReconstructMarkAction.ClearJobs)); <START> Boolean commandSucceeded = stopSpm(); <END> commandSucceeded = commandSucceeded && runVdsCommand( VDSCommandType.DisconnectStoragePool, new DisconnectStoragePoolVDSCommandParameters(getVds().getId(), getStoragePool().getId(), getVds().getvds_spm_id()) ).getSucceeded(); if (!commandSucceeded) { return false; } List<storage_pool_iso_map> domains = getStoragePoolIsoMapDAO() .getAllForStoragePool(getStoragePool().getId()); for (storage_pool_iso_map domain : domains) { if (domain.getstatus() == null || domain.getstatus() == StorageDomainStatus.Unknown) { domain.setstatus(StorageDomainStatus.Active); } else if (domain.getstatus() == StorageDomainStatus.Locked) { throw new VdcBLLException( VdcBllErrors.CANT_RECONSTRUCT_WHEN_A_DOMAIN_IN_POOL_IS_LOCKED, "Cannot reconstruct master domain when a domain in the " + "pool is locked."); } } return runVdsCommand(VDSCommandType.ReconstructMaster, new ReconstructMasterVDSCommandParameters(getVds().getId(), getStoragePool().getId(), getStoragePool().getname(), _newMasterStorageDomainId, domains, getStoragePool().getmaster_domain_version()) ).getSucceeded(); }</code><technical_language>Suggestion: simply write in command line: Boolean commandSucceeded = stopSpm() && runVdsCommand(VDSCommandType.DisconnectStoragePool,...) reduce line code. BTW in condition commandSucceeded code shorter, is if readable enough</technical_language>

Target:
public Boolean runInTransaction() { ProceedStorageDomainTreatmentByDomainType(true); if (getParameters().isInactive()) { SetStorageDomainStatus(StorageDomainStatus.InActive); CalcStoragePoolStatusByDomainsStatus(); } if (_isLastMaster) { return stopSpm(); } runVdsCommand(VDSCommandType.MarkPoolInReconstructMode, new MarkPoolInReconstructModeVDSCommandParameters( getStoragePoolId().getValue(), ReconstructMarkAction.ClearJobs)); Boolean commandSucceeded = stopSpm(); commandSucceeded = commandSucceeded && runVdsCommand( VDSCommandType.DisconnectStoragePool, new DisconnectStoragePoolVDSCommandParameters(getVds().getId(), getStoragePool().getId(), getVds().getvds_spm_id()) ).getSucceeded(); if (!commandSucceeded) { return false; } List<storage_pool_iso_map> domains = getStoragePoolIsoMapDAO() .getAllForStoragePool(getStoragePool().getId()); for (storage_pool_iso_map domain : domains) { if (domain.getstatus() == null || domain.getstatus() == StorageDomainStatus.Unknown) { domain.setstatus(StorageDomainStatus.Active); } else if (domain.getstatus() == StorageDomainStatus.Maintenance) { domain.setstatus(StorageDomainStatus.InActive); } else if (domain.getstatus() == StorageDomainStatus.Locked) { throw new VdcBLLException( VdcBllErrors.CANT_RECONSTRUCT_WHEN_A_DOMAIN_IN_POOL_IS_LOCKED, "Cannot reconstruct master domain when a domain in the " + "pool is locked."); } } return runVdsCommand(VDSCommandType.ReconstructMaster, new ReconstructMasterVDSCommandParameters(getVds().getId(), getStoragePool().getId(), getStoragePool().getname(), _newMasterStorageDomainId, domains, getStoragePool().getmaster_domain_version()) ).getSucceeded(); }