Incorrect inspection suggestion (final volatile field)

There is something wrong with the Java inspector. It is suggesting me to declare a field as final, however the field is volatile, thus it cannot be declared as final. Would be nice if you guys could validate that before suggesting a change.

Screen shot 2011-09-25 at 6.12.01 PM.png

0
1 comment

Hello cristian,

If the inspection highlights a field as "can be final", it means that the
field is initialized only once, and there's no point in marking it volatile.

There is something wrong with the Java inspector. It is suggesting me
to declare a field as final, however the field is volatile, thus it
cannot be declared as final. Would be nice if you guys could validate
that before suggesting a change.

Image:Screen shot 2011-09-25 at 6.12.01 PM.png

---
Original message URL:
http://devnet.jetbrains.net/message/5320372#5320372


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.