mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 13:35:16 +07:00
IDEA-205846 Suggestion to use String.repeat where appropriate when using JDK 11
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
// "Replace with 'String.repeat()'" "true"
|
||||
class Test {
|
||||
String spaces(int a, int b, int c, int d) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(" ".repeat(Math.max(0, c - d - (a - b))));
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user