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 2015/08/14 13:24:10 UTC

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

Author: rmuir
Date: Fri Aug 14 11:24:09 2015
New Revision: 1695859

URL: http://svn.apache.org/r1695859
Log:
LUCENE-6618: MMapDirectory.checkUnmapSupported is buggy

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

Modified: lucene/dev/trunk/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/CHANGES.txt?rev=1695859&r1=1695858&r2=1695859&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/CHANGES.txt (original)
+++ lucene/dev/trunk/lucene/CHANGES.txt Fri Aug 14 11:24:09 2015
@@ -70,6 +70,9 @@ Bug Fixes
 * LUCENE-6730: Hyper-parameter c is ignored in term frequency NormalizationH1.
   (Ahmet Arslan via Robert Muir)
 
+* LUCENE-6618: Properly set MMapDirectory.UNMAP_SUPPORTED when it is now allowed
+  by security policy. (Robert Muir)
+
 Other
 
 * LUCENE-6174: Improve "ant eclipse" to select right JRE for building.

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java?rev=1695859&r1=1695858&r2=1695859&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/store/MMapDirectory.java Fri Aug 14 11:24:09 2015
@@ -167,7 +167,9 @@ public class MMapDirectory extends FSDir
   
   private static boolean checkUnmapSupported() {
     try {
-      Class.forName("java.nio.DirectByteBuffer").getMethod("cleaner");
+      Class<?> clazz = Class.forName("java.nio.DirectByteBuffer");
+      Method method = clazz.getMethod("cleaner");
+      method.setAccessible(true);
       return true;
     } catch (Exception e) {
       return false;