Author: oheger Date: Sun Jun 27 16:55:12 2010 New Revision: 958396 URL: http://svn.apache.org/viewvc?rev=958396&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/TestXMLConfiguration.java Modified: commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestXMLConfiguration.java URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestXMLConfiguration.java?rev=958396&r1=958395&r2=958396&view=diff ============================================================================== --- commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestXMLConfiguration.java (original) +++ commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestXMLConfiguration.java Sun Jun 27 16:55:12 2010 @@ -408,7 +408,7 @@ public class TestXMLConfiguration extend */ public void testLoadFromURL() throws Exception { - URL url = new File(testProperties).toURL(); + URL url = new File(testProperties).toURI().toURL(); conf = new XMLConfiguration(url); assertEquals("value", conf.getProperty("element")); assertEquals(url, conf.getURL()); @@ -505,7 +505,7 @@ public class TestXMLConfiguration extend */ public void testSaveToURL() throws Exception { - conf.save(testSaveConf.toURL()); + conf.save(testSaveConf.toURI().toURL()); XMLConfiguration checkConfig = new XMLConfiguration(); checkConfig.setFile(testSaveConf); checkSavedConfig(checkConfig); @@ -1435,7 +1435,7 @@ public class TestXMLConfiguration extend conf.save(testSaveConf); XMLConfiguration checkConfig = new XMLConfiguration(); checkConfig.setFile(testSaveConf); - checkConfig.registerEntityId(publicId, dtdFile.toURL()); + checkConfig.registerEntityId(publicId, dtdFile.toURI().toURL()); checkConfig.setValidating(true); checkSavedConfig(checkConfig); }