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

markt-asf pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 9bf66a7d5103f9b2a7d52268e3b096556d6cf189
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Jul 1 10:01:17 2026 +0100

    Fix deprecation warning
---
 test/org/apache/catalina/connector/TestRequest.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/connector/TestRequest.java 
b/test/org/apache/catalina/connector/TestRequest.java
index d28a79d2ae..39ab4ca130 100644
--- a/test/org/apache/catalina/connector/TestRequest.java
+++ b/test/org/apache/catalina/connector/TestRequest.java
@@ -23,6 +23,7 @@ import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
 import java.net.HttpURLConnection;
+import java.net.URI;
 import java.net.URL;
 import java.nio.charset.Charset;
 import java.nio.charset.StandardCharsets;
@@ -588,7 +589,7 @@ public class TestRequest extends TomcatBaseTest {
 
     private HttpURLConnection getConnection(String query) throws IOException {
         URL postURL;
-        postURL = new URL(query);
+        postURL = URI.create(query).toURL();
         HttpURLConnection conn = (HttpURLConnection) postURL.openConnection();
         conn.setRequestMethod(Method.POST);
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to