java.io.File

Per Bothner per@bothner.com
Mon Apr 2 14:18:00 GMT 2001


Jeff Sturm <jsturm@one-point.com> writes:

> On Mon, 2 Apr 2001, Bryce McKinlay wrote:
> > Good point. That part of the patch is actually questionable for another
> > reason, which is that init_native is resetting a final variable. That could
> > cause problems if the compiler ever decided to treat File.fileSeparator as a
> > null constant.
> 
> I'm not sure that would be a good optimization.  It'd cause problems with
> System.out, for one thing.

The compiler is only allowed to inline final static fields that are
initialized to compile-time constants.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/



More information about the Java-patches mailing list