Inspection question - final not suggested for private fields?

Hi all,

I've started putting final everywhere since I started reading about concurrency. One thing I've noticed is that the "local variable or parameter can be final" inspection doesn't catch private fields that can be final - is there a reason for this? I can understand more widely-accessible fields being more difficult to check for, but it would be great to at least have this for private fields. Am I missing some reason this is difficult or not useful?

Thanks,
Colin

2 comments

I've requested this feature recently but it was turned down because 'there is already inspection for that'.
http://www.jetbrains.net/jira/browse/IDEADEV-16352
the point is that I use these quick intentions mostly, because running inspections requires more time and effort.... and it may happen that nothing will be reported anyway (regarding this particular inspection).
Certainly I would prefer to spend CPU time instead of my time - it should run in background!

0

I agree - any chance of getting this reopened for private fields?

0

Please sign in to leave a comment.