This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: java.io.File
- To: Jeff Sturm <jsturm at one-point dot com>
- Subject: Re: java.io.File
- From: Bryce McKinlay <bryce at albatross dot co dot nz>
- Date: Tue, 03 Apr 2001 09:25:19 +1200
- CC: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>, java-patches at gcc dot gnu dot org
- References: <Pine.LNX.4.10.10104021736580.29468-100000@mars.deadcafe.org>
Jeff Sturm wrote:
> 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.
Yeah. I wonder if the specs have anything to say about that. I remember there
being some special case with regard to null constants, but I don't remember if
this was it.
> > I'll reverse that part of the patch. Its a shame, because I think its much
> > cleaner to localize that stuff in the File implementation. Oh well.
>
> I agree. Why not keep init_native() to install those properties? Set
> them only if they are not yet set?
System.setProperties(null) needs to be able to restore the properties to the
"default values" at any time. If that was to work then it would have to be able
to specify its property as being a default, by setting it in a different way to
the usual System.setProperty().
regards
[ bryce ]