[java-inspection] IDEA-265275 Report s.substring(s.length())

GitOrigin-RevId: 6d4ad2a3ac2586707e61a166ee62c3b5bee59b76
This commit is contained in:
Andrey.Cherkasov
2021-04-22 16:38:27 +03:00
committed by intellij-monorepo-bot
parent 80a3c952ce
commit da3be3afc7
3 changed files with 48 additions and 1 deletions

View File

@@ -0,0 +1,7 @@
// "Fix all 'Redundant String operation' problems in file" "true"
class Foo {
void test(String s) {
String s1 = "";
String s2 = s.substring(s1.length());
}
}

View File

@@ -0,0 +1,7 @@
// "Fix all 'Redundant String operation' problems in file" "true"
class Foo {
void test(String s) {
String s1 = s.substring(s.leng<caret>th());
String s2 = s.substring(s1.length());
}
}