diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/jarfs/FastJarHandler.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/jarfs/FastJarHandler.kt index 719dc82cd46..81ec15d4bdb 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/jarfs/FastJarHandler.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/jarfs/FastJarHandler.kt @@ -30,7 +30,7 @@ class FastJarHandler(val fileSystem: FastJarFileSystem, path: String) { } } - myRoot = FastJarVirtualFile(this, "", -1, myParent = null, entryDescription = null) + myRoot = FastJarVirtualFile(this, "", -1, parent = null, entryDescription = null) // ByteArrayCharSequence should not be used instead of String // because the former class does not support equals/hashCode properly diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/jarfs/FastJarVirtualFile.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/jarfs/FastJarVirtualFile.kt index 0dd4c9ee8bc..7d1255a92e2 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/jarfs/FastJarVirtualFile.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/jarfs/FastJarVirtualFile.kt @@ -13,10 +13,10 @@ import java.io.InputStream import java.io.OutputStream internal class FastJarVirtualFile( - private val myHandler: FastJarHandler, - private val myName: CharSequence, - private val myLength: Int, - private val myParent: FastJarVirtualFile?, + private val handler: FastJarHandler, + private val name: CharSequence, + private val length: Int, + private val parent: FastJarVirtualFile?, private val entryDescription: ZipEntryDescription?, ) : VirtualFile() { @@ -24,7 +24,7 @@ internal class FastJarVirtualFile( private val myChildrenList: MutableList = mutableListOf() init { - myParent?.myChildrenList?.add(this) + parent?.myChildrenList?.add(this) } fun initChildrenArrayFromList() { @@ -33,28 +33,28 @@ internal class FastJarVirtualFile( } override fun getName(): String { - return myName.toString() + return name.toString() } override fun getNameSequence(): CharSequence { - return myName + return name } override fun getFileSystem(): VirtualFileSystem { - return myHandler.fileSystem + return handler.fileSystem } override fun getPath(): String { - if (myParent == null) { - return FileUtil.toSystemIndependentName(myHandler.file.path) + "!/" + if (parent == null) { + return FileUtil.toSystemIndependentName(handler.file.path) + "!/" } - val parentPath = myParent.path - val answer = StringBuilder(parentPath.length + 1 + myName.length) + val parentPath = parent.path + val answer = StringBuilder(parentPath.length + 1 + name.length) answer.append(parentPath) if (answer[answer.length - 1] != '/') { answer.append('/') } - answer.append(myName) + answer.append(name) return answer.toString() } @@ -63,7 +63,7 @@ internal class FastJarVirtualFile( } override fun isDirectory(): Boolean { - return myLength < 0 + return length < 0 } override fun isValid(): Boolean { @@ -71,7 +71,7 @@ internal class FastJarVirtualFile( } override fun getParent(): VirtualFile? { - return myParent + return parent } override fun getChildren(): Array { @@ -86,12 +86,12 @@ internal class FastJarVirtualFile( @Throws(IOException::class) override fun contentsToByteArray(): ByteArray { if (entryDescription == null) return EMPTY_BYTE_ARRAY - return myHandler.contentsToByteArray(entryDescription) + return handler.contentsToByteArray(entryDescription) } override fun getTimeStamp(): Long = 0 - override fun getLength(): Long = myLength.toLong() + override fun getLength(): Long = length.toLong() override fun refresh(asynchronous: Boolean, recursive: Boolean, postRunnable: Runnable?) {}