LUCENE-3200: Add extra safety to MMapDirectory (as it could still use unmapped curBuf)!

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1205152 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2011-11-22 20:18:43 +00:00
parent 0546719498
commit 28c464c658
1 changed files with 1 additions and 0 deletions

View File

@ -412,6 +412,7 @@ public class MMapDirectory extends FSDirectory {
@Override
public void close() throws IOException {
curBuf = null; curBufIndex = 0;
try {
if (isClone || buffers == null) return;
for (int bufNr = 0; bufNr < buffers.length; bufNr++) {