Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Gorovoy2011-07-08 19:07:12 +0000
committerMichael Gorovoy2011-07-08 21:21:02 +0000
commit8babf3ae17f4b7df730e87ab8f17d88a531c2290 (patch)
treedb383b2fbcdd168f0b0dbdd19ba5ca433a04f2a7 /jetty-deploy/src/test
parent4e8598eb00831dde238035045783ac0f398476ae (diff)
downloadorg.eclipse.jetty.project-8babf3ae17f4b7df730e87ab8f17d88a531c2290.tar.gz
org.eclipse.jetty.project-8babf3ae17f4b7df730e87ab8f17d88a531c2290.tar.xz
org.eclipse.jetty.project-8babf3ae17f4b7df730e87ab8f17d88a531c2290.zip
351576 Do not use deprecated method File.toURL()
Diffstat (limited to 'jetty-deploy/src/test')
-rw-r--r--jetty-deploy/src/test/java/org/eclipse/jetty/deploy/MockAppProvider.java2
-rw-r--r--jetty-deploy/src/test/java/org/eclipse/jetty/deploy/test/XmlConfiguredJetty.java3
2 files changed, 3 insertions, 2 deletions
diff --git a/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/MockAppProvider.java b/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/MockAppProvider.java
index 0a5f541afd..7418a2877b 100644
--- a/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/MockAppProvider.java
+++ b/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/MockAppProvider.java
@@ -52,7 +52,7 @@ public class MockAppProvider extends AbstractLifeCycle implements AppProvider
WebAppContext context = new WebAppContext();
File war = new File(webappsDir,app.getOriginId().substring(5));
- context.setWar(Resource.newResource(war.toURI().toURL()).toString());
+ context.setWar(Resource.newResource(Resource.toURL(war)).toString());
String path = war.getName();
diff --git a/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/test/XmlConfiguredJetty.java b/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/test/XmlConfiguredJetty.java
index db047df32e..270b9fbcd8 100644
--- a/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/test/XmlConfiguredJetty.java
+++ b/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/test/XmlConfiguredJetty.java
@@ -42,6 +42,7 @@ import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
import org.eclipse.jetty.toolchain.test.PathAssert;
import org.eclipse.jetty.toolchain.test.TestingDir;
import org.eclipse.jetty.util.IO;
+import org.eclipse.jetty.util.resource.Resource;
import org.eclipse.jetty.webapp.WebAppContext;
import org.eclipse.jetty.xml.XmlConfiguration;
import org.junit.Assert;
@@ -132,7 +133,7 @@ public class XmlConfiguredJetty
public void addConfiguration(File xmlConfigFile) throws MalformedURLException
{
- _xmlConfigurations.add(xmlConfigFile.toURI().toURL());
+ _xmlConfigurations.add(Resource.toURL(xmlConfigFile));
}
public void addConfiguration(String testConfigName) throws MalformedURLException

Back to the top