Use TreeMaps instead of Maps in a couple of places.
OpenJDK doesn't seem to like the latter, and hasn't been able to compile for the last couple of days. SunJDK doesn't seem to have any problems with swapping out Map for TreeMap, so we'll be more explicit. Change-Id: I4c0b9eeceed57974785c1598e2d6aff4b04ead10
This commit is contained in:
@@ -89,6 +89,7 @@ import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeMap;
|
||||
|
||||
public class ChangeJson {
|
||||
private static final Logger log = LoggerFactory.getLogger(ChangeJson.class);
|
||||
@@ -353,7 +354,7 @@ public class ChangeJson {
|
||||
|
||||
private Map<String, LabelInfo> initLabels(ChangeData cd, boolean standard)
|
||||
throws OrmException {
|
||||
Map<String, LabelInfo> labels =
|
||||
TreeMap<String, LabelInfo> labels =
|
||||
Maps.newTreeMap(LabelOrdering.create(approvalTypes));
|
||||
for (SubmitRecord rec : submitRecords(cd)) {
|
||||
if (rec.labels == null) {
|
||||
@@ -471,7 +472,7 @@ public class ChangeJson {
|
||||
boolean standard, boolean detailed) throws OrmException {
|
||||
// We can only approximately reconstruct what the submit rule evaluator
|
||||
// would have done. These should really come from a stored submit record.
|
||||
Map<String, LabelInfo> labels =
|
||||
TreeMap<String, LabelInfo> labels =
|
||||
Maps.newTreeMap(LabelOrdering.create(approvalTypes));
|
||||
for (PatchSetApproval psa : cd.currentApprovals(db)) {
|
||||
ApprovalType type = approvalTypes.byId(psa.getCategoryId());
|
||||
|
||||
@@ -38,7 +38,7 @@ import com.google.inject.Provider;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
public class ReviewerJson {
|
||||
private final Provider<ReviewDb> db;
|
||||
@@ -132,7 +132,7 @@ public class ReviewerJson {
|
||||
|
||||
public static class ReviewerInfo extends AccountInfo {
|
||||
final String kind = "gerritcodereview#reviewer";
|
||||
Map<String, String> approvals;
|
||||
TreeMap<String, String> approvals;
|
||||
|
||||
protected ReviewerInfo(Account.Id id) {
|
||||
super(id);
|
||||
|
||||
Reference in New Issue
Block a user