From 5d9deab879c03293b11d7134e005f1ac0635d2ac Mon Sep 17 00:00:00 2001 From: Zoey Greer Date: Thu, 12 Sep 2024 07:49:21 -0700 Subject: [PATCH] Replace deprecated use of `toBytes()` with `Character` property `.code` (#18236) Addresses the warning which is otherwise output during build asking that we do this. Closes #18236 COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/18236 from tempoz:tempoz-fix-deprecated-use-of-to-bytes bb2398c45d8411586e760693f284c69baae89b2c PiperOrigin-RevId: 673844589 --- .../src/test/kotlin/com/google/protobuf/ByteStringsTest.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/kotlin/src/test/kotlin/com/google/protobuf/ByteStringsTest.kt b/java/kotlin/src/test/kotlin/com/google/protobuf/ByteStringsTest.kt index d9c64c64b3b72..1e0b4d8cf9549 100644 --- a/java/kotlin/src/test/kotlin/com/google/protobuf/ByteStringsTest.kt +++ b/java/kotlin/src/test/kotlin/com/google/protobuf/ByteStringsTest.kt @@ -35,8 +35,8 @@ class ByteStringsTest { @Test fun byteAt() { val str = "abc".toByteStringUtf8() - assertThat(str[0]).isEqualTo('a'.toByte()) - assertThat(str[2]).isEqualTo('c'.toByte()) + assertThat(str[0]).isEqualTo('a'.code) + assertThat(str[2]).isEqualTo('c'.code) } @Test