mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-31 21:28:11 +07:00
This is the first part of IDEA-379317 ticket.
Second part - Suggestion to convert sb.append("*".repeat(10)); to sb.repeat("*", 10); - will be provided in separate merge request.
Merge-request: IJ-MR-179573
Merged-by: Marcin Mikosik <marcin.mikosik@jetbrains.com>
GitOrigin-RevId: c52077e6659b3d0108dc6145456fe98da681cfb4
13 lines
294 B
Java
13 lines
294 B
Java
// "Replace with 'StringBuilder.repeat()'" "true"
|
|
import java.util.Objects;
|
|
|
|
class Test {
|
|
String hundredTimes(String s) {
|
|
Objects.requireNonNull(s);
|
|
StringBuilder sb = new StringBuilder();
|
|
f<caret>or(int i=0; i<100; i++) {
|
|
sb.append(s);
|
|
}
|
|
return sb.toString();
|
|
}
|
|
} |