Skip to content

Apache Lucene open-source search software

Followup for #15801: Remove the unwrapping to work around for FS providers without MemorySegment support (#15804)

Uwe Schindler54502231f1b4
diff --git a/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java b/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java
index 97b9538b134..8ca59a07ddf 100644
--- a/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java
+++ b/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java
@@ -36,7 +36,6 @@ import java.util.function.Function;
import java.util.logging.Logger;
import org.apache.lucene.index.IndexFileNames;
import org.apache.lucene.util.Constants;
-import org.apache.lucene.util.Unwrappable;
/**
* File-based {@link Directory} implementation that uses mmap for reading, and {@link
@@ -322,9 +321,6 @@ public class MMapDirectory extends FSDirectory {
Path path = directory.resolve(name);
final String resourceDescription = "MemorySegmentIndexInput(path=\"" + path.toString() + "\")";
- // Work around for JDK-8259028: we need to unwrap our test-only file system layers
- path = Unwrappable.unwrapAll(path);
-
final boolean confined = context.hints().contains(ReadOnceHint.INSTANCE);
Function<IOContext, ReadAdvice> toReadAdvice =
c -> readAdvice.apply(name, c).orElse(Constants.DEFAULT_READADVICE);