Source:
<code>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()); <START> } else if (getEntity().getStoragePoolId() == null) { <END> 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>condition in this "else" clause left out (complements non-null "if" clause above), I leave you</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 { 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); } } } )); } }