Bug 572851 - [AutoRefactor #75/153] Redundant truth
Directly checks boolean values instead of comparing them with
true/false:
- The operator can be equals, not equals or XOR,
- The constants can be a literal or a java.lang.Boolean constant,
- One operand should be primitive so no new null pointer exceptions may
occur.
Given:
if (isValid == true) {
int i = 0;
}
When:
Applying "Boolean value rather than comparison" clean up...
Then:
if (isValid) {
int i = 0;
}
Change-Id: Ie59f0a572f86f12a0f75b9d94d95119c402a627a
Signed-off-by: Fabrice Tiercelin <fabrice.tiercelin@yahoo.fr>
Depends-On: If40bd448d4654c66c10587a5c75d1358f385e59d
4 files changed