This is an automated email from the ASF dual-hosted git repository.

robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git

commit 384f166ec42a82f86648b2c96e7ec722867fd7fe
Author: Robert Lazarski <[email protected]>
AuthorDate: Mon Apr 20 19:57:20 2026 -1000

    Fix parseResponse() to use explicit UTF-8 charset
    
    Prevents platform-dependent test failures on non-UTF-8 systems
    (e.g., Windows with windows-1252 default). Consistent with the
    existing toString("UTF-8") call at line 111.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
---
 .../axis2/json/streaming/FieldFilteringMessageFormatterTest.java   | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/modules/json/test/org/apache/axis2/json/streaming/FieldFilteringMessageFormatterTest.java
 
b/modules/json/test/org/apache/axis2/json/streaming/FieldFilteringMessageFormatterTest.java
index a0a39455bc..dddd323598 100644
--- 
a/modules/json/test/org/apache/axis2/json/streaming/FieldFilteringMessageFormatterTest.java
+++ 
b/modules/json/test/org/apache/axis2/json/streaming/FieldFilteringMessageFormatterTest.java
@@ -346,7 +346,12 @@ public class FieldFilteringMessageFormatterTest {
     }
 
     private JsonElement parseResponse() {
-        String json = outputStream.toString();
+        String json;
+        try {
+            json = outputStream.toString("UTF-8");
+        } catch (java.io.UnsupportedEncodingException e) {
+            throw new AssertionError("UTF-8 encoding not supported", e);
+        }
         JsonElement root = JsonParser.parseString(json);
         return root.getAsJsonObject().get("response");
     }

Reply via email to