Apply "type inference for generic instance creation" Java 7 feature

Change-Id: Ia14802c903ca67b9d94dc6038d70b0e9644bc621
This commit is contained in:
David Ostrovsky
2014-04-26 15:27:57 +02:00
parent 40a179b8ca
commit e73ae61339
224 changed files with 557 additions and 633 deletions

View File

@@ -441,8 +441,7 @@ public class ChangeJson {
private Map<String, LabelInfo> initLabels(ChangeData cd,
LabelTypes labelTypes, boolean standard) throws OrmException {
// Don't use Maps.newTreeMap(Comparator) due to OpenJDK bug 100167.
Map<String, LabelInfo> labels =
new TreeMap<String, LabelInfo>(labelTypes.nameComparator());
Map<String, LabelInfo> labels = new TreeMap<>(labelTypes.nameComparator());
for (SubmitRecord rec : submitRecords(cd)) {
if (rec.labels == null) {
continue;
@@ -572,8 +571,7 @@ public class ChangeJson {
// would have done. These should really come from a stored submit record.
//
// Don't use Maps.newTreeMap(Comparator) due to OpenJDK bug 100167.
Map<String, LabelInfo> labels =
new TreeMap<String, LabelInfo>(labelTypes.nameComparator());
Map<String, LabelInfo> labels = new TreeMap<>(labelTypes.nameComparator());
for (String name : labelNames) {
LabelType type = labelTypes.byLabel(name);
LabelInfo li = new LabelInfo();