Apache Solr open-source search software
LUCENE-5730: FSDirectory.open should return mmap for 64-bit OS X
Robert Muire33d6658c84c
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txtindex 30af545521c..b26e1cb50a7 100644--- a/lucene/CHANGES.txt+++ b/lucene/CHANGES.txt@@ -232,6 +232,9 @@ Optimizationsimplementations. This improves random access as used by docvalues codecsif used with MMapDirectory. (Robert Muir, Uwe Schindler)+* LUCENE-5730: FSDirectory.open returns MMapDirectory for 64-bit operating+ systems, not just Linux and Windows. (Robert Muir)+Bug fixes* LUCENE-5673: MMapDirectory: Work around a "bug" in the JDK that throwsdiff --git a/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java b/lucene/core/src/java/org/apache/lucene/store/FSDirectory.javaindex 2cbde59b6da..ed7968ab803 100644--- a/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java+++ b/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java@@ -167,8 +167,7 @@ public abstract class FSDirectory extends BaseDirectory {/** Just like {@link #open(File)}, but allows you to* also specify a custom {@link LockFactory}. */public static FSDirectory open(File path, LockFactory lockFactory) throws IOException {- if ((Constants.WINDOWS || Constants.SUN_OS || Constants.LINUX)- && Constants.JRE_IS_64BIT && MMapDirectory.UNMAP_SUPPORTED) {+ if (Constants.JRE_IS_64BIT && MMapDirectory.UNMAP_SUPPORTED) {return new MMapDirectory(path, lockFactory);} else if (Constants.WINDOWS) {return new SimpleFSDirectory(path, lockFactory);