This is the mail archive of the
java-patches@sources.redhat.com
mailing list for the Java project.
Re: Patch: error->warning when assigning to final field
Mark Wielaard <mark@klomp.org> writes:
> Ah, I see. Sorry about my confusion. You are right when talking about
> compiling from bytecode. Although I think it is strange that the JLS
> explicitly forbits it but the JVM allows it. Do you know why the JVM
> allows for this non-intuitive behaviour?
No. Quite possible an oversight in the original verifier, and they
decided not to change it. Also, this allows an implementation to put
initialization code is put in a helper method, as I believe Gcj
sometimes does.
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/