diff --git a/java/compiler/impl/src/com/intellij/compiler/impl/TimestampCache.java b/java/compiler/impl/src/com/intellij/compiler/impl/TimestampCache.java deleted file mode 100644 index 79e5470e16f9..000000000000 --- a/java/compiler/impl/src/com/intellij/compiler/impl/TimestampCache.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2000-2009 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * @author: Eugene Zhuravlev - * Date: Apr 1, 2003 - * Time: 1:53:00 PM - */ -package com.intellij.compiler.impl; - -import org.jetbrains.annotations.NotNull; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.File; -import java.io.IOException; - -public class TimestampCache extends StateCache { - public TimestampCache(File storeDirectory) throws IOException { - super(new File(storeDirectory, "timestamps")); - } - - public void update(String url, @NotNull Long state) throws IOException { - super.update(url, state); - } - - public Long read(DataInput stream) throws IOException { - return stream.readLong(); - } - - public void write(Long aLong, DataOutput out) throws IOException { - out.writeLong(aLong.longValue()); - } -} 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 47b6b249837c..0bb6773644c1 100644 --- a/java/compiler/impl/src/com/intellij/compiler/make/CachedPersistentHashMap.java +++ b/java/compiler/impl/src/com/intellij/compiler/make/CachedPersistentHashMap.java @@ -86,13 +86,21 @@ public class CachedPersistentHashMap extends PersistentHashMap extends PersistentEnumerator{ public synchronized void close() throws IOException { synchronized (ourLock) { - myAppendCacheFlusher.stop(); - myAppendCache.clear(); try { + myAppendCacheFlusher.stop(); + myAppendCache.clear(); myValueStorage.dispose(); } finally { diff --git a/platform/util/src/com/intellij/util/io/ResizeableMappedFile.java b/platform/util/src/com/intellij/util/io/ResizeableMappedFile.java index c4b8ce15af81..18d871af3564 100644 --- a/platform/util/src/com/intellij/util/io/ResizeableMappedFile.java +++ b/platform/util/src/com/intellij/util/io/ResizeableMappedFile.java @@ -174,8 +174,12 @@ public class ResizeableMappedFile implements Forceable { } public void close() { - force(); - myStorage.close(); + try { + force(); + } + finally { + myStorage.close(); + } } }