struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgie...@apache.org
Subject svn commit: r747044 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java
Date Mon, 23 Feb 2009 15:21:50 GMT
Author: rgielen
Date: Mon Feb 23 15:21:47 2009
New Revision: 747044

URL: http://svn.apache.org/viewvc?rev=747044&view=rev
Log:
WW-2883 StrutsXmlConfigurationProvider generics fix
- applied patch submitted by Mathias Bogaert

Modified:
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java?rev=747044&r1=747043&r2=747044&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java
(original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java
Mon Feb 23 15:21:47 2009
@@ -91,8 +91,8 @@
     @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 @@
         }
         if (file.exists()) {
             try {
-                url = file.toURL();
+                url = file.toURI().toURL();
             } catch (MalformedURLException e) {
                 throw new IOException("Unable to convert "+file+" to a URL");
             }



Mime
View raw message