Tomas Jelinek has posted comments on this change. Change subject: fontend: Correct host list on New Storage Domain creation ......................................................................
Patch Set 1: (5 inline comments) .................................................... File backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/GetSpmCandidatesQueryTest.java Line 35: // Execute the query Line 36: getQuery().executeQueryCommand(); Line 37: Line 38: // Check the result Line 39: assertEquals("Wrong roles returned", result, getQuery().getQueryReturnValue().getReturnValue()); roles? Line 40: } .................................................... File backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDAODbFacadeImpl.java Line 132: Line 133: @Override Line 134: public List<VDS> getSpmCandidates(Guid storagePoolId, boolean localFsOnly) { Line 135: // normalize to uniquely represent in DB that we want candidates from all DC's Line 136: storagePoolId = storagePoolId.equals(Guid.Empty) ? null : storagePoolId; according to the javadoc storagePoolId can be null but in that case this would fail on NPE Line 137: return getCallsHandler().executeReadList("getSpmCandidates", Line 138: VdsRowMapper.instance, Line 139: getCustomMapSqlParameterSource() Line 140: .addValue("storage_pool_id", storagePoolId) .................................................... File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java Line 1062: public static void getSpmCandidates(AsyncQuery aQuery, Guid storagePoolId, boolean localFsOnly) { Line 1063: aQuery.converterCallback = new IAsyncConverter() { Line 1064: @Override Line 1065: public Object Convert(Object source, AsyncQuery _asyncQuery) Line 1066: { if you write new code please use java formatting Line 1067: if (source != null) Line 1068: { Line 1069: ArrayList<VDS> list = Linq.<VDS> cast((ArrayList<IVdcQueryable>) source); Line 1070: return list; Line 1065: public Object Convert(Object source, AsyncQuery _asyncQuery) Line 1066: { Line 1067: if (source != null) Line 1068: { Line 1069: ArrayList<VDS> list = Linq.<VDS> cast((ArrayList<IVdcQueryable>) source); I would say you don't need this Linq.cast, just return the list. Line 1070: return list; Line 1071: } Line 1072: Line 1073: return new ArrayList<VDS>(); .................................................... File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageModel.java Line 513: return; Line 514: } Line 515: Line 516: StoragePool dataCenter = (StoragePool) getDataCenter().getSelectedItem(); Line 517: nice simplification! Line 518: boolean localFsOnly = getSelectedItem() instanceof LocalStorageModel; Line 519: Guid dataCenterId = dataCenter == null ? null : dataCenter.getId(); Line 520: Line 521: AsyncDataProvider.getSpmCandidates(new AsyncQuery(this, new INewAsyncCallback() { -- To view, visit http://gerrit.ovirt.org/15397 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifd2b1e7882c8527a80c8f340c4b0c363ba0b0f32 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Beták <mbe...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Martin Beták <mbe...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches