I am using Code Pro to review my application code and the tool reported back with the message:
Warning: equality test with boolean literal
For this code:
boolean valid;
if(valid == true)
which can be fixed by using:
if(valid)
I have 2 questions on my mind:
- Is it just a good coding practice ?
- Is there any other benefit in terms of memory optimization or performance optimization ?