Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2014-12-11 17:26:18 -0500
committerThomas Watson2015-02-03 14:39:04 -0500
commit0fb3c51737c468e0f5e76a1c956f9e96c3efaea7 (patch)
tree33a7bdb591f17e07cc82be45e85f995cbc11e446
parentb6da2019a511f17999b643af1f4af4633a3bb9b4 (diff)
downloadrt.equinox.framework-0fb3c51737c468e0f5e76a1c956f9e96c3efaea7.tar.gz
rt.equinox.framework-0fb3c51737c468e0f5e76a1c956f9e96c3efaea7.tar.xz
rt.equinox.framework-0fb3c51737c468e0f5e76a1c956f9e96c3efaea7.zip
Bug 454911 - WrappedResource.getCapabilities ignores the namespace param
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/apache/felix/resolver/Candidates.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/apache/felix/resolver/ResolverImpl.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/apache/felix/resolver/WrappedResource.java4
3 files changed, 5 insertions, 3 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/apache/felix/resolver/Candidates.java b/bundles/org.eclipse.osgi/container/src/org/apache/felix/resolver/Candidates.java
index 61fa97b9e..6b946df8e 100644
--- a/bundles/org.eclipse.osgi/container/src/org/apache/felix/resolver/Candidates.java
+++ b/bundles/org.eclipse.osgi/container/src/org/apache/felix/resolver/Candidates.java
@@ -1060,6 +1060,8 @@ class Candidates
if (actual == null)
{
actual = new ArrayList<Requirement>();
+ if (resVersion == null)
+ resVersion = new Version(0, 0, 0);
fragmentVersions.put(resVersion, actual);
}
actual.add(req);
diff --git a/bundles/org.eclipse.osgi/container/src/org/apache/felix/resolver/ResolverImpl.java b/bundles/org.eclipse.osgi/container/src/org/apache/felix/resolver/ResolverImpl.java
index a34115dc3..21721006d 100644
--- a/bundles/org.eclipse.osgi/container/src/org/apache/felix/resolver/ResolverImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/apache/felix/resolver/ResolverImpl.java
@@ -1531,7 +1531,7 @@ public class ResolverImpl implements Resolver
for (Candidates existingPerm : permutations)
{
List<Capability> existingPermCands = existingPerm.getCandidates(req);
- if (!existingPermCands.get(0).equals(candidates.get(0)))
+ if (existingPermCands != null && !existingPermCands.get(0).equals(candidates.get(0)))
{
permutated = true;
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/apache/felix/resolver/WrappedResource.java b/bundles/org.eclipse.osgi/container/src/org/apache/felix/resolver/WrappedResource.java
index 693e8bbcd..e37d23458 100644
--- a/bundles/org.eclipse.osgi/container/src/org/apache/felix/resolver/WrappedResource.java
+++ b/bundles/org.eclipse.osgi/container/src/org/apache/felix/resolver/WrappedResource.java
@@ -58,7 +58,7 @@ class WrappedResource implements Resource
List<Capability> caps = new ArrayList<Capability>();
// Wrap host capabilities.
- for (Capability cap : m_host.getCapabilities(null))
+ for (Capability cap : m_host.getCapabilities(namespace))
{
caps.add(new WrappedCapability(this, cap));
}
@@ -68,7 +68,7 @@ class WrappedResource implements Resource
{
for (Resource fragment : m_fragments)
{
- for (Capability cap : fragment.getCapabilities(null))
+ for (Capability cap : fragment.getCapabilities(namespace))
{
// Filter out identity capabilities, since they
// are not part of the fragment payload.

Back to the top