This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: Java finality
- From: "Jeroen Frijters" <jeroen at sumatra dot nl>
- To: "Chris Burdess" <dog at bluezoo dot org>,<java at gcc dot gnu dot org>
- Date: Mon, 7 Feb 2005 13:24:19 +0100
- Subject: RE: Java finality
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