[ https://issues.apache.org/jira/browse/MNG-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15952609#comment-15952609 ]
Karl Heinz Marbaise edited comment on MNG-6203 at 4/2/17 10:02 AM: ------------------------------------------------------------------- Incredible how fast you were! I was just interrupted by my wife and could not finish the issue. I posted a printscreen that you can see the code line... I would propose to remove this part since userToolchainsFile is never used: {code:java} File userToolchainsFile; if ( commandLine.hasOption( CLIManager.ALTERNATE_USER_TOOLCHAINS ) ) { userToolchainsFile = new File( commandLine.getOptionValue( CLIManager.ALTERNATE_USER_TOOLCHAINS ) ); userToolchainsFile = resolveFile( userToolchainsFile, workingDirectory ); } else { userToolchainsFile = MavenCli.DEFAULT_USER_TOOLCHAINS_FILE; } {code} It seems as this code once has been moved to here: {code:java} private void toolchains( CliRequest cliRequest ) throws Exception { File userToolchainsFile; if ( cliRequest.commandLine.hasOption( CLIManager.ALTERNATE_USER_TOOLCHAINS ) ) { userToolchainsFile = new File( cliRequest.commandLine.getOptionValue( CLIManager.ALTERNATE_USER_TOOLCHAINS ) ); userToolchainsFile = resolveFile( userToolchainsFile, cliRequest.workingDirectory ); if ( !userToolchainsFile.isFile() ) { throw new FileNotFoundException( "The specified user toolchains file does not exist: " + userToolchainsFile ); } } {code} Gruss Stefan was (Author: stefan.eic...@gmail.com): Incredible how fast you were! I was just interrupted by my wife and could not finish the issue. I posted a printscreen that you can see the code line... I would propose to remove this part since userToolchainsFile is never used: File userToolchainsFile; if ( commandLine.hasOption( CLIManager.ALTERNATE_USER_TOOLCHAINS ) ) { userToolchainsFile = new File( commandLine.getOptionValue( CLIManager.ALTERNATE_USER_TOOLCHAINS ) ); userToolchainsFile = resolveFile( userToolchainsFile, workingDirectory ); } else { userToolchainsFile = MavenCli.DEFAULT_USER_TOOLCHAINS_FILE; } It seems as this code once has been moved to here: private void toolchains( CliRequest cliRequest ) throws Exception { File userToolchainsFile; if ( cliRequest.commandLine.hasOption( CLIManager.ALTERNATE_USER_TOOLCHAINS ) ) { userToolchainsFile = new File( cliRequest.commandLine.getOptionValue( CLIManager.ALTERNATE_USER_TOOLCHAINS ) ); userToolchainsFile = resolveFile( userToolchainsFile, cliRequest.workingDirectory ); if ( !userToolchainsFile.isFile() ) { throw new FileNotFoundException( "The specified user toolchains file does not exist: " + userToolchainsFile ); } } Gruss Stefan > Minor cleanup in MavenCli.java > ------------------------------ > > Key: MNG-6203 > URL: https://issues.apache.org/jira/browse/MNG-6203 > Project: Maven > Issue Type: Improvement > Components: Embedding > Affects Versions: 3.5.0-beta-1 > Reporter: Stefan Eicher > Priority: Trivial > Attachments: Bildschirmfoto 2017-04-02 um 11.26.40.png, > Bildschirmfoto 2017-04-02 um 11.37.41.png > > > There seems to be some old unnecessary code in the MavenCli.java > that could be cleaned up. > I will create a pull-request. -- This message was sent by Atlassian JIRA (v6.3.15#6346)