提交 17076674 编写于 作者: A Andy Clement

changed to not use deprecated toURL()

上级 f9285d54
......@@ -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);
}
......
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册