From c607b8e556f20db492c658fc83ab40b8f05a7957 Mon Sep 17 00:00:00 2001 From: Alexander Podkhalyuzin Date: Wed, 12 Dec 2018 14:34:04 +0300 Subject: [PATCH] Removed unnecessary warning #KT-28360 Fixed --- .../kotlin/idea/vfilefinder/IDEVirtualFileFinder.kt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/vfilefinder/IDEVirtualFileFinder.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/vfilefinder/IDEVirtualFileFinder.kt index 36e62134a4d..200235a8730 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/vfilefinder/IDEVirtualFileFinder.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/vfilefinder/IDEVirtualFileFinder.kt @@ -53,13 +53,8 @@ class IDEVirtualFileFinder(private val scope: GlobalSearchScope) : VirtualFileFi override fun findVirtualFileWithHeader(classId: ClassId): VirtualFile? = findVirtualFileWithHeader(classId, KotlinClassFileIndex.KEY) - private fun findVirtualFileWithHeader(classId: ClassId, key: ID): VirtualFile? { - val files = FileBasedIndex.getInstance().getContainingFiles(key, classId.asSingleFqName(), scope) - if (files.size > 1) { - LOG.warn("There are ${files.size} classes with same fqName: $classId found.") - } - return files.firstOrNull() - } + private fun findVirtualFileWithHeader(classId: ClassId, key: ID): VirtualFile? = + FileBasedIndex.getInstance().getContainingFiles(key, classId.asSingleFqName(), scope).firstOrNull() companion object { private val LOG = Logger.getInstance(IDEVirtualFileFinder::class.java)