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 3e3211109a Fix TelnetCodecTest in Windows (#15033)
3e3211109a is described below

commit 3e3211109a7ba54be973fc2a86c6ace5bce8e25f
Author: Albumen Kevin <[email protected]>
AuthorDate: Fri Jan 3 16:34:34 2025 +0800

    Fix TelnetCodecTest in Windows (#15033)
---
 .../src/test/java/org/apache/dubbo/remoting/codec/TelnetCodecTest.java | 3 ++-
 1 file changed, 2 insertions(+), 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 bdcbc4a9c9..e0e0664289 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
@@ -29,6 +29,7 @@ import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
+import java.nio.charset.StandardCharsets;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -75,7 +76,7 @@ class TelnetCodecTest {
     protected byte[] objectToByte(Object obj) {
         byte[] bytes;
         if (obj instanceof String) {
-            bytes = ((String) obj).getBytes();
+            bytes = ((String) obj).getBytes(StandardCharsets.UTF_8);
         } else if (obj instanceof byte[]) {
             bytes = (byte[]) obj;
         } else {

Reply via email to