Apache Lucene open-source search software
prepare Hudson's large line doc file
Uwe Schindlerbc72163b4c5d
diff --git a/lucene/src/test/org/apache/lucene/util/LineFileDocs.java b/lucene/src/test/org/apache/lucene/util/LineFileDocs.javaindex ebbafb1e6ed..fe3c0eb355a 100644--- a/lucene/src/test/org/apache/lucene/util/LineFileDocs.java+++ b/lucene/src/test/org/apache/lucene/util/LineFileDocs.java@@ -18,7 +18,7 @@ package org.apache.lucene.util;*/import java.io.Closeable;-import java.io.FileNotFoundException;+import java.io.FileInputStream;import java.io.IOException;import java.io.BufferedReader;import java.io.InputStreamReader;@@ -63,9 +63,10 @@ public class LineFileDocs implements Closeable {private synchronized void open() throws IOException {InputStream is = getClass().getResourceAsStream(path);if (is == null) {- throw new FileNotFoundException("cannot find line docs resource \"" + path + "\"");+ // if its not in classpath, we load it as absolute filesystem path (e.g. Hudson's home dir)+ is = new FileInputStream(path);}- if (path.toString().endsWith(".gz")) {+ if (path.endsWith(".gz")) {is = new GZIPInputStream(is);}final InputStream in = new BufferedInputStream(is, BUFFER_SIZE);