ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <>
Subject RE: File.toURL() and
Date Tue, 21 Aug 2012 19:41:34 GMT

Good Evening Nicolas

If you can demonstrate the Ant task fails before and then a successful implementation (running
the same Testcase) after applying the patch then +1 for implementing the patch

Nota Bene:Make sure you catch 
IllegalArgumentException - If this URL is not absolute
MalformedURLException - If a protocol handler for the URL could not be found,
          or if some other error occurred while constructing the URLMerci
Note de déni et de confidentialité
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire
prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe
quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information
seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les
email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune
responsabilité pour le contenu fourni.

> From:
> Subject: File.toURL() and
> Date: Tue, 21 Aug 2012 21:13:12 +0200
> To:
> When trying to setup the build matrix for Ivy, I got hit by the spaces in the paths for
the tests. It was due to the well known broken File.toURL().
> I have done a broadcast search on Ivy and fix it (it was mainly the unit tests which
were broken).
> So decided to look into IvyDE too and I have found some quirks too.
> And I looked into Ant, it is totally clean except Locator.fileToURL(File)
> But then looking at the javadocs, it made me afraid to change anything, especially the
javadoc of the class:
> "Be very careful when making changes to this class, as a break will upset a lot of people."
> :)
> Since we support Java 1.4, and even now 1.5, I see no reason to not replace the implementation
of Locator.fileToURL by a simple file.toURI().toURL(). Am I wrong ? Or is there some code
which rely on the broken behavior ?
> Nicolas
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message