changed to not use deprecated toURL()
This commit is contained in:
parent
f9285d54ab
commit
1707667489
|
|
@ -86,7 +86,7 @@ public class StandardEvaluationContext implements EvaluationContext {
|
||||||
while (st.hasMoreTokens()) {
|
while (st.hasMoreTokens()) {
|
||||||
String element = st.nextToken();
|
String element = st.nextToken();
|
||||||
try {
|
try {
|
||||||
urls.add(new File(element).toURL());
|
urls.add(new File(element).toURI().toURL());
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
throw new RuntimeException("Invalid element in classpath " + element);
|
throw new RuntimeException("Invalid element in classpath " + element);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ public class TestScenarioCreator {
|
||||||
*/
|
*/
|
||||||
private static void createTestClassloader(StandardEvaluationContext testContext) {
|
private static void createTestClassloader(StandardEvaluationContext testContext) {
|
||||||
try {
|
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());
|
Thread.currentThread().getContextClassLoader());
|
||||||
testContext.setClassLoader(cl);
|
testContext.setClassLoader(cl);
|
||||||
} catch (MalformedURLException mue) {
|
} catch (MalformedURLException mue) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue