Skip to content

Commit

Permalink
ICU-21308 Fix icu4j build for Java 7 in MeasureUnitImpl
Browse files Browse the repository at this point in the history
  • Loading branch information
younies committed Oct 22, 2020
1 parent 340271c commit dd87efa
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;

import com.ibm.icu.util.BytesTrie;
Expand Down Expand Up @@ -224,7 +225,7 @@ public void serialize() {
}
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();
Expand Down

0 comments on commit dd87efa

Please sign in to comment.