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.
Please sign in to leave a 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.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"