From 51ee1b3e5a4f739bf7bc3428c7434addd4f3a43c Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 22 Sep 2015 14:13:31 +0200 Subject: [PATCH] do not cache binary contents when trying to check if a .class file is compiled with Kotlin --- .../org/jetbrains/kotlin/load/kotlin/VirtualFileKotlinClass.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/load/kotlin/VirtualFileKotlinClass.kt b/compiler/frontend.java/src/org/jetbrains/kotlin/load/kotlin/VirtualFileKotlinClass.kt index e723a260a7e..1e360bc04d3 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/load/kotlin/VirtualFileKotlinClass.kt +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/load/kotlin/VirtualFileKotlinClass.kt @@ -59,7 +59,7 @@ public class VirtualFileKotlinClass private constructor( assert(file.getFileType() == JavaClassFileType.INSTANCE) { "Trying to read binary data from a non-class file $file" } try { - val byteContent = file.contentsToByteArray() + val byteContent = file.contentsToByteArray(false) if (!byteContent.isEmpty()) { return@time FileBasedKotlinClass.create(byteContent) { name, header, innerClasses ->