Skip to content

Commit b6abd6a

Browse files
committed
refactor: removed usless toHex functions
1 parent 0075ea7 commit b6abd6a

File tree

5 files changed

+1
-12
lines changed

5 files changed

+1
-12
lines changed

compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/DaemonParams.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,6 @@ fun Iterable<String>.distinctStringsDigest(): ByteArray =
226226
MessageDigest.getInstance(CLASSPATH_ID_DIGEST)
227227
.digest(this.distinct().sorted().joinToString("").toByteArray())
228228

229-
fun ByteArray.toHexString(): String = joinToString("", transform = { "%02x".format(it) })
230-
231-
232229
data class CompilerId(
233230
var compilerClasspath: List<String> = listOf(),
234231
var compilerVersion: String = ""

libraries/scripting/jvm-host-test/test/kotlin/script/experimental/jvmhost/test/CachingTest.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,6 @@ private fun File.readCompiledScript(): CompiledScript {
424424
}
425425
}
426426

427-
private fun ByteArray.toHexString(): String = joinToString("", transform = { "%02x".format(it) })
428-
429427
private fun Class<*>.supertypes(): MutableList<Class<*>> = when {
430428
superclass == null -> interfaces.toMutableList()
431429
interfaces.isEmpty() -> mutableListOf(superclass)

libraries/stdlib/samples/test/samples/text/hexFormat.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,4 +625,4 @@ class HexFormats {
625625
assertFailsWith<IllegalArgumentException> { "3A".hexToLong(format) }
626626
}
627627
}
628-
}
628+
}

libraries/tools/kotlin-gradle-statistics/src/test/kotlin/org/jetbrains/kotlin/statistics/ModuleChangesCatchingTest.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,4 @@ class ModuleChangesCatchingTest {
129129
return MessageDigest.getInstance(HASH_ALG).digest(this)
130130
}
131131

132-
private fun ByteArray.convertToHexString(): String {
133-
return this.joinToString("") { "%02x".format(it) }
134-
}
135-
136132
}

libraries/tools/kotlin-main-kts/src/org/jetbrains/kotlin/mainKts/scriptDef.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,5 @@ private fun compiledScriptUniqueName(script: SourceCode, scriptCompilationConfig
239239
return digestWrapper.digest().toHexString()
240240
}
241241

242-
private fun ByteArray.toHexString(): String = joinToString("", transform = { "%02x".format(it) })
243-
244242
private fun Int.toByteArray() = ByteBuffer.allocate(Int.SIZE_BYTES).also { it.putInt(this) }.array()
245243

0 commit comments

Comments
 (0)