Community
Participate
Working Groups
I *know* better, but I got bit by this. I wrote the following line in some JUnit test code: assert 5=iteration++; My tests ran cleanly until I happended to run without enabling asserts. Since it's almost always an error to have side-effects, I propose detecting simple cases (i.e. statement expressions other than procedure calls) and warn in those cases. Obviously, also need a UI change to disable it.
More specificity: Since it's almost always an error to have side-effects *in an assert statement*, I propose detecting simple cases (i.e. statement expressions other than procedure calls) and warn in those cases. Obviously, also need a UI change to disable it.
Sounds like a good idea, time permitting.
*** This bug has been marked as a duplicate of 22581 ***
Ignore previous comment. This isn't a duplicate.
Defer
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you.