commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r949283 - /commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestFileConfiguration.java
Date Fri, 28 May 2010 20:24:47 GMT
Author: oheger
Date: Fri May 28 20:24:47 2010
New Revision: 949283

URL: http://svn.apache.org/viewvc?rev=949283&view=rev
Log:
Now we are on JDK 1.4, we can use File.toURI().toURL(). Removed some deprecation warnings.

Modified:
    commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestFileConfiguration.java

Modified: commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestFileConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestFileConfiguration.java?rev=949283&r1=949282&r2=949283&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestFileConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestFileConfiguration.java
Fri May 28 20:24:47 2010
@@ -34,7 +34,7 @@ import org.apache.commons.configuration.
 
 /**
  * @author Emmanuel Bourg
- * @version $Revision$, $Date$
+ * @version $Id$
  */
 public class TestFileConfiguration extends TestCase
 {
@@ -93,7 +93,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);
@@ -172,7 +172,7 @@ public class TestFileConfiguration exten
         try
         {
             ConfigurationFactory factory = new ConfigurationFactory();
-            factory.setConfigurationURL(new File(dir, "testDigesterConfiguration2.xml").toURL());
+            factory.setConfigurationURL(new File(dir, "testDigesterConfiguration2.xml").toURI().toURL());
             CompositeConfiguration cc = (CompositeConfiguration) factory.getConfiguration();
             PropertiesConfiguration config = null;
             for (int i = 0; config == null; i++)
@@ -352,7 +352,7 @@ public class TestFileConfiguration exten
             out.close();
             out = null;
 
-            URL url = new URL(TARGET_DIR.toURL()
+            URL url = new URL(TARGET_DIR.toURI().toURL()
                     + "path%20with%20spaces/config-test.properties");
             PropertiesConfiguration config = new PropertiesConfiguration(url);
             config.load();
@@ -458,7 +458,7 @@ public class TestFileConfiguration exten
         }
 
         config = new PropertiesConfiguration();
-        config.load(file.toURL());
+        config.load(file.toURI().toURL());
         try
         {
             config.save();



Mime
View raw message