diff --git a/build.gradle b/build.gradle index 901f8a7bda..e1c8766806 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ buildscript { ext.versions = [ - 'kotlin': '1.3.50-eap-86', + 'kotlin': '1.3.50', 'jmhPlugin': '0.4.8', 'animalSnifferPlugin': '1.5.0', 'dokka': '0.9.18', diff --git a/okio/src/jvmTest/kotlin/okio/BufferCursorKotlinTest.kt b/okio/src/jvmTest/kotlin/okio/BufferCursorKotlinTest.kt index a73838ed82..86678f5499 100644 --- a/okio/src/jvmTest/kotlin/okio/BufferCursorKotlinTest.kt +++ b/okio/src/jvmTest/kotlin/okio/BufferCursorKotlinTest.kt @@ -23,7 +23,6 @@ import org.junit.runner.RunWith import org.junit.runners.Parameterized import org.junit.runners.Parameterized.Parameter import org.junit.runners.Parameterized.Parameters -import java.util.Arrays import kotlin.test.assertEquals import kotlin.test.assertFalse import kotlin.test.assertNotSame @@ -98,7 +97,7 @@ class BufferCursorKotlinTest { buffer.readAndWriteUnsafe().use { cursor -> while (cursor.next() != -1) { - Arrays.fill(cursor.data!!, cursor.start, cursor.end, 'x'.toByte()) + cursor.data!!.fill('x'.toByte(), cursor.start, cursor.end) } } @@ -127,4 +126,4 @@ class BufferCursorKotlinTest { cursor.close() assertSame(null, cursor.buffer) } -} \ No newline at end of file +} diff --git a/okio/src/jvmTest/kotlin/okio/TestUtil.kt b/okio/src/jvmTest/kotlin/okio/TestUtil.kt index e87248cbdc..d39ec028b3 100644 --- a/okio/src/jvmTest/kotlin/okio/TestUtil.kt +++ b/okio/src/jvmTest/kotlin/okio/TestUtil.kt @@ -103,11 +103,7 @@ object TestUtil { } @JvmStatic - fun repeat(c: Char, count: Int): String { - val array = CharArray(count) - Arrays.fill(array, c) - return String(array) - } + fun repeat(c: Char, count: Int) = c.toString().repeat(count) @JvmStatic fun assertEquivalent(b1: ByteString, b2: ByteString) { @@ -296,4 +292,4 @@ object TestUtil { /* ktlint-enable no-multi-spaces indent */ return reversed.toShort() } -} \ No newline at end of file +}