mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
WW-2883 StrutsXmlConfigurationProvider generics fix
- applied patch submitted by Mathias Bogaert git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@747063 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -91,8 +91,8 @@ public class StrutsXmlConfigurationProvider extends XmlConfigurationProvider {
|
||||
@Override
|
||||
public void register(ContainerBuilder containerBuilder, LocatableProperties props) throws ConfigurationException {
|
||||
if (servletContext != null && !containerBuilder.contains(ServletContext.class)) {
|
||||
containerBuilder.factory(ServletContext.class, new Factory() {
|
||||
public Object create(Context context) throws Exception {
|
||||
containerBuilder.factory(ServletContext.class, new Factory<ServletContext>() {
|
||||
public ServletContext create(Context context) throws Exception {
|
||||
return servletContext;
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ public class StrutsXmlConfigurationProvider extends XmlConfigurationProvider {
|
||||
}
|
||||
if (file.exists()) {
|
||||
try {
|
||||
url = file.toURL();
|
||||
url = file.toURI().toURL();
|
||||
} catch (MalformedURLException e) {
|
||||
throw new IOException("Unable to convert "+file+" to a URL");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user