void (IndexCloseReason reason) { myOpenCloseLock.lock(); try { if (reason == IndexCloseReason.COMPILATION_STARTED) { myActiveBuilds++; myDirtyScopeHolder.compilerActivityStarted(); } boolean myReaderIsNotNull = myReader != null; if (myReaderIsNotNull) { myReader.close(reason == IndexCloseReason.AN_EXCEPTION); myReader = null; } LOG.info("backward reference index reader is closed" + (myReaderIsNotNull ? "" : " (didn't exist)")); } finally { myOpenCloseLock.unlock(); } }