Minor, remove unnecessary logging for valid erroneous case

It seems that it's normal for VirtualFile in this place to be invalid in this
way
This commit is contained in:
Alexander Udalov
2017-01-30 15:57:51 +03:00
parent 933bcb3511
commit 1025fe9307
@@ -16,7 +16,6 @@
package org.jetbrains.kotlin.idea.decompiler.js
import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.psi.FileViewProvider
import com.intellij.psi.PsiManager
@@ -51,10 +50,6 @@ class KotlinJavaScriptMetaFileDecompiler : ClassFileDecompilers.Full() {
KtDecompiledFile(provider, ::buildDecompiledTextFromJsMetadata)
}
}
companion object {
internal val LOG = Logger.getInstance(KotlinJavaScriptMetaFileDecompiler::class.java)
}
}
private val decompilerRendererForJS = DescriptorRenderer.withOptions { defaultDecompilerRendererOptions() }
@@ -125,9 +120,8 @@ sealed class KjsmFile {
catch (e: IOException) {
// This is needed because sometimes we're given VirtualFile instances that point to non-existent .jar entries.
// Such files are valid (isValid() returns true), but an attempt to read their contents results in a FileNotFoundException.
// This looks like a platform issue, but we must still deal with it somehow here.
// Calling "refresh()" instead of catching an exception would be more correct, but is likely to degrade performance
KotlinJavaScriptMetaFileDecompiler.LOG.warn("Attempt to read non-existing file: $file", e)
// Note that although calling "refresh()" instead of catching an exception would seem more correct here,
// it's not always allowed and also is likely to degrade performance
null
}
}