mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
assertion for strange memory leak
This commit is contained in:
@@ -59,11 +59,10 @@ class IndexConfiguration {
|
||||
}
|
||||
|
||||
<K, V> void registerIndex(ID<K, V> name,
|
||||
UpdatableIndex<K, V, FileContent> index,
|
||||
@NotNull UpdatableIndex<K, V, FileContent> index,
|
||||
FileBasedIndex.InputFilter inputFilter,
|
||||
int version,
|
||||
@Nullable Collection<FileType> associatedFileTypes
|
||||
) {
|
||||
@Nullable Collection<FileType> associatedFileTypes) {
|
||||
assert !myFreezed;
|
||||
|
||||
synchronized (myIndices) {
|
||||
@@ -79,7 +78,10 @@ class IndexConfiguration {
|
||||
myIndicesWithoutFileTypeInfo.add(name);
|
||||
}
|
||||
|
||||
myIndices.put(name, new Pair<>(index, inputFilter));
|
||||
Pair<UpdatableIndex<?, ?, FileContent>, FileBasedIndex.InputFilter> old = myIndices.put(name, new Pair<>(index, inputFilter));
|
||||
if (old != null) {
|
||||
throw new IllegalStateException("Index " + old.first + " already registered for the name '" + name + "'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user