ICU-21308 Fix icu4j build for Java 7 in MeasureUnitImpl

See #1428
This commit is contained in:
younies 2020-10-22 09:45:47 +00:00 committed by Younies Mahmoud
parent 340271c225
commit dd87efa299

View file

@ -4,6 +4,7 @@ package com.ibm.icu.impl.units;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import com.ibm.icu.util.BytesTrie;
@ -224,7 +225,7 @@ public class MeasureUnitImpl {
}
if (this.complexity == MeasureUnit.Complexity.COMPOUND) {
// Note: don't sort a MIXED unit
this.getSingleUnits().sort(new SingleUnitComparator());
Collections.sort(this.getSingleUnits(), new SingleUnitComparator());
}
StringBuilder result = new StringBuilder();