Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Arthorne2008-04-25 12:29:33 -0400
committerJohn Arthorne2008-04-25 12:29:33 -0400
commit59aaed3a7a509425762925236afa367f7212b31a (patch)
treeba35e10d335b4cb2acd15db9c8553c4fc4ee3b6b /bundles
parent99db43df392e80187dfc436ce15635669ee4881d (diff)
downloadrt.equinox.p2-59aaed3a7a509425762925236afa367f7212b31a.tar.gz
rt.equinox.p2-59aaed3a7a509425762925236afa367f7212b31a.tar.xz
rt.equinox.p2-59aaed3a7a509425762925236afa367f7212b31a.zip
Bug 228806 Multiple instances of artifact repo to bundle pool created during multi-threaded downloads
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java
index d1f0d9f06..a195a1f0a 100644
--- a/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java
+++ b/bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java
@@ -65,7 +65,7 @@ public class Util {
return location.getDataArea(Activator.ID);
}
- static public IFileArtifactRepository getBundlePoolRepository(IProfile profile) {
+ public static synchronized IFileArtifactRepository getBundlePoolRepository(IProfile profile) {
URL location = getBundlePoolLocation(profile);
IArtifactRepositoryManager manager = getArtifactRepositoryManager();
try {
@@ -79,6 +79,8 @@ public class Util {
properties.put(IRepository.PROP_SYSTEM, Boolean.TRUE.toString());
IArtifactRepository bundlePool = manager.createRepository(location, repositoryName, REPOSITORY_TYPE, properties);
manager.addRepository(bundlePool.getLocation());
+ //re-load the repository to ensure we have the same instance as other callers
+ bundlePool = manager.loadRepository(bundlePool.getLocation(), null);
return (IFileArtifactRepository) bundlePool;
} catch (ProvisionException e) {
LogHelper.log(e);

Back to the top