slawekjaranowski commented on code in PR #33: URL: https://github.com/apache/maven-wrapper/pull/33#discussion_r875010847
########## maven-wrapper/src/main/java/org/apache/maven/wrapper/Installer.java: ########## @@ -70,8 +70,12 @@ public Path createDist( WrapperConfiguration configuration ) { Logger.info( "Detected MVNW_REPOURL environment variable " + mvnwRepoUrl ); String mvnPath = distributionUrl.toURL().toString(); - mvnPath = mvnPath.substring( mvnPath.indexOf( "org/apache/maven" ) ); - distributionUrl = new URI( mvnwRepoUrl ).resolve( "/" ).resolve( mvnPath ); + int pathIdx = mvnPath.indexOf( "org/apache/maven" ); + if ( 0 <= pathIdx ) + { + mvnPath = mvnPath.substring( pathIdx ); + distributionUrl = new URI( mvnwRepoUrl ).resolve( "/" ).resolve( mvnPath ); + } Review Comment: @gzm55 please reply ... I still don't understand it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org