*/
package eu.etaxonomy.taxeditor.editor.descriptiveDataSet.matrix;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
FeatureDto feature = matrix.getIndexToFeatureMap().get(columnIndex);
if(feature.isSupportsCategoricalData()
- && newValue instanceof Collection
- && ((Collection) newValue).stream().allMatch(o->o instanceof TermDto)){
- List<TermDto> dtos = (List<TermDto>)newValue;
+ && newValue instanceof Collection){
+
+ List<TermDto> dtos = new ArrayList<>();
+ if (((Collection) newValue).stream().allMatch(o->o instanceof TermDto) ){
+ dtos = (List<TermDto>)newValue;
+ }
// List<UUID> termUuids = dtos.stream().map(dto->dto.getUuid()).collect(Collectors.toList());
// List<DefinedTermBase> terms = CdmStore.getService(ITermService.class).load(termUuids, null);
// List<State> states = new ArrayList<>();
if(rowWrapper instanceof RowWrapperDTO){
FeatureDto feature = matrix.getIndexToFeatureMap().get(getColumnIndex());
// FIXME avoid creating empty CategoricalData
- ((RowWrapperDTO) rowWrapper).addCategoricalData(feature);
+// ((RowWrapperDTO) rowWrapper).addCategoricalData(feature);
}
}
super.setCanonicalValue(canonicalValue);