Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

Fix test failure on a checkout with spaces in file path caused by recent LUCENE-2212 commit

Uwe Schindler2c86ce4c1783
diff --git a/src/test/org/apache/lucene/analysis/TestPorterStemFilter.java b/src/test/org/apache/lucene/analysis/TestPorterStemFilter.java
index d377577cd9a..471ac08d2a2 100644
--- a/src/test/org/apache/lucene/analysis/TestPorterStemFilter.java
+++ b/src/test/org/apache/lucene/analysis/TestPorterStemFilter.java
@@ -33,11 +33,11 @@ public class TestPorterStemFilter extends BaseTokenStreamTestCase {
* Run the stemmer against all strings in voc.txt
* The output should be the same as the string in output.txt
*/
- public void testPorterStemFilter() throws IOException {
+ public void testPorterStemFilter() throws Exception {
Tokenizer tokenizer = new KeywordTokenizer(new StringReader(""));
TokenStream filter = new PorterStemFilter(tokenizer);
ZipFile zipFile = new ZipFile(
- new File(getClass().getResource("porterTestData.zip").getFile()));
+ new File(getClass().getResource("porterTestData.zip").toURI()));
InputStream voc = zipFile.getInputStream(zipFile.getEntry("voc.txt"));
InputStream out = zipFile.getInputStream(zipFile.getEntry("output.txt"));
BufferedReader vocReader = new BufferedReader(new InputStreamReader(