Xavier, I think this is an excellent idea :-)
Maarten ----- Original Message ---- From: Xavier Hanin <[EMAIL PROTECTED]> To: Ant Developers List <dev@ant.apache.org> Sent: Wednesday, August 6, 2008 1:04:45 PM Subject: Re: svn commit: r683187 - /ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyTaskTest.java On Wed, Aug 6, 2008 at 11:38 AM, Gilles Scokart <[EMAIL PROTECTED]> wrote: > Could someone retest that in an other environment (I only have access > to an IBM JVM). I'm not on my dev box now, so I can't confirm it works, but I see no reason why it would fail. That being said, I think it would be cleaner to extract this "trick" in a helper method. Maybe sg on FileUtil: FileUtil#toURL(File file) { return file.toURI().toURL(); } This would help documenting why we use this trick, and fix everything at once if we later need another way to get an URL from a File. Xavier > > Other fix will follow. > > Gilles > > > 2008/8/6 <[EMAIL PROTECTED]>: > > Author: gscokart > > Date: Wed Aug 6 02:10:07 2008 > > New Revision: 683187 > > > > URL: http://svn.apache.org/viewvc?rev=683187&view=rev > > Log: > > fix unit test on IBM JVM (probably broken by IVY-868) > > > > Modified: > > ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyTaskTest.java > > > > Modified: > ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyTaskTest.java > > URL: > http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyTaskTest.java?rev=683187&r1=683186&r2=683187&view=diff > > > ============================================================================== > > --- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyTaskTest.java > (original) > > +++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyTaskTest.java Wed > Aug 6 02:10:07 2008 > > @@ -50,7 +50,7 @@ > > assertEquals(new > File("test/repositories/ivysettings.xml").getAbsolutePath().toUpperCase(), > > new File((String) > settings.getVariables().getVariable("ivy.settings.file")).getAbsolutePath() > > .toUpperCase()); > > - assertEquals(new > File("test/repositories/ivysettings.xml").toURL().toExternalForm() > > + assertEquals(new > File("test/repositories/ivysettings.xml").toURI().toURL().toExternalForm() > > .toUpperCase(), ((String) > settings.getVariables().getVariable("ivy.settings.url")) > > .toUpperCase()); > > assertEquals(new > File("test/repositories").getAbsolutePath().toUpperCase(), > > @@ -82,7 +82,7 @@ > > assertEquals(new File("build/cache"), > settings.getDefaultCache()); > > assertEquals(new > File("test/repositories/ivysettings.xml").getAbsolutePath(), settings > > .getVariables().getVariable("ivy.settings.file")); > > - assertEquals(new > File("test/repositories/ivysettings.xml").toURL().toExternalForm(), > > + assertEquals(new > File("test/repositories/ivysettings.xml").toURI().toURL().toExternalForm(), > > settings.getVariables().getVariable("ivy.settings.url")); > > assertEquals(new File("test/repositories").getAbsolutePath(), > settings.getVariables().getVariable( > > "ivy.settings.dir")); > > > > > > > > > > -- > Gilles Scokart > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Xavier Hanin - Independent Java Consultant http://xhab.blogspot.com/ http://ant.apache.org/ivy/ http://www.xoocode.org/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]