This is an automated email from the ASF dual-hosted git repository. cstamas pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-wrapper.git
The following commit(s) were added to refs/heads/master by this push: new c4c09a3 [MWRAPPER-132][MWRAPPER-124] port MWRAPPER-124 fix to only-script (#133) c4c09a3 is described below commit c4c09a3b579cfb3e2bcc79c8b42d07dd481f2d96 Author: James Z.M. Gao <gaoz...@gmail.com> AuthorDate: Thu Apr 18 17:02:02 2024 +0800 [MWRAPPER-132][MWRAPPER-124] port MWRAPPER-124 fix to only-script (#133) port pr https://github.com/apache/maven-wrapper/pull/120 Test Method: ```bash sed -n '/public class Downloader/,/\t}/p' maven-wrapper-distribution/src/resources/only-mvnw > Downloader.java jenv shell 21 ## or 1.7, 1.8, 11, 17 javac -version javac Downloader.java -Xlint:all -Werror ``` Passed lint compile test with jdk 1.7, 1.8, 11, 17 and 21 --- https://issues.apache.org/jira/browse/MWRAPPER-132 --- maven-wrapper-distribution/src/resources/only-mvnw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maven-wrapper-distribution/src/resources/only-mvnw b/maven-wrapper-distribution/src/resources/only-mvnw index 60c1662..b04e16b 100755 --- a/maven-wrapper-distribution/src/resources/only-mvnw +++ b/maven-wrapper-distribution/src/resources/only-mvnw @@ -199,7 +199,7 @@ elif set_java_home; then public static void main( String[] args ) throws Exception { setDefault( new Downloader() ); - java.nio.file.Files.copy( new java.net.URL( args[0] ).openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); + java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); } } END