IDEA-225861 Detect a case related to String transformation where result can be predicted before transformation

GitOrigin-RevId: 3448b86219bebc4914cccae89e7e46db67d81128
This commit is contained in:
Tagir Valeev
2019-11-07 02:40:58 +00:00
committed by intellij-monorepo-bot
parent 7d310b15ed
commit 50b74c2848
3 changed files with 30 additions and 3 deletions
@@ -0,0 +1,8 @@
// "Remove redundant 'toLowerCase()' call" "true"
class X {
void test(String string) {
if (string.isEmpty()) {
System.out.println("Empty");
}
}
}
@@ -0,0 +1,8 @@
// "Remove redundant 'toLowerCase()' call" "true"
class X {
void test(String string) {
if (string.to<caret>LowerCase().isEmpty()) {
System.out.println("Empty");
}
}
}