On 2009-03-06, sebb <seb...@gmail.com> wrote:

> On 05/03/2009, bode...@apache.org <bode...@apache.org> wrote:

>>  URL: http://svn.apache.org/viewvc?rev=750313&view=rev
>>  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

>      java.io.IOException: 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
8-)

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.

Stefan

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

Reply via email to