Java finality

Tom Tromey tromey@redhat.com
Fri Feb 11 17:46:00 GMT 2005


>>>>> "Chris" == Chris Burdess <dog@bluezoo.org> writes:

Chris> The results for gcj (recent CVS HEAD) on the same corpus show that
Chris> even the one change not permitted (albeit silently) by Sun's
Chris> implementation is effected without IllegalAccessException. The output
Chris> of FinalFieldChange is:
Chris> Ng Keng Yap, 27 of IQ=150 from Malaysia
Chris> What are other people's thoughts on this matter?
Would you mind filing this in the gcc bugzilla? Just a single bug,
say with a pointer to this thread, would be great.
"final" was always weird, really. I've seen some texts out there say
that blank finals could only be set in <init> or <clinit>... but this
contradicts what many compilers actually do. And afaik no runtime
ever checked that a blank final was only assigned once.
Also, System.{in,out,err} are final but you've always been able to
change them. So there's at least one weird case to handle.
Tom


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /