Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2008-04-24 10:55:29 -0400
committerDJ Houghton2008-04-24 10:55:29 -0400
commite3d2ea2959f7e502d1e73f347e416086d0655891 (patch)
treedae0c0c2c70032b8345aaf85f6b384a0d348eae5 /bundles
parentcc245bd83cfe574ec52dec840295222f26cfd06d (diff)
downloadrt.equinox.p2-e3d2ea2959f7e502d1e73f347e416086d0655891.tar.gz
rt.equinox.p2-e3d2ea2959f7e502d1e73f347e416086d0655891.tar.xz
rt.equinox.p2-e3d2ea2959f7e502d1e73f347e416086d0655891.zip
Bug 228686 - Exception on startup loading cache
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryManager.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryManager.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryManager.java
index bcbeea5de..661764292 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryManager.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/ArtifactRepositoryManager.java
@@ -553,6 +553,14 @@ public class ArtifactRepositoryManager extends AbstractRepositoryManager impleme
// TODO should do something here since we are failing to restore.
return;
try {
+ loadRepository(location.getArtifactRepositoryURL(), null);
+ return;
+ } catch (ProvisionException e) {
+ // log but still continue and try to create a new one
+ if (e.getStatus().getCode() != ProvisionException.REPOSITORY_NOT_FOUND)
+ LogHelper.log(new Status(IStatus.ERROR, Activator.ID, "Error occurred while loading download cache.", e)); //$NON-NLS-1$
+ }
+ try {
Map properties = new HashMap(1);
properties.put(IRepository.PROP_SYSTEM, Boolean.TRUE.toString());
SimpleArtifactRepository cache = (SimpleArtifactRepository) createRepository(location.getArtifactRepositoryURL(), "download cache", TYPE_SIMPLE_REPOSITORY, properties); //$NON-NLS-1$

Back to the top