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 8b9da4026d0d257b5ef268f26ac106232c76443d Author: Robert Lazarski <[email protected]> AuthorDate: Tue Apr 7 01:38:07 2026 -1000 Fix compile error: declare ParseException on postForResponse EntityUtils.toString() throws org.apache.hc.core5.http.ParseException (checked). The try-with-resources refactor removed the catch(Exception) wrapper that was absorbing it in the original post() method, so the new postForResponse() must declare it. Test callers already use throws Exception. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> --- modules/json/test/org/apache/axis2/json/gson/UtilTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/json/test/org/apache/axis2/json/gson/UtilTest.java b/modules/json/test/org/apache/axis2/json/gson/UtilTest.java index c8a94939a6..d9d960c22a 100644 --- a/modules/json/test/org/apache/axis2/json/gson/UtilTest.java +++ b/modules/json/test/org/apache/axis2/json/gson/UtilTest.java @@ -29,6 +29,8 @@ import org.apache.hc.core5.http.HttpEntity; import org.apache.hc.core5.http.io.entity.EntityUtils; import org.apache.hc.core5.http.io.entity.StringEntity; +import org.apache.hc.core5.http.ParseException; + import java.io.IOException; public class UtilTest { @@ -49,7 +51,7 @@ public class UtilTest { * callers that test error paths need the response body even on HTTP 500. */ public static TestResponse postForResponse(String jsonString, String strURL) - throws IOException { + throws IOException, ParseException { HttpEntity stringEntity = new StringEntity(jsonString, ContentType.APPLICATION_JSON); HttpPost httpPost = new HttpPost(strURL); httpPost.setEntity(stringEntity);
