Patch: error->warning when assigning to final field

Per Bothner per@bothner.com
Sun Jan 14 13:59:00 GMT 2001


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/


More information about the Java-patches mailing list