Author: hibou
Date: Tue Aug 21 18:55:01 2012
New Revision: 1375715

URL: http://svn.apache.org/viewvc?rev=1375715&view=rev
Log:
Fix the buggy use to File.toURL()

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/Ivy.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/repo/FSManifestIterable.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/IvyTest.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/TestFixture.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyConfigureTest.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyDeliverTest.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInstallTest.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyPublishTest.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/core/TestPerformance.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/core/deliver/DeliverTest.java
    
ant/ivy/core/trunk/test/java/org/apache/ivy/core/publish/PublishEventsTest.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/core/retrieve/RetrieveTest.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/core/search/SearchTest.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/core/settings/ConfigureTest.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/osgi/p2/P2DescriptorTest.java
    
ant/ivy/core/trunk/test/java/org/apache/ivy/osgi/updatesite/UpdateSiteAndIbiblioResolverTest.java
    
ant/ivy/core/trunk/test/java/org/apache/ivy/osgi/updatesite/UpdateSiteResolverTest.java
    
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
    
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleUpdaterTest.java
    
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/report/XmlReportParserTest.java
    
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/report/XmlReportWriterTest.java
    
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/Maven2LocalTest.java
    
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/resolver/PackagerResolverTest.java
    
ant/ivy/core/trunk/test/java/org/apache/ivy/util/url/BasicURLHandlerTest.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/Ivy.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/Ivy.java?rev=1375715&r1=1375714&r2=1375715&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/Ivy.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/Ivy.java Tue Aug 21 18:55:01 2012
@@ -510,6 +510,11 @@ public class Ivy {
         }
     }
 
+    public ResolveReport resolve(File ivySource, ResolveOptions options) 
+            throws ParseException, IOException {
+        return resolve(ivySource.toURI().toURL(), options);
+    }
+
     public ResolveReport resolve(ModuleDescriptor md, ResolveOptions options)
             throws ParseException, IOException {
         pushContext();

Modified: 
ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/repo/FSManifestIterable.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/repo/FSManifestIterable.java?rev=1375715&r1=1375714&r2=1375715&view=diff
==============================================================================
--- 
ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/repo/FSManifestIterable.java 
(original)
+++ 
ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/repo/FSManifestIterable.java 
Tue Aug 21 18:55:01 2012
@@ -90,7 +90,7 @@ public class FSManifestIterable extends 
 
     protected URI buildBundleURI(Object/* File */location) {
         try {
-            return new URI(((File) location).toURL().toExternalForm());
+            return new URI(((File) location).toURI().toURL().toExternalForm());
         } catch (MalformedURLException e) {
             throw new RuntimeException("Unexpected file to url conversion 
error", e);
         } catch (URISyntaxException e) {

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/IvyTest.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/IvyTest.java?rev=1375715&r1=1375714&r2=1375715&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/IvyTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/IvyTest.java Tue Aug 21 
18:55:01 2012
@@ -58,7 +58,7 @@ public class IvyTest extends TestCase {
             IvyContext.getContext().getIvy() == ivy);
         
         ResolveReport report = ivy.resolve(new File(
-            "test/repositories/1/org1/mod1.1/ivys/ivy-1.0.xml").toURL(),
+            "test/repositories/1/org1/mod1.1/ivys/ivy-1.0.xml"),
             getResolveOptions(ivy, new String[] {"*"}));
         assertNotNull(report);
         assertFalse(report.hasError());
@@ -70,8 +70,8 @@ public class IvyTest extends TestCase {
         MockMessageLogger mockLogger2 = new MockMessageLogger();
         Ivy ivy2 = new Ivy();
         ivy2.getLoggerEngine().setDefaultLogger(mockLogger2);
-        ivy2.configure(new 
File("test/repositories/norev/ivysettings.xml").toURL());
-        report = ivy2.resolve(new 
File("test/repositories/norev/ivy.xml").toURL(),
+        ivy2.configure(new 
File("test/repositories/norev/ivysettings.xml").toURI().toURL());
+        report = ivy2.resolve(new File("test/repositories/norev/ivy.xml"),
             getResolveOptions(ivy2, new String[] {"*"}));
         assertNotNull(report);
         assertFalse(report.hasError());
@@ -81,7 +81,7 @@ public class IvyTest extends TestCase {
         
         // finally we reuse the first instance to make another resolution
         report = ivy.resolve(new File(
-            "test/repositories/1/org6/mod6.1/ivys/ivy-0.3.xml").toURL(),
+            "test/repositories/1/org6/mod6.1/ivys/ivy-0.3.xml"),
             getResolveOptions(ivy, new String[] {"extension"}));
         assertNotNull(report);
         assertFalse(report.hasError());

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/TestFixture.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/TestFixture.java?rev=1375715&r1=1375714&r2=1375715&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/TestFixture.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/TestFixture.java Tue Aug 21 
18:55:01 2012
@@ -119,9 +119,7 @@ public class TestFixture {
 
     public ResolveReport resolve(String mrid) 
             throws MalformedURLException, ParseException, IOException {
-        return ivy.resolve(
-            getIvyFile(mrid).toURL(),
-            TestHelper.newResolveOptions(getSettings()));
+        return ivy.resolve(getIvyFile(mrid), 
TestHelper.newResolveOptions(getSettings()));
     }
     
 }

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyConfigureTest.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyConfigureTest.java?rev=1375715&r1=1375714&r2=1375715&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyConfigureTest.java 
(original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyConfigureTest.java Tue 
Aug 21 18:55:01 2012
@@ -137,8 +137,9 @@ public class IvyConfigureTest extends Te
     }
 
     public void testURL() throws Exception {
-        String confUrl = new 
File("test/repositories/ivysettings-url.xml").toURL().toExternalForm();
-        String confDirUrl = new 
File("test/repositories").toURL().toExternalForm();
+        String confUrl = new 
File("test/repositories/ivysettings-url.xml").toURI().toURL()
+                .toExternalForm();
+        String confDirUrl = new 
File("test/repositories").toURI().toURL().toExternalForm();
         if (confDirUrl.endsWith("/")) {
             confDirUrl = confDirUrl.substring(0, confDirUrl.length() - 1);
         }

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyDeliverTest.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyDeliverTest.java?rev=1375715&r1=1375714&r2=1375715&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyDeliverTest.java 
(original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyDeliverTest.java Tue Aug 
21 18:55:01 2012
@@ -173,7 +173,7 @@ public class IvyDeliverTest extends Test
         File deliveredIvyFile = new File("build/test/deliver/ivy-1.2.xml");
         assertTrue(deliveredIvyFile.exists());
         ModuleDescriptor md = 
XmlModuleDescriptorParser.getInstance().parseDescriptor(
-            new IvySettings(), deliveredIvyFile.toURL(), true);
+            new IvySettings(), deliveredIvyFile.toURI().toURL(), true);
         assertEquals(ModuleRevisionId.newInstance("apache", "resolve-latest", 
"1.2"), md
                 .getModuleRevisionId());
         DependencyDescriptor[] dds = md.getDependencies();
@@ -199,7 +199,7 @@ public class IvyDeliverTest extends Test
         File deliveredIvyFile = new File("build/test/deliver/ivy-1.2.xml");
         assertTrue(deliveredIvyFile.exists());
         ModuleDescriptor md = 
XmlModuleDescriptorParser.getInstance().parseDescriptor(
-            new IvySettings(), deliveredIvyFile.toURL(), true);
+            new IvySettings(), deliveredIvyFile.toURI().toURL(), true);
         assertEquals(ModuleRevisionId.newInstance("apache", "resolve-latest", 
"1.2"), md
                 .getModuleRevisionId());
         DependencyDescriptor[] dds = md.getDependencies();
@@ -232,7 +232,7 @@ public class IvyDeliverTest extends Test
         File deliveredIvyFile = new File("build/test/deliver/ivy-1.2.xml");
         assertTrue(deliveredIvyFile.exists());
         ModuleDescriptor md = 
XmlModuleDescriptorParser.getInstance().parseDescriptor(
-            new IvySettings(), deliveredIvyFile.toURL(), true);
+            new IvySettings(), deliveredIvyFile.toURI().toURL(), true);
         assertEquals(ModuleRevisionId.newInstance("apache", "resolve-simple", 
"1.2"), md
                 .getModuleRevisionId());
         DependencyDescriptor[] dds = md.getDependencies();
@@ -269,7 +269,7 @@ public class IvyDeliverTest extends Test
         File deliveredIvyFile = new File("build/test/deliver/ivy-1.2.xml");
         assertTrue(deliveredIvyFile.exists());
         ModuleDescriptor md = 
XmlModuleDescriptorParser.getInstance().parseDescriptor(
-            new IvySettings(), deliveredIvyFile.toURL(), true);
+            new IvySettings(), deliveredIvyFile.toURI().toURL(), true);
         assertEquals(ModuleRevisionId.newInstance("apache", "resolve-simple", 
"1.2"), md
                 .getModuleRevisionId());
         DependencyDescriptor[] dds = md.getDependencies();
@@ -293,7 +293,7 @@ public class IvyDeliverTest extends Test
         File deliveredIvyFile = new File("build/test/deliver/ivy-1.2.xml");
         assertTrue(deliveredIvyFile.exists());
         ModuleDescriptor md = 
XmlModuleDescriptorParser.getInstance().parseDescriptor(
-            new IvySettings(), deliveredIvyFile.toURL(), true);
+            new IvySettings(), deliveredIvyFile.toURI().toURL(), true);
         assertEquals(ModuleRevisionId.newInstance("apache", "resolve-latest", 
"BRANCH1", "1.2"), 
                         md.getModuleRevisionId());
     }
@@ -313,7 +313,7 @@ public class IvyDeliverTest extends Test
         File deliveredIvyFile = new File("build/test/deliver/ivy-1.2.xml");
         assertTrue(deliveredIvyFile.exists());
         ModuleDescriptor md = 
XmlModuleDescriptorParser.getInstance().parseDescriptor(
-            new IvySettings(), deliveredIvyFile.toURL(), true);
+            new IvySettings(), deliveredIvyFile.toURI().toURL(), true);
         assertEquals(ModuleRevisionId.newInstance("apache", "resolve-latest", 
"1.2"), md
                 .getModuleRevisionId());
         DependencyDescriptor[] dds = md.getDependencies();
@@ -345,7 +345,7 @@ public class IvyDeliverTest extends Test
         File deliveredIvyFile = new File("build/test/deliver/ivy-1.2.xml");
         assertTrue(deliveredIvyFile.exists());
         ModuleDescriptor md = 
XmlModuleDescriptorParser.getInstance().parseDescriptor(
-            new IvySettings(), deliveredIvyFile.toURL(), true);
+            new IvySettings(), deliveredIvyFile.toURI().toURL(), true);
         assertEquals(ModuleRevisionId.newInstance("apache", "resolve-latest", 
"1.2"), md
                 .getModuleRevisionId());
         DependencyDescriptor[] dds = md.getDependencies();
@@ -373,7 +373,7 @@ public class IvyDeliverTest extends Test
         File deliveredIvyFile = new File("build/test/deliver/ivy-1.2.xml");
         assertTrue(deliveredIvyFile.exists());
         ModuleDescriptor md = 
XmlModuleDescriptorParser.getInstance().parseDescriptor(
-            new IvySettings(), deliveredIvyFile.toURL(), false);
+            new IvySettings(), deliveredIvyFile.toURI().toURL(), false);
         assertEquals(ModuleRevisionId.newInstance("apache", "resolve-latest", 
"1.2"), md
                 .getModuleRevisionId());
         DependencyDescriptor[] dds = md.getDependencies();
@@ -400,7 +400,7 @@ public class IvyDeliverTest extends Test
         File deliveredIvyFile = new File("build/test/deliver/ivy-1.2.xml");
         assertTrue(deliveredIvyFile.exists()); 
         ModuleDescriptor md = 
XmlModuleDescriptorParser.getInstance().parseDescriptor(
-        new IvySettings(), deliveredIvyFile.toURL(), false);
+        new IvySettings(), deliveredIvyFile.toURI().toURL(), false);
         assertEquals(ModuleRevisionId.newInstance("apache", "resolve-latest", 
"1.2"), 
             md.getModuleRevisionId());
         DependencyDescriptor[] dds = md.getDependencies();
@@ -447,7 +447,7 @@ public class IvyDeliverTest extends Test
         File deliveredIvyFile = new File("build/test/deliver/ivy-1.2.xml");
         assertTrue(deliveredIvyFile.exists()); 
         ModuleDescriptor md = 
XmlModuleDescriptorParser.getInstance().parseDescriptor(
-        new IvySettings(), deliveredIvyFile.toURL(), false);
+        new IvySettings(), deliveredIvyFile.toURI().toURL(), false);
         assertEquals(ModuleRevisionId.newInstance("apache", "resolve-latest", 
"1.2"), 
             md.getModuleRevisionId());
         DependencyDescriptor[] dds = md.getDependencies();
@@ -536,7 +536,7 @@ public class IvyDeliverTest extends Test
         File deliveredIvyFile = new File("build/test/deliver/ivy-1.2.xml");
         assertTrue(deliveredIvyFile.exists());
         ModuleDescriptor md = 
XmlModuleDescriptorParser.getInstance().parseDescriptor(
-            new IvySettings(), deliveredIvyFile.toURL(), true);
+            new IvySettings(), deliveredIvyFile.toURI().toURL(), true);
         assertEquals(ModuleRevisionId.newInstance("apache", "resolve-latest", 
"1.2"), md
                 .getModuleRevisionId());
         DependencyDescriptor[] dds = md.getDependencies();
@@ -560,7 +560,7 @@ public class IvyDeliverTest extends Test
         File deliveredIvyFile = new File("build/test/deliver/ivy-1.2.xml");
         assertTrue(deliveredIvyFile.exists());
         ModuleDescriptor md = 
XmlModuleDescriptorParser.getInstance().parseDescriptor(
-            new IvySettings(), deliveredIvyFile.toURL(), true);
+            new IvySettings(), deliveredIvyFile.toURI().toURL(), true);
         assertEquals(ModuleRevisionId.newInstance("apache", "different-revs", 
"1.2"), md
                 .getModuleRevisionId());
         DependencyDescriptor[] dds = md.getDependencies();

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInstallTest.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInstallTest.java?rev=1375715&r1=1375714&r2=1375715&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInstallTest.java 
(original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInstallTest.java Tue Aug 
21 18:55:01 2012
@@ -151,7 +151,8 @@ public class IvyInstallTest extends Test
     
     public void testInstallWithClassifiers() throws Exception {
         // IVY-1324
-        project.setProperty("ivy.settings.url", new 
File("test/repositories/m2/ivysettings.xml").toURL().toExternalForm());
+        project.setProperty("ivy.settings.url", new 
File("test/repositories/m2/ivysettings.xml")
+                .toURI().toURL().toExternalForm());
         install.setOrganisation("org.apache");
         install.setModule("test-sources");
         install.setRevision("1.0");

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyPublishTest.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyPublishTest.java?rev=1375715&r1=1375714&r2=1375715&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyPublishTest.java 
(original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyPublishTest.java Tue Aug 
21 18:55:01 2012
@@ -459,7 +459,8 @@ public class IvyPublishTest extends Test
         // should have updated published ivy version
         ModuleDescriptor md = 
XmlModuleDescriptorParser.getInstance().parseDescriptor(
             new IvySettings(),
-            new 
File("test/repositories/1/apache/resolve-simple/ivys/ivy-1.2.xml").toURL(), 
false);
+            new 
File("test/repositories/1/apache/resolve-simple/ivys/ivy-1.2.xml").toURI().toURL(),
+            false);
         assertEquals("1.2", md.getModuleRevisionId().getRevision());
     }
 
@@ -568,7 +569,8 @@ public class IvyPublishTest extends Test
         // should have updated published ivy version
         ModuleDescriptor md = 
XmlModuleDescriptorParser.getInstance().parseDescriptor(
             new IvySettings(),
-            new 
File("test/repositories/1/apache/resolve-simple/ivys/ivy-1.2.xml").toURL(), 
false);
+            new 
File("test/repositories/1/apache/resolve-simple/ivys/ivy-1.2.xml").toURI().toURL(),
+            false);
         assertEquals("1.2", md.getModuleRevisionId().getRevision());
 
         // should only contain the default configuration
@@ -650,7 +652,7 @@ public class IvyPublishTest extends Test
 
         // should have updated published ivy version
         ModuleDescriptor md = 
XmlModuleDescriptorParser.getInstance().parseDescriptor(
-            new IvySettings(), dest.toURL(), false);
+            new IvySettings(), dest.toURI().toURL(), false);
         assertEquals("1.2", md.getModuleRevisionId().getRevision());
 
         // should have kept custom attributes
@@ -691,7 +693,8 @@ public class IvyPublishTest extends Test
         // the published ivy version should be ok (ok in ivy-publish file)
         ModuleDescriptor md = 
XmlModuleDescriptorParser.getInstance().parseDescriptor(
             new IvySettings(),
-            new 
File("test/repositories/1/apache/resolve-latest/ivys/ivy-1.3.xml").toURL(), 
false);
+            new 
File("test/repositories/1/apache/resolve-latest/ivys/ivy-1.3.xml").toURI().toURL(),
+            false);
         assertEquals("1.3", md.getModuleRevisionId().getRevision());
 
         // should not have done delivery (replace dynamic revisions with 
static ones)
@@ -726,7 +729,8 @@ public class IvyPublishTest extends Test
         // the published ivy version should be ok (ok in ivy-publish file)
         ModuleDescriptor md = 
XmlModuleDescriptorParser.getInstance().parseDescriptor(
             new IvySettings(),
-            new 
File("test/repositories/1/apache/resolve-latest/ivys/ivy-1.3.xml").toURL(), 
false);
+            new 
File("test/repositories/1/apache/resolve-latest/ivys/ivy-1.3.xml").toURI().toURL(),
+            false);
         assertEquals("BRANCH1", md.getModuleRevisionId().getBranch());
         assertEquals("1.3", md.getModuleRevisionId().getRevision());
 
@@ -761,7 +765,8 @@ public class IvyPublishTest extends Test
         // should have updated published ivy version
         ModuleDescriptor md = 
XmlModuleDescriptorParser.getInstance().parseDescriptor(
             new IvySettings(),
-            new 
File("test/repositories/1/apache/resolve-latest/ivys/ivy-1.3.xml").toURL(), 
false);
+            new 
File("test/repositories/1/apache/resolve-latest/ivys/ivy-1.3.xml").toURI().toURL(),
+            false);
         assertEquals("1.3", md.getModuleRevisionId().getRevision());
     }
 

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/core/TestPerformance.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/TestPerformance.java?rev=1375715&r1=1375714&r2=1375715&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/core/TestPerformance.java 
(original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/TestPerformance.java Tue 
Aug 21 18:55:01 2012
@@ -138,7 +138,7 @@ public class TestPerformance {
         generateModules(70, 2, 5, 2, 15);
 
         long start = System.currentTimeMillis();
-        ResolveReport report = ivy.resolve(new 
File("build/test/perf/mod0/ivy-1.0.xml").toURL(),
+        ResolveReport report = ivy.resolve(new 
File("build/test/perf/mod0/ivy-1.0.xml"),
             getResolveOptions(new String[] {"*"}).setRevision("1.0"));
         long end = System.currentTimeMillis();
         System.out.println("resolve " + 
report.getConfigurationReport("default").getNodesNumber()

Modified: 
ant/ivy/core/trunk/test/java/org/apache/ivy/core/deliver/DeliverTest.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/deliver/DeliverTest.java?rev=1375715&r1=1375714&r2=1375715&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/core/deliver/DeliverTest.java 
(original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/deliver/DeliverTest.java 
Tue Aug 21 18:55:01 2012
@@ -21,6 +21,7 @@ import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileReader;
 import java.io.IOException;
+import java.net.URI;
 
 import junit.framework.TestCase;
 
@@ -63,8 +64,7 @@ public class DeliverTest extends TestCas
     public void testIVY1111() throws Exception {
         Project project = ivyDeliver.getProject();
         project.setProperty("ivy.settings.file", 
"test/repositories/IVY-1111/ivysettings.xml");
-        String ivyFileName = 
DeliverTest.class.getResource("ivy-1111.xml").getFile();
-        File ivyFile = new File(ivyFileName);
+        File ivyFile = new File(new 
URI(DeliverTest.class.getResource("ivy-1111.xml").toString()));
 
         resolve(ivyFile);
 

Modified: 
ant/ivy/core/trunk/test/java/org/apache/ivy/core/publish/PublishEventsTest.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/publish/PublishEventsTest.java?rev=1375715&r1=1375714&r2=1375715&view=diff
==============================================================================
--- 
ant/ivy/core/trunk/test/java/org/apache/ivy/core/publish/PublishEventsTest.java 
(original)
+++ 
ant/ivy/core/trunk/test/java/org/apache/ivy/core/publish/PublishEventsTest.java 
Tue Aug 21 18:55:01 2012
@@ -94,7 +94,8 @@ public class PublishEventsTest extends T
         dataFile = File.createTempFile("ivydata", ".jar");
         dataFile.deleteOnExit();
         
-        publishModule = 
XmlModuleDescriptorParser.getInstance().parseDescriptor(ivy.getSettings(), 
ivyFile.toURL(), false);
+        publishModule = 
XmlModuleDescriptorParser.getInstance().parseDescriptor(ivy.getSettings(),
+            ivyFile.toURI().toURL(), false);
         //always use the same source data file, no pattern substitution is 
required.
         publishSources = Collections.singleton(dataFile.getAbsolutePath());
         //always use the same ivy file, no pattern substitution is required.


Reply via email to