mirror of https://github.com/apache/lucene.git
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:
parent
456b10fdf9
commit
da78e20bd0
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue