mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 02:38:59 +07:00
[java-inspections] IDEA-284183 "Replace 'forEach' call with loop" generates red code in case of wildcards with Map
GitOrigin-RevId: 77f0fc7d530aed988653aa726be1244c9a3941f9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
27184c1411
commit
f2e0304c8d
@@ -42,4 +42,13 @@ public class Main {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void convert(Map<Integer, ? extends List<? extends Appendable>> map) {
|
||||
for (Map.Entry<Integer, ? extends List<? extends Appendable>> entry : map.entrySet()) {
|
||||
Integer integer = entry.getKey();
|
||||
List<? extends Appendable> appendables = entry.getValue();
|
||||
System.out.println(integer);
|
||||
System.out.println(appendables);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,4 +28,11 @@ public class Main {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void convert(Map<Integer, ? extends List<? extends Appendable>> map) {
|
||||
map.forEach((integer, appendables) -> {
|
||||
System.out.println(integer);
|
||||
System.out.println(appendables);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user