IDEA-187224 Add inspection for substring with String#length as second param

This commit is contained in:
Tagir Valeev
2018-02-27 13:05:45 +07:00
parent 5a8ad55613
commit 5feb5cb75a
2 changed files with 41 additions and 25 deletions

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(1);
String s2 = s.substring(2, s1.length());
}
}