[java-inspection] Support multi-line single-return lambdas in StreamToLoopInspection

Part of IDEABKL-7718
Fixes IDEA-317735

GitOrigin-RevId: 120245c2b1f4abb464d52c43dd39078a83f4bbcd
This commit is contained in:
Tagir Valeev
2023-04-14 14:47:54 +02:00
committed by intellij-monorepo-bot
parent 6076d18d3f
commit 78c8e66901
10 changed files with 241 additions and 119 deletions

View File

@@ -11,12 +11,12 @@ import static java.util.Arrays.asList;
public class Main {
private static long testChain(List<? extends String> list) {
long count = 0L;
for (Object o : Arrays.asList(0, null, "1", list)) {
for (Object object : Arrays.asList(o)) {
for (Object o1 : Arrays.asList(object)) {
for (Object object1 : Arrays.asList(o1)) {
for (Object o2 : Arrays.asList(object1)) {
for (Object object2 : Arrays.asList(o2)) {
for (Object o : asList(0, null, "1", list)) {
for (Object object : asList(o)) {
for (Object o1 : asList(object)) {
for (Object object1 : asList(o1)) {
for (Object o2 : asList(object1)) {
for (Object object2 : asList(o2)) {
count++;
}
}