Apache Lucene open-source search software
LUCENE-3200: Add extra safety to MMapDirectory (as it could still use unmapped curBuf)!
Uwe Schindler28c464c65846
diff --git a/lucene/src/java/org/apache/lucene/store/MMapDirectory.java b/lucene/src/java/org/apache/lucene/store/MMapDirectory.javaindex 229415f473c..02abe92c0da 100644--- a/lucene/src/java/org/apache/lucene/store/MMapDirectory.java+++ b/lucene/src/java/org/apache/lucene/store/MMapDirectory.java@@ -412,6 +412,7 @@ public class MMapDirectory extends FSDirectory {@Overridepublic void close() throws IOException {+ curBuf = null; curBufIndex = 0;try {if (isClone || buffers == null) return;for (int bufNr = 0; bufNr < buffers.length; bufNr++) {