From b160e38927b64d42faac9103bf4e177658847f5c Mon Sep 17 00:00:00 2001 From: Titouan Vervack Date: Thu, 2 May 2024 17:21:29 +0200 Subject: [PATCH] Fix regression in P2TargetUtils Introduced in #1253 --- .../org/eclipse/pde/internal/core/target/P2TargetUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/P2TargetUtils.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/P2TargetUtils.java index 6725cee76b..633d02c7e3 100644 --- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/P2TargetUtils.java +++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/target/P2TargetUtils.java @@ -1049,6 +1049,7 @@ static IQueryable getQueryableMetadata(URI[] repos, boolean fo int repoCount = repos.length; SubMonitor subMonitor = SubMonitor.convert(monitor, repoCount * 2); + Set seen = new HashSet<>(); List result = new ArrayList<>(repoCount); List additional = new ArrayList<>(); MultiStatus repoStatus = new MultiStatus(PDECore.PLUGIN_ID, 0, Messages.IUBundleContainer_ProblemsLoadingRepositories, null); @@ -1057,7 +1058,7 @@ static IQueryable getQueryableMetadata(URI[] repos, boolean fo IMetadataRepository repository = manager.loadRepository(repos[i], subMonitor.split(1)); result.add(repository); if (followRepositoryReferences) { - addReferences(repository, additional, new HashSet<>(), manager, subMonitor.split(1)); + addReferences(repository, additional, seen, manager, subMonitor.split(1)); } } catch (ProvisionException e) { repoStatus.add(e.getStatus());