Avoid exception when inspectClassesForKotlinIC produces empty file

Empty file should not happen, but we should process it correctly anyway.
This commit is contained in:
Alexey Tsvetkov
2018-06-22 04:15:52 +03:00
parent 2065f8e6fe
commit 89f0b11765
@@ -96,7 +96,7 @@ open class ModulesApiHistoryJvm(protected val modulesInfo: IncrementalModuleInfo
return Either.Error("Could not read class list for $jar from $classListFile: $t")
}
val classFileDirs = classFiles.groupBy { it.parentFile }
val classFileDirs = classFiles.filter { it.exists() && it.parentFile != null }.groupBy { it.parentFile }
val result = HashSet<File>()
for ((dir, files) in classFileDirs) {
val historyEither = getBuildHistoryForDir(dir)