You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2014/06/03 20:22:23 UTC

svn commit: r1599725 - in /lucene/dev/trunk/lucene: CHANGES.txt core/src/java/org/apache/lucene/store/FSDirectory.java

Author: rmuir
Date: Tue Jun  3 18:22:22 2014
New Revision: 1599725

URL: http://svn.apache.org/r1599725
Log:
LUCENE-5730: FSDirectory.open should return mmap for 64-bit OS X

Modified:
    lucene/dev/trunk/lucene/CHANGES.txt
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java

Modified: lucene/dev/trunk/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/CHANGES.txt?rev=1599725&r1=1599724&r2=1599725&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/CHANGES.txt (original)
+++ lucene/dev/trunk/lucene/CHANGES.txt Tue Jun  3 18:22:22 2014
@@ -232,6 +232,9 @@ Optimizations
   implementations. This improves random access as used by docvalues codecs
   if 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 throws

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java?rev=1599725&r1=1599724&r2=1599725&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java Tue Jun  3 18:22:22 2014
@@ -167,8 +167,7 @@ public abstract class FSDirectory extend
   /** 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);