[213] Switch to 213 platform
KTI-1114
This commit is contained in:
committed by
Space Team
parent
7f07b2a82c
commit
d4cffb8a5a
@@ -16,6 +16,8 @@
|
||||
|
||||
package org.jetbrains.kotlin.incremental.storage
|
||||
|
||||
import com.intellij.util.CommonProcessors
|
||||
import com.intellij.util.io.AppendablePersistentMap
|
||||
import com.intellij.util.io.DataExternalizer
|
||||
import com.intellij.util.io.IOUtil
|
||||
import com.intellij.util.io.KeyDescriptor
|
||||
@@ -59,7 +61,9 @@ class CachingLazyStorage<K, V>(
|
||||
|
||||
override val keys: Collection<K>
|
||||
@Synchronized
|
||||
get() = getStorageIfExists()?.allKeysWithExistingMapping ?: listOf()
|
||||
get() = buildList {
|
||||
getStorageIfExists()?.processKeysWithExistingMapping(CommonProcessors.CollectProcessor(this))
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
override operator fun contains(key: K): Boolean =
|
||||
@@ -84,7 +88,7 @@ class CachingLazyStorage<K, V>(
|
||||
check(valueExternalizer is AppendableDataExternalizer<*>) {
|
||||
"`valueExternalizer` should implement the `AppendableDataExternalizer` interface to be able to call `append`"
|
||||
}
|
||||
getStorageOrCreateNew().appendData(key, { valueExternalizer.save(it, value) })
|
||||
getStorageOrCreateNew().appendData(key, AppendablePersistentMap.ValueDataAppender { valueExternalizer.save(it, value) })
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
|
||||
Reference in New Issue
Block a user