elharo commented on code in PR #23: URL: https://github.com/apache/maven-shared-incremental/pull/23#discussion_r1173926787
########## src/main/java/org/apache/maven/shared/incremental/IncrementalBuildHelper.java: ########## @@ -323,25 +362,23 @@ public String[] beforeRebuildExecution( IncrementalBuildHelperRequest incrementa public void afterRebuildExecution( IncrementalBuildHelperRequest incrementalBuildHelperRequest ) throws MojoExecutionException { - DirectoryScanner diffScanner = getDirectoryScanner(); - // now scan the same directory again and create a diff - diffScanner.scan(); - DirectoryScanResult scanResult = diffScanner.diffIncludedFiles( filesBeforeAction ); - File mojoConfigBase = getMojoStatusDirectory(); - File mojoConfigFile = new File( mojoConfigBase, CREATED_FILES_LST_FILENAME ); - try - { - FileUtils.fileWriteArray( mojoConfigFile, scanResult.getFilesAdded() ); - } - catch ( IOException e ) - { - throw new MojoExecutionException( "Error while storing the mojo status", e ); - } + writeChangedFiles( + getDirectoryScanner(), Review Comment: That only makes sense if the existing API is correct. Consistency with bad code is not a goal. -- 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: dev-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org