Fixing post-merge test errors

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
Joakim Erdfelt 2019-06-10 12:43:26 -05:00
parent 68a9498092
commit c73f849711
3 changed files with 8 additions and 7 deletions

View File

@ -593,7 +593,7 @@ public class AntWebAppContext extends WebAppContext
TaskLog.logWithTimestamp("Starting web application "+this.getDescriptor());
if (jettyEnvXml != null && jettyEnvXml.exists())
getConfiguration(EnvConfiguration.class).setJettyEnvXml(Resource.toURL(jettyEnvXml));
getConfiguration(EnvConfiguration.class).setJettyEnvResource(new PathResource(jettyEnvXml));
ClassLoader parentLoader = this.getClass().getClassLoader();
if (parentLoader instanceof AntClassLoader)

View File

@ -43,6 +43,7 @@ import org.eclipse.jetty.util.StringUtil;
import org.eclipse.jetty.util.URIUtil;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import org.eclipse.jetty.util.resource.PathResource;
import org.eclipse.jetty.util.resource.Resource;
import org.eclipse.jetty.util.resource.ResourceCollection;
import org.eclipse.jetty.webapp.Configuration;
@ -398,7 +399,7 @@ public class JettyWebAppContext extends WebAppContext
for (Configuration c : getWebAppConfigurations())
{
if (c instanceof EnvConfiguration && getJettyEnvXml() != null)
((EnvConfiguration) c).setJettyEnvXml(Resource.toURL(new File(getJettyEnvXml())));
((EnvConfiguration) c).setJettyEnvResource(new PathResource(new File(getJettyEnvXml())));
}
}
catch (Exception e)

View File

@ -98,13 +98,13 @@ public class XmlConfiguration
private static XmlParser initParser()
{
ClassLoader loader = XmlConfiguration.class.getClassLoader();
XmlParser parser = new XmlParser();
URL config60 = loader.getResource("configure_6_0.dtd");
URL config76 = loader.getResource("configure_7_6.dtd");
URL config90 = loader.getResource("configure_9_0.dtd");
URL config93 = loader.getResource("configure_9_3.dtd");
Class<?> klass = XmlConfiguration.class;
URL config60 = klass.getResource("configure_6_0.dtd");
URL config76 = klass.getResource("configure_7_6.dtd");
URL config90 = klass.getResource("configure_9_0.dtd");
URL config93 = klass.getResource("configure_9_3.dtd");
parser.redirectEntity("configure.dtd",config93);
parser.redirectEntity("configure_1_0.dtd",config60);
parser.redirectEntity("configure_1_1.dtd",config60);