Skip to content

Commit

Permalink
fix(database): Fix ConcurrentModificationException during database mi…
Browse files Browse the repository at this point in the history
…gration (#857)
  • Loading branch information
MartinWitt committed Jul 16, 2023
1 parent 05c9daa commit 504e1c4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -101,7 +102,7 @@ private void createConfigsIfMissing() {
private void removeProjectHashesWithoutResults() {
logger.atInfo().log("Removing project hashes without results");
for (Project project : projectRepository.getAll()) {
List<String> commitHashes = project.getCommitHashes();
List<String> commitHashes = new ArrayList<>(project.getCommitHashes());
for (String commitHash : commitHashes) {
if (badSmellRepositoryImpl
.mongoCollection()
Expand Down

0 comments on commit 504e1c4

Please sign in to comment.