Skip to content

Commit c4c09a3

Browse files
authored
[MWRAPPER-132][MWRAPPER-124] port MWRAPPER-124 fix to only-script (#133)
port pr #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
1 parent 1f6187f commit c4c09a3

File tree

1 file changed

+1
-1
lines changed
  • maven-wrapper-distribution/src/resources

1 file changed

+1
-1
lines changed

maven-wrapper-distribution/src/resources/only-mvnw

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ elif set_java_home; then
199199
public static void main( String[] args ) throws Exception
200200
{
201201
setDefault( new Downloader() );
202-
java.nio.file.Files.copy( new java.net.URL( args[0] ).openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() );
202+
java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() );
203203
}
204204
}
205205
END

0 commit comments

Comments
 (0)