Skip to content

Commit 5d9deab

Browse files
tempozcopybara-github
authored andcommitted
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=#18236 from tempoz:tempoz-fix-deprecated-use-of-to-bytes bb2398c PiperOrigin-RevId: 673844589
1 parent 3d9f6dc commit 5d9deab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/kotlin/src/test/kotlin/com/google/protobuf/ByteStringsTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ class ByteStringsTest {
3535
@Test
3636
fun byteAt() {
3737
val str = "abc".toByteStringUtf8()
38-
assertThat(str[0]).isEqualTo('a'.toByte())
39-
assertThat(str[2]).isEqualTo('c'.toByte())
38+
assertThat(str[0]).isEqualTo('a'.code)
39+
assertThat(str[2]).isEqualTo('c'.code)
4040
}
4141

4242
@Test

0 commit comments

Comments
 (0)