Refactoring of ICapability resulted in the reporting of duplicate exports
for bundles exporting the same package more than once. We need to compare
to the capability, not the module now. (FELIX-1838)


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@832566 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/Felix.java b/framework/src/main/java/org/apache/felix/framework/Felix.java
index 5ccae0e..ddcc20b 100644
--- a/framework/src/main/java/org/apache/felix/framework/Felix.java
+++ b/framework/src/main/java/org/apache/felix/framework/Felix.java
@@ -3095,7 +3095,7 @@
                         // Search through the current providers to find the target module.
                         for (int i = 0; (resolvedCaps != null) && (i < resolvedCaps.size()); i++)
                         {
-                            if (((ICapability) resolvedCaps.get(i)).getModule() == modules[modIdx])
+                            if ((ICapability) resolvedCaps.get(i) == caps[capIdx])
                             {
                                 list.add(new ExportedPackageImpl(
                                     this, bundle, modules[modIdx], (Capability) caps[capIdx]));