mirror of
https://github.com/apache/lucene.git
synced 2025-02-06 10:08:58 +00:00
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
ca428ce238
commit
d00ab65dcc
@ -34,6 +34,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-7532: Add back lost codec file format documentation
|
||||
|
@ -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…
x
Reference in New Issue
Block a user