diff --git a/java/compiler/impl/src/com/intellij/compiler/impl/TranslatingCompilerFilesMonitor.java b/java/compiler/impl/src/com/intellij/compiler/impl/TranslatingCompilerFilesMonitor.java index 6e9a6acb3429..ce7446774d6b 100644 --- a/java/compiler/impl/src/com/intellij/compiler/impl/TranslatingCompilerFilesMonitor.java +++ b/java/compiler/impl/src/com/intellij/compiler/impl/TranslatingCompilerFilesMonitor.java @@ -584,7 +584,7 @@ public class TranslatingCompilerFilesMonitor implements ApplicationComponent { } private void initOutputRootsFile(File rootsFile) throws IOException { - myOutputRootsStorage = new PersistentHashMap>>(rootsFile, new EnumeratorIntegerDescriptor(), new DataExternalizer>>() { + myOutputRootsStorage = new PersistentHashMap>>(rootsFile, EnumeratorIntegerDescriptor.INSTANCE, new DataExternalizer>>() { public void save(DataOutput out, TIntObjectHashMap> value) throws IOException { for (final TIntObjectIterator> it = value.iterator(); it.hasNext();) { it.advance(); diff --git a/java/compiler/impl/src/com/intellij/compiler/make/BackwardDependenciesStorage.java b/java/compiler/impl/src/com/intellij/compiler/make/BackwardDependenciesStorage.java index f5063ec125e7..fb7a5c6eb280 100644 --- a/java/compiler/impl/src/com/intellij/compiler/make/BackwardDependenciesStorage.java +++ b/java/compiler/impl/src/com/intellij/compiler/make/BackwardDependenciesStorage.java @@ -42,7 +42,7 @@ public class BackwardDependenciesStorage implements Flushable, Disposable { private static final int CLASS = 3; public BackwardDependenciesStorage(File file, final int cacheSize) throws IOException { - myMap = new PersistentHashMap(file, new EnumeratorIntegerDescriptor(), new MyDataExternalizer()); + myMap = new PersistentHashMap(file, EnumeratorIntegerDescriptor.INSTANCE, new MyDataExternalizer()); myCache = new SLRUCache(cacheSize * 2, cacheSize) { @NotNull diff --git a/platform/lang-api/src/com/intellij/psi/stubs/IntStubIndexExtension.java b/platform/lang-api/src/com/intellij/psi/stubs/IntStubIndexExtension.java index 098296e0fcc4..e0b076115cd4 100644 --- a/platform/lang-api/src/com/intellij/psi/stubs/IntStubIndexExtension.java +++ b/platform/lang-api/src/com/intellij/psi/stubs/IntStubIndexExtension.java @@ -29,6 +29,6 @@ public abstract class IntStubIndexExtension extends Abst } public KeyDescriptor getKeyDescriptor() { - return new EnumeratorIntegerDescriptor(); + return EnumeratorIntegerDescriptor.INSTANCE; } } \ No newline at end of file diff --git a/platform/lang-impl/src/com/intellij/find/ngrams/TrigramIndex.java b/platform/lang-impl/src/com/intellij/find/ngrams/TrigramIndex.java index ba6a97d45fc0..034701937e3c 100644 --- a/platform/lang-impl/src/com/intellij/find/ngrams/TrigramIndex.java +++ b/platform/lang-impl/src/com/intellij/find/ngrams/TrigramIndex.java @@ -76,7 +76,7 @@ public class TrigramIndex extends ScalarIndexExtension { @Override public KeyDescriptor getKeyDescriptor() { - return new EnumeratorIntegerDescriptor(); + return EnumeratorIntegerDescriptor.INSTANCE; } @Override diff --git a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java index 5594a35166ae..11c8420940db 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java @@ -532,7 +532,7 @@ public class FileBasedIndex implements ApplicationComponent { // cleared properly before updating (removed data will still be present on disk). See IDEA-52223 for illustration of possible effects. final PersistentHashMap> map = new PersistentHashMap>( - indexStorageFile, new EnumeratorIntegerDescriptor(), dataExternalizer + indexStorageFile, EnumeratorIntegerDescriptor.INSTANCE, dataExternalizer ) { @Override diff --git a/plugins/ant/src/com/intellij/lang/ant/psi/impl/AntImportsIndex.java b/plugins/ant/src/com/intellij/lang/ant/psi/impl/AntImportsIndex.java index 93a589fdb31f..a420ffa588ee 100644 --- a/plugins/ant/src/com/intellij/lang/ant/psi/impl/AntImportsIndex.java +++ b/plugins/ant/src/com/intellij/lang/ant/psi/impl/AntImportsIndex.java @@ -96,7 +96,7 @@ public class AntImportsIndex extends ScalarIndexExtension{ } public KeyDescriptor getKeyDescriptor() { - return new EnumeratorIntegerDescriptor(); + return EnumeratorIntegerDescriptor.INSTANCE; } public FileBasedIndex.InputFilter getInputFilter() {