Skip to content

Apache Lucene open-source search software

Fix Java 9 b158+ problem (no compatibility layer for non expanded paths anymore)

Uwe Schindler6f3f6a2d66d1
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestReadOnlyIndex.java b/lucene/core/src/test/org/apache/lucene/index/TestReadOnlyIndex.java
index 11e583e0391..91980024cb1 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestReadOnlyIndex.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestReadOnlyIndex.java
@@ -46,7 +46,7 @@ public class TestReadOnlyIndex extends LuceneTestCase {
@BeforeClass
public static void buildIndex() throws Exception {
- indexPath = Files.createTempDirectory("readonlyindex");
+ indexPath = Files.createTempDirectory("readonlyindex").toAbsolutePath();
// borrows from TestDemo, but not important to keep in sync with demo
Analyzer analyzer = new MockAnalyzer(random());