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());