commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Colebourne <scolebou...@btopenworld.com>
Subject Re: [io] FileSystemUtils - Unix Test failing on Gump
Date Mon, 29 Aug 2005 10:33:49 GMT
Niall Pemberton wrote:
> Gump is failing for IO at the moment:
> 
> http://vmgump.apache.org/gump/public/jakarta-commons/commons-io/gump_work/build_jakarta-commons_commons-io.html
> 
>>>From a scan of the source, looks like the following is happening when
> FileSystemUtilsTestCase.testGetFreeSpace_String() is run on Unix with a path
> of "~":
> 
> 1. FileSystemUtils.getFreeSpaceUnix("~") calls FilenameUtils.normalize("~")
> 2.  FilenameUtils.normalize("~") calls FilenameUtils.getPrefixLength("~")
> 3.  FilenameUtils.getPrefixLength("~") returns -1
> 4.  FilenameUtils.normalize("~") returns null (because prefix is less than
> zero)
> 5.  FilenameUtils.openProcessStream() gets called with a null path in the
> cmdAttribs
> 6. Runtime.getRuntime().exec() throws a NullPointerException
> 
> I guess the Unix test needs to be changed to use something else - also
> FileSystemUtils should cater for FilenameUtils.normalize() returning null. I
> don't have Unix, so I can't actually verify the above or test a change that
> works.

I'll add a test case for ~, as it should work with this path.

(I use Windows, so this is all a little tricky...)

Stephen

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


Mime
View raw message