double negation and code inspection
IntelliJ IDEA 5.1.2
During some refactorization I changed my code
if (! complicated logical expression) {
into
if (!!functionCall()) {
I noticed my mistake only after running the the program. Of course it
took some time to find it.
It would be nice if code inspection could catch double negation.
I haven't tried ver. 6, so maybe this inspection is already in place.
Tom
请先登录再写评论。
I can't believe I missed that one.
--Dave Griffith
I had a free half hour in the train today, so look for the "double negation" inspection in the next EAP build.
Bas