commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r949391 - /commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestFileConfiguration.java
Date Sat, 29 May 2010 14:14:14 GMT
Author: oheger
Date: Sat May 29 14:14:13 2010
New Revision: 949391

URL: http://svn.apache.org/viewvc?rev=949391&view=rev
Log:
Removed some deprecation warnings related to File.toURL().

Modified:
    commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestFileConfiguration.java

Modified: commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestFileConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestFileConfiguration.java?rev=949391&r1=949390&r2=949391&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestFileConfiguration.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/TestFileConfiguration.java
Sat May 29 14:14:13 2010
@@ -34,7 +34,7 @@ import org.apache.commons.configuration2
 
 /**
  * @author Emmanuel Bourg
- * @version $Revision$, $Date$
+ * @version $Id$
  */
 public class TestFileConfiguration extends TestCase
 {
@@ -87,7 +87,7 @@ public class TestFileConfiguration exten
         assertEquals(TEST_FILENAME, config.getFileName());
         assertEquals(directory.getAbsolutePath(), config.getBasePath());
         assertEquals(file.getAbsolutePath(), config.getPath());
-        assertEquals(file.toURL(), config.getURL());
+        assertEquals(file.toURI().toURL(), config.getURL());
 
         config.setBasePath(null);
         config.setFileName(TEST_FILENAME);
@@ -165,7 +165,7 @@ public class TestFileConfiguration exten
         try
         {
             DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
-            builder.setURL(ConfigurationAssert.getTestFile("testDigesterConfiguration2.xml").toURL());
+            builder.setURL(ConfigurationAssert.getTestFile("testDigesterConfiguration2.xml").toURI().toURL());
             CombinedConfiguration cc = (CombinedConfiguration) builder.getConfiguration();
             PropertiesConfiguration config = null;
             for (int i = 0; config == null; i++)
@@ -345,7 +345,7 @@ public class TestFileConfiguration exten
             out.close();
             out = null;
 
-            URL url = new URL(ConfigurationAssert.OUT_DIR.toURL()
+            URL url = new URL(ConfigurationAssert.OUT_DIR.toURI().toURL()
                     + "path%20with%20spaces/config-test.properties");
             PropertiesConfiguration config = new PropertiesConfiguration(url);
             config.load();
@@ -451,7 +451,7 @@ public class TestFileConfiguration exten
         }
 
         config = new PropertiesConfiguration();
-        config.load(file.toURL());
+        config.load(file.toURI().toURL());
         try
         {
             config.save();



Mime
View raw message