lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r706160 - /lucene/java/trunk/contrib/ant/src/test/org/apache/lucene/ant/DocumentTestCase.java
Date Mon, 20 Oct 2008 09:12:47 GMT
Author: mikemccand
Date: Mon Oct 20 02:12:46 2008
New Revision: 706160

URL: http://svn.apache.org/viewvc?rev=706160&view=rev
Log:
LUCENE-1416: don't fail contrib/ant's unit test when file path contains non-URL safe characters
like space

Modified:
    lucene/java/trunk/contrib/ant/src/test/org/apache/lucene/ant/DocumentTestCase.java

Modified: lucene/java/trunk/contrib/ant/src/test/org/apache/lucene/ant/DocumentTestCase.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/ant/src/test/org/apache/lucene/ant/DocumentTestCase.java?rev=706160&r1=706159&r2=706160&view=diff
==============================================================================
--- lucene/java/trunk/contrib/ant/src/test/org/apache/lucene/ant/DocumentTestCase.java (original)
+++ lucene/java/trunk/contrib/ant/src/test/org/apache/lucene/ant/DocumentTestCase.java Mon
Oct 20 02:12:46 2008
@@ -19,6 +19,7 @@
 
 import java.io.File;
 import java.io.IOException;
+import java.net.URLDecoder;
 
 import junit.framework.TestCase;
 
@@ -31,8 +32,8 @@
     protected File getFile(String filename) throws IOException {
         String fullname =
                      this.getClass().getResource(filename).getFile();
-                     
-        File file = new File(fullname);
+        
+        File file = new File(URLDecoder.decode(fullname, "UTF-8"));
         
         return file;
     }



Mime
View raw message