don't insert unneeded parentheses on "invert if"

This commit is contained in:
Bas Leijdekkers
2015-01-27 08:53:27 +01:00
parent 28774e5fe0
commit 7f73e1895d
3 changed files with 22 additions and 1 deletions
@@ -0,0 +1,11 @@
// "Invert 'if' condition" "true"
class Inversion {
public void context(boolean a, boolean b, boolean c) {
if ((!a || !b || !c)) {
System.out.println(1);
}
else {
System.out.println(0);
}
}
}
@@ -0,0 +1,10 @@
// "Invert 'if' condition" "true"
class Inversion {
public void context(boolean a, boolean b, boolean c) {
if ((a &<caret>& b && c)) {
System.out.println(0);
} else {
System.out.println(1);
}
}
}