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