Fixed redundant flatMap step warnings

GitOrigin-RevId: 5468f6bd824280340d6680ef9291cea7e5e71c64
This commit is contained in:
Tagir Valeev
2019-11-29 03:12:46 +00:00
committed by intellij-monorepo-bot
parent fecfdd52f4
commit f510432d7f
2 changed files with 2 additions and 4 deletions
@@ -175,8 +175,7 @@ public class YAMLKeysSearchEverywhereContributor implements SearchEverywhereCont
.stream()
.sorted()
.map(idx -> priority.get(idx))
.map(found -> found.stream().sorted())
.flatMap(s -> s)
.flatMap(found -> found.stream().sorted())
.collect(Collectors.toList());
}
@@ -80,8 +80,7 @@ public abstract class PatchTestCase extends UpdaterTestCase {
assertThat(list).isEqualTo(groups.stream().flatMap(Collection::stream).collect(toList()));
// sorts group elements and concatenates groups into a list
return groups.stream()
.map(elements -> elements.stream().sorted(sorter))
.flatMap(stream -> stream)
.flatMap(elements -> elements.stream().sorted(sorter))
.collect(toList());
}
}