mirror of https://github.com/apache/lucene.git
LUCENE-6618: MMapDirectory.checkUnmapSupported is buggy
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1695859 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2d7df11ab8
commit
b745a9f608
|
@ -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.
|
||||
|
|
|
@ -167,7 +167,9 @@ public class MMapDirectory extends FSDirectory {
|
|||
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue