This is an automated email from the ASF dual-hosted git repository. reta pushed a commit to branch 3.6.x-fixes in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 9ae1929a6b97a961f32fa442699acfe03d1ebd27 Author: Richard Zowalla <[email protected]> AuthorDate: Sat Feb 7 02:31:26 2026 +0100 CXF-9197 - Replace new URL(...) in client.vm in wsldto to avoid deprecation issues in Java 20+ (#2872) (cherry picked from commit 3018434a027fa69572293c388863b092bbe1c4f6) (cherry picked from commit 905180b7a90cb5a4e3156b713f38c0ac532fd686) (cherry picked from commit 92a6b9450a61d387c68bb729a252a8c23759c8ff) --- .../org/apache/cxf/tools/wsdlto/frontend/jaxws/template/client.vm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/client.vm b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/client.vm index d415f2e6de..a57deabf68 100644 --- a/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/client.vm +++ b/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/client.vm @@ -24,6 +24,8 @@ package $intf.PackageName; import java.io.File; import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; import java.net.URL; #if ($markGenerated == "true") import javax.annotation.Generated; @@ -71,8 +73,10 @@ public final class ${clientClassName} { if (wsdlFile.exists()) { wsdlURL = wsdlFile.toURI().toURL(); } else { - wsdlURL = new URL(args[0]); + wsdlURL = new URI(args[0]).toURL(); } + } catch (URISyntaxException e) { + e.printStackTrace(); } catch (MalformedURLException e) { e.printStackTrace(); }
