Java finality

Jeroen Frijters jeroen@sumatra.nl
Mon Feb 7 23:25:00 GMT 2005


Chris Burdess wrote:
> This article
> 
>    http://www.javaspecialists.co.za/archive/Issue096.html
> 
> explains how final fields can be modified, and that this behaviour is 
> sanctioned by JSR 133. However, I find it rather disturbing. 
[...]
> What are other people's thoughts on this matter?

For constants it doesn't make much sense, but for blank final fields it
makes perfect sense to me. Currently the serialization code is forced to
use a special case of reflection to set final instance fields, but this
change allows serialization to use the standard reflection mechanism.
That's goodness in my book.

Regards,
Jeroen



More information about the Java mailing list