ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Lalevée <nicolas.lale...@hibnet.org>
Subject Re: File.toURL() and org.apache.tools.ant.launch.Locator.fileToURL(File)
Date Wed, 22 Aug 2012 18:30:11 GMT
Le 22 août 2012 à 20:07, Jesse Glick a écrit :

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

interesting indeed, I could not think we can put 4 slashes :)
http://hg.netbeans.org/main/file/36bb0f394df1/openide.util/test/unit/src/org/openide/util/UtilitiesTest.java#l384

Nicolas


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


Mime
View raw message