commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: svn commit: r750313 - /commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/
Date Fri, 06 Mar 2009 05:00:53 GMT
On 2009-03-06, sebb <> wrote:

> On 05/03/2009, <> wrote:

>>  URL:
>>  Log:
>>  make tests pass on Linux

> However, they now fail on Windows (and compilation fails on Java
> 1.4/1.5, but I fixed that).

Sorry about the Java6ism.

> Adding back the .getClassLoader() stage improves matters,

That really isn't supposed to make any difference, strange.

> but then the ChangeSetTestCase tests fail with

> Illegal character in path

> which is caused by the space character.

The File -> URI and URI -> File conversions have always been
problematic.  I had hoped new File(URI) would work - didn't test on
Windows, obviously).

The IOException probably is wrapping an URISyntaxException, which
means URL.toString() has returned an illegal URI on your JDK, great.

> I'm not sure that getResource() is the correct method to use here.

Well, it works great for files that don't contain spaces in their name

A hack could be to check whether the file name contains spaces and
locate the parent directory instead of the file itself - or use
getResourceAsStream in all tests that want to use files with spaces in
their names - neither approach looks nice, but I'm not sure how to
locate the files from the resources without hardcoding paths.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message