IDEA-211549 Inline method: support negation at the call site

GitOrigin-RevId: d9afdc05a45b153ce23bf5f6e091606f43b050f6
This commit is contained in:
Tagir Valeev
2019-04-28 15:00:48 +03:00
committed by intellij-monorepo-bot
parent 2961bb5130
commit 364d5bc833
4 changed files with 46 additions and 2 deletions
@@ -0,0 +1,13 @@
class Test {
boolean check(String s) {
if (s == null) return false;
s = s.trim();
if (s.isEmpty()) return false;
return s.length() % 2 == 0;
}
boolean use(String s) {
return !<caret>check(s + s);
}
}
@@ -0,0 +1,11 @@
class Test {
boolean use(String s) {
String s1 = s + s;
if (s1 == null) return true;
s1 = s1.trim();
if (s1.isEmpty()) return true;
return s1.length() % 2 != 0;
}
}