diff --git a/java/compiler/impl/src/com/intellij/compiler/impl/CompilerCacheManager.java b/java/compiler/impl/src/com/intellij/compiler/impl/CompilerCacheManager.java index 4ae6a77d6c86..d0b12ee1362a 100644 --- a/java/compiler/impl/src/com/intellij/compiler/impl/CompilerCacheManager.java +++ b/java/compiler/impl/src/com/intellij/compiler/impl/CompilerCacheManager.java @@ -101,15 +101,17 @@ public class CompilerCacheManager implements ProjectComponent { } public synchronized GenericCompilerCache - getGenericCompilerCache(GenericCompiler compiler) throws IOException { + getGenericCompilerCache(final GenericCompiler compiler) throws IOException { GenericCompilerCache cache = myGenericCachesMap.get(compiler); if (cache == null) { final GenericCompilerCache genericCache = new GenericCompilerCache(compiler, GenericCompilerRunner .getGenericCompilerCacheDir(myProject, compiler)); myGenericCachesMap.put(compiler, genericCache); myCacheDisposables.add(new Disposable() { - @Override public void dispose() { + if (LOG.isDebugEnabled()) { + LOG.debug("Closing cache for feneric compiler " + compiler.getId()); + } genericCache.close(); } }); @@ -119,15 +121,17 @@ public class CompilerCacheManager implements ProjectComponent { return (GenericCompilerCache)cache; } - public synchronized FileProcessingCompilerStateCache getFileProcessingCompilerCache(FileProcessingCompiler compiler) throws IOException { + public synchronized FileProcessingCompilerStateCache getFileProcessingCompilerCache(final FileProcessingCompiler compiler) throws IOException { Object cache = myCompilerToCacheMap.get(compiler); if (cache == null) { - final FileProcessingCompilerStateCache stateCache = new FileProcessingCompilerStateCache(getCompilerRootDir(compiler), - compiler - ); + final File compilerRootDir = getCompilerRootDir(compiler); + final FileProcessingCompilerStateCache stateCache = new FileProcessingCompilerStateCache(compilerRootDir, compiler); myCompilerToCacheMap.put(compiler, stateCache); myCacheDisposables.add(new Disposable() { public void dispose() { + if (LOG.isDebugEnabled()) { + LOG.debug("Closing cache for compiler " + compiler.getDescription() + "; cache root dir: " + compilerRootDir); + } stateCache.close(); } }); diff --git a/java/compiler/impl/src/com/intellij/compiler/make/CachedPersistentHashMap.java b/java/compiler/impl/src/com/intellij/compiler/make/CachedPersistentHashMap.java index 0bb6773644c1..12eb05e551e3 100644 --- a/java/compiler/impl/src/com/intellij/compiler/make/CachedPersistentHashMap.java +++ b/java/compiler/impl/src/com/intellij/compiler/make/CachedPersistentHashMap.java @@ -103,7 +103,7 @@ public class CachedPersistentHashMap extends PersistentHashMap