mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-17 21:43:33 +07:00
IDEA-230363 Freeze in StreamApiMigrationInspection when StringBuilder-append-loop is followed by append to another StringBuilder
GitOrigin-RevId: c7bc72635a3322ecdd9eea6b47b997154a0ad014
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2da39d524b
commit
cca1cec121
+11
@@ -0,0 +1,11 @@
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
// "Replace with forEach" "true"
|
||||
class X {
|
||||
private void initBuilder() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
StringBuilder spaces = new StringBuilder();
|
||||
IntStream.range(0, 20).mapToObj(i -> " ").forEach(spaces::append);
|
||||
builder.append(spaces);
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Replace with forEach" "true"
|
||||
class X {
|
||||
private void initBuilder() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
StringBuilder spaces = new StringBuilder();
|
||||
f<caret>or(int i = 0; i < 20; i++) {
|
||||
spaces.append(" ");
|
||||
}
|
||||
builder.append(spaces);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user