From 0d5faf566f30537925f0577eda26be19e5b05ca6 Mon Sep 17 00:00:00 2001 From: DJ Houghton Date: Thu, 20 May 2010 18:32:14 +0000 Subject: Bug 313490 - ConcurrentModificationException during synchronizing artifact repository (p2.directorywatcher) --- .../provisional/p2/directorywatcher/RepositoryListener.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bundles/org.eclipse.equinox.p2.directorywatcher') diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java index c4db322a4..e8213eda8 100644 --- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java +++ b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java @@ -236,9 +236,9 @@ public class RepositoryListener extends DirectoryChangeListener { if (artifactRepository == null) return; if (!removedFiles.isEmpty()) { - IQueryResult descriptors = artifactRepository.descriptorQueryable().query(ArtifactDescriptorQuery.ALL_DESCRIPTORS, null); - for (Iterator iterator = descriptors.iterator(); iterator.hasNext();) { - SimpleArtifactDescriptor descriptor = (SimpleArtifactDescriptor) iterator.next(); + IArtifactDescriptor[] descriptors = artifactRepository.descriptorQueryable().query(ArtifactDescriptorQuery.ALL_DESCRIPTORS, null).toArray(IArtifactDescriptor.class); + for (IArtifactDescriptor d : descriptors) { + SimpleArtifactDescriptor descriptor = (SimpleArtifactDescriptor) d; String filename = descriptor.getRepositoryProperty(FILE_NAME); if (filename == null) { if (Tracing.DEBUG) { -- cgit v1.2.3