Do not expose paths with placeholders in JS IC caches

#KT-31310 Fixed
This commit is contained in:
Alexey Tsvetkov
2019-05-15 19:01:52 +03:00
parent d2c372a4f7
commit 209a5d8464
8 changed files with 62 additions and 5 deletions
@@ -114,8 +114,7 @@ open class IncrementalJsCache(
fun nonDirtyPackageParts(): Map<File, TranslationResultValue> =
hashMapOf<File, TranslationResultValue>().apply {
for (path in translationResults.keys()) {
val file = File(path)
for (file in translationResults.keys()) {
if (file !in dirtySources) {
put(file, translationResults[file]!!)
}
@@ -167,8 +166,8 @@ private class TranslationResultMap(
operator fun get(sourceFile: File): TranslationResultValue? =
storage[pathConverter.toPath(sourceFile)]
fun keys(): Collection<String> =
storage.keys
fun keys(): Collection<File> =
storage.keys.map { pathConverter.toFile(it) }
fun remove(sourceFile: File, changesCollector: ChangesCollector) {
val path = pathConverter.toPath(sourceFile)