StreamApiMigration: register comments from post-loop operations like sorting

This commit is contained in:
Tagir Valeev
2018-06-27 09:29:38 +07:00
parent 09da3fa9a4
commit bd4a3477f5
7 changed files with 22 additions and 14 deletions
@@ -10,6 +10,7 @@ public class Collect {
}
void collectNames(List<Person> persons){
List<String> names = persons.stream().map(Person::getName).sorted(Comparator.comparing(Person::getName)).collect(Collectors.toList());
List<String> names = persons.stream().map(Person::getName).sorted(Comparator.comparing(/*c2*/Person::getName)).collect(Collectors.toList());
// comment
}
}
@@ -13,6 +13,7 @@ public class Collect {
for (Person person : pers<caret>ons) {
names.add(person.getName());
}
Collections.sort(names, Comparator.comparing(Person::getName));
Collections.// comment
sort(names, Comparator.comparing(/*c2*/Person::getName));
}
}