Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2014-12-11 22:26:18 +0000
committerThomas Watson2014-12-11 22:27:33 +0000
commit68647b50dff58eb40f1011c2668ab9f1854e16ca (patch)
treef3f04156f518287713f2d2176fe1d05f626a5866
parent42742c07d690734bf087c2c9636c43fcbdd41e54 (diff)
downloadrt.equinox.framework-68647b50dff58eb40f1011c2668ab9f1854e16ca.tar.gz
rt.equinox.framework-68647b50dff58eb40f1011c2668ab9f1854e16ca.tar.xz
rt.equinox.framework-68647b50dff58eb40f1011c2668ab9f1854e16ca.zip
Bug 454911 - WrappedResource.getCapabilities ignores the namespace paramI20141216-0800
-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 6ada758b0..230912a17 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
@@ -1520,7 +1520,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