This is an automated email from the ASF dual-hosted git repository. markt-asf pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 54af4319afdf3cacf0b41a612a52c4ea9e90812c Author: Mark Thomas <[email protected]> AuthorDate: Wed Jul 1 10:00:53 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 5cdc158cee..cde4dfd7b0 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]
