struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mr...@apache.org
Subject svn commit: r628274 - /struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/freemarker/FreeMarkerResultTest.java
Date Sat, 16 Feb 2008 12:01:34 GMT
Author: mrdon
Date: Sat Feb 16 04:01:30 2008
New Revision: 628274

URL: http://svn.apache.org/viewvc?rev=628274&view=rev
Log:
Fixing freemarker tests when path included a space
WW-2452

Modified:
    struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/freemarker/FreeMarkerResultTest.java

Modified: struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/freemarker/FreeMarkerResultTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/freemarker/FreeMarkerResultTest.java?rev=628274&r1=628273&r2=628274&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/freemarker/FreeMarkerResultTest.java
(original)
+++ struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/freemarker/FreeMarkerResultTest.java
Sat Feb 16 04:01:30 2008
@@ -20,6 +20,7 @@
  */
 package org.apache.struts2.views.freemarker;
 
+import java.io.File;
 import java.io.PrintWriter;
 import java.io.StringWriter;
 
@@ -102,8 +103,8 @@
         invocation = new MockActionInvocation();
         invocation.setStack(stack);
         invocation.setInvocationContext(context);
-        servletContext.setRealPath(FreeMarkerResultTest.class.getResource(
-            "someFreeMarkerFile.ftl").getFile());
+        servletContext.setRealPath(new File(FreeMarkerResultTest.class.getResource(
+					"someFreeMarkerFile.ftl").toURI()).toURL().getFile());
     }
 
     protected void tearDown() throws Exception {



Mime
View raw message