[kotlin] Drop redundant check

#KTIJ-30855

GitOrigin-RevId: d9ce4fbb6cfe5fee2a01599bbc9d49d3e298b2db
This commit is contained in:
Vladimir Dolzhenko
2024-08-02 21:18:44 +02:00
committed by intellij-monorepo-bot
parent 33cf2fbdfa
commit c69d5b7c2c

View File

@@ -12,7 +12,6 @@ import com.intellij.openapi.progress.ProcessCanceledException
import com.intellij.openapi.project.IndexNotReadyException
import com.intellij.openapi.project.Project
import com.intellij.openapi.project.rootManager
import com.intellij.openapi.roots.FileIndexFacade
import com.intellij.openapi.roots.ModuleRootEvent
import com.intellij.openapi.roots.ModuleRootListener
import com.intellij.openapi.util.Key
@@ -396,7 +395,6 @@ class PerModulePackageCacheService(private val project: Project) : Disposable {
val service = getInstance(project)
val fileManager = PsiManagerEx.getInstanceEx(project).fileManager
val fileIndexFacade = FileIndexFacade.getInstance(project)
if (events.size >= FULL_DROP_THRESHOLD) {
service.onTooComplexChange()
} else {
@@ -408,8 +406,7 @@ class PerModulePackageCacheService(private val project: Project) : Disposable {
}
.filter {
val vFile = it.file!!
vFile.isDirectory ||
(KotlinFileType.INSTANCE == fileTypeManager.getFileTypeByFileName(vFile.name) && fileIndexFacade.isInContent(vFile))
vFile.isDirectory || KotlinFileType.INSTANCE == fileTypeManager.getFileTypeByFileName(vFile.name)
}
.filter {
// It expected that content change events will be duplicated with more precise PSI events and processed