Skip to content

Commit

Permalink
Sort input sources by name
Browse files Browse the repository at this point in the history
  • Loading branch information
laeubi committed Jan 29, 2024
1 parent 7d01e91 commit e4df26d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ public CompilerResult performCompile(CompilerConfiguration config) throws Compil
if (sourceFiles.length == 0) {
return new CompilerResult();
}
//even though order of java sources should not matter, it can make a difference sometimes (e.g. lamda numbering) see https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1921
//so to have always the same arguments regardless of hash table ordering that is used internally by plexus compiler we sort the files simply by name
Arrays.sort(sourceFiles);

logger.info("Compiling " + sourceFiles.length + " " + "source file" + (sourceFiles.length == 1 ? "" : "s")
+ " to " + destinationDir.getAbsolutePath() + " using " + COMPILER_NAME + "");
Expand Down

0 comments on commit e4df26d

Please sign in to comment.