If you ban this by policy, it should return false.
Instead today all writes will fail by default.
Simple patch. I also removed the builder-like chaining here.
After chatting with Robert, I understand now what the problem is: The main reason for the setAccessible is to have the same check as done while executing the unmapping. If you don't do the setAccessible,the reflection works, although it may fail later when doing the unmapping.
Commit 1695859 from Robert Muir in branch 'dev/trunk'
[ https://svn.apache.org/r1695859 ]
LUCENE-6618: MMapDirectory.checkUnmapSupported is buggy
Commit 1695865 from Robert Muir in branch 'dev/branches/branch_5x'
[ https://svn.apache.org/r1695865 ]
Should we backport this to 5.3.0 for the 2nd RC?
Reopen for backport to 5.3.0
Commit 1696001 from Michael McCandless in branch 'dev/branches/lucene_solr_5_3'
[ https://svn.apache.org/r1696001 ]
Commit 1696002 from Michael McCandless in branch 'dev/branches/branch_5x'
[ https://svn.apache.org/r1696002 ]
LUCENE-6618: move CHANGES.txt entry
Commit 1696003 from Michael McCandless in branch 'dev/trunk'
[ https://svn.apache.org/r1696003 ]
Bulk close for 5.3.0 release