ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin" <xavier.ha...@gmail.com>
Subject Re: svn commit: r683187 - /ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyTaskTest.java
Date Wed, 06 Aug 2008 11:04:45 GMT
On Wed, Aug 6, 2008 at 11:38 AM, Gilles Scokart <gscokart@gmail.com> 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  <gscokart@apache.org>:
> > 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: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>
>


-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message