From 9e064e99deeaa33d0ddbedf5547be200639c6e82 Mon Sep 17 00:00:00 2001 From: Alexey Loubyansky Date: Thu, 28 Mar 2024 22:25:25 +0100 Subject: [PATCH] Use ConcurrentLinkedDeque to collect errors when inspecting dependencies --- .../domino/inspect/DependencyTreeVisitSchedulerBase.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/domino/api/src/main/java/io/quarkus/domino/inspect/DependencyTreeVisitSchedulerBase.java b/domino/api/src/main/java/io/quarkus/domino/inspect/DependencyTreeVisitSchedulerBase.java index 2bed62bd..40720eb2 100644 --- a/domino/api/src/main/java/io/quarkus/domino/inspect/DependencyTreeVisitSchedulerBase.java +++ b/domino/api/src/main/java/io/quarkus/domino/inspect/DependencyTreeVisitSchedulerBase.java @@ -1,8 +1,8 @@ package io.quarkus.domino.inspect; -import java.util.ArrayList; +import java.util.Deque; import java.util.Formatter; -import java.util.List; +import java.util.concurrent.ConcurrentLinkedDeque; import java.util.concurrent.atomic.AtomicInteger; import org.eclipse.aether.artifact.Artifact; @@ -10,7 +10,7 @@ abstract class DependencyTreeVisitSchedulerBase implements DependencyTreeVisi private static final String FORMAT_BASE = "[%s/%s %.1f%%] "; - protected final List errors = new ArrayList<>(); + protected final Deque errors = new ConcurrentLinkedDeque<>(); protected final DependencyTreeVisitContext ctx; protected final AtomicInteger counter = new AtomicInteger(); protected final int rootsTotal; @@ -23,7 +23,7 @@ abstract class DependencyTreeVisitSchedulerBase implements DependencyTreeVisi } @Override - public List getResolutionFailures() { + public Deque getResolutionFailures() { return errors; }