[java] Report even more unnecessary substring() calls (IDEA-345335)

GitOrigin-RevId: 37b86167b5d2b1cac74365eaadbf3a5ddf792f69
This commit is contained in:
Bas Leijdekkers
2024-03-14 20:15:43 +01:00
committed by intellij-monorepo-bot
parent 43bfdf8cf8
commit e3ccfd0e4a
4 changed files with 55 additions and 14 deletions

View File

@@ -0,0 +1,7 @@
// "Remove redundant 'substring()' call" "true-preview"
class Foo {
public void x(String arg) {
StringBuilder sb = new StringBuilder();
sb.append(arg, 2, arg.length());
}
}

View File

@@ -0,0 +1,7 @@
// "Remove redundant 'substring()' call" "true-preview"
class Foo {
public void x(String arg) {
StringBuilder sb = new StringBuilder();
sb.append(arg.subs<caret>tring(2));
}
}