commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton" <niall.pember...@blueyonder.co.uk>
Subject [io] FileSystemUtils - Unix Test failing on Gump
Date Mon, 29 Aug 2005 04:00:10 GMT
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.

Niall




---------------------------------------------------------------------
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