"The value changed at ++index is never used"
Ok, Ive run this past several colleagues here, and we all think that this is a bad call :
Code such as :
foo.bar( ++index );
being flagged as a warning with the following message: "The changed at ++index is never used"
we think is incorrect.
The value changed at ++index is used.
Im also aware that this was discussed a couple of weeks back, but nothing seemed to come of that.
So, can we at least get a config option to disable this warning, or, better (as far as we see), get this fixed so that such usage of the pre-increment operator is not flagged as a warning.
Nick
请先登录再写评论。
File a bug report about it. I tried it already and couldn't convince them to change it, but maybe you've more luck.
I absolutely agree with you that this shouldn't be flagged as a warning.
http://www.intellij.net/tracker/idea/viewSCR?publicId=27164
Agree as well.
See the historical debate here
http://www.intellij.net/forums/thread.jsp?forum=22&thread=59217
I see that everybody who has chimed in this time round already commented
last time, so I won't add anything!
Robbie
PS I give the last word to
http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#39547
rather than bytecode analysis ...