mirror of https://github.com/apache/lucene.git
LUCENE-6989: Fix Exception handling in MMapDirectory's unmap hack support code to work with Java 9's new InaccessibleObjectException that does not extend ReflectiveAccessException in Java 9.
This commit is contained in:
parent
c185617582
commit
22d04a7c11
|
@ -85,6 +85,11 @@ Bug Fixes
|
|||
the incoming automaton is a special case and throw a clearer
|
||||
exception than NullPointerException (Tom Mortimer via Mike McCandless)
|
||||
|
||||
* LUCENE-6989: Fix Exception handling in MMapDirectory's unmap hack
|
||||
support code to work with Java 9's new InaccessibleObjectException
|
||||
that does not extend ReflectiveAccessException in Java 9.
|
||||
(Uwe Schindler)
|
||||
|
||||
Improvements
|
||||
|
||||
* LUCENE-6824: TermAutomatonQuery now rewrites to TermQuery,
|
||||
|
|
|
@ -385,13 +385,13 @@ public class MMapDirectory extends FSDirectory {
|
|||
}
|
||||
}
|
||||
};
|
||||
} catch (ReflectiveOperationException e) {
|
||||
return "Unmapping is not supported on this platform, because internal Java APIs are not compatible to this Lucene version: " + e;
|
||||
} catch (SecurityException e) {
|
||||
return "Unmapping is not supported, because not all required permissions are given to the Lucene JAR file: " + e +
|
||||
" [Please grant at least the following permissions: RuntimePermission(\"accessClassInPackage.sun.misc\"), " +
|
||||
"RuntimePermission(\"accessClassInPackage.jdk.internal.ref\"), and " +
|
||||
"ReflectPermission(\"suppressAccessChecks\")]";
|
||||
} catch (ReflectiveOperationException | RuntimeException e) {
|
||||
return "Unmapping is not supported on this platform, because internal Java APIs are not compatible to this Lucene version: " + e;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue