Skip to content

Commit

Permalink
Sort file results in FindEmptyPublicationFilesTask.java (ZFIN#1220)
Browse files Browse the repository at this point in the history
  • Loading branch information
rtaylorzfin authored Nov 14, 2024
1 parent 3693847 commit 88b211a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ private void runTask() throws IOException {
initAll();
PublicationService pubService = new PublicationService();
List<PublicationFile> files = getPublicationRepository().getAllPublicationFiles();
List<PublicationFile> emptyFiles = files.stream().filter(file -> pubService.getPublicationFileSizeOnDisk(file) == 0).toList();
List<PublicationFile> emptyFiles = files.stream()
.filter(file -> pubService.getPublicationFileSizeOnDisk(file) == 0)
.sorted((file1, file2) -> file1.getPublication().getZdbID().compareTo(file2.getPublication().getZdbID()))
.toList();
String outputDir = ".";
if (System.getenv("ARTIFACTS_DIR") != null) {
outputDir = System.getenv("ARTIFACTS_DIR");
Expand Down

0 comments on commit 88b211a

Please sign in to comment.