This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.3
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.3 by this push:
new 713388adb7 Fix testDecode_Backspace (#15034)
713388adb7 is described below
commit 713388adb770e103ef8bc625fb80d41db2f1e8ee
Author: Albumen Kevin <[email protected]>
AuthorDate: Sun Jan 5 16:06:12 2025 +0800
Fix testDecode_Backspace (#15034)
---
.../src/test/java/org/apache/dubbo/remoting/codec/TelnetCodecTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/dubbo-remoting/dubbo-remoting-api/src/test/java/org/apache/dubbo/remoting/codec/TelnetCodecTest.java
b/dubbo-remoting/dubbo-remoting-api/src/test/java/org/apache/dubbo/remoting/codec/TelnetCodecTest.java
index e0e0664289..d36c1d64a9 100644
---
a/dubbo-remoting/dubbo-remoting-api/src/test/java/org/apache/dubbo/remoting/codec/TelnetCodecTest.java
+++
b/dubbo-remoting/dubbo-remoting-api/src/test/java/org/apache/dubbo/remoting/codec/TelnetCodecTest.java
@@ -247,7 +247,7 @@ class TelnetCodecTest {
testDecode_assertEquals(new byte[] {'\b'},
Codec2.DecodeResult.NEED_MORE_INPUT, new String(new byte[] {32, 8}));
// test chinese
- byte[] chineseBytes = "中".getBytes();
+ byte[] chineseBytes = "中".getBytes(StandardCharsets.UTF_8);
byte[] request = join(chineseBytes, new byte[] {'\b'});
testDecode_assertEquals(request, Codec2.DecodeResult.NEED_MORE_INPUT,
new String(new byte[] {32, 32, 8, 8}));
// There may be some problem handling chinese (negative number
recognition). Ignoring this problem, the