diff --git a/github-bot/src/main/java/io/github/martinwitt/laughing_train/persistence/DataBaseMigration.java b/github-bot/src/main/java/io/github/martinwitt/laughing_train/persistence/DataBaseMigration.java index 4d7590408..f47266ed7 100644 --- a/github-bot/src/main/java/io/github/martinwitt/laughing_train/persistence/DataBaseMigration.java +++ b/github-bot/src/main/java/io/github/martinwitt/laughing_train/persistence/DataBaseMigration.java @@ -16,6 +16,7 @@ import jakarta.enterprise.context.ApplicationScoped; import jakarta.enterprise.event.Observes; import jakarta.inject.Inject; +import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; @@ -101,7 +102,7 @@ private void createConfigsIfMissing() { private void removeProjectHashesWithoutResults() { logger.atInfo().log("Removing project hashes without results"); for (Project project : projectRepository.getAll()) { - List commitHashes = project.getCommitHashes(); + List commitHashes = new ArrayList<>(project.getCommitHashes()); for (String commitHash : commitHashes) { if (badSmellRepositoryImpl .mongoCollection()