ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martijn Kruithof>
Subject FileUtilsTest jdk 1.3 vs 1.5
Date Sun, 12 Nov 2006 10:14:23 GMT

On jdk 1.3 the test


will fail because with jdk 1.3 no drive letter is inserted for a path 
that does not contain a drive letter.
with jdk 1.5 the drive letter is inserted for a path that is "drive 

the fromURI method has javadoc claiming the following:
     * Constructs a file path from a <code>file:</code> URI.
     * <p>Will be an absolute path if the given URI is absolute.</p>
     * <p>Swallows '%' that are not followed by two characters,
     * doesn't deal with non-ASCII characters.</p>
     * @param uri the URI designating a file in the local filesystem.
     * @return the local file system path for the file.
     * @since Ant 1.6

One could argue that a path without a drive letter is not absolute but 
relative and therefore the drive letter should not be inserted at all. 
(And the test should fail for jdk 1.5 and not jdk 1.3.)  Definitely the 
behaviour should be the same. What is your opinion on the required 


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

View raw message