You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Gary Gregory <gg...@seagullsw.com> on 2003/12/30 00:13:16 UTC

[lang] SystemUtils.JAVA_IO_TMPDIR

Hello,

When I use SystemUtils.JAVA_IO_TMPDIR, I really need

File file = new File(SystemUtils.JAVA_IO_TMPDIR)

Any thoughts/allergic reactions to providing a
SystemUtils.JAVA_IO_TMPDIR_FILE?

Gary

Re: [lang] SystemUtils.JAVA_IO_TMPDIR

Posted by __matthewHawthorne <ma...@phreaker.net>.
Stephen Colebourne wrote:
> It would definitely need to be protected in construction to avoid exceptions
> and set the value to null if it fails.

I think that static methods may be a cleaner approach, instead of a 
static block which much catch IOExceptions when constructing the static 
File objects.

This would elminate the convenience of having static fields, but the 
possibility of receiving NullPointerExceptions instead of IOExceptions 
after an error doesn't seem favorable to me.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [lang] SystemUtils.JAVA_IO_TMPDIR

Posted by Stephen Colebourne <sc...@btopenworld.com>.
It would definitely need to be protected in construction to avoid exceptions
and set the value to null if it fails.

Are there other values in systemutils that this could apply to?

Stephen

From: "__matthewHawthorne" <ma...@phreaker.net>
> Gary Gregory wrote:
> > Hello,
> >
> > When I use SystemUtils.JAVA_IO_TMPDIR, I really need
> >
> > File file = new File(SystemUtils.JAVA_IO_TMPDIR)
> >
> > Any thoughts/allergic reactions to providing a
> > SystemUtils.JAVA_IO_TMPDIR_FILE?
> >
> > Gary
>
>
> Would proving a static File instance create any strangeness with regard
> to system resources?  I'm not sure.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [lang] SystemUtils.JAVA_IO_TMPDIR

Posted by __matthewHawthorne <ma...@phreaker.net>.
Gary Gregory wrote:
> Hello,
> 
> When I use SystemUtils.JAVA_IO_TMPDIR, I really need
> 
> File file = new File(SystemUtils.JAVA_IO_TMPDIR)
> 
> Any thoughts/allergic reactions to providing a
> SystemUtils.JAVA_IO_TMPDIR_FILE?
> 
> Gary


Would proving a static File instance create any strangeness with regard 
to system resources?  I'm not sure.



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org