diff --git a/jps/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/IncrementalCacheImpl.kt b/jps/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/IncrementalCacheImpl.kt index 7e33f356920..76166540794 100644 --- a/jps/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/IncrementalCacheImpl.kt +++ b/jps/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/IncrementalCacheImpl.kt @@ -263,7 +263,7 @@ public class IncrementalCacheImpl( val changes = if (IncrementalCompilation.isExperimental()) - dirtyClasses.map { createChangeInfo(it) }.asSequence().filterNotNull() + dirtyClasses.mapNotNull { createChangeInfo(it) }.asSequence() else emptySequence() diff --git a/jps/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/LookupStorage.kt b/jps/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/LookupStorage.kt index 32903e254f2..0345dbb290c 100644 --- a/jps/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/LookupStorage.kt +++ b/jps/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/LookupStorage.kt @@ -59,10 +59,10 @@ class LookupStorage(private val targetDataDir: File) : BasicMapsOwner() { val key = LookupSymbolKey(lookupSymbol.name, lookupSymbol.scope) val fileIds = lookupMap[key] ?: return emptySet() - return fileIds.map { + return fileIds.mapNotNull { // null means it's outdated idToFile[it]?.path - }.filterNotNull() + } } public fun add(lookupSymbol: LookupSymbol, containingPaths: Collection) { @@ -138,7 +138,7 @@ class LookupStorage(private val targetDataDir: File) : BasicMapsOwner() { } for (lookup in lookupMap.keys) { - val fileIds = lookupMap[lookup]!!.map { oldIdToNewId[it] }.filterNotNull().toSet() + val fileIds = lookupMap[lookup]!!.mapNotNull { oldIdToNewId[it] }.toSet() if (fileIds.isEmpty()) { lookupMap.remove(lookup)