Source:
<code>private void updateOptions() { getCompulsoryActions().clear(); getOptionalActions().clear(); <START> startProgress(null); <END> if (getEntity() != null && getEntity().getStoragePoolId() != null) { AsyncDataProvider.getInstance().getDataCenterById(new AsyncQuery(this, new INewAsyncCallback() { @Override public void onSuccess(Object target, Object returnValue) { ClusterGuideModel model = (ClusterGuideModel) target; model.dataCenter = (StoragePool) returnValue; if (model.dataCenter == null || !model.dataCenter.isLocal()) { model.updateOptionsNonLocalFSData(); } else { model.updateOptionsLocalFSData(); } } }), getEntity().getStoragePoolId()); } else if (getEntity() != null && getEntity().getStoragePoolId() == null) { AsyncDataProvider.getInstance().getDataCenterList(new AsyncQuery(this, new INewAsyncCallback() { @Override public void onSuccess(Object target, Object returnValue) { ClusterGuideModel model = (ClusterGuideModel) target; @SuppressWarnings("unchecked") List<StoragePool> dataCenters = (ArrayList<StoragePool>) returnValue; final List<StoragePool> localDataCenters = new ArrayList<StoragePool>(); boolean enableButton = false; for (StoragePool dataCenter: dataCenters) { if (model.getEntity().getCompatibilityVersion().compareTo( dataCenter.getCompatibilityVersion()) >= 0 ) { if (dataCenter.isLocal()) { localDataCenters.add(dataCenter); } else { enableButton = true; break; } } } if (enableButton || localDataCenters.isEmpty()) { model.updateOptionsRequiredAddDataCenter(enableButton); } else { model.updateOptionsRequiredAddDataCenter(localDataCenters); } } } )); } }</code><technical_language>if getEntity() returns null this point? of if-else clauses execute, meaning Cluster Guide dialog end stuck progress animation. do: if (getEntity() == null) { return; } startProgress(null); simplify if-else conditions below</technical_language>

Target:
private void updateOptions() { getCompulsoryActions().clear(); getOptionalActions().clear(); if (getEntity() == null) { return; } startProgress(null); if (getEntity().getStoragePoolId() != null) { AsyncDataProvider.getInstance().getDataCenterById(new AsyncQuery(this, new INewAsyncCallback() { @Override public void onSuccess(Object target, Object returnValue) { ClusterGuideModel model = (ClusterGuideModel) target; model.dataCenter = (StoragePool) returnValue; if (model.dataCenter == null || !model.dataCenter.isLocal()) { model.updateOptionsNonLocalFSData(); } else { model.updateOptionsLocalFSData(); } } }), getEntity().getStoragePoolId()); } else if (getEntity().getStoragePoolId() == null) { AsyncDataProvider.getInstance().getDataCenterList(new AsyncQuery(this, new INewAsyncCallback() { @Override public void onSuccess(Object target, Object returnValue) { ClusterGuideModel model = (ClusterGuideModel) target; @SuppressWarnings("unchecked") List<StoragePool> dataCenters = (ArrayList<StoragePool>) returnValue; final List<StoragePool> localDataCenters = new ArrayList<StoragePool>(); boolean enableButton = false; for (StoragePool dataCenter: dataCenters) { if (model.getEntity().getCompatibilityVersion().compareTo( dataCenter.getCompatibilityVersion()) >= 0 ) { if (dataCenter.isLocal()) { localDataCenters.add(dataCenter); } else { enableButton = true; break; } } } if (enableButton || localDataCenters.isEmpty()) { model.updateOptionsRequiredAddDataCenter(enableButton); } else { model.updateOptionsRequiredAddDataCenter(localDataCenters); } } } )); } }