From fe3a02e750adf3990f6df4cb0745d7e8fb102012 Mon Sep 17 00:00:00 2001 From: Evgeny Gerashchenko Date: Thu, 19 Jun 2014 14:53:13 +0400 Subject: [PATCH] Minor cleanup Original commit: 54f140e9e41e8f1050e2aac5197584f667d79455 --- .../jetbrains/jet/jps/incremental/IncrementalCacheImpl.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jps/jps-plugin/src/org/jetbrains/jet/jps/incremental/IncrementalCacheImpl.kt b/jps/jps-plugin/src/org/jetbrains/jet/jps/incremental/IncrementalCacheImpl.kt index 50e94b82945..6bdbf71c17b 100644 --- a/jps/jps-plugin/src/org/jetbrains/jet/jps/incremental/IncrementalCacheImpl.kt +++ b/jps/jps-plugin/src/org/jetbrains/jet/jps/incremental/IncrementalCacheImpl.kt @@ -121,6 +121,9 @@ public class IncrementalCacheImpl(baseDir: File): IncrementalCache { KotlinClassHeader.Kind.CLASS -> { return putData(moduleId, classFqName, data) } + else -> { + throw IllegalStateException("Unexpected kind with annotationData: ${header.kind}") + } } } if (header.syntheticClassKind == JvmAnnotationNames.KotlinSyntheticClass.Kind.PACKAGE_PART) { @@ -173,8 +176,7 @@ public class IncrementalCacheImpl(baseDir: File): IncrementalCache { packageSourcesData.processKeysWithExistingMapping { key -> if (key!!.startsWith(moduleId + File.pathSeparator)) { - val indexOf = key.indexOf(File.pathSeparator) - val sourceFile = File(key.substring(indexOf + 1)) + val sourceFile = File(key.substring(moduleId.length + 1)) val packagePartClassName = packageSourcesData[key]!! if (!sourceFile.exists()) {