This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: java.io.File


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 ]



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]