Revision: 4591
          http://sourceforge.net/p/vexi/code/4591
Author:   clrg
Date:     2013-11-21 14:33:24 +0000 (Thu, 21 Nov 2013)
Log Message:
-----------
Fix tests when run on paths with spaces

Modified Paths:
--------------
    branches/vexi3/org.vexi-library.js/src/poke/java/org/ibex/js/JSTestUtil.java
    
branches/vexi4c/org.vexi-core.main/src/test/java/testdeployment/NanoHTTPD.java

Modified: 
branches/vexi3/org.vexi-library.js/src/poke/java/org/ibex/js/JSTestUtil.java
===================================================================
--- 
branches/vexi3/org.vexi-library.js/src/poke/java/org/ibex/js/JSTestUtil.java    
    2013-11-21 13:11:23 UTC (rev 4590)
+++ 
branches/vexi3/org.vexi-library.js/src/poke/java/org/ibex/js/JSTestUtil.java    
    2013-11-21 14:33:24 UTC (rev 4591)
@@ -3,6 +3,7 @@
 import java.io.File;
 import java.io.FilenameFilter;
 import java.lang.reflect.Method;
+import java.net.URISyntaxException;
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.Map;
@@ -43,12 +44,14 @@
                        return new Fountain.File(dir.getPath());
        }catch(JSExn e){
                throw new RuntimeException(e);
-       }
+       }catch (URISyntaxException e){
+               throw new RuntimeException(e);
+               }
        }
        
        
-       static public File getResourceFile(Class c, final String 
resourceSuffix) {
-               File dir = new File(c.getResource(".").getPath());
+       static public File getResourceFile(Class c, final String 
resourceSuffix) throws URISyntaxException {
+               File dir = new File(c.getResource(".").toURI());
        boolean hasResources = dir.list(new FilenameFilter(){
                        public boolean accept(File dir, String name) {
                                return name.endsWith(resourceSuffix);

Modified: 
branches/vexi4c/org.vexi-core.main/src/test/java/testdeployment/NanoHTTPD.java
===================================================================
--- 
branches/vexi4c/org.vexi-core.main/src/test/java/testdeployment/NanoHTTPD.java  
    2013-11-21 13:11:23 UTC (rev 4590)
+++ 
branches/vexi4c/org.vexi-core.main/src/test/java/testdeployment/NanoHTTPD.java  
    2013-11-21 14:33:24 UTC (rev 4591)
@@ -13,6 +13,7 @@
 import java.net.ServerSocket;
 import java.net.Socket;
 import java.net.SocketException;
+import java.net.URISyntaxException;
 import java.net.URLEncoder;
 import java.text.SimpleDateFormat;
 import java.util.Date;
@@ -236,8 +237,9 @@
         * Starts a HTTP server to given port.<p>
         * Throws an IOException if the socket is already in use
         * @throws InterruptedException 
+        * @throws URISyntaxException 
         */
-       public NanoHTTPD(int port, int rate, File rootDir) throws IOException, 
InterruptedException
+       public NanoHTTPD(int port, int rate, File rootDir) throws IOException, 
InterruptedException, URISyntaxException
        {       
                PORT = port;
                MAX_BYTES_PER_SECOND = rate;

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to