This is the mail archive of the java@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]
Other format: [Raw text]

Re: java.io.File and properties


> The above from Sun looks stupid.  At what point is it useful to allow
> programmer's to modify tmpdir at runtime but not let that change the
> way createTempFile works?  I guess we can be bug compatible here, but
> we may need a gnu.java.io.File.getTempDir() that works better.

BTW, I should note that the output is unchanged if I use
System.setProperty( ) instead of put( ).

Similarly, 'new File( ".").listFiles( )' is unaffected by
any value I set for "user.dir".

So a System.setProperty( ) either should not be allowed
for such properties, or should be considered as a directive
and reflected "as appropriate" throughout the running JVM 
instance.

System.getProperties( ) should just return a *clone* of the
"actual" Properties object (and documented as such) - or 
either a "read-only" wrapper around the "actual" Properties 
or one with an appropriately overridden put( ).

For the time being however, we will just have to ape 
Sun's behaviour. :-(

Ranjit.

PS: Michael, your mailer sends a separate message each to the
"From:" and "Reply-To:" addresses (instead of just the latter)
and as a result I get *three* messages when you reply,
exacerbated further when someone does a subsequent "Reply-All".


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