ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Glick <jgl...@cloudbees.com>
Subject Re: File.toURL() and org.apache.tools.ant.launch.Locator.fileToURL(File)
Date Wed, 22 Aug 2012 18:07:15 GMT
On 08/22/2012 08:50 AM, Nicolas Lalevée wrote:
> Don't understand the encoding issue there, since we are manipulating Strings.

But String's which represent pathnames on an OS which might natively represent pathnames as
octet sequences in some encoding. Again I am not sure what the defining 
example of this problem would be - my former attempts to make Windows deal sanely with non-ASCII
filenames from Java failed miserably no matter what I tried, whereas 
everything "just works" on Linux. Not sure about Macs.

> As far I understand, such path reference some file on a remote computer. But then why
the host part of the URI being build is left to null?

Line #3059 (JDK 7) would not be executed for a UNC path because you would have file://server/share/path.
Line #3072 (JDK 6) does pass null for host but the "path" starts 
with "//" so the constructor produces the proper URI in the end. You can check the unit tests
if you are interested.

> It seems we cannot become "watchers" of jvm bugs, can we?

Not sure. You used to be able to, but I have not managed to do this on bugs.sun.com for years.
There has been talk of setting up a public JIRA/Bugzilla/etc. instance for 
the JDK it keeps on getting delayed, and anyway it is unclear if existing bugs would get migrated
automatically.


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


Mime
View raw message