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-10-31 16:03:57 +07:00
committed by intellij-monorepo-bot
parent 7d310b15ed
commit 50b74c2848
3 changed files with 30 additions and 3 deletions

View File

@@ -0,0 +1,8 @@
// "Remove redundant 'toLowerCase()' call" "true"
class X {
void test(String string) {
if (string.isEmpty()) {
System.out.println("Empty");
}
}
}

View File

@@ -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");
}
}
}