struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcucchi...@apache.org
Subject svn commit: r1173210 - in /struts/struts2/trunk/plugins/sitegraph/src: main/java/org/apache/struts2/sitegraph/SiteGraph.java test/java/org/apache/struts2/sitegraph/SiteGraphTest.java
Date Tue, 20 Sep 2011 15:58:37 GMT
Author: mcucchiara
Date: Tue Sep 20 15:58:37 2011
New Revision: 1173210

URL: http://svn.apache.org/viewvc?rev=1173210&view=rev
Log:
WW-3681 - testWebFlow(org.apache.struts2.sitegraph.SiteGraphTest) test fails on paths with
spaces

Modified:
    struts/struts2/trunk/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/SiteGraph.java
    struts/struts2/trunk/plugins/sitegraph/src/test/java/org/apache/struts2/sitegraph/SiteGraphTest.java

Modified: struts/struts2/trunk/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/SiteGraph.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/SiteGraph.java?rev=1173210&r1=1173209&r2=1173210&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/SiteGraph.java
(original)
+++ struts/struts2/trunk/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/SiteGraph.java
Tue Sep 20 15:58:37 2011
@@ -21,17 +21,12 @@
 
 package org.apache.struts2.sitegraph;
 
-import java.io.ByteArrayOutputStream;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Writer;
-
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
 import org.apache.struts2.StrutsException;
 import org.apache.struts2.sitegraph.renderers.DOTRenderer;
 
-import com.opensymphony.xwork2.util.logging.Logger;
-import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import java.io.*;
 
 /**
  * // START SNIPPET: javadocs-intro
@@ -122,7 +117,7 @@ public class SiteGraph {
             }
         }
 
-        StrutsConfigRetriever.setConfiguration(configDir, views.split("[, ]+"));
+        StrutsConfigRetriever.setConfiguration(configDir, views.split("[,]+"));
         DOTRenderer renderer = new DOTRenderer(writer);
         renderer.render(namespace);
     }

Modified: struts/struts2/trunk/plugins/sitegraph/src/test/java/org/apache/struts2/sitegraph/SiteGraphTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/sitegraph/src/test/java/org/apache/struts2/sitegraph/SiteGraphTest.java?rev=1173210&r1=1173209&r2=1173210&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/sitegraph/src/test/java/org/apache/struts2/sitegraph/SiteGraphTest.java
(original)
+++ struts/struts2/trunk/plugins/sitegraph/src/test/java/org/apache/struts2/sitegraph/SiteGraphTest.java
Tue Sep 20 15:58:37 2011
@@ -21,16 +21,14 @@
 
 package org.apache.struts2.sitegraph;
 
+import com.opensymphony.xwork2.util.ClassLoaderUtil;
+import org.apache.struts2.StrutsTestCase;
+
 import java.io.File;
 import java.io.InputStream;
 import java.io.StringWriter;
 import java.net.URL;
 
-import org.apache.struts2.StrutsTestCase;
-import org.apache.struts2.dispatcher.Dispatcher;
-
-import com.opensymphony.xwork2.util.ClassLoaderUtil;
-
 /**
  */
 public class SiteGraphTest extends StrutsTestCase {
@@ -39,7 +37,7 @@ public class SiteGraphTest extends Strut
         // working directory being an assumed value when
         // running the test:  so let's get this class's parent dir
         URL url = ClassLoaderUtil.getResource("org/apache/struts2/sitegraph/struts.xml",
SiteGraphTest.class);
-        File file = new File(url.toString().substring(5));
+        File file = new File(url.toURI());
         String dir = file.getParent();
 
         SiteGraph siteGraph = new SiteGraph(dir, dir, dir, "");



Mime
View raw message