From 44a8ce13bd243efd3e4a7844ec5c8ada652ae179 Mon Sep 17 00:00:00 2001 From: "Maxim.Mossienko" Date: Fri, 18 Nov 2016 17:50:23 +0100 Subject: [PATCH] access to indices after disposal doesn't lead to NPE (IDEA-164170) --- .../src/com/intellij/util/indexing/MapReduceIndex.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platform/lang-impl/src/com/intellij/util/indexing/MapReduceIndex.java b/platform/lang-impl/src/com/intellij/util/indexing/MapReduceIndex.java index 44a53d3375be..186897bf1aeb 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/MapReduceIndex.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/MapReduceIndex.java @@ -74,6 +74,7 @@ public class MapReduceIndex implements UpdatableIndex myInputsSnapshotMapping; @Nullable protected PersistentHashMap> myInputsIndex; private PersistentHashMap myIndexingTrace; + private volatile boolean myDisposed; private final ReentrantReadWriteLock myLock = new ReentrantReadWriteLock(); @@ -329,6 +330,7 @@ public class MapReduceIndex implements UpdatableIndex implements UpdatableIndex(); + } ValueContainerImpl.ourDebugIndexInfo.set(myIndexId); return myStorage.read(key); }