changed to not use deprecated toURL()

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@26 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Andy Clement 2008-08-12 22:14:10 +00:00
parent 964c308208
commit a9730bee55
2 changed files with 2 additions and 2 deletions

View File

@ -86,7 +86,7 @@ public class StandardEvaluationContext implements EvaluationContext {
while (st.hasMoreTokens()) {
String element = st.nextToken();
try {
urls.add(new File(element).toURL());
urls.add(new File(element).toURI().toURL());
} catch (MalformedURLException e) {
throw new RuntimeException("Invalid element in classpath " + element);
}

View File

@ -82,7 +82,7 @@ public class TestScenarioCreator {
*/
private static void createTestClassloader(StandardEvaluationContext testContext) {
try {
ClassLoader cl = new URLClassLoader(new URL[] { new File("target/test-classes/testcode.jar").toURL() },
ClassLoader cl = new URLClassLoader(new URL[] { new File("target/test-classes/testcode.jar").toURI().toURL() },
Thread.currentThread().getContextClassLoader());
testContext.setClassLoader(cl);
} catch (MalformedURLException mue) {