LUCENE-1416: don't fail contrib/ant's unit test when file path contains non-URL safe characters like space

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@706160 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2008-10-20 09:12:46 +00:00
parent 456b10fdf9
commit da78e20bd0
1 changed files with 3 additions and 2 deletions

View File

@ -19,6 +19,7 @@ package org.apache.lucene.ant;
import java.io.File;
import java.io.IOException;
import java.net.URLDecoder;
import junit.framework.TestCase;
@ -32,7 +33,7 @@ public abstract class DocumentTestCase extends TestCase
String fullname =
this.getClass().getResource(filename).getFile();
File file = new File(fullname);
File file = new File(URLDecoder.decode(fullname, "UTF-8"));
return file;
}