Project

General

Profile

Revision c6eb0a3c

IDc6eb0a3ccc87c0d165d7feb50cfbc675e1b8f045
Parent 791100dd
Child 7fa325bc

Added by Andreas Müller over 1 year ago

ref #7357 fix clone for quantitativeData and StatisticalMeasurementValue

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/description/QuantitativeData.java
558 558
			QuantitativeData result = (QuantitativeData)super.clone();
559 559

  
560 560
			//states
561
			result.statisticalValues = new HashSet<StatisticalMeasurementValue>();
561
			result.statisticalValues = new HashSet<>();
562 562
			for (StatisticalMeasurementValue data : getStatisticalValues()){
563
				//TODO do we need to clone here?
564 563
				StatisticalMeasurementValue newData = (StatisticalMeasurementValue)data.clone();
565
				result.statisticalValues.add(newData);
564
				result.addStatisticalValue(newData);
566 565
			}
567 566

  
568 567
			return result;
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/description/StatisticalMeasurementValue.java
208 208
			StatisticalMeasurementValue result = (StatisticalMeasurementValue)super.clone();
209 209

  
210 210
			//modifiers
211
			result.modifiers = new HashSet<DefinedTerm>();
211
			result.modifiers = new HashSet<>();
212 212
			for (DefinedTerm modifier : getModifiers()){
213
				result.modifiers.add(modifier);
213
				result.addModifier(modifier);
214 214
			}
215 215

  
216 216
			return result;

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)