Migrate compiler, idea and others to new case conversion api
This commit is contained in:
@@ -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
|
||||
|
||||
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user