Migrate compiler, idea and others to new case conversion api

This commit is contained in:
Abduqodiri Qurbonzoda
2021-04-08 02:28:57 +03:00
parent aa543c6631
commit 40d1849f33
138 changed files with 239 additions and 224 deletions
@@ -107,7 +107,7 @@ private inline fun tryConnectToDaemon(port: Int, report: (DaemonReportCategory,
private const val validFlagFileKeywordChars = "abcdefghijklmnopqrstuvwxyz0123456789-_"
fun makeAutodeletingFlagFile(keyword: String = "compiler-client", baseDir: File? = null): File {
val prefix = "kotlin-${keyword.filter { validFlagFileKeywordChars.contains(it.toLowerCase()) }}-"
val prefix = "kotlin-${keyword.filter { validFlagFileKeywordChars.contains(it.lowercaseChar()) }}-"
val flagFile = if (baseDir?.isDirectory == true)
Files.createTempFile(baseDir.toPath(), prefix, "-is-running").toFile()
else
@@ -352,7 +352,7 @@ private val humanizedMemorySizeRegex = "(\\d+)([kmg]?)".toRegex()
private fun String.memToBytes(): Long? =
humanizedMemorySizeRegex
.matchEntire(this.trim().toLowerCase())
.matchEntire(this.trim().lowercase())
?.groups?.let { match ->
match[1]?.value?.let {
it.toLong() *
@@ -114,7 +114,7 @@ class LazyClasspathWatcher(classpath: Iterable<String>,
}
fun isClasspathFile(file: File): Boolean = file.isFile && listOf("class", "jar").contains(file.extension.toLowerCase())
fun isClasspathFile(file: File): Boolean = file.isFile && listOf("class", "jar").contains(file.extension.lowercase())
fun File.md5Digest(): ByteArray {
val md = MessageDigest.getInstance(CLASSPATH_FILE_ID_DIGEST)