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 bb2398c45d
PiperOrigin-RevId: 673844589
pull/18284/head
Zoey Greer 6 months ago committed by Copybara-Service
parent 3d9f6dc1e1
commit 5d9deab879
  1. 4
      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

Loading…
Cancel
Save