Drop LabelType.getPosition()

Instead sort labels implicitly based on the order passed into
LabelTypes.

Change-Id: Ib57664acc543539a7c5c1b9279970f4ba7d04bb7
This commit is contained in:
Dave Borowitz
2013-02-18 15:15:53 -08:00
parent 03fbaf8655
commit c113b55efb
6 changed files with 43 additions and 56 deletions

View File

@@ -88,8 +88,7 @@ public class ReviewerJson {
}
// Don't use Maps.newTreeMap(Comparator) due to OpenJDK bug 100167.
out.approvals = new TreeMap<String,String>(LabelOrdering.create(
labelTypes));
out.approvals = new TreeMap<String,String>(labelTypes.nameComparator());
for (PatchSetApproval ca : approvals) {
for (PermissionRange pr : ctl.getLabelRanges()) {
if (!pr.isEmpty()) {