Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2017-03-19 16:02:14 -0400
committerAndrey Loskutov2017-03-19 16:02:14 -0400
commit5d80db707e5e1ad4ba80efc920c58856c75c4228 (patch)
tree038c6b2a71e567c6a1a3dfb9fe5dbc430b36fa27
parentdec2ef35a315551f719435ee1bd53dfdf6495a48 (diff)
downloadrt.equinox.p2-I20170322-2000.tar.gz
rt.equinox.p2-I20170322-2000.tar.xz
rt.equinox.p2-I20170322-2000.zip
compiler Change-Id: I3de8ff54e4efc354443ab2d99fd75316f2abacbb Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java11
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java8
3 files changed, 15 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java
index ee97dc20d..85162fa9a 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SurrogateProfileHandler.java
@@ -236,7 +236,7 @@ public class SurrogateProfileHandler implements ISurrogateProfileHandler {
|| "feature".equals(cap.getName())) { //$NON-NLS-1$
featureOrBundle = true;
}
- } else if (Boolean.TRUE.equals(unit.getProperties().get("org.eclipse.equinox.p2.type.group"))) { //$NON-NLS-1$
+ } else if (Boolean.TRUE.equals(Boolean.valueOf(unit.getProperties().get("org.eclipse.equinox.p2.type.group")))) { //$NON-NLS-1$
featureOrBundle = true;
}
}
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java
index 2308effd9..f9ab50bfb 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/p2/engine/ProvisioningContext.java
@@ -156,16 +156,19 @@ public class ProvisioningContext {
List<IArtifactRepository> repos = new ArrayList<>();
SubMonitor sub = SubMonitor.convert(monitor, (repositories.length + 1) * 100);
for (int i = 0; i < repositories.length; i++) {
- if (sub.isCanceled())
+ if (sub.isCanceled()) {
throw new OperationCanceledException();
+ }
+ URI location = repositories[i];
try {
- repos.add(repoManager.loadRepository(repositories[i], sub.newChild(100)));
+ repos.add(repoManager.loadRepository(location, sub.newChild(100)));
} catch (ProvisionException e) {
//skip unreadable repositories
}
// Remove this URI from the list of extra references if it is there.
- if (referencedArtifactRepositories != null)
- referencedArtifactRepositories.remove(repositories[i]);
+ if (referencedArtifactRepositories != null && location != null) {
+ referencedArtifactRepositories.remove(location.toString());
+ }
}
// Are there any extra artifact repository references to consider?
if (referencedArtifactRepositories != null && referencedArtifactRepositories.size() > 0 && shouldFollowArtifactReferences()) {
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java
index a1d37c742..2f89f0460 100644
--- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java
+++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java
@@ -434,7 +434,13 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
}
public boolean containsPlugin(String plugin) {
- return getBundles(true).contains(plugin);
+ List<IVersionedId> bundles = getBundles(true);
+ for (IVersionedId versionedId : bundles) {
+ if (versionedId.getId().equals(plugin)) {
+ return true;
+ }
+ }
+ return false;
}
public String[] getIcons() {

Back to the top