IDEA-CR-13504 Lambda to method-reference: PsiVariable is accepted as it's necessary for StreamApiMigrationInspection;

StreamApiMigrationInspection.TerminalBlock simplified (myFrom/myTo did not actually improve performance, but added unnecessary logic)
This commit is contained in:
Tagir Valeev
2016-09-05 08:57:55 +07:00
parent 08fc28f682
commit 13d9f8d53a
3 changed files with 32 additions and 48 deletions
@@ -7,6 +7,6 @@ import java.util.stream.Collectors;
public class Main {
public void test(Map<String, String[]> map) {
List<String> result = map.entrySet().stream().filter(entry -> entry.getKey().startsWith("x")).map(Map.Entry::getValue).flatMap(arr -> Arrays.stream(arr)).map(String::trim).collect(Collectors.toList());
List<String> result = map.entrySet().stream().filter(entry -> entry.getKey().startsWith("x")).map(Map.Entry::getValue).flatMap(Arrays::stream).map(String::trim).collect(Collectors.toList());
}
}