Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2017-04-10 09:06:24 -0400
committerThomas Watson2017-05-15 08:53:41 -0400
commitdd43b2069761debc4dfbc7d069a06c7228fb994a (patch)
tree6235aae24ae87575c62682833f585a5cf7545004
parent9eb05d1806eadf27d27cd68116813a14bc9e084f (diff)
downloadrt.equinox.p2-I20170515-2000.tar.gz
rt.equinox.p2-I20170515-2000.tar.xz
rt.equinox.p2-I20170515-2000.zip
Bug 514530 - CCE: UpdateSiteArtifactRepository cannot be cast toI20170515-2000
IFileArtifactRepository In case we are able to load a repository which type doesn't correspond to the expected IFileArtifactRepository, just return null (and do not try to create another one at same location). Change-Id: I0787bc10b02b43def7efdbcfdc9c1221e032629a Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--bundles/org.eclipse.equinox.p2.touchpoint.eclipse/src/org/eclipse/equinox/internal/p2/touchpoint/eclipse/Util.java7
1 files changed, 6 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 91812a358..52d27b2dc 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
@@ -78,7 +78,12 @@ public class Util {
return null;
IArtifactRepositoryManager manager = getArtifactRepositoryManager(agent);
try {
- return (IFileArtifactRepository) manager.loadRepository(location, null);
+ IArtifactRepository repository = manager.loadRepository(location, null);
+ if (repository instanceof IFileArtifactRepository) {
+ return (IFileArtifactRepository) repository;
+ }
+ // update site repository
+ return null;
} catch (ProvisionException e) {
//the repository doesn't exist, so fall through and create a new one
}

Back to the top